Skip to content

chore(claude): re-pin the Claude Code capability contract 2.1.250 → 2.1.260 - #542

Merged
ScriptedAlchemy merged 5 commits into
mainfrom
chore/claude-capability-2-1-260
Sep 4, 2026
Merged

chore(claude): re-pin the Claude Code capability contract 2.1.250 → 2.1.260#542
ScriptedAlchemy merged 5 commits into
mainfrom
chore/claude-capability-2-1-260

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Sep 4, 2026

Copy link
Copy Markdown
Owner

Re-pins the claude host contract from Claude Code 2.1.250 to 2.1.260, following the documented re-pin process (hostCli block in schemas/claude/PROVENANCE.json = observedCliVersion, checked by scripts/host-cli-pins.mjs; docs/local-ci.md "Real-host install proofs").

CLI surface diff 2.1.250 → 2.1.260

Captured with an isolated CLAUDE_CONFIG_DIR/HOME against a scratch npm install --prefix /tmp/host-cli-250 @anthropic-ai/claude-code@2.1.250 and the native 2.1.259 / 2.1.260 binaries (never touching ~/.claude). Recorded in PROVENANCE.jsonrepinNotes, the capability table, and fixtures/contracts/claude/cli-help.txt (redacted 2.1.260 capture).

Surface 2.1.250 2.1.260 Effect
claude plugin --help, plugin marketplace --help, every plugin <sub> --help and marketplace <sub> --help byte-identical (2.1.259 ≡ 2.1.260 too) help fixture re-recorded; native help proof no longer pins 2.1.257, asserts a semver plus the verified command list
plugin validate --help no --json --json Output the validation report as JSON (same exit codes) --json is now the primary path; text parsing only when the CLI rejects the flag or the probed version predates 2.1.259
plugin validate --strict --json report error: unknown option '--json' (exit 1) {success, strict, target, manifest{file,type,errors,warnings,notes}, contents[]}; contents lists only files with findings; findings {path, message, code: null} recorded in the capability table
Hook events (hooks/hooks.json) rejects PreModelSwitch/PostModelSwitch (Invalid key in record) accepts both; also accepts a prompt handler on PostModelSwitch, which the reference excludes hooks.schema.json admits both with the command/http/mcp_tool partition; 52-case fixtures re-recorded for 2.1.250 (text) and 2.1.260 (--json)
--plugin-dir … plugin list --json row not re-probed {id: "<name>@inline", version, scope: "session", enabled, installPath} + errors[] only when refused recorded
Duplicate-hooks manifest pointer (#470/#479) refused refused, identical text; validate --strict --json still success: true unchanged, recorded
Marketplace short github sha plugins.0.source: Invalid input plugins.0.source.sha: Invalid input + plugins.0.source.sha: Must be a full 40-character lowercase git commit SHA the wording the native proof pins (was failing on 2.1.250)
Agents frontmatter (color, initialPrompt, experimental.cacheTtl) n/a (--json absent) accepted; so are colour: red, cacheTtl: 2h, and hooks/mcpServers/permissionMode; only finding is the description warning agents rows updated; component stays behind the #100 G5 gate

Nothing observed on 2.1.260 contradicts the uploaded hooks-2.md, plugins-reference-1.md, sub-agents-3.md, or plugin-marketplaces-0.md; the validator is looser than the documents (unknown hooks.json keys, cross-type fields, per-event handler partition, agent frontmatter vocabulary) in the places recorded in PROVENANCE.json.

What changes

  • claude-2.1.250.jsonclaude-2.1.260.json; observedCliVersion/hostCli.version 2.1.260; every schemas/claude/*.schema.json $id and sha256 re-pinned; Claude adapterRevision 1.27.0 → 1.28.0, composite plugin 1.28.0 → 1.29.0.
  • New canonical families model-switch/before (→ PreModelSwitch: outcome: 'allow' | 'ask' | 'deny'hookSpecificOutput.permissionDecision + permissionDecisionReason; no updatedInput/additionalContext) and model-switch/after (→ PostModelSwitch: observation + additionalContext). Codex, Cursor, portable carry dated unavailable rows; PreModelSwitch/PostModelSwitch leave deferredNativeEvents. Decode fixtures are the reference's documented example input (tests/fixtures/events/claude-{pre,post}-model-switch.json); no live envelope has been captured yet, and the capability evidence says so.
  • host-contracts/claude-plugin-validation.ts: --json first, runtime fallback to the text reporter on unknown option '--json' for every run of that validation.
  • Native proofs: the 2.1.257 help-pin assertion and the 2.1.250 marketplace wording (both noted in fix(build,validate,doctor): run the Claude host validator and --plugin-dir load check; doctor reads enabled (AB7327) (#475, #476) #504) now pass on 2.1.259 and 2.1.260.
  • Docs: en+zh guide/authoring/{hooks,index}.mdx, guide/distribution/validation.mdx, docs/diagnostics.md, docs/framework-mode.md, example README event matrix, eval-hosts.mjs expected version. Generated hosts/events pages follow from the JSON.
  • Changeset: patch — new families and the wider hooks schema are additive; no accepted manifest field changes shape for existing users; hostContractRevision moving 2.1.250 → 2.1.260 is the same kind of metadata bump every prior re-pin shipped as a patch.

Not changed: src/schemas/skill-hosts/PROVENANCE.json still records the Skill frontmatter schemas as derived against the 2.1.250 pin (a separate, documentation-derived contract; the skills page was not part of this re-pin's uploaded evidence).

Verification

Local, this worktree: pnpm typecheck, pnpm lint, pnpm test:unit (3253 passed), test:route-unit (59), test:projection (158), integration api/doctor/artifact-validator/route-graph/generated-route-server/hooks (197), pnpm docs:site:build (parity ok).

Host proofs, PATH shimmed to each binary, check:host-cli ok on 2.1.260:

Suite 2.1.260 (pin) 2.1.259 (daily CLI)
test:host-install 25 passed, 2 skipped 25 passed, 2 skipped
test:host-install:packed 6 passed 6 passed
test:packed:native (AGENT_BUNDLE_PACKAGE_PREBUILT=1) 7 passed, 1 skipped 7 passed, 1 skipped
host-adapters.native.test.ts (AGENT_BUNDLE_NATIVE_HOST_CONTRACTS=1) 29 passed 29 passed

Baseline before this change on 2.1.260: 28/29 (the 2.1.257 pin); on 2.1.250: 27/29 (pin + marketplace wording).

Review status

@changeset-bot

changeset-bot Bot commented Sep 4, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 986da71

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
agent-bundle Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

ScriptedAlchemy added a commit that referenced this pull request Sep 4, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-04T07:16:26.643910Z dbbd794 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@pkg-pr-new

pkg-pr-new Bot commented Sep 4, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/ScriptedAlchemy/agent-bundle@542
npm i https://pkg.pr.new/ScriptedAlchemy/agent-bundle/create-agent-bundle@542
npm i https://pkg.pr.new/ScriptedAlchemy/agent-bundle/@agent-bundle/runtime@542

commit: 986da71

ScriptedAlchemy added a commit that referenced this pull request Sep 4, 2026
@ScriptedAlchemy
ScriptedAlchemy force-pushed the chore/claude-capability-2-1-260 branch from 924db34 to 662639b Compare September 4, 2026 07:50
@ScriptedAlchemy
ScriptedAlchemy enabled auto-merge (squash) September 4, 2026 07:50
ScriptedAlchemy added a commit that referenced this pull request Sep 4, 2026
@ScriptedAlchemy
ScriptedAlchemy force-pushed the chore/claude-capability-2-1-260 branch from 662639b to e820248 Compare September 4, 2026 08:17
Ubuntu and others added 2 commits September 4, 2026 08:59
…2.1.260

Diff the CLI surface against a scratch-installed 2.1.250 and the 2.1.259 /
2.1.260 native binaries (help text of every plugin and marketplace subcommand,
plugin validate --json report shape, plugin list --json row shape, hook event
list, marketplace source wording) and record it in PROVENANCE.json repinNotes,
the capability table, and fixtures/contracts/claude/cli-help.txt.

- observedCliVersion / hostCli.version 2.1.260; claude-2.1.260.json; every
  schemas/claude/* $id and sha256 re-pinned; adapterRevision 1.28.0 (claude),
  1.29.0 (plugin).
- hooks.schema.json admits PreModelSwitch and PostModelSwitch (2.1.251+) with
  the command/http/mcp_tool partition; hooks-schema fixtures re-recorded from
  2.1.250 (text reporter) and 2.1.260 (--json).
- New canonical event families model-switch/before (PreModelSwitch:
  permissionDecision allow|ask|deny) and model-switch/after (PostModelSwitch:
  observation + additionalContext); Codex, Cursor, portable carry dated
  unavailable rows; decode fixtures from the documented example input.
- claude plugin validate --json is the primary path; text parsing is the
  fallback when the CLI rejects the flag or predates 2.1.259.
- Agents capability rows record what 2.1.260 --strict --json accepts for
  color, initialPrompt, experimental.cacheTtl (no value validation).
- Native proofs: help pin no longer asserts 2.1.257; the marketplace short-sha
  wording is the 2.1.260 text (2.1.250 said only 'Invalid input').
@ScriptedAlchemy
ScriptedAlchemy force-pushed the chore/claude-capability-2-1-260 branch from e820248 to 2810197 Compare September 4, 2026 08:59
@ScriptedAlchemy
ScriptedAlchemy merged commit fe8b026 into main Sep 4, 2026
14 checks passed
ScriptedAlchemy added a commit that referenced this pull request Sep 4, 2026
…l payload and pin the HookEvent field overlap (rebase over #542, #533)
ScriptedAlchemy added a commit that referenced this pull request Sep 4, 2026
…l payload and pin the HookEvent field overlap (rebase over #542, #533)
ScriptedAlchemy added a commit that referenced this pull request Sep 4, 2026
… native envelope (#466) (#545)

* feat(events): give event routes a canonical per-family payload beside the native envelope (#466)

AgentEventRouteProps<E>.canonical.payload carries the fields at least two
hosts report for the route's family — tool name/input/response, session id,
transcript path, cwd, prompt, agent id/type, stop re-entry, … — each as
{ value, nativeKey } naming the host key it was read from and absent when the
host did not send it. The per-family table (agentEventPayloadFields) and the
per-host key table (agentEventPayloadNativeKeys) live in routes/events.ts;
events/payload.ts projects through them inside createCanonicalEventProps, so
the standalone wrapper, the shared runtime, agent-bundle/test, and the
Workbench replay all agree. Each pinned capability table mirrors its host's
mapping under hooks.eventRoutes.<event>.payload (held equal by
tests/event-payload.test.ts) and the generated events reference renders the
field × host → native key matrix per family. agent-bundle/test gains
createEventRouteInput; worktree-proximity and rsc-agent-runtime read
canonical.payload instead of hand-parsing native; host-test keeps recording
native as the host-specific example.

* fix(events): freeze the exported payload tables through and mark the required canonical.payload a minor bump (review)

* feat(events): admit the 2.1.260 model-switch families to the canonical payload and pin the HookEvent field overlap (rebase over #542, #533)
@ScriptedAlchemy
ScriptedAlchemy deleted the chore/claude-capability-2-1-260 branch September 4, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant