SDK provenance context primitives across CLI, MCP, and event streams
Merged
UN
3mo ago+2672+2672+0123456789012345678901234567890123456789-172-172-012345678901234567890123456789
Summary
- add bounded automatic model/version resolvers with privacy-safe opt-outs and extensible SDK descriptors
- add versioned legacy-author interpretation plus patch-free provenance projections, filters, and bounded summaries across history, activity, and mutation events
- keep SDK, CLI, MCP, completions, settings, generated contracts, and documentation aligned
- add focused and end-to-end coverage while preserving exact repository-wide 100/100/100/100
PM lineage
Verification
- pnpm typecheck and pnpm lint
- 422 files and 6,747 tests at exact 100% statements/branches/functions/lines
- pm-changelog 2026.8.2 check unchanged
- isolated packed npm/SDK and Bun/bunx acceptance
- packed-consumer npm audit: 0 vulnerabilities across 64 packages
- GitHub Dependabot, CodeQL, and secret-scanning open alerts: 0
Summary by Sourcery
Introduce shared SDK/CLI/MCP primitives for immutable, patch-free provenance context across history, activity, and mutation event streams, backed by bounded automatic probes, versioned legacy author interpretation, and extended indexing and filtering.
New Features:
- Add patch-free provenance projections, filters, and bounded summaries for history, activity, and mutation event streams across SDK, CLI, and MCP.
- Introduce automatic, bounded provenance probes (including harness session file resolvers and version extraction) with privacy-safe opt-outs and workspace identity vocabulary for legacy authors.
Bug Fixes:
- Treat provenance, compact, and full projections as mutually exclusive in history, activity, and events, and enforce CLI constraints such as disallowing provenance summaries while following event streams.
Enhancements:
- Extend the history event index schema and queries to support harness, agent instance, and provenance-based filtering without scanning raw history streams.
- Align CLI flags, completion scripts, tool schemas, and parameter metadata with new provenance options for history, activity, and events.
- Refine agent identity and settings handling to support probe configuration, identity vocabulary, and ordered serialization of agent_identity settings sections.
Tests:
- Add focused unit tests for provenance probes, history/activity/events provenance projections and filters, CLI option normalization and mapping, completion flag coverage, and updated settings and provenance coverage analysis.
Summary by cubic
Adds patch-free provenance reads and filtering across history, activity, and events, powered by bounded probes and a versioned legacy-author vocabulary to make identity readable and safe. CLI, SDK, and MCP share the same provenance options, with privacy opt-outs and constant-size summaries.
-
New Features
- Patch-free provenance projections for history/activity/events, plus optional summaries; filter by harness,
agent_instance, and provenance dimensions; resolve legacy authors via a versioned vocabulary. - Bounded provenance probes (model, version) with opt-out via settings; new
agent_identity.probes_enabledandagent_identity.identity_vocabulary { version, aliases }. - Event index v2 adds harness, alias author,
agent_instance, and provenance-dimension filtering without scanning raw streams; CLI/MCP/SDK schemas and completion scripts updated with repeatable--provenance,--provenance-summary,--harness,--agent-instance, and--provenance-filter.
- Patch-free provenance projections for history/activity/events, plus optional summaries; filter by harness,
-
Bug Fixes
- Treat
compact,full, andprovenanceprojections as mutually exclusive and enforce CLI constraints (e.g., no provenance summaries while streaming events). - Update docs to link provenance items at canonical paths and record exact-head review evidence.
- Add explicit provenance errors (
invalid_provenance_predicate,unknown_provenance_dimension) and refresh public surface and token baselines.
- Treat