@nylorun/core 0.23.0-beta → 0.25.0-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +37 -0
- package/dist/compatibility.d.ts +127 -59
- package/dist/compatibility.js +128 -60
- package/dist/contracts.d.ts +2413 -893
- package/dist/contracts.js +1144 -491
- package/dist/define.d.ts +1 -0
- package/dist/define.js +1 -0
- package/dist/definition/approval.d.ts +1 -1
- package/dist/definition/bound.d.ts +2 -0
- package/dist/definition/builder.d.ts +2 -2
- package/dist/definition/builder.js +1 -1
- package/dist/definition/code-tools.d.ts +1 -1
- package/dist/definition/declaration.js +3 -0
- package/dist/definition/delegate.d.ts +1 -1
- package/dist/definition/delegate.js +1 -1
- package/dist/definition/from.d.ts +2 -2
- package/dist/definition/from.js +1 -1
- package/dist/definition/http-tool.d.ts +3 -3
- package/dist/definition/mcp.d.ts +4 -4
- package/dist/definition/mcp.js +3 -3
- package/dist/definition/removed.d.ts +7 -0
- package/dist/definition/removed.js +21 -1
- package/dist/definition/sections.d.ts +64 -0
- package/dist/definition/sections.js +227 -0
- package/dist/definition/variant.d.ts +1 -1
- package/dist/definition/variant.js +4 -4
- package/dist/harness-api/entries.d.ts +1 -1
- package/dist/harness-api/entries.js +1 -1
- package/dist/harness-api/gates.d.ts +1 -1
- package/dist/harness-api/gates.js +1 -1
- package/dist/harness-api/harness-api.schema.json +182 -6
- package/dist/harness-api/index.d.ts +3 -3
- package/dist/harness-api/index.js +3 -3
- package/dist/harness-api/json-schema.d.ts +1 -1
- package/dist/harness-api/json-schema.js +3 -3
- package/dist/harness-api/mcp.js +1 -1
- package/dist/harness-api/messages.d.ts +10 -8
- package/dist/harness-api/messages.js +1 -1
- package/dist/harness-api/schema.d.ts +82 -13
- package/dist/harness-api/schema.js +63 -19
- package/dist/harness-api/transcript.d.ts +1 -1
- package/dist/harness-api/transport.d.ts +1 -1
- package/dist/harness-api/transport.js +1 -1
- package/dist/manifest-schemas.d.ts +9 -5
- package/dist/manifest-schemas.js +24 -27
- package/dist/schemas/agent-manifest.schema.json +1534 -250
- package/dist/schemas/harness-manifest.schema.json +1273 -0
- package/dist/schemas/{environment-manifest.schema.json → runtime-manifest.schema.json} +109 -68
- package/dist/types/manifest.d.ts +87 -15
- package/dist/types/manifest.js +4 -0
- package/dist/types/model.d.ts +5 -0
- package/dist/types/observe.d.ts +1 -1
- package/dist/types/part.d.ts +5 -0
- package/dist/types/tool.d.ts +4 -4
- package/dist/utils/definition-files.d.ts +3 -2
- package/dist/utils/definition-files.js +4 -3
- package/dist/utils/file-systems.d.ts +1 -1
- package/dist/utils/file-systems.js +1 -1
- package/dist/utils/harness-id.d.ts +1 -1
- package/dist/utils/harness-id.js +1 -1
- package/dist/utils/memory.d.ts +64 -0
- package/dist/utils/memory.js +139 -0
- package/dist/utils/runtime-limits.d.ts +55 -4
- package/dist/utils/runtime-limits.js +106 -3
- package/dist/utils/runtime-tools.d.ts +3 -3
- package/dist/utils/runtime-tools.js +3 -3
- package/package.json +6 -5
package/dist/compatibility.js
CHANGED
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
export { hashManifest } from "./utils/hash.js";
|
|
2
2
|
/**
|
|
3
|
+
* Protocol 18: session usage by token kind. A model call read (`/v1/sessions/{id}/calls/model`,
|
|
4
|
+
* `/v1/tenant/calls/model`) carries the gate's timing (`startedAt`, `endedAt`) and its cost by
|
|
5
|
+
* token kind (`usage.costSplit`), and a session's usage (`/v1/sessions/{id}/usage`) adds
|
|
6
|
+
* `costSplit`, `splitCalls`, `modelTimeMs` and `timedCalls`. The Host serves protocol 16, 17 and 18:
|
|
7
|
+
* an older client, whose SDK parses these reads strictly, gets them without the new fields.
|
|
8
|
+
* Protocol 17: a queue per session. A message sent while the session's turn runs,
|
|
9
|
+
* or while it waits on an approval, an answer or an uncertain call, is queued
|
|
10
|
+
* (`{status: "queued", queuedMessageId, position}`, `message.queued`) instead of refused, unless
|
|
11
|
+
* it asks `delivery: "reject"`; the refusal now has a code, `409 session_busy`. When the turn ends
|
|
12
|
+
* (completed, failed or cancelled), every queued message starts one turn, in order, each its own
|
|
13
|
+
* user message (`queue.taken`); our engine's turn input for more than one is
|
|
14
|
+
* `{kind: "messages", messages}` (Harness API 5, additive). Past the Runtime limit
|
|
15
|
+
* `sessionQueuedMessages` a message is `429 queue_full`. Session reads count `queuedMessages`. The
|
|
16
|
+
* Host serves protocol 16 and 17: a message from a protocol 16 client is `reject` unless it says
|
|
17
|
+
* otherwise, so its sessions answer `409` as before.
|
|
18
|
+
* Protocol 16: Agents from one manifest, a fresh start. An agent manifest (v8) is one
|
|
19
|
+
* versioned document at `/v1/agent-manifests/{name}` with a `harness` section (what runs inside
|
|
20
|
+
* the loop, including the harness's id) and a `runtime` section (what an environment manifest
|
|
21
|
+
* said); the Runtime checks the two against each other when it is saved
|
|
22
|
+
* (`422 manifest_inconsistent`), so `requires` and `409 environment_unsuitable` are gone, and so
|
|
23
|
+
* are agent definitions (`PUT /v1/agents/:id` with a v7 manifest) and environment manifests.
|
|
24
|
+
* Environments are Agents: `/v1/agents/{id}` (with `.../events`, `stop`, `reset`, `snapshot`,
|
|
25
|
+
* `restore`, `versions`, `fork` and `secrets`) is made from a saved manifest only, records it as
|
|
26
|
+
* tracking (`name`) or pinned (`name@n`) into `resolvedVersion`, the version it runs. An Agent
|
|
27
|
+
* evolves: a `PUT` naming another version of its manifest moves it (`dryRun`
|
|
28
|
+
* answers the plan), a save moves every Agent that tracks the manifest, and each turn takes the
|
|
29
|
+
* version its Agent runs when it starts; a runtime change waits for a pod's next start, and its
|
|
30
|
+
* kind, harness and storage are fixed (`409 agent_fixed_field`). Reads add `state`
|
|
31
|
+
* (`working`, `sleeping`, `input_required`, `failing`, `paused`) and `attention`, and the
|
|
32
|
+
* compute's state moves to `compute.state`. Every session belongs to one Agent:
|
|
33
|
+
* `PUT /v1/sessions/{id}` takes `{ agent, ownerUserId, info }` and pins the manifest version its
|
|
34
|
+
* Agent runs; no session is special. Error codes, event types (`agent.*`), the scopes
|
|
35
|
+
* (`agents:write`, `agent-manifests:write`) and identity-file grants (`agents`) say Agent. Model
|
|
36
|
+
* budget scope `agent` is `manifest`. Harness API 5: `turn.start.agent` replaces
|
|
37
|
+
* `turn.start.environment`. Sessions opened before protocol 16 are closed (`protocol_16`) and
|
|
38
|
+
* stay readable; Environments, their disks and vaults are gone. The Host serves protocol 16 only.
|
|
3
39
|
* Protocol 15: the harness boundary, a fresh start. Model-facing work belongs to the harness. Our
|
|
4
40
|
* engine's `read_artifact` and `save_artifact` run in our harness, over the Harness API's new
|
|
5
41
|
* artifact seam (`artifact.read`, `artifact.write`; Harness API 4), so a session's pinned
|
|
@@ -16,7 +52,7 @@ export { hashManifest } from "./utils/hash.js";
|
|
|
16
52
|
* key on (a policy rule with `__` in its `tool` refuses every call). The record refuses an
|
|
17
53
|
* outcome past `limits.recordEntryBytes`. Sessions pinned before protocol 15 must be recreated.
|
|
18
54
|
* The Host serves protocol 15 only.
|
|
19
|
-
* Protocol 14: environment manifests
|
|
55
|
+
* Protocol 14: environment manifests. `/v1/environment-manifests/{name}` holds
|
|
20
56
|
* named, versioned definitions of a kind of Environment, saved like agents (with `If-Match` and
|
|
21
57
|
* `?dryRun=true`), and `PUT /v1/environments/{id}` takes `manifest: "name"` or `"name@n"`. An
|
|
22
58
|
* Environment never changes what it runs after creation: a `PUT` on an existing one may change
|
|
@@ -24,10 +60,10 @@ export { hashManifest } from "./utils/hash.js";
|
|
|
24
60
|
* `manifest`. A manifest's `secrets` declares slots: a write sends only the value, and a name it
|
|
25
61
|
* does not declare is `409 secret_not_in_manifest`. An agent manifest's `requires` is checked
|
|
26
62
|
* when a session opens (`409 environment_unsuitable`). Sessions on one Environment run their
|
|
27
|
-
* turns in parallel
|
|
63
|
+
* turns in parallel, so a turn start is no longer `environment_busy` because another
|
|
28
64
|
* session's turn runs, and every egress connection is an `environment.egress` event on the
|
|
29
65
|
* Environment's stream naming the turns that were running; `egress.connection` is gone from
|
|
30
|
-
* session logs and traces
|
|
66
|
+
* session logs and traces. The Host serves protocol 14 only.
|
|
31
67
|
* Protocol 13: the flat agent manifest (v7), a fresh start. A manifest has no capabilities: its
|
|
32
68
|
* instructions, tools, skills and MCP servers are top-level, and a skill or server from an Agent
|
|
33
69
|
* Plugin carries a `plugin` label. A session's pinned manifest carries the Runtime's `runtime`
|
|
@@ -41,7 +77,7 @@ export { hashManifest } from "./utils/hash.js";
|
|
|
41
77
|
* accept (`422 attachment_unsupported`), with no turn. After its turn a file is a reference line
|
|
42
78
|
* the model reads again with `read_artifact`, which every agent now has. The Host accepts
|
|
43
79
|
* protocol 11 and 12: the change is additive.
|
|
44
|
-
* Protocol 11: Environments
|
|
80
|
+
* Protocol 11: Environments, a fresh start. `/v1/environments/{id}` replaces
|
|
45
81
|
* `/v1/sandboxes`: an Environment is one sandbox (kind `virtual`, `pod` or `none`) with a recipe
|
|
46
82
|
* that can change and one vault, written on the Runtime API
|
|
47
83
|
* (`PUT /v1/environments/{id}/secrets/{name}`). Sessions name an `environment` or nothing; the
|
|
@@ -49,7 +85,7 @@ export { hashManifest } from "./utils/hash.js";
|
|
|
49
85
|
* user and installation vaults and `/v1/tenant/vaults` are gone. Error codes, event types, the
|
|
50
86
|
* scope (`environments:write`) and identity-file grants (`environments`) say Environment. An
|
|
51
87
|
* older client is answered `426`.
|
|
52
|
-
* Protocol 10: MCP credential custody leaves OSS
|
|
88
|
+
* Protocol 10: MCP credential custody leaves OSS. The vault credential type `oauth`, the
|
|
53
89
|
* MCP OAuth connect (`/v1/tenant/vaults/{vaultId}/oauth/start`, `/v1/oauth/callback`) and the
|
|
54
90
|
* credential resolver are gone: a session's MCP servers and HTTP tools reach their credentials
|
|
55
91
|
* through its attached vaults only.
|
|
@@ -58,12 +94,12 @@ export { hashManifest } from "./utils/hash.js";
|
|
|
58
94
|
* `WWW-Authenticate: Bearer` challenge instead of the opaque 404, a token missing a scope gets
|
|
59
95
|
* `error="insufficient_scope"`, and `GET /.well-known/oauth-protected-resource` names the trusted
|
|
60
96
|
* issuers. Identity files lose `maxLifetime`: the issuer sets its tokens' lifetimes.
|
|
61
|
-
* Protocol 8: the Runtime and Management APIs (`key_role_mismatch`), and manifest-only agents
|
|
62
|
-
*
|
|
97
|
+
* Protocol 8: the Runtime and Management APIs (`key_role_mismatch`), and manifest-only agents:
|
|
98
|
+
* manifest v5 and workflow manifest v3, no hooks or flow functions, remote MCP
|
|
63
99
|
* only, and no Action endpoints (`/v1/endpoints` and `/v1/actions/*` answer 404, delivery
|
|
64
100
|
* tokens are gone): an agent's tools are HTTP tools, remote MCP servers, agents and the
|
|
65
101
|
* Runtime's built-ins.
|
|
66
|
-
* Protocol 7: open-source auth
|
|
102
|
+
* Protocol 7: open-source auth. Subject tokens (`POST /v1/tokens`), the access policy,
|
|
67
103
|
* revocations, browser keys (`Nylorun-Key`), the Runtime's own CORS and derived principals are gone; their
|
|
68
104
|
* routes answer 404. Browsers and apps present a trusted issuer's token, servers an operator key.
|
|
69
105
|
* Protocol 6: file artifacts (`/v1/artifacts/**`, Runtime-signed capability links) and user
|
|
@@ -71,7 +107,7 @@ export { hashManifest } from "./utils/hash.js";
|
|
|
71
107
|
* it. The Host still accepts protocol 4 (and `Nylorun-Tenant`), 5 and 6 clients on every route
|
|
72
108
|
* that remains; a client that requires `action-endpoints` is refused by the feature check.
|
|
73
109
|
*/
|
|
74
|
-
export const PROTOCOL_VERSION =
|
|
110
|
+
export const PROTOCOL_VERSION = 18;
|
|
75
111
|
/** What a client of this protocol requires of a Host. */
|
|
76
112
|
export const PROTOCOL_FEATURES = [
|
|
77
113
|
"studio-principal",
|
|
@@ -88,13 +124,6 @@ export const PROTOCOL_FEATURES = [
|
|
|
88
124
|
* metadata at `/.well-known/oauth-protected-resource` when it has trusted issuers.
|
|
89
125
|
*/
|
|
90
126
|
"resource-server",
|
|
91
|
-
/**
|
|
92
|
-
* Protocol 11: Environments (`/v1/environments/{id}`, kinds `virtual`, `pod` and `none`), each
|
|
93
|
-
* with one vault written on the Runtime API; sessions name an `environment`; token callers
|
|
94
|
-
* carry Environment grants checked at every turn start, and `environments:write` lets a
|
|
95
|
-
* subject create, change and delete the Environments it is granted.
|
|
96
|
-
*/
|
|
97
|
-
"environments",
|
|
98
127
|
/** Protocol 12: the model catalog and provider list say which inputs each model reads. */
|
|
99
128
|
"model-inputs",
|
|
100
129
|
/**
|
|
@@ -103,12 +132,6 @@ export const PROTOCOL_FEATURES = [
|
|
|
103
132
|
* block, and tool calls, MCP servers and HTTP calls are named without capability ids.
|
|
104
133
|
*/
|
|
105
134
|
"flat-manifest",
|
|
106
|
-
/**
|
|
107
|
-
* Protocol 14: environment manifests (`/v1/environment-manifests/{name}`), Environments made
|
|
108
|
-
* from one version and never changed after creation, secret slots, and an agent manifest's
|
|
109
|
-
* `requires`, checked when a session opens.
|
|
110
|
-
*/
|
|
111
|
-
"environment-manifests",
|
|
112
135
|
/**
|
|
113
136
|
* Protocol 15: the harness boundary. `read_artifact` and `save_artifact` are our harness's
|
|
114
137
|
* tools, not the Runtime's: a session's pinned `runtime` block no longer carries them, and an
|
|
@@ -116,6 +139,25 @@ export const PROTOCOL_FEATURES = [
|
|
|
116
139
|
* `{server, tool}`: tool policy rules and approvals name them so.
|
|
117
140
|
*/
|
|
118
141
|
"harness-boundary",
|
|
142
|
+
/**
|
|
143
|
+
* Protocol 16: agent manifests (`/v1/agent-manifests/{name}`, v8, with a harness and a runtime
|
|
144
|
+
* section checked against each other at save) and Agents (`/v1/agents/{id}`, kinds `virtual`,
|
|
145
|
+
* `pod` and `none`, each with one vault), made from one manifest version, with a derived
|
|
146
|
+
* `state`; every session runs on an Agent; token callers carry Agent grants checked at every
|
|
147
|
+
* turn start, and `agents:write` lets a subject create, change and delete the Agents it is
|
|
148
|
+
* granted.
|
|
149
|
+
*/
|
|
150
|
+
"agents",
|
|
151
|
+
/**
|
|
152
|
+
* Protocol 17: a queue per session. A message to a busy session is queued unless it asks
|
|
153
|
+
* `delivery: "reject"`, and the busy refusal is `409 session_busy`.
|
|
154
|
+
*/
|
|
155
|
+
"session-queue",
|
|
156
|
+
/**
|
|
157
|
+
* Protocol 18: model call reads carry their timing and their cost by token kind, and a
|
|
158
|
+
* session's usage the cost by kind and the model time.
|
|
159
|
+
*/
|
|
160
|
+
"usage-by-kind",
|
|
119
161
|
];
|
|
120
162
|
/**
|
|
121
163
|
* Host features no client requires: a client that uses one checks the Host's `/health`
|
|
@@ -144,14 +186,14 @@ export const PROTOCOL_FEATURES = [
|
|
|
144
186
|
* `credential-coverage`: `POST /v1/tenant/credential-coverage` (the Management API) says which
|
|
145
187
|
* credential of an Environment's vault each of a saved agent's MCP servers and HTTP tools would
|
|
146
188
|
* get in a session that names that Environment.
|
|
147
|
-
* `tool-calls
|
|
189
|
+
* `tool-calls`: `GET /v1/sessions/{id}/calls/tool` pages a session's tool calls from the
|
|
148
190
|
* effect journal, every `tool.completed` says how its call ended (`status`, `kind`, `server`,
|
|
149
191
|
* `attempts`, `durationMs`), and tool calls are delivered at least once with their effect id as
|
|
150
192
|
* the key (`Idempotency-Key` for HTTP tools, `_meta["nylorun/idempotency-key"]` for MCP tools).
|
|
151
|
-
* `tool-policy
|
|
193
|
+
* `tool-policy`: `GET`/`PUT /v1/tenant/tool-policy` (the Management API) sets which
|
|
152
194
|
* MCP and HTTP tool calls run, wait for a person (`ask`: the turn pauses until `approve`) or are
|
|
153
195
|
* refused (`deny`: `tool.denied`), for every harness; a manifest that sets `approval` is refused.
|
|
154
|
-
* `traces
|
|
196
|
+
* `traces`: `GET /v1/sessions/{id}/turns/{turnId}/trace` answers a turn's spans as OTLP JSON,
|
|
155
197
|
* the spans the Runtime posts to an OTLP collector when one is configured; a command or an AG-UI
|
|
156
198
|
* or A2A request sent with a `traceparent` joins the caller's trace.
|
|
157
199
|
*/
|
|
@@ -175,13 +217,15 @@ export const OPTIONAL_HOST_FEATURES = [
|
|
|
175
217
|
"artifact-reads",
|
|
176
218
|
];
|
|
177
219
|
/**
|
|
178
|
-
* What this Host serves: protocol
|
|
179
|
-
*
|
|
180
|
-
* protocol it needs rather than
|
|
220
|
+
* What this Host serves: protocol 16, 17 and 18. Protocol 16 replaced agent definitions and
|
|
221
|
+
* Environments with agent manifests and Agents, so an older client is answered `426` naming the
|
|
222
|
+
* protocol it needs rather than routes it cannot use. Protocol 17 is additive: a protocol 16
|
|
223
|
+
* client's messages default to `delivery: "reject"`. Protocol 18 is additive: a protocol 16 or 17
|
|
224
|
+
* client's usage reads leave out the fields it added.
|
|
181
225
|
*/
|
|
182
226
|
export const HOST_PROTOCOL = {
|
|
183
|
-
min:
|
|
184
|
-
max:
|
|
227
|
+
min: 16,
|
|
228
|
+
max: 18,
|
|
185
229
|
features: [...PROTOCOL_FEATURES, ...OPTIONAL_HOST_FEATURES],
|
|
186
230
|
};
|
|
187
231
|
export const DEFINITION_SCHEMA_VERSION = 2;
|
|
@@ -230,25 +274,48 @@ export const ERROR_CODES = [
|
|
|
230
274
|
"invalid_request",
|
|
231
275
|
/** A route that acts for a person was called without one (`Nylorun-Subject`). */
|
|
232
276
|
"subject_required",
|
|
233
|
-
/** A token caller's
|
|
234
|
-
"
|
|
277
|
+
/** A token caller's Agent grants do not reach the Agent. */
|
|
278
|
+
"agent_not_granted",
|
|
279
|
+
/**
|
|
280
|
+
* A message to a session whose turn runs, or that waits on an approval, an answer or an
|
|
281
|
+
* uncertain call, sent with `delivery: "reject"` (protocol 17): `409`. Without it the message is
|
|
282
|
+
* queued.
|
|
283
|
+
*/
|
|
284
|
+
"session_busy",
|
|
285
|
+
/**
|
|
286
|
+
* The session already holds the Runtime limit `sessionQueuedMessages` queued messages
|
|
287
|
+
* (protocol 17): `429`. They start a turn when the running one ends.
|
|
288
|
+
*/
|
|
289
|
+
"queue_full",
|
|
290
|
+
/**
|
|
291
|
+
* `POST /v1/agents/{id}/triggers/{triggerId}/resume` on an `at` trigger whose time has passed:
|
|
292
|
+
* `409`. Save a manifest version with a new time.
|
|
293
|
+
*/
|
|
294
|
+
"trigger_expired",
|
|
295
|
+
/** A signed delivery to a paused webhook trigger: `409`; nothing runs. */
|
|
296
|
+
"trigger_paused",
|
|
297
|
+
/**
|
|
298
|
+
* A memory write whose `content_sha256` precondition no longer holds, or a path a folder or
|
|
299
|
+
* another memory already holds: `409`. Read the memory again and write on top.
|
|
300
|
+
*/
|
|
301
|
+
"memory_conflict",
|
|
235
302
|
/** Disk work (snapshot, restore, stop, reset) while a turn runs, or a turn while a disk copy runs. */
|
|
236
|
-
"
|
|
237
|
-
/** The
|
|
238
|
-
"
|
|
239
|
-
/** The Tenant's placement keeps this session's harness off the host its
|
|
303
|
+
"agent_busy",
|
|
304
|
+
/** The Agent is gone, or its kind cannot run on this Runtime. */
|
|
305
|
+
"agent_unavailable",
|
|
306
|
+
/** The Tenant's placement keeps this session's harness off the host its Agent needs. */
|
|
240
307
|
"placement_refused",
|
|
241
|
-
/** A pod
|
|
242
|
-
"
|
|
308
|
+
/** A pod Agent's volume or node is gone: only `POST /v1/agents/{id}/reset` brings it back. */
|
|
309
|
+
"agent_lost",
|
|
243
310
|
/**
|
|
244
|
-
* The
|
|
311
|
+
* The Agent names an owner (`owner`) other than the session's owner: `403` to an
|
|
245
312
|
* application key; a caller acting for a person gets the opaque `404`.
|
|
246
313
|
*/
|
|
247
|
-
"
|
|
314
|
+
"agent_owner_mismatch",
|
|
248
315
|
/**
|
|
249
|
-
* The session's
|
|
250
|
-
*
|
|
251
|
-
*
|
|
316
|
+
* The session's Agent runs another harness than the one the session pinned when it opened: an
|
|
317
|
+
* Agent's harness is fixed for its life, so its id was deleted and made again from a manifest
|
|
318
|
+
* with another harness. Open a new session.
|
|
252
319
|
*/
|
|
253
320
|
"harness_mismatch",
|
|
254
321
|
/**
|
|
@@ -262,50 +329,51 @@ export const ERROR_CODES = [
|
|
|
262
329
|
*/
|
|
263
330
|
"issuer_unavailable",
|
|
264
331
|
/**
|
|
265
|
-
* A definition names definition files the Runtime does not hold
|
|
332
|
+
* A definition names definition files the Runtime does not hold: upload each
|
|
266
333
|
* with `PUT /v1/files/sha256:<hex>` first. `details.missing` lists their hashes.
|
|
267
334
|
*/
|
|
268
335
|
"definition_files_missing",
|
|
269
336
|
/**
|
|
270
337
|
* Not an HTTP answer: the code of a tool error the model sees when an MCP server or HTTP tool
|
|
271
|
-
* answered `401
|
|
338
|
+
* answered `401`. The vault's credential (or none) was rejected; the call is not retried.
|
|
272
339
|
*/
|
|
273
340
|
"credential_rejected",
|
|
274
341
|
/**
|
|
275
|
-
* `POST /v1/tenant/mcp/preview` could not list the server's tools
|
|
342
|
+
* `POST /v1/tenant/mcp/preview` could not list the server's tools: `502`, with
|
|
276
343
|
* `details.failure` the code a tool call would have failed with (`mcp.unreachable` for an
|
|
277
344
|
* address the Host refuses, a connection that failed or a server silent past 15 s;
|
|
278
345
|
* `mcp.forbidden`, `mcp.status`, `mcp.error`).
|
|
279
346
|
*/
|
|
280
347
|
"mcp_preview_failed",
|
|
281
348
|
/**
|
|
282
|
-
* An Environment's credentials would be ambiguous
|
|
349
|
+
* An Environment's credentials would be ambiguous: `409` at the secret write. Two
|
|
283
350
|
* `environment_secret` credentials would be bound to one host, or two `bearer` or `headers`
|
|
284
351
|
* credentials to one URL.
|
|
285
352
|
*/
|
|
286
353
|
"credential_conflict",
|
|
287
354
|
/**
|
|
288
|
-
* A `PUT /v1/
|
|
289
|
-
*
|
|
290
|
-
*
|
|
355
|
+
* A move of an existing Agent (`PUT /v1/agents/{id}`) would change what is fixed for
|
|
356
|
+
* its life: its manifest's name, its kind, its harness or its storage. `409`, with each in
|
|
357
|
+
* `details.fields`. Fork it into a new Agent (`POST /v1/agents/{id}/fork`) instead.
|
|
291
358
|
*/
|
|
292
|
-
"
|
|
359
|
+
"agent_fixed_field",
|
|
293
360
|
/**
|
|
294
|
-
* A secret write named a secret the
|
|
295
|
-
*
|
|
361
|
+
* A secret write named a secret the Agent's manifest does not declare: `409`. Add the
|
|
362
|
+
* slot to the manifest's runtime section and move the Agent to the new version.
|
|
296
363
|
*/
|
|
297
364
|
"secret_not_in_manifest",
|
|
298
365
|
/**
|
|
299
|
-
*
|
|
300
|
-
* `details.
|
|
366
|
+
* An agent manifest whose harness and runtime sections do not fit each other (protocol 16):
|
|
367
|
+
* `422` when it is saved. `details.gaps` names each gap: a custom harness off a pod, a
|
|
368
|
+
* credential that is no declared slot of the right type, a sandbox the runtime does not give.
|
|
301
369
|
*/
|
|
302
|
-
"
|
|
303
|
-
/** No
|
|
370
|
+
"manifest_inconsistent",
|
|
371
|
+
/** No agent manifest has this name, or no version with this number. */
|
|
304
372
|
"manifest_not_found",
|
|
305
|
-
/** An
|
|
373
|
+
/** An agent manifest some Agent was made from cannot be deleted: `409`. */
|
|
306
374
|
"manifest_in_use",
|
|
307
375
|
/**
|
|
308
|
-
* `If-Match` named a version that is no longer the latest
|
|
376
|
+
* `If-Match` named a version that is no longer the latest: `412`. Read the manifest
|
|
309
377
|
* again, or save without `If-Match` (the CLI's `--if-match`, the SDK's `ifMatch`).
|
|
310
378
|
*/
|
|
311
379
|
"manifest_changed",
|
|
@@ -322,7 +390,7 @@ export const ARTIFACT_ID_PATTERN = /^af_[0-9a-hjkmnp-tv-z]{26}$/;
|
|
|
322
390
|
/**
|
|
323
391
|
* An application key's id: an operator key's name, which names its client (e.g. `backend`).
|
|
324
392
|
* `studio` is reserved for the key Studio derives from the admin key.
|
|
325
|
-
* An identifier's grammar is the protocol's
|
|
393
|
+
* An identifier's grammar is the protocol's: it crosses the Runtime API, tokens and grants
|
|
326
394
|
* and means the same in every installation, so its length is a constant of protocol 15, not a
|
|
327
395
|
* setting.
|
|
328
396
|
*/
|