@squidcloud/client
    Preparing search index...

    Interface KnowledgeBaseAuditLogEntry

    One audited search of a knowledge base that enforces access control: who searched, what they asked, the scopes they held and what came back.

    interface KnowledgeBaseAuditLogEntry {
        agentId?: string;
        chunkCount: number;
        contextIds: string[];
        createdAt: Date;
        durationMs: number;
        jobId?: string;
        prompt: string;
        scopes: string[];
        searchMode: string;
        source:
            | "sdk"
            | "agent-context"
            | "agent-tool"
            | "internal"
            | "context-search";
        tags: Record<string, string>;
    }
    Index
    agentId?: string

    The agent the search was made for; absent outside agent jobs.

    chunkCount: number

    The number of chunks the search returned.

    contextIds: string[]

    The ids of the contexts the search returned.

    createdAt: Date

    When the search was made.

    durationMs: number

    How long the search took, in milliseconds.

    jobId?: string

    The agent job the search was made in; absent outside agent jobs.

    prompt: string

    The search text.

    scopes: string[]

    The access scopes the caller held.

    searchMode: string

    The retrieval mode of the search.

    source: "sdk" | "agent-context" | "agent-tool" | "internal" | "context-search"

    The way the search arrived.

    tags: Record<string, string>

    Identity of the caller (userId, userName, authType, clientId, sourceIp).