@pouchy_ai/companion-sdk - v0.63.0
    Preparing search index...

    Interface EndSessionResult

    interface EndSessionResult {
        extracted?: number;
        facts?: number;
        filtered?: number;
        merged?: number;
        ok: boolean;
        revived?: number;
        skipped?: string;
        writeError?: string;
    }
    Index
    extracted?: number

    How many facts the extraction PROPOSED (present whenever it ran) — see the interface doc for how it splits facts: 0 into different repairs.

    facts?: number
    filtered?: number

    How many proposed facts the identifier filter refused (a card number, an order id pasted into the transcript). Its own count so extracted − facts does not read as a REFUSED WRITE and send you to scopes. Absent when nothing was filtered. 0.56.0.

    merged?: number

    How many of facts folded into a memory the store ALREADY held rather than minting a new one (server-side write-time dedup). 0.62.0.

    facts counts writes the store ACCEPTED, and a merge is accepted — so facts alone reads as growth that may not have happened. This matters on the ordinary path, not an edge one: a repeated endSession() re-reads the same recent turns, so a second call routinely re-extracts facts it already stored and answered facts: 3 for three merges. facts - merged is the number of NEW memories. Absent when nothing merged (including from a server older than 0.62.0 — treat absent as 0).

    ok: boolean
    revived?: number

    The SUBSET of merged whose target memory had been archived by decay and was brought back by the merge (0.62.0) — a restored memory rather than a fold into a live one. Absent when none were.

    skipped?: string

    'no_session' / 'throttled' / 'no_content', and since 0.56.0 'no_visitor_scope': a representative session whose token lacks represent:remember (or that has no visitorId) — nothing was consolidated anywhere.

    writeError?: string

    Why the first refused write was refused. Absent when every write landed.