@drisp/protocol 0.6.0 → 0.6.2

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,620 @@
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
+ "workflow": {
71
+ "type": "object",
72
+ "properties": {
73
+ "name": {
74
+ "type": "string",
75
+ "minLength": 1,
76
+ "maxLength": 128
77
+ },
78
+ "version": {
79
+ "type": "string",
80
+ "minLength": 1,
81
+ "maxLength": 128
82
+ }
83
+ },
84
+ "required": [
85
+ "name"
86
+ ],
87
+ "additionalProperties": false
88
+ },
89
+ "execution": {
90
+ "anyOf": [
91
+ {
92
+ "type": "object",
93
+ "properties": {
94
+ "status": {
95
+ "type": "string",
96
+ "enum": [
97
+ "running",
98
+ "awaiting_attention",
99
+ "completed",
100
+ "failed",
101
+ "cancelled"
102
+ ]
103
+ },
104
+ "revision": {
105
+ "type": "integer",
106
+ "minimum": 0,
107
+ "maximum": 9007199254740991
108
+ },
109
+ "attemptId": {
110
+ "type": "string",
111
+ "minLength": 1,
112
+ "maxLength": 160
113
+ },
114
+ "occupancy": {
115
+ "type": "string",
116
+ "enum": [
117
+ "held",
118
+ "released"
119
+ ]
120
+ },
121
+ "startedAt": {
122
+ "type": "string",
123
+ "format": "date-time",
124
+ "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))$"
125
+ },
126
+ "endedAt": {
127
+ "type": "string",
128
+ "format": "date-time",
129
+ "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))$"
130
+ },
131
+ "interruption": {
132
+ "type": "object",
133
+ "properties": {
134
+ "interruptionId": {
135
+ "type": "string",
136
+ "minLength": 1,
137
+ "maxLength": 160
138
+ },
139
+ "revision": {
140
+ "type": "integer",
141
+ "minimum": 0,
142
+ "maximum": 9007199254740991
143
+ },
144
+ "kind": {
145
+ "type": "string",
146
+ "enum": [
147
+ "permission",
148
+ "question",
149
+ "guidance",
150
+ "recovery"
151
+ ]
152
+ },
153
+ "message": {
154
+ "type": "string",
155
+ "maxLength": 16384
156
+ },
157
+ "requestId": {
158
+ "type": "string",
159
+ "minLength": 1,
160
+ "maxLength": 160
161
+ }
162
+ },
163
+ "required": [
164
+ "interruptionId",
165
+ "revision",
166
+ "kind",
167
+ "message"
168
+ ],
169
+ "additionalProperties": false
170
+ }
171
+ },
172
+ "required": [
173
+ "status",
174
+ "revision",
175
+ "attemptId",
176
+ "occupancy"
177
+ ],
178
+ "additionalProperties": false
179
+ },
180
+ {
181
+ "type": "null"
182
+ }
183
+ ]
184
+ },
185
+ "scheduling": {
186
+ "type": "string",
187
+ "enum": [
188
+ "queued",
189
+ "dispatching",
190
+ "admitted",
191
+ "idle"
192
+ ]
193
+ },
194
+ "closed": {
195
+ "type": "boolean"
196
+ },
197
+ "closeReason": {
198
+ "type": "string"
199
+ },
200
+ "cancellation": {
201
+ "type": "string",
202
+ "minLength": 1,
203
+ "maxLength": 160
204
+ },
205
+ "pendingResume": {
206
+ "oneOf": [
207
+ {
208
+ "type": "object",
209
+ "properties": {
210
+ "kind": {
211
+ "type": "string",
212
+ "const": "start"
213
+ },
214
+ "sessionId": {
215
+ "type": "string",
216
+ "minLength": 1,
217
+ "maxLength": 160
218
+ },
219
+ "runnerId": {
220
+ "type": "string",
221
+ "minLength": 1,
222
+ "maxLength": 160
223
+ },
224
+ "computeProfileId": {
225
+ "type": "string",
226
+ "minLength": 1,
227
+ "maxLength": 160
228
+ },
229
+ "scope": {
230
+ "oneOf": [
231
+ {
232
+ "type": "object",
233
+ "properties": {
234
+ "visibility": {
235
+ "type": "string",
236
+ "const": "organization"
237
+ }
238
+ },
239
+ "required": [
240
+ "visibility"
241
+ ],
242
+ "additionalProperties": false
243
+ },
244
+ {
245
+ "type": "object",
246
+ "properties": {
247
+ "visibility": {
248
+ "type": "string",
249
+ "const": "private"
250
+ },
251
+ "ownerUserId": {
252
+ "type": "string",
253
+ "minLength": 1,
254
+ "maxLength": 160
255
+ }
256
+ },
257
+ "required": [
258
+ "visibility",
259
+ "ownerUserId"
260
+ ],
261
+ "additionalProperties": false
262
+ }
263
+ ]
264
+ },
265
+ "spec": {
266
+ "type": "object",
267
+ "properties": {
268
+ "prompt": {
269
+ "type": "string",
270
+ "minLength": 1,
271
+ "maxLength": 131072
272
+ },
273
+ "projectDir": {
274
+ "type": "string",
275
+ "minLength": 1,
276
+ "maxLength": 4096
277
+ },
278
+ "harness": {
279
+ "type": "string",
280
+ "enum": [
281
+ "claude-code",
282
+ "codex"
283
+ ]
284
+ },
285
+ "workflow": {
286
+ "anyOf": [
287
+ {
288
+ "type": "string",
289
+ "maxLength": 512
290
+ },
291
+ {
292
+ "type": "object",
293
+ "properties": {
294
+ "name": {
295
+ "type": "string",
296
+ "minLength": 1,
297
+ "maxLength": 128,
298
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]*$"
299
+ },
300
+ "source": {
301
+ "type": "string",
302
+ "maxLength": 201,
303
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]*\\/[A-Za-z0-9][A-Za-z0-9_.-]*$"
304
+ },
305
+ "ref": {
306
+ "type": "string",
307
+ "minLength": 1,
308
+ "maxLength": 512
309
+ },
310
+ "version": {
311
+ "type": "string",
312
+ "minLength": 1,
313
+ "maxLength": 128,
314
+ "pattern": "^\\d[A-Za-z0-9_.+-]*$"
315
+ }
316
+ },
317
+ "required": [
318
+ "name"
319
+ ],
320
+ "additionalProperties": false
321
+ }
322
+ ]
323
+ },
324
+ "repository": {
325
+ "type": "object",
326
+ "properties": {
327
+ "bindingId": {
328
+ "type": "string",
329
+ "minLength": 1,
330
+ "maxLength": 160
331
+ },
332
+ "repositoryId": {
333
+ "type": "integer",
334
+ "exclusiveMinimum": 0,
335
+ "maximum": 9007199254740991
336
+ },
337
+ "installationId": {
338
+ "type": "integer",
339
+ "exclusiveMinimum": 0,
340
+ "maximum": 9007199254740991
341
+ },
342
+ "owner": {
343
+ "type": "string",
344
+ "minLength": 1,
345
+ "maxLength": 100,
346
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-]*$"
347
+ },
348
+ "name": {
349
+ "type": "string",
350
+ "minLength": 1,
351
+ "maxLength": 100,
352
+ "pattern": "^(?!\\.{1,2}$)[a-zA-Z0-9_.-]+$"
353
+ },
354
+ "ref": {
355
+ "type": "string",
356
+ "minLength": 1,
357
+ "maxLength": 512,
358
+ "pattern": "^(?![-/])(?!.*\\.\\.)(?!.*@\\{)(?!.*(?:^|\\/)\\.)(?!.*\\.lock(?:\\/|$))(?!.*\\/\\/)[^\\x00-\\x20\\x7f~^:?*\\[\\\\]+(?<![/.])$"
359
+ },
360
+ "commitSha": {
361
+ "type": "string",
362
+ "pattern": "^[0-9a-f]{40}$"
363
+ },
364
+ "branch": {
365
+ "type": "string",
366
+ "minLength": 1,
367
+ "maxLength": 512,
368
+ "pattern": "^(?![-/])(?!.*\\.\\.)(?!.*@\\{)(?!.*(?:^|\\/)\\.)(?!.*\\.lock(?:\\/|$))(?!.*\\/\\/)[^\\x00-\\x20\\x7f~^:?*\\[\\\\]+(?<![/.])$"
369
+ },
370
+ "workingDirectory": {
371
+ "type": "string",
372
+ "minLength": 1,
373
+ "maxLength": 1024,
374
+ "pattern": "^(?:\\.|(?!\\/)(?!.*(?:^|\\/)\\.\\.?(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))[^\\x00-\\x1f\\x7f\\\\:]+(?<!\\/))$"
375
+ },
376
+ "setupCommands": {
377
+ "maxItems": 16,
378
+ "type": "array",
379
+ "items": {
380
+ "type": "string",
381
+ "minLength": 1,
382
+ "maxLength": 8192
383
+ }
384
+ },
385
+ "configRevision": {
386
+ "type": "integer",
387
+ "minimum": 0,
388
+ "maximum": 9007199254740991
389
+ }
390
+ },
391
+ "required": [
392
+ "bindingId",
393
+ "repositoryId",
394
+ "installationId",
395
+ "owner",
396
+ "name",
397
+ "ref",
398
+ "commitSha",
399
+ "branch",
400
+ "workingDirectory",
401
+ "setupCommands",
402
+ "configRevision"
403
+ ],
404
+ "additionalProperties": false
405
+ }
406
+ },
407
+ "required": [
408
+ "prompt",
409
+ "projectDir",
410
+ "harness"
411
+ ],
412
+ "additionalProperties": false
413
+ }
414
+ },
415
+ "required": [
416
+ "kind",
417
+ "sessionId",
418
+ "scope",
419
+ "spec"
420
+ ],
421
+ "additionalProperties": false
422
+ },
423
+ {
424
+ "type": "object",
425
+ "properties": {
426
+ "kind": {
427
+ "type": "string",
428
+ "const": "cancel"
429
+ }
430
+ },
431
+ "required": [
432
+ "kind"
433
+ ],
434
+ "additionalProperties": false
435
+ },
436
+ {
437
+ "type": "object",
438
+ "properties": {
439
+ "kind": {
440
+ "type": "string",
441
+ "const": "abandon"
442
+ }
443
+ },
444
+ "required": [
445
+ "kind"
446
+ ],
447
+ "additionalProperties": false
448
+ },
449
+ {
450
+ "type": "object",
451
+ "properties": {
452
+ "kind": {
453
+ "type": "string",
454
+ "const": "steer"
455
+ },
456
+ "text": {
457
+ "type": "string",
458
+ "minLength": 1,
459
+ "maxLength": 131072
460
+ }
461
+ },
462
+ "required": [
463
+ "kind",
464
+ "text"
465
+ ],
466
+ "additionalProperties": false
467
+ },
468
+ {
469
+ "type": "object",
470
+ "properties": {
471
+ "kind": {
472
+ "type": "string",
473
+ "const": "answer"
474
+ },
475
+ "interruptionId": {
476
+ "type": "string",
477
+ "minLength": 1,
478
+ "maxLength": 160
479
+ },
480
+ "expectedInterruptionRevision": {
481
+ "type": "integer",
482
+ "minimum": 0,
483
+ "maximum": 9007199254740991
484
+ },
485
+ "requestId": {
486
+ "type": "string",
487
+ "minLength": 1,
488
+ "maxLength": 160
489
+ },
490
+ "answer": {
491
+ "$ref": "#/$defs/__schema0"
492
+ }
493
+ },
494
+ "required": [
495
+ "kind",
496
+ "interruptionId",
497
+ "expectedInterruptionRevision",
498
+ "answer"
499
+ ],
500
+ "additionalProperties": false
501
+ },
502
+ {
503
+ "type": "object",
504
+ "properties": {
505
+ "kind": {
506
+ "type": "string",
507
+ "const": "resume"
508
+ },
509
+ "interruptionId": {
510
+ "type": "string",
511
+ "minLength": 1,
512
+ "maxLength": 160
513
+ },
514
+ "guidance": {
515
+ "type": "string",
516
+ "maxLength": 131072
517
+ }
518
+ },
519
+ "required": [
520
+ "kind",
521
+ "interruptionId"
522
+ ],
523
+ "additionalProperties": false
524
+ }
525
+ ]
526
+ },
527
+ "runnerStopped": {
528
+ "type": "boolean"
529
+ },
530
+ "canAbandon": {
531
+ "type": "boolean"
532
+ },
533
+ "historyThrough": {
534
+ "type": "integer",
535
+ "minimum": 0,
536
+ "maximum": 9007199254740991
537
+ },
538
+ "expectedHistoryThrough": {
539
+ "type": "integer",
540
+ "minimum": 0,
541
+ "maximum": 9007199254740991
542
+ },
543
+ "createdAt": {
544
+ "type": "integer",
545
+ "minimum": 0,
546
+ "maximum": 9007199254740991
547
+ },
548
+ "checkpoint": {
549
+ "type": "object",
550
+ "properties": {
551
+ "id": {
552
+ "type": "string",
553
+ "minLength": 1,
554
+ "maxLength": 160
555
+ },
556
+ "state": {
557
+ "type": "string",
558
+ "enum": [
559
+ "pending",
560
+ "ready"
561
+ ]
562
+ },
563
+ "checksum": {
564
+ "type": "string"
565
+ }
566
+ },
567
+ "required": [
568
+ "id",
569
+ "state"
570
+ ],
571
+ "additionalProperties": false
572
+ }
573
+ },
574
+ "required": [
575
+ "runId",
576
+ "sessionId",
577
+ "runnerId",
578
+ "scope",
579
+ "recordRevision",
580
+ "execution",
581
+ "scheduling",
582
+ "closed",
583
+ "historyThrough",
584
+ "createdAt"
585
+ ],
586
+ "additionalProperties": false,
587
+ "$defs": {
588
+ "__schema0": {
589
+ "anyOf": [
590
+ {
591
+ "type": "string"
592
+ },
593
+ {
594
+ "type": "number"
595
+ },
596
+ {
597
+ "type": "boolean"
598
+ },
599
+ {
600
+ "type": "null"
601
+ },
602
+ {
603
+ "type": "array",
604
+ "items": {
605
+ "$ref": "#/$defs/__schema0"
606
+ }
607
+ },
608
+ {
609
+ "type": "object",
610
+ "propertyNames": {
611
+ "type": "string"
612
+ },
613
+ "additionalProperties": {
614
+ "$ref": "#/$defs/__schema0"
615
+ }
616
+ }
617
+ ]
618
+ }
619
+ }
620
+ }