@osstack/protocol 0.13.0 → 0.20.0

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 (52) hide show
  1. package/dist/generate.d.ts +1 -0
  2. package/dist/generate.d.ts.map +1 -1
  3. package/dist/generate.js +43 -1
  4. package/dist/generate.js.map +1 -1
  5. package/dist/graph-checkpoint.d.ts +409 -0
  6. package/dist/graph-checkpoint.d.ts.map +1 -0
  7. package/dist/graph-checkpoint.js +91 -0
  8. package/dist/graph-checkpoint.js.map +1 -0
  9. package/dist/graph-worker.d.ts +1663 -0
  10. package/dist/graph-worker.d.ts.map +1 -0
  11. package/dist/graph-worker.js +152 -0
  12. package/dist/graph-worker.js.map +1 -0
  13. package/dist/graph.d.ts +12875 -0
  14. package/dist/graph.d.ts.map +1 -0
  15. package/dist/graph.js +423 -0
  16. package/dist/graph.js.map +1 -0
  17. package/dist/index.d.ts +7 -0
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +7 -2
  20. package/dist/index.js.map +1 -1
  21. package/dist/run.d.ts +2 -2
  22. package/dist/session-continuation-grant.d.ts +414 -0
  23. package/dist/session-continuation-grant.d.ts.map +1 -0
  24. package/dist/session-continuation-grant.js +59 -0
  25. package/dist/session-continuation-grant.js.map +1 -0
  26. package/dist/session-continuation.d.ts +129 -0
  27. package/dist/session-continuation.d.ts.map +1 -0
  28. package/dist/session-continuation.js +30 -0
  29. package/dist/session-continuation.js.map +1 -0
  30. package/dist/task.d.ts +2 -2
  31. package/package.json +2 -2
  32. package/schemas/continuation-grant-body.schema.json +189 -0
  33. package/schemas/continuation-output-check.schema.json +65 -0
  34. package/schemas/graph-checkpoint-request.schema.json +222 -0
  35. package/schemas/graph-checkpoint-response.schema.json +258 -0
  36. package/schemas/graph-worker.schema.json +546 -0
  37. package/schemas/graph.schema.json +1768 -0
  38. package/schemas/session-continuation-request.schema.json +62 -0
  39. package/schemas/session-decision.schema.json +107 -0
  40. package/schemas/signed-continuation-grant.schema.json +209 -0
  41. package/dist/autonomy.test.d.ts +0 -2
  42. package/dist/autonomy.test.d.ts.map +0 -1
  43. package/dist/autonomy.test.js +0 -201
  44. package/dist/autonomy.test.js.map +0 -1
  45. package/dist/protocol.test.d.ts +0 -2
  46. package/dist/protocol.test.d.ts.map +0 -1
  47. package/dist/protocol.test.js +0 -251
  48. package/dist/protocol.test.js.map +0 -1
  49. package/dist/schemas.test.d.ts +0 -2
  50. package/dist/schemas.test.d.ts.map +0 -1
  51. package/dist/schemas.test.js +0 -39
  52. package/dist/schemas.test.js.map +0 -1
@@ -0,0 +1,546 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Graph Worker IPC",
4
+ "$comment": "Dedicated length-prefixed fd3 transport; cap raw bytes before allocation and JSON.parse. Host registration supplies authority. done is not process exit evidence.",
5
+ "anyOf": [
6
+ {
7
+ "type": "object",
8
+ "properties": {
9
+ "kind": {
10
+ "type": "string",
11
+ "const": "init"
12
+ },
13
+ "binding": {
14
+ "type": "object",
15
+ "properties": {
16
+ "scope": {
17
+ "type": "object",
18
+ "properties": {
19
+ "schemaVersion": {
20
+ "type": "number",
21
+ "const": 1
22
+ },
23
+ "tenantId": {
24
+ "type": "string",
25
+ "minLength": 1,
26
+ "maxLength": 256,
27
+ "pattern": "^[^\\s\\u0000-\\u001f\\u007f-\\u009f](?:[^\\u0000-\\u001f\\u007f-\\u009f]*[^\\s\\u0000-\\u001f\\u007f-\\u009f])?$"
28
+ },
29
+ "principalId": {
30
+ "$ref": "#/anyOf/0/properties/binding/properties/scope/properties/tenantId"
31
+ },
32
+ "workspaceId": {
33
+ "$ref": "#/anyOf/0/properties/binding/properties/scope/properties/tenantId"
34
+ }
35
+ },
36
+ "required": [
37
+ "schemaVersion",
38
+ "tenantId",
39
+ "principalId",
40
+ "workspaceId"
41
+ ],
42
+ "additionalProperties": false
43
+ },
44
+ "graphRunId": {
45
+ "type": "string",
46
+ "minLength": 1,
47
+ "maxLength": 256
48
+ },
49
+ "generation": {
50
+ "type": "integer",
51
+ "exclusiveMinimum": 0,
52
+ "maximum": 9007199254740991
53
+ },
54
+ "owner": {
55
+ "$ref": "#/anyOf/0/properties/binding/properties/graphRunId"
56
+ },
57
+ "identity": {
58
+ "type": "object",
59
+ "properties": {
60
+ "executionModel": {
61
+ "type": "string",
62
+ "const": "langgraph-functional-v1"
63
+ },
64
+ "durability": {
65
+ "type": "string",
66
+ "const": "sync"
67
+ },
68
+ "engineVersion": {
69
+ "$ref": "#/anyOf/0/properties/binding/properties/graphRunId"
70
+ },
71
+ "checkpointVersion": {
72
+ "$ref": "#/anyOf/0/properties/binding/properties/graphRunId"
73
+ },
74
+ "templateVersion": {
75
+ "$ref": "#/anyOf/0/properties/binding/properties/graphRunId"
76
+ },
77
+ "registryVersion": {
78
+ "$ref": "#/anyOf/0/properties/binding/properties/graphRunId"
79
+ },
80
+ "compilerVersion": {
81
+ "$ref": "#/anyOf/0/properties/binding/properties/graphRunId"
82
+ },
83
+ "schemaVersion": {
84
+ "$ref": "#/anyOf/0/properties/binding/properties/graphRunId"
85
+ },
86
+ "compiledProgramDigest": {
87
+ "type": "string",
88
+ "pattern": "^[a-f0-9]{64}$"
89
+ },
90
+ "specHash": {
91
+ "$ref": "#/anyOf/0/properties/binding/properties/identity/properties/compiledProgramDigest"
92
+ },
93
+ "inputDigest": {
94
+ "$ref": "#/anyOf/0/properties/binding/properties/identity/properties/compiledProgramDigest"
95
+ }
96
+ },
97
+ "required": [
98
+ "executionModel",
99
+ "durability",
100
+ "engineVersion",
101
+ "checkpointVersion",
102
+ "templateVersion",
103
+ "registryVersion",
104
+ "compilerVersion",
105
+ "schemaVersion",
106
+ "compiledProgramDigest",
107
+ "specHash",
108
+ "inputDigest"
109
+ ],
110
+ "additionalProperties": false
111
+ }
112
+ },
113
+ "required": [
114
+ "scope",
115
+ "graphRunId",
116
+ "generation",
117
+ "owner",
118
+ "identity"
119
+ ],
120
+ "additionalProperties": false
121
+ },
122
+ "programId": {
123
+ "$ref": "#/anyOf/0/properties/binding/properties/graphRunId"
124
+ },
125
+ "source": {
126
+ "type": "string",
127
+ "minLength": 1,
128
+ "maxLength": 131072
129
+ },
130
+ "input": {
131
+ "type": "object",
132
+ "properties": {
133
+ "schemaVersion": {
134
+ "$ref": "#/anyOf/0/properties/binding/properties/scope/properties/schemaVersion"
135
+ },
136
+ "scope": {
137
+ "$ref": "#/anyOf/0/properties/binding/properties/scope"
138
+ },
139
+ "idempotencyKey": {
140
+ "$ref": "#/anyOf/0/properties/binding/properties/scope/properties/tenantId"
141
+ },
142
+ "metadata": {
143
+ "type": "object",
144
+ "properties": {
145
+ "trace": {
146
+ "type": "object",
147
+ "properties": {
148
+ "traceId": {
149
+ "$ref": "#/anyOf/0/properties/binding/properties/scope/properties/tenantId"
150
+ },
151
+ "spanId": {
152
+ "$ref": "#/anyOf/0/properties/binding/properties/scope/properties/tenantId"
153
+ }
154
+ },
155
+ "required": [
156
+ "traceId"
157
+ ],
158
+ "additionalProperties": false
159
+ },
160
+ "requestedAt": {
161
+ "type": "string",
162
+ "format": "date-time"
163
+ }
164
+ },
165
+ "additionalProperties": false
166
+ },
167
+ "kind": {
168
+ "type": "string",
169
+ "const": "start"
170
+ },
171
+ "spec": {
172
+ "type": "object",
173
+ "properties": {
174
+ "schemaVersion": {
175
+ "$ref": "#/anyOf/0/properties/binding/properties/scope/properties/schemaVersion"
176
+ },
177
+ "template": {
178
+ "type": "string",
179
+ "const": "code-delivery-v1"
180
+ },
181
+ "input": {
182
+ "type": "object",
183
+ "properties": {
184
+ "taskRef": {
185
+ "$ref": "#/anyOf/0/properties/binding/properties/scope/properties/tenantId"
186
+ },
187
+ "repositoryRef": {
188
+ "$ref": "#/anyOf/0/properties/binding/properties/scope/properties/tenantId"
189
+ },
190
+ "baseRevision": {
191
+ "type": "string",
192
+ "pattern": "^(?:[a-f0-9]{40}|[a-f0-9]{64})$"
193
+ },
194
+ "acceptanceRef": {
195
+ "$ref": "#/anyOf/0/properties/binding/properties/scope/properties/tenantId"
196
+ }
197
+ },
198
+ "required": [
199
+ "taskRef",
200
+ "repositoryRef",
201
+ "baseRevision",
202
+ "acceptanceRef"
203
+ ],
204
+ "additionalProperties": false
205
+ },
206
+ "limits": {
207
+ "type": "object",
208
+ "properties": {
209
+ "maxEpochs": {
210
+ "type": "integer",
211
+ "minimum": 1,
212
+ "maximum": 3
213
+ },
214
+ "maxBranchAttempts": {
215
+ "type": "integer",
216
+ "minimum": 1,
217
+ "maximum": 32
218
+ },
219
+ "maxConcurrentReaders": {
220
+ "type": "integer",
221
+ "minimum": 1,
222
+ "maximum": 64
223
+ },
224
+ "maxConcurrentWritersPerRepo": {
225
+ "type": "number",
226
+ "const": 1
227
+ },
228
+ "maxActionStarts": {
229
+ "type": "integer",
230
+ "minimum": 1,
231
+ "maximum": 100000
232
+ },
233
+ "deadlineSeconds": {
234
+ "type": "integer",
235
+ "minimum": 1,
236
+ "maximum": 604800
237
+ },
238
+ "tokenReservationLimit": {
239
+ "type": "integer",
240
+ "minimum": 0,
241
+ "maximum": 1000000000
242
+ }
243
+ },
244
+ "required": [
245
+ "maxEpochs",
246
+ "maxBranchAttempts",
247
+ "maxConcurrentReaders",
248
+ "maxConcurrentWritersPerRepo",
249
+ "maxActionStarts",
250
+ "deadlineSeconds",
251
+ "tokenReservationLimit"
252
+ ],
253
+ "additionalProperties": false
254
+ },
255
+ "publication": {
256
+ "type": "string",
257
+ "const": "artifact_only"
258
+ }
259
+ },
260
+ "required": [
261
+ "schemaVersion",
262
+ "template",
263
+ "input",
264
+ "limits",
265
+ "publication"
266
+ ],
267
+ "additionalProperties": false
268
+ },
269
+ "inputArtifactRef": {
270
+ "$ref": "#/anyOf/0/properties/binding/properties/scope/properties/tenantId"
271
+ },
272
+ "source": {
273
+ "type": "object",
274
+ "properties": {
275
+ "product": {
276
+ "type": "string",
277
+ "enum": [
278
+ "osstack",
279
+ "osbot",
280
+ "ostag"
281
+ ]
282
+ },
283
+ "requestId": {
284
+ "$ref": "#/anyOf/0/properties/binding/properties/scope/properties/tenantId"
285
+ },
286
+ "parentRunId": {
287
+ "$ref": "#/anyOf/0/properties/binding/properties/scope/properties/tenantId"
288
+ }
289
+ },
290
+ "required": [
291
+ "product",
292
+ "requestId"
293
+ ],
294
+ "additionalProperties": false
295
+ }
296
+ },
297
+ "required": [
298
+ "schemaVersion",
299
+ "scope",
300
+ "idempotencyKey",
301
+ "kind",
302
+ "spec",
303
+ "inputArtifactRef",
304
+ "source"
305
+ ],
306
+ "additionalProperties": false
307
+ },
308
+ "resume": {
309
+ "anyOf": [
310
+ {
311
+ "type": "object",
312
+ "properties": {
313
+ "kind": {
314
+ "type": "string",
315
+ "const": "continue"
316
+ }
317
+ },
318
+ "required": [
319
+ "kind"
320
+ ],
321
+ "additionalProperties": false
322
+ },
323
+ {
324
+ "type": "object",
325
+ "properties": {
326
+ "kind": {
327
+ "type": "string",
328
+ "const": "interrupt"
329
+ },
330
+ "value": {
331
+ "anyOf": [
332
+ {
333
+ "type": "null"
334
+ },
335
+ {
336
+ "type": "boolean"
337
+ },
338
+ {
339
+ "type": "number"
340
+ },
341
+ {
342
+ "type": "string",
343
+ "maxLength": 16384
344
+ },
345
+ {
346
+ "type": "array",
347
+ "items": {
348
+ "$ref": "#/anyOf/0/properties/resume/anyOf/1/properties/value"
349
+ },
350
+ "maxItems": 4096
351
+ },
352
+ {
353
+ "type": "object",
354
+ "additionalProperties": {
355
+ "$ref": "#/anyOf/0/properties/resume/anyOf/1/properties/value"
356
+ },
357
+ "propertyNames": {
358
+ "maxLength": 256,
359
+ "pattern": "^(?!__proto__$|constructor$|prototype$)"
360
+ }
361
+ }
362
+ ]
363
+ }
364
+ },
365
+ "required": [
366
+ "kind",
367
+ "value"
368
+ ],
369
+ "additionalProperties": false
370
+ }
371
+ ]
372
+ },
373
+ "heartbeatMs": {
374
+ "type": "integer",
375
+ "minimum": 10,
376
+ "maximum": 60000
377
+ },
378
+ "maxInFlight": {
379
+ "type": "integer",
380
+ "minimum": 1,
381
+ "maximum": 64
382
+ },
383
+ "requestTimeoutMs": {
384
+ "type": "integer",
385
+ "minimum": 10,
386
+ "maximum": 300000
387
+ }
388
+ },
389
+ "required": [
390
+ "kind",
391
+ "binding",
392
+ "programId",
393
+ "source",
394
+ "input",
395
+ "heartbeatMs",
396
+ "maxInFlight",
397
+ "requestTimeoutMs"
398
+ ],
399
+ "additionalProperties": false
400
+ },
401
+ {
402
+ "type": "object",
403
+ "properties": {
404
+ "kind": {
405
+ "type": "string",
406
+ "const": "ready"
407
+ },
408
+ "binding": {
409
+ "$ref": "#/anyOf/0/properties/binding"
410
+ }
411
+ },
412
+ "required": [
413
+ "kind",
414
+ "binding"
415
+ ],
416
+ "additionalProperties": false
417
+ },
418
+ {
419
+ "type": "object",
420
+ "properties": {
421
+ "kind": {
422
+ "type": "string",
423
+ "const": "heartbeat"
424
+ },
425
+ "binding": {
426
+ "$ref": "#/anyOf/0/properties/binding"
427
+ }
428
+ },
429
+ "required": [
430
+ "kind",
431
+ "binding"
432
+ ],
433
+ "additionalProperties": false
434
+ },
435
+ {
436
+ "type": "object",
437
+ "properties": {
438
+ "kind": {
439
+ "type": "string",
440
+ "const": "cancel"
441
+ },
442
+ "binding": {
443
+ "$ref": "#/anyOf/0/properties/binding"
444
+ },
445
+ "reason": {
446
+ "type": "string",
447
+ "maxLength": 4096
448
+ }
449
+ },
450
+ "required": [
451
+ "kind",
452
+ "binding",
453
+ "reason"
454
+ ],
455
+ "additionalProperties": false
456
+ },
457
+ {
458
+ "type": "object",
459
+ "properties": {
460
+ "kind": {
461
+ "type": "string",
462
+ "const": "request"
463
+ },
464
+ "binding": {
465
+ "$ref": "#/anyOf/0/properties/binding"
466
+ },
467
+ "id": {
468
+ "$ref": "#/anyOf/0/properties/binding/properties/graphRunId"
469
+ },
470
+ "method": {
471
+ "type": "string",
472
+ "enum": [
473
+ "action",
474
+ "checkpoint"
475
+ ]
476
+ },
477
+ "payload": {}
478
+ },
479
+ "required": [
480
+ "kind",
481
+ "binding",
482
+ "id",
483
+ "method"
484
+ ],
485
+ "additionalProperties": false
486
+ },
487
+ {
488
+ "type": "object",
489
+ "properties": {
490
+ "kind": {
491
+ "type": "string",
492
+ "const": "response"
493
+ },
494
+ "binding": {
495
+ "$ref": "#/anyOf/0/properties/binding"
496
+ },
497
+ "id": {
498
+ "$ref": "#/anyOf/0/properties/binding/properties/graphRunId"
499
+ },
500
+ "ok": {
501
+ "type": "boolean"
502
+ },
503
+ "payload": {},
504
+ "error": {
505
+ "type": "string",
506
+ "maxLength": 4096
507
+ }
508
+ },
509
+ "required": [
510
+ "kind",
511
+ "binding",
512
+ "id",
513
+ "ok"
514
+ ],
515
+ "additionalProperties": false
516
+ },
517
+ {
518
+ "type": "object",
519
+ "properties": {
520
+ "kind": {
521
+ "type": "string",
522
+ "const": "done"
523
+ },
524
+ "binding": {
525
+ "$ref": "#/anyOf/0/properties/binding"
526
+ },
527
+ "ok": {
528
+ "type": "boolean"
529
+ },
530
+ "value": {
531
+ "$ref": "#/anyOf/0/properties/resume/anyOf/1/properties/value"
532
+ },
533
+ "error": {
534
+ "type": "string",
535
+ "maxLength": 4096
536
+ }
537
+ },
538
+ "required": [
539
+ "kind",
540
+ "binding",
541
+ "ok"
542
+ ],
543
+ "additionalProperties": false
544
+ }
545
+ ]
546
+ }