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