Skip to content

Contract and fixtures ​

The agent skill, this developer guide and the admin guide are published against the same versioned artefacts in packages/agent-skill (brief §5: "Publish the agent skill, admin guide and developer guide against the same versioned fixtures"):

ArtefactDownloadWhat it is
Agent skillSKILL.mdInstructions for agents (rendered)
Machine-readable contractopenapi.jsonOpenAPI 3.1 (rendered)
JSON Schemassee the list belowOne JSON Schema 2020-12 document per contract type
Conformance fixturessee the list belowOne request and response per scenario, with the next step

The contract is generated, not hand-written: packages/agent-skill/scripts/build-contract.ts builds it from the API's zod request schemas (apps/api/src/routes/*.ts) and the response schemas in packages/agent-skill/src/schemas.ts. Run npm run build -w @sectigo/axiom-agent-skill after changing a schema; a test fails if the committed files are out of date.

JSON Schemas ​

SchemaDescribes
SubmitActionRequestPOST /v1/actions body
ResumeActionRequestPOST /v1/actions/{id}/resume body
DelegateRequestPOST /v1/grants/{id}/delegate body
DelegationResultThe issued child grant
AuthorizeRequestPOST /v1/authorize body (provider)
AuthorizeResponseIts response (decision, status, claim)
OutcomeRequestPOST /v1/actions/{id}/outcome body (provider)
SimulateRequestPOST /v1/projects/{id}/simulate body
ActionStatusThe status document every surface returns
ActionStateThe ten states
ReasonCodeEvery reason code
ProblemRFC 9457 error documents
CapabilitiesGET /v1/capabilities
WakeEventaxiom.event.v1 wake events
ReceiptBundleaxiom.receipt.bundle.v1
TokenResponsePOST /oauth/token
JsonAny JSON value (material params)

Fixtures ​

Each fixture is a JSON document with:

FieldMeaning
fixtureScenario name.
contract_version2026-11-14.
descriptionWhat happened, in one sentence.
requestmethod, path and, for writes, body: what the agent sent.
responsestatus (HTTP) and body: what the API returned.
agentWhat a conforming agent does next: next_step (wait_for_decision, resume, track, read_outcome, stop), may_resume, may_resubmit_same_key, terminal, and where useful tell_user or a ready resume_request.
FixtureScenarioResponseNext step
pendingA USD 25,000 refund needs finance approval. No business write has started.202, pending_approval, finance_approval_requiredwait_for_decision; may resubmit the same key
approvedFinance approved the exact request; nothing has executed.200, approved, awaiting_agent_resumeresume (the fixture includes the exact resume request)
executingThe claim is held and the request was dispatched.202 to the resume, executing, dispatchedtrack; never resume or resubmit
succeededThe provider committed and signed its outcome.200, succeeded, target_confirmedread_outcome
outcome_unknownThe provider timed out after receiving the request.200, outcome_unknown, target_timeouttrack; tell the user it is not confirmed; never retry
deniedAbove the absolute ceiling: denied even though approval exists as a mode.201, denied, ceiling_exceededstop
expiredNo verified decision before the deadline; a late approval cannot revive it.200, expired, approval_expiredstop
revokedThe grant was revoked after approval, before resume.200, revoked, grant_revokedstop
idempotency_conflictThe same key was reused for a different amount; the record is unchanged.409 problem, idempotency_conflict with changed_fieldsstop; the original stands

Note that a policy denial is a created action (201, state denied), not a 403: denials are recorded so they appear in evidence and the simulator.

The next steps follow the brief's state table, which the SDK implements as nextStep(state):

Statenext_step
pending_approvalwait_for_decision
approvedresume
executing, outcome_unknowntrack
succeeded, failedread_outcome
denied, expired, revoked, cancelledstop

Conformance ​

packages/agent-skill/test/contract.test.ts keeps the three artefacts honest:

  1. Fixtures cover every required scenario and each one validates against the contract schemas and follows the state table above.
  2. The live API matches the fixtures. The test runs the real API in-process over real SQL, drives the same scenarios (including a dropped connection after dispatch for outcome_unknown), and checks that it produces the same states, HTTP statuses and fields.
  3. The committed contract is exactly what build-contract.ts generates from the zod schemas, and it publishes the three base operations and the provider interface.
  4. SKILL.md carries the brief's reference behaviour verbatim, the runtime table, and links only fixtures that exist.

The brief's §9 asks for more than this repository automates today: running the same pending, retry, revocation and unknown-outcome fixtures through the proxy and the SDK with a skill-enabled agent and a second client that uses only the documented contract. The API tests cover the proxy, MCP and SDK paths separately (apps/api/test/gateway-http.test.ts, mcp-proxy.test.ts, mcp-server.test.ts, launch-demo.test.ts); running an actual skill-enabled agent against the fixtures is a release exercise, not a test in the repository.

Using the fixtures in your own client ​

  • Treat each response.body as what your client will receive and assert that your code chooses agent.next_step.
  • IDs, digests and timestamps in fixtures are illustrative, not real.
  • For receipt verifiers, use the separate, deterministic receipt fixtures served at GET /v1/public/fixtures (valid, redacted, tampered and forged-outcome bundles with the expected checks); see the receipt verifier.

Developer preview. Contract version 2026-11-14.