Cotal TypeScript packages
    Preparing search index...

    Interface Mesh

    interface Mesh {
        defaultAgent?: string;
        space: string;
        agentCall(
            seat: SeatRef,
            command: string,
            args: Record<string, unknown>,
        ): Promise<unknown>;
        catalogs(managerInstanceId?: string): Promise<AgentCatalog[]>;
        channels(): Promise<ChannelRow[]>;
        close(): Promise<void>;
        condition(seat: SeatRef, since: number): SeatCondition | undefined;
        despawn(seat: SeatRef): Promise<void>;
        followFrames(onFrame: (frame: SeatFrame) => void): () => void;
        followRoster(onChange: () => void): () => void;
        frameHistory(seat: SeatRef): Promise<SeatFrame[]>;
        input(seat: SeatRef, text: string): Promise<void>;
        interrupt(seat: SeatRef): Promise<void>;
        machineUnreadable(): string | undefined;
        manager(instanceId: string): Promise<ManagerChoice>;
        managers(): Promise<ManagerChoice[]>;
        personas(managerInstanceId?: string): Promise<PersonaRow[]>;
        presence(seat: SeatRef): string | undefined;
        promptCounter(seat: SeatRef): PromptCounter | undefined;
        relabel(seat: SeatRef, label: string): Promise<string>;
        rename(seat: SeatRef, name: string): Promise<string>;
        roster(): Promise<RosterEntry[]>;
        seats(): Promise<SeatList>;
        served(seat: SeatRef): AgentEndpointServes | undefined;
        shownName(seat: SeatRef): string | undefined;
        spawn(request: SpawnRequest): Promise<SeatRef>;
        spawnNameError(name: string): string | undefined;
        startManager(): Promise<string>;
    }
    Index
    defaultAgent?: string

    The application a launch uses when none is chosen, as the operator's preference names it.

    space: string

    The space this process acts in.

    • Call one of the seat's agent endpoint commands as its owner and resolve with the reply's data. Rejects with AgentCallFailed, unavailable when the seat does not serve it.

      Parameters

      • seat: SeatRef
      • command: string
      • args: Record<string, unknown>

      Returns Promise<unknown>

    • The applications and models a manager offers. Rejects with LaunchListsRefused when the caller may not read them.

      Parameters

      • OptionalmanagerInstanceId: string

      Returns Promise<AgentCatalog[]>

    • The space's channels, by name, without the agents' event channels.

      Returns Promise<ChannelRow[]>

    • The condition the seat's presence carries now, when this process saw it arrive at or after since, its own clock in epoch ms; undefined otherwise. A failed turn's text is here: the run's RUN_ERROR carries only a fixed message.

      Parameters

      Returns SeatCondition | undefined

    • Follow every seat's event frames and payload frames. Returns a function that stops following.

      Parameters

      Returns () => void

    • Call onChange each time the roster changes. Returns a function that stops following.

      Parameters

      • onChange: () => void

      Returns () => void

    • Type text into the seat's terminal and press Enter, through its manager's input command, so it arrives as the operator's own words. Rejects, naming why, when the manager refuses.

      Parameters

      Returns Promise<void>

    • Interrupt the seat's live turn through its manager, which writes the connector's interrupt key into its terminal. Rejects, naming why, when the manager refuses.

      Parameters

      Returns Promise<void>

    • Why this machine's identity could not be read, undefined when it could. Without it no manager reads as this machine's, so a thread neither defaults to one nor starts one.

      Returns string | undefined

    • The personas in a manager's catalog, by name. Each manager holds its own. Rejects with LaunchListsRefused when the caller may not read them.

      Parameters

      • OptionalmanagerInstanceId: string

      Returns Promise<PersonaRow[]>

    • The seat's prompt counter from its presence, or undefined when it serves no agent endpoint.

      Parameters

      Returns PromptCounter | undefined

    • Set the label the seat shows in place of its name with its agent endpoint's set-label, as the seat's owner. Its name stays. Resolves with the label its card now carries; rejects, naming why, when the space or the agent refuses.

      Parameters

      Returns Promise<string>

    • Change the name the seat shows with its agent endpoint's set-name, as the seat's owner. Resolves with the name its card now carries; rejects, naming why, when the space or the agent refuses.

      Parameters

      Returns Promise<string>

    • Every managed seat the caller can see. Rejects with NoManagerRegistered when no live manager is registered for the space.

      Returns Promise<SeatList>

    • Which agent endpoint commands the seat's presence says it serves now (SPEC §6), or undefined when it shows none or the space has no agent endpoint. The bridge reads it once to pick a path before it sends anything.

      Parameters

      Returns AgentEndpointServes | undefined

    • The name this run of the seat shows in its presence: the label it took from its first message, else its card name (SPEC 13.22). Undefined when the roster does not show the run.

      Parameters

      Returns string | undefined

    • Why the manager would refuse name for a new seat on this space, or undefined when it would not.

      Parameters

      • name: string

      Returns string | undefined

    • Start this machine's manager for the space, for a new agent that no manager may start. It stops itself after a while with no agents. Resolves with the line the thread shows; rejects with NoLaunchManager naming the start's reason.

      Returns Promise<string>