Cotal TypeScript packages
    Preparing search index...

    Interface MeshTarget

    One coherent answer to "which mesh does this command act on, and where do its creds + personas live" — resolved identically for both, so a spawn can never authenticate to mesh A while loading mesh B's persona. Replaces the scattered loadSpaceAuth(authDir(cotalRoot())) + resolveSpace + DEFAULT_SERVER guesswork that silently mistook ~/.cotal for a space.

    Pure and offline (no network): <TAB> completion uses it as-is; spawn adds a reachability preflight (probeConnect) on top.

    interface MeshTarget {
        auth?: SpaceAuth;
        mode: "auth" | "open" | "user";
        namesNoSpace?: true;
        origin?: "catalog" | "up" | "manual";
        personaRoot: string;
        policy?: { eventPayloads?: "withheld"; events?: "required" };
        recordedServer?: string;
        root: string;
        server: string;
        source:
            | "registry"
            | "flag-server"
            | "flag-space"
            | "flag-space-override"
            | "local-space"
            | "local-recorded"
            | "current";
        space: string;
        tlsRequired: boolean;
        userAuth?: UserAuthInfo;
    }
    Index
    auth?: SpaceAuth

    Trust material, for a STATIC-auth mesh only — undefined for open AND for user mode (a user-mode root may still hold auth.json on disk; deliberately not loaded here so no caller can drift into minting static creds for a user-auth space).

    mode: "auth" | "open" | "user"

    The mesh's auth mode — user is its OWN connect path (login + bearer), a hard branch: it never static-mints from auth and never connects credlessly like open.

    namesNoSpace?: true

    For local-space: the root's .cotal/ holds records but names no space, as after space forget, so the default space was assumed for it. Surfaces name the folder, not a mesh recorded there.

    origin?: "catalog" | "up" | "manual"

    Who registered the mesh this target came from — see MeshEntry.origin. Absent for a target resolved off disk rather than a record. Surfaces read it to say the right thing when the broker is down: an up mesh is restarted with cotal up, a manual one runs somewhere this machine does not control (the local remedy is cotal space forget). A catalog entry follows its provider's catalog and is removed by cotal sync when no longer listed.

    personaRoot: string

    <root>/.cotal/agents — the persona catalog for this mesh.

    policy?: { eventPayloads?: "withheld"; events?: "required" }

    Required session behavior from the selected registration.

    recordedServer?: string

    For a broker address --server supplied: the address this machine records for the target's space, when it records one for this root. A probe of another address says nothing about that space's mesh, and surfaces read this to say which address did not answer.

    root: string

    Absolute project root. For a discovered space this may differ from the catalog custody root that keeps its provider-owned sentinel credential.

    server: string
    source:
        | "registry"
        | "flag-server"
        | "flag-space"
        | "flag-space-override"
        | "local-space"
        | "local-recorded"
        | "current"

    Where the target came from — this also carries OWNERSHIP for pruning. registry/current/ flag-space/local-recorded mean the server + mode came from a registry record, so a stale-broker failure prunes the entry. local-space/flag-server/flag-space-override are the non-registry escape hatches — NEVER pruned: the probed server is operator-supplied (a raw --server, or a --space whose --server overrides the recorded broker), so a failure against it must not delete the recorded entry. local-recorded is a local project matched to a registry entry by root: registry-owned for pruning, but quiet on the success line (self-evident from cwd).

    space: string
    tlsRequired: boolean

    Whether connections to this mesh must REQUIRE TLS, carried through from the mesh record's tlsRequired. Non-optional so the resolver cannot forget it: an omitted TLS requirement is the dangerous default, because a client with none still connects to a TLS broker and looks fine, while remaining downgradeable by a forged plaintext INFO.

    userAuth?: UserAuthInfo

    User-auth client metadata (from the registry entry), present iff mode === "user".