@drisp/protocol 0.6.0 → 0.8.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.
@@ -0,0 +1,710 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "runId": {
6
+ "type": "string",
7
+ "minLength": 1,
8
+ "maxLength": 160
9
+ },
10
+ "sessionId": {
11
+ "type": "string",
12
+ "minLength": 1,
13
+ "maxLength": 160
14
+ },
15
+ "runnerId": {
16
+ "type": "string",
17
+ "minLength": 1,
18
+ "maxLength": 160
19
+ },
20
+ "computeProfileId": {
21
+ "type": "string",
22
+ "minLength": 1,
23
+ "maxLength": 160
24
+ },
25
+ "scope": {
26
+ "oneOf": [
27
+ {
28
+ "type": "object",
29
+ "properties": {
30
+ "visibility": {
31
+ "type": "string",
32
+ "const": "organization"
33
+ }
34
+ },
35
+ "required": [
36
+ "visibility"
37
+ ],
38
+ "additionalProperties": false
39
+ },
40
+ {
41
+ "type": "object",
42
+ "properties": {
43
+ "visibility": {
44
+ "type": "string",
45
+ "const": "private"
46
+ },
47
+ "ownerUserId": {
48
+ "type": "string",
49
+ "minLength": 1,
50
+ "maxLength": 160
51
+ }
52
+ },
53
+ "required": [
54
+ "visibility",
55
+ "ownerUserId"
56
+ ],
57
+ "additionalProperties": false
58
+ }
59
+ ]
60
+ },
61
+ "recordRevision": {
62
+ "type": "integer",
63
+ "minimum": 0,
64
+ "maximum": 9007199254740991
65
+ },
66
+ "label": {
67
+ "type": "string",
68
+ "maxLength": 160
69
+ },
70
+ "key": {
71
+ "type": "string",
72
+ "minLength": 1,
73
+ "maxLength": 160
74
+ },
75
+ "parent": {
76
+ "type": "object",
77
+ "properties": {
78
+ "runId": {
79
+ "type": "string",
80
+ "minLength": 1,
81
+ "maxLength": 160
82
+ },
83
+ "tokenCap": {
84
+ "type": "integer",
85
+ "exclusiveMinimum": 0,
86
+ "maximum": 9007199254740991
87
+ }
88
+ },
89
+ "required": [
90
+ "runId",
91
+ "tokenCap"
92
+ ],
93
+ "additionalProperties": false
94
+ },
95
+ "delegation": {
96
+ "type": "object",
97
+ "properties": {
98
+ "maxChildren": {
99
+ "type": "integer",
100
+ "minimum": 1,
101
+ "maximum": 8
102
+ },
103
+ "tokenBudget": {
104
+ "type": "integer",
105
+ "exclusiveMinimum": 0,
106
+ "maximum": 9007199254740991
107
+ }
108
+ },
109
+ "required": [
110
+ "maxChildren",
111
+ "tokenBudget"
112
+ ],
113
+ "additionalProperties": false
114
+ },
115
+ "workflow": {
116
+ "type": "object",
117
+ "properties": {
118
+ "name": {
119
+ "type": "string",
120
+ "minLength": 1,
121
+ "maxLength": 128
122
+ },
123
+ "version": {
124
+ "type": "string",
125
+ "minLength": 1,
126
+ "maxLength": 128
127
+ }
128
+ },
129
+ "required": [
130
+ "name"
131
+ ],
132
+ "additionalProperties": false
133
+ },
134
+ "execution": {
135
+ "anyOf": [
136
+ {
137
+ "type": "object",
138
+ "properties": {
139
+ "status": {
140
+ "type": "string",
141
+ "enum": [
142
+ "running",
143
+ "awaiting_attention",
144
+ "completed",
145
+ "failed",
146
+ "cancelled"
147
+ ]
148
+ },
149
+ "revision": {
150
+ "type": "integer",
151
+ "minimum": 0,
152
+ "maximum": 9007199254740991
153
+ },
154
+ "attemptId": {
155
+ "type": "string",
156
+ "minLength": 1,
157
+ "maxLength": 160
158
+ },
159
+ "occupancy": {
160
+ "type": "string",
161
+ "enum": [
162
+ "held",
163
+ "released"
164
+ ]
165
+ },
166
+ "startedAt": {
167
+ "type": "string",
168
+ "format": "date-time",
169
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
170
+ },
171
+ "endedAt": {
172
+ "type": "string",
173
+ "format": "date-time",
174
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
175
+ },
176
+ "interruption": {
177
+ "type": "object",
178
+ "properties": {
179
+ "interruptionId": {
180
+ "type": "string",
181
+ "minLength": 1,
182
+ "maxLength": 160
183
+ },
184
+ "revision": {
185
+ "type": "integer",
186
+ "minimum": 0,
187
+ "maximum": 9007199254740991
188
+ },
189
+ "kind": {
190
+ "type": "string",
191
+ "enum": [
192
+ "permission",
193
+ "question",
194
+ "guidance",
195
+ "recovery",
196
+ "waiting"
197
+ ]
198
+ },
199
+ "message": {
200
+ "type": "string",
201
+ "maxLength": 16384
202
+ },
203
+ "requestId": {
204
+ "type": "string",
205
+ "minLength": 1,
206
+ "maxLength": 160
207
+ }
208
+ },
209
+ "required": [
210
+ "interruptionId",
211
+ "revision",
212
+ "kind",
213
+ "message"
214
+ ],
215
+ "additionalProperties": false
216
+ }
217
+ },
218
+ "required": [
219
+ "status",
220
+ "revision",
221
+ "attemptId",
222
+ "occupancy"
223
+ ],
224
+ "additionalProperties": false
225
+ },
226
+ {
227
+ "type": "null"
228
+ }
229
+ ]
230
+ },
231
+ "scheduling": {
232
+ "type": "string",
233
+ "enum": [
234
+ "queued",
235
+ "dispatching",
236
+ "admitted",
237
+ "idle"
238
+ ]
239
+ },
240
+ "closed": {
241
+ "type": "boolean"
242
+ },
243
+ "closeReason": {
244
+ "type": "string"
245
+ },
246
+ "cancellation": {
247
+ "type": "string",
248
+ "minLength": 1,
249
+ "maxLength": 160
250
+ },
251
+ "pendingResume": {
252
+ "oneOf": [
253
+ {
254
+ "type": "object",
255
+ "properties": {
256
+ "kind": {
257
+ "type": "string",
258
+ "const": "start"
259
+ },
260
+ "sessionId": {
261
+ "type": "string",
262
+ "minLength": 1,
263
+ "maxLength": 160
264
+ },
265
+ "runnerId": {
266
+ "type": "string",
267
+ "minLength": 1,
268
+ "maxLength": 160
269
+ },
270
+ "computeProfileId": {
271
+ "type": "string",
272
+ "minLength": 1,
273
+ "maxLength": 160
274
+ },
275
+ "scope": {
276
+ "oneOf": [
277
+ {
278
+ "type": "object",
279
+ "properties": {
280
+ "visibility": {
281
+ "type": "string",
282
+ "const": "organization"
283
+ }
284
+ },
285
+ "required": [
286
+ "visibility"
287
+ ],
288
+ "additionalProperties": false
289
+ },
290
+ {
291
+ "type": "object",
292
+ "properties": {
293
+ "visibility": {
294
+ "type": "string",
295
+ "const": "private"
296
+ },
297
+ "ownerUserId": {
298
+ "type": "string",
299
+ "minLength": 1,
300
+ "maxLength": 160
301
+ }
302
+ },
303
+ "required": [
304
+ "visibility",
305
+ "ownerUserId"
306
+ ],
307
+ "additionalProperties": false
308
+ }
309
+ ]
310
+ },
311
+ "spec": {
312
+ "type": "object",
313
+ "properties": {
314
+ "prompt": {
315
+ "type": "string",
316
+ "minLength": 1,
317
+ "maxLength": 131072
318
+ },
319
+ "projectDir": {
320
+ "type": "string",
321
+ "minLength": 1,
322
+ "maxLength": 4096
323
+ },
324
+ "harness": {
325
+ "type": "string",
326
+ "enum": [
327
+ "claude-code",
328
+ "codex"
329
+ ]
330
+ },
331
+ "workflow": {
332
+ "anyOf": [
333
+ {
334
+ "type": "string",
335
+ "maxLength": 512
336
+ },
337
+ {
338
+ "type": "object",
339
+ "properties": {
340
+ "name": {
341
+ "type": "string",
342
+ "minLength": 1,
343
+ "maxLength": 128,
344
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]*$"
345
+ },
346
+ "source": {
347
+ "type": "string",
348
+ "maxLength": 201,
349
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]*\\/[A-Za-z0-9][A-Za-z0-9_.-]*$"
350
+ },
351
+ "ref": {
352
+ "type": "string",
353
+ "minLength": 1,
354
+ "maxLength": 512
355
+ },
356
+ "version": {
357
+ "type": "string",
358
+ "minLength": 1,
359
+ "maxLength": 128,
360
+ "pattern": "^\\d[A-Za-z0-9_.+-]*$"
361
+ }
362
+ },
363
+ "required": [
364
+ "name"
365
+ ],
366
+ "additionalProperties": false
367
+ }
368
+ ]
369
+ },
370
+ "repository": {
371
+ "type": "object",
372
+ "properties": {
373
+ "bindingId": {
374
+ "type": "string",
375
+ "minLength": 1,
376
+ "maxLength": 160
377
+ },
378
+ "repositoryId": {
379
+ "type": "integer",
380
+ "exclusiveMinimum": 0,
381
+ "maximum": 9007199254740991
382
+ },
383
+ "installationId": {
384
+ "type": "integer",
385
+ "exclusiveMinimum": 0,
386
+ "maximum": 9007199254740991
387
+ },
388
+ "owner": {
389
+ "type": "string",
390
+ "minLength": 1,
391
+ "maxLength": 100,
392
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-]*$"
393
+ },
394
+ "name": {
395
+ "type": "string",
396
+ "minLength": 1,
397
+ "maxLength": 100,
398
+ "pattern": "^(?!\\.{1,2}$)[a-zA-Z0-9_.-]+$"
399
+ },
400
+ "ref": {
401
+ "type": "string",
402
+ "minLength": 1,
403
+ "maxLength": 512,
404
+ "pattern": "^(?![-/])(?!.*\\.\\.)(?!.*@\\{)(?!.*(?:^|\\/)\\.)(?!.*\\.lock(?:\\/|$))(?!.*\\/\\/)[^\\x00-\\x20\\x7f~^:?*\\[\\\\]+(?<![/.])$"
405
+ },
406
+ "commitSha": {
407
+ "type": "string",
408
+ "pattern": "^[0-9a-f]{40}$"
409
+ },
410
+ "branch": {
411
+ "type": "string",
412
+ "minLength": 1,
413
+ "maxLength": 512,
414
+ "pattern": "^(?![-/])(?!.*\\.\\.)(?!.*@\\{)(?!.*(?:^|\\/)\\.)(?!.*\\.lock(?:\\/|$))(?!.*\\/\\/)[^\\x00-\\x20\\x7f~^:?*\\[\\\\]+(?<![/.])$"
415
+ },
416
+ "workingDirectory": {
417
+ "type": "string",
418
+ "minLength": 1,
419
+ "maxLength": 1024,
420
+ "pattern": "^(?:\\.|(?!\\/)(?!.*(?:^|\\/)\\.\\.?(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))[^\\x00-\\x1f\\x7f\\\\:]+(?<!\\/))$"
421
+ },
422
+ "setupCommands": {
423
+ "maxItems": 16,
424
+ "type": "array",
425
+ "items": {
426
+ "type": "string",
427
+ "minLength": 1,
428
+ "maxLength": 8192
429
+ }
430
+ },
431
+ "configRevision": {
432
+ "type": "integer",
433
+ "minimum": 0,
434
+ "maximum": 9007199254740991
435
+ }
436
+ },
437
+ "required": [
438
+ "bindingId",
439
+ "repositoryId",
440
+ "installationId",
441
+ "owner",
442
+ "name",
443
+ "ref",
444
+ "commitSha",
445
+ "branch",
446
+ "workingDirectory",
447
+ "setupCommands",
448
+ "configRevision"
449
+ ],
450
+ "additionalProperties": false
451
+ }
452
+ },
453
+ "required": [
454
+ "prompt",
455
+ "projectDir",
456
+ "harness"
457
+ ],
458
+ "additionalProperties": false
459
+ },
460
+ "key": {
461
+ "type": "string",
462
+ "minLength": 1,
463
+ "maxLength": 160
464
+ },
465
+ "delegation": {
466
+ "type": "object",
467
+ "properties": {
468
+ "maxChildren": {
469
+ "type": "integer",
470
+ "minimum": 1,
471
+ "maximum": 8
472
+ },
473
+ "tokenBudget": {
474
+ "type": "integer",
475
+ "exclusiveMinimum": 0,
476
+ "maximum": 9007199254740991
477
+ }
478
+ },
479
+ "required": [
480
+ "maxChildren",
481
+ "tokenBudget"
482
+ ],
483
+ "additionalProperties": false
484
+ },
485
+ "parent": {
486
+ "type": "object",
487
+ "properties": {
488
+ "runId": {
489
+ "type": "string",
490
+ "minLength": 1,
491
+ "maxLength": 160
492
+ },
493
+ "tokenCap": {
494
+ "type": "integer",
495
+ "exclusiveMinimum": 0,
496
+ "maximum": 9007199254740991
497
+ }
498
+ },
499
+ "required": [
500
+ "runId"
501
+ ],
502
+ "additionalProperties": false
503
+ }
504
+ },
505
+ "required": [
506
+ "kind",
507
+ "sessionId",
508
+ "scope",
509
+ "spec"
510
+ ],
511
+ "additionalProperties": false
512
+ },
513
+ {
514
+ "type": "object",
515
+ "properties": {
516
+ "kind": {
517
+ "type": "string",
518
+ "const": "cancel"
519
+ }
520
+ },
521
+ "required": [
522
+ "kind"
523
+ ],
524
+ "additionalProperties": false
525
+ },
526
+ {
527
+ "type": "object",
528
+ "properties": {
529
+ "kind": {
530
+ "type": "string",
531
+ "const": "abandon"
532
+ }
533
+ },
534
+ "required": [
535
+ "kind"
536
+ ],
537
+ "additionalProperties": false
538
+ },
539
+ {
540
+ "type": "object",
541
+ "properties": {
542
+ "kind": {
543
+ "type": "string",
544
+ "const": "steer"
545
+ },
546
+ "text": {
547
+ "type": "string",
548
+ "minLength": 1,
549
+ "maxLength": 131072
550
+ }
551
+ },
552
+ "required": [
553
+ "kind",
554
+ "text"
555
+ ],
556
+ "additionalProperties": false
557
+ },
558
+ {
559
+ "type": "object",
560
+ "properties": {
561
+ "kind": {
562
+ "type": "string",
563
+ "const": "answer"
564
+ },
565
+ "interruptionId": {
566
+ "type": "string",
567
+ "minLength": 1,
568
+ "maxLength": 160
569
+ },
570
+ "expectedInterruptionRevision": {
571
+ "type": "integer",
572
+ "minimum": 0,
573
+ "maximum": 9007199254740991
574
+ },
575
+ "requestId": {
576
+ "type": "string",
577
+ "minLength": 1,
578
+ "maxLength": 160
579
+ },
580
+ "answer": {
581
+ "$ref": "#/$defs/__schema0"
582
+ }
583
+ },
584
+ "required": [
585
+ "kind",
586
+ "interruptionId",
587
+ "expectedInterruptionRevision",
588
+ "answer"
589
+ ],
590
+ "additionalProperties": false
591
+ },
592
+ {
593
+ "type": "object",
594
+ "properties": {
595
+ "kind": {
596
+ "type": "string",
597
+ "const": "resume"
598
+ },
599
+ "interruptionId": {
600
+ "type": "string",
601
+ "minLength": 1,
602
+ "maxLength": 160
603
+ },
604
+ "guidance": {
605
+ "type": "string",
606
+ "maxLength": 131072
607
+ }
608
+ },
609
+ "required": [
610
+ "kind",
611
+ "interruptionId"
612
+ ],
613
+ "additionalProperties": false
614
+ }
615
+ ]
616
+ },
617
+ "runnerStopped": {
618
+ "type": "boolean"
619
+ },
620
+ "canAbandon": {
621
+ "type": "boolean"
622
+ },
623
+ "historyThrough": {
624
+ "type": "integer",
625
+ "minimum": 0,
626
+ "maximum": 9007199254740991
627
+ },
628
+ "expectedHistoryThrough": {
629
+ "type": "integer",
630
+ "minimum": 0,
631
+ "maximum": 9007199254740991
632
+ },
633
+ "createdAt": {
634
+ "type": "integer",
635
+ "minimum": 0,
636
+ "maximum": 9007199254740991
637
+ },
638
+ "checkpoint": {
639
+ "type": "object",
640
+ "properties": {
641
+ "id": {
642
+ "type": "string",
643
+ "minLength": 1,
644
+ "maxLength": 160
645
+ },
646
+ "state": {
647
+ "type": "string",
648
+ "enum": [
649
+ "pending",
650
+ "ready"
651
+ ]
652
+ },
653
+ "checksum": {
654
+ "type": "string"
655
+ }
656
+ },
657
+ "required": [
658
+ "id",
659
+ "state"
660
+ ],
661
+ "additionalProperties": false
662
+ }
663
+ },
664
+ "required": [
665
+ "runId",
666
+ "sessionId",
667
+ "runnerId",
668
+ "scope",
669
+ "recordRevision",
670
+ "execution",
671
+ "scheduling",
672
+ "closed",
673
+ "historyThrough",
674
+ "createdAt"
675
+ ],
676
+ "additionalProperties": false,
677
+ "$defs": {
678
+ "__schema0": {
679
+ "anyOf": [
680
+ {
681
+ "type": "string"
682
+ },
683
+ {
684
+ "type": "number"
685
+ },
686
+ {
687
+ "type": "boolean"
688
+ },
689
+ {
690
+ "type": "null"
691
+ },
692
+ {
693
+ "type": "array",
694
+ "items": {
695
+ "$ref": "#/$defs/__schema0"
696
+ }
697
+ },
698
+ {
699
+ "type": "object",
700
+ "propertyNames": {
701
+ "type": "string"
702
+ },
703
+ "additionalProperties": {
704
+ "$ref": "#/$defs/__schema0"
705
+ }
706
+ }
707
+ ]
708
+ }
709
+ }
710
+ }