Agent Client Protocol - v2.12.0
    Preparing search index...

    Class SessionBuilder

    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
    • 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