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

    Type Alias CompactionUpdateExperimental

    A context compaction upsert. The first notification fixes the compaction's timeline position. Later updates with the same ID patch that entity in place.

    summary, error, and _meta have patch semantics: omission leaves the stored value unchanged, null clears it, and a concrete value replaces it. summary: [] also clears the summary. A concrete _meta object patches the stored metadata by top-level key instead of replacing it.

    type CompactionUpdate = {
        compactionId: CompactionId;
        status: CompactionStatus;
        summary?: ContentBlock[] | null;
        error?: string | null;
        _meta?: { [key: string]: unknown } | null;
    }
    Index
    compactionId: CompactionId

    The Agent-owned ID of this compaction, unique within the session.

    Current lifecycle status.

    summary?: ContentBlock[] | null

    Complete replacement user-displayable summary content for the compaction.

    error?: string | null

    Human-readable error details for the compaction.

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

    The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Omitted leaves the stored metadata unchanged; null clears it. An object patches the stored metadata by top-level key: keys it omits are unchanged, a key set to null is removed, and any other value replaces that key's stored value without merging nested objects. Beyond this patch rule, implementations MUST NOT make assumptions about values at these keys.

    See protocol docs: Metadata Patches