Files
Theo BrowneandClaude Fable 5 fc3a695383 feat: attribute turn diffs so git-only changes stop polluting changed files
The changed-files card and per-turn inline diff are derived from full-tree
checkpoint snapshots, so any tree-rewriting git command the agent runs
(pull, checkout, cherry-pick, rebase) shows up as hundreds of "changed
files" the agent never authored.

This adds a read-side attribution layer on top of the existing checkpoint
mechanism (capture, storage, and revert are untouched):

- Checkpoint commits now record the HEAD oid and branch in their commit
  message. Legacy checkpoints without metadata degrade to today's behavior.
- attributeCheckpointDiff classifies each path in a checkpoint tree delta:
  a path is "git" only when its exact blob transition also appears in the
  HEAD-movement delta for the turn and no commit authored during the turn
  touched it. Every ambiguity resolves to "agent" (shown), so
  misclassification can add noise but never hide agent work. Merge commits
  use the combined diff so only conflict resolutions count as agent work.
- The checkpoint reactor tags each file with an origin; attribution
  failures degrade to unattributed files and never block the pipeline.
- getTurnDiff/getFullThreadDiff drop git-attributed file sections from the
  patch unless the new includeGitChanges input is set.
- The changed-files card lists agent files only, with a muted
  "Updated via git — N files" row for demoted changes. The diff panel
  shows a banner with a show/hide toggle so the full tree delta stays one
  click away.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-23 13:43:20 -07:00
..

Client Runtime

Shared client behavior for web and mobile. Public APIs are organized by package subpath. The package intentionally has no root export.

Public subpaths

Subpath Responsibility
authorization Bearer and DPoP authorization plus token persistence contracts
connection Targets, catalog, supervision, retries, registry, and onboarding
environment Environment identity, descriptors, endpoints, and scoped keys
errors Shared client error inspection
operations Multi-step application workflows
operations/projects Multi-step project creation workflows
platform Platform capability and persistence service contracts
relay Managed relay API and environment discovery
rpc HTTP/RPC clients, protocol, sessions, and subscriptions
state/<domain> Focused shared state, retention, reducers, and Atom constructors

Dependency direction

Platform applications provide platform services. connection composes those capabilities with authorization, relay, and rpc to supervise environment sessions. Independent state modules consume the connection registry and expose focused state or Atom constructors to application-owned runtimes.

Applications should import the narrowest relevant subpath. There is no broad state export: use domain paths such as state/shell, state/threads, state/terminal, or state/vcs. Subpath indices and explicitly exported domain files are public API boundaries; all other files remain implementation details.