@honua/sdk-js
    Preparing search index...

    Interface StudioAgentSessionExperimental

    interface StudioAgentSession {
        compositionTools: readonly string[];
        draft: StudioAgentDraftBinding | undefined;
        messages: readonly StudioAiChatMessage[];
        toolDiscovery: StudioToolDiscoveryReport | undefined;
        tools: readonly StudioAiToolDefinition[];
        toolWatchStatus: McpNotificationStreamStatus | undefined;
        attachDraft(draft: StudioAgentDraftBinding): void;
        capabilities(): Promise<StudioAiCapabilitiesResponse>;
        chat(
            text: string,
            options?: StudioAgentChatOptions,
        ): Promise<StudioAgentTurn>;
        close(): void;
        reconnect(): void;
        refreshTools(): Promise<StudioToolDiscoveryReport>;
        reset(): void;
        resolveProvider(): Promise<StudioAiCapability | undefined>;
    }
    Index

    Properties

    compositionTools: readonly string[]

    The composition tool names discovery selected, or [] before it has run.

    draft: StudioAgentDraftBinding | undefined

    The draft honua_studio_* tools mutate, with the latest generation the session has seen.

    messages: readonly StudioAiChatMessage[]

    Conversation history so far, oldest first.

    toolDiscovery: StudioToolDiscoveryReport | undefined

    The last completed discovery pass, or undefined before the first one.

    tools: readonly StudioAiToolDefinition[]

    The tool definitions advertised to the proxy, in the { name, description, inputSchema } HTTP shape — runtime-kit tools, plus every server-discovered composition tool this session's policy approved. Before the first chat() (or refreshTools) this is the runtime-kit set alone, since discovery is asynchronous and lazy.

    toolWatchStatus: McpNotificationStreamStatus | undefined

    Lifecycle status of the tools/list_changed subscription, or undefined when watchToolListChanged is off or the subscription has not started.

    Methods

    • Experimental

      Releases the session's long-lived resources — today, the opt-in tools/list_changed subscription, whose in-flight GET is aborted rather than left to the host's connection pool. Idempotent. A closed session can still chat(); it simply stops watching for catalog changes.

      Returns void

    • Experimental

      Drops the negotiated MCP session and invalidates the tool catalog, so the next turn re-handshakes and re-discovers. A reconnected principal may have a different catalog; nothing derived from the old one survives.

      Returns void