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

    Type Alias DiffExperimental

    File changes produced by a tool call.

    changes is authoritative for affected absolute paths and operations. patch optionally carries renderable text for some or all of those changes and MUST be consistent with changes. Agents SHOULD provide patch whenever feasible. Clients MUST handle diffs where patch is omitted or null.

    See protocol docs: Content

    type Diff = {
        changes: DiffChange[];
        patch?: DiffPatch | null;
        _meta?: { [key: string]: unknown } | null;
    }
    Index
    changes: DiffChange[]

    Structured file changes described by this diff.

    Clients can use this field without parsing patch text to determine affected paths.

    patch?: DiffPatch | null

    Renderable patch text for some or all of the structured changes.

    Agents SHOULD provide patch text whenever feasible. Omitted or null means no renderable patch text was provided.

    _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