ACP v2 TypeScript SDK — EXPERIMENTAL DRAFT - v1.3.0
    Preparing search index...

    Class SessionBuilderExperimental

    Experimental draft ACP v2 builder for creating an ActiveSession.

    Start from ctx.buildSession("/absolute/cwd") for the common case, or pass a full NewSessionRequest to ctx.buildSession(...) when the session needs MCP servers, _meta, or additional request fields. All paths in ACP payloads should be absolute.

    Index
    • Experimental

      Replaces the additional workspace roots for this session.

      additionalDirectories expand the session's file-system scope without changing cwd. Each path should be absolute.

      Parameters

      • additionalDirectories: string[]

      Returns this

    • Experimental

      Adds one MCP server to the session/new request.

      Parameters

      • mcpServer: McpServer

      Returns this

    • Experimental

      Starts the session and returns an ActiveSession for prompting and reading updates.

      Call dispose() on the returned session when you no longer need update routing, or use withSession(...) to scope disposal automatically.

      Parameters

      Returns Promise<ActiveSession>