ACP v2 TypeScript SDK — UNSTABLE DRAFT - v2.0.0
    Preparing search index...

    Type Alias NewSessionRequest

    Request parameters for creating a new session.

    See protocol docs: Creating a Session

    type NewSessionRequest = {
        cwd: AbsolutePath;
        additionalDirectories?: AbsolutePath[];
        mcpServers?: McpServer[];
        systemPrompt?: SystemPrompt | null;
        _meta?: { [key: string]: unknown } | null;
    }
    Index

    The working directory for this session. Must be an absolute path.

    additionalDirectories?: AbsolutePath[]

    Additional workspace roots for this session. Each path must be absolute.

    These expand the session's workspace scope without changing cwd, which remains the base for relative paths. When omitted or empty, no additional roots are activated for the new session.

    mcpServers?: McpServer[]

    List of MCP (Model Context Protocol) servers the agent should connect to.

    systemPrompt?: SystemPrompt | null

    UNSTABLE

    This capability is not part of the spec yet, and may be removed or changed at any point.

    System-level instructions for the new session.

    Optional. Omitted and null are equivalent and mean the Agent uses its own default instructions. Clients MUST only send this when the Agent advertises session.systemPrompt.

    _meta?: { [key: string]: unknown } | null

    The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.

    See protocol docs: Extensibility