@mininglamp-oss/octo-runtime-client 0.0.0-stage → 1.1.11

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.
Files changed (87) hide show
  1. package/LICENSE +190 -0
  2. package/README.md +38 -2
  3. package/build-info.json +5 -0
  4. package/dist/async-question-reply.d.ts +30 -0
  5. package/dist/async-question-reply.js +199 -0
  6. package/dist/browser.d.ts +1 -0
  7. package/dist/browser.js +1 -0
  8. package/dist/client.d.ts +10 -0
  9. package/dist/client.js +465 -0
  10. package/dist/index.d.ts +6 -0
  11. package/dist/index.js +6 -0
  12. package/dist/internal.d.ts +4 -0
  13. package/dist/internal.js +5 -0
  14. package/dist/invocation-lifecycle.d.ts +59 -0
  15. package/dist/invocation-lifecycle.js +287 -0
  16. package/dist/notification.d.ts +1 -0
  17. package/dist/notification.js +1 -0
  18. package/dist/protocol.d.ts +1 -0
  19. package/dist/protocol.js +1 -0
  20. package/dist/runtime-path.d.ts +21 -0
  21. package/dist/runtime-path.js +138 -0
  22. package/dist/startup-catalog.d.ts +8 -0
  23. package/dist/startup-catalog.js +65 -0
  24. package/dist/startup-diagnostics.d.ts +82 -0
  25. package/dist/startup-diagnostics.js +371 -0
  26. package/dist/submission-error.d.ts +10 -0
  27. package/dist/submission-error.js +23 -0
  28. package/dist/types.d.ts +72 -0
  29. package/dist/types.js +10 -0
  30. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/actmode.d.ts +4 -0
  31. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/actmode.js +36 -0
  32. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/adapter-metadata.d.ts +7 -0
  33. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/adapter-metadata.js +1 -0
  34. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/browser.d.ts +7 -0
  35. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/browser.js +6 -0
  36. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/context-catalog.d.ts +11 -0
  37. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/context-catalog.js +33 -0
  38. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/context-configuration.d.ts +5 -0
  39. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/context-configuration.js +58 -0
  40. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/context-hash.d.ts +2 -0
  41. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/context-hash.js +5 -0
  42. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/context.d.ts +29 -0
  43. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/context.js +566 -0
  44. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/execution-plan.d.ts +3 -0
  45. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/execution-plan.js +80 -0
  46. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/experience.d.ts +4 -0
  47. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/experience.js +166 -0
  48. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/failure.d.ts +82 -0
  49. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/failure.js +562 -0
  50. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/generated/protocol-types.d.ts +3022 -0
  51. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/generated/protocol-types.js +6 -0
  52. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/index.d.ts +124 -0
  53. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/index.js +709 -0
  54. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/invoke-input.d.ts +129 -0
  55. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/invoke-input.js +177 -0
  56. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/invoke-size.d.ts +3 -0
  57. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/invoke-size.js +11 -0
  58. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/json-size.d.ts +2 -0
  59. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/json-size.js +91 -0
  60. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/model-context.d.ts +3 -0
  61. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/model-context.js +9 -0
  62. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/multimodal.d.ts +15 -0
  63. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/multimodal.js +166 -0
  64. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/notification.d.ts +2 -0
  65. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/notification.js +137 -0
  66. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/questions.d.ts +9 -0
  67. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/questions.js +84 -0
  68. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/run-protocol.d.ts +20 -0
  69. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/run-protocol.js +294 -0
  70. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/runtime-selection.d.ts +3 -0
  71. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/runtime-selection.js +68 -0
  72. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/service-processes.d.ts +5 -0
  73. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/service-processes.js +65 -0
  74. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/stream-limits.d.ts +27 -0
  75. package/node_modules/@mininglamp-oss/octo-runtime-protocol/dist/stream-limits.js +56 -0
  76. package/node_modules/@mininglamp-oss/octo-runtime-protocol/package.json +15 -0
  77. package/package.json +55 -4
  78. package/schema/context-configuration-fixtures.json +1219 -0
  79. package/schema/context-fixtures.json +5988 -0
  80. package/schema/kernel-client.behavior.json +56 -0
  81. package/schema/kernel-ipc-fixtures.json +53 -0
  82. package/schema/kernel-ipc.schema.json +538 -0
  83. package/schema/native-invoke-fixtures.json +116 -0
  84. package/schema/protocol.schema.json +4525 -0
  85. package/schema/run-protocol-fixtures.json +761 -0
  86. package/schema/runtime-selection-fixtures.json +663 -0
  87. package/schema/session-name-fixtures.json +191 -0
@@ -0,0 +1,4525 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "urn:mininglamp-oss:octo-runtime:protocol-schema",
4
+ "title": "OctoRuntimeProtocolSchema",
5
+ "description": "Serializable data shapes for the Octo Runtime NDJSON protocol. Runtime behavior remains hand-written in src/index.ts, and this schema is the source of truth for generated TypeScript types. The x-octo-unicode-scalar-strings semantic keyword requires every JSON string value and object member name to contain Unicode scalar values only: unpaired UTF-16 surrogates are rejected, not repaired or normalized. Consumers must enforce this protocol-wide rule even when validating a definition directly.",
6
+ "x-octo-unicode-scalar-strings": true,
7
+ "type": "object",
8
+ "additionalProperties": false,
9
+ "definitions": {
10
+ "KernelLookupKey": {
11
+ "title": "KernelLookupKey",
12
+ "type": "object",
13
+ "additionalProperties": false,
14
+ "required": [
15
+ "run_id",
16
+ "invocation_id",
17
+ "agent_session_id",
18
+ "session_generation",
19
+ "protocol_mode"
20
+ ],
21
+ "properties": {
22
+ "run_id": {
23
+ "type": "string",
24
+ "minLength": 1,
25
+ "maxLength": 256
26
+ },
27
+ "invocation_id": {
28
+ "type": "string",
29
+ "minLength": 1,
30
+ "maxLength": 256
31
+ },
32
+ "agent_session_id": {
33
+ "type": "string",
34
+ "minLength": 1,
35
+ "maxLength": 256
36
+ },
37
+ "session_generation": {
38
+ "type": "integer",
39
+ "minimum": 0,
40
+ "maximum": 9007199254740991
41
+ },
42
+ "protocol_mode": {
43
+ "$ref": "#/definitions/ProtocolMode"
44
+ }
45
+ }
46
+ },
47
+ "KernelRunRef": {
48
+ "title": "KernelRunRef",
49
+ "type": "object",
50
+ "additionalProperties": false,
51
+ "required": [
52
+ "kernel_instance_id",
53
+ "run_id",
54
+ "invocation_id",
55
+ "stream_id",
56
+ "agent_session_id",
57
+ "session_generation",
58
+ "protocol_mode",
59
+ "protocol"
60
+ ],
61
+ "properties": {
62
+ "kernel_instance_id": {
63
+ "type": "string",
64
+ "minLength": 1
65
+ },
66
+ "run_id": {
67
+ "type": "string",
68
+ "minLength": 1,
69
+ "maxLength": 256
70
+ },
71
+ "invocation_id": {
72
+ "type": "string",
73
+ "minLength": 1,
74
+ "maxLength": 256
75
+ },
76
+ "stream_id": {
77
+ "type": "string",
78
+ "minLength": 1,
79
+ "maxLength": 256
80
+ },
81
+ "agent_session_id": {
82
+ "type": "string",
83
+ "minLength": 1,
84
+ "maxLength": 256
85
+ },
86
+ "session_generation": {
87
+ "type": "integer",
88
+ "minimum": 0,
89
+ "maximum": 9007199254740991
90
+ },
91
+ "protocol_mode": {
92
+ "$ref": "#/definitions/ProtocolMode"
93
+ },
94
+ "protocol": {
95
+ "type": "string",
96
+ "minLength": 1,
97
+ "maxLength": 128
98
+ }
99
+ }
100
+ },
101
+ "KernelRunSnapshot": {
102
+ "title": "KernelRunSnapshot",
103
+ "type": "object",
104
+ "additionalProperties": false,
105
+ "required": ["ref", "oldest_seq", "latest_seq"],
106
+ "properties": {
107
+ "ref": {
108
+ "$ref": "#/definitions/KernelRunRef"
109
+ },
110
+ "oldest_seq": {
111
+ "type": "integer",
112
+ "minimum": 1,
113
+ "maximum": 9007199254740991
114
+ },
115
+ "latest_seq": {
116
+ "type": "integer",
117
+ "minimum": 0,
118
+ "maximum": 9007199254740991
119
+ },
120
+ "terminal": {
121
+ "$ref": "#/definitions/HostFrame"
122
+ }
123
+ }
124
+ },
125
+ "ServiceProcessSnapshot": {
126
+ "title": "ServiceProcessSnapshot",
127
+ "type": "object",
128
+ "additionalProperties": false,
129
+ "required": [
130
+ "scope_id",
131
+ "service_id",
132
+ "incarnation",
133
+ "provider",
134
+ "owner_pid",
135
+ "state",
136
+ "observation",
137
+ "ownership"
138
+ ],
139
+ "properties": {
140
+ "scope_id": { "type": "string", "minLength": 1 },
141
+ "service_id": { "type": "string", "minLength": 1 },
142
+ "incarnation": { "type": "integer", "minimum": 0 },
143
+ "provider": { "type": "string", "minLength": 1 },
144
+ "owner_pid": { "type": "integer", "minimum": 1 },
145
+ "pid": { "type": "integer", "minimum": 1 },
146
+ "state": {
147
+ "enum": [
148
+ "not_started",
149
+ "starting",
150
+ "ready",
151
+ "recovering",
152
+ "degraded",
153
+ "closing",
154
+ "closed",
155
+ "cleanup_incomplete"
156
+ ]
157
+ },
158
+ "observation": { "enum": ["alive", "exited", "unknown"] },
159
+ "ownership": { "const": "owned" }
160
+ }
161
+ },
162
+ "KernelStatus": {
163
+ "title": "KernelStatus",
164
+ "type": "object",
165
+ "additionalProperties": false,
166
+ "required": ["ipc_version", "kernel_instance_id", "pid", "execution_ready"],
167
+ "properties": {
168
+ "ipc_version": {
169
+ "const": 1
170
+ },
171
+ "kernel_instance_id": {
172
+ "type": "string",
173
+ "minLength": 1
174
+ },
175
+ "pid": {
176
+ "type": "integer",
177
+ "minimum": 1
178
+ },
179
+ "execution_ready": {
180
+ "type": "boolean"
181
+ },
182
+ "service_processes": {
183
+ "type": "array",
184
+ "maxItems": 256,
185
+ "items": { "$ref": "#/definitions/ServiceProcessSnapshot" }
186
+ }
187
+ }
188
+ },
189
+ "RunProtocolErrorCode": {
190
+ "title": "RunProtocolErrorCode",
191
+ "enum": [
192
+ "PROTOCOL_MODE_INVALID",
193
+ "PROTOCOL_MODE_UNSUPPORTED",
194
+ "EXECUTION_PROTOCOL_MISMATCH",
195
+ "EXECUTION_IDENTITY_CONFLICT",
196
+ "NATIVE_METHOD_UNSUPPORTED",
197
+ "NATIVE_RESPONSE_INVALID",
198
+ "INTERACTION_NOT_ACTIVE",
199
+ "INVALID_QUESTION_RESPONSE",
200
+ "ASYNC_ANSWER_REJECTED",
201
+ "OPERATION_OUTCOME_UNKNOWN",
202
+ "HOST_EXECUTION_FAILED",
203
+ "HOST_ENDED_WITHOUT_TERMINAL",
204
+ "PROVIDER_MESSAGE_TOO_LARGE",
205
+ "HOST_FRAME_TOO_LARGE",
206
+ "STREAM_QUEUE_ITEM_TOO_LARGE",
207
+ "STREAM_QUEUE_BYTES_EXCEEDED",
208
+ "STREAM_QUEUE_ITEMS_EXCEEDED",
209
+ "STREAM_GAP",
210
+ "STREAM_EXPIRED",
211
+ "REMOTE_NATIVE_UNSUPPORTED",
212
+ "HOST_FRAME_INVALID",
213
+ "HOST_CONTROL_INVALID",
214
+ "HOST_RECEIPT_INVALID",
215
+ "PROTOCOL_SUPPORT_INVALID"
216
+ ]
217
+ },
218
+ "ProtocolMode": {
219
+ "title": "ProtocolMode",
220
+ "enum": ["native", "canonical"]
221
+ },
222
+ "CanonicalEventWire": {
223
+ "title": "CanonicalEventWire",
224
+ "type": "object",
225
+ "additionalProperties": false,
226
+ "required": ["protocolVersion", "type", "payload"],
227
+ "properties": {
228
+ "protocolVersion": {
229
+ "const": 2
230
+ },
231
+ "type": {
232
+ "enum": [
233
+ "session.update",
234
+ "execution.update",
235
+ "usage.update",
236
+ "model_step.started",
237
+ "model_step.finished",
238
+ "message.create",
239
+ "message.delta",
240
+ "message.update",
241
+ "tool_call.create",
242
+ "tool_call.delta",
243
+ "tool_call.update",
244
+ "activity.started",
245
+ "activity.updated",
246
+ "activity.finished",
247
+ "plan.updated",
248
+ "tool_call.progress",
249
+ "run.notice",
250
+ "interaction.requested",
251
+ "interaction.resolved",
252
+ "run.queued",
253
+ "run.started",
254
+ "run.completed",
255
+ "run.failed",
256
+ "run.cancelled"
257
+ ]
258
+ },
259
+ "payload": {
260
+ "$ref": "#/definitions/CanonicalEventPayload"
261
+ }
262
+ }
263
+ },
264
+ "HostInvokeOptions": {
265
+ "title": "HostInvokeOptions",
266
+ "type": "object",
267
+ "additionalProperties": false,
268
+ "properties": {
269
+ "protocolMode": {
270
+ "$ref": "#/definitions/ProtocolMode",
271
+ "default": "native"
272
+ },
273
+ "protocol": {
274
+ "type": "string",
275
+ "minLength": 1,
276
+ "maxLength": 128
277
+ }
278
+ }
279
+ },
280
+ "HostRunReceipt": {
281
+ "title": "HostRunReceipt",
282
+ "type": "object",
283
+ "additionalProperties": false,
284
+ "required": [
285
+ "run_id",
286
+ "invocation_id",
287
+ "stream_id",
288
+ "agent_session_id",
289
+ "session_generation",
290
+ "protocol_mode",
291
+ "protocol"
292
+ ],
293
+ "properties": {
294
+ "run_id": {
295
+ "type": "string",
296
+ "minLength": 1,
297
+ "maxLength": 256
298
+ },
299
+ "invocation_id": {
300
+ "type": "string",
301
+ "minLength": 1,
302
+ "maxLength": 256
303
+ },
304
+ "stream_id": {
305
+ "type": "string",
306
+ "minLength": 1,
307
+ "maxLength": 256
308
+ },
309
+ "agent_session_id": {
310
+ "type": "string",
311
+ "minLength": 1,
312
+ "maxLength": 256
313
+ },
314
+ "session_generation": {
315
+ "type": "integer",
316
+ "minimum": 0,
317
+ "maximum": 9007199254740991
318
+ },
319
+ "protocol_mode": {
320
+ "$ref": "#/definitions/ProtocolMode"
321
+ },
322
+ "protocol": {
323
+ "type": "string",
324
+ "minLength": 1,
325
+ "maxLength": 128
326
+ }
327
+ }
328
+ },
329
+ "AdapterProtocolSupport": {
330
+ "title": "AdapterProtocolSupport",
331
+ "type": "object",
332
+ "additionalProperties": false,
333
+ "required": ["protocol", "modes", "nativeMethods"],
334
+ "properties": {
335
+ "protocol": {
336
+ "type": "string",
337
+ "minLength": 1,
338
+ "maxLength": 128
339
+ },
340
+ "modes": {
341
+ "type": "array",
342
+ "minItems": 1,
343
+ "uniqueItems": true,
344
+ "items": {
345
+ "$ref": "#/definitions/ProtocolMode"
346
+ }
347
+ },
348
+ "nativeMethods": {
349
+ "type": "array",
350
+ "uniqueItems": true,
351
+ "items": {
352
+ "type": "string",
353
+ "minLength": 1,
354
+ "maxLength": 256
355
+ }
356
+ }
357
+ },
358
+ "if": {
359
+ "properties": {
360
+ "modes": {
361
+ "not": {
362
+ "contains": {
363
+ "const": "native"
364
+ }
365
+ }
366
+ }
367
+ }
368
+ },
369
+ "then": {
370
+ "properties": {
371
+ "nativeMethods": {
372
+ "maxItems": 0
373
+ }
374
+ }
375
+ }
376
+ },
377
+ "NativeInteractionResponse": {
378
+ "title": "NativeInteractionResponse",
379
+ "type": "object",
380
+ "additionalProperties": false,
381
+ "required": ["requestId", "payload"],
382
+ "properties": {
383
+ "requestId": {
384
+ "oneOf": [
385
+ {
386
+ "type": "string",
387
+ "minLength": 1,
388
+ "maxLength": 256
389
+ },
390
+ {
391
+ "type": "integer",
392
+ "minimum": -9007199254740991,
393
+ "maximum": 9007199254740991
394
+ }
395
+ ]
396
+ },
397
+ "payload": {
398
+ "type": "object",
399
+ "additionalProperties": true
400
+ }
401
+ }
402
+ },
403
+ "HostControl": {
404
+ "title": "HostControl",
405
+ "oneOf": [
406
+ {
407
+ "type": "object",
408
+ "additionalProperties": false,
409
+ "required": ["type", "name", "payload"],
410
+ "properties": {
411
+ "type": {
412
+ "const": "evidence"
413
+ },
414
+ "name": {
415
+ "const": "execution"
416
+ },
417
+ "payload": {
418
+ "$ref": "#/definitions/ExecutionEvidence"
419
+ }
420
+ }
421
+ },
422
+ {
423
+ "type": "object",
424
+ "additionalProperties": false,
425
+ "required": ["type", "name", "payload"],
426
+ "properties": {
427
+ "type": {
428
+ "const": "evidence"
429
+ },
430
+ "name": {
431
+ "enum": ["session"]
432
+ },
433
+ "payload": {
434
+ "type": "object",
435
+ "additionalProperties": true
436
+ }
437
+ }
438
+ },
439
+ {
440
+ "type": "object",
441
+ "additionalProperties": false,
442
+ "required": ["type", "state"],
443
+ "properties": {
444
+ "type": {
445
+ "const": "state"
446
+ },
447
+ "state": {
448
+ "enum": ["running", "completed", "failed", "cancelled", "lost"]
449
+ }
450
+ }
451
+ },
452
+ {
453
+ "type": "object",
454
+ "additionalProperties": false,
455
+ "required": ["type", "code", "message"],
456
+ "properties": {
457
+ "type": {
458
+ "const": "error"
459
+ },
460
+ "code": {
461
+ "$ref": "#/definitions/RunProtocolErrorCode"
462
+ },
463
+ "message": {
464
+ "type": "string"
465
+ },
466
+ "failure": {
467
+ "$ref": "#/definitions/FailureEnvelope"
468
+ }
469
+ }
470
+ },
471
+ {
472
+ "type": "object",
473
+ "additionalProperties": false,
474
+ "required": ["type", "requestId", "status"],
475
+ "properties": {
476
+ "type": {
477
+ "const": "interaction"
478
+ },
479
+ "requestId": {
480
+ "oneOf": [
481
+ {
482
+ "type": "string",
483
+ "minLength": 1,
484
+ "maxLength": 256
485
+ },
486
+ {
487
+ "type": "integer",
488
+ "minimum": -9007199254740991,
489
+ "maximum": 9007199254740991
490
+ }
491
+ ]
492
+ },
493
+ "status": {
494
+ "enum": ["pending", "resolved", "expired", "invalidated"]
495
+ },
496
+ "responseRequired": {
497
+ "description": "Whether an external response is required. Omission means required; false does not imply resolution or completion.",
498
+ "type": "boolean"
499
+ },
500
+ "expiresAt": {
501
+ "type": "integer",
502
+ "minimum": 1,
503
+ "maximum": 9007199254740991
504
+ }
505
+ },
506
+ "if": {
507
+ "properties": {
508
+ "status": {
509
+ "const": "pending"
510
+ }
511
+ }
512
+ },
513
+ "then": {
514
+ "required": ["expiresAt"]
515
+ },
516
+ "else": {
517
+ "not": { "required": ["responseRequired"] }
518
+ }
519
+ },
520
+ {
521
+ "type": "object",
522
+ "additionalProperties": false,
523
+ "required": ["type", "requested_after_seq", "oldest_seq", "latest_seq"],
524
+ "properties": {
525
+ "type": {
526
+ "const": "gap"
527
+ },
528
+ "requested_after_seq": {
529
+ "type": "integer",
530
+ "minimum": 0,
531
+ "maximum": 9007199254740991
532
+ },
533
+ "oldest_seq": {
534
+ "type": "integer",
535
+ "minimum": 1,
536
+ "maximum": 9007199254740991
537
+ },
538
+ "latest_seq": {
539
+ "type": "integer",
540
+ "minimum": 0,
541
+ "maximum": 9007199254740991
542
+ }
543
+ }
544
+ }
545
+ ]
546
+ },
547
+ "HostFrame": {
548
+ "title": "HostFrame",
549
+ "oneOf": [
550
+ {
551
+ "$ref": "#/definitions/NativeHostFrame"
552
+ },
553
+ {
554
+ "$ref": "#/definitions/CanonicalHostFrame"
555
+ },
556
+ {
557
+ "$ref": "#/definitions/ControlHostFrame"
558
+ }
559
+ ]
560
+ },
561
+ "NativeHostFrame": {
562
+ "title": "NativeHostFrame",
563
+ "type": "object",
564
+ "additionalProperties": false,
565
+ "required": [
566
+ "run_id",
567
+ "invocation_id",
568
+ "stream_id",
569
+ "agent_session_id",
570
+ "session_generation",
571
+ "seq",
572
+ "protocol_mode",
573
+ "protocol",
574
+ "kind",
575
+ "messageKind",
576
+ "payload"
577
+ ],
578
+ "properties": {
579
+ "run_id": {
580
+ "type": "string",
581
+ "minLength": 1,
582
+ "maxLength": 256
583
+ },
584
+ "invocation_id": {
585
+ "type": "string",
586
+ "minLength": 1,
587
+ "maxLength": 256
588
+ },
589
+ "stream_id": {
590
+ "type": "string",
591
+ "minLength": 1,
592
+ "maxLength": 256
593
+ },
594
+ "agent_session_id": {
595
+ "type": "string",
596
+ "minLength": 1,
597
+ "maxLength": 256
598
+ },
599
+ "session_generation": {
600
+ "type": "integer",
601
+ "minimum": 0,
602
+ "maximum": 9007199254740991
603
+ },
604
+ "seq": {
605
+ "type": "integer",
606
+ "minimum": 1,
607
+ "maximum": 9007199254740991
608
+ },
609
+ "protocol_mode": {
610
+ "const": "native"
611
+ },
612
+ "protocol": {
613
+ "type": "string",
614
+ "minLength": 1,
615
+ "maxLength": 128
616
+ },
617
+ "kind": {
618
+ "const": "native"
619
+ },
620
+ "messageKind": {
621
+ "enum": ["response", "notification", "request", "message"]
622
+ },
623
+ "payload": {
624
+ "type": "object",
625
+ "additionalProperties": true
626
+ }
627
+ }
628
+ },
629
+ "CanonicalHostFrame": {
630
+ "title": "CanonicalHostFrame",
631
+ "type": "object",
632
+ "additionalProperties": false,
633
+ "required": [
634
+ "run_id",
635
+ "invocation_id",
636
+ "stream_id",
637
+ "agent_session_id",
638
+ "session_generation",
639
+ "seq",
640
+ "protocol_mode",
641
+ "protocol",
642
+ "kind",
643
+ "event"
644
+ ],
645
+ "properties": {
646
+ "run_id": {
647
+ "type": "string",
648
+ "minLength": 1,
649
+ "maxLength": 256
650
+ },
651
+ "invocation_id": {
652
+ "type": "string",
653
+ "minLength": 1,
654
+ "maxLength": 256
655
+ },
656
+ "stream_id": {
657
+ "type": "string",
658
+ "minLength": 1,
659
+ "maxLength": 256
660
+ },
661
+ "agent_session_id": {
662
+ "type": "string",
663
+ "minLength": 1,
664
+ "maxLength": 256
665
+ },
666
+ "session_generation": {
667
+ "type": "integer",
668
+ "minimum": 0,
669
+ "maximum": 9007199254740991
670
+ },
671
+ "seq": {
672
+ "type": "integer",
673
+ "minimum": 1,
674
+ "maximum": 9007199254740991
675
+ },
676
+ "protocol_mode": {
677
+ "const": "canonical"
678
+ },
679
+ "protocol": {
680
+ "type": "string",
681
+ "minLength": 1,
682
+ "maxLength": 128
683
+ },
684
+ "kind": {
685
+ "const": "canonical"
686
+ },
687
+ "event": {
688
+ "$ref": "#/definitions/CanonicalEventWire"
689
+ }
690
+ }
691
+ },
692
+ "ControlHostFrame": {
693
+ "title": "ControlHostFrame",
694
+ "type": "object",
695
+ "additionalProperties": false,
696
+ "required": [
697
+ "run_id",
698
+ "invocation_id",
699
+ "stream_id",
700
+ "agent_session_id",
701
+ "session_generation",
702
+ "seq",
703
+ "protocol_mode",
704
+ "protocol",
705
+ "kind",
706
+ "control"
707
+ ],
708
+ "properties": {
709
+ "run_id": {
710
+ "type": "string",
711
+ "minLength": 1,
712
+ "maxLength": 256
713
+ },
714
+ "invocation_id": {
715
+ "type": "string",
716
+ "minLength": 1,
717
+ "maxLength": 256
718
+ },
719
+ "stream_id": {
720
+ "type": "string",
721
+ "minLength": 1,
722
+ "maxLength": 256
723
+ },
724
+ "agent_session_id": {
725
+ "type": "string",
726
+ "minLength": 1,
727
+ "maxLength": 256
728
+ },
729
+ "session_generation": {
730
+ "type": "integer",
731
+ "minimum": 0,
732
+ "maximum": 9007199254740991
733
+ },
734
+ "seq": {
735
+ "type": "integer",
736
+ "minimum": 1,
737
+ "maximum": 9007199254740991
738
+ },
739
+ "protocol_mode": {
740
+ "$ref": "#/definitions/ProtocolMode"
741
+ },
742
+ "protocol": {
743
+ "type": "string",
744
+ "minLength": 1,
745
+ "maxLength": 128
746
+ },
747
+ "kind": {
748
+ "const": "control"
749
+ },
750
+ "control": {
751
+ "$ref": "#/definitions/HostControl"
752
+ }
753
+ }
754
+ },
755
+ "NotificationMessage": {
756
+ "title": "NotificationMessage",
757
+ "description": "Public, channel-neutral project notification. No runtime context, reasoning, credentials, or tool payloads belong in this envelope.",
758
+ "type": "object",
759
+ "additionalProperties": false,
760
+ "required": [
761
+ "schema",
762
+ "eventId",
763
+ "event",
764
+ "occurredAt",
765
+ "projectId",
766
+ "sourceId",
767
+ "title",
768
+ "text"
769
+ ],
770
+ "properties": {
771
+ "schema": {
772
+ "const": "octo.notification.v2"
773
+ },
774
+ "eventId": {
775
+ "type": "string",
776
+ "minLength": 1,
777
+ "maxLength": 256
778
+ },
779
+ "event": {
780
+ "enum": ["task.event", "execution.succeeded", "execution.failed", "notification.test"]
781
+ },
782
+ "occurredAt": {
783
+ "type": "string",
784
+ "format": "date-time"
785
+ },
786
+ "projectId": {
787
+ "type": "string",
788
+ "minLength": 1,
789
+ "maxLength": 128
790
+ },
791
+ "sourceId": {
792
+ "type": "string",
793
+ "minLength": 1,
794
+ "maxLength": 128
795
+ },
796
+ "title": {
797
+ "type": "string",
798
+ "minLength": 1,
799
+ "maxLength": 256
800
+ },
801
+ "text": {
802
+ "type": "string",
803
+ "maxLength": 4096
804
+ },
805
+ "evt_type": {
806
+ "type": "integer",
807
+ "minimum": 101,
808
+ "maximum": 115
809
+ },
810
+ "task": {
811
+ "type": "object",
812
+ "additionalProperties": false,
813
+ "required": ["id", "title", "status", "row_version", "handler_epoch"],
814
+ "properties": {
815
+ "id": {
816
+ "type": "string",
817
+ "minLength": 1
818
+ },
819
+ "title": {
820
+ "type": "string"
821
+ },
822
+ "status": {
823
+ "enum": ["backlog", "todo", "in_progress", "done", "cancelled"]
824
+ },
825
+ "row_version": {
826
+ "type": "integer",
827
+ "minimum": 1
828
+ },
829
+ "handler_epoch": {
830
+ "type": "integer",
831
+ "minimum": 1
832
+ },
833
+ "responsible_party": {
834
+ "type": ["object", "null"]
835
+ },
836
+ "current_handler": {
837
+ "type": ["object", "null"]
838
+ }
839
+ }
840
+ },
841
+ "taskEvent": {
842
+ "type": "object",
843
+ "additionalProperties": false,
844
+ "required": ["id", "sequence", "evt_type", "actor", "summary", "payload"],
845
+ "properties": {
846
+ "id": {
847
+ "type": "string"
848
+ },
849
+ "sequence": {
850
+ "type": "integer",
851
+ "minimum": 1
852
+ },
853
+ "evt_type": {
854
+ "type": "integer",
855
+ "minimum": 101,
856
+ "maximum": 115
857
+ },
858
+ "actor": {
859
+ "type": "object"
860
+ },
861
+ "task_conversation_id": {
862
+ "type": "string"
863
+ },
864
+ "source_run_id": {
865
+ "type": "string"
866
+ },
867
+ "summary": {
868
+ "type": "string"
869
+ },
870
+ "payload": {
871
+ "type": "object"
872
+ }
873
+ }
874
+ },
875
+ "timeline": {
876
+ "type": "array",
877
+ "maxItems": 20,
878
+ "items": {
879
+ "type": "object",
880
+ "additionalProperties": false,
881
+ "required": ["eventId", "sequence", "evt_type", "summary"],
882
+ "properties": {
883
+ "eventId": {
884
+ "type": "string"
885
+ },
886
+ "sequence": {
887
+ "type": "integer",
888
+ "minimum": 1
889
+ },
890
+ "evt_type": {
891
+ "type": "integer",
892
+ "minimum": 101,
893
+ "maximum": 115
894
+ },
895
+ "summary": {
896
+ "type": "string"
897
+ }
898
+ }
899
+ }
900
+ },
901
+ "timelineTruncated": {
902
+ "type": "boolean"
903
+ },
904
+ "timelineThroughSequence": {
905
+ "type": "integer",
906
+ "minimum": 1
907
+ }
908
+ },
909
+ "allOf": [
910
+ {
911
+ "if": {
912
+ "properties": {
913
+ "event": {
914
+ "const": "task.event"
915
+ }
916
+ }
917
+ },
918
+ "then": {
919
+ "required": ["evt_type", "task", "taskEvent", "timeline", "timelineThroughSequence"]
920
+ },
921
+ "else": {
922
+ "not": {
923
+ "anyOf": [
924
+ {
925
+ "required": ["evt_type"]
926
+ },
927
+ {
928
+ "required": ["task"]
929
+ },
930
+ {
931
+ "required": ["taskEvent"]
932
+ },
933
+ {
934
+ "required": ["timeline"]
935
+ },
936
+ {
937
+ "required": ["timelineThroughSequence"]
938
+ },
939
+ {
940
+ "required": ["timelineTruncated"]
941
+ }
942
+ ]
943
+ }
944
+ }
945
+ }
946
+ ]
947
+ },
948
+ "ApprovalMode": {
949
+ "title": "ApprovalMode",
950
+ "type": "string",
951
+ "enum": ["ask", "assisted", "full_access"]
952
+ },
953
+ "ContextItem": {
954
+ "title": "ContextItem",
955
+ "description": "Open Context item. Built-in types retain their payload contracts; unknown optional types are preserved and ignored by unsupported consumers.",
956
+ "tsType": "{ namespace: string; name: string; guidance?: string; data_format?: 'text'; payload: Record<string, unknown> }",
957
+ "type": "object",
958
+ "additionalProperties": false,
959
+ "required": ["namespace", "name", "payload"],
960
+ "properties": {
961
+ "namespace": {
962
+ "type": "string",
963
+ "pattern": "^[a-z0-9][a-z0-9._-]*$",
964
+ "maxLength": 96
965
+ },
966
+ "name": {
967
+ "type": "string",
968
+ "pattern": "^[a-z0-9][a-z0-9._-]*$",
969
+ "maxLength": 96
970
+ },
971
+ "payload": {
972
+ "type": "object",
973
+ "additionalProperties": true,
974
+ "tsType": "Record<string, unknown>"
975
+ },
976
+ "guidance": {
977
+ "type": "string",
978
+ "description": "Producer-authored context guidance, rendered as ordinary model input."
979
+ },
980
+ "data_format": {
981
+ "const": "text",
982
+ "description": "Explicit extra.* text rendering; payload must contain only a text string. Omit for complete JSON rendering."
983
+ }
984
+ },
985
+ "allOf": [
986
+ {
987
+ "if": { "required": ["data_format"] },
988
+ "then": {
989
+ "properties": {
990
+ "namespace": { "pattern": "^extra\\." },
991
+ "payload": {
992
+ "type": "object",
993
+ "required": ["text"],
994
+ "additionalProperties": false,
995
+ "properties": { "text": { "type": "string" } }
996
+ }
997
+ }
998
+ }
999
+ },
1000
+ {
1001
+ "if": {
1002
+ "properties": {
1003
+ "namespace": {
1004
+ "const": "octo.execution"
1005
+ },
1006
+ "name": {
1007
+ "const": "actmode"
1008
+ }
1009
+ }
1010
+ },
1011
+ "then": {
1012
+ "properties": {
1013
+ "payload": {
1014
+ "$ref": "#/definitions/ContextActmodePayload"
1015
+ }
1016
+ }
1017
+ }
1018
+ },
1019
+ {
1020
+ "if": {
1021
+ "properties": {
1022
+ "namespace": {
1023
+ "const": "octo.execution"
1024
+ },
1025
+ "name": {
1026
+ "const": "model"
1027
+ }
1028
+ }
1029
+ },
1030
+ "then": {
1031
+ "properties": {
1032
+ "payload": {
1033
+ "$ref": "#/definitions/ContextModelPayload"
1034
+ }
1035
+ }
1036
+ }
1037
+ },
1038
+ {
1039
+ "if": {
1040
+ "properties": {
1041
+ "namespace": {
1042
+ "const": "octo.execution"
1043
+ },
1044
+ "name": {
1045
+ "const": "adapter"
1046
+ }
1047
+ }
1048
+ },
1049
+ "then": {
1050
+ "properties": {
1051
+ "payload": {
1052
+ "$ref": "#/definitions/ContextAdapterPayload"
1053
+ }
1054
+ }
1055
+ }
1056
+ },
1057
+ {
1058
+ "if": {
1059
+ "properties": {
1060
+ "namespace": {
1061
+ "const": "octo.execution"
1062
+ },
1063
+ "name": {
1064
+ "const": "workspace"
1065
+ }
1066
+ }
1067
+ },
1068
+ "then": {
1069
+ "properties": {
1070
+ "payload": {
1071
+ "$ref": "#/definitions/ContextWorkspacePayload"
1072
+ }
1073
+ }
1074
+ }
1075
+ },
1076
+ {
1077
+ "if": {
1078
+ "properties": {
1079
+ "namespace": {
1080
+ "const": "octo.execution"
1081
+ },
1082
+ "name": {
1083
+ "const": "limits"
1084
+ }
1085
+ }
1086
+ },
1087
+ "then": {
1088
+ "properties": {
1089
+ "payload": {
1090
+ "$ref": "#/definitions/ContextLimitsPayload"
1091
+ }
1092
+ }
1093
+ }
1094
+ },
1095
+ {
1096
+ "if": {
1097
+ "properties": {
1098
+ "namespace": {
1099
+ "const": "octo.runtime"
1100
+ },
1101
+ "name": {
1102
+ "const": "selection"
1103
+ }
1104
+ }
1105
+ },
1106
+ "then": {
1107
+ "properties": {
1108
+ "payload": {
1109
+ "$ref": "#/definitions/ContextRuntimeSelectionPayload"
1110
+ }
1111
+ }
1112
+ }
1113
+ },
1114
+ {
1115
+ "if": {
1116
+ "properties": {
1117
+ "namespace": {
1118
+ "const": "octo.security"
1119
+ },
1120
+ "name": {
1121
+ "const": "approval_policy"
1122
+ }
1123
+ }
1124
+ },
1125
+ "then": {
1126
+ "properties": {
1127
+ "payload": {
1128
+ "$ref": "#/definitions/ContextApprovalPolicyPayload"
1129
+ }
1130
+ }
1131
+ }
1132
+ },
1133
+ {
1134
+ "if": {
1135
+ "properties": {
1136
+ "namespace": {
1137
+ "const": "octo.content"
1138
+ },
1139
+ "name": {
1140
+ "const": "inline"
1141
+ }
1142
+ }
1143
+ },
1144
+ "then": {
1145
+ "properties": {
1146
+ "payload": {
1147
+ "$ref": "#/definitions/ContextInlinePayload"
1148
+ }
1149
+ }
1150
+ }
1151
+ },
1152
+ {
1153
+ "if": {
1154
+ "properties": {
1155
+ "namespace": {
1156
+ "const": "octo.content"
1157
+ },
1158
+ "name": {
1159
+ "const": "references"
1160
+ }
1161
+ }
1162
+ },
1163
+ "then": {
1164
+ "properties": {
1165
+ "payload": {
1166
+ "$ref": "#/definitions/ContextReferencesPayload"
1167
+ }
1168
+ }
1169
+ }
1170
+ },
1171
+ {
1172
+ "if": {
1173
+ "properties": {
1174
+ "namespace": {
1175
+ "const": "octo.control"
1176
+ },
1177
+ "name": {
1178
+ "const": "instructions"
1179
+ }
1180
+ }
1181
+ },
1182
+ "then": {
1183
+ "properties": {
1184
+ "payload": {
1185
+ "$ref": "#/definitions/ContextInstructionsPayload"
1186
+ }
1187
+ }
1188
+ }
1189
+ },
1190
+ {
1191
+ "if": {
1192
+ "properties": {
1193
+ "namespace": {
1194
+ "const": "octo.execution"
1195
+ },
1196
+ "name": {
1197
+ "const": "envs"
1198
+ }
1199
+ }
1200
+ },
1201
+ "then": {
1202
+ "properties": {
1203
+ "payload": {
1204
+ "$ref": "#/definitions/ContextEnvsPayload"
1205
+ }
1206
+ }
1207
+ }
1208
+ },
1209
+ {
1210
+ "if": {
1211
+ "properties": {
1212
+ "namespace": {
1213
+ "enum": ["octo.execution", "octo.runtime", "octo.security", "octo.control"]
1214
+ }
1215
+ }
1216
+ },
1217
+ "then": {
1218
+ "not": {
1219
+ "required": ["guidance"]
1220
+ }
1221
+ }
1222
+ },
1223
+ {
1224
+ "if": {
1225
+ "properties": {
1226
+ "namespace": {
1227
+ "const": "octo.execution"
1228
+ },
1229
+ "name": {
1230
+ "const": "mcp"
1231
+ }
1232
+ }
1233
+ },
1234
+ "then": {
1235
+ "properties": {
1236
+ "payload": {
1237
+ "$ref": "#/definitions/ContextMcpPayload"
1238
+ }
1239
+ }
1240
+ }
1241
+ }
1242
+ ],
1243
+ "not": {
1244
+ "properties": {
1245
+ "namespace": {
1246
+ "const": "octo.resources"
1247
+ }
1248
+ },
1249
+ "required": ["namespace"]
1250
+ }
1251
+ },
1252
+ "ContextEnvelope": {
1253
+ "title": "ContextEnvelope",
1254
+ "description": "In addition to draft-07 validation, every consumer must enforce the x-octo semantic keywords: unique ordered namespace/name tuples, compact UTF-8 JSON byte budget, JSON nesting depth with the envelope at depth zero, and Unicode scalar strings in every nested value and object key. Canonical hashing uses ECMAScript JSON number serialization, including -0 becoming 0 and normalized exponent notation; object keys are sorted by UTF-16 code units before ECMAScript integer-index enumeration. U+2028/U+2029 and non-ASCII scalar values are not escaped or Unicode-normalized.",
1255
+ "type": "object",
1256
+ "additionalProperties": false,
1257
+ "x-octo-unique-type-keys": true,
1258
+ "x-octo-max-json-bytes": 65536,
1259
+ "x-octo-max-json-depth": 32,
1260
+ "x-octo-unicode-scalar-strings": true,
1261
+ "required": ["schema", "items"],
1262
+ "properties": {
1263
+ "schema": {
1264
+ "const": "octo.context-envelope/v3"
1265
+ },
1266
+ "items": {
1267
+ "type": "array",
1268
+ "maxItems": 32,
1269
+ "items": {
1270
+ "$ref": "#/definitions/ContextItem"
1271
+ }
1272
+ }
1273
+ }
1274
+ },
1275
+ "ContextConfiguration": {
1276
+ "title": "ContextConfiguration",
1277
+ "description": "Agent defaults and mandatory constraints, stored under one external configuration version. Authorized configuration writers may persist system instructions in mandatory with text-only entries. Ephemeral business content and default-layer instructions are forbidden; callers cannot submit trusted control instructions.",
1278
+ "type": "object",
1279
+ "additionalProperties": false,
1280
+ "required": ["defaults", "mandatory"],
1281
+ "properties": {
1282
+ "defaults": {
1283
+ "allOf": [
1284
+ {
1285
+ "$ref": "#/definitions/PersistentContextEnvelope"
1286
+ },
1287
+ {
1288
+ "properties": {
1289
+ "items": {
1290
+ "items": {
1291
+ "not": {
1292
+ "properties": {
1293
+ "namespace": {
1294
+ "const": "octo.control"
1295
+ }
1296
+ }
1297
+ }
1298
+ }
1299
+ }
1300
+ }
1301
+ }
1302
+ ],
1303
+ "tsType": "ContextEnvelope"
1304
+ },
1305
+ "mandatory": {
1306
+ "$ref": "#/definitions/PersistentContextEnvelope"
1307
+ }
1308
+ }
1309
+ },
1310
+ "RunContextProjection": {
1311
+ "title": "RunContextProjection",
1312
+ "description": "Public Context facts. Preparation is distinct from Adapter application or invocation. This projection excludes resource files, trusted instruction text, credentials and Runtime paths.",
1313
+ "type": "object",
1314
+ "additionalProperties": false,
1315
+ "required": [
1316
+ "run_id",
1317
+ "context_hash",
1318
+ "preparation_status",
1319
+ "application_status",
1320
+ "invocation_status",
1321
+ "execution",
1322
+ "model_uses_provider_default",
1323
+ "effort_uses_provider_default"
1324
+ ],
1325
+ "properties": {
1326
+ "run_id": {
1327
+ "type": "string",
1328
+ "minLength": 1
1329
+ },
1330
+ "context_hash": {
1331
+ "type": "string",
1332
+ "pattern": "^sha256:[a-f0-9]{64}$"
1333
+ },
1334
+ "actual_runtime_id": {
1335
+ "type": "string",
1336
+ "minLength": 1
1337
+ },
1338
+ "preparation_status": {
1339
+ "enum": ["unknown", "prepared"]
1340
+ },
1341
+ "application_status": {
1342
+ "enum": ["unknown", "applied"]
1343
+ },
1344
+ "invocation_status": {
1345
+ "const": "unknown"
1346
+ },
1347
+ "model_uses_provider_default": {
1348
+ "type": "boolean"
1349
+ },
1350
+ "effort_uses_provider_default": {
1351
+ "type": "boolean"
1352
+ },
1353
+ "object_materials": {
1354
+ "description": "Frozen inline object facts proven by a matching preparation receipt. Source fields are provenance claims, not access grants. No contents, local handles, paths or credentials are exposed; application is separately evidenced by application_status.",
1355
+ "type": "array",
1356
+ "maxItems": 32,
1357
+ "items": {
1358
+ "$ref": "#/definitions/PublicObjectMaterial"
1359
+ }
1360
+ },
1361
+ "execution": {
1362
+ "type": "object",
1363
+ "additionalProperties": false,
1364
+ "required": ["adapter_type", "approval_mode", "workspace_mode"],
1365
+ "properties": {
1366
+ "adapter_type": {
1367
+ "type": "string",
1368
+ "minLength": 1
1369
+ },
1370
+ "model": {
1371
+ "type": "string",
1372
+ "minLength": 1
1373
+ },
1374
+ "effort": {
1375
+ "type": "string",
1376
+ "minLength": 1
1377
+ },
1378
+ "approval_mode": {
1379
+ "enum": ["ask", "assisted", "full_access"]
1380
+ },
1381
+ "workspace_mode": {
1382
+ "enum": ["fixed", "random", "none"]
1383
+ }
1384
+ }
1385
+ }
1386
+ }
1387
+ },
1388
+ "PublicObjectMaterial": {
1389
+ "type": "object",
1390
+ "additionalProperties": false,
1391
+ "required": ["resource_ref", "object_type", "origin", "byte_size", "digest"],
1392
+ "properties": {
1393
+ "resource_ref": {
1394
+ "type": "string",
1395
+ "pattern": "^selection-[a-zA-Z0-9][a-zA-Z0-9_.:@-]{0,190}$"
1396
+ },
1397
+ "object_type": {
1398
+ "enum": [
1399
+ "task",
1400
+ "discussion",
1401
+ "discussion_comment",
1402
+ "discussion_reply",
1403
+ "local_file",
1404
+ "drive_file"
1405
+ ]
1406
+ },
1407
+ "object_id": {
1408
+ "type": "string",
1409
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_.:@-]{0,190}$"
1410
+ },
1411
+ "origin": {
1412
+ "enum": ["mention", "attachment", "object_action", "source_entity"]
1413
+ },
1414
+ "revision": {
1415
+ "type": "string",
1416
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_.:@-]{0,190}$"
1417
+ },
1418
+ "byte_size": {
1419
+ "type": "integer",
1420
+ "minimum": 1,
1421
+ "maximum": 32768
1422
+ },
1423
+ "digest": {
1424
+ "type": "string",
1425
+ "pattern": "^sha256:[a-f0-9]{64}$"
1426
+ },
1427
+ "object_scope": {
1428
+ "type": "object",
1429
+ "additionalProperties": false,
1430
+ "required": ["type", "id"],
1431
+ "properties": {
1432
+ "type": {
1433
+ "enum": ["user", "teamspace"]
1434
+ },
1435
+ "id": {
1436
+ "type": "string",
1437
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_.:@-]{0,190}$"
1438
+ }
1439
+ }
1440
+ },
1441
+ "selector": {
1442
+ "type": "object",
1443
+ "additionalProperties": false,
1444
+ "required": ["mode"],
1445
+ "properties": {
1446
+ "mode": {
1447
+ "enum": ["core", "content", "history", "chain", "metadata"]
1448
+ },
1449
+ "start": {
1450
+ "type": "integer",
1451
+ "minimum": 0,
1452
+ "maximum": 9007199254740991
1453
+ },
1454
+ "end": {
1455
+ "type": "integer",
1456
+ "minimum": 0,
1457
+ "maximum": 9007199254740991
1458
+ }
1459
+ }
1460
+ }
1461
+ },
1462
+ "allOf": [
1463
+ {
1464
+ "if": {
1465
+ "properties": {
1466
+ "object_type": {
1467
+ "const": "local_file"
1468
+ }
1469
+ }
1470
+ },
1471
+ "then": {
1472
+ "not": {
1473
+ "required": ["object_id"]
1474
+ }
1475
+ },
1476
+ "else": {
1477
+ "required": ["object_id"]
1478
+ }
1479
+ }
1480
+ ]
1481
+ },
1482
+ "ContextPreparationReceipt": {
1483
+ "title": "ContextPreparationReceipt",
1484
+ "description": "Workspace preparation for the current Run lease and frozen execution Context; it does not prove Provider use of model context.",
1485
+ "type": "object",
1486
+ "additionalProperties": false,
1487
+ "required": [
1488
+ "context_hash",
1489
+ "run_id",
1490
+ "lease_id",
1491
+ "fencing_token",
1492
+ "workspace_mode",
1493
+ "workspace_path",
1494
+ "provider_state_dir",
1495
+ "warnings"
1496
+ ],
1497
+ "properties": {
1498
+ "context_hash": {
1499
+ "type": "string",
1500
+ "pattern": "^sha256:[a-f0-9]{64}$"
1501
+ },
1502
+ "run_id": {
1503
+ "type": "string",
1504
+ "minLength": 1
1505
+ },
1506
+ "lease_id": {
1507
+ "type": "string",
1508
+ "minLength": 1
1509
+ },
1510
+ "fencing_token": {
1511
+ "type": "integer",
1512
+ "minimum": 1,
1513
+ "maximum": 9007199254740991
1514
+ },
1515
+ "workspace_mode": {
1516
+ "enum": ["fixed", "random", "none"]
1517
+ },
1518
+ "workspace_path": {
1519
+ "type": "string"
1520
+ },
1521
+ "provider_state_dir": {
1522
+ "type": "string"
1523
+ },
1524
+ "warnings": {
1525
+ "type": "array",
1526
+ "maxItems": 256,
1527
+ "items": {
1528
+ "type": "string",
1529
+ "maxLength": 4096
1530
+ }
1531
+ }
1532
+ }
1533
+ },
1534
+ "PersistentContextEnvelope": {
1535
+ "allOf": [
1536
+ {
1537
+ "$ref": "#/definitions/ContextEnvelope"
1538
+ },
1539
+ {
1540
+ "properties": {
1541
+ "items": {
1542
+ "items": {
1543
+ "allOf": [
1544
+ {
1545
+ "not": {
1546
+ "properties": {
1547
+ "namespace": {
1548
+ "const": "octo.content"
1549
+ },
1550
+ "name": {
1551
+ "const": "inline"
1552
+ }
1553
+ }
1554
+ }
1555
+ },
1556
+ {
1557
+ "anyOf": [
1558
+ {
1559
+ "properties": {
1560
+ "namespace": {
1561
+ "const": "octo.execution"
1562
+ },
1563
+ "name": {
1564
+ "const": "adapter"
1565
+ }
1566
+ }
1567
+ },
1568
+ {
1569
+ "properties": {
1570
+ "namespace": {
1571
+ "const": "octo.execution"
1572
+ },
1573
+ "name": {
1574
+ "const": "model"
1575
+ }
1576
+ }
1577
+ },
1578
+ {
1579
+ "properties": {
1580
+ "namespace": {
1581
+ "const": "octo.execution"
1582
+ },
1583
+ "name": {
1584
+ "const": "workspace"
1585
+ }
1586
+ }
1587
+ },
1588
+ {
1589
+ "properties": {
1590
+ "namespace": {
1591
+ "const": "octo.execution"
1592
+ },
1593
+ "name": {
1594
+ "const": "limits"
1595
+ }
1596
+ }
1597
+ },
1598
+ {
1599
+ "properties": {
1600
+ "namespace": {
1601
+ "const": "octo.runtime"
1602
+ },
1603
+ "name": {
1604
+ "const": "selection"
1605
+ }
1606
+ }
1607
+ },
1608
+ {
1609
+ "properties": {
1610
+ "namespace": {
1611
+ "const": "octo.security"
1612
+ },
1613
+ "name": {
1614
+ "const": "approval_policy"
1615
+ }
1616
+ }
1617
+ },
1618
+ {
1619
+ "properties": {
1620
+ "namespace": {
1621
+ "const": "octo.content"
1622
+ },
1623
+ "name": {
1624
+ "const": "inline"
1625
+ }
1626
+ }
1627
+ },
1628
+ {
1629
+ "properties": {
1630
+ "namespace": {
1631
+ "const": "octo.content"
1632
+ },
1633
+ "name": {
1634
+ "const": "references"
1635
+ }
1636
+ }
1637
+ },
1638
+ {
1639
+ "properties": {
1640
+ "namespace": {
1641
+ "const": "octo.control"
1642
+ },
1643
+ "name": {
1644
+ "const": "instructions"
1645
+ }
1646
+ }
1647
+ }
1648
+ ]
1649
+ }
1650
+ ]
1651
+ }
1652
+ }
1653
+ }
1654
+ }
1655
+ ],
1656
+ "tsType": "ContextEnvelope"
1657
+ },
1658
+ "ContextAdapterPayload": {
1659
+ "type": "object",
1660
+ "additionalProperties": false,
1661
+ "required": ["type"],
1662
+ "properties": {
1663
+ "type": {
1664
+ "type": "string",
1665
+ "minLength": 1
1666
+ },
1667
+ "provider_agent_id": {
1668
+ "type": "string",
1669
+ "pattern": "^[a-z0-9_][a-z0-9_-]{0,63}$"
1670
+ }
1671
+ },
1672
+ "if": {
1673
+ "properties": {
1674
+ "type": {
1675
+ "const": "openclaw"
1676
+ }
1677
+ }
1678
+ },
1679
+ "then": {
1680
+ "required": ["provider_agent_id"]
1681
+ },
1682
+ "else": {
1683
+ "not": {
1684
+ "required": ["provider_agent_id"]
1685
+ }
1686
+ }
1687
+ },
1688
+ "ContextActmodePayload": {
1689
+ "type": "object",
1690
+ "additionalProperties": false,
1691
+ "required": ["mode"],
1692
+ "properties": {
1693
+ "mode": {
1694
+ "enum": ["default", "plan"]
1695
+ }
1696
+ }
1697
+ },
1698
+ "ExecutionEvidence": {
1699
+ "type": "object",
1700
+ "additionalProperties": false,
1701
+ "required": ["actmode"],
1702
+ "properties": {
1703
+ "actmode": {
1704
+ "type": "object",
1705
+ "additionalProperties": false,
1706
+ "required": ["requested", "effective", "status"],
1707
+ "properties": {
1708
+ "requested": {
1709
+ "enum": ["default", "plan"]
1710
+ },
1711
+ "effective": {
1712
+ "enum": ["default", "plan", null]
1713
+ },
1714
+ "status": {
1715
+ "enum": ["applied", "fallback", "unknown"]
1716
+ },
1717
+ "nativeMode": {
1718
+ "type": "string",
1719
+ "minLength": 1
1720
+ },
1721
+ "reason": {
1722
+ "enum": ["provider_unsupported", "adapter_unmapped", "provider_unconfirmed"]
1723
+ }
1724
+ }
1725
+ }
1726
+ }
1727
+ },
1728
+ "ContextModelPayload": {
1729
+ "type": "object",
1730
+ "additionalProperties": false,
1731
+ "minProperties": 1,
1732
+ "properties": {
1733
+ "selection": {
1734
+ "$ref": "#/definitions/ContextModelSelectionPayload"
1735
+ },
1736
+ "reasoning": {
1737
+ "$ref": "#/definitions/ContextReasoningPayload"
1738
+ }
1739
+ }
1740
+ },
1741
+ "ContextReasoningPayload": {
1742
+ "type": "object",
1743
+ "additionalProperties": false,
1744
+ "properties": {
1745
+ "effort": {
1746
+ "type": "string",
1747
+ "minLength": 1
1748
+ },
1749
+ "use_provider_default": {
1750
+ "const": true
1751
+ }
1752
+ },
1753
+ "oneOf": [
1754
+ {
1755
+ "required": ["effort"],
1756
+ "not": {
1757
+ "required": ["use_provider_default"]
1758
+ }
1759
+ },
1760
+ {
1761
+ "required": ["use_provider_default"],
1762
+ "not": {
1763
+ "required": ["effort"]
1764
+ }
1765
+ }
1766
+ ]
1767
+ },
1768
+ "ContextWorkspacePayload": {
1769
+ "description": "fixed uses the supplied path; random creates a workspace on the AgentSession's first run and reuses it for subsequent runs; none delegates workspace ownership to a preset Agent.",
1770
+ "oneOf": [
1771
+ {
1772
+ "type": "object",
1773
+ "additionalProperties": false,
1774
+ "required": ["mode", "path"],
1775
+ "properties": {
1776
+ "mode": {
1777
+ "const": "fixed"
1778
+ },
1779
+ "path": {
1780
+ "type": "string",
1781
+ "minLength": 1
1782
+ }
1783
+ }
1784
+ },
1785
+ {
1786
+ "type": "object",
1787
+ "additionalProperties": false,
1788
+ "required": ["mode"],
1789
+ "properties": {
1790
+ "mode": {
1791
+ "const": "random"
1792
+ }
1793
+ }
1794
+ },
1795
+ {
1796
+ "type": "object",
1797
+ "required": ["mode"],
1798
+ "additionalProperties": false,
1799
+ "properties": {
1800
+ "mode": {
1801
+ "const": "none"
1802
+ }
1803
+ }
1804
+ }
1805
+ ]
1806
+ },
1807
+ "ContextLimitsPayload": {
1808
+ "description": "Snake-case frozen watchdog limits, with the same bounds as RuntimeLimits. Legacy enforcement=observe cannot be combined with v2 settings.",
1809
+ "type": "object",
1810
+ "additionalProperties": false,
1811
+ "properties": {
1812
+ "first_frame_timeout_ms": {
1813
+ "type": "integer",
1814
+ "minimum": 100,
1815
+ "maximum": 1800000
1816
+ },
1817
+ "model_idle_timeout_ms": {
1818
+ "type": "integer",
1819
+ "minimum": 100,
1820
+ "maximum": 3600000
1821
+ },
1822
+ "model_idle_warning_ms": {
1823
+ "type": "integer",
1824
+ "minimum": 100,
1825
+ "maximum": 3600000
1826
+ },
1827
+ "model_idle_policy": {
1828
+ "enum": ["enforce", "observe"]
1829
+ },
1830
+ "tool_timeout_ms": {
1831
+ "type": "integer",
1832
+ "minimum": 100,
1833
+ "maximum": 86400000
1834
+ },
1835
+ "tool_wall_timeout_ms": {
1836
+ "type": "integer",
1837
+ "minimum": 100,
1838
+ "maximum": 86400000
1839
+ },
1840
+ "run_timeout_ms": {
1841
+ "type": "integer",
1842
+ "minimum": 100,
1843
+ "maximum": 604800000
1844
+ },
1845
+ "cancel_grace_ms": {
1846
+ "type": "integer",
1847
+ "minimum": 100,
1848
+ "maximum": 60000
1849
+ },
1850
+ "enforcement": {
1851
+ "enum": ["enforce", "observe"]
1852
+ }
1853
+ },
1854
+ "if": {
1855
+ "required": ["enforcement"],
1856
+ "properties": {
1857
+ "enforcement": {
1858
+ "const": "observe"
1859
+ }
1860
+ }
1861
+ },
1862
+ "then": {
1863
+ "not": {
1864
+ "anyOf": [
1865
+ {
1866
+ "required": ["model_idle_policy"]
1867
+ },
1868
+ {
1869
+ "required": ["model_idle_warning_ms"]
1870
+ },
1871
+ {
1872
+ "required": ["tool_wall_timeout_ms"]
1873
+ }
1874
+ ]
1875
+ }
1876
+ }
1877
+ },
1878
+ "ContextRuntimeSelectionPayload": {
1879
+ "type": "object",
1880
+ "additionalProperties": false,
1881
+ "required": ["mode"],
1882
+ "properties": {
1883
+ "mode": {
1884
+ "enum": ["candidates", "explicit"]
1885
+ },
1886
+ "runtime_id": {
1887
+ "type": "string",
1888
+ "minLength": 1
1889
+ },
1890
+ "runtime_ids": {
1891
+ "type": "array",
1892
+ "minItems": 1,
1893
+ "maxItems": 64,
1894
+ "uniqueItems": true,
1895
+ "items": {
1896
+ "type": "string",
1897
+ "minLength": 1
1898
+ }
1899
+ },
1900
+ "strategy": {
1901
+ "const": "preferred_failover"
1902
+ },
1903
+ "offline_behavior": {
1904
+ "enum": ["wait", "fail"]
1905
+ },
1906
+ "failover": {
1907
+ "enum": ["candidates", "none"]
1908
+ }
1909
+ },
1910
+ "oneOf": [
1911
+ {
1912
+ "properties": {
1913
+ "mode": {
1914
+ "const": "candidates"
1915
+ }
1916
+ },
1917
+ "required": ["runtime_ids", "strategy"],
1918
+ "not": {
1919
+ "required": ["runtime_id"]
1920
+ }
1921
+ },
1922
+ {
1923
+ "properties": {
1924
+ "mode": {
1925
+ "const": "explicit"
1926
+ }
1927
+ },
1928
+ "required": ["runtime_id"],
1929
+ "not": {
1930
+ "anyOf": [
1931
+ {
1932
+ "required": ["runtime_ids"]
1933
+ },
1934
+ {
1935
+ "required": ["strategy"]
1936
+ }
1937
+ ]
1938
+ }
1939
+ }
1940
+ ]
1941
+ },
1942
+ "ContextApprovalPolicyPayload": {
1943
+ "type": "object",
1944
+ "additionalProperties": false,
1945
+ "required": ["mode"],
1946
+ "properties": {
1947
+ "mode": {
1948
+ "$ref": "#/definitions/ApprovalMode"
1949
+ }
1950
+ }
1951
+ },
1952
+ "ContextSelectionEntry": {
1953
+ "description": "Untrusted inline selection text with optional resource reference, source metadata and summary. Source metadata is not an authorization claim.",
1954
+ "type": "object",
1955
+ "additionalProperties": false,
1956
+ "required": ["text"],
1957
+ "properties": {
1958
+ "text": {
1959
+ "type": "string",
1960
+ "minLength": 1
1961
+ },
1962
+ "resource_ref": {
1963
+ "type": "string",
1964
+ "minLength": 1
1965
+ },
1966
+ "source": {
1967
+ "type": ["object", "string"],
1968
+ "additionalProperties": true
1969
+ },
1970
+ "summary": {
1971
+ "type": "string"
1972
+ }
1973
+ }
1974
+ },
1975
+ "ContextResourceEntry": {
1976
+ "description": "Declarative MCP resource operation. Only deployed scoped operations may execute; schema validation does not authorize access.",
1977
+ "type": "object",
1978
+ "additionalProperties": false,
1979
+ "required": ["resource_ref", "resolver", "locator"],
1980
+ "properties": {
1981
+ "resource_ref": {
1982
+ "type": "string",
1983
+ "minLength": 1
1984
+ },
1985
+ "resolver": {
1986
+ "const": "mcp"
1987
+ },
1988
+ "locator": {
1989
+ "type": "object"
1990
+ },
1991
+ "params": {
1992
+ "description": "Frozen non-secret JSON parameters supplied by the authenticated resolver plan, not model-generated commands.",
1993
+ "type": "object",
1994
+ "additionalProperties": true,
1995
+ "tsType": "Record<string, unknown>"
1996
+ },
1997
+ "authorization_ref": {
1998
+ "type": "string",
1999
+ "minLength": 1
2000
+ },
2001
+ "revision": {
2002
+ "type": "string",
2003
+ "minLength": 1
2004
+ }
2005
+ },
2006
+ "allOf": [
2007
+ {
2008
+ "properties": {
2009
+ "locator": {
2010
+ "$ref": "#/definitions/ContextMcpLocator"
2011
+ }
2012
+ }
2013
+ }
2014
+ ]
2015
+ },
2016
+ "ContextMcpLocator": {
2017
+ "type": "object",
2018
+ "additionalProperties": false,
2019
+ "required": ["server_ref", "tool"],
2020
+ "properties": {
2021
+ "server_ref": {
2022
+ "type": "string",
2023
+ "minLength": 1
2024
+ },
2025
+ "tool": {
2026
+ "type": "string",
2027
+ "minLength": 1
2028
+ }
2029
+ }
2030
+ },
2031
+ "ContextInstructionEntry": {
2032
+ "description": "Control instruction containing only non-empty text. Authorization belongs to the authenticated upstream boundary, not to a caller-supplied source label.",
2033
+ "type": "object",
2034
+ "additionalProperties": false,
2035
+ "required": ["text"],
2036
+ "properties": {
2037
+ "text": {
2038
+ "type": "string",
2039
+ "minLength": 1
2040
+ }
2041
+ }
2042
+ },
2043
+ "ContextInstructionsPayload": {
2044
+ "type": "object",
2045
+ "additionalProperties": false,
2046
+ "required": ["entries"],
2047
+ "properties": {
2048
+ "entries": {
2049
+ "type": "array",
2050
+ "items": {
2051
+ "$ref": "#/definitions/ContextInstructionEntry"
2052
+ }
2053
+ }
2054
+ }
2055
+ },
2056
+ "ContextContinuityPayload": {
2057
+ "description": "A channel continuity descriptor. The x-octo-matching-trigger-fields keyword requires trigger_fact.message_id == trigger_message_id and matching presence/value of trigger_fact.message_seq and trigger_seq.",
2058
+ "x-octo-matching-trigger-fields": true,
2059
+ "allOf": [
2060
+ {
2061
+ "$ref": "#/definitions/ChannelContextDescriptor"
2062
+ },
2063
+ {
2064
+ "properties": {
2065
+ "session_generation": {
2066
+ "maximum": 9007199254740991
2067
+ },
2068
+ "trigger_seq": {
2069
+ "maximum": 9007199254740991
2070
+ },
2071
+ "trigger_fact": {
2072
+ "properties": {
2073
+ "message_seq": {
2074
+ "maximum": 9007199254740991
2075
+ },
2076
+ "occurred_at_ms": {
2077
+ "maximum": 9007199254740991
2078
+ }
2079
+ }
2080
+ }
2081
+ }
2082
+ }
2083
+ ]
2084
+ },
2085
+ "ResolvedRuntimeSelection": {
2086
+ "title": "ResolvedRuntimeSelection",
2087
+ "description": "Worker-frozen Context runtime candidates. Explicit selection cannot fail over.",
2088
+ "x-octo-unicode-scalar-strings": true,
2089
+ "x-octo-runtime-selection-invariants": true,
2090
+ "type": "object",
2091
+ "additionalProperties": false,
2092
+ "required": [
2093
+ "schema",
2094
+ "selection_mode",
2095
+ "authorized_candidates",
2096
+ "offline_behavior",
2097
+ "failover"
2098
+ ],
2099
+ "properties": {
2100
+ "schema": {
2101
+ "const": "octo.runtime-selection/v2"
2102
+ },
2103
+ "selection_mode": {
2104
+ "enum": ["explicit", "candidates"]
2105
+ },
2106
+ "explicit_runtime_id": {
2107
+ "type": "string",
2108
+ "minLength": 1,
2109
+ "maxLength": 191
2110
+ },
2111
+ "authorized_candidates": {
2112
+ "type": "array",
2113
+ "minItems": 1,
2114
+ "maxItems": 64,
2115
+ "items": {
2116
+ "type": "object",
2117
+ "additionalProperties": false,
2118
+ "required": ["runtime_id", "priority", "owner_subject_type", "owner_subject_id"],
2119
+ "properties": {
2120
+ "runtime_id": {
2121
+ "type": "string",
2122
+ "minLength": 1,
2123
+ "maxLength": 191
2124
+ },
2125
+ "priority": {
2126
+ "type": "integer",
2127
+ "minimum": 1,
2128
+ "maximum": 9007199254740991
2129
+ },
2130
+ "owner_subject_type": {
2131
+ "enum": ["user", "teamspace"]
2132
+ },
2133
+ "owner_subject_id": {
2134
+ "type": "string",
2135
+ "minLength": 1,
2136
+ "maxLength": 191
2137
+ }
2138
+ }
2139
+ }
2140
+ },
2141
+ "offline_behavior": {
2142
+ "enum": ["wait", "fail"]
2143
+ },
2144
+ "failover": {
2145
+ "enum": ["candidates", "none"]
2146
+ }
2147
+ },
2148
+ "allOf": [
2149
+ {
2150
+ "if": {
2151
+ "properties": {
2152
+ "selection_mode": {
2153
+ "const": "explicit"
2154
+ }
2155
+ }
2156
+ },
2157
+ "then": {
2158
+ "required": ["explicit_runtime_id"],
2159
+ "properties": {
2160
+ "authorized_candidates": {
2161
+ "maxItems": 1
2162
+ },
2163
+ "failover": {
2164
+ "const": "none"
2165
+ }
2166
+ }
2167
+ },
2168
+ "else": {
2169
+ "not": {
2170
+ "required": ["explicit_runtime_id"]
2171
+ }
2172
+ }
2173
+ }
2174
+ ]
2175
+ },
2176
+ "ResolvedExecutionPlan": {
2177
+ "title": "ResolvedExecutionPlan",
2178
+ "x-octo-unicode-scalar-strings": true,
2179
+ "type": "object",
2180
+ "additionalProperties": false,
2181
+ "required": ["agent_source", "adapter_type", "workdir", "approval_mode"],
2182
+ "properties": {
2183
+ "actmode": {
2184
+ "enum": ["default", "plan"]
2185
+ },
2186
+ "adapter_type": {
2187
+ "type": "string",
2188
+ "minLength": 1
2189
+ },
2190
+ "workdir": {
2191
+ "type": "string"
2192
+ },
2193
+ "workspace": {
2194
+ "$ref": "#/definitions/ContextWorkspacePayload"
2195
+ },
2196
+ "model": {
2197
+ "type": "string",
2198
+ "minLength": 1
2199
+ },
2200
+ "effort": {
2201
+ "type": "string",
2202
+ "minLength": 1
2203
+ },
2204
+ "approval_mode": {
2205
+ "$ref": "#/definitions/ApprovalMode"
2206
+ },
2207
+ "runtime_limits": {
2208
+ "$ref": "#/definitions/ContextLimitsPayload"
2209
+ },
2210
+ "provider_agent_id": {
2211
+ "type": "string",
2212
+ "pattern": "^[a-z0-9_][a-z0-9_-]{0,63}$"
2213
+ },
2214
+ "agent_source": {
2215
+ "$ref": "#/definitions/AgentSource"
2216
+ },
2217
+ "envs": {
2218
+ "$ref": "#/definitions/ContextEnvsPayload"
2219
+ },
2220
+ "mcp": {
2221
+ "$ref": "#/definitions/ContextMcpPayload"
2222
+ }
2223
+ },
2224
+ "if": {
2225
+ "properties": {
2226
+ "agent_source": {
2227
+ "const": "provisioned"
2228
+ },
2229
+ "workdir": {
2230
+ "const": ""
2231
+ }
2232
+ },
2233
+ "required": ["agent_source", "workdir"]
2234
+ },
2235
+ "then": {
2236
+ "required": ["workspace"],
2237
+ "properties": {
2238
+ "workspace": {
2239
+ "properties": {
2240
+ "mode": {
2241
+ "const": "random"
2242
+ }
2243
+ }
2244
+ }
2245
+ }
2246
+ },
2247
+ "allOf": [
2248
+ {
2249
+ "if": {
2250
+ "properties": {
2251
+ "adapter_type": {
2252
+ "const": "openclaw"
2253
+ }
2254
+ }
2255
+ },
2256
+ "then": {
2257
+ "required": ["provider_agent_id"]
2258
+ },
2259
+ "else": {
2260
+ "not": {
2261
+ "required": ["provider_agent_id"]
2262
+ }
2263
+ }
2264
+ },
2265
+ {
2266
+ "if": {
2267
+ "properties": {
2268
+ "agent_source": {
2269
+ "const": "preset"
2270
+ }
2271
+ },
2272
+ "required": ["agent_source"]
2273
+ },
2274
+ "then": {
2275
+ "required": ["provider_agent_id"]
2276
+ }
2277
+ }
2278
+ ]
2279
+ },
2280
+ "MessageChannel": {
2281
+ "title": "MessageChannel",
2282
+ "description": "Provider-neutral assistant output channel. analysis is reasoning-class content gated by exposure; commentary is public in-run progress; final is answer content delivered only after the Run reaches a completed terminal state.",
2283
+ "type": "string",
2284
+ "enum": ["analysis", "commentary", "final"]
2285
+ },
2286
+ "MessageExposure": {
2287
+ "title": "MessageExposure",
2288
+ "description": "Adapter-authenticated classification of analysis content. public_reasoning, public_summary, and public_plan may enter a public Presentation; missing values are unknown.",
2289
+ "type": "string",
2290
+ "enum": ["public_reasoning", "public_summary", "public_plan", "private_reasoning", "unknown"]
2291
+ },
2292
+ "MessageProvenance": {
2293
+ "title": "MessageProvenance",
2294
+ "description": "Provider-native provenance written by the adapter. Audience projectors use it to audit public exposure and clients cannot override it.",
2295
+ "type": "object",
2296
+ "additionalProperties": false,
2297
+ "required": ["provider", "nativeEvent"],
2298
+ "properties": {
2299
+ "provider": {
2300
+ "description": "Adapter or provider type that produced the message.",
2301
+ "type": "string"
2302
+ },
2303
+ "nativeEvent": {
2304
+ "description": "Provider-native event type that was normalized.",
2305
+ "type": "string"
2306
+ }
2307
+ }
2308
+ },
2309
+ "FailureAction": {
2310
+ "title": "FailureAction",
2311
+ "description": "A catalog-controlled recovery action. Clients render labelKey and must not execute arbitrary commands from this object.",
2312
+ "type": "object",
2313
+ "additionalProperties": false,
2314
+ "required": ["type", "labelKey"],
2315
+ "properties": {
2316
+ "type": {
2317
+ "type": "string",
2318
+ "enum": [
2319
+ "retry",
2320
+ "retry_later",
2321
+ "update_credentials",
2322
+ "change_model",
2323
+ "check_runtime",
2324
+ "install_dependency",
2325
+ "fix_permissions",
2326
+ "contact_admin"
2327
+ ]
2328
+ },
2329
+ "labelKey": {
2330
+ "type": "string",
2331
+ "minLength": 1
2332
+ }
2333
+ }
2334
+ },
2335
+ "FailureSource": {
2336
+ "title": "FailureSource",
2337
+ "description": "Low-cardinality component identity. It intentionally excludes hostnames, paths, accounts, and tenant data.",
2338
+ "type": "object",
2339
+ "additionalProperties": false,
2340
+ "required": ["component"],
2341
+ "properties": {
2342
+ "component": {
2343
+ "type": "string",
2344
+ "enum": ["octo-runtime", "octo-agent-worker"]
2345
+ },
2346
+ "adapter": {
2347
+ "type": "string",
2348
+ "minLength": 1,
2349
+ "maxLength": 128
2350
+ }
2351
+ }
2352
+ },
2353
+ "FailureCause": {
2354
+ "title": "FailureCause",
2355
+ "description": "Sanitized machine-readable root cause. Raw stderr, response bodies, paths, and credentials are forbidden.",
2356
+ "type": "object",
2357
+ "additionalProperties": false,
2358
+ "required": ["reasonCode"],
2359
+ "properties": {
2360
+ "reasonCode": {
2361
+ "type": "string",
2362
+ "minLength": 1,
2363
+ "maxLength": 128
2364
+ },
2365
+ "httpStatus": {
2366
+ "type": "integer",
2367
+ "minimum": 100,
2368
+ "maximum": 599
2369
+ }
2370
+ }
2371
+ },
2372
+ "FailureEnvelope": {
2373
+ "title": "FailureEnvelope",
2374
+ "description": "Versioned, safe failure fact shared by Runtime, Worker, and channel projectors. Public codes are immutable catalog identifiers; dynamic diagnostics stay outside this object.",
2375
+ "type": "object",
2376
+ "additionalProperties": false,
2377
+ "required": [
2378
+ "schemaVersion",
2379
+ "code",
2380
+ "reasonCode",
2381
+ "category",
2382
+ "stage",
2383
+ "messageKey",
2384
+ "params",
2385
+ "retryable",
2386
+ "action",
2387
+ "diagnosticId",
2388
+ "source",
2389
+ "occurredAt"
2390
+ ],
2391
+ "properties": {
2392
+ "schemaVersion": {
2393
+ "type": "integer",
2394
+ "const": 1
2395
+ },
2396
+ "code": {
2397
+ "type": "string",
2398
+ "pattern": "^OH-[A-Z]{3}-[0-9]{4}$"
2399
+ },
2400
+ "reasonCode": {
2401
+ "type": "string",
2402
+ "minLength": 1,
2403
+ "maxLength": 128
2404
+ },
2405
+ "category": {
2406
+ "type": "string",
2407
+ "minLength": 1,
2408
+ "maxLength": 64
2409
+ },
2410
+ "stage": {
2411
+ "type": "string",
2412
+ "minLength": 1,
2413
+ "maxLength": 128
2414
+ },
2415
+ "messageKey": {
2416
+ "type": "string",
2417
+ "minLength": 1,
2418
+ "maxLength": 128
2419
+ },
2420
+ "params": {
2421
+ "type": "object",
2422
+ "description": "Catalog-allowlisted presentation parameters only.",
2423
+ "additionalProperties": {
2424
+ "type": ["string", "number", "boolean"]
2425
+ }
2426
+ },
2427
+ "retryable": {
2428
+ "type": "boolean"
2429
+ },
2430
+ "retryAfterMs": {
2431
+ "type": "integer",
2432
+ "minimum": 0
2433
+ },
2434
+ "action": {
2435
+ "$ref": "#/definitions/FailureAction"
2436
+ },
2437
+ "diagnosticId": {
2438
+ "type": "string",
2439
+ "pattern": "^diag_[0-9a-f]{32}$"
2440
+ },
2441
+ "source": {
2442
+ "$ref": "#/definitions/FailureSource"
2443
+ },
2444
+ "cause": {
2445
+ "$ref": "#/definitions/FailureCause"
2446
+ },
2447
+ "occurredAt": {
2448
+ "type": "string",
2449
+ "format": "date-time"
2450
+ }
2451
+ }
2452
+ },
2453
+ "ProviderSession": {
2454
+ "title": "ProviderSession",
2455
+ "description": "Provider-owned session resume data. Core treats sessionId and adapter extension fields as opaque.",
2456
+ "type": "object",
2457
+ "additionalProperties": true,
2458
+ "required": ["sessionId"],
2459
+ "properties": {
2460
+ "sessionId": {
2461
+ "description": "Opaque provider session identifier.",
2462
+ "type": "string"
2463
+ },
2464
+ "resumable": {
2465
+ "description": "Whether the provider declares that later invocations can resume this session.",
2466
+ "type": "boolean"
2467
+ },
2468
+ "requireResume": {
2469
+ "description": "Require the original provider session; adapters must reject rather than start a fresh fallback. Currently implemented by Codex.",
2470
+ "type": "boolean"
2471
+ },
2472
+ "resumeOutcome": {
2473
+ "description": "Continuity outcome for this session update. Compaction applies to the next turn; fresh fallback applies to the current turn.",
2474
+ "type": "string",
2475
+ "enum": ["new", "resumed", "fresh_fallback", "compacted"]
2476
+ },
2477
+ "resumeFallback": {
2478
+ "description": "Low-cardinality reason for a fresh resume fallback.",
2479
+ "type": "string"
2480
+ },
2481
+ "contextInputVariant": {
2482
+ "description": "Frozen context input variant actually selected for the current provider turn.",
2483
+ "type": "string",
2484
+ "enum": ["primary", "recovery"]
2485
+ }
2486
+ }
2487
+ },
2488
+ "RuntimeLimits": {
2489
+ "title": "RuntimeLimits",
2490
+ "description": "Runtime-owned phase-aware invocation watchdog budgets.",
2491
+ "type": "object",
2492
+ "additionalProperties": false,
2493
+ "properties": {
2494
+ "firstFrameTimeoutMs": {
2495
+ "type": "integer",
2496
+ "minimum": 100,
2497
+ "maximum": 1800000
2498
+ },
2499
+ "modelIdleTimeoutMs": {
2500
+ "type": "integer",
2501
+ "minimum": 100,
2502
+ "maximum": 3600000
2503
+ },
2504
+ "modelIdleWarningMs": {
2505
+ "type": "integer",
2506
+ "minimum": 100,
2507
+ "maximum": 3600000
2508
+ },
2509
+ "modelIdlePolicy": {
2510
+ "type": "string",
2511
+ "enum": ["observe", "enforce"]
2512
+ },
2513
+ "toolTimeoutMs": {
2514
+ "type": "integer",
2515
+ "minimum": 100,
2516
+ "maximum": 86400000
2517
+ },
2518
+ "toolWallTimeoutMs": {
2519
+ "type": "integer",
2520
+ "minimum": 100,
2521
+ "maximum": 86400000
2522
+ },
2523
+ "runTimeoutMs": {
2524
+ "type": "integer",
2525
+ "minimum": 100,
2526
+ "maximum": 604800000
2527
+ },
2528
+ "cancelGraceMs": {
2529
+ "type": "integer",
2530
+ "minimum": 100,
2531
+ "maximum": 60000
2532
+ },
2533
+ "enforcement": {
2534
+ "type": "string",
2535
+ "enum": ["observe", "enforce"]
2536
+ }
2537
+ }
2538
+ },
2539
+ "AgentConfig": {
2540
+ "title": "AgentConfig",
2541
+ "description": "Adapter-internal configuration derived from the resolved execution plan, not a public source of run model or approval choices. Legacy permission and thinking fields are forbidden.",
2542
+ "type": "object",
2543
+ "additionalProperties": true,
2544
+ "not": {
2545
+ "anyOf": [
2546
+ {
2547
+ "required": ["permissionMode"]
2548
+ },
2549
+ {
2550
+ "required": ["autoApprove"]
2551
+ },
2552
+ {
2553
+ "required": ["dangerouslyBypassPermissions"]
2554
+ },
2555
+ {
2556
+ "required": ["thinking"]
2557
+ }
2558
+ ]
2559
+ },
2560
+ "properties": {
2561
+ "workdir": {
2562
+ "description": "Default provider CLI working directory. It is a cwd, not a filesystem security boundary.",
2563
+ "type": "string"
2564
+ },
2565
+ "model": {
2566
+ "description": "Model identifier.",
2567
+ "type": "string"
2568
+ },
2569
+ "sandbox": {
2570
+ "description": "Provider sandbox mode identifier.",
2571
+ "type": "string"
2572
+ },
2573
+ "providerAgentId": {
2574
+ "description": "Provider-side agent identifier.",
2575
+ "type": "string"
2576
+ },
2577
+ "effort": {
2578
+ "description": "Optional provider reasoning effort identifier. Provider adapters may define an explicit default.",
2579
+ "type": "string"
2580
+ },
2581
+ "timeoutSeconds": {
2582
+ "description": "Invocation timeout in seconds.",
2583
+ "type": "number"
2584
+ },
2585
+ "openclawConfigPath": {
2586
+ "description": "OpenClaw configuration path.",
2587
+ "type": "string"
2588
+ },
2589
+ "openclawStateDir": {
2590
+ "description": "OpenClaw state directory.",
2591
+ "type": "string"
2592
+ },
2593
+ "providerOptions": {
2594
+ "description": "Provider-specific extension options passed through unchanged by Core.",
2595
+ "type": "object",
2596
+ "additionalProperties": true,
2597
+ "tsType": "Record<string, unknown>"
2598
+ }
2599
+ }
2600
+ },
2601
+ "AsyncUserInputQuestion": {
2602
+ "type": "object",
2603
+ "additionalProperties": false,
2604
+ "required": ["title", "options"],
2605
+ "properties": {
2606
+ "title": {
2607
+ "type": "string",
2608
+ "minLength": 1,
2609
+ "maxLength": 4096,
2610
+ "pattern": "[^\u0009-\u000d\u0020\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]"
2611
+ },
2612
+ "options": {
2613
+ "type": ["array", "null"],
2614
+ "maxItems": 50,
2615
+ "items": {
2616
+ "type": "string",
2617
+ "minLength": 1,
2618
+ "maxLength": 4096,
2619
+ "pattern": "[^\u0009-\u000d\u0020\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]"
2620
+ }
2621
+ }
2622
+ }
2623
+ },
2624
+ "QuestionRequest": {
2625
+ "description": "Non-blocking question batch. IDs are positions scoped to this interaction, not provider-native question IDs.",
2626
+ "type": "object",
2627
+ "additionalProperties": false,
2628
+ "required": ["schema", "messageId", "questions"],
2629
+ "properties": {
2630
+ "schema": { "const": "octo.question-request/v1", "type": "string" },
2631
+ "messageId": { "type": "string", "minLength": 1 },
2632
+ "questions": {
2633
+ "type": "array",
2634
+ "minItems": 1,
2635
+ "maxItems": 50,
2636
+ "items": {
2637
+ "type": "object",
2638
+ "additionalProperties": false,
2639
+ "required": ["id", "title", "options", "allowCustom"],
2640
+ "properties": {
2641
+ "id": { "type": "string", "pattern": "^q:(0|[1-9][0-9]?)$" },
2642
+ "title": {
2643
+ "type": "string",
2644
+ "minLength": 1,
2645
+ "maxLength": 4096,
2646
+ "pattern": "[^\u0009-\u000d\u0020\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]"
2647
+ },
2648
+ "options": {
2649
+ "type": ["array", "null"],
2650
+ "maxItems": 50,
2651
+ "items": {
2652
+ "type": "string",
2653
+ "minLength": 1,
2654
+ "maxLength": 4096,
2655
+ "pattern": "[^\u0009-\u000d\u0020\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]"
2656
+ }
2657
+ },
2658
+ "allowCustom": { "type": "boolean", "const": true }
2659
+ }
2660
+ }
2661
+ }
2662
+ }
2663
+ },
2664
+ "QuestionResponse": {
2665
+ "type": "object",
2666
+ "additionalProperties": false,
2667
+ "required": ["schema", "answers"],
2668
+ "properties": {
2669
+ "schema": { "type": "string", "const": "octo.question-response/v1" },
2670
+ "answers": {
2671
+ "type": "array",
2672
+ "minItems": 1,
2673
+ "maxItems": 50,
2674
+ "items": {
2675
+ "type": "object",
2676
+ "additionalProperties": false,
2677
+ "required": ["questionId", "text"],
2678
+ "properties": {
2679
+ "questionId": { "type": "string", "pattern": "^q:(0|[1-9][0-9]?)$" },
2680
+ "text": {
2681
+ "type": "string",
2682
+ "minLength": 1,
2683
+ "maxLength": 4096,
2684
+ "pattern": "[^\u0009-\u000d\u0020\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]"
2685
+ }
2686
+ }
2687
+ }
2688
+ }
2689
+ }
2690
+ },
2691
+ "CanonicalEventPayload": {
2692
+ "title": "CanonicalEventPayload",
2693
+ "description": "Shared canonical event payload. The open dictionary carries structured tool, surface, and usage fields while common lifecycle fields remain explicit.",
2694
+ "type": "object",
2695
+ "additionalProperties": true,
2696
+ "properties": {
2697
+ "delivery": {
2698
+ "description": "Async questions do not block provider work. Omitted for existing synchronous interactions.",
2699
+ "type": "string",
2700
+ "const": "async"
2701
+ },
2702
+ "questions": {
2703
+ "description": "Message snapshot only; an active interaction.requested authorizes submission.",
2704
+ "type": "array",
2705
+ "maxItems": 50,
2706
+ "items": { "$ref": "#/definitions/AsyncUserInputQuestion" }
2707
+ },
2708
+ "providerSession": {
2709
+ "$ref": "#/definitions/ProviderSession"
2710
+ },
2711
+ "channel": {
2712
+ "$ref": "#/definitions/MessageChannel"
2713
+ },
2714
+ "exposure": {
2715
+ "$ref": "#/definitions/MessageExposure"
2716
+ },
2717
+ "provenance": {
2718
+ "$ref": "#/definitions/MessageProvenance"
2719
+ },
2720
+ "messageId": {
2721
+ "description": "Stable message identifier.",
2722
+ "type": "string"
2723
+ },
2724
+ "stepId": {
2725
+ "description": "Stable model-step identifier used to associate messages and tool calls with one provider turn.",
2726
+ "type": "string"
2727
+ },
2728
+ "role": {
2729
+ "description": "Message role, such as assistant.",
2730
+ "type": "string"
2731
+ },
2732
+ "status": {
2733
+ "description": "Tool call or run status identifier.",
2734
+ "type": "string"
2735
+ },
2736
+ "text": {
2737
+ "description": "Text delta or complete text.",
2738
+ "type": "string"
2739
+ },
2740
+ "reason": {
2741
+ "description": "Termination or error reason.",
2742
+ "type": "string"
2743
+ },
2744
+ "message": {
2745
+ "description": "Human-readable diagnostic message.",
2746
+ "type": "string"
2747
+ },
2748
+ "failure": {
2749
+ "$ref": "#/definitions/FailureEnvelope"
2750
+ }
2751
+ }
2752
+ },
2753
+ "AsyncQuestionReplySnapshot": {
2754
+ "description": "Host-owned supplement state, never stored by Kernel. Submitting or unknown records cannot be replayed.",
2755
+ "type": "object",
2756
+ "additionalProperties": false,
2757
+ "required": ["schema", "ref", "question", "providerSession", "completed", "phase"],
2758
+ "properties": {
2759
+ "schema": { "const": "octo.async-question-reply/v1" },
2760
+ "ref": { "$ref": "#/definitions/KernelRunRef" },
2761
+ "question": { "$ref": "#/definitions/InteractionRequestedPayload" },
2762
+ "providerSession": { "$ref": "#/definitions/ProviderSession" },
2763
+ "providerEpoch": { "type": "integer", "minimum": 0 },
2764
+ "completed": { "type": "boolean" },
2765
+ "phase": {
2766
+ "enum": ["pending", "submitting", "answered", "cancelled", "invalidated", "unknown"]
2767
+ }
2768
+ }
2769
+ },
2770
+ "InteractionRequestedPayload": {
2771
+ "title": "InteractionRequestedPayload",
2772
+ "description": "Provider-neutral interaction. Omitted delivery retains synchronous blocking semantics; async questions allow continued work. Only Adapter-owned automatic approvals may omit external responses; this does not imply completion.",
2773
+ "type": "object",
2774
+ "additionalProperties": false,
2775
+ "required": ["interactionId", "kind", "request", "executionInstanceId"],
2776
+ "properties": {
2777
+ "delivery": { "type": "string", "const": "async" },
2778
+ "executionInstanceId": {
2779
+ "type": "string",
2780
+ "minLength": 1,
2781
+ "maxLength": 191
2782
+ },
2783
+ "expiresAt": {
2784
+ "type": "string",
2785
+ "format": "date-time"
2786
+ },
2787
+ "interactionId": {
2788
+ "description": "Stable invocation-scoped interaction identifier.",
2789
+ "type": "string",
2790
+ "minLength": 1,
2791
+ "maxLength": 191
2792
+ },
2793
+ "kind": {
2794
+ "type": "string",
2795
+ "enum": ["approval", "question", "elicitation"]
2796
+ },
2797
+ "responseRequired": {
2798
+ "description": "Whether an external response is required. Omission means required; only an Adapter-owned automatic approval may set false.",
2799
+ "type": "boolean"
2800
+ },
2801
+ "request": {
2802
+ "description": "Display-safe provider request projected for the responding product.",
2803
+ "type": "object",
2804
+ "additionalProperties": true,
2805
+ "tsType": "Record<string, unknown>"
2806
+ }
2807
+ },
2808
+ "allOf": [
2809
+ {
2810
+ "if": { "required": ["delivery"], "properties": { "delivery": { "const": "async" } } },
2811
+ "then": {
2812
+ "properties": {
2813
+ "kind": { "const": "question" },
2814
+ "request": { "$ref": "#/definitions/QuestionRequest" }
2815
+ }
2816
+ },
2817
+ "else": { "required": ["expiresAt"] }
2818
+ }
2819
+ ],
2820
+ "if": {
2821
+ "properties": {
2822
+ "kind": {
2823
+ "const": "approval"
2824
+ }
2825
+ },
2826
+ "required": ["kind"]
2827
+ },
2828
+ "then": {
2829
+ "properties": {
2830
+ "request": {
2831
+ "$ref": "#/definitions/ApprovalRequest"
2832
+ }
2833
+ }
2834
+ },
2835
+ "else": {
2836
+ "properties": { "responseRequired": { "const": true } }
2837
+ }
2838
+ },
2839
+ "ApprovalRequest": {
2840
+ "description": "Supported profile: original native request approval with requestedPermissions=[] only. Non-empty permission instances fail with APPROVAL_PERMISSION_UNSUPPORTED; consumers must not fabricate them. Details are allowlisted inert metadata. The compact UTF-8 JSON budget is enforced by x-octo-max-json-bytes.",
2841
+ "type": "object",
2842
+ "additionalProperties": false,
2843
+ "x-octo-max-json-bytes": 65536,
2844
+ "x-octo-unicode-scalar-strings": true,
2845
+ "required": [
2846
+ "schema",
2847
+ "policy",
2848
+ "operation",
2849
+ "requestedPermissions",
2850
+ "allowedOutcomes",
2851
+ "grantScope"
2852
+ ],
2853
+ "properties": {
2854
+ "schema": {
2855
+ "const": "octo.approval-request/v1"
2856
+ },
2857
+ "policy": {
2858
+ "type": "object",
2859
+ "additionalProperties": false,
2860
+ "required": ["mode", "hash"],
2861
+ "properties": {
2862
+ "mode": {
2863
+ "$ref": "#/definitions/ApprovalMode"
2864
+ },
2865
+ "hash": {
2866
+ "type": "string",
2867
+ "pattern": "^sha256:[a-f0-9]{64}$"
2868
+ }
2869
+ }
2870
+ },
2871
+ "operation": {
2872
+ "$ref": "#/definitions/ApprovalOperation"
2873
+ },
2874
+ "requestedPermissions": {
2875
+ "type": "array",
2876
+ "maxItems": 0,
2877
+ "items": false
2878
+ },
2879
+ "reason": {
2880
+ "type": "string"
2881
+ },
2882
+ "allowedOutcomes": {
2883
+ "type": "array",
2884
+ "minItems": 1,
2885
+ "uniqueItems": true,
2886
+ "items": {
2887
+ "enum": ["accepted", "declined", "cancelled"]
2888
+ }
2889
+ },
2890
+ "grantScope": {
2891
+ "enum": ["request", "provider"]
2892
+ },
2893
+ "providerDetails": {
2894
+ "$ref": "#/definitions/ApprovalDisplayDetails"
2895
+ }
2896
+ }
2897
+ },
2898
+ "ApprovalOperation": {
2899
+ "type": "object",
2900
+ "additionalProperties": false,
2901
+ "required": ["kind", "summary"],
2902
+ "properties": {
2903
+ "kind": {
2904
+ "enum": [
2905
+ "command_execution",
2906
+ "file_change",
2907
+ "tool_execution",
2908
+ "permission_grant",
2909
+ "context_access"
2910
+ ]
2911
+ },
2912
+ "summary": {
2913
+ "type": "string",
2914
+ "minLength": 1,
2915
+ "maxLength": 8192,
2916
+ "x-octo-max-utf16-length": 8192
2917
+ },
2918
+ "toolCallId": {
2919
+ "type": "string",
2920
+ "minLength": 1
2921
+ },
2922
+ "details": {
2923
+ "$ref": "#/definitions/ApprovalDisplayDetails"
2924
+ }
2925
+ }
2926
+ },
2927
+ "ApprovalDisplayDetails": {
2928
+ "description": "Display-only fields permitted by assertApprovalRequest. Values remain inert provider metadata and do not redefine commands, permissions or grant scope.",
2929
+ "type": "object",
2930
+ "additionalProperties": false,
2931
+ "tsType": "Record<string, unknown>",
2932
+ "properties": {
2933
+ "provider": {},
2934
+ "method": {},
2935
+ "itemId": {},
2936
+ "approvalId": {},
2937
+ "reason": {},
2938
+ "command": {},
2939
+ "cwd": {},
2940
+ "grantRoot": {},
2941
+ "files": {},
2942
+ "toolCallId": {},
2943
+ "title": {},
2944
+ "description": {},
2945
+ "options": {}
2946
+ }
2947
+ },
2948
+ "InteractionResolvedPayload": {
2949
+ "type": "object",
2950
+ "additionalProperties": false,
2951
+ "required": ["interactionId", "executionInstanceId", "status"],
2952
+ "properties": {
2953
+ "interactionId": {
2954
+ "type": "string",
2955
+ "minLength": 1,
2956
+ "maxLength": 191
2957
+ },
2958
+ "executionInstanceId": {
2959
+ "type": "string",
2960
+ "minLength": 1,
2961
+ "maxLength": 191
2962
+ },
2963
+ "status": {
2964
+ "enum": ["resolved", "expired", "invalidated"]
2965
+ },
2966
+ "outcome": {
2967
+ "enum": ["accepted", "declined", "cancelled", "answered"]
2968
+ },
2969
+ "reasonCode": {
2970
+ "type": "string",
2971
+ "minLength": 1
2972
+ }
2973
+ },
2974
+ "if": {
2975
+ "properties": {
2976
+ "status": {
2977
+ "const": "resolved"
2978
+ }
2979
+ },
2980
+ "required": ["status"]
2981
+ },
2982
+ "then": {
2983
+ "required": ["outcome"]
2984
+ },
2985
+ "else": {
2986
+ "required": ["reasonCode"]
2987
+ }
2988
+ },
2989
+ "ModelStepStartedPayload": {
2990
+ "title": "ModelStepStartedPayload",
2991
+ "description": "Starts one provider model round. A round may contain public reasoning, tool calls, and text output.",
2992
+ "type": "object",
2993
+ "additionalProperties": true,
2994
+ "required": ["stepId"],
2995
+ "properties": {
2996
+ "stepId": {
2997
+ "description": "Stable identifier reused by model_step.finished and child events.",
2998
+ "type": "string"
2999
+ },
3000
+ "startedAtMs": {
3001
+ "description": "Provider-observed round content-start timestamp in Unix milliseconds.",
3002
+ "type": "integer",
3003
+ "minimum": 1
3004
+ }
3005
+ }
3006
+ },
3007
+ "ModelStepFinishedPayload": {
3008
+ "title": "ModelStepFinishedPayload",
3009
+ "description": "Finishes one provider model round and records why control returned to the harness.",
3010
+ "type": "object",
3011
+ "additionalProperties": true,
3012
+ "required": ["stepId", "status"],
3013
+ "properties": {
3014
+ "stepId": {
3015
+ "description": "Stable identifier from model_step.started.",
3016
+ "type": "string"
3017
+ },
3018
+ "status": {
3019
+ "enum": ["completed", "failed", "cancelled"]
3020
+ },
3021
+ "finishReason": {
3022
+ "description": "Provider-normalized reason such as tool-calls or stop.",
3023
+ "type": "string"
3024
+ },
3025
+ "endedAtMs": {
3026
+ "description": "Provider-observed round finish timestamp in Unix milliseconds.",
3027
+ "type": "integer",
3028
+ "minimum": 1
3029
+ }
3030
+ }
3031
+ },
3032
+ "ToolCallCreatePayload": {
3033
+ "title": "ToolCallCreatePayload",
3034
+ "description": "Formal tool_call.create payload. args preserves the original structured input, including args.command for shell tools.",
3035
+ "type": "object",
3036
+ "additionalProperties": true,
3037
+ "required": ["id", "name", "args", "status"],
3038
+ "properties": {
3039
+ "id": {
3040
+ "description": "Stable tool call identifier reused by later delta and update events.",
3041
+ "type": "string"
3042
+ },
3043
+ "name": {
3044
+ "description": "Tool name normalized across providers.",
3045
+ "type": "string"
3046
+ },
3047
+ "args": {
3048
+ "description": "Original structured input known when the tool call starts. Streaming providers may begin empty and append argsDelta.",
3049
+ "type": "object",
3050
+ "additionalProperties": true,
3051
+ "tsType": "Record<string, unknown>"
3052
+ },
3053
+ "status": {
3054
+ "const": "running"
3055
+ }
3056
+ }
3057
+ },
3058
+ "ToolCallDeltaPayload": {
3059
+ "title": "ToolCallDeltaPayload",
3060
+ "description": "Formal tool_call.delta payload. argsDelta is an ordered raw JSON fragment and must be concatenated before parsing.",
3061
+ "type": "object",
3062
+ "additionalProperties": true,
3063
+ "required": ["id", "kind"],
3064
+ "properties": {
3065
+ "id": {
3066
+ "description": "Stable identifier from the corresponding tool_call.create event.",
3067
+ "type": "string"
3068
+ },
3069
+ "argsDelta": {
3070
+ "description": "Raw JSON argument fragment; do not parse fragments independently.",
3071
+ "type": "string"
3072
+ },
3073
+ "outputDelta": {
3074
+ "description": "Tool output text fragment.",
3075
+ "type": "string"
3076
+ },
3077
+ "outputSnapshot": {
3078
+ "type": "string",
3079
+ "description": "Full replacement of a provider rolling output snapshot; never an activity or a terminal status."
3080
+ }
3081
+ }
3082
+ },
3083
+ "ToolCallUpdatePayload": {
3084
+ "title": "ToolCallUpdatePayload",
3085
+ "description": "Formal tool_call.update payload that closes the tool lifecycle and carries its final result.",
3086
+ "type": "object",
3087
+ "additionalProperties": true,
3088
+ "required": ["id", "status"],
3089
+ "properties": {
3090
+ "id": {
3091
+ "description": "Stable identifier from the corresponding tool_call.create event.",
3092
+ "type": "string"
3093
+ },
3094
+ "status": {
3095
+ "enum": ["completed", "failed", "cancelled"]
3096
+ },
3097
+ "output": {
3098
+ "description": "Final tool output as text or structured JSON.",
3099
+ "tsType": "unknown"
3100
+ },
3101
+ "error": {
3102
+ "description": "Structured error details.",
3103
+ "type": "object",
3104
+ "additionalProperties": true,
3105
+ "tsType": "Record<string, unknown>"
3106
+ },
3107
+ "exitCode": {
3108
+ "description": "Process exit code for command tools.",
3109
+ "type": "integer"
3110
+ },
3111
+ "durationMs": {
3112
+ "type": "integer",
3113
+ "minimum": 0,
3114
+ "maximum": 9007199254740991
3115
+ }
3116
+ }
3117
+ },
3118
+ "RunIdentity": {
3119
+ "title": "RunIdentity",
3120
+ "description": "Stable run identity used by envelopes without requiring the complete domain object.",
3121
+ "type": "object",
3122
+ "additionalProperties": false,
3123
+ "required": ["id", "agentSessionId"],
3124
+ "properties": {
3125
+ "id": {
3126
+ "description": "Run identifier.",
3127
+ "type": "string"
3128
+ },
3129
+ "agentSessionId": {
3130
+ "description": "Owning Agent Worker session identifier.",
3131
+ "type": "string"
3132
+ }
3133
+ }
3134
+ },
3135
+ "ChannelScope": {
3136
+ "title": "ChannelScope",
3137
+ "description": "Platform-neutral channel isolation key. account_id may be null but remains explicit; an absent thread_id selects the conversation root.",
3138
+ "type": "object",
3139
+ "additionalProperties": false,
3140
+ "required": [
3141
+ "tenant_id",
3142
+ "endpoint_id",
3143
+ "channel",
3144
+ "account_id",
3145
+ "bot_id",
3146
+ "conversation_id"
3147
+ ],
3148
+ "properties": {
3149
+ "tenant_id": {
3150
+ "type": "string",
3151
+ "minLength": 1
3152
+ },
3153
+ "endpoint_id": {
3154
+ "type": "string",
3155
+ "minLength": 1
3156
+ },
3157
+ "channel": {
3158
+ "type": "string",
3159
+ "minLength": 1
3160
+ },
3161
+ "account_id": {
3162
+ "type": ["string", "null"]
3163
+ },
3164
+ "bot_id": {
3165
+ "type": "string",
3166
+ "minLength": 1
3167
+ },
3168
+ "conversation_id": {
3169
+ "type": "string",
3170
+ "minLength": 1
3171
+ },
3172
+ "thread_id": {
3173
+ "type": ["string", "null"]
3174
+ }
3175
+ }
3176
+ },
3177
+ "ChannelMessagePart": {
3178
+ "title": "ChannelMessagePart",
3179
+ "description": "Normalized platform message part. type and text are common fields; connector extensions remain untrusted external data.",
3180
+ "type": "object",
3181
+ "additionalProperties": true,
3182
+ "required": ["type"],
3183
+ "properties": {
3184
+ "type": {
3185
+ "type": "string",
3186
+ "minLength": 1
3187
+ },
3188
+ "text": {
3189
+ "type": "string"
3190
+ }
3191
+ }
3192
+ },
3193
+ "ChannelMessageSender": {
3194
+ "title": "ChannelMessageSender",
3195
+ "description": "Normalized sender fact without platform credentials.",
3196
+ "type": "object",
3197
+ "additionalProperties": false,
3198
+ "required": ["id", "kind"],
3199
+ "properties": {
3200
+ "id": {
3201
+ "type": "string",
3202
+ "minLength": 1
3203
+ },
3204
+ "label": {
3205
+ "type": "string"
3206
+ },
3207
+ "kind": {
3208
+ "type": "string",
3209
+ "minLength": 1
3210
+ }
3211
+ }
3212
+ },
3213
+ "ChannelMessageFlags": {
3214
+ "title": "ChannelMessageFlags",
3215
+ "description": "Common message flags that affect context projection. Self and control messages are excluded from provider-visible context.",
3216
+ "type": "object",
3217
+ "additionalProperties": false,
3218
+ "properties": {
3219
+ "self": {
3220
+ "type": "boolean"
3221
+ },
3222
+ "control": {
3223
+ "type": "boolean"
3224
+ }
3225
+ }
3226
+ },
3227
+ "ChannelMessageFact": {
3228
+ "title": "ChannelMessageFact",
3229
+ "description": "A platform-neutral message fact in the rebuildable channel journal. Message content is always untrusted external input.",
3230
+ "type": "object",
3231
+ "additionalProperties": false,
3232
+ "required": ["message_id", "sender", "occurred_at_ms", "parts"],
3233
+ "properties": {
3234
+ "message_id": {
3235
+ "type": "string",
3236
+ "minLength": 1
3237
+ },
3238
+ "message_seq": {
3239
+ "type": "integer",
3240
+ "minimum": 0
3241
+ },
3242
+ "sender": {
3243
+ "$ref": "#/definitions/ChannelMessageSender"
3244
+ },
3245
+ "occurred_at_ms": {
3246
+ "type": "integer",
3247
+ "minimum": 1
3248
+ },
3249
+ "parts": {
3250
+ "type": "array",
3251
+ "minItems": 1,
3252
+ "items": {
3253
+ "$ref": "#/definitions/ChannelMessagePart"
3254
+ }
3255
+ },
3256
+ "flags": {
3257
+ "$ref": "#/definitions/ChannelMessageFlags"
3258
+ }
3259
+ }
3260
+ },
3261
+ "ChannelContextAppend": {
3262
+ "title": "ChannelContextAppend",
3263
+ "description": "Idempotent context-only batch appended by agent-worker to its bound daemon.",
3264
+ "type": "object",
3265
+ "additionalProperties": false,
3266
+ "required": ["agent_id", "scope", "facts"],
3267
+ "properties": {
3268
+ "agent_id": {
3269
+ "type": "string",
3270
+ "minLength": 1,
3271
+ "maxLength": 96
3272
+ },
3273
+ "scope": {
3274
+ "$ref": "#/definitions/ChannelScope"
3275
+ },
3276
+ "facts": {
3277
+ "type": "array",
3278
+ "minItems": 1,
3279
+ "maxItems": 100,
3280
+ "items": {
3281
+ "$ref": "#/definitions/ChannelMessageFact"
3282
+ }
3283
+ },
3284
+ "gap_after_seq": {
3285
+ "type": "integer",
3286
+ "minimum": 0
3287
+ }
3288
+ }
3289
+ },
3290
+ "ContextSyncRequest": {
3291
+ "title": "ContextSyncRequest",
3292
+ "description": "Bounded backfill requested by the daemon after cold start or gap detection. It never carries platform tokens.",
3293
+ "type": "object",
3294
+ "additionalProperties": false,
3295
+ "required": ["request_id", "run_id", "scope", "trigger_message_id", "limit"],
3296
+ "properties": {
3297
+ "request_id": {
3298
+ "type": "string",
3299
+ "minLength": 1
3300
+ },
3301
+ "run_id": {
3302
+ "type": "string",
3303
+ "minLength": 1
3304
+ },
3305
+ "scope": {
3306
+ "$ref": "#/definitions/ChannelScope"
3307
+ },
3308
+ "trigger_message_id": {
3309
+ "type": "string",
3310
+ "minLength": 1
3311
+ },
3312
+ "trigger_seq": {
3313
+ "type": "integer",
3314
+ "minimum": 0
3315
+ },
3316
+ "after_seq": {
3317
+ "type": "integer",
3318
+ "minimum": 0
3319
+ },
3320
+ "limit": {
3321
+ "type": "integer",
3322
+ "minimum": 1,
3323
+ "maximum": 100
3324
+ }
3325
+ }
3326
+ },
3327
+ "ContextSyncResult": {
3328
+ "title": "ContextSyncResult",
3329
+ "description": "Bounded history result. complete means only that the requested window was returned, not that the local journal is authoritative.",
3330
+ "type": "object",
3331
+ "additionalProperties": false,
3332
+ "required": ["request_id", "scope", "facts", "completeness"],
3333
+ "properties": {
3334
+ "request_id": {
3335
+ "type": "string",
3336
+ "minLength": 1
3337
+ },
3338
+ "scope": {
3339
+ "$ref": "#/definitions/ChannelScope"
3340
+ },
3341
+ "facts": {
3342
+ "type": "array",
3343
+ "maxItems": 100,
3344
+ "items": {
3345
+ "$ref": "#/definitions/ChannelMessageFact"
3346
+ }
3347
+ },
3348
+ "completeness": {
3349
+ "type": "string",
3350
+ "enum": ["complete", "partial", "unavailable"]
3351
+ },
3352
+ "through_seq": {
3353
+ "type": "integer",
3354
+ "minimum": 0
3355
+ }
3356
+ },
3357
+ "allOf": [
3358
+ {
3359
+ "if": {
3360
+ "properties": {
3361
+ "completeness": {
3362
+ "const": "unavailable"
3363
+ }
3364
+ }
3365
+ },
3366
+ "then": {
3367
+ "properties": {
3368
+ "facts": {
3369
+ "maxItems": 0
3370
+ }
3371
+ }
3372
+ }
3373
+ }
3374
+ ]
3375
+ },
3376
+ "ChannelContextDescriptor": {
3377
+ "title": "ChannelContextDescriptor",
3378
+ "description": "Snapshot selection descriptor in ExecutionEnvelope. Scope, consumer_key, and session_generation isolate the consumption cursor.",
3379
+ "type": "object",
3380
+ "additionalProperties": false,
3381
+ "required": [
3382
+ "scope",
3383
+ "consumer_key",
3384
+ "session_generation",
3385
+ "trigger_message_id",
3386
+ "trigger_fact"
3387
+ ],
3388
+ "properties": {
3389
+ "scope": {
3390
+ "$ref": "#/definitions/ChannelScope"
3391
+ },
3392
+ "consumer_key": {
3393
+ "type": "string",
3394
+ "minLength": 1
3395
+ },
3396
+ "session_generation": {
3397
+ "type": "integer",
3398
+ "minimum": 1
3399
+ },
3400
+ "trigger_message_id": {
3401
+ "type": "string",
3402
+ "minLength": 1
3403
+ },
3404
+ "trigger_seq": {
3405
+ "type": "integer",
3406
+ "minimum": 0
3407
+ },
3408
+ "trigger_fact": {
3409
+ "$ref": "#/definitions/ChannelMessageFact"
3410
+ }
3411
+ }
3412
+ },
3413
+ "ContextCommitResult": {
3414
+ "title": "ContextCommitResult",
3415
+ "description": "Result of advancing the consumer cursor with version CAS after terminal durability.",
3416
+ "type": "object",
3417
+ "additionalProperties": false,
3418
+ "required": ["snapshot_id", "committed"],
3419
+ "properties": {
3420
+ "snapshot_id": {
3421
+ "type": "string",
3422
+ "minLength": 1
3423
+ },
3424
+ "committed": {
3425
+ "type": "boolean"
3426
+ },
3427
+ "reason": {
3428
+ "type": "string",
3429
+ "enum": [
3430
+ "already_committed",
3431
+ "snapshot_not_found",
3432
+ "snapshot_not_submitted",
3433
+ "consumer_advanced",
3434
+ "snapshot_failed"
3435
+ ]
3436
+ }
3437
+ }
3438
+ },
3439
+ "McpStdioServer": {
3440
+ "title": "McpStdioServer",
3441
+ "description": "A per-invocation MCP server launched as a child process by the provider.",
3442
+ "type": "object",
3443
+ "additionalProperties": false,
3444
+ "required": ["type", "command"],
3445
+ "properties": {
3446
+ "type": {
3447
+ "const": "stdio"
3448
+ },
3449
+ "command": {
3450
+ "type": "string",
3451
+ "minLength": 1
3452
+ },
3453
+ "args": {
3454
+ "type": "array",
3455
+ "items": {
3456
+ "type": "string"
3457
+ },
3458
+ "maxItems": 128
3459
+ },
3460
+ "env": {
3461
+ "type": "object",
3462
+ "additionalProperties": {
3463
+ "type": "string",
3464
+ "pattern": "^[^\\u0000]*$"
3465
+ },
3466
+ "maxProperties": 128,
3467
+ "tsType": "Record<string, string>",
3468
+ "propertyNames": {
3469
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
3470
+ }
3471
+ },
3472
+ "cwd": {
3473
+ "type": "string",
3474
+ "minLength": 1
3475
+ },
3476
+ "required": {
3477
+ "type": "boolean"
3478
+ },
3479
+ "startupTimeoutMs": {
3480
+ "type": "integer",
3481
+ "minimum": 100,
3482
+ "maximum": 300000
3483
+ },
3484
+ "toolTimeoutMs": {
3485
+ "type": "integer",
3486
+ "minimum": 100,
3487
+ "maximum": 3600000
3488
+ }
3489
+ }
3490
+ },
3491
+ "McpStreamableHttpServer": {
3492
+ "title": "McpStreamableHttpServer",
3493
+ "description": "A per-invocation Streamable HTTP MCP endpoint. Header values are sensitive and must never enter logs or canonical events.",
3494
+ "type": "object",
3495
+ "additionalProperties": false,
3496
+ "required": ["type", "url"],
3497
+ "properties": {
3498
+ "type": {
3499
+ "const": "streamable_http"
3500
+ },
3501
+ "url": {
3502
+ "type": "string",
3503
+ "minLength": 1,
3504
+ "maxLength": 4096,
3505
+ "anyOf": [
3506
+ {
3507
+ "x-octo-http-url": true
3508
+ },
3509
+ {
3510
+ "pattern": "\\$\\$?\\{[A-Za-z_][A-Za-z0-9_]*\\}"
3511
+ }
3512
+ ],
3513
+ "description": "Absolute HTTP(S) endpoint or environment template; the resolved endpoint is validated again before connecting.",
3514
+ "tsType": "string"
3515
+ },
3516
+ "headers": {
3517
+ "type": "object",
3518
+ "additionalProperties": {
3519
+ "type": "string",
3520
+ "pattern": "^[^\\r\\n\\u0000]*$"
3521
+ },
3522
+ "maxProperties": 64,
3523
+ "tsType": "Record<string, string>",
3524
+ "propertyNames": {
3525
+ "pattern": "^[!#$%&'*+.^_`|~0-9A-Za-z-]+$"
3526
+ },
3527
+ "x-octo-unique-header-names": true
3528
+ },
3529
+ "required": {
3530
+ "type": "boolean"
3531
+ },
3532
+ "startupTimeoutMs": {
3533
+ "type": "integer",
3534
+ "minimum": 100,
3535
+ "maximum": 300000
3536
+ },
3537
+ "toolTimeoutMs": {
3538
+ "type": "integer",
3539
+ "minimum": 100,
3540
+ "maximum": 3600000
3541
+ }
3542
+ }
3543
+ },
3544
+ "McpServer": {
3545
+ "title": "McpServer",
3546
+ "description": "Provider-neutral per-invocation MCP server definition.",
3547
+ "oneOf": [
3548
+ {
3549
+ "$ref": "#/definitions/McpStdioServer"
3550
+ },
3551
+ {
3552
+ "$ref": "#/definitions/McpStreamableHttpServer"
3553
+ }
3554
+ ]
3555
+ },
3556
+ "McpServers": {
3557
+ "title": "McpServers",
3558
+ "description": "Dynamic server-name map. No business-specific names are enumerated. Each value must match one closed transport variant.",
3559
+ "type": "object",
3560
+ "propertyNames": {
3561
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$"
3562
+ },
3563
+ "additionalProperties": {
3564
+ "$ref": "#/definitions/McpServer"
3565
+ },
3566
+ "maxProperties": 32,
3567
+ "tsType": "Record<string, McpServer>"
3568
+ },
3569
+ "ModelInputPart": {
3570
+ "title": "ModelInputPart",
3571
+ "description": "Ordered provider-native user input. Image bytes are materialized only for the invocation, never used as a text fallback.",
3572
+ "oneOf": [
3573
+ {
3574
+ "type": "object",
3575
+ "additionalProperties": false,
3576
+ "required": ["type", "text"],
3577
+ "properties": {
3578
+ "id": {
3579
+ "type": "string",
3580
+ "minLength": 1
3581
+ },
3582
+ "type": {
3583
+ "const": "text"
3584
+ },
3585
+ "text": {
3586
+ "type": "string"
3587
+ }
3588
+ }
3589
+ },
3590
+ {
3591
+ "type": "object",
3592
+ "additionalProperties": false,
3593
+ "required": ["type", "mimeType", "data", "byteSize", "sha256"],
3594
+ "properties": {
3595
+ "id": {
3596
+ "type": "string",
3597
+ "minLength": 1
3598
+ },
3599
+ "type": {
3600
+ "const": "image"
3601
+ },
3602
+ "mimeType": {
3603
+ "enum": ["image/png", "image/jpeg", "image/webp"]
3604
+ },
3605
+ "data": {
3606
+ "type": "string",
3607
+ "minLength": 1,
3608
+ "maxLength": 2796204
3609
+ },
3610
+ "byteSize": {
3611
+ "type": "integer",
3612
+ "minimum": 1,
3613
+ "maximum": 2097152
3614
+ },
3615
+ "sha256": {
3616
+ "type": "string",
3617
+ "pattern": "^[a-f0-9]{64}$"
3618
+ }
3619
+ }
3620
+ }
3621
+ ]
3622
+ },
3623
+ "InvokeRequestWire": {
3624
+ "title": "InvokeRequestWire",
3625
+ "description": "Serializable execution request sent from Core to Adapter Host. AbortSignal is added in src/index.ts because it cannot cross a process boundary.",
3626
+ "type": "object",
3627
+ "additionalProperties": false,
3628
+ "required": [
3629
+ "invocationId",
3630
+ "agentSessionId",
3631
+ "runId",
3632
+ "prompt",
3633
+ "workdir",
3634
+ "controlInstructions",
3635
+ "context",
3636
+ "agentConfig",
3637
+ "modelInput",
3638
+ "approvalMode",
3639
+ "protocolVersion",
3640
+ "agentSource"
3641
+ ],
3642
+ "properties": {
3643
+ "executionEnvOverrides": {
3644
+ "description": "Trusted ingress execution environment, independent of business Context; never render or persist in business snapshots.",
3645
+ "$ref": "#/definitions/ContextEnvsPayload"
3646
+ },
3647
+ "invocationId": {
3648
+ "description": "Active Adapter Host invocation identifier and cancellation target.",
3649
+ "type": "string"
3650
+ },
3651
+ "agentSessionId": {
3652
+ "description": "Long-lived Agent Worker session identifier for this execution context.",
3653
+ "type": "string"
3654
+ },
3655
+ "sessionName": {
3656
+ "description": "Caller-owned nonblank display name of 1-256 Unicode code points, without C0/DEL/C1 controls; independent of business identity and opaque provider recovery handles.",
3657
+ "type": "string",
3658
+ "minLength": 1,
3659
+ "maxLength": 256,
3660
+ "not": {
3661
+ "anyOf": [
3662
+ { "pattern": "[\\x00-\\x1f\\x7f-\\x9f]" },
3663
+ { "pattern": "^[ \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]*$" }
3664
+ ]
3665
+ }
3666
+ },
3667
+ "runId": {
3668
+ "description": "Run identifier for this execution.",
3669
+ "type": "string"
3670
+ },
3671
+ "sessionGeneration": {
3672
+ "description": "Worker-owned AgentSession generation that fences stale continuity updates.",
3673
+ "type": "integer",
3674
+ "minimum": 1
3675
+ },
3676
+ "providerEpoch": {
3677
+ "description": "Worker-owned provider binding epoch for this Run.",
3678
+ "type": "integer",
3679
+ "minimum": 1
3680
+ },
3681
+ "continuityMode": {
3682
+ "description": "Caller continuity intent. Fresh invocations must not carry providerSession.",
3683
+ "type": "string",
3684
+ "enum": ["continue", "fresh"]
3685
+ },
3686
+ "prompt": {
3687
+ "description": "Display-safe current request or task description. It excludes hidden channel context and provider control parameters.",
3688
+ "type": "string"
3689
+ },
3690
+ "modelInput": {
3691
+ "description": "Required exact provider-visible user turn.",
3692
+ "type": "string"
3693
+ },
3694
+ "modelInputParts": {
3695
+ "type": "array",
3696
+ "minItems": 1,
3697
+ "maxItems": 128,
3698
+ "tsType": "ModelInputPart[]",
3699
+ "items": {
3700
+ "$ref": "#/definitions/ModelInputPart"
3701
+ }
3702
+ },
3703
+ "freshFallbackModelInputParts": {
3704
+ "type": "array",
3705
+ "minItems": 1,
3706
+ "maxItems": 128,
3707
+ "tsType": "ModelInputPart[]",
3708
+ "items": {
3709
+ "$ref": "#/definitions/ModelInputPart"
3710
+ }
3711
+ },
3712
+ "freshFallbackImagesUnavailable": {
3713
+ "description": "Recovery includes historical images whose bytes are unavailable. Adapters must fail before sending a fresh prompt.",
3714
+ "type": "boolean"
3715
+ },
3716
+ "freshFallbackModelInput": {
3717
+ "description": "Frozen alternate user turn for the first turn of a fresh provider session after resume fails.",
3718
+ "type": "string"
3719
+ },
3720
+ "workdir": {
3721
+ "description": "Provider process cwd. Sandboxing, containers, or host permissions provide the actual access boundary.",
3722
+ "type": "string"
3723
+ },
3724
+ "controlInstructions": {
3725
+ "description": "Trusted session instructions. Adapters inject them only when starting a provider session; resuming an existing session must not inject or clear them.",
3726
+ "type": "string"
3727
+ },
3728
+ "context": {
3729
+ "$ref": "#/definitions/ContextEnvelope"
3730
+ },
3731
+ "runMetadata": {
3732
+ "type": "object",
3733
+ "additionalProperties": true,
3734
+ "tsType": "Record<string, unknown>"
3735
+ },
3736
+ "approvalMode": {
3737
+ "$ref": "#/definitions/ApprovalMode"
3738
+ },
3739
+ "providerSession": {
3740
+ "$ref": "#/definitions/ProviderSession"
3741
+ },
3742
+ "runtimeLimits": {
3743
+ "$ref": "#/definitions/RuntimeLimits"
3744
+ },
3745
+ "agentConfig": {
3746
+ "$ref": "#/definitions/AgentConfig"
3747
+ },
3748
+ "protocolVersion": {
3749
+ "const": 2
3750
+ },
3751
+ "agentSource": {
3752
+ "$ref": "#/definitions/AgentSource"
3753
+ }
3754
+ }
3755
+ },
3756
+ "ActivityInfo": {
3757
+ "type": "object",
3758
+ "additionalProperties": false,
3759
+ "properties": {
3760
+ "messageKey": {
3761
+ "type": "string",
3762
+ "minLength": 1,
3763
+ "maxLength": 191
3764
+ },
3765
+ "params": {
3766
+ "type": "object",
3767
+ "additionalProperties": {
3768
+ "type": ["string", "number", "boolean"]
3769
+ }
3770
+ },
3771
+ "attempt": {
3772
+ "type": "integer",
3773
+ "minimum": 1,
3774
+ "maximum": 9007199254740991
3775
+ },
3776
+ "retryAfterMs": {
3777
+ "type": "integer",
3778
+ "minimum": 0,
3779
+ "maximum": 9007199254740991
3780
+ }
3781
+ },
3782
+ "required": []
3783
+ },
3784
+ "ActivitySubject": {
3785
+ "oneOf": [
3786
+ {
3787
+ "type": "object",
3788
+ "additionalProperties": false,
3789
+ "properties": {
3790
+ "type": {
3791
+ "const": "run"
3792
+ }
3793
+ },
3794
+ "required": ["type"]
3795
+ },
3796
+ {
3797
+ "type": "object",
3798
+ "additionalProperties": false,
3799
+ "properties": {
3800
+ "type": {
3801
+ "const": "message"
3802
+ },
3803
+ "id": {
3804
+ "type": "string",
3805
+ "minLength": 1,
3806
+ "maxLength": 191
3807
+ }
3808
+ },
3809
+ "required": ["type", "id"]
3810
+ },
3811
+ {
3812
+ "type": "object",
3813
+ "additionalProperties": false,
3814
+ "properties": {
3815
+ "type": {
3816
+ "const": "tool"
3817
+ },
3818
+ "id": {
3819
+ "type": "string",
3820
+ "minLength": 1,
3821
+ "maxLength": 191
3822
+ }
3823
+ },
3824
+ "required": ["type", "id"]
3825
+ },
3826
+ {
3827
+ "type": "object",
3828
+ "additionalProperties": false,
3829
+ "properties": {
3830
+ "type": {
3831
+ "const": "interaction"
3832
+ },
3833
+ "id": {
3834
+ "type": "string",
3835
+ "minLength": 1,
3836
+ "maxLength": 191
3837
+ }
3838
+ },
3839
+ "required": ["type", "id"]
3840
+ }
3841
+ ]
3842
+ },
3843
+ "ActivityStartedPayload": {
3844
+ "type": "object",
3845
+ "additionalProperties": false,
3846
+ "properties": {
3847
+ "activityId": {
3848
+ "type": "string",
3849
+ "minLength": 1,
3850
+ "maxLength": 191
3851
+ },
3852
+ "kind": {
3853
+ "enum": [
3854
+ "starting",
3855
+ "thinking",
3856
+ "executing_tool",
3857
+ "responding",
3858
+ "waiting_approval",
3859
+ "waiting_input",
3860
+ "compacting",
3861
+ "retrying",
3862
+ "working"
3863
+ ]
3864
+ },
3865
+ "subject": {
3866
+ "$ref": "#/definitions/ActivitySubject"
3867
+ },
3868
+ "source": {
3869
+ "enum": ["provider", "harness"]
3870
+ },
3871
+ "info": {
3872
+ "$ref": "#/definitions/ActivityInfo"
3873
+ },
3874
+ "startedAtMs": {
3875
+ "type": "integer",
3876
+ "minimum": 0,
3877
+ "maximum": 9007199254740991
3878
+ }
3879
+ },
3880
+ "required": ["activityId", "kind", "subject", "source", "info"]
3881
+ },
3882
+ "ActivityUpdatedPayload": {
3883
+ "type": "object",
3884
+ "additionalProperties": false,
3885
+ "properties": {
3886
+ "activityId": {
3887
+ "type": "string",
3888
+ "minLength": 1,
3889
+ "maxLength": 191
3890
+ },
3891
+ "info": {
3892
+ "$ref": "#/definitions/ActivityInfo"
3893
+ }
3894
+ },
3895
+ "required": ["activityId", "info"]
3896
+ },
3897
+ "ActivityFinishedPayload": {
3898
+ "type": "object",
3899
+ "additionalProperties": false,
3900
+ "properties": {
3901
+ "activityId": {
3902
+ "type": "string",
3903
+ "minLength": 1,
3904
+ "maxLength": 191
3905
+ },
3906
+ "status": {
3907
+ "enum": ["completed", "failed", "cancelled", "superseded"]
3908
+ },
3909
+ "endedAtMs": {
3910
+ "type": "integer",
3911
+ "minimum": 0,
3912
+ "maximum": 9007199254740991
3913
+ }
3914
+ },
3915
+ "required": ["activityId", "status"]
3916
+ },
3917
+ "PlanUpdatedPayload": {
3918
+ "type": "object",
3919
+ "additionalProperties": false,
3920
+ "properties": {
3921
+ "planId": {
3922
+ "type": "string",
3923
+ "minLength": 1,
3924
+ "maxLength": 191
3925
+ },
3926
+ "revision": {
3927
+ "type": "integer",
3928
+ "minimum": 1,
3929
+ "maximum": 9007199254740991
3930
+ },
3931
+ "explanation": {
3932
+ "type": ["string", "null"],
3933
+ "maxLength": 4096
3934
+ },
3935
+ "steps": {
3936
+ "type": "array",
3937
+ "maxItems": 200,
3938
+ "items": {
3939
+ "type": "object",
3940
+ "additionalProperties": false,
3941
+ "properties": {
3942
+ "text": {
3943
+ "type": "string",
3944
+ "minLength": 1,
3945
+ "maxLength": 4096
3946
+ },
3947
+ "status": {
3948
+ "enum": ["pending", "in_progress", "completed", "blocked", "cancelled"]
3949
+ }
3950
+ },
3951
+ "required": ["text", "status"]
3952
+ }
3953
+ }
3954
+ },
3955
+ "required": ["planId", "revision", "explanation", "steps"]
3956
+ },
3957
+ "ToolProgressPayload": {
3958
+ "type": "object",
3959
+ "additionalProperties": false,
3960
+ "properties": {
3961
+ "id": {
3962
+ "type": "string",
3963
+ "minLength": 1,
3964
+ "maxLength": 191
3965
+ },
3966
+ "progress": {
3967
+ "type": "object",
3968
+ "additionalProperties": false,
3969
+ "properties": {
3970
+ "message": {
3971
+ "type": "string",
3972
+ "maxLength": 4096
3973
+ },
3974
+ "completed": {
3975
+ "type": "integer",
3976
+ "minimum": 0,
3977
+ "maximum": 9007199254740991
3978
+ },
3979
+ "total": {
3980
+ "type": "integer",
3981
+ "minimum": 1,
3982
+ "maximum": 9007199254740991
3983
+ },
3984
+ "unit": {
3985
+ "enum": ["items", "bytes", "steps"]
3986
+ }
3987
+ },
3988
+ "required": []
3989
+ }
3990
+ },
3991
+ "required": ["id", "progress"]
3992
+ },
3993
+ "RunNoticePayload": {
3994
+ "type": "object",
3995
+ "additionalProperties": false,
3996
+ "properties": {
3997
+ "noticeId": {
3998
+ "type": "string",
3999
+ "minLength": 1,
4000
+ "maxLength": 191
4001
+ },
4002
+ "code": {
4003
+ "enum": [
4004
+ "retry_scheduled",
4005
+ "context_compacted",
4006
+ "model_rerouted",
4007
+ "config_warning",
4008
+ "provider_diagnostic"
4009
+ ]
4010
+ },
4011
+ "severity": {
4012
+ "enum": ["info", "warning"]
4013
+ },
4014
+ "params": {
4015
+ "type": "object",
4016
+ "additionalProperties": {
4017
+ "type": ["string", "number", "boolean"]
4018
+ }
4019
+ },
4020
+ "relatedActivityId": {
4021
+ "type": "string",
4022
+ "minLength": 1,
4023
+ "maxLength": 191
4024
+ },
4025
+ "relatedItemId": {
4026
+ "type": "string",
4027
+ "minLength": 1,
4028
+ "maxLength": 191
4029
+ }
4030
+ },
4031
+ "required": ["noticeId", "code", "severity", "params"]
4032
+ },
4033
+ "AgentSource": {
4034
+ "title": "AgentSource",
4035
+ "type": "string",
4036
+ "enum": ["preset", "provisioned"]
4037
+ },
4038
+ "ContextModelSelectionPayload": {
4039
+ "type": "object",
4040
+ "additionalProperties": false,
4041
+ "properties": {
4042
+ "id": {
4043
+ "type": "string",
4044
+ "minLength": 1
4045
+ },
4046
+ "use_provider_default": {
4047
+ "const": true
4048
+ }
4049
+ },
4050
+ "oneOf": [
4051
+ {
4052
+ "required": ["id"],
4053
+ "not": {
4054
+ "required": ["use_provider_default"]
4055
+ }
4056
+ },
4057
+ {
4058
+ "required": ["use_provider_default"],
4059
+ "not": {
4060
+ "required": ["id"]
4061
+ }
4062
+ }
4063
+ ]
4064
+ },
4065
+ "ContextInlineEntry": {
4066
+ "description": "Untrusted inline selection text with optional resource reference, source metadata and summary. Source metadata is not an authorization claim.",
4067
+ "type": "object",
4068
+ "additionalProperties": false,
4069
+ "required": ["text"],
4070
+ "properties": {
4071
+ "text": {
4072
+ "type": "string",
4073
+ "minLength": 1
4074
+ },
4075
+ "resource_ref": {
4076
+ "type": "string",
4077
+ "minLength": 1
4078
+ },
4079
+ "source": {
4080
+ "type": ["object", "string"],
4081
+ "additionalProperties": true
4082
+ },
4083
+ "summary": {
4084
+ "type": "string"
4085
+ }
4086
+ }
4087
+ },
4088
+ "ContextReferenceEntry": {
4089
+ "description": "Declarative MCP resource operation. Only deployed scoped operations may execute; schema validation does not authorize access.",
4090
+ "type": "object",
4091
+ "additionalProperties": false,
4092
+ "required": ["resource_ref", "resolver", "locator"],
4093
+ "properties": {
4094
+ "resource_ref": {
4095
+ "type": "string",
4096
+ "minLength": 1
4097
+ },
4098
+ "resolver": {
4099
+ "const": "mcp"
4100
+ },
4101
+ "locator": {
4102
+ "type": "object"
4103
+ },
4104
+ "params": {
4105
+ "description": "Frozen non-secret JSON parameters supplied by the authenticated resolver plan, not model-generated commands.",
4106
+ "type": "object",
4107
+ "additionalProperties": true,
4108
+ "tsType": "Record<string, unknown>"
4109
+ },
4110
+ "authorization_ref": {
4111
+ "type": "string",
4112
+ "minLength": 1
4113
+ },
4114
+ "revision": {
4115
+ "type": "string",
4116
+ "minLength": 1
4117
+ }
4118
+ },
4119
+ "allOf": [
4120
+ {
4121
+ "properties": {
4122
+ "locator": {
4123
+ "$ref": "#/definitions/ContextMcpLocator"
4124
+ }
4125
+ }
4126
+ }
4127
+ ]
4128
+ },
4129
+ "ContextInlinePayload": {
4130
+ "type": "object",
4131
+ "additionalProperties": false,
4132
+ "required": ["entries"],
4133
+ "properties": {
4134
+ "entries": {
4135
+ "type": "array",
4136
+ "minItems": 1,
4137
+ "items": {
4138
+ "$ref": "#/definitions/ContextInlineEntry"
4139
+ }
4140
+ }
4141
+ }
4142
+ },
4143
+ "ContextReferencesPayload": {
4144
+ "type": "object",
4145
+ "x-octo-unique-resource-refs": true,
4146
+ "additionalProperties": false,
4147
+ "required": ["entries"],
4148
+ "properties": {
4149
+ "entries": {
4150
+ "type": "array",
4151
+ "minItems": 1,
4152
+ "uniqueItems": true,
4153
+ "items": {
4154
+ "$ref": "#/definitions/ContextReferenceEntry"
4155
+ }
4156
+ }
4157
+ }
4158
+ },
4159
+ "ToolAuthorization": {
4160
+ "title": "ToolAuthorization",
4161
+ "description": "Business authorization intent; never a tool installation definition.",
4162
+ "type": "object",
4163
+ "additionalProperties": false,
4164
+ "required": ["service_subject_id", "allowed_tools", "resource_refs"],
4165
+ "properties": {
4166
+ "service_subject_id": {
4167
+ "type": "string",
4168
+ "minLength": 1,
4169
+ "maxLength": 96
4170
+ },
4171
+ "allowed_tools": {
4172
+ "type": "array",
4173
+ "minItems": 1,
4174
+ "maxItems": 128,
4175
+ "uniqueItems": true,
4176
+ "items": {
4177
+ "type": "string",
4178
+ "minLength": 1,
4179
+ "maxLength": 512
4180
+ }
4181
+ },
4182
+ "resource_refs": {
4183
+ "type": "array",
4184
+ "minItems": 1,
4185
+ "maxItems": 128,
4186
+ "uniqueItems": true,
4187
+ "items": {
4188
+ "type": "string",
4189
+ "minLength": 1,
4190
+ "maxLength": 512
4191
+ }
4192
+ }
4193
+ }
4194
+ },
4195
+ "IssuedToolAuthorization": {
4196
+ "title": "IssuedToolAuthorization",
4197
+ "description": "Run lease-bound credentials delivered over the authenticated Runtime channel. Never enter provider configuration, prompts or logs.",
4198
+ "type": "object",
4199
+ "additionalProperties": false,
4200
+ "required": [
4201
+ "service_subject_id",
4202
+ "allowed_tools",
4203
+ "resource_refs",
4204
+ "token",
4205
+ "octo_space_id",
4206
+ "namespace",
4207
+ "expires_at"
4208
+ ],
4209
+ "properties": {
4210
+ "service_subject_id": {
4211
+ "type": "string",
4212
+ "minLength": 1,
4213
+ "maxLength": 96
4214
+ },
4215
+ "allowed_tools": {
4216
+ "type": "array",
4217
+ "minItems": 1,
4218
+ "maxItems": 128,
4219
+ "uniqueItems": true,
4220
+ "items": {
4221
+ "type": "string",
4222
+ "minLength": 1,
4223
+ "maxLength": 512
4224
+ }
4225
+ },
4226
+ "resource_refs": {
4227
+ "type": "array",
4228
+ "minItems": 1,
4229
+ "maxItems": 128,
4230
+ "uniqueItems": true,
4231
+ "items": {
4232
+ "type": "string",
4233
+ "minLength": 1,
4234
+ "maxLength": 512
4235
+ }
4236
+ },
4237
+ "token": {
4238
+ "type": "string",
4239
+ "minLength": 1,
4240
+ "maxLength": 512
4241
+ },
4242
+ "octo_space_id": {
4243
+ "type": "string",
4244
+ "minLength": 1,
4245
+ "maxLength": 512
4246
+ },
4247
+ "namespace": {
4248
+ "type": "string",
4249
+ "minLength": 1,
4250
+ "maxLength": 512
4251
+ },
4252
+ "expires_at": {
4253
+ "type": "string",
4254
+ "format": "date-time"
4255
+ }
4256
+ }
4257
+ },
4258
+ "ContextEnvsPayload": {
4259
+ "title": "ContextEnvsPayload",
4260
+ "description": "Run 级环境变量列表;以 key 标识变量,按 key 合并,不进入模型输入。",
4261
+ "type": "object",
4262
+ "additionalProperties": false,
4263
+ "required": ["env_variables"],
4264
+ "properties": {
4265
+ "env_variables": {
4266
+ "type": "array",
4267
+ "maxItems": 128,
4268
+ "items": {
4269
+ "type": "object",
4270
+ "additionalProperties": false,
4271
+ "required": ["key", "value"],
4272
+ "properties": {
4273
+ "key": {
4274
+ "type": "string",
4275
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
4276
+ },
4277
+ "value": {
4278
+ "type": "string",
4279
+ "pattern": "^[^\\u0000]*$"
4280
+ }
4281
+ }
4282
+ }
4283
+ }
4284
+ },
4285
+ "x-octo-unique-env-keys": true
4286
+ },
4287
+ "ContextMcpPayload": {
4288
+ "title": "ContextMcpPayload",
4289
+ "description": "Run-scoped MCP connection templates. Server names are dynamic keys; values are validated by transport. Variables resolve only in the execution environment, never in the model context.",
4290
+ "type": "object",
4291
+ "additionalProperties": false,
4292
+ "required": ["mcpServers"],
4293
+ "properties": {
4294
+ "mcpServers": {
4295
+ "$ref": "#/definitions/McpServers"
4296
+ }
4297
+ }
4298
+ },
4299
+ "ModelInputParts": {
4300
+ "type": "array",
4301
+ "minItems": 1,
4302
+ "maxItems": 128,
4303
+ "items": {
4304
+ "$ref": "#/definitions/ModelInputPart"
4305
+ }
4306
+ },
4307
+ "InvokeInputWire": {
4308
+ "type": "object",
4309
+ "additionalProperties": true,
4310
+ "required": ["inputs", "contexts"],
4311
+ "properties": {
4312
+ "sessionName": {
4313
+ "description": "Optional caller-owned nonblank display name of 1-256 Unicode code points, without C0/DEL/C1 controls; Core supplies a random UUID default without business naming policy.",
4314
+ "type": "string",
4315
+ "minLength": 1,
4316
+ "maxLength": 256,
4317
+ "not": {
4318
+ "anyOf": [
4319
+ { "pattern": "[\\x00-\\x1f\\x7f-\\x9f]" },
4320
+ { "pattern": "^[ \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]*$" }
4321
+ ]
4322
+ }
4323
+ },
4324
+ "sessionId": {
4325
+ "type": "string",
4326
+ "minLength": 1
4327
+ },
4328
+ "invocationId": {
4329
+ "type": "string",
4330
+ "minLength": 1
4331
+ },
4332
+ "runId": {
4333
+ "type": "string",
4334
+ "minLength": 1
4335
+ },
4336
+ "prompt": {
4337
+ "type": "string",
4338
+ "minLength": 1
4339
+ },
4340
+ "modelInput": {
4341
+ "type": "string",
4342
+ "minLength": 1
4343
+ },
4344
+ "freshFallbackModelInput": {
4345
+ "type": "string",
4346
+ "minLength": 1
4347
+ },
4348
+ "workdir": {
4349
+ "type": "string"
4350
+ },
4351
+ "controlInstructions": {
4352
+ "type": "string"
4353
+ },
4354
+ "inputs": {
4355
+ "$ref": "#/definitions/ModelInputParts"
4356
+ },
4357
+ "contexts": {
4358
+ "$ref": "#/definitions/ContextEnvelope"
4359
+ },
4360
+ "protocol_mode": {
4361
+ "$ref": "#/definitions/ProtocolMode"
4362
+ },
4363
+ "agentSource": {
4364
+ "$ref": "#/definitions/AgentSource"
4365
+ },
4366
+ "approvalMode": {
4367
+ "$ref": "#/definitions/ApprovalMode"
4368
+ },
4369
+ "agentConfig": {
4370
+ "$ref": "#/definitions/AgentConfig"
4371
+ },
4372
+ "runtimeLimits": {
4373
+ "$ref": "#/definitions/RuntimeLimits"
4374
+ },
4375
+ "providerSession": {
4376
+ "$ref": "#/definitions/ProviderSession"
4377
+ },
4378
+ "sessionGeneration": {
4379
+ "type": "integer",
4380
+ "minimum": 0,
4381
+ "maximum": 9007199254740991
4382
+ },
4383
+ "providerEpoch": {
4384
+ "type": "integer",
4385
+ "minimum": 0,
4386
+ "maximum": 9007199254740991
4387
+ },
4388
+ "runMetadata": {
4389
+ "type": "object",
4390
+ "additionalProperties": true
4391
+ },
4392
+ "continuityMode": {
4393
+ "enum": ["fresh", "continue"]
4394
+ },
4395
+ "freshFallbackModelInputParts": {
4396
+ "$ref": "#/definitions/ModelInputParts"
4397
+ },
4398
+ "freshFallbackImagesUnavailable": {
4399
+ "type": "boolean"
4400
+ }
4401
+ },
4402
+ "allOf": [
4403
+ {
4404
+ "not": {
4405
+ "required": ["protocolMode"]
4406
+ }
4407
+ },
4408
+ {
4409
+ "not": {
4410
+ "required": ["adapterType"]
4411
+ }
4412
+ },
4413
+ {
4414
+ "not": {
4415
+ "required": ["request"]
4416
+ }
4417
+ },
4418
+ {
4419
+ "not": {
4420
+ "required": ["options"]
4421
+ }
4422
+ },
4423
+ {
4424
+ "not": {
4425
+ "required": ["signal"]
4426
+ }
4427
+ },
4428
+ {
4429
+ "not": {
4430
+ "required": ["executionEnvOverrides"]
4431
+ }
4432
+ },
4433
+ {
4434
+ "properties": {
4435
+ "agentConfig": {
4436
+ "properties": {
4437
+ "timeoutSeconds": {
4438
+ "not": {
4439
+ "maximum": 0
4440
+ }
4441
+ }
4442
+ }
4443
+ },
4444
+ "providerSession": {
4445
+ "properties": {
4446
+ "sessionId": {
4447
+ "pattern": "[^\\t\\n\\r\\f\\v    - 

   ]"
4448
+ }
4449
+ }
4450
+ }
4451
+ }
4452
+ }
4453
+ ],
4454
+ "x-octo-unicode-scalar-strings": true,
4455
+ "x-octo-max-json-depth": 32,
4456
+ "x-octo-max-json-bytes": 33554432
4457
+ },
4458
+ "KernelInvokeEnvironmentWire": {
4459
+ "type": "object",
4460
+ "additionalProperties": false,
4461
+ "required": [],
4462
+ "properties": {
4463
+ "executionEnvOverrides": {
4464
+ "$ref": "#/definitions/ContextEnvsPayload"
4465
+ }
4466
+ }
4467
+ },
4468
+ "InteractionResponseWire": {
4469
+ "type": "object",
4470
+ "additionalProperties": true,
4471
+ "required": ["interactionId", "outcome"],
4472
+ "properties": {
4473
+ "interactionId": {
4474
+ "type": "string",
4475
+ "minLength": 1,
4476
+ "maxLength": 191
4477
+ },
4478
+ "outcome": {
4479
+ "enum": ["accepted", "declined", "answered", "cancelled"]
4480
+ },
4481
+ "value": {}
4482
+ }
4483
+ },
4484
+ "HostedAdapterMetadataWire": {
4485
+ "type": "object",
4486
+ "additionalProperties": true,
4487
+ "required": ["type", "agentSources"],
4488
+ "properties": {
4489
+ "type": {
4490
+ "type": "string"
4491
+ },
4492
+ "agentSources": {
4493
+ "type": "array",
4494
+ "items": {
4495
+ "$ref": "#/definitions/AgentSource"
4496
+ }
4497
+ },
4498
+ "workspace": {
4499
+ "type": "boolean"
4500
+ },
4501
+ "protocolSupport": {
4502
+ "$ref": "#/definitions/AdapterProtocolSupport"
4503
+ },
4504
+ "processModel": {
4505
+ "type": "string"
4506
+ },
4507
+ "transport": {
4508
+ "type": "string"
4509
+ },
4510
+ "providerVersion": {
4511
+ "type": ["string", "null"]
4512
+ },
4513
+ "providerPath": {
4514
+ "type": ["string", "null"]
4515
+ },
4516
+ "available": {
4517
+ "type": "boolean"
4518
+ },
4519
+ "unavailableReason": {
4520
+ "type": ["string", "null"]
4521
+ }
4522
+ }
4523
+ }
4524
+ }
4525
+ }