Cotal TypeScript packages
    Preparing search index...

    Function connectOrThrow

    • Resolve where a mesh-touching command connects + with what creds, THROWING ConnectRefusal on every refusal instead of ending the process. connectOrExit is this plus the printing and the exit; a caller that must survive a refusal (a reconnect loop) calls this one. • Explicit --creds → a RAW connection to --server, or to the address its space is registered at. Without --space, use the broker's unique registration when --server is given, or the selected space or this folder's (credsSpace) otherwise. The fallback is the default. Except when the target is a known per-user-auth mesh. Those refuse static creds fail-closed because old local creds remain broker-valid but are the wrong identity plane after the flip. • Otherwise → resolve the running mesh from the registry (works from any dir), mint role creds on an auth mesh, and preflight with the registry's stale-prune unless readOnly is requested.

      Parameters

      Returns Promise<Connection>