@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,479 @@
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
+ },
298
+ "required": [
299
+ "kind",
300
+ "sessionId",
301
+ "scope",
302
+ "spec"
303
+ ],
304
+ "additionalProperties": false
305
+ },
306
+ {
307
+ "type": "object",
308
+ "properties": {
309
+ "kind": {
310
+ "type": "string",
311
+ "const": "cancel"
312
+ }
313
+ },
314
+ "required": [
315
+ "kind"
316
+ ],
317
+ "additionalProperties": false
318
+ },
319
+ {
320
+ "type": "object",
321
+ "properties": {
322
+ "kind": {
323
+ "type": "string",
324
+ "const": "abandon"
325
+ }
326
+ },
327
+ "required": [
328
+ "kind"
329
+ ],
330
+ "additionalProperties": false
331
+ },
332
+ {
333
+ "type": "object",
334
+ "properties": {
335
+ "kind": {
336
+ "type": "string",
337
+ "const": "steer"
338
+ },
339
+ "text": {
340
+ "type": "string",
341
+ "minLength": 1,
342
+ "maxLength": 131072
343
+ }
344
+ },
345
+ "required": [
346
+ "kind",
347
+ "text"
348
+ ],
349
+ "additionalProperties": false
350
+ },
351
+ {
352
+ "type": "object",
353
+ "properties": {
354
+ "kind": {
355
+ "type": "string",
356
+ "const": "answer"
357
+ },
358
+ "interruptionId": {
359
+ "type": "string",
360
+ "minLength": 1,
361
+ "maxLength": 160
362
+ },
363
+ "expectedInterruptionRevision": {
364
+ "type": "integer",
365
+ "minimum": 0,
366
+ "maximum": 9007199254740991
367
+ },
368
+ "requestId": {
369
+ "type": "string",
370
+ "minLength": 1,
371
+ "maxLength": 160
372
+ },
373
+ "answer": {
374
+ "$ref": "#/$defs/__schema0"
375
+ }
376
+ },
377
+ "required": [
378
+ "kind",
379
+ "interruptionId",
380
+ "expectedInterruptionRevision",
381
+ "answer"
382
+ ],
383
+ "additionalProperties": false
384
+ },
385
+ {
386
+ "type": "object",
387
+ "properties": {
388
+ "kind": {
389
+ "type": "string",
390
+ "const": "resume"
391
+ },
392
+ "interruptionId": {
393
+ "type": "string",
394
+ "minLength": 1,
395
+ "maxLength": 160
396
+ },
397
+ "guidance": {
398
+ "type": "string",
399
+ "maxLength": 131072
400
+ }
401
+ },
402
+ "required": [
403
+ "kind",
404
+ "interruptionId"
405
+ ],
406
+ "additionalProperties": false
407
+ }
408
+ ]
409
+ }
410
+ },
411
+ "required": [
412
+ "commandId",
413
+ "hubEpoch",
414
+ "runId",
415
+ "intent"
416
+ ],
417
+ "additionalProperties": false
418
+ }
419
+ },
420
+ "required": [
421
+ "type",
422
+ "command"
423
+ ],
424
+ "additionalProperties": false
425
+ },
426
+ {
427
+ "type": "object",
428
+ "properties": {
429
+ "type": {
430
+ "type": "string",
431
+ "const": "ping"
432
+ },
433
+ "nonce": {
434
+ "type": "string",
435
+ "minLength": 1,
436
+ "maxLength": 160
437
+ }
438
+ },
439
+ "required": [
440
+ "type",
441
+ "nonce"
442
+ ],
443
+ "additionalProperties": false
444
+ }
445
+ ],
446
+ "$defs": {
447
+ "__schema0": {
448
+ "anyOf": [
449
+ {
450
+ "type": "string"
451
+ },
452
+ {
453
+ "type": "number"
454
+ },
455
+ {
456
+ "type": "boolean"
457
+ },
458
+ {
459
+ "type": "null"
460
+ },
461
+ {
462
+ "type": "array",
463
+ "items": {
464
+ "$ref": "#/$defs/__schema0"
465
+ }
466
+ },
467
+ {
468
+ "type": "object",
469
+ "propertyNames": {
470
+ "type": "string"
471
+ },
472
+ "additionalProperties": {
473
+ "$ref": "#/$defs/__schema0"
474
+ }
475
+ }
476
+ ]
477
+ }
478
+ }
479
+ }