Skip to content

docs(core): clarify declared agent authority contract - #88

Merged
AdmilsonCossa merged 3 commits into
mainfrom
authority-contract-docs
Nov 14, 2026
Merged

AdmilsonCossa merged 3 commits into
mainfrom
authority-contract-docs

Conversation

@AdmilsonCossa

@AdmilsonCossa AdmilsonCossa commented Nov 14, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

The 1.0 README lists "declared tool authority contracts" for @workit/core/ai without stating when the policy is evaluated. runAgent() evaluates allowedCapabilities and deniedCapabilities only when an agent.tool() call declares capability; a tool that omits it is admitted even when an allowlist is present.

The CORR-006 claim title said "denies undeclared capability", while its proof exercises a declared capability that is outside the allowlist. The title was stronger than the proof.

Change

Documentation and evidence wording only. No runtime, type, or export change.

  • packages/core/README.md: add a "Declared Agent Tool Authority" section that states the per-call opt-in contract, the admitted-when-omitted behavior, and what the contract is not.
  • packages/core/evidence/claims.json and packages/core/tests/evidence/correctness/agent-authority.mjs: retitle CORR-006 to "agent authority denies a declared capability outside the allowlist before tool execution". The expected invariant and the proof body are unchanged.

Branch history

The Node 20.11.1 compatibility job first failed on this PR because of a floating transitive dependency in the Fastify consumer fixture, independent of this change. That fix landed on main through #89 (d7cf52e). This branch has been updated from main, so its diff against main is the three documentation and evidence files only.

Ownership boundary

runAgent() in @workit/core/ai remains the only owner of tool capability evaluation. No new public surface. packages/core/src is byte-identical to v1.0.0.

Evidence

Run on this branch at 5a6acc3, Windows, Node 24.19.0:

  • npm run test:coverage: 33 files, 425 tests passed; statements, branches, functions and lines at 100%.
  • npm run verify: every gate from typecheck through check:exporter-stress passed, including test:evidence (CORR-006) and check:evidence-ledger.
  • check:package-consumer:node, check:compat-previous, check:claims, check:public-proof, check:worker-contract, check:release-policy, check:pack-reproducibility and pack:dry passed when run individually.

Limitations

  • npm run verify stopped locally at check:package-consumer because the workstation has no Bun executable. The Bun compatibility fixture was not exercised locally and relies on CI.
  • This change does not alter the admitted-when-omitted behavior. Applications that need fail-closed behavior must declare a capability on every governed tool.
  • The contract is a cooperative application policy. It is not authentication, human approval, rollback, or an operating-system sandbox.
  • No version bump and no release are included.

Checklist

  • Tests were added or updated before behavior changed. (No behavior change; the CORR-006 proof title was corrected.)
  • npm run test:coverage passes with 100% statements, branches, functions, and lines.
  • npm run verify passes, or an environmental limitation is documented. (Bun fixture, see Limitations.)
  • Public API, declarations, package exports, and compatibility fixtures were updated when applicable. (Not applicable; none changed.)
  • Root size and zero-runtime-dependency contracts remain intact.
  • Cancellation, cleanup, retries, deadlines, and budgets still have one owner.
  • New claims identify proof paths, expected invariants, and limitations.
  • Logs, receipts, screenshots, and fixtures contain no secrets or private consumer data.

🤖 Generated with Claude Code

AdmilsonCossa and others added 2 commits September 28, 2026 17:44
The package-consumer fixture pins fastify@5.8.5 but left its transitive
dependencies floating. light-my-request@6.8.0 (2026-10-10) moved to
cookie@^2, which is ESM-only and requires Node >= 22, so the Fastify
fixture fails with ERR_REQUIRE_ESM on the Node 20.11.1 compatibility job.

Pin light-my-request@6.6.0, the last release on cookie@^1. The fixture
then resolves cookie@1.1.1 (engines: node >= 18) instead of cookie@2.0.2.

No runtime, type, or export change in @workit/core.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@AdmilsonCossa
AdmilsonCossa merged commit 4eb7e99 into main Nov 14, 2026
8 checks passed
@AdmilsonCossa AdmilsonCossa mentioned this pull request Nov 14, 2026
8 tasks done
AdmilsonCossa added a commit that referenced this pull request Nov 14, 2026
Bump the workspace and package version to 1.0.1 and record the changelog entry. Maintenance release: the runtime, public exports and TypeScript declarations are unchanged from 1.0.0.

1.0.1 publishes the declared agent tool authority documentation and the corrected CORR-006 title (#88), the Node 20.11 consumer fixture pin (#89), and the release-line evaluation of REL-012 and REL-014 with the 1.0.0 compatibility baseline (#90).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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