Reference
Reference
Source-generated contract reference: 139 operations, 198 error codes, 132 environment names, 56 make targets.
What this chapter is
This chapter is the machine-readable contract of AgentKit Studio: enums, field names, error codes, operation ids, environment names and commands. Every number here is extracted from source by docs-site/scripts/extract-reference.mjs; none of it is typed by hand.
cd docs-site
node scripts/extract-reference.mjs # regenerate all 22 pages
node scripts/extract-reference.mjs --check # CI: fails when source moved but pages did notAfter changing an enum, error code or operation list under src/, rerun the script; otherwise --check fails CI.
Page index
| Page | What you will find | Count | Source |
|---|---|---|---|
| Runtime and entity contract | Capability matrix, entity identifiers and validation codes of the 3 runtimes | 3 runtime types | src/runtime-contract.mjs |
| Control protocol | Purpose and Host handler of every operation id | 139 operations · 25 domains | src/contracts/operations.mjs |
| Configuration | Every key and default in the four configuration files | 4 manifests | src/product.json |
| Environment variables | Configurable, platform-injected and do-not-set tiers | 132 names | src/** |
| Template schema | Field constraints and rejected shapes of a team template | 7 codes | src/team-template-contract.mjs |
| Plugin catalog schema | Catalog document shape, merge rules and builtin rows | 18 fields · 3 rows | src/dsh-plugin-catalog.mjs |
| Deployment state machine | States, UI labels, polling and attention | 19 states | src/client/state/deployment.mjs |
| Error codes | Top 30 actions plus a namespace index | 198 codes | src/** |
| Commands | make targets, prerequisites and check scripts | 56 make · 100 verify | Makefile |
| Session events | When events fire, how they pair, what persists | 16 events · 3 frames | src/host/dsh-session-contract.mjs |
Read by role
| You are | Start with | Why |
|---|---|---|
| Integrators | operations · errors | Call control operations by id and branch on error codes. |
| Plugin authors | plugin-catalog · templates | Write a market row or a team template. |
| Operators | environment · deployment-states · commands | Set environment variables, read deployment state, run gates. |
| Triage | errors · session-events | Locate by error code, then reproduce from the event stream. |
Extraction rules
| Rule | Behaviour |
|---|---|
| Contract constants | Imported from the source module, never copied as literals |
| Error codes | code: '...' literals under src/** plus STUDIO_WIRE_ERRORS |
| Environment | Union of process.env.X, env.X and *_ENV_NAMES constant arrays |
| Source location | First occurrence as file:line, file relative to the repo root |
| Redaction | Commit SHAs, release origins and internal model code names become placeholders |
Developer entry points
| Item | Source |
|---|---|
| Generator | docs-site/scripts/extract-reference.mjs |
| Operation contract | src/contracts/operations.mjs |
| Wire errors | src/contracts/definitions.mjs |
Related tests:
| Test file | Location |
|---|---|
| desktop-module-graph.test.mjs | tests/desktop-module-graph.test.mjs |
| studio-wire-contracts.test.mjs | tests/studio-wire-contracts.test.mjs |
| host-dispatcher.test.mjs | tests/host-dispatcher.test.mjs |
| host-route-contracts.test.mjs | tests/host-route-contracts.test.mjs |