@squidcloud/client
    Preparing search index...

    Type Alias AiSessionContext

    Context for an AI session

    type AiSessionContext = {
        agentId: string;
        auditLog?: boolean;
        clientId: string;
        conversationId?: string;
        jobId: JobId;
        parentStatusUpdateId?: string;
        timeoutMs?: number;
    }
    Index
    agentId: string

    The ID of the AI agent involved in the session.

    auditLog?: boolean

    Whether the invoking agent has audit logging enabled. Sub-agents working on behalf of this session gate their own audit-log writes on it, keeping one job's audit trail consistent.

    clientId: string

    The ID of the client initiating the session.

    conversationId?: string

    The conversation this call belongs to, as the caller named it (memoryOptions.memoryId). Stable across the turns of one chat and different for two chats, including two chats of the same client, which clientId is not: a client id belongs to a connection, and one connection can carry several conversations. Not the id chat history is keyed by — that one falls back to clientId — so do not read it as one. Absent for callers that named no conversation (a direct function call, security rules).

    jobId: JobId

    The ID of the job associated with the session.

    parentStatusUpdateId?: string

    ID of the status update that triggered this session (e.g. the agent's "Calling AI Function" event). Status updates emitted on behalf of this session nest under it in the status feed.

    timeoutMs?: number

    The chat timeout (in milliseconds) the root chat request explicitly set. Present only when the root request passed timeoutMs. Nested AI operations (e.g. AI-query stages spawned by a tool call) budget against it so a long-running parent chat is not silently capped by the nested defaults; explicitly configured per-stage aiOptions.timeoutMs is more specific and takes precedence over it.