@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,523 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "oneOf": [
4
+ {
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "watch"
10
+ },
11
+ "hubEpoch": {
12
+ "type": "string",
13
+ "minLength": 1,
14
+ "maxLength": 160
15
+ },
16
+ "runIds": {
17
+ "maxItems": 100,
18
+ "type": "array",
19
+ "items": {
20
+ "type": "string",
21
+ "minLength": 1,
22
+ "maxLength": 160
23
+ }
24
+ }
25
+ },
26
+ "required": [
27
+ "type",
28
+ "hubEpoch",
29
+ "runIds"
30
+ ],
31
+ "additionalProperties": false
32
+ },
33
+ {
34
+ "type": "object",
35
+ "properties": {
36
+ "type": {
37
+ "type": "string",
38
+ "const": "watch.ack"
39
+ },
40
+ "subscriptionId": {
41
+ "type": "string",
42
+ "minLength": 1,
43
+ "maxLength": 160
44
+ },
45
+ "through": {
46
+ "type": "integer",
47
+ "minimum": 0,
48
+ "maximum": 9007199254740991
49
+ }
50
+ },
51
+ "required": [
52
+ "type",
53
+ "subscriptionId",
54
+ "through"
55
+ ],
56
+ "additionalProperties": false
57
+ },
58
+ {
59
+ "type": "object",
60
+ "properties": {
61
+ "type": {
62
+ "type": "string",
63
+ "const": "command.submit"
64
+ },
65
+ "command": {
66
+ "type": "object",
67
+ "properties": {
68
+ "commandId": {
69
+ "type": "string",
70
+ "minLength": 1,
71
+ "maxLength": 160
72
+ },
73
+ "hubEpoch": {
74
+ "type": "string",
75
+ "minLength": 1,
76
+ "maxLength": 160
77
+ },
78
+ "runId": {
79
+ "type": "string",
80
+ "minLength": 1,
81
+ "maxLength": 160
82
+ },
83
+ "expectedRecordRevision": {
84
+ "type": "integer",
85
+ "minimum": 0,
86
+ "maximum": 9007199254740991
87
+ },
88
+ "intent": {
89
+ "oneOf": [
90
+ {
91
+ "type": "object",
92
+ "properties": {
93
+ "kind": {
94
+ "type": "string",
95
+ "const": "start"
96
+ },
97
+ "sessionId": {
98
+ "type": "string",
99
+ "minLength": 1,
100
+ "maxLength": 160
101
+ },
102
+ "runnerId": {
103
+ "type": "string",
104
+ "minLength": 1,
105
+ "maxLength": 160
106
+ },
107
+ "computeProfileId": {
108
+ "type": "string",
109
+ "minLength": 1,
110
+ "maxLength": 160
111
+ },
112
+ "scope": {
113
+ "oneOf": [
114
+ {
115
+ "type": "object",
116
+ "properties": {
117
+ "visibility": {
118
+ "type": "string",
119
+ "const": "organization"
120
+ }
121
+ },
122
+ "required": [
123
+ "visibility"
124
+ ],
125
+ "additionalProperties": false
126
+ },
127
+ {
128
+ "type": "object",
129
+ "properties": {
130
+ "visibility": {
131
+ "type": "string",
132
+ "const": "private"
133
+ },
134
+ "ownerUserId": {
135
+ "type": "string",
136
+ "minLength": 1,
137
+ "maxLength": 160
138
+ }
139
+ },
140
+ "required": [
141
+ "visibility",
142
+ "ownerUserId"
143
+ ],
144
+ "additionalProperties": false
145
+ }
146
+ ]
147
+ },
148
+ "spec": {
149
+ "type": "object",
150
+ "properties": {
151
+ "prompt": {
152
+ "type": "string",
153
+ "minLength": 1,
154
+ "maxLength": 131072
155
+ },
156
+ "projectDir": {
157
+ "type": "string",
158
+ "minLength": 1,
159
+ "maxLength": 4096
160
+ },
161
+ "harness": {
162
+ "type": "string",
163
+ "enum": [
164
+ "claude-code",
165
+ "codex"
166
+ ]
167
+ },
168
+ "workflow": {
169
+ "anyOf": [
170
+ {
171
+ "type": "string",
172
+ "maxLength": 512
173
+ },
174
+ {
175
+ "type": "object",
176
+ "properties": {
177
+ "name": {
178
+ "type": "string",
179
+ "minLength": 1,
180
+ "maxLength": 128,
181
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]*$"
182
+ },
183
+ "source": {
184
+ "type": "string",
185
+ "maxLength": 201,
186
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]*\\/[A-Za-z0-9][A-Za-z0-9_.-]*$"
187
+ },
188
+ "ref": {
189
+ "type": "string",
190
+ "minLength": 1,
191
+ "maxLength": 512
192
+ },
193
+ "version": {
194
+ "type": "string",
195
+ "minLength": 1,
196
+ "maxLength": 128,
197
+ "pattern": "^\\d[A-Za-z0-9_.+-]*$"
198
+ }
199
+ },
200
+ "required": [
201
+ "name"
202
+ ],
203
+ "additionalProperties": false
204
+ }
205
+ ]
206
+ },
207
+ "repository": {
208
+ "type": "object",
209
+ "properties": {
210
+ "bindingId": {
211
+ "type": "string",
212
+ "minLength": 1,
213
+ "maxLength": 160
214
+ },
215
+ "repositoryId": {
216
+ "type": "integer",
217
+ "exclusiveMinimum": 0,
218
+ "maximum": 9007199254740991
219
+ },
220
+ "installationId": {
221
+ "type": "integer",
222
+ "exclusiveMinimum": 0,
223
+ "maximum": 9007199254740991
224
+ },
225
+ "owner": {
226
+ "type": "string",
227
+ "minLength": 1,
228
+ "maxLength": 100,
229
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-]*$"
230
+ },
231
+ "name": {
232
+ "type": "string",
233
+ "minLength": 1,
234
+ "maxLength": 100,
235
+ "pattern": "^(?!\\.{1,2}$)[a-zA-Z0-9_.-]+$"
236
+ },
237
+ "ref": {
238
+ "type": "string",
239
+ "minLength": 1,
240
+ "maxLength": 512,
241
+ "pattern": "^(?![-/])(?!.*\\.\\.)(?!.*@\\{)(?!.*(?:^|\\/)\\.)(?!.*\\.lock(?:\\/|$))(?!.*\\/\\/)[^\\x00-\\x20\\x7f~^:?*\\[\\\\]+(?<![/.])$"
242
+ },
243
+ "commitSha": {
244
+ "type": "string",
245
+ "pattern": "^[0-9a-f]{40}$"
246
+ },
247
+ "branch": {
248
+ "type": "string",
249
+ "minLength": 1,
250
+ "maxLength": 512,
251
+ "pattern": "^(?![-/])(?!.*\\.\\.)(?!.*@\\{)(?!.*(?:^|\\/)\\.)(?!.*\\.lock(?:\\/|$))(?!.*\\/\\/)[^\\x00-\\x20\\x7f~^:?*\\[\\\\]+(?<![/.])$"
252
+ },
253
+ "workingDirectory": {
254
+ "type": "string",
255
+ "minLength": 1,
256
+ "maxLength": 1024,
257
+ "pattern": "^(?:\\.|(?!\\/)(?!.*(?:^|\\/)\\.\\.?(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))[^\\x00-\\x1f\\x7f\\\\:]+(?<!\\/))$"
258
+ },
259
+ "setupCommands": {
260
+ "maxItems": 16,
261
+ "type": "array",
262
+ "items": {
263
+ "type": "string",
264
+ "minLength": 1,
265
+ "maxLength": 8192
266
+ }
267
+ },
268
+ "configRevision": {
269
+ "type": "integer",
270
+ "minimum": 0,
271
+ "maximum": 9007199254740991
272
+ }
273
+ },
274
+ "required": [
275
+ "bindingId",
276
+ "repositoryId",
277
+ "installationId",
278
+ "owner",
279
+ "name",
280
+ "ref",
281
+ "commitSha",
282
+ "branch",
283
+ "workingDirectory",
284
+ "setupCommands",
285
+ "configRevision"
286
+ ],
287
+ "additionalProperties": false
288
+ }
289
+ },
290
+ "required": [
291
+ "prompt",
292
+ "projectDir",
293
+ "harness"
294
+ ],
295
+ "additionalProperties": false
296
+ },
297
+ "key": {
298
+ "type": "string",
299
+ "minLength": 1,
300
+ "maxLength": 160
301
+ },
302
+ "delegation": {
303
+ "type": "object",
304
+ "properties": {
305
+ "maxChildren": {
306
+ "type": "integer",
307
+ "minimum": 1,
308
+ "maximum": 8
309
+ },
310
+ "tokenBudget": {
311
+ "type": "integer",
312
+ "exclusiveMinimum": 0,
313
+ "maximum": 9007199254740991
314
+ }
315
+ },
316
+ "required": [
317
+ "maxChildren",
318
+ "tokenBudget"
319
+ ],
320
+ "additionalProperties": false
321
+ },
322
+ "parent": {
323
+ "type": "object",
324
+ "properties": {
325
+ "runId": {
326
+ "type": "string",
327
+ "minLength": 1,
328
+ "maxLength": 160
329
+ },
330
+ "tokenCap": {
331
+ "type": "integer",
332
+ "exclusiveMinimum": 0,
333
+ "maximum": 9007199254740991
334
+ }
335
+ },
336
+ "required": [
337
+ "runId"
338
+ ],
339
+ "additionalProperties": false
340
+ }
341
+ },
342
+ "required": [
343
+ "kind",
344
+ "sessionId",
345
+ "scope",
346
+ "spec"
347
+ ],
348
+ "additionalProperties": false
349
+ },
350
+ {
351
+ "type": "object",
352
+ "properties": {
353
+ "kind": {
354
+ "type": "string",
355
+ "const": "cancel"
356
+ }
357
+ },
358
+ "required": [
359
+ "kind"
360
+ ],
361
+ "additionalProperties": false
362
+ },
363
+ {
364
+ "type": "object",
365
+ "properties": {
366
+ "kind": {
367
+ "type": "string",
368
+ "const": "abandon"
369
+ }
370
+ },
371
+ "required": [
372
+ "kind"
373
+ ],
374
+ "additionalProperties": false
375
+ },
376
+ {
377
+ "type": "object",
378
+ "properties": {
379
+ "kind": {
380
+ "type": "string",
381
+ "const": "steer"
382
+ },
383
+ "text": {
384
+ "type": "string",
385
+ "minLength": 1,
386
+ "maxLength": 131072
387
+ }
388
+ },
389
+ "required": [
390
+ "kind",
391
+ "text"
392
+ ],
393
+ "additionalProperties": false
394
+ },
395
+ {
396
+ "type": "object",
397
+ "properties": {
398
+ "kind": {
399
+ "type": "string",
400
+ "const": "answer"
401
+ },
402
+ "interruptionId": {
403
+ "type": "string",
404
+ "minLength": 1,
405
+ "maxLength": 160
406
+ },
407
+ "expectedInterruptionRevision": {
408
+ "type": "integer",
409
+ "minimum": 0,
410
+ "maximum": 9007199254740991
411
+ },
412
+ "requestId": {
413
+ "type": "string",
414
+ "minLength": 1,
415
+ "maxLength": 160
416
+ },
417
+ "answer": {
418
+ "$ref": "#/$defs/__schema0"
419
+ }
420
+ },
421
+ "required": [
422
+ "kind",
423
+ "interruptionId",
424
+ "expectedInterruptionRevision",
425
+ "answer"
426
+ ],
427
+ "additionalProperties": false
428
+ },
429
+ {
430
+ "type": "object",
431
+ "properties": {
432
+ "kind": {
433
+ "type": "string",
434
+ "const": "resume"
435
+ },
436
+ "interruptionId": {
437
+ "type": "string",
438
+ "minLength": 1,
439
+ "maxLength": 160
440
+ },
441
+ "guidance": {
442
+ "type": "string",
443
+ "maxLength": 131072
444
+ }
445
+ },
446
+ "required": [
447
+ "kind",
448
+ "interruptionId"
449
+ ],
450
+ "additionalProperties": false
451
+ }
452
+ ]
453
+ }
454
+ },
455
+ "required": [
456
+ "commandId",
457
+ "hubEpoch",
458
+ "runId",
459
+ "intent"
460
+ ],
461
+ "additionalProperties": false
462
+ }
463
+ },
464
+ "required": [
465
+ "type",
466
+ "command"
467
+ ],
468
+ "additionalProperties": false
469
+ },
470
+ {
471
+ "type": "object",
472
+ "properties": {
473
+ "type": {
474
+ "type": "string",
475
+ "const": "ping"
476
+ },
477
+ "nonce": {
478
+ "type": "string",
479
+ "minLength": 1,
480
+ "maxLength": 160
481
+ }
482
+ },
483
+ "required": [
484
+ "type",
485
+ "nonce"
486
+ ],
487
+ "additionalProperties": false
488
+ }
489
+ ],
490
+ "$defs": {
491
+ "__schema0": {
492
+ "anyOf": [
493
+ {
494
+ "type": "string"
495
+ },
496
+ {
497
+ "type": "number"
498
+ },
499
+ {
500
+ "type": "boolean"
501
+ },
502
+ {
503
+ "type": "null"
504
+ },
505
+ {
506
+ "type": "array",
507
+ "items": {
508
+ "$ref": "#/$defs/__schema0"
509
+ }
510
+ },
511
+ {
512
+ "type": "object",
513
+ "propertyNames": {
514
+ "type": "string"
515
+ },
516
+ "additionalProperties": {
517
+ "$ref": "#/$defs/__schema0"
518
+ }
519
+ }
520
+ ]
521
+ }
522
+ }
523
+ }