@nika-open/nika 0.0.0-stage → 0.124.5
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/LICENSE +202 -0
- package/README.md +776 -2
- package/dist/bin/nika.js +450 -0
- package/dist/index.cjs +5921 -0
- package/dist/index.d.cts +1913 -0
- package/dist/index.d.ts +1913 -0
- package/dist/index.js +5865 -0
- package/docs/README.md +69 -0
- package/docs/architecture.md +163 -0
- package/docs/compile.md +486 -0
- package/docs/errors.md +154 -0
- package/docs/glossary.md +41 -0
- package/docs/http-api.md +396 -0
- package/docs/migrating-to-0.116.md +164 -0
- package/docs/receipts.md +156 -0
- package/docs/runs.md +670 -0
- package/docs/server.md +543 -0
- package/docs/testing.md +244 -0
- package/docs/upgrading-to-0.123.md +190 -0
- package/openapi.json +3067 -0
- package/package.json +92 -4
package/openapi.json
ADDED
|
@@ -0,0 +1,3067 @@
|
|
|
1
|
+
{
|
|
2
|
+
"components": {
|
|
3
|
+
"parameters": {
|
|
4
|
+
"IdempotencyKey": {
|
|
5
|
+
"in": "header",
|
|
6
|
+
"name": "Idempotency-Key",
|
|
7
|
+
"required": true,
|
|
8
|
+
"schema": {
|
|
9
|
+
"maxLength": 255,
|
|
10
|
+
"minLength": 1,
|
|
11
|
+
"type": "string"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"IfMatch": {
|
|
15
|
+
"in": "header",
|
|
16
|
+
"name": "If-Match",
|
|
17
|
+
"required": false,
|
|
18
|
+
"schema": {
|
|
19
|
+
"maxLength": 96,
|
|
20
|
+
"type": "string"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"IfNoneMatch": {
|
|
24
|
+
"in": "header",
|
|
25
|
+
"name": "If-None-Match",
|
|
26
|
+
"required": false,
|
|
27
|
+
"schema": {
|
|
28
|
+
"const": "*",
|
|
29
|
+
"type": "string"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"LastEventId": {
|
|
33
|
+
"in": "header",
|
|
34
|
+
"name": "Last-Event-ID",
|
|
35
|
+
"required": false,
|
|
36
|
+
"schema": {
|
|
37
|
+
"pattern": "^(0|[1-9][0-9]*)$",
|
|
38
|
+
"type": "string"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"schemas": {
|
|
43
|
+
"AccessOffer": {
|
|
44
|
+
"additionalProperties": false,
|
|
45
|
+
"properties": {
|
|
46
|
+
"declared": {
|
|
47
|
+
"additionalProperties": false,
|
|
48
|
+
"description": "The file's `run.access` and `run.reasoning.effort` as the engine reads them (the `access_requirement` receipt's keys); absent when the file declares neither",
|
|
49
|
+
"properties": {
|
|
50
|
+
"effort": {
|
|
51
|
+
"type": "string"
|
|
52
|
+
},
|
|
53
|
+
"fallback": {
|
|
54
|
+
"enum": [
|
|
55
|
+
"none"
|
|
56
|
+
],
|
|
57
|
+
"type": "string"
|
|
58
|
+
},
|
|
59
|
+
"protocol": {
|
|
60
|
+
"enum": [
|
|
61
|
+
"api",
|
|
62
|
+
"acp"
|
|
63
|
+
],
|
|
64
|
+
"type": "string"
|
|
65
|
+
},
|
|
66
|
+
"service_tier": {
|
|
67
|
+
"enum": [
|
|
68
|
+
"standard",
|
|
69
|
+
"fast"
|
|
70
|
+
],
|
|
71
|
+
"type": "string"
|
|
72
|
+
},
|
|
73
|
+
"via": {
|
|
74
|
+
"type": "string"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"type": "object"
|
|
78
|
+
},
|
|
79
|
+
"prompts_sent": {
|
|
80
|
+
"const": 0,
|
|
81
|
+
"description": "This door holds no prompt: a session is opened, asked what it lists and ended",
|
|
82
|
+
"type": "integer"
|
|
83
|
+
},
|
|
84
|
+
"reason": {
|
|
85
|
+
"description": "Present with not_applicable",
|
|
86
|
+
"type": "string"
|
|
87
|
+
},
|
|
88
|
+
"routes": {
|
|
89
|
+
"description": "One row per session shape the workflow's tasks run in and per model they resolve to: completion rows first, then agent rows",
|
|
90
|
+
"items": {
|
|
91
|
+
"$ref": "#/components/schemas/AccessOfferRoute"
|
|
92
|
+
},
|
|
93
|
+
"maxItems": 8,
|
|
94
|
+
"type": "array"
|
|
95
|
+
},
|
|
96
|
+
"routes_omitted": {
|
|
97
|
+
"description": "Sessions the workflow names beyond the eight one request reads",
|
|
98
|
+
"minimum": 0,
|
|
99
|
+
"type": "integer"
|
|
100
|
+
},
|
|
101
|
+
"schema": {
|
|
102
|
+
"const": "nika/access-offer@1",
|
|
103
|
+
"type": "string"
|
|
104
|
+
},
|
|
105
|
+
"status": {
|
|
106
|
+
"description": "read: the routes below were asked. not_applicable: the file selects no ACP sessions (no `run.access.via` under `run.access.protocol: acp`, or no `infer:`/`agent:` task with a static model); no session was opened and `reason` says why",
|
|
107
|
+
"enum": [
|
|
108
|
+
"read",
|
|
109
|
+
"not_applicable"
|
|
110
|
+
],
|
|
111
|
+
"type": "string"
|
|
112
|
+
},
|
|
113
|
+
"workflow": {
|
|
114
|
+
"minLength": 1,
|
|
115
|
+
"type": "string"
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"required": [
|
|
119
|
+
"schema",
|
|
120
|
+
"workflow",
|
|
121
|
+
"status",
|
|
122
|
+
"prompts_sent",
|
|
123
|
+
"routes",
|
|
124
|
+
"routes_omitted"
|
|
125
|
+
],
|
|
126
|
+
"type": "object"
|
|
127
|
+
},
|
|
128
|
+
"AccessOfferListing": {
|
|
129
|
+
"additionalProperties": false,
|
|
130
|
+
"properties": {
|
|
131
|
+
"current": {
|
|
132
|
+
"description": "The value the session holds now: what a run that declares none keeps on a session like this one",
|
|
133
|
+
"maxLength": 160,
|
|
134
|
+
"minLength": 1,
|
|
135
|
+
"pattern": "^[!-~]+$",
|
|
136
|
+
"type": "string"
|
|
137
|
+
},
|
|
138
|
+
"offered": {
|
|
139
|
+
"description": "The values, in the session's order. A run accepts a declared value only when it equals one of them exactly",
|
|
140
|
+
"items": {
|
|
141
|
+
"maxLength": 160,
|
|
142
|
+
"minLength": 1,
|
|
143
|
+
"pattern": "^[!-~]+$",
|
|
144
|
+
"type": "string"
|
|
145
|
+
},
|
|
146
|
+
"maxItems": 64,
|
|
147
|
+
"type": "array"
|
|
148
|
+
},
|
|
149
|
+
"omitted": {
|
|
150
|
+
"minimum": 0,
|
|
151
|
+
"type": "integer"
|
|
152
|
+
},
|
|
153
|
+
"option": {
|
|
154
|
+
"description": "The session option's own id",
|
|
155
|
+
"maxLength": 160,
|
|
156
|
+
"minLength": 1,
|
|
157
|
+
"pattern": "^[!-~]+$",
|
|
158
|
+
"type": "string"
|
|
159
|
+
},
|
|
160
|
+
"reason": {
|
|
161
|
+
"maxLength": 240,
|
|
162
|
+
"type": "string"
|
|
163
|
+
},
|
|
164
|
+
"status": {
|
|
165
|
+
"description": "offered: the session lists the option for the model. not_offered: it lists none. unobserved: not read, and `reason` says why (the model does not hold, the option is ambiguous or in another form, or no speed control is measured for this adapter release)",
|
|
166
|
+
"enum": [
|
|
167
|
+
"offered",
|
|
168
|
+
"not_offered",
|
|
169
|
+
"unobserved"
|
|
170
|
+
],
|
|
171
|
+
"type": "string"
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"required": [
|
|
175
|
+
"status"
|
|
176
|
+
],
|
|
177
|
+
"type": "object"
|
|
178
|
+
},
|
|
179
|
+
"AccessOfferRoute": {
|
|
180
|
+
"additionalProperties": false,
|
|
181
|
+
"properties": {
|
|
182
|
+
"adapter": {
|
|
183
|
+
"additionalProperties": false,
|
|
184
|
+
"description": "The adapter's own report on `initialize`; a value that is not a short graphic-ASCII token is absent",
|
|
185
|
+
"properties": {
|
|
186
|
+
"name": {
|
|
187
|
+
"maxLength": 160,
|
|
188
|
+
"minLength": 1,
|
|
189
|
+
"pattern": "^[!-~]+$",
|
|
190
|
+
"type": "string"
|
|
191
|
+
},
|
|
192
|
+
"version": {
|
|
193
|
+
"maxLength": 160,
|
|
194
|
+
"minLength": 1,
|
|
195
|
+
"pattern": "^[!-~]+$",
|
|
196
|
+
"type": "string"
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
"type": "object"
|
|
200
|
+
},
|
|
201
|
+
"code": {
|
|
202
|
+
"description": "With unavailable: NIKA-1803 (adapter absent, silent or outside its pin), NIKA-1804 (session death) or NIKA-1805 (refused)",
|
|
203
|
+
"type": "string"
|
|
204
|
+
},
|
|
205
|
+
"effort": {
|
|
206
|
+
"$ref": "#/components/schemas/AccessOfferListing"
|
|
207
|
+
},
|
|
208
|
+
"fresh_until": {
|
|
209
|
+
"format": "date-time",
|
|
210
|
+
"type": "string"
|
|
211
|
+
},
|
|
212
|
+
"model": {
|
|
213
|
+
"additionalProperties": false,
|
|
214
|
+
"properties": {
|
|
215
|
+
"current": {
|
|
216
|
+
"description": "The native id the session holds (confirmed, legacy_list), its own model (session_default) or the one it answered instead (not_confirmed)",
|
|
217
|
+
"maxLength": 160,
|
|
218
|
+
"minLength": 1,
|
|
219
|
+
"pattern": "^[!-~]+$",
|
|
220
|
+
"type": "string"
|
|
221
|
+
},
|
|
222
|
+
"offered": {
|
|
223
|
+
"description": "The model values the session lists, in its order",
|
|
224
|
+
"items": {
|
|
225
|
+
"maxLength": 160,
|
|
226
|
+
"minLength": 1,
|
|
227
|
+
"pattern": "^[!-~]+$",
|
|
228
|
+
"type": "string"
|
|
229
|
+
},
|
|
230
|
+
"maxItems": 64,
|
|
231
|
+
"type": "array"
|
|
232
|
+
},
|
|
233
|
+
"omitted": {
|
|
234
|
+
"description": "Listed values not carried: beyond 64, or not a token",
|
|
235
|
+
"minimum": 0,
|
|
236
|
+
"type": "integer"
|
|
237
|
+
},
|
|
238
|
+
"requested": {
|
|
239
|
+
"description": "The model as the file names it",
|
|
240
|
+
"minLength": 1,
|
|
241
|
+
"type": "string"
|
|
242
|
+
},
|
|
243
|
+
"status": {
|
|
244
|
+
"description": "confirmed: listed, selected for this session only and read back. session_default: the file names `default`. legacy_list: only the session's legacy model list names it, which answers no configuration. not_offered: the session does not list it. not_confirmed: listed, and the session answered another model. Efforts and tiers are read only under confirmed and session_default",
|
|
245
|
+
"enum": [
|
|
246
|
+
"confirmed",
|
|
247
|
+
"session_default",
|
|
248
|
+
"legacy_list",
|
|
249
|
+
"not_offered",
|
|
250
|
+
"not_confirmed"
|
|
251
|
+
],
|
|
252
|
+
"type": "string"
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
"required": [
|
|
256
|
+
"requested"
|
|
257
|
+
],
|
|
258
|
+
"type": "object"
|
|
259
|
+
},
|
|
260
|
+
"observed_at": {
|
|
261
|
+
"description": "When this row was read. A row is served again until `fresh_until` (60 s after an observed reading, 15 s after an unavailable one)",
|
|
262
|
+
"format": "date-time",
|
|
263
|
+
"type": "string"
|
|
264
|
+
},
|
|
265
|
+
"profile": {
|
|
266
|
+
"description": "completion: the route's one-shot completion profile, which `infer:` tasks run under. agent: its agent session, which `agent:` tasks run in",
|
|
267
|
+
"enum": [
|
|
268
|
+
"completion",
|
|
269
|
+
"agent"
|
|
270
|
+
],
|
|
271
|
+
"type": "string"
|
|
272
|
+
},
|
|
273
|
+
"protocol": {
|
|
274
|
+
"const": "acp",
|
|
275
|
+
"type": "string"
|
|
276
|
+
},
|
|
277
|
+
"reason": {
|
|
278
|
+
"description": "With unavailable: the engine's sentence, no path in it",
|
|
279
|
+
"maxLength": 240,
|
|
280
|
+
"type": "string"
|
|
281
|
+
},
|
|
282
|
+
"service_tier": {
|
|
283
|
+
"$ref": "#/components/schemas/AccessOfferListing"
|
|
284
|
+
},
|
|
285
|
+
"status": {
|
|
286
|
+
"description": "observed: the session answered. unavailable: it gave no offer; `code` and `reason` say why, as a run on the route would meet it before its prompt",
|
|
287
|
+
"enum": [
|
|
288
|
+
"observed",
|
|
289
|
+
"unavailable"
|
|
290
|
+
],
|
|
291
|
+
"type": "string"
|
|
292
|
+
},
|
|
293
|
+
"tasks": {
|
|
294
|
+
"description": "The tasks that resolve to this model in this shape",
|
|
295
|
+
"items": {
|
|
296
|
+
"minLength": 1,
|
|
297
|
+
"type": "string"
|
|
298
|
+
},
|
|
299
|
+
"type": "array"
|
|
300
|
+
},
|
|
301
|
+
"via": {
|
|
302
|
+
"description": "The file's `run.access.via`",
|
|
303
|
+
"minLength": 1,
|
|
304
|
+
"type": "string"
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
"required": [
|
|
308
|
+
"via",
|
|
309
|
+
"protocol",
|
|
310
|
+
"profile",
|
|
311
|
+
"tasks",
|
|
312
|
+
"status",
|
|
313
|
+
"observed_at",
|
|
314
|
+
"fresh_until",
|
|
315
|
+
"model"
|
|
316
|
+
],
|
|
317
|
+
"type": "object"
|
|
318
|
+
},
|
|
319
|
+
"Artifact": {
|
|
320
|
+
"additionalProperties": false,
|
|
321
|
+
"properties": {
|
|
322
|
+
"event_id": {
|
|
323
|
+
"description": "The id of that journal event",
|
|
324
|
+
"format": "uuid",
|
|
325
|
+
"type": "string"
|
|
326
|
+
},
|
|
327
|
+
"kind": {
|
|
328
|
+
"enum": [
|
|
329
|
+
"file",
|
|
330
|
+
"agent_image"
|
|
331
|
+
],
|
|
332
|
+
"type": "string"
|
|
333
|
+
},
|
|
334
|
+
"mime": {
|
|
335
|
+
"description": "The recorded media type, else one derived from the extension, else application/octet-stream",
|
|
336
|
+
"minLength": 3,
|
|
337
|
+
"type": "string"
|
|
338
|
+
},
|
|
339
|
+
"name": {
|
|
340
|
+
"description": "Unique within the job: `file/<path>` or `agent_image/<n>.<ext>` (the n-th image the job's agents sent that the blob store kept). The download route's `{name}`.",
|
|
341
|
+
"minLength": 1,
|
|
342
|
+
"type": "string"
|
|
343
|
+
},
|
|
344
|
+
"path": {
|
|
345
|
+
"description": "A file's project-relative path, as the workflow wrote it (normalized). Absent for an agent image.",
|
|
346
|
+
"minLength": 1,
|
|
347
|
+
"type": "string"
|
|
348
|
+
},
|
|
349
|
+
"sha256": {
|
|
350
|
+
"description": "SHA-256 of the recorded bytes, as journaled",
|
|
351
|
+
"pattern": "^[0-9a-f]{64}$",
|
|
352
|
+
"type": "string"
|
|
353
|
+
},
|
|
354
|
+
"size": {
|
|
355
|
+
"description": "Bytes, as journaled",
|
|
356
|
+
"minimum": 0,
|
|
357
|
+
"type": "integer"
|
|
358
|
+
},
|
|
359
|
+
"task": {
|
|
360
|
+
"description": "The task whose event records it",
|
|
361
|
+
"type": "string"
|
|
362
|
+
}
|
|
363
|
+
},
|
|
364
|
+
"required": [
|
|
365
|
+
"name",
|
|
366
|
+
"kind",
|
|
367
|
+
"size",
|
|
368
|
+
"sha256",
|
|
369
|
+
"mime",
|
|
370
|
+
"event_id"
|
|
371
|
+
],
|
|
372
|
+
"type": "object"
|
|
373
|
+
},
|
|
374
|
+
"ArtifactManifest": {
|
|
375
|
+
"additionalProperties": false,
|
|
376
|
+
"description": "A settled job's artifacts, as its sealed journal records them, bound to its receipt: `receipt` is the job's own (trace id and chain head included), `verdict` the tier its journal attained. At most 1024 entries are listed, in journal order; `truncated` says more exist (a download still finds every recorded name).",
|
|
377
|
+
"properties": {
|
|
378
|
+
"artifacts": {
|
|
379
|
+
"items": {
|
|
380
|
+
"$ref": "#/components/schemas/Artifact"
|
|
381
|
+
},
|
|
382
|
+
"maxItems": 1024,
|
|
383
|
+
"type": "array"
|
|
384
|
+
},
|
|
385
|
+
"max_artifact_bytes": {
|
|
386
|
+
"description": "The largest artifact this server downloads (256 MiB by default)",
|
|
387
|
+
"examples": [
|
|
388
|
+
268435456
|
|
389
|
+
],
|
|
390
|
+
"minimum": 1,
|
|
391
|
+
"type": "integer"
|
|
392
|
+
},
|
|
393
|
+
"receipt": {
|
|
394
|
+
"$ref": "#/components/schemas/JobReceipt"
|
|
395
|
+
},
|
|
396
|
+
"truncated": {
|
|
397
|
+
"type": "boolean"
|
|
398
|
+
},
|
|
399
|
+
"verdict": {
|
|
400
|
+
"enum": [
|
|
401
|
+
"sealed",
|
|
402
|
+
"anchored"
|
|
403
|
+
],
|
|
404
|
+
"type": "string"
|
|
405
|
+
}
|
|
406
|
+
},
|
|
407
|
+
"required": [
|
|
408
|
+
"receipt",
|
|
409
|
+
"verdict",
|
|
410
|
+
"max_artifact_bytes",
|
|
411
|
+
"truncated",
|
|
412
|
+
"artifacts"
|
|
413
|
+
],
|
|
414
|
+
"type": "object"
|
|
415
|
+
},
|
|
416
|
+
"CheckByName": {
|
|
417
|
+
"additionalProperties": false,
|
|
418
|
+
"description": "Source-only Check by served name. Required launch inputs may remain unsupplied; caller inputs are accepted only on POST /v1/jobs and are refused here. Check does not execute an access plan.",
|
|
419
|
+
"properties": {
|
|
420
|
+
"access": {
|
|
421
|
+
"description": "Access pin, same vocabulary as `--access` (class or harness id). A pin never silently substitutes a metered seat.",
|
|
422
|
+
"maxLength": 64,
|
|
423
|
+
"minLength": 1,
|
|
424
|
+
"type": "string"
|
|
425
|
+
},
|
|
426
|
+
"workflow": {
|
|
427
|
+
"maxLength": 4096,
|
|
428
|
+
"minLength": 1,
|
|
429
|
+
"type": "string"
|
|
430
|
+
}
|
|
431
|
+
},
|
|
432
|
+
"required": [
|
|
433
|
+
"workflow"
|
|
434
|
+
],
|
|
435
|
+
"type": "object"
|
|
436
|
+
},
|
|
437
|
+
"CompileOutcome": {
|
|
438
|
+
"description": "The engine-owned machine document of one authoring result — the document `nika compile --json` prints, without the CLI-only `written`. No field grants authority, writes or executes source.",
|
|
439
|
+
"properties": {
|
|
440
|
+
"candidate": {
|
|
441
|
+
"description": "Ordinary `.nika` source. It is proposed only when `status` is `ready`; under any other status it is never proposed. Under `incomplete` it is a preview: it may still carry unfilled holes, or, when an `applied` diagnostic targets `verify_held`, it is a candidate the verifier held: it answered on these bytes against the request and did not accept them. A preview is not to be run or saved as an accepted result. Null when no candidate is shown, a withdrawn one included.",
|
|
442
|
+
"type": [
|
|
443
|
+
"string",
|
|
444
|
+
"null"
|
|
445
|
+
]
|
|
446
|
+
},
|
|
447
|
+
"check_preview": {
|
|
448
|
+
"description": "The engine's pure Check report over the source only. No child file, skill, credential probe, access plan or admission was evaluated",
|
|
449
|
+
"properties": {
|
|
450
|
+
"report": {
|
|
451
|
+
"additionalProperties": true,
|
|
452
|
+
"type": "object"
|
|
453
|
+
},
|
|
454
|
+
"scope": {
|
|
455
|
+
"const": "sourceOnly",
|
|
456
|
+
"type": "string"
|
|
457
|
+
}
|
|
458
|
+
},
|
|
459
|
+
"required": [
|
|
460
|
+
"scope",
|
|
461
|
+
"report"
|
|
462
|
+
],
|
|
463
|
+
"type": [
|
|
464
|
+
"object",
|
|
465
|
+
"null"
|
|
466
|
+
]
|
|
467
|
+
},
|
|
468
|
+
"compile_version": {
|
|
469
|
+
"const": 1,
|
|
470
|
+
"type": "integer"
|
|
471
|
+
},
|
|
472
|
+
"diagnostics": {
|
|
473
|
+
"description": "Findings, in order. `kind` and `target` are their machine-readable part; `message` is for a reader. `target` names what a finding concerns: a question key, a task, a source field, or one of the compiler's own targets, among them `semantic_verification`, a finding on the request against the candidate's bytes (a clause or the whole request that no admitted judgment of these bytes settled, a part a verifier judged missing with its reason, a part it left unsettled or contested, a verification stopped at a judge call that got no answer); `verify_held` (kind `applied`), the candidate is held: the verifier answered on these bytes against the request and did not accept them (it rejected them or abstained), so `candidate` is a preview only, no replayable round is kept, and that verifier is not asked about the same bytes again in this round; and `verify_resume` (kind `applied`), no admitted judgment of the candidate was made (the verifier's call failed or chose no offered answer): the candidate is withdrawn and the round's record kept, and a zero-call replay of that round asks no verifier. Each verification attempt is recorded in `provenance.decision.semantic_verification`.",
|
|
474
|
+
"items": {
|
|
475
|
+
"properties": {
|
|
476
|
+
"kind": {
|
|
477
|
+
"enum": [
|
|
478
|
+
"applied",
|
|
479
|
+
"missed",
|
|
480
|
+
"unknown",
|
|
481
|
+
"requiresHuman",
|
|
482
|
+
"refused"
|
|
483
|
+
],
|
|
484
|
+
"type": "string"
|
|
485
|
+
},
|
|
486
|
+
"message": {
|
|
487
|
+
"description": "For a reader; never parsed to recover compiler state",
|
|
488
|
+
"type": "string"
|
|
489
|
+
},
|
|
490
|
+
"target": {
|
|
491
|
+
"type": "string"
|
|
492
|
+
}
|
|
493
|
+
},
|
|
494
|
+
"required": [
|
|
495
|
+
"kind",
|
|
496
|
+
"target",
|
|
497
|
+
"message"
|
|
498
|
+
],
|
|
499
|
+
"type": "object"
|
|
500
|
+
},
|
|
501
|
+
"type": "array"
|
|
502
|
+
},
|
|
503
|
+
"provenance": {
|
|
504
|
+
"description": "Reproduction metadata; neither program identity nor run evidence",
|
|
505
|
+
"properties": {
|
|
506
|
+
"cognition": {
|
|
507
|
+
"const": "deterministicOnly",
|
|
508
|
+
"type": "string"
|
|
509
|
+
},
|
|
510
|
+
"compiler_version": {
|
|
511
|
+
"type": "string"
|
|
512
|
+
},
|
|
513
|
+
"decision": {
|
|
514
|
+
"additionalProperties": true,
|
|
515
|
+
"description": "Bounded compiler decision evidence, including deterministic and replay outcomes; it grants no execution or spending authority.",
|
|
516
|
+
"type": "object"
|
|
517
|
+
},
|
|
518
|
+
"plan": {
|
|
519
|
+
"additionalProperties": true,
|
|
520
|
+
"description": "The compiler record retained in this outcome; a server replay uses its opaque token rather than accepting this object as authority.",
|
|
521
|
+
"type": "object"
|
|
522
|
+
},
|
|
523
|
+
"skeleton": {
|
|
524
|
+
"type": [
|
|
525
|
+
"string",
|
|
526
|
+
"null"
|
|
527
|
+
]
|
|
528
|
+
},
|
|
529
|
+
"spec_pin": {
|
|
530
|
+
"type": "string"
|
|
531
|
+
},
|
|
532
|
+
"strategy": {
|
|
533
|
+
"description": "The compiler strategy that produced this outcome.",
|
|
534
|
+
"type": "string"
|
|
535
|
+
},
|
|
536
|
+
"suggested_file": {
|
|
537
|
+
"description": "A suggested candidate file name, never a file written by compilation.",
|
|
538
|
+
"type": [
|
|
539
|
+
"string",
|
|
540
|
+
"null"
|
|
541
|
+
]
|
|
542
|
+
}
|
|
543
|
+
},
|
|
544
|
+
"required": [
|
|
545
|
+
"compiler_version",
|
|
546
|
+
"spec_pin",
|
|
547
|
+
"skeleton",
|
|
548
|
+
"cognition"
|
|
549
|
+
],
|
|
550
|
+
"type": "object"
|
|
551
|
+
},
|
|
552
|
+
"questions": {
|
|
553
|
+
"items": {
|
|
554
|
+
"properties": {
|
|
555
|
+
"key": {
|
|
556
|
+
"description": "Stable semantic hole path such as `const.request`, never a session id",
|
|
557
|
+
"type": "string"
|
|
558
|
+
},
|
|
559
|
+
"label": {
|
|
560
|
+
"type": "string"
|
|
561
|
+
},
|
|
562
|
+
"mandatory": {
|
|
563
|
+
"description": "false: the value belongs to a binding outside the program (a schedule's timezone, missed-run and overlap policies, per-run ceiling) and never blocks a ready candidate",
|
|
564
|
+
"type": "boolean"
|
|
565
|
+
},
|
|
566
|
+
"options": {
|
|
567
|
+
"description": "Present on a choice question only: the admissible answers, keys spelled by the owning grammar",
|
|
568
|
+
"items": {
|
|
569
|
+
"properties": {
|
|
570
|
+
"key": {
|
|
571
|
+
"type": "string"
|
|
572
|
+
},
|
|
573
|
+
"label": {
|
|
574
|
+
"type": "string"
|
|
575
|
+
}
|
|
576
|
+
},
|
|
577
|
+
"required": [
|
|
578
|
+
"key",
|
|
579
|
+
"label"
|
|
580
|
+
],
|
|
581
|
+
"type": "object"
|
|
582
|
+
},
|
|
583
|
+
"type": "array"
|
|
584
|
+
},
|
|
585
|
+
"type": {
|
|
586
|
+
"description": "text: a JSON string · literal: one JSON value · choice: a JSON string that is the `key` of one of `options`",
|
|
587
|
+
"enum": [
|
|
588
|
+
"text",
|
|
589
|
+
"literal",
|
|
590
|
+
"choice"
|
|
591
|
+
],
|
|
592
|
+
"type": "string"
|
|
593
|
+
},
|
|
594
|
+
"why": {
|
|
595
|
+
"type": "string"
|
|
596
|
+
}
|
|
597
|
+
},
|
|
598
|
+
"required": [
|
|
599
|
+
"key",
|
|
600
|
+
"label",
|
|
601
|
+
"type",
|
|
602
|
+
"why",
|
|
603
|
+
"mandatory"
|
|
604
|
+
],
|
|
605
|
+
"type": "object"
|
|
606
|
+
},
|
|
607
|
+
"type": "array"
|
|
608
|
+
},
|
|
609
|
+
"requested_boundary": {
|
|
610
|
+
"additionalProperties": true,
|
|
611
|
+
"description": "The candidate's requested permits, derived by Check. Requested, never granted",
|
|
612
|
+
"type": [
|
|
613
|
+
"object",
|
|
614
|
+
"null"
|
|
615
|
+
]
|
|
616
|
+
},
|
|
617
|
+
"requested_trigger": {
|
|
618
|
+
"additionalProperties": true,
|
|
619
|
+
"description": "The trigger the request names (kind · source_hint · event_hint · cadence · at · payload_input · status · timezone · missed · overlap · ceiling · cron), stated beside the candidate whose bytes carry no cadence, host or event. A requirement the operator binds through the schedule contract, never a grant or a schedule row. timezone, missed, overlap and ceiling are the answered binding values (null until answered). cron is the exact five-field schedule projection when supported and fully specified, otherwise null; older engines omit it. It never supplies a missing time or timezone.",
|
|
620
|
+
"type": [
|
|
621
|
+
"object",
|
|
622
|
+
"null"
|
|
623
|
+
]
|
|
624
|
+
},
|
|
625
|
+
"status": {
|
|
626
|
+
"description": "Completeness of authoring, never permission to execute",
|
|
627
|
+
"enum": [
|
|
628
|
+
"ready",
|
|
629
|
+
"incomplete",
|
|
630
|
+
"refused"
|
|
631
|
+
],
|
|
632
|
+
"type": "string"
|
|
633
|
+
}
|
|
634
|
+
},
|
|
635
|
+
"required": [
|
|
636
|
+
"compile_version",
|
|
637
|
+
"status",
|
|
638
|
+
"candidate",
|
|
639
|
+
"questions",
|
|
640
|
+
"diagnostics",
|
|
641
|
+
"requested_boundary",
|
|
642
|
+
"requested_trigger",
|
|
643
|
+
"check_preview",
|
|
644
|
+
"provenance"
|
|
645
|
+
],
|
|
646
|
+
"type": "object"
|
|
647
|
+
},
|
|
648
|
+
"CompileRequest": {
|
|
649
|
+
"additionalProperties": false,
|
|
650
|
+
"description": "Generation 1 of the compile request. The encoded body is limited by the listener's configured HTTP body ceiling; no smaller field-size or answer-count quota is imposed. Unknown fields, a present null, duplicate keys (including inside `answers`) and positional arrays are refused. No field names a host path: an EDIT base travels inline in `source`.",
|
|
651
|
+
"properties": {
|
|
652
|
+
"answers": {
|
|
653
|
+
"additionalProperties": true,
|
|
654
|
+
"description": "Question key → one JSON literal with its type preserved, judged exactly as sent within the HTTP body envelope.",
|
|
655
|
+
"type": "object"
|
|
656
|
+
},
|
|
657
|
+
"change": {
|
|
658
|
+
"additionalProperties": false,
|
|
659
|
+
"maxProperties": 1,
|
|
660
|
+
"minProperties": 1,
|
|
661
|
+
"properties": {
|
|
662
|
+
"set_constant": {
|
|
663
|
+
"additionalProperties": false,
|
|
664
|
+
"properties": {
|
|
665
|
+
"name": {
|
|
666
|
+
"description": "Bare constant name, not a path",
|
|
667
|
+
"type": "string"
|
|
668
|
+
},
|
|
669
|
+
"value": {
|
|
670
|
+
"description": "One JSON literal, judged exactly as sent within the HTTP body envelope."
|
|
671
|
+
}
|
|
672
|
+
},
|
|
673
|
+
"required": [
|
|
674
|
+
"name",
|
|
675
|
+
"value"
|
|
676
|
+
],
|
|
677
|
+
"type": "object"
|
|
678
|
+
},
|
|
679
|
+
"text": {
|
|
680
|
+
"description": "`Set const.NAME to JSON_LITERAL`, or `Set const.NAME` answered through `answers`",
|
|
681
|
+
"type": "string"
|
|
682
|
+
}
|
|
683
|
+
},
|
|
684
|
+
"type": "object"
|
|
685
|
+
},
|
|
686
|
+
"cognition": {
|
|
687
|
+
"const": "deterministicOnly",
|
|
688
|
+
"description": "The only authoring cognition of this build. Any other value is refused; no authoring model is contacted",
|
|
689
|
+
"type": "string"
|
|
690
|
+
},
|
|
691
|
+
"compile_version": {
|
|
692
|
+
"const": 1,
|
|
693
|
+
"type": "integer"
|
|
694
|
+
},
|
|
695
|
+
"intent": {
|
|
696
|
+
"type": "string"
|
|
697
|
+
},
|
|
698
|
+
"mode": {
|
|
699
|
+
"description": "create requires `intent` and forbids `source`/`change`; edit requires `source` and `change` and forbids `intent`",
|
|
700
|
+
"enum": [
|
|
701
|
+
"create",
|
|
702
|
+
"edit"
|
|
703
|
+
],
|
|
704
|
+
"type": "string"
|
|
705
|
+
},
|
|
706
|
+
"source": {
|
|
707
|
+
"description": "Accepted `.nika` source, inline. The caller owns source selection, revision checks and materialization",
|
|
708
|
+
"type": "string"
|
|
709
|
+
},
|
|
710
|
+
"workflow_id": {
|
|
711
|
+
"description": "Names a created workflow. On edit the core refuses it as data: an edit cannot rename its accepted base",
|
|
712
|
+
"type": "string"
|
|
713
|
+
}
|
|
714
|
+
},
|
|
715
|
+
"required": [
|
|
716
|
+
"compile_version",
|
|
717
|
+
"mode"
|
|
718
|
+
],
|
|
719
|
+
"type": "object"
|
|
720
|
+
},
|
|
721
|
+
"Error": {
|
|
722
|
+
"additionalProperties": false,
|
|
723
|
+
"properties": {
|
|
724
|
+
"error": {
|
|
725
|
+
"additionalProperties": false,
|
|
726
|
+
"properties": {
|
|
727
|
+
"code": {
|
|
728
|
+
"type": "string"
|
|
729
|
+
},
|
|
730
|
+
"message": {
|
|
731
|
+
"type": "string"
|
|
732
|
+
}
|
|
733
|
+
},
|
|
734
|
+
"required": [
|
|
735
|
+
"code",
|
|
736
|
+
"message"
|
|
737
|
+
],
|
|
738
|
+
"type": "object"
|
|
739
|
+
}
|
|
740
|
+
},
|
|
741
|
+
"required": [
|
|
742
|
+
"error"
|
|
743
|
+
],
|
|
744
|
+
"type": "object"
|
|
745
|
+
},
|
|
746
|
+
"ExecutionSnapshot": {
|
|
747
|
+
"additionalProperties": false,
|
|
748
|
+
"description": "Immutable byte-owned execution world — the body `nika check <file> --json --sdk-snapshot` prints (the engine is the one producer; a client never hashes). Unit bytes are canonical lowercase hexadecimal. `digest` and every unit `digest` are OPTIONAL caller-supplied integrity digests (canonical lowercase SHA-256 · a content assertion, never a signature): absent, the resident computes them and the receipt carries the result; present, they must match the bytes or the request is refused as `snapshot_tampered`. The decoded unit aggregate is limited to 16 MiB and the complete encoded request to 33 MiB. This object is the request body itself, not a path-bearing wrapper.",
|
|
749
|
+
"properties": {
|
|
750
|
+
"digest": {
|
|
751
|
+
"description": "Optional caller-supplied integrity digest of the world (never a signature)",
|
|
752
|
+
"pattern": "^[0-9a-f]{64}$",
|
|
753
|
+
"type": "string"
|
|
754
|
+
},
|
|
755
|
+
"format_version": {
|
|
756
|
+
"const": 1,
|
|
757
|
+
"type": "integer"
|
|
758
|
+
},
|
|
759
|
+
"root": {
|
|
760
|
+
"maxLength": 4096,
|
|
761
|
+
"minLength": 1,
|
|
762
|
+
"type": "string"
|
|
763
|
+
},
|
|
764
|
+
"units": {
|
|
765
|
+
"items": {
|
|
766
|
+
"additionalProperties": false,
|
|
767
|
+
"properties": {
|
|
768
|
+
"bytes_hex": {
|
|
769
|
+
"pattern": "^(?:[0-9a-f]{2})*$",
|
|
770
|
+
"type": "string"
|
|
771
|
+
},
|
|
772
|
+
"digest": {
|
|
773
|
+
"description": "Optional caller-supplied integrity digest of the unit (never a signature)",
|
|
774
|
+
"pattern": "^[0-9a-f]{64}$",
|
|
775
|
+
"type": "string"
|
|
776
|
+
},
|
|
777
|
+
"kind": {
|
|
778
|
+
"description": "0 root (the admitted workflow) · 1 child (a transitively invoked workflow) · 2 skill (an Agent Skill document) · 3 import (an opaque import the caller supplied)",
|
|
779
|
+
"maximum": 3,
|
|
780
|
+
"minimum": 0,
|
|
781
|
+
"type": "integer"
|
|
782
|
+
},
|
|
783
|
+
"path": {
|
|
784
|
+
"maxLength": 4096,
|
|
785
|
+
"minLength": 1,
|
|
786
|
+
"type": "string"
|
|
787
|
+
}
|
|
788
|
+
},
|
|
789
|
+
"required": [
|
|
790
|
+
"path",
|
|
791
|
+
"kind",
|
|
792
|
+
"bytes_hex"
|
|
793
|
+
],
|
|
794
|
+
"type": "object"
|
|
795
|
+
},
|
|
796
|
+
"maxItems": 256,
|
|
797
|
+
"type": "array"
|
|
798
|
+
}
|
|
799
|
+
},
|
|
800
|
+
"required": [
|
|
801
|
+
"format_version",
|
|
802
|
+
"root",
|
|
803
|
+
"units"
|
|
804
|
+
],
|
|
805
|
+
"type": "object"
|
|
806
|
+
},
|
|
807
|
+
"Health": {
|
|
808
|
+
"additionalProperties": false,
|
|
809
|
+
"properties": {
|
|
810
|
+
"api_version": {
|
|
811
|
+
"minLength": 1,
|
|
812
|
+
"type": "string"
|
|
813
|
+
},
|
|
814
|
+
"buildSha": {
|
|
815
|
+
"minLength": 1,
|
|
816
|
+
"type": "string"
|
|
817
|
+
},
|
|
818
|
+
"build_sha": {
|
|
819
|
+
"minLength": 1,
|
|
820
|
+
"type": "string"
|
|
821
|
+
},
|
|
822
|
+
"checkReportVersion": {
|
|
823
|
+
"minimum": 1,
|
|
824
|
+
"type": "integer"
|
|
825
|
+
},
|
|
826
|
+
"engineVersion": {
|
|
827
|
+
"minLength": 1,
|
|
828
|
+
"type": "string"
|
|
829
|
+
},
|
|
830
|
+
"engine_version": {
|
|
831
|
+
"minLength": 1,
|
|
832
|
+
"type": "string"
|
|
833
|
+
},
|
|
834
|
+
"eventFormatVersion": {
|
|
835
|
+
"minimum": 1,
|
|
836
|
+
"type": "integer"
|
|
837
|
+
},
|
|
838
|
+
"machineProtocolVersion": {
|
|
839
|
+
"minimum": 1,
|
|
840
|
+
"type": "integer"
|
|
841
|
+
},
|
|
842
|
+
"service": {
|
|
843
|
+
"const": "nika-serve",
|
|
844
|
+
"type": "string"
|
|
845
|
+
},
|
|
846
|
+
"snapshotFormatVersion": {
|
|
847
|
+
"minimum": 1,
|
|
848
|
+
"type": "integer"
|
|
849
|
+
},
|
|
850
|
+
"specSha": {
|
|
851
|
+
"minLength": 1,
|
|
852
|
+
"type": "string"
|
|
853
|
+
},
|
|
854
|
+
"spec_sha": {
|
|
855
|
+
"minLength": 1,
|
|
856
|
+
"type": "string"
|
|
857
|
+
},
|
|
858
|
+
"status": {
|
|
859
|
+
"const": "ok",
|
|
860
|
+
"type": "string"
|
|
861
|
+
},
|
|
862
|
+
"storeFormatVersion": {
|
|
863
|
+
"additionalProperties": false,
|
|
864
|
+
"description": "Durable store formats this resident reads and writes; independent of the HTTP and event protocol versions.",
|
|
865
|
+
"properties": {
|
|
866
|
+
"jobs": {
|
|
867
|
+
"examples": [
|
|
868
|
+
3
|
|
869
|
+
],
|
|
870
|
+
"minimum": 1,
|
|
871
|
+
"type": "integer"
|
|
872
|
+
},
|
|
873
|
+
"schedules": {
|
|
874
|
+
"examples": [
|
|
875
|
+
1
|
|
876
|
+
],
|
|
877
|
+
"minimum": 1,
|
|
878
|
+
"type": "integer"
|
|
879
|
+
}
|
|
880
|
+
},
|
|
881
|
+
"required": [
|
|
882
|
+
"jobs",
|
|
883
|
+
"schedules"
|
|
884
|
+
],
|
|
885
|
+
"type": "object"
|
|
886
|
+
},
|
|
887
|
+
"supportedCapabilities": {
|
|
888
|
+
"items": {
|
|
889
|
+
"type": "string"
|
|
890
|
+
},
|
|
891
|
+
"type": "array",
|
|
892
|
+
"uniqueItems": true
|
|
893
|
+
},
|
|
894
|
+
"traceFormatVersion": {
|
|
895
|
+
"minimum": 1,
|
|
896
|
+
"type": "integer"
|
|
897
|
+
}
|
|
898
|
+
},
|
|
899
|
+
"required": [
|
|
900
|
+
"status",
|
|
901
|
+
"service",
|
|
902
|
+
"engine_version",
|
|
903
|
+
"build_sha",
|
|
904
|
+
"spec_sha",
|
|
905
|
+
"api_version",
|
|
906
|
+
"engineVersion",
|
|
907
|
+
"buildSha",
|
|
908
|
+
"specSha",
|
|
909
|
+
"machineProtocolVersion",
|
|
910
|
+
"snapshotFormatVersion",
|
|
911
|
+
"checkReportVersion",
|
|
912
|
+
"eventFormatVersion",
|
|
913
|
+
"traceFormatVersion",
|
|
914
|
+
"storeFormatVersion",
|
|
915
|
+
"supportedCapabilities"
|
|
916
|
+
],
|
|
917
|
+
"type": "object"
|
|
918
|
+
},
|
|
919
|
+
"Job": {
|
|
920
|
+
"additionalProperties": false,
|
|
921
|
+
"properties": {
|
|
922
|
+
"error": {
|
|
923
|
+
"additionalProperties": false,
|
|
924
|
+
"properties": {
|
|
925
|
+
"code": {
|
|
926
|
+
"type": "string"
|
|
927
|
+
},
|
|
928
|
+
"message": {
|
|
929
|
+
"type": "string"
|
|
930
|
+
}
|
|
931
|
+
},
|
|
932
|
+
"required": [
|
|
933
|
+
"code",
|
|
934
|
+
"message"
|
|
935
|
+
],
|
|
936
|
+
"type": "object"
|
|
937
|
+
},
|
|
938
|
+
"evidence": {
|
|
939
|
+
"$ref": "#/components/schemas/JournalEvidence"
|
|
940
|
+
},
|
|
941
|
+
"execution_id": {
|
|
942
|
+
"type": "string"
|
|
943
|
+
},
|
|
944
|
+
"id": {
|
|
945
|
+
"format": "uuid",
|
|
946
|
+
"type": "string"
|
|
947
|
+
},
|
|
948
|
+
"outputs": {
|
|
949
|
+
"additionalProperties": true,
|
|
950
|
+
"description": "Declared workflow outputs; present only after settlement when supplied by the execution adapter",
|
|
951
|
+
"type": "object"
|
|
952
|
+
},
|
|
953
|
+
"receipt": {
|
|
954
|
+
"$ref": "#/components/schemas/JobReceipt"
|
|
955
|
+
},
|
|
956
|
+
"settlement": {
|
|
957
|
+
"$ref": "#/components/schemas/RunSettlement"
|
|
958
|
+
},
|
|
959
|
+
"status": {
|
|
960
|
+
"$ref": "#/components/schemas/JobStatus"
|
|
961
|
+
},
|
|
962
|
+
"trace_id": {
|
|
963
|
+
"type": "string"
|
|
964
|
+
}
|
|
965
|
+
},
|
|
966
|
+
"required": [
|
|
967
|
+
"id",
|
|
968
|
+
"status"
|
|
969
|
+
],
|
|
970
|
+
"type": "object"
|
|
971
|
+
},
|
|
972
|
+
"JobByName": {
|
|
973
|
+
"additionalProperties": false,
|
|
974
|
+
"description": "The by-name form (ADR-131): a workflow the served registry lists (GET /v1/workflows · project-root-relative, `.nika`). The resident captures its world exactly as a schedule does — the one owner of the snapshot and its digest domain. Idempotency binds to these request bytes. Optional `access` is the same pin as CLI `--access` (a pin is a pin). Absent: the resident's unpinned plan. Snapshot bodies reject both access and inputs overlays, including null or empty maps. Optional inputs are literal JSON values checked against declared keys, types and required values before a job exists; strings are never CLI @env instructions or expressions.",
|
|
975
|
+
"properties": {
|
|
976
|
+
"access": {
|
|
977
|
+
"description": "Access pin, same vocabulary as `--access` (class or harness id). A pin never silently substitutes a metered seat.",
|
|
978
|
+
"maxLength": 64,
|
|
979
|
+
"minLength": 1,
|
|
980
|
+
"type": "string"
|
|
981
|
+
},
|
|
982
|
+
"inputs": {
|
|
983
|
+
"additionalProperties": true,
|
|
984
|
+
"description": "Literal JSON overrides for declared workflow inputs. Unknown keys, wrong types and missing required values refuse with 422; defaults remain authored. A present null is refused. Inputs bind exact request identity and survive durable queue recovery; workflow bytes are unchanged.",
|
|
985
|
+
"type": "object"
|
|
986
|
+
},
|
|
987
|
+
"workflow": {
|
|
988
|
+
"maxLength": 4096,
|
|
989
|
+
"minLength": 1,
|
|
990
|
+
"type": "string"
|
|
991
|
+
}
|
|
992
|
+
},
|
|
993
|
+
"required": [
|
|
994
|
+
"workflow"
|
|
995
|
+
],
|
|
996
|
+
"type": "object"
|
|
997
|
+
},
|
|
998
|
+
"JobEvent": {
|
|
999
|
+
"additionalProperties": false,
|
|
1000
|
+
"properties": {
|
|
1001
|
+
"at": {
|
|
1002
|
+
"description": "When the resident admitted the event (RFC 3339 · UTC). Outside the event's hash chain; absent on an event written before the journal was dated.",
|
|
1003
|
+
"format": "date-time",
|
|
1004
|
+
"type": "string"
|
|
1005
|
+
},
|
|
1006
|
+
"code": {
|
|
1007
|
+
"type": "string"
|
|
1008
|
+
},
|
|
1009
|
+
"evidence": {
|
|
1010
|
+
"$ref": "#/components/schemas/JournalEvidence"
|
|
1011
|
+
},
|
|
1012
|
+
"kind": {
|
|
1013
|
+
"anyOf": [
|
|
1014
|
+
{
|
|
1015
|
+
"enum": [
|
|
1016
|
+
"execution.queued",
|
|
1017
|
+
"execution.started",
|
|
1018
|
+
"execution.prepared",
|
|
1019
|
+
"execution.requeued",
|
|
1020
|
+
"execution.settled",
|
|
1021
|
+
"execution.cancelled",
|
|
1022
|
+
"execution.interrupted",
|
|
1023
|
+
"execution.refused",
|
|
1024
|
+
"execution.aborted_before_claim",
|
|
1025
|
+
"approval_decided"
|
|
1026
|
+
],
|
|
1027
|
+
"type": "string"
|
|
1028
|
+
},
|
|
1029
|
+
{
|
|
1030
|
+
"type": "null"
|
|
1031
|
+
}
|
|
1032
|
+
],
|
|
1033
|
+
"description": "The resident's event vocabulary: execution.<word> (queued · started · prepared · requeued · settled · cancelled · interrupted · refused · aborted_before_claim), plus the approval_decided frame the journal admits. Null on a payload that carries no kind."
|
|
1034
|
+
},
|
|
1035
|
+
"message": {
|
|
1036
|
+
"type": "string"
|
|
1037
|
+
},
|
|
1038
|
+
"outputs": {
|
|
1039
|
+
"additionalProperties": true,
|
|
1040
|
+
"type": "object"
|
|
1041
|
+
},
|
|
1042
|
+
"receipt": {
|
|
1043
|
+
"$ref": "#/components/schemas/JobReceipt"
|
|
1044
|
+
},
|
|
1045
|
+
"sequence": {
|
|
1046
|
+
"minimum": 1,
|
|
1047
|
+
"type": "integer"
|
|
1048
|
+
},
|
|
1049
|
+
"settlement": {
|
|
1050
|
+
"$ref": "#/components/schemas/RunSettlement"
|
|
1051
|
+
},
|
|
1052
|
+
"status": {
|
|
1053
|
+
"anyOf": [
|
|
1054
|
+
{
|
|
1055
|
+
"$ref": "#/components/schemas/JobStatus"
|
|
1056
|
+
},
|
|
1057
|
+
{
|
|
1058
|
+
"type": "null"
|
|
1059
|
+
}
|
|
1060
|
+
]
|
|
1061
|
+
}
|
|
1062
|
+
},
|
|
1063
|
+
"required": [
|
|
1064
|
+
"sequence",
|
|
1065
|
+
"kind",
|
|
1066
|
+
"status"
|
|
1067
|
+
],
|
|
1068
|
+
"type": "object"
|
|
1069
|
+
},
|
|
1070
|
+
"JobOrigin": {
|
|
1071
|
+
"oneOf": [
|
|
1072
|
+
{
|
|
1073
|
+
"additionalProperties": false,
|
|
1074
|
+
"properties": {
|
|
1075
|
+
"kind": {
|
|
1076
|
+
"const": "manual",
|
|
1077
|
+
"type": "string"
|
|
1078
|
+
}
|
|
1079
|
+
},
|
|
1080
|
+
"required": [
|
|
1081
|
+
"kind"
|
|
1082
|
+
],
|
|
1083
|
+
"type": "object"
|
|
1084
|
+
},
|
|
1085
|
+
{
|
|
1086
|
+
"additionalProperties": false,
|
|
1087
|
+
"dependentRequired": {
|
|
1088
|
+
"missed_count": [
|
|
1089
|
+
"missed_first"
|
|
1090
|
+
],
|
|
1091
|
+
"missed_first": [
|
|
1092
|
+
"missed_count"
|
|
1093
|
+
]
|
|
1094
|
+
},
|
|
1095
|
+
"properties": {
|
|
1096
|
+
"arm_generation": {
|
|
1097
|
+
"pattern": "^[0-9a-f]{64}$",
|
|
1098
|
+
"type": "string"
|
|
1099
|
+
},
|
|
1100
|
+
"decision": {
|
|
1101
|
+
"enum": [
|
|
1102
|
+
"scheduled",
|
|
1103
|
+
"catch_up"
|
|
1104
|
+
],
|
|
1105
|
+
"type": "string"
|
|
1106
|
+
},
|
|
1107
|
+
"fired_at": {
|
|
1108
|
+
"format": "date-time",
|
|
1109
|
+
"type": "string"
|
|
1110
|
+
},
|
|
1111
|
+
"kind": {
|
|
1112
|
+
"const": "schedule",
|
|
1113
|
+
"type": "string"
|
|
1114
|
+
},
|
|
1115
|
+
"missed_count": {
|
|
1116
|
+
"description": "How many slots that silence holds",
|
|
1117
|
+
"minimum": 1,
|
|
1118
|
+
"type": "integer"
|
|
1119
|
+
},
|
|
1120
|
+
"missed_first": {
|
|
1121
|
+
"description": "First slot of the silence a catch-up-once run answers for, on a catch_up firing only; scheduled_for is its last slot",
|
|
1122
|
+
"format": "date-time",
|
|
1123
|
+
"type": "string"
|
|
1124
|
+
},
|
|
1125
|
+
"schedule_id": {
|
|
1126
|
+
"description": "Origin-local identifier, bounded to 255 UTF-8 bytes by the server",
|
|
1127
|
+
"maxLength": 255,
|
|
1128
|
+
"minLength": 1,
|
|
1129
|
+
"type": "string"
|
|
1130
|
+
},
|
|
1131
|
+
"schedule_origin": {
|
|
1132
|
+
"enum": [
|
|
1133
|
+
"project",
|
|
1134
|
+
"api"
|
|
1135
|
+
],
|
|
1136
|
+
"type": "string"
|
|
1137
|
+
},
|
|
1138
|
+
"schedule_revision": {
|
|
1139
|
+
"pattern": "^sha256:[0-9a-f]{64}$",
|
|
1140
|
+
"type": "string"
|
|
1141
|
+
},
|
|
1142
|
+
"scheduled_for": {
|
|
1143
|
+
"format": "date-time",
|
|
1144
|
+
"type": "string"
|
|
1145
|
+
},
|
|
1146
|
+
"slot_id": {
|
|
1147
|
+
"pattern": "^[0-9a-f]{64}$",
|
|
1148
|
+
"type": "string"
|
|
1149
|
+
}
|
|
1150
|
+
},
|
|
1151
|
+
"required": [
|
|
1152
|
+
"kind",
|
|
1153
|
+
"schedule_origin",
|
|
1154
|
+
"schedule_id",
|
|
1155
|
+
"schedule_revision",
|
|
1156
|
+
"slot_id",
|
|
1157
|
+
"decision",
|
|
1158
|
+
"scheduled_for",
|
|
1159
|
+
"fired_at",
|
|
1160
|
+
"arm_generation"
|
|
1161
|
+
],
|
|
1162
|
+
"type": "object"
|
|
1163
|
+
}
|
|
1164
|
+
]
|
|
1165
|
+
},
|
|
1166
|
+
"JobReceipt": {
|
|
1167
|
+
"additionalProperties": false,
|
|
1168
|
+
"description": "Terminal binding to the exact immutable admitted execution",
|
|
1169
|
+
"properties": {
|
|
1170
|
+
"chain_head": {
|
|
1171
|
+
"minLength": 1,
|
|
1172
|
+
"type": "string"
|
|
1173
|
+
},
|
|
1174
|
+
"execution_id": {
|
|
1175
|
+
"minLength": 1,
|
|
1176
|
+
"type": "string"
|
|
1177
|
+
},
|
|
1178
|
+
"job_id": {
|
|
1179
|
+
"format": "uuid",
|
|
1180
|
+
"type": "string"
|
|
1181
|
+
},
|
|
1182
|
+
"origin": {
|
|
1183
|
+
"$ref": "#/components/schemas/JobOrigin"
|
|
1184
|
+
},
|
|
1185
|
+
"snapshot_digest": {
|
|
1186
|
+
"pattern": "^[0-9a-f]{64}$",
|
|
1187
|
+
"type": "string"
|
|
1188
|
+
},
|
|
1189
|
+
"trace_id": {
|
|
1190
|
+
"minLength": 1,
|
|
1191
|
+
"type": "string"
|
|
1192
|
+
}
|
|
1193
|
+
},
|
|
1194
|
+
"required": [
|
|
1195
|
+
"job_id",
|
|
1196
|
+
"execution_id",
|
|
1197
|
+
"trace_id",
|
|
1198
|
+
"snapshot_digest"
|
|
1199
|
+
],
|
|
1200
|
+
"type": "object"
|
|
1201
|
+
},
|
|
1202
|
+
"JobStatus": {
|
|
1203
|
+
"description": "queued and running: the resident owns the execution. interrupted: execution ownership was lost and effect settlement is unknown — an EVIDENCE state (the journal is INCOMPLETE), never a run state (ADR-129). paused, succeeded, failed and cancelled: the run's own settlement, the words its terminal frame carries (ADR-128).",
|
|
1204
|
+
"enum": [
|
|
1205
|
+
"queued",
|
|
1206
|
+
"running",
|
|
1207
|
+
"interrupted",
|
|
1208
|
+
"paused",
|
|
1209
|
+
"succeeded",
|
|
1210
|
+
"failed",
|
|
1211
|
+
"cancelled"
|
|
1212
|
+
],
|
|
1213
|
+
"type": "string"
|
|
1214
|
+
},
|
|
1215
|
+
"JobStatusOnly": {
|
|
1216
|
+
"additionalProperties": false,
|
|
1217
|
+
"description": "Status only. Redacted diagnosis lives on GET /v1/jobs/{id} and SSE, never here.",
|
|
1218
|
+
"properties": {
|
|
1219
|
+
"status": {
|
|
1220
|
+
"$ref": "#/components/schemas/JobStatus"
|
|
1221
|
+
}
|
|
1222
|
+
},
|
|
1223
|
+
"required": [
|
|
1224
|
+
"status"
|
|
1225
|
+
],
|
|
1226
|
+
"type": "object"
|
|
1227
|
+
},
|
|
1228
|
+
"JournalEvidence": {
|
|
1229
|
+
"additionalProperties": false,
|
|
1230
|
+
"description": "Reported journal delivery loss, independent of execution status. The reason classifies the mirror's first error without exposing OS text or paths. Absence is not a claim that a journal exists.",
|
|
1231
|
+
"properties": {
|
|
1232
|
+
"reason": {
|
|
1233
|
+
"enum": [
|
|
1234
|
+
"write_failed",
|
|
1235
|
+
"record_refused"
|
|
1236
|
+
],
|
|
1237
|
+
"type": "string"
|
|
1238
|
+
},
|
|
1239
|
+
"status": {
|
|
1240
|
+
"const": "mirror_lost",
|
|
1241
|
+
"type": "string"
|
|
1242
|
+
}
|
|
1243
|
+
},
|
|
1244
|
+
"required": [
|
|
1245
|
+
"status",
|
|
1246
|
+
"reason"
|
|
1247
|
+
],
|
|
1248
|
+
"type": "object"
|
|
1249
|
+
},
|
|
1250
|
+
"RunSettlement": {
|
|
1251
|
+
"additionalProperties": false,
|
|
1252
|
+
"description": "The run's settlement (ADR-128), built once by the runtime and projected whole: the state word every door speaks, why, the elapsed time on the kernel clock, the task tally, the spend with its qualifier, the failure named. Unknown cost is never zero: `total_cost_usd` is absent when nothing was metered. Present on the terminal event and durable job response of a job whose runtime settled; absent when the resident lost the execution (interrupted) or refused it before any task. Reattachment and idempotent admission replay project the same hash-bound terminal event, never a new settlement.",
|
|
1253
|
+
"properties": {
|
|
1254
|
+
"cause": {
|
|
1255
|
+
"enum": [
|
|
1256
|
+
"normal",
|
|
1257
|
+
"human_gate",
|
|
1258
|
+
"task_failed",
|
|
1259
|
+
"output_contract",
|
|
1260
|
+
"budget",
|
|
1261
|
+
"operator",
|
|
1262
|
+
"refused"
|
|
1263
|
+
],
|
|
1264
|
+
"type": "string"
|
|
1265
|
+
},
|
|
1266
|
+
"elapsed_ms": {
|
|
1267
|
+
"minimum": 0,
|
|
1268
|
+
"type": "integer"
|
|
1269
|
+
},
|
|
1270
|
+
"error": {
|
|
1271
|
+
"additionalProperties": false,
|
|
1272
|
+
"properties": {
|
|
1273
|
+
"code": {
|
|
1274
|
+
"type": "string"
|
|
1275
|
+
},
|
|
1276
|
+
"message": {
|
|
1277
|
+
"type": "string"
|
|
1278
|
+
},
|
|
1279
|
+
"task": {
|
|
1280
|
+
"description": "The task that failed · absent for a run-level cause",
|
|
1281
|
+
"type": "string"
|
|
1282
|
+
}
|
|
1283
|
+
},
|
|
1284
|
+
"required": [
|
|
1285
|
+
"code",
|
|
1286
|
+
"message"
|
|
1287
|
+
],
|
|
1288
|
+
"type": "object"
|
|
1289
|
+
},
|
|
1290
|
+
"spend": {
|
|
1291
|
+
"additionalProperties": false,
|
|
1292
|
+
"properties": {
|
|
1293
|
+
"by_source": {
|
|
1294
|
+
"additionalProperties": {
|
|
1295
|
+
"type": "number"
|
|
1296
|
+
},
|
|
1297
|
+
"type": "object"
|
|
1298
|
+
},
|
|
1299
|
+
"priced_calls": {
|
|
1300
|
+
"minimum": 0,
|
|
1301
|
+
"type": "integer"
|
|
1302
|
+
},
|
|
1303
|
+
"pricing_as_of": {
|
|
1304
|
+
"type": "string"
|
|
1305
|
+
},
|
|
1306
|
+
"qualifier": {
|
|
1307
|
+
"enum": [
|
|
1308
|
+
"priced",
|
|
1309
|
+
"partially_priced",
|
|
1310
|
+
"unpriced",
|
|
1311
|
+
"unmetered"
|
|
1312
|
+
],
|
|
1313
|
+
"type": "string"
|
|
1314
|
+
},
|
|
1315
|
+
"total_cost_usd": {
|
|
1316
|
+
"description": "Present only when at least one leaf metered real spend",
|
|
1317
|
+
"minimum": 0,
|
|
1318
|
+
"type": "number"
|
|
1319
|
+
},
|
|
1320
|
+
"unpriced_calls": {
|
|
1321
|
+
"minimum": 0,
|
|
1322
|
+
"type": "integer"
|
|
1323
|
+
}
|
|
1324
|
+
},
|
|
1325
|
+
"required": [
|
|
1326
|
+
"priced_calls",
|
|
1327
|
+
"unpriced_calls",
|
|
1328
|
+
"qualifier"
|
|
1329
|
+
],
|
|
1330
|
+
"type": "object"
|
|
1331
|
+
},
|
|
1332
|
+
"status": {
|
|
1333
|
+
"enum": [
|
|
1334
|
+
"succeeded",
|
|
1335
|
+
"failed",
|
|
1336
|
+
"paused",
|
|
1337
|
+
"cancelled"
|
|
1338
|
+
],
|
|
1339
|
+
"type": "string"
|
|
1340
|
+
},
|
|
1341
|
+
"stopped_calls": {
|
|
1342
|
+
"description": "Every MCP call the run stopped waiting for, on every path (a task's timeout, an operator Stop, a task that continued or recovered after it): the task, the tool as the workflow names it, the call's id, and whether the call left. `unknown`: the call reached the server, which may have acted, so an effect's outcome is unknown; `not_sent`: it was stopped before it was sent. Absent when the run stopped no MCP call.",
|
|
1343
|
+
"items": {
|
|
1344
|
+
"additionalProperties": false,
|
|
1345
|
+
"properties": {
|
|
1346
|
+
"call_id": {
|
|
1347
|
+
"type": "string"
|
|
1348
|
+
},
|
|
1349
|
+
"outcome": {
|
|
1350
|
+
"enum": [
|
|
1351
|
+
"unknown",
|
|
1352
|
+
"not_sent"
|
|
1353
|
+
],
|
|
1354
|
+
"type": "string"
|
|
1355
|
+
},
|
|
1356
|
+
"task": {
|
|
1357
|
+
"type": "string"
|
|
1358
|
+
},
|
|
1359
|
+
"tool": {
|
|
1360
|
+
"description": "`mcp:<server>/<tool>`",
|
|
1361
|
+
"type": "string"
|
|
1362
|
+
}
|
|
1363
|
+
},
|
|
1364
|
+
"required": [
|
|
1365
|
+
"task",
|
|
1366
|
+
"tool",
|
|
1367
|
+
"call_id",
|
|
1368
|
+
"outcome"
|
|
1369
|
+
],
|
|
1370
|
+
"type": "object"
|
|
1371
|
+
},
|
|
1372
|
+
"minItems": 1,
|
|
1373
|
+
"type": "array"
|
|
1374
|
+
},
|
|
1375
|
+
"tasks": {
|
|
1376
|
+
"additionalProperties": false,
|
|
1377
|
+
"properties": {
|
|
1378
|
+
"cancelled": {
|
|
1379
|
+
"minimum": 0,
|
|
1380
|
+
"type": "integer"
|
|
1381
|
+
},
|
|
1382
|
+
"failed": {
|
|
1383
|
+
"minimum": 0,
|
|
1384
|
+
"type": "integer"
|
|
1385
|
+
},
|
|
1386
|
+
"never_started": {
|
|
1387
|
+
"description": "Cancelled at the boundary without ever starting (counted in `cancelled` too)",
|
|
1388
|
+
"minimum": 0,
|
|
1389
|
+
"type": "integer"
|
|
1390
|
+
},
|
|
1391
|
+
"ok": {
|
|
1392
|
+
"description": "A recovered task IS a success (counted here too)",
|
|
1393
|
+
"minimum": 0,
|
|
1394
|
+
"type": "integer"
|
|
1395
|
+
},
|
|
1396
|
+
"recovered": {
|
|
1397
|
+
"minimum": 0,
|
|
1398
|
+
"type": "integer"
|
|
1399
|
+
},
|
|
1400
|
+
"skipped": {
|
|
1401
|
+
"minimum": 0,
|
|
1402
|
+
"type": "integer"
|
|
1403
|
+
},
|
|
1404
|
+
"total": {
|
|
1405
|
+
"minimum": 0,
|
|
1406
|
+
"type": "integer"
|
|
1407
|
+
}
|
|
1408
|
+
},
|
|
1409
|
+
"required": [
|
|
1410
|
+
"total",
|
|
1411
|
+
"ok",
|
|
1412
|
+
"failed",
|
|
1413
|
+
"recovered",
|
|
1414
|
+
"skipped",
|
|
1415
|
+
"cancelled",
|
|
1416
|
+
"never_started"
|
|
1417
|
+
],
|
|
1418
|
+
"type": "object"
|
|
1419
|
+
}
|
|
1420
|
+
},
|
|
1421
|
+
"required": [
|
|
1422
|
+
"status",
|
|
1423
|
+
"cause",
|
|
1424
|
+
"spend"
|
|
1425
|
+
],
|
|
1426
|
+
"type": "object"
|
|
1427
|
+
},
|
|
1428
|
+
"ScheduleApply": {
|
|
1429
|
+
"additionalProperties": false,
|
|
1430
|
+
"properties": {
|
|
1431
|
+
"applied": {
|
|
1432
|
+
"const": true,
|
|
1433
|
+
"type": "boolean"
|
|
1434
|
+
},
|
|
1435
|
+
"changed": {
|
|
1436
|
+
"type": "boolean"
|
|
1437
|
+
},
|
|
1438
|
+
"status": {
|
|
1439
|
+
"$ref": "#/components/schemas/ScheduleStatus"
|
|
1440
|
+
}
|
|
1441
|
+
},
|
|
1442
|
+
"required": [
|
|
1443
|
+
"applied",
|
|
1444
|
+
"changed",
|
|
1445
|
+
"status"
|
|
1446
|
+
],
|
|
1447
|
+
"type": "object"
|
|
1448
|
+
},
|
|
1449
|
+
"ScheduleFindings": {
|
|
1450
|
+
"additionalProperties": false,
|
|
1451
|
+
"properties": {
|
|
1452
|
+
"findings": {
|
|
1453
|
+
"items": {
|
|
1454
|
+
"additionalProperties": false,
|
|
1455
|
+
"properties": {
|
|
1456
|
+
"code": {
|
|
1457
|
+
"minLength": 1,
|
|
1458
|
+
"type": "string"
|
|
1459
|
+
},
|
|
1460
|
+
"detail": {
|
|
1461
|
+
"type": "string"
|
|
1462
|
+
}
|
|
1463
|
+
},
|
|
1464
|
+
"required": [
|
|
1465
|
+
"code",
|
|
1466
|
+
"detail"
|
|
1467
|
+
],
|
|
1468
|
+
"type": "object"
|
|
1469
|
+
},
|
|
1470
|
+
"minItems": 1,
|
|
1471
|
+
"type": "array"
|
|
1472
|
+
}
|
|
1473
|
+
},
|
|
1474
|
+
"required": [
|
|
1475
|
+
"findings"
|
|
1476
|
+
],
|
|
1477
|
+
"type": "object"
|
|
1478
|
+
},
|
|
1479
|
+
"SchedulePreconditionFailed": {
|
|
1480
|
+
"additionalProperties": false,
|
|
1481
|
+
"properties": {
|
|
1482
|
+
"error": {
|
|
1483
|
+
"additionalProperties": false,
|
|
1484
|
+
"properties": {
|
|
1485
|
+
"code": {
|
|
1486
|
+
"const": "schedule_precondition_failed",
|
|
1487
|
+
"type": "string"
|
|
1488
|
+
},
|
|
1489
|
+
"currentRevision": {
|
|
1490
|
+
"anyOf": [
|
|
1491
|
+
{
|
|
1492
|
+
"pattern": "^sha256:[0-9a-f]{64}$",
|
|
1493
|
+
"type": "string"
|
|
1494
|
+
},
|
|
1495
|
+
{
|
|
1496
|
+
"type": "null"
|
|
1497
|
+
}
|
|
1498
|
+
]
|
|
1499
|
+
},
|
|
1500
|
+
"message": {
|
|
1501
|
+
"type": "string"
|
|
1502
|
+
}
|
|
1503
|
+
},
|
|
1504
|
+
"required": [
|
|
1505
|
+
"code",
|
|
1506
|
+
"message",
|
|
1507
|
+
"currentRevision"
|
|
1508
|
+
],
|
|
1509
|
+
"type": "object"
|
|
1510
|
+
}
|
|
1511
|
+
},
|
|
1512
|
+
"required": [
|
|
1513
|
+
"error"
|
|
1514
|
+
],
|
|
1515
|
+
"type": "object"
|
|
1516
|
+
},
|
|
1517
|
+
"SchedulePut": {
|
|
1518
|
+
"additionalProperties": false,
|
|
1519
|
+
"properties": {
|
|
1520
|
+
"active": {
|
|
1521
|
+
"type": "boolean"
|
|
1522
|
+
},
|
|
1523
|
+
"afterSkip": {
|
|
1524
|
+
"enum": [
|
|
1525
|
+
"next_slot",
|
|
1526
|
+
"on_completion"
|
|
1527
|
+
],
|
|
1528
|
+
"type": "string"
|
|
1529
|
+
},
|
|
1530
|
+
"inputs": {
|
|
1531
|
+
"additionalProperties": {
|
|
1532
|
+
"oneOf": [
|
|
1533
|
+
{
|
|
1534
|
+
"type": "string"
|
|
1535
|
+
},
|
|
1536
|
+
{
|
|
1537
|
+
"type": "number"
|
|
1538
|
+
},
|
|
1539
|
+
{
|
|
1540
|
+
"type": "boolean"
|
|
1541
|
+
}
|
|
1542
|
+
]
|
|
1543
|
+
},
|
|
1544
|
+
"description": "Per-fire inputs bound on every resident fire (#1370): one scalar per key the workflow declares under `inputs:`, coerced by the declared type exactly as the CLI `--var` edge does, then judged by the same literal admission validator as POST /v1/jobs. Unknown keys, values the declared type refuses, missing required inputs and the `@env:` channel are refused at PUT and again at fire.",
|
|
1545
|
+
"type": "object"
|
|
1546
|
+
},
|
|
1547
|
+
"jitter": {
|
|
1548
|
+
"enum": [
|
|
1549
|
+
"hash"
|
|
1550
|
+
],
|
|
1551
|
+
"type": "string"
|
|
1552
|
+
},
|
|
1553
|
+
"maxCostUsd": {
|
|
1554
|
+
"exclusiveMinimum": 0,
|
|
1555
|
+
"type": "number"
|
|
1556
|
+
},
|
|
1557
|
+
"maxLatenessSeconds": {
|
|
1558
|
+
"minimum": 0,
|
|
1559
|
+
"type": "integer"
|
|
1560
|
+
},
|
|
1561
|
+
"missed": {
|
|
1562
|
+
"enum": [
|
|
1563
|
+
"catch-up",
|
|
1564
|
+
"catch-up-once",
|
|
1565
|
+
"skip"
|
|
1566
|
+
],
|
|
1567
|
+
"type": "string"
|
|
1568
|
+
},
|
|
1569
|
+
"overlap": {
|
|
1570
|
+
"enum": [
|
|
1571
|
+
"skip",
|
|
1572
|
+
"queue",
|
|
1573
|
+
"replace"
|
|
1574
|
+
],
|
|
1575
|
+
"type": "string"
|
|
1576
|
+
},
|
|
1577
|
+
"pauseReason": {
|
|
1578
|
+
"maxLength": 1024,
|
|
1579
|
+
"type": "string"
|
|
1580
|
+
},
|
|
1581
|
+
"pauseUntil": {
|
|
1582
|
+
"format": "date",
|
|
1583
|
+
"type": "string"
|
|
1584
|
+
},
|
|
1585
|
+
"tolerance": {
|
|
1586
|
+
"type": "string"
|
|
1587
|
+
},
|
|
1588
|
+
"when": {
|
|
1589
|
+
"oneOf": [
|
|
1590
|
+
{
|
|
1591
|
+
"additionalProperties": false,
|
|
1592
|
+
"properties": {
|
|
1593
|
+
"at": {
|
|
1594
|
+
"format": "date-time",
|
|
1595
|
+
"type": "string"
|
|
1596
|
+
},
|
|
1597
|
+
"kind": {
|
|
1598
|
+
"const": "once"
|
|
1599
|
+
}
|
|
1600
|
+
},
|
|
1601
|
+
"required": [
|
|
1602
|
+
"kind",
|
|
1603
|
+
"at"
|
|
1604
|
+
],
|
|
1605
|
+
"type": "object"
|
|
1606
|
+
},
|
|
1607
|
+
{
|
|
1608
|
+
"additionalProperties": false,
|
|
1609
|
+
"properties": {
|
|
1610
|
+
"expression": {
|
|
1611
|
+
"maxLength": 4096,
|
|
1612
|
+
"type": "string"
|
|
1613
|
+
},
|
|
1614
|
+
"kind": {
|
|
1615
|
+
"const": "cadence"
|
|
1616
|
+
}
|
|
1617
|
+
},
|
|
1618
|
+
"required": [
|
|
1619
|
+
"kind",
|
|
1620
|
+
"expression"
|
|
1621
|
+
],
|
|
1622
|
+
"type": "object"
|
|
1623
|
+
}
|
|
1624
|
+
]
|
|
1625
|
+
},
|
|
1626
|
+
"workflow": {
|
|
1627
|
+
"maxLength": 1024,
|
|
1628
|
+
"pattern": "^[^/].*\\.nika$",
|
|
1629
|
+
"type": "string"
|
|
1630
|
+
}
|
|
1631
|
+
},
|
|
1632
|
+
"required": [
|
|
1633
|
+
"workflow",
|
|
1634
|
+
"when",
|
|
1635
|
+
"maxCostUsd",
|
|
1636
|
+
"missed"
|
|
1637
|
+
],
|
|
1638
|
+
"type": "object"
|
|
1639
|
+
},
|
|
1640
|
+
"ScheduleStatus": {
|
|
1641
|
+
"additionalProperties": true,
|
|
1642
|
+
"description": "Normalized definition, origin, distinct schedule revision, active/pause state, due verdict, bounded next slots with shift evidence, earliest wake hint, and last durable decision.",
|
|
1643
|
+
"type": "object"
|
|
1644
|
+
},
|
|
1645
|
+
"SnapshotValidationAck": {
|
|
1646
|
+
"additionalProperties": false,
|
|
1647
|
+
"description": "Compact remote acknowledgement that the exact snapshot was revalidated. This is not the engine's public full check report; SDK callers retain the engine-owned report captured with the snapshot and return it only after this acknowledgement succeeds.",
|
|
1648
|
+
"properties": {
|
|
1649
|
+
"root": {
|
|
1650
|
+
"minLength": 1,
|
|
1651
|
+
"type": "string"
|
|
1652
|
+
},
|
|
1653
|
+
"snapshot_digest": {
|
|
1654
|
+
"pattern": "^[0-9a-f]{64}$",
|
|
1655
|
+
"type": "string"
|
|
1656
|
+
},
|
|
1657
|
+
"status": {
|
|
1658
|
+
"const": "accepted",
|
|
1659
|
+
"type": "string"
|
|
1660
|
+
},
|
|
1661
|
+
"units": {
|
|
1662
|
+
"minimum": 1,
|
|
1663
|
+
"type": "integer"
|
|
1664
|
+
}
|
|
1665
|
+
},
|
|
1666
|
+
"required": [
|
|
1667
|
+
"status",
|
|
1668
|
+
"snapshot_digest",
|
|
1669
|
+
"root",
|
|
1670
|
+
"units"
|
|
1671
|
+
],
|
|
1672
|
+
"type": "object"
|
|
1673
|
+
},
|
|
1674
|
+
"TraceVerification": {
|
|
1675
|
+
"additionalProperties": false,
|
|
1676
|
+
"description": "Run-scoped verdict on the journal the resident wrote for the job, through the ONE verifier `nika trace verify --json` runs. `verdict` is the CLI's headline word: the attained tier (ok · sealed · anchored · replayed), incomplete for a journal with no terminal frame (the writer's liveness rides `reason`), tampered for a buried seal, broken for an edited chain, and the CLI's refusal classes; `unavailable` only when no journal exists for the job (refused before its first event · queued · a backend keeping none). `reason` is the machine class beside it (the seal tier under a ladder verdict). The CLI's own document rides verbatim (exit · chain · seal · anchor · replay · lines); a filesystem path is never returned.",
|
|
1677
|
+
"properties": {
|
|
1678
|
+
"anchor": {
|
|
1679
|
+
"additionalProperties": true,
|
|
1680
|
+
"type": "object"
|
|
1681
|
+
},
|
|
1682
|
+
"chain": {
|
|
1683
|
+
"additionalProperties": true,
|
|
1684
|
+
"description": "events · head · headline (intact · torn · incomplete) · liveness (alive · dead · unknown · null)",
|
|
1685
|
+
"type": "object"
|
|
1686
|
+
},
|
|
1687
|
+
"exit": {
|
|
1688
|
+
"description": "The CLI's exit class: 0 the reported tier holds · 2 a forged or edited journal · 3 the environment (unchained · unreadable · a missing input) · 5 incomplete lifecycle evidence",
|
|
1689
|
+
"enum": [
|
|
1690
|
+
0,
|
|
1691
|
+
2,
|
|
1692
|
+
3,
|
|
1693
|
+
5
|
|
1694
|
+
],
|
|
1695
|
+
"type": "integer"
|
|
1696
|
+
},
|
|
1697
|
+
"lines": {
|
|
1698
|
+
"description": "The CLI's ladder lines, the journal path replaced by <journal>",
|
|
1699
|
+
"items": {
|
|
1700
|
+
"type": "string"
|
|
1701
|
+
},
|
|
1702
|
+
"type": "array"
|
|
1703
|
+
},
|
|
1704
|
+
"reason": {
|
|
1705
|
+
"enum": [
|
|
1706
|
+
"run_not_terminal",
|
|
1707
|
+
"trace_journal_unavailable",
|
|
1708
|
+
"sealed",
|
|
1709
|
+
"unsealed",
|
|
1710
|
+
"forged",
|
|
1711
|
+
"buried",
|
|
1712
|
+
"unattributable",
|
|
1713
|
+
"writer_alive",
|
|
1714
|
+
"writer_dead",
|
|
1715
|
+
"writer_unknown",
|
|
1716
|
+
"buried_seal",
|
|
1717
|
+
"broken",
|
|
1718
|
+
"unchained",
|
|
1719
|
+
"empty",
|
|
1720
|
+
"unreadable",
|
|
1721
|
+
"refused",
|
|
1722
|
+
"line_over_long",
|
|
1723
|
+
"unknown"
|
|
1724
|
+
],
|
|
1725
|
+
"type": "string"
|
|
1726
|
+
},
|
|
1727
|
+
"replay": {
|
|
1728
|
+
"additionalProperties": true,
|
|
1729
|
+
"type": "object"
|
|
1730
|
+
},
|
|
1731
|
+
"seal": {
|
|
1732
|
+
"additionalProperties": true,
|
|
1733
|
+
"description": "tier (unsealed · sealed · forged · buried · unattributable) and the tier's facts",
|
|
1734
|
+
"type": "object"
|
|
1735
|
+
},
|
|
1736
|
+
"tier": {
|
|
1737
|
+
"description": "The CLI's own `tier`, verbatim: the attained tier over an intact chain, or its refusal class. `verdict` is its projection; a forged seal still reads `ok` here with `exit` 2, so read `exit` and the legs, not a word alone.",
|
|
1738
|
+
"enum": [
|
|
1739
|
+
"ok",
|
|
1740
|
+
"sealed",
|
|
1741
|
+
"anchored",
|
|
1742
|
+
"replayed",
|
|
1743
|
+
"broken",
|
|
1744
|
+
"line-over-long",
|
|
1745
|
+
"unchained",
|
|
1746
|
+
"empty",
|
|
1747
|
+
"unreadable",
|
|
1748
|
+
"refused",
|
|
1749
|
+
"buried-seal",
|
|
1750
|
+
"unknown"
|
|
1751
|
+
],
|
|
1752
|
+
"type": "string"
|
|
1753
|
+
},
|
|
1754
|
+
"trace_id": {
|
|
1755
|
+
"minLength": 1,
|
|
1756
|
+
"type": "string"
|
|
1757
|
+
},
|
|
1758
|
+
"verdict": {
|
|
1759
|
+
"enum": [
|
|
1760
|
+
"unavailable",
|
|
1761
|
+
"ok",
|
|
1762
|
+
"sealed",
|
|
1763
|
+
"anchored",
|
|
1764
|
+
"replayed",
|
|
1765
|
+
"incomplete",
|
|
1766
|
+
"tampered",
|
|
1767
|
+
"broken",
|
|
1768
|
+
"unchained",
|
|
1769
|
+
"empty",
|
|
1770
|
+
"unreadable",
|
|
1771
|
+
"refused",
|
|
1772
|
+
"line-over-long",
|
|
1773
|
+
"unknown"
|
|
1774
|
+
],
|
|
1775
|
+
"type": "string"
|
|
1776
|
+
},
|
|
1777
|
+
"verify_version": {
|
|
1778
|
+
"minimum": 1,
|
|
1779
|
+
"type": "integer"
|
|
1780
|
+
}
|
|
1781
|
+
},
|
|
1782
|
+
"required": [
|
|
1783
|
+
"verdict",
|
|
1784
|
+
"reason"
|
|
1785
|
+
],
|
|
1786
|
+
"type": "object"
|
|
1787
|
+
},
|
|
1788
|
+
"WorkflowList": {
|
|
1789
|
+
"additionalProperties": false,
|
|
1790
|
+
"properties": {
|
|
1791
|
+
"workflows": {
|
|
1792
|
+
"items": {
|
|
1793
|
+
"minLength": 1,
|
|
1794
|
+
"type": "string"
|
|
1795
|
+
},
|
|
1796
|
+
"type": "array"
|
|
1797
|
+
}
|
|
1798
|
+
},
|
|
1799
|
+
"required": [
|
|
1800
|
+
"workflows"
|
|
1801
|
+
],
|
|
1802
|
+
"type": "object"
|
|
1803
|
+
},
|
|
1804
|
+
"WorkflowMetadata": {
|
|
1805
|
+
"additionalProperties": false,
|
|
1806
|
+
"properties": {
|
|
1807
|
+
"workflow": {
|
|
1808
|
+
"minLength": 1,
|
|
1809
|
+
"type": "string"
|
|
1810
|
+
}
|
|
1811
|
+
},
|
|
1812
|
+
"required": [
|
|
1813
|
+
"workflow"
|
|
1814
|
+
],
|
|
1815
|
+
"type": "object"
|
|
1816
|
+
}
|
|
1817
|
+
},
|
|
1818
|
+
"securitySchemes": {
|
|
1819
|
+
"bearerAuth": {
|
|
1820
|
+
"description": "Exactly one Authorization: Bearer value from the token file",
|
|
1821
|
+
"scheme": "bearer",
|
|
1822
|
+
"type": "http"
|
|
1823
|
+
}
|
|
1824
|
+
}
|
|
1825
|
+
},
|
|
1826
|
+
"info": {
|
|
1827
|
+
"description": "Authenticated loopback remote execution, declarative schedules, verified downloads of the artifacts a settled job's sealed journal records, and stateless source-only authoring (POST /v1/compile never runs, admits or writes). Schedule list/delete/trigger/backfill, /v1/arm, and POST /v1/run are absent.",
|
|
1828
|
+
"title": "nika serve",
|
|
1829
|
+
"version": "0.124.5"
|
|
1830
|
+
},
|
|
1831
|
+
"openapi": "3.1.0",
|
|
1832
|
+
"paths": {
|
|
1833
|
+
"/health": {
|
|
1834
|
+
"get": {
|
|
1835
|
+
"responses": {
|
|
1836
|
+
"200": {
|
|
1837
|
+
"content": {
|
|
1838
|
+
"application/json": {
|
|
1839
|
+
"schema": {
|
|
1840
|
+
"$ref": "#/components/schemas/Health"
|
|
1841
|
+
}
|
|
1842
|
+
}
|
|
1843
|
+
},
|
|
1844
|
+
"description": "Engine identity only"
|
|
1845
|
+
}
|
|
1846
|
+
},
|
|
1847
|
+
"security": [],
|
|
1848
|
+
"summary": "Public process liveness"
|
|
1849
|
+
}
|
|
1850
|
+
},
|
|
1851
|
+
"/v1/access-offers/{name}": {
|
|
1852
|
+
"get": {
|
|
1853
|
+
"description": "Reads, without a prompt, what the sessions of the served workflow's own `run.access` route list for its models: the models, the reasoning efforts and the service tiers. The route and the models are the file's: a request names a served workflow and nothing else. Each session is opened as a run opens it and ended before any prompt. A row is an observation with a time, kept 60 s (15 s when unavailable) and served again meanwhile; one reading runs at a time. An offer authorizes nothing: POST /v1/jobs still selects, reads back and refuses on its own session. `{name}` is sent as for GET /v1/workflows/{name}. Advertised by `accessSessionOffer` on /health; an engine without the token answers 404.",
|
|
1854
|
+
"parameters": [
|
|
1855
|
+
{
|
|
1856
|
+
"description": "The served name, `/` separators sent literally (it spans several path segments)",
|
|
1857
|
+
"in": "path",
|
|
1858
|
+
"name": "name",
|
|
1859
|
+
"required": true,
|
|
1860
|
+
"schema": {
|
|
1861
|
+
"minLength": 1,
|
|
1862
|
+
"pattern": "^[A-Za-z0-9._-]+(/[A-Za-z0-9._-]+)*\\.nika$",
|
|
1863
|
+
"type": "string"
|
|
1864
|
+
}
|
|
1865
|
+
}
|
|
1866
|
+
],
|
|
1867
|
+
"responses": {
|
|
1868
|
+
"200": {
|
|
1869
|
+
"content": {
|
|
1870
|
+
"application/json": {
|
|
1871
|
+
"schema": {
|
|
1872
|
+
"$ref": "#/components/schemas/AccessOffer"
|
|
1873
|
+
}
|
|
1874
|
+
}
|
|
1875
|
+
},
|
|
1876
|
+
"description": "The offer document, also when the file selects no ACP sessions (status not_applicable) or a session gave no offer (a row with status unavailable)"
|
|
1877
|
+
},
|
|
1878
|
+
"401": {
|
|
1879
|
+
"content": {
|
|
1880
|
+
"application/json": {
|
|
1881
|
+
"schema": {
|
|
1882
|
+
"$ref": "#/components/schemas/Error"
|
|
1883
|
+
}
|
|
1884
|
+
}
|
|
1885
|
+
},
|
|
1886
|
+
"description": "Error envelope"
|
|
1887
|
+
},
|
|
1888
|
+
"404": {
|
|
1889
|
+
"content": {
|
|
1890
|
+
"application/json": {
|
|
1891
|
+
"schema": {
|
|
1892
|
+
"$ref": "#/components/schemas/Error"
|
|
1893
|
+
}
|
|
1894
|
+
}
|
|
1895
|
+
},
|
|
1896
|
+
"description": "Error envelope"
|
|
1897
|
+
},
|
|
1898
|
+
"408": {
|
|
1899
|
+
"content": {
|
|
1900
|
+
"application/json": {
|
|
1901
|
+
"schema": {
|
|
1902
|
+
"$ref": "#/components/schemas/Error"
|
|
1903
|
+
}
|
|
1904
|
+
}
|
|
1905
|
+
},
|
|
1906
|
+
"description": "Error envelope"
|
|
1907
|
+
},
|
|
1908
|
+
"422": {
|
|
1909
|
+
"content": {
|
|
1910
|
+
"application/json": {
|
|
1911
|
+
"schema": {
|
|
1912
|
+
"$ref": "#/components/schemas/Error"
|
|
1913
|
+
}
|
|
1914
|
+
}
|
|
1915
|
+
},
|
|
1916
|
+
"description": "Error envelope"
|
|
1917
|
+
},
|
|
1918
|
+
"503": {
|
|
1919
|
+
"content": {
|
|
1920
|
+
"application/json": {
|
|
1921
|
+
"schema": {
|
|
1922
|
+
"$ref": "#/components/schemas/Error"
|
|
1923
|
+
}
|
|
1924
|
+
}
|
|
1925
|
+
},
|
|
1926
|
+
"description": "Error envelope"
|
|
1927
|
+
}
|
|
1928
|
+
},
|
|
1929
|
+
"summary": "What the sessions of a workflow's declared ACP route offer now"
|
|
1930
|
+
}
|
|
1931
|
+
},
|
|
1932
|
+
"/v1/check": {
|
|
1933
|
+
"post": {
|
|
1934
|
+
"description": "Runs the same admission as POST /v1/jobs (ADR-131 · both forms) over the exact request body, and creates nothing.",
|
|
1935
|
+
"requestBody": {
|
|
1936
|
+
"content": {
|
|
1937
|
+
"application/json": {
|
|
1938
|
+
"schema": {
|
|
1939
|
+
"oneOf": [
|
|
1940
|
+
{
|
|
1941
|
+
"$ref": "#/components/schemas/CheckByName"
|
|
1942
|
+
},
|
|
1943
|
+
{
|
|
1944
|
+
"$ref": "#/components/schemas/ExecutionSnapshot"
|
|
1945
|
+
}
|
|
1946
|
+
]
|
|
1947
|
+
}
|
|
1948
|
+
}
|
|
1949
|
+
},
|
|
1950
|
+
"required": true
|
|
1951
|
+
},
|
|
1952
|
+
"responses": {
|
|
1953
|
+
"200": {
|
|
1954
|
+
"content": {
|
|
1955
|
+
"application/json": {
|
|
1956
|
+
"schema": {
|
|
1957
|
+
"$ref": "#/components/schemas/SnapshotValidationAck"
|
|
1958
|
+
}
|
|
1959
|
+
}
|
|
1960
|
+
},
|
|
1961
|
+
"description": "Compact snapshot validation acknowledgement, not the full engine check report"
|
|
1962
|
+
},
|
|
1963
|
+
"401": {
|
|
1964
|
+
"content": {
|
|
1965
|
+
"application/json": {
|
|
1966
|
+
"schema": {
|
|
1967
|
+
"$ref": "#/components/schemas/Error"
|
|
1968
|
+
}
|
|
1969
|
+
}
|
|
1970
|
+
},
|
|
1971
|
+
"description": "Error envelope"
|
|
1972
|
+
},
|
|
1973
|
+
"404": {
|
|
1974
|
+
"content": {
|
|
1975
|
+
"application/json": {
|
|
1976
|
+
"schema": {
|
|
1977
|
+
"$ref": "#/components/schemas/Error"
|
|
1978
|
+
}
|
|
1979
|
+
}
|
|
1980
|
+
},
|
|
1981
|
+
"description": "No workflow by that name under the served registry (by-name form)"
|
|
1982
|
+
},
|
|
1983
|
+
"408": {
|
|
1984
|
+
"content": {
|
|
1985
|
+
"application/json": {
|
|
1986
|
+
"schema": {
|
|
1987
|
+
"$ref": "#/components/schemas/Error"
|
|
1988
|
+
}
|
|
1989
|
+
}
|
|
1990
|
+
},
|
|
1991
|
+
"description": "Request deadline"
|
|
1992
|
+
},
|
|
1993
|
+
"413": {
|
|
1994
|
+
"content": {
|
|
1995
|
+
"application/json": {
|
|
1996
|
+
"schema": {
|
|
1997
|
+
"$ref": "#/components/schemas/Error"
|
|
1998
|
+
}
|
|
1999
|
+
}
|
|
2000
|
+
},
|
|
2001
|
+
"description": "Encoded body or decoded snapshot resource limit"
|
|
2002
|
+
},
|
|
2003
|
+
"415": {
|
|
2004
|
+
"content": {
|
|
2005
|
+
"application/json": {
|
|
2006
|
+
"schema": {
|
|
2007
|
+
"$ref": "#/components/schemas/Error"
|
|
2008
|
+
}
|
|
2009
|
+
}
|
|
2010
|
+
},
|
|
2011
|
+
"description": "Content-Type or Content-Encoding refused"
|
|
2012
|
+
},
|
|
2013
|
+
"422": {
|
|
2014
|
+
"content": {
|
|
2015
|
+
"application/json": {
|
|
2016
|
+
"schema": {
|
|
2017
|
+
"$ref": "#/components/schemas/Error"
|
|
2018
|
+
}
|
|
2019
|
+
}
|
|
2020
|
+
},
|
|
2021
|
+
"description": "Malformed, unsupported, tampered, or semantically refused snapshot"
|
|
2022
|
+
}
|
|
2023
|
+
},
|
|
2024
|
+
"summary": "Judge a workflow without creating a job — by served name, or as immutable snapshot bytes"
|
|
2025
|
+
}
|
|
2026
|
+
},
|
|
2027
|
+
"/v1/compile": {
|
|
2028
|
+
"post": {
|
|
2029
|
+
"description": "The HTTP transport of the same Compile core as `nika compile`. Foundation scope: CREATE resolves an exact embedded skeleton name (or `hello`), EDIT changes one existing constant, answers are explicit JSON literals; any other intent is answered `incomplete` with no substitute workflow. Creates no job, run, approval or trace, writes no file, contacts no provider: ambient keys are never consent. `check_preview` is a REVIEW of the source only, never admission: POST /v1/jobs judges a candidate again. Questions carry stable keys; answering is a new request, not a session.",
|
|
2030
|
+
"requestBody": {
|
|
2031
|
+
"content": {
|
|
2032
|
+
"application/json": {
|
|
2033
|
+
"schema": {
|
|
2034
|
+
"$ref": "#/components/schemas/CompileRequest"
|
|
2035
|
+
}
|
|
2036
|
+
}
|
|
2037
|
+
},
|
|
2038
|
+
"required": true
|
|
2039
|
+
},
|
|
2040
|
+
"responses": {
|
|
2041
|
+
"200": {
|
|
2042
|
+
"content": {
|
|
2043
|
+
"application/json": {
|
|
2044
|
+
"schema": {
|
|
2045
|
+
"$ref": "#/components/schemas/CompileOutcome"
|
|
2046
|
+
}
|
|
2047
|
+
}
|
|
2048
|
+
},
|
|
2049
|
+
"description": "Authoring outcome — ready, incomplete and refused are all data"
|
|
2050
|
+
},
|
|
2051
|
+
"401": {
|
|
2052
|
+
"content": {
|
|
2053
|
+
"application/json": {
|
|
2054
|
+
"schema": {
|
|
2055
|
+
"$ref": "#/components/schemas/Error"
|
|
2056
|
+
}
|
|
2057
|
+
}
|
|
2058
|
+
},
|
|
2059
|
+
"description": "Error envelope"
|
|
2060
|
+
},
|
|
2061
|
+
"408": {
|
|
2062
|
+
"content": {
|
|
2063
|
+
"application/json": {
|
|
2064
|
+
"schema": {
|
|
2065
|
+
"$ref": "#/components/schemas/Error"
|
|
2066
|
+
}
|
|
2067
|
+
}
|
|
2068
|
+
},
|
|
2069
|
+
"description": "Request deadline"
|
|
2070
|
+
},
|
|
2071
|
+
"413": {
|
|
2072
|
+
"content": {
|
|
2073
|
+
"application/json": {
|
|
2074
|
+
"schema": {
|
|
2075
|
+
"$ref": "#/components/schemas/Error"
|
|
2076
|
+
}
|
|
2077
|
+
}
|
|
2078
|
+
},
|
|
2079
|
+
"description": "Encoded body above the compile ceiling"
|
|
2080
|
+
},
|
|
2081
|
+
"415": {
|
|
2082
|
+
"content": {
|
|
2083
|
+
"application/json": {
|
|
2084
|
+
"schema": {
|
|
2085
|
+
"$ref": "#/components/schemas/Error"
|
|
2086
|
+
}
|
|
2087
|
+
}
|
|
2088
|
+
},
|
|
2089
|
+
"description": "Content-Type or Content-Encoding refused"
|
|
2090
|
+
},
|
|
2091
|
+
"422": {
|
|
2092
|
+
"content": {
|
|
2093
|
+
"application/json": {
|
|
2094
|
+
"schema": {
|
|
2095
|
+
"$ref": "#/components/schemas/Error"
|
|
2096
|
+
}
|
|
2097
|
+
}
|
|
2098
|
+
},
|
|
2099
|
+
"description": "malformed_compile_request · compile_version_unsupported · compile_mode_unsupported · compile_cognition_unsupported · compile_limit"
|
|
2100
|
+
},
|
|
2101
|
+
"500": {
|
|
2102
|
+
"content": {
|
|
2103
|
+
"application/json": {
|
|
2104
|
+
"schema": {
|
|
2105
|
+
"$ref": "#/components/schemas/Error"
|
|
2106
|
+
}
|
|
2107
|
+
}
|
|
2108
|
+
},
|
|
2109
|
+
"description": "Compiler machinery failure; nothing is echoed"
|
|
2110
|
+
},
|
|
2111
|
+
"503": {
|
|
2112
|
+
"content": {
|
|
2113
|
+
"application/json": {
|
|
2114
|
+
"schema": {
|
|
2115
|
+
"$ref": "#/components/schemas/Error"
|
|
2116
|
+
}
|
|
2117
|
+
}
|
|
2118
|
+
},
|
|
2119
|
+
"description": "compile_busy — every compile slot is in use"
|
|
2120
|
+
}
|
|
2121
|
+
},
|
|
2122
|
+
"summary": "Author a candidate workflow without running it (stateless · source-only)"
|
|
2123
|
+
}
|
|
2124
|
+
},
|
|
2125
|
+
"/v1/jobs": {
|
|
2126
|
+
"post": {
|
|
2127
|
+
"description": "Two forms, one admission (ADR-131). `{\"workflow\": \"<name>\"}` names a workflow the served registry lists: the resident captures its world through ExecutionService, exactly as a schedule does. Optional `access` on that form is CLI `--access` for this job only. A snapshot body is the world `nika check <file> --json --sdk-snapshot` prints, decoded and readmitted through the same ExecutionService; its digests are optional caller-supplied integrity digests (a content assertion, never a signature). Snapshot jobs inherit the resident's unpinned plan. The server never interprets a caller filesystem path. Idempotency binds to the exact request bytes.",
|
|
2128
|
+
"parameters": [
|
|
2129
|
+
{
|
|
2130
|
+
"$ref": "#/components/parameters/IdempotencyKey"
|
|
2131
|
+
}
|
|
2132
|
+
],
|
|
2133
|
+
"requestBody": {
|
|
2134
|
+
"content": {
|
|
2135
|
+
"application/json": {
|
|
2136
|
+
"schema": {
|
|
2137
|
+
"oneOf": [
|
|
2138
|
+
{
|
|
2139
|
+
"$ref": "#/components/schemas/JobByName"
|
|
2140
|
+
},
|
|
2141
|
+
{
|
|
2142
|
+
"$ref": "#/components/schemas/ExecutionSnapshot"
|
|
2143
|
+
}
|
|
2144
|
+
]
|
|
2145
|
+
}
|
|
2146
|
+
}
|
|
2147
|
+
},
|
|
2148
|
+
"required": true
|
|
2149
|
+
},
|
|
2150
|
+
"responses": {
|
|
2151
|
+
"200": {
|
|
2152
|
+
"content": {
|
|
2153
|
+
"application/json": {
|
|
2154
|
+
"schema": {
|
|
2155
|
+
"$ref": "#/components/schemas/Job"
|
|
2156
|
+
}
|
|
2157
|
+
}
|
|
2158
|
+
},
|
|
2159
|
+
"description": "Idempotent replay"
|
|
2160
|
+
},
|
|
2161
|
+
"202": {
|
|
2162
|
+
"content": {
|
|
2163
|
+
"application/json": {
|
|
2164
|
+
"schema": {
|
|
2165
|
+
"$ref": "#/components/schemas/Job"
|
|
2166
|
+
}
|
|
2167
|
+
}
|
|
2168
|
+
},
|
|
2169
|
+
"description": "Created"
|
|
2170
|
+
},
|
|
2171
|
+
"400": {
|
|
2172
|
+
"content": {
|
|
2173
|
+
"application/json": {
|
|
2174
|
+
"schema": {
|
|
2175
|
+
"$ref": "#/components/schemas/Error"
|
|
2176
|
+
}
|
|
2177
|
+
}
|
|
2178
|
+
},
|
|
2179
|
+
"description": "Invalid idempotency key"
|
|
2180
|
+
},
|
|
2181
|
+
"401": {
|
|
2182
|
+
"content": {
|
|
2183
|
+
"application/json": {
|
|
2184
|
+
"schema": {
|
|
2185
|
+
"$ref": "#/components/schemas/Error"
|
|
2186
|
+
}
|
|
2187
|
+
}
|
|
2188
|
+
},
|
|
2189
|
+
"description": "Error envelope"
|
|
2190
|
+
},
|
|
2191
|
+
"404": {
|
|
2192
|
+
"content": {
|
|
2193
|
+
"application/json": {
|
|
2194
|
+
"schema": {
|
|
2195
|
+
"$ref": "#/components/schemas/Error"
|
|
2196
|
+
}
|
|
2197
|
+
}
|
|
2198
|
+
},
|
|
2199
|
+
"description": "No workflow by that name under the served registry (by-name form)"
|
|
2200
|
+
},
|
|
2201
|
+
"408": {
|
|
2202
|
+
"content": {
|
|
2203
|
+
"application/json": {
|
|
2204
|
+
"schema": {
|
|
2205
|
+
"$ref": "#/components/schemas/Error"
|
|
2206
|
+
}
|
|
2207
|
+
}
|
|
2208
|
+
},
|
|
2209
|
+
"description": "Request deadline"
|
|
2210
|
+
},
|
|
2211
|
+
"409": {
|
|
2212
|
+
"content": {
|
|
2213
|
+
"application/json": {
|
|
2214
|
+
"schema": {
|
|
2215
|
+
"$ref": "#/components/schemas/Error"
|
|
2216
|
+
}
|
|
2217
|
+
}
|
|
2218
|
+
},
|
|
2219
|
+
"description": "Idempotency key already bound to another request"
|
|
2220
|
+
},
|
|
2221
|
+
"413": {
|
|
2222
|
+
"content": {
|
|
2223
|
+
"application/json": {
|
|
2224
|
+
"schema": {
|
|
2225
|
+
"$ref": "#/components/schemas/Error"
|
|
2226
|
+
}
|
|
2227
|
+
}
|
|
2228
|
+
},
|
|
2229
|
+
"description": "Encoded body or decoded snapshot resource limit"
|
|
2230
|
+
},
|
|
2231
|
+
"415": {
|
|
2232
|
+
"content": {
|
|
2233
|
+
"application/json": {
|
|
2234
|
+
"schema": {
|
|
2235
|
+
"$ref": "#/components/schemas/Error"
|
|
2236
|
+
}
|
|
2237
|
+
}
|
|
2238
|
+
},
|
|
2239
|
+
"description": "Content-Type or Content-Encoding refused"
|
|
2240
|
+
},
|
|
2241
|
+
"422": {
|
|
2242
|
+
"content": {
|
|
2243
|
+
"application/json": {
|
|
2244
|
+
"schema": {
|
|
2245
|
+
"$ref": "#/components/schemas/Error"
|
|
2246
|
+
}
|
|
2247
|
+
}
|
|
2248
|
+
},
|
|
2249
|
+
"description": "Malformed, unsupported, tampered, or semantically refused snapshot"
|
|
2250
|
+
},
|
|
2251
|
+
"503": {
|
|
2252
|
+
"content": {
|
|
2253
|
+
"application/json": {
|
|
2254
|
+
"schema": {
|
|
2255
|
+
"$ref": "#/components/schemas/Error"
|
|
2256
|
+
}
|
|
2257
|
+
}
|
|
2258
|
+
},
|
|
2259
|
+
"description": "Execution queue or durable store unavailable"
|
|
2260
|
+
},
|
|
2261
|
+
"507": {
|
|
2262
|
+
"content": {
|
|
2263
|
+
"application/json": {
|
|
2264
|
+
"schema": {
|
|
2265
|
+
"$ref": "#/components/schemas/Error"
|
|
2266
|
+
}
|
|
2267
|
+
}
|
|
2268
|
+
},
|
|
2269
|
+
"description": "Durable job capacity exhausted"
|
|
2270
|
+
}
|
|
2271
|
+
},
|
|
2272
|
+
"summary": "Admit a workflow as a durable job — by served name, or as immutable snapshot bytes"
|
|
2273
|
+
}
|
|
2274
|
+
},
|
|
2275
|
+
"/v1/jobs/{id}": {
|
|
2276
|
+
"get": {
|
|
2277
|
+
"parameters": [
|
|
2278
|
+
{
|
|
2279
|
+
"in": "path",
|
|
2280
|
+
"name": "id",
|
|
2281
|
+
"required": true,
|
|
2282
|
+
"schema": {
|
|
2283
|
+
"format": "uuid",
|
|
2284
|
+
"type": "string"
|
|
2285
|
+
}
|
|
2286
|
+
}
|
|
2287
|
+
],
|
|
2288
|
+
"responses": {
|
|
2289
|
+
"200": {
|
|
2290
|
+
"content": {
|
|
2291
|
+
"application/json": {
|
|
2292
|
+
"schema": {
|
|
2293
|
+
"$ref": "#/components/schemas/Job"
|
|
2294
|
+
}
|
|
2295
|
+
}
|
|
2296
|
+
},
|
|
2297
|
+
"description": "Job"
|
|
2298
|
+
},
|
|
2299
|
+
"401": {
|
|
2300
|
+
"content": {
|
|
2301
|
+
"application/json": {
|
|
2302
|
+
"schema": {
|
|
2303
|
+
"$ref": "#/components/schemas/Error"
|
|
2304
|
+
}
|
|
2305
|
+
}
|
|
2306
|
+
},
|
|
2307
|
+
"description": "Error envelope"
|
|
2308
|
+
},
|
|
2309
|
+
"404": {
|
|
2310
|
+
"content": {
|
|
2311
|
+
"application/json": {
|
|
2312
|
+
"schema": {
|
|
2313
|
+
"$ref": "#/components/schemas/Error"
|
|
2314
|
+
}
|
|
2315
|
+
}
|
|
2316
|
+
},
|
|
2317
|
+
"description": "Error envelope"
|
|
2318
|
+
}
|
|
2319
|
+
},
|
|
2320
|
+
"summary": "Job identity and status"
|
|
2321
|
+
}
|
|
2322
|
+
},
|
|
2323
|
+
"/v1/jobs/{id}/artifacts": {
|
|
2324
|
+
"get": {
|
|
2325
|
+
"description": "Answers only for a settled job (succeeded, failed, cancelled, interrupted); an interrupted run never sealed its journal, so its job answers 409 `artifact_journal_unavailable`. The manifest is read from the journal the job's receipt names, judged by the one verifier `nika trace verify` runs: the chain must be intact, the seal must verify against a run key that verifier weighs on the server, in the order the server signs (the public half of an explicit `NIKA_RUN_KEY_FILE` · `NIKA_RUN_PUB_FILE` pair, `~/.nika/keys/run-signing.pub`, the retired-key ledger), and the head must be the receipt's `chain_head`. Each entry is one journal event that records a written byte stream with its SHA-256: a file a builtin saved (`nika:chart`, `nika:image_generate`, `nika:tts_generate`, `nika:image_fx`, `nika:image_compose`) at a relative path inside the project and outside its `.nika` (refused by name in any ASCII case, and by device and inode under any other spelling the filesystem folds onto it), its last write winning, or an image an agent's harness sent, kept under `.nika/blobs`. `nika:write` and `nika:edit` journal no hash of what they wrote, so their files are not listed. Every size and digest is the journal's; the download route checks the bytes against them. No filesystem path of the server is exposed.",
|
|
2326
|
+
"parameters": [
|
|
2327
|
+
{
|
|
2328
|
+
"in": "path",
|
|
2329
|
+
"name": "id",
|
|
2330
|
+
"required": true,
|
|
2331
|
+
"schema": {
|
|
2332
|
+
"format": "uuid",
|
|
2333
|
+
"type": "string"
|
|
2334
|
+
}
|
|
2335
|
+
}
|
|
2336
|
+
],
|
|
2337
|
+
"responses": {
|
|
2338
|
+
"200": {
|
|
2339
|
+
"content": {
|
|
2340
|
+
"application/json": {
|
|
2341
|
+
"schema": {
|
|
2342
|
+
"$ref": "#/components/schemas/ArtifactManifest"
|
|
2343
|
+
}
|
|
2344
|
+
}
|
|
2345
|
+
},
|
|
2346
|
+
"description": "The manifest, bound to the job's receipt"
|
|
2347
|
+
},
|
|
2348
|
+
"401": {
|
|
2349
|
+
"content": {
|
|
2350
|
+
"application/json": {
|
|
2351
|
+
"schema": {
|
|
2352
|
+
"$ref": "#/components/schemas/Error"
|
|
2353
|
+
}
|
|
2354
|
+
}
|
|
2355
|
+
},
|
|
2356
|
+
"description": "Error envelope"
|
|
2357
|
+
},
|
|
2358
|
+
"404": {
|
|
2359
|
+
"content": {
|
|
2360
|
+
"application/json": {
|
|
2361
|
+
"schema": {
|
|
2362
|
+
"$ref": "#/components/schemas/Error"
|
|
2363
|
+
}
|
|
2364
|
+
}
|
|
2365
|
+
},
|
|
2366
|
+
"description": "`job_not_found`: unknown or foreign job id"
|
|
2367
|
+
},
|
|
2368
|
+
"408": {
|
|
2369
|
+
"content": {
|
|
2370
|
+
"application/json": {
|
|
2371
|
+
"schema": {
|
|
2372
|
+
"$ref": "#/components/schemas/Error"
|
|
2373
|
+
}
|
|
2374
|
+
}
|
|
2375
|
+
},
|
|
2376
|
+
"description": "Request deadline"
|
|
2377
|
+
},
|
|
2378
|
+
"409": {
|
|
2379
|
+
"content": {
|
|
2380
|
+
"application/json": {
|
|
2381
|
+
"schema": {
|
|
2382
|
+
"$ref": "#/components/schemas/Error"
|
|
2383
|
+
}
|
|
2384
|
+
}
|
|
2385
|
+
},
|
|
2386
|
+
"description": "`job_not_settled`: queued, running or paused · `artifact_journal_unavailable`: no receipt chain head, or no journal by the job's identity · `artifact_journal_unverified`: the journal is not sealed and intact with the receipt's head"
|
|
2387
|
+
},
|
|
2388
|
+
"500": {
|
|
2389
|
+
"content": {
|
|
2390
|
+
"application/json": {
|
|
2391
|
+
"schema": {
|
|
2392
|
+
"$ref": "#/components/schemas/Error"
|
|
2393
|
+
}
|
|
2394
|
+
}
|
|
2395
|
+
},
|
|
2396
|
+
"description": "`internal_error`: the server could not read the journal"
|
|
2397
|
+
},
|
|
2398
|
+
"503": {
|
|
2399
|
+
"content": {
|
|
2400
|
+
"application/json": {
|
|
2401
|
+
"schema": {
|
|
2402
|
+
"$ref": "#/components/schemas/Error"
|
|
2403
|
+
}
|
|
2404
|
+
}
|
|
2405
|
+
},
|
|
2406
|
+
"description": "`store_busy`: durable job state unavailable · `artifact_capacity`: every artifact slot is busy"
|
|
2407
|
+
}
|
|
2408
|
+
},
|
|
2409
|
+
"summary": "The artifacts a settled job's sealed journal records"
|
|
2410
|
+
}
|
|
2411
|
+
},
|
|
2412
|
+
"/v1/jobs/{id}/artifacts/{name}": {
|
|
2413
|
+
"get": {
|
|
2414
|
+
"description": "`{name}` is an entry's `name` from GET /v1/jobs/{id}/artifacts, never a filesystem path. Every name contains `/` (`file/out/report.pdf`, `agent_image/1.png`): send it with its `/` literal or percent-encoded (`%2F`), as one path parameter. The rest of the path is percent-decoded once and matched exactly against the manifest's names; an escape that is not two hexadecimal digits, bytes that are not UTF-8 or NUL match no entry. The server opens the recorded place below the project root it holds, refusing a symbolic link at any component, and reads every byte against the recorded size and SHA-256 before the response starts (409 `artifact_changed` on a mismatch), keeping the SHA-256 of each 256 KiB chunk. While the bytes stream, each chunk is read again and sent only if it hashes to the digest kept for it: every byte that leaves is a byte of the recorded file, and a file changed during the stream ends it before its `Content-Length`. A stream also ends short when the server stops or cannot read the file: retry a short body, and a file that really changed then answers 409 `artifact_changed`. The bound is `max_artifact_bytes`; a larger artifact stays listed and is refused 403. At most 4 journal verifications and pre-download hash passes run at once (`artifact_capacity` otherwise); a stream holds no slot once its bytes start, is bounded by the connection limit, and is not bounded by the request deadline.",
|
|
2415
|
+
"parameters": [
|
|
2416
|
+
{
|
|
2417
|
+
"in": "path",
|
|
2418
|
+
"name": "id",
|
|
2419
|
+
"required": true,
|
|
2420
|
+
"schema": {
|
|
2421
|
+
"format": "uuid",
|
|
2422
|
+
"type": "string"
|
|
2423
|
+
}
|
|
2424
|
+
},
|
|
2425
|
+
{
|
|
2426
|
+
"description": "An entry's manifest `name`; its `/` may be sent literally or as `%2F` (decoded once, matched exactly)",
|
|
2427
|
+
"in": "path",
|
|
2428
|
+
"name": "name",
|
|
2429
|
+
"required": true,
|
|
2430
|
+
"schema": {
|
|
2431
|
+
"minLength": 1,
|
|
2432
|
+
"type": "string"
|
|
2433
|
+
}
|
|
2434
|
+
}
|
|
2435
|
+
],
|
|
2436
|
+
"responses": {
|
|
2437
|
+
"200": {
|
|
2438
|
+
"content": {
|
|
2439
|
+
"*/*": {
|
|
2440
|
+
"schema": {
|
|
2441
|
+
"contentMediaType": "application/octet-stream",
|
|
2442
|
+
"description": "The artifact's bytes; Content-Type is the manifest's `mime`",
|
|
2443
|
+
"type": "string"
|
|
2444
|
+
}
|
|
2445
|
+
}
|
|
2446
|
+
},
|
|
2447
|
+
"description": "The recorded bytes",
|
|
2448
|
+
"headers": {
|
|
2449
|
+
"Cache-Control": {
|
|
2450
|
+
"schema": {
|
|
2451
|
+
"const": "no-store",
|
|
2452
|
+
"type": "string"
|
|
2453
|
+
}
|
|
2454
|
+
},
|
|
2455
|
+
"Content-Disposition": {
|
|
2456
|
+
"schema": {
|
|
2457
|
+
"const": "attachment",
|
|
2458
|
+
"type": "string"
|
|
2459
|
+
}
|
|
2460
|
+
},
|
|
2461
|
+
"Content-Length": {
|
|
2462
|
+
"description": "The recorded size",
|
|
2463
|
+
"schema": {
|
|
2464
|
+
"minimum": 0,
|
|
2465
|
+
"type": "integer"
|
|
2466
|
+
}
|
|
2467
|
+
},
|
|
2468
|
+
"Content-Security-Policy": {
|
|
2469
|
+
"schema": {
|
|
2470
|
+
"const": "sandbox",
|
|
2471
|
+
"type": "string"
|
|
2472
|
+
}
|
|
2473
|
+
},
|
|
2474
|
+
"Nika-Artifact-Sha256": {
|
|
2475
|
+
"description": "The recorded SHA-256 (lowercase hex), the manifest's `sha256`",
|
|
2476
|
+
"schema": {
|
|
2477
|
+
"pattern": "^[0-9a-f]{64}$",
|
|
2478
|
+
"type": "string"
|
|
2479
|
+
}
|
|
2480
|
+
},
|
|
2481
|
+
"X-Content-Type-Options": {
|
|
2482
|
+
"schema": {
|
|
2483
|
+
"const": "nosniff",
|
|
2484
|
+
"type": "string"
|
|
2485
|
+
}
|
|
2486
|
+
}
|
|
2487
|
+
}
|
|
2488
|
+
},
|
|
2489
|
+
"401": {
|
|
2490
|
+
"content": {
|
|
2491
|
+
"application/json": {
|
|
2492
|
+
"schema": {
|
|
2493
|
+
"$ref": "#/components/schemas/Error"
|
|
2494
|
+
}
|
|
2495
|
+
}
|
|
2496
|
+
},
|
|
2497
|
+
"description": "Error envelope"
|
|
2498
|
+
},
|
|
2499
|
+
"403": {
|
|
2500
|
+
"content": {
|
|
2501
|
+
"application/json": {
|
|
2502
|
+
"schema": {
|
|
2503
|
+
"$ref": "#/components/schemas/Error"
|
|
2504
|
+
}
|
|
2505
|
+
}
|
|
2506
|
+
},
|
|
2507
|
+
"description": "`artifact_too_large`: over this server's download bound"
|
|
2508
|
+
},
|
|
2509
|
+
"404": {
|
|
2510
|
+
"content": {
|
|
2511
|
+
"application/json": {
|
|
2512
|
+
"schema": {
|
|
2513
|
+
"$ref": "#/components/schemas/Error"
|
|
2514
|
+
}
|
|
2515
|
+
}
|
|
2516
|
+
},
|
|
2517
|
+
"description": "`job_not_found`: unknown or foreign job id · `artifact_not_found`: no entry by that name"
|
|
2518
|
+
},
|
|
2519
|
+
"409": {
|
|
2520
|
+
"content": {
|
|
2521
|
+
"application/json": {
|
|
2522
|
+
"schema": {
|
|
2523
|
+
"$ref": "#/components/schemas/Error"
|
|
2524
|
+
}
|
|
2525
|
+
}
|
|
2526
|
+
},
|
|
2527
|
+
"description": "`job_not_settled` · `artifact_journal_unavailable` · `artifact_journal_unverified` (as the manifest) · `artifact_changed`: the bytes at the recorded place no longer match the record"
|
|
2528
|
+
},
|
|
2529
|
+
"500": {
|
|
2530
|
+
"content": {
|
|
2531
|
+
"application/json": {
|
|
2532
|
+
"schema": {
|
|
2533
|
+
"$ref": "#/components/schemas/Error"
|
|
2534
|
+
}
|
|
2535
|
+
}
|
|
2536
|
+
},
|
|
2537
|
+
"description": "`internal_error`: the server could not read the journal or the artifact"
|
|
2538
|
+
},
|
|
2539
|
+
"503": {
|
|
2540
|
+
"content": {
|
|
2541
|
+
"application/json": {
|
|
2542
|
+
"schema": {
|
|
2543
|
+
"$ref": "#/components/schemas/Error"
|
|
2544
|
+
}
|
|
2545
|
+
}
|
|
2546
|
+
},
|
|
2547
|
+
"description": "`store_busy` · `artifact_capacity`"
|
|
2548
|
+
}
|
|
2549
|
+
},
|
|
2550
|
+
"summary": "Stream one artifact's bytes, verified against its journaled SHA-256"
|
|
2551
|
+
}
|
|
2552
|
+
},
|
|
2553
|
+
"/v1/jobs/{id}/cancel": {
|
|
2554
|
+
"post": {
|
|
2555
|
+
"description": "A queued job cancels atomically before execution claims it. An active job receives the run-scoped cancellation signal and returns 202 until its execution owner settles: the result may be success, failure or cancellation. The grace is fixed at 5 seconds from the signal: a run that has not reached a wave boundary and settled by then is dropped and the job settles `interrupted`, never an invented cancellation. A task still inside one long step when the signal arrives (an agent turn, a long wait) typically outlasts the grace. A paused or final observation returns its existing result unchanged.",
|
|
2556
|
+
"parameters": [
|
|
2557
|
+
{
|
|
2558
|
+
"in": "path",
|
|
2559
|
+
"name": "id",
|
|
2560
|
+
"required": true,
|
|
2561
|
+
"schema": {
|
|
2562
|
+
"format": "uuid",
|
|
2563
|
+
"type": "string"
|
|
2564
|
+
}
|
|
2565
|
+
}
|
|
2566
|
+
],
|
|
2567
|
+
"responses": {
|
|
2568
|
+
"200": {
|
|
2569
|
+
"content": {
|
|
2570
|
+
"application/json": {
|
|
2571
|
+
"schema": {
|
|
2572
|
+
"$ref": "#/components/schemas/Job"
|
|
2573
|
+
}
|
|
2574
|
+
}
|
|
2575
|
+
},
|
|
2576
|
+
"description": "Cancelled before execution, or already ended observation"
|
|
2577
|
+
},
|
|
2578
|
+
"202": {
|
|
2579
|
+
"content": {
|
|
2580
|
+
"application/json": {
|
|
2581
|
+
"schema": {
|
|
2582
|
+
"$ref": "#/components/schemas/Job"
|
|
2583
|
+
}
|
|
2584
|
+
}
|
|
2585
|
+
},
|
|
2586
|
+
"description": "Cancellation requested; execution has not yet settled"
|
|
2587
|
+
},
|
|
2588
|
+
"401": {
|
|
2589
|
+
"content": {
|
|
2590
|
+
"application/json": {
|
|
2591
|
+
"schema": {
|
|
2592
|
+
"$ref": "#/components/schemas/Error"
|
|
2593
|
+
}
|
|
2594
|
+
}
|
|
2595
|
+
},
|
|
2596
|
+
"description": "Error envelope"
|
|
2597
|
+
},
|
|
2598
|
+
"404": {
|
|
2599
|
+
"content": {
|
|
2600
|
+
"application/json": {
|
|
2601
|
+
"schema": {
|
|
2602
|
+
"$ref": "#/components/schemas/Error"
|
|
2603
|
+
}
|
|
2604
|
+
}
|
|
2605
|
+
},
|
|
2606
|
+
"description": "Error envelope"
|
|
2607
|
+
},
|
|
2608
|
+
"503": {
|
|
2609
|
+
"content": {
|
|
2610
|
+
"application/json": {
|
|
2611
|
+
"schema": {
|
|
2612
|
+
"$ref": "#/components/schemas/Error"
|
|
2613
|
+
}
|
|
2614
|
+
}
|
|
2615
|
+
},
|
|
2616
|
+
"description": "Error envelope"
|
|
2617
|
+
}
|
|
2618
|
+
},
|
|
2619
|
+
"summary": "Request cancellation or replay an ended observation"
|
|
2620
|
+
}
|
|
2621
|
+
},
|
|
2622
|
+
"/v1/jobs/{id}/events": {
|
|
2623
|
+
"get": {
|
|
2624
|
+
"parameters": [
|
|
2625
|
+
{
|
|
2626
|
+
"in": "path",
|
|
2627
|
+
"name": "id",
|
|
2628
|
+
"required": true,
|
|
2629
|
+
"schema": {
|
|
2630
|
+
"format": "uuid",
|
|
2631
|
+
"type": "string"
|
|
2632
|
+
}
|
|
2633
|
+
},
|
|
2634
|
+
{
|
|
2635
|
+
"$ref": "#/components/parameters/LastEventId"
|
|
2636
|
+
}
|
|
2637
|
+
],
|
|
2638
|
+
"responses": {
|
|
2639
|
+
"200": {
|
|
2640
|
+
"content": {
|
|
2641
|
+
"text/event-stream": {
|
|
2642
|
+
"schema": {
|
|
2643
|
+
"type": "string"
|
|
2644
|
+
},
|
|
2645
|
+
"x-nika-event-schema": {
|
|
2646
|
+
"$ref": "#/components/schemas/JobEvent"
|
|
2647
|
+
}
|
|
2648
|
+
}
|
|
2649
|
+
},
|
|
2650
|
+
"description": "text/event-stream; sends bounded retry guidance and cursor-neutral heartbeat comments; Last-Event-ID replays only persisted events after that sequence; terminal data adds declared outputs and receipt when available; failures add redacted {code,message}"
|
|
2651
|
+
},
|
|
2652
|
+
"400": {
|
|
2653
|
+
"content": {
|
|
2654
|
+
"application/json": {
|
|
2655
|
+
"schema": {
|
|
2656
|
+
"$ref": "#/components/schemas/Error"
|
|
2657
|
+
}
|
|
2658
|
+
}
|
|
2659
|
+
},
|
|
2660
|
+
"description": "Error envelope"
|
|
2661
|
+
},
|
|
2662
|
+
"401": {
|
|
2663
|
+
"content": {
|
|
2664
|
+
"application/json": {
|
|
2665
|
+
"schema": {
|
|
2666
|
+
"$ref": "#/components/schemas/Error"
|
|
2667
|
+
}
|
|
2668
|
+
}
|
|
2669
|
+
},
|
|
2670
|
+
"description": "Error envelope"
|
|
2671
|
+
},
|
|
2672
|
+
"404": {
|
|
2673
|
+
"content": {
|
|
2674
|
+
"application/json": {
|
|
2675
|
+
"schema": {
|
|
2676
|
+
"$ref": "#/components/schemas/Error"
|
|
2677
|
+
}
|
|
2678
|
+
}
|
|
2679
|
+
},
|
|
2680
|
+
"description": "Error envelope"
|
|
2681
|
+
}
|
|
2682
|
+
},
|
|
2683
|
+
"summary": "Job event SSE"
|
|
2684
|
+
}
|
|
2685
|
+
},
|
|
2686
|
+
"/v1/jobs/{id}/status": {
|
|
2687
|
+
"get": {
|
|
2688
|
+
"parameters": [
|
|
2689
|
+
{
|
|
2690
|
+
"in": "path",
|
|
2691
|
+
"name": "id",
|
|
2692
|
+
"required": true,
|
|
2693
|
+
"schema": {
|
|
2694
|
+
"format": "uuid",
|
|
2695
|
+
"type": "string"
|
|
2696
|
+
}
|
|
2697
|
+
}
|
|
2698
|
+
],
|
|
2699
|
+
"responses": {
|
|
2700
|
+
"200": {
|
|
2701
|
+
"content": {
|
|
2702
|
+
"application/json": {
|
|
2703
|
+
"schema": {
|
|
2704
|
+
"$ref": "#/components/schemas/JobStatusOnly"
|
|
2705
|
+
}
|
|
2706
|
+
}
|
|
2707
|
+
},
|
|
2708
|
+
"description": "Status"
|
|
2709
|
+
},
|
|
2710
|
+
"401": {
|
|
2711
|
+
"content": {
|
|
2712
|
+
"application/json": {
|
|
2713
|
+
"schema": {
|
|
2714
|
+
"$ref": "#/components/schemas/Error"
|
|
2715
|
+
}
|
|
2716
|
+
}
|
|
2717
|
+
},
|
|
2718
|
+
"description": "Error envelope"
|
|
2719
|
+
},
|
|
2720
|
+
"404": {
|
|
2721
|
+
"content": {
|
|
2722
|
+
"application/json": {
|
|
2723
|
+
"schema": {
|
|
2724
|
+
"$ref": "#/components/schemas/Error"
|
|
2725
|
+
}
|
|
2726
|
+
}
|
|
2727
|
+
},
|
|
2728
|
+
"description": "Error envelope"
|
|
2729
|
+
}
|
|
2730
|
+
},
|
|
2731
|
+
"summary": "Status only; diagnosis lives on GET /v1/jobs/{id} and SSE"
|
|
2732
|
+
}
|
|
2733
|
+
},
|
|
2734
|
+
"/v1/jobs/{id}/trace/verify": {
|
|
2735
|
+
"get": {
|
|
2736
|
+
"description": "Locates the journal the resident wrote for this job under the project it serves (by the job's execution and trace identity) and verifies it through the same verifier `nika trace verify` runs; the vocabulary is the CLI's. `unavailable` is the honest refusal when no journal exists. The response never exposes a filesystem path.",
|
|
2737
|
+
"parameters": [
|
|
2738
|
+
{
|
|
2739
|
+
"in": "path",
|
|
2740
|
+
"name": "id",
|
|
2741
|
+
"required": true,
|
|
2742
|
+
"schema": {
|
|
2743
|
+
"format": "uuid",
|
|
2744
|
+
"type": "string"
|
|
2745
|
+
}
|
|
2746
|
+
}
|
|
2747
|
+
],
|
|
2748
|
+
"responses": {
|
|
2749
|
+
"200": {
|
|
2750
|
+
"content": {
|
|
2751
|
+
"application/json": {
|
|
2752
|
+
"schema": {
|
|
2753
|
+
"$ref": "#/components/schemas/TraceVerification"
|
|
2754
|
+
}
|
|
2755
|
+
}
|
|
2756
|
+
},
|
|
2757
|
+
"description": "Typed trace verdict"
|
|
2758
|
+
},
|
|
2759
|
+
"401": {
|
|
2760
|
+
"content": {
|
|
2761
|
+
"application/json": {
|
|
2762
|
+
"schema": {
|
|
2763
|
+
"$ref": "#/components/schemas/Error"
|
|
2764
|
+
}
|
|
2765
|
+
}
|
|
2766
|
+
},
|
|
2767
|
+
"description": "Error envelope"
|
|
2768
|
+
},
|
|
2769
|
+
"404": {
|
|
2770
|
+
"content": {
|
|
2771
|
+
"application/json": {
|
|
2772
|
+
"schema": {
|
|
2773
|
+
"$ref": "#/components/schemas/Error"
|
|
2774
|
+
}
|
|
2775
|
+
}
|
|
2776
|
+
},
|
|
2777
|
+
"description": "Error envelope"
|
|
2778
|
+
}
|
|
2779
|
+
},
|
|
2780
|
+
"summary": "Verify the job's trace journal"
|
|
2781
|
+
}
|
|
2782
|
+
},
|
|
2783
|
+
"/v1/openapi.json": {
|
|
2784
|
+
"get": {
|
|
2785
|
+
"responses": {
|
|
2786
|
+
"200": {
|
|
2787
|
+
"description": "OpenAPI 3.1"
|
|
2788
|
+
},
|
|
2789
|
+
"401": {
|
|
2790
|
+
"description": "Bearer required"
|
|
2791
|
+
}
|
|
2792
|
+
},
|
|
2793
|
+
"summary": "This document"
|
|
2794
|
+
}
|
|
2795
|
+
},
|
|
2796
|
+
"/v1/schedules/{id}": {
|
|
2797
|
+
"get": {
|
|
2798
|
+
"responses": {
|
|
2799
|
+
"200": {
|
|
2800
|
+
"content": {
|
|
2801
|
+
"application/json": {
|
|
2802
|
+
"schema": {
|
|
2803
|
+
"$ref": "#/components/schemas/ScheduleStatus"
|
|
2804
|
+
}
|
|
2805
|
+
}
|
|
2806
|
+
},
|
|
2807
|
+
"description": "Fresh planned status",
|
|
2808
|
+
"headers": {
|
|
2809
|
+
"ETag": {
|
|
2810
|
+
"schema": {
|
|
2811
|
+
"type": "string"
|
|
2812
|
+
}
|
|
2813
|
+
}
|
|
2814
|
+
}
|
|
2815
|
+
},
|
|
2816
|
+
"401": {
|
|
2817
|
+
"content": {
|
|
2818
|
+
"application/json": {
|
|
2819
|
+
"schema": {
|
|
2820
|
+
"$ref": "#/components/schemas/Error"
|
|
2821
|
+
}
|
|
2822
|
+
}
|
|
2823
|
+
},
|
|
2824
|
+
"description": "Error envelope"
|
|
2825
|
+
},
|
|
2826
|
+
"404": {
|
|
2827
|
+
"content": {
|
|
2828
|
+
"application/json": {
|
|
2829
|
+
"schema": {
|
|
2830
|
+
"$ref": "#/components/schemas/Error"
|
|
2831
|
+
}
|
|
2832
|
+
}
|
|
2833
|
+
},
|
|
2834
|
+
"description": "Error envelope"
|
|
2835
|
+
}
|
|
2836
|
+
},
|
|
2837
|
+
"summary": "Read one declarative resident schedule"
|
|
2838
|
+
},
|
|
2839
|
+
"parameters": [
|
|
2840
|
+
{
|
|
2841
|
+
"in": "path",
|
|
2842
|
+
"name": "id",
|
|
2843
|
+
"required": true,
|
|
2844
|
+
"schema": {
|
|
2845
|
+
"maxLength": 255,
|
|
2846
|
+
"minLength": 1,
|
|
2847
|
+
"type": "string"
|
|
2848
|
+
}
|
|
2849
|
+
}
|
|
2850
|
+
],
|
|
2851
|
+
"put": {
|
|
2852
|
+
"description": "Create requires If-None-Match: *. Update requires the exact ETag in If-Match. Identical lost-response retries are unchanged and retain the revision. A refused precondition answers 412 with the schedule's current revision (null when none exists). A definition the planner or the schedule validator refuses answers 422 with its findings; a malformed body, refused inputs or a refused workflow answer 422 with the error envelope.",
|
|
2853
|
+
"parameters": [
|
|
2854
|
+
{
|
|
2855
|
+
"$ref": "#/components/parameters/IfNoneMatch"
|
|
2856
|
+
},
|
|
2857
|
+
{
|
|
2858
|
+
"$ref": "#/components/parameters/IfMatch"
|
|
2859
|
+
}
|
|
2860
|
+
],
|
|
2861
|
+
"requestBody": {
|
|
2862
|
+
"content": {
|
|
2863
|
+
"application/json": {
|
|
2864
|
+
"schema": {
|
|
2865
|
+
"$ref": "#/components/schemas/SchedulePut"
|
|
2866
|
+
}
|
|
2867
|
+
}
|
|
2868
|
+
},
|
|
2869
|
+
"required": true
|
|
2870
|
+
},
|
|
2871
|
+
"responses": {
|
|
2872
|
+
"200": {
|
|
2873
|
+
"content": {
|
|
2874
|
+
"application/json": {
|
|
2875
|
+
"schema": {
|
|
2876
|
+
"$ref": "#/components/schemas/ScheduleApply"
|
|
2877
|
+
}
|
|
2878
|
+
}
|
|
2879
|
+
},
|
|
2880
|
+
"description": "Applied or unchanged",
|
|
2881
|
+
"headers": {
|
|
2882
|
+
"ETag": {
|
|
2883
|
+
"schema": {
|
|
2884
|
+
"type": "string"
|
|
2885
|
+
}
|
|
2886
|
+
}
|
|
2887
|
+
}
|
|
2888
|
+
},
|
|
2889
|
+
"401": {
|
|
2890
|
+
"content": {
|
|
2891
|
+
"application/json": {
|
|
2892
|
+
"schema": {
|
|
2893
|
+
"$ref": "#/components/schemas/Error"
|
|
2894
|
+
}
|
|
2895
|
+
}
|
|
2896
|
+
},
|
|
2897
|
+
"description": "Error envelope"
|
|
2898
|
+
},
|
|
2899
|
+
"412": {
|
|
2900
|
+
"content": {
|
|
2901
|
+
"application/json": {
|
|
2902
|
+
"schema": {
|
|
2903
|
+
"$ref": "#/components/schemas/SchedulePreconditionFailed"
|
|
2904
|
+
}
|
|
2905
|
+
}
|
|
2906
|
+
},
|
|
2907
|
+
"description": "Precondition refused; carries the current revision",
|
|
2908
|
+
"headers": {
|
|
2909
|
+
"ETag": {
|
|
2910
|
+
"description": "The current revision, when one exists",
|
|
2911
|
+
"schema": {
|
|
2912
|
+
"type": "string"
|
|
2913
|
+
}
|
|
2914
|
+
}
|
|
2915
|
+
}
|
|
2916
|
+
},
|
|
2917
|
+
"413": {
|
|
2918
|
+
"content": {
|
|
2919
|
+
"application/json": {
|
|
2920
|
+
"schema": {
|
|
2921
|
+
"$ref": "#/components/schemas/Error"
|
|
2922
|
+
}
|
|
2923
|
+
}
|
|
2924
|
+
},
|
|
2925
|
+
"description": "Error envelope"
|
|
2926
|
+
},
|
|
2927
|
+
"415": {
|
|
2928
|
+
"content": {
|
|
2929
|
+
"application/json": {
|
|
2930
|
+
"schema": {
|
|
2931
|
+
"$ref": "#/components/schemas/Error"
|
|
2932
|
+
}
|
|
2933
|
+
}
|
|
2934
|
+
},
|
|
2935
|
+
"description": "Error envelope"
|
|
2936
|
+
},
|
|
2937
|
+
"422": {
|
|
2938
|
+
"content": {
|
|
2939
|
+
"application/json": {
|
|
2940
|
+
"schema": {
|
|
2941
|
+
"oneOf": [
|
|
2942
|
+
{
|
|
2943
|
+
"$ref": "#/components/schemas/ScheduleFindings"
|
|
2944
|
+
},
|
|
2945
|
+
{
|
|
2946
|
+
"$ref": "#/components/schemas/Error"
|
|
2947
|
+
}
|
|
2948
|
+
]
|
|
2949
|
+
}
|
|
2950
|
+
}
|
|
2951
|
+
},
|
|
2952
|
+
"description": "Refused definition: its findings, or the error envelope"
|
|
2953
|
+
},
|
|
2954
|
+
"503": {
|
|
2955
|
+
"content": {
|
|
2956
|
+
"application/json": {
|
|
2957
|
+
"schema": {
|
|
2958
|
+
"$ref": "#/components/schemas/Error"
|
|
2959
|
+
}
|
|
2960
|
+
}
|
|
2961
|
+
},
|
|
2962
|
+
"description": "Error envelope"
|
|
2963
|
+
},
|
|
2964
|
+
"507": {
|
|
2965
|
+
"content": {
|
|
2966
|
+
"application/json": {
|
|
2967
|
+
"schema": {
|
|
2968
|
+
"$ref": "#/components/schemas/Error"
|
|
2969
|
+
}
|
|
2970
|
+
}
|
|
2971
|
+
},
|
|
2972
|
+
"description": "Durable schedule capacity exhausted"
|
|
2973
|
+
}
|
|
2974
|
+
},
|
|
2975
|
+
"summary": "Create or revision-conditionally update one resident schedule"
|
|
2976
|
+
}
|
|
2977
|
+
},
|
|
2978
|
+
"/v1/workflows": {
|
|
2979
|
+
"get": {
|
|
2980
|
+
"responses": {
|
|
2981
|
+
"200": {
|
|
2982
|
+
"content": {
|
|
2983
|
+
"application/json": {
|
|
2984
|
+
"schema": {
|
|
2985
|
+
"$ref": "#/components/schemas/WorkflowList"
|
|
2986
|
+
}
|
|
2987
|
+
}
|
|
2988
|
+
},
|
|
2989
|
+
"description": "Project-relative .nika names under the served registry (--workflows)"
|
|
2990
|
+
},
|
|
2991
|
+
"401": {
|
|
2992
|
+
"content": {
|
|
2993
|
+
"application/json": {
|
|
2994
|
+
"schema": {
|
|
2995
|
+
"$ref": "#/components/schemas/Error"
|
|
2996
|
+
}
|
|
2997
|
+
}
|
|
2998
|
+
},
|
|
2999
|
+
"description": "Error envelope"
|
|
3000
|
+
}
|
|
3001
|
+
},
|
|
3002
|
+
"summary": "Contained workflow names"
|
|
3003
|
+
}
|
|
3004
|
+
},
|
|
3005
|
+
"/v1/workflows/{name}": {
|
|
3006
|
+
"get": {
|
|
3007
|
+
"description": "`{name}` is a served name exactly as GET /v1/workflows lists it: a project-relative path that usually contains `/` (`workflows/daily.nika`). Send its `/` separators literally, as path separators: GET /v1/workflows/workflows/daily.nika. A served name uses only ASCII letters, digits, `.`, `_`, `-` and `/`, so no segment needs percent-encoding; an encoded separator (`%2F`) or any other escape is not decoded and answers 404.",
|
|
3008
|
+
"parameters": [
|
|
3009
|
+
{
|
|
3010
|
+
"description": "The served name, `/` separators sent literally (it spans several path segments)",
|
|
3011
|
+
"in": "path",
|
|
3012
|
+
"name": "name",
|
|
3013
|
+
"required": true,
|
|
3014
|
+
"schema": {
|
|
3015
|
+
"minLength": 1,
|
|
3016
|
+
"pattern": "^[A-Za-z0-9._-]+(/[A-Za-z0-9._-]+)*\\.nika$",
|
|
3017
|
+
"type": "string"
|
|
3018
|
+
}
|
|
3019
|
+
}
|
|
3020
|
+
],
|
|
3021
|
+
"responses": {
|
|
3022
|
+
"200": {
|
|
3023
|
+
"content": {
|
|
3024
|
+
"application/json": {
|
|
3025
|
+
"schema": {
|
|
3026
|
+
"$ref": "#/components/schemas/WorkflowMetadata"
|
|
3027
|
+
}
|
|
3028
|
+
}
|
|
3029
|
+
},
|
|
3030
|
+
"description": "Contained name"
|
|
3031
|
+
},
|
|
3032
|
+
"401": {
|
|
3033
|
+
"content": {
|
|
3034
|
+
"application/json": {
|
|
3035
|
+
"schema": {
|
|
3036
|
+
"$ref": "#/components/schemas/Error"
|
|
3037
|
+
}
|
|
3038
|
+
}
|
|
3039
|
+
},
|
|
3040
|
+
"description": "Error envelope"
|
|
3041
|
+
},
|
|
3042
|
+
"404": {
|
|
3043
|
+
"content": {
|
|
3044
|
+
"application/json": {
|
|
3045
|
+
"schema": {
|
|
3046
|
+
"$ref": "#/components/schemas/Error"
|
|
3047
|
+
}
|
|
3048
|
+
}
|
|
3049
|
+
},
|
|
3050
|
+
"description": "Error envelope"
|
|
3051
|
+
}
|
|
3052
|
+
},
|
|
3053
|
+
"summary": "Workflow metadata without source bytes"
|
|
3054
|
+
}
|
|
3055
|
+
}
|
|
3056
|
+
},
|
|
3057
|
+
"security": [
|
|
3058
|
+
{
|
|
3059
|
+
"bearerAuth": []
|
|
3060
|
+
}
|
|
3061
|
+
],
|
|
3062
|
+
"servers": [
|
|
3063
|
+
{
|
|
3064
|
+
"url": "http://127.0.0.1"
|
|
3065
|
+
}
|
|
3066
|
+
]
|
|
3067
|
+
}
|