@drisp/protocol 0.6.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,578 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://raw.githubusercontent.com/drisplabs/cli/main/packages/protocol/schema/legacy-frame.json",
4
+ "title": "legacy-frame",
5
+ "x-protocol-version": 1,
6
+ "oneOf": [
7
+ {
8
+ "type": "object",
9
+ "properties": {
10
+ "type": {
11
+ "type": "string",
12
+ "const": "job_assignment"
13
+ },
14
+ "runId": {
15
+ "type": "string"
16
+ },
17
+ "runSpec": {
18
+ "type": "object",
19
+ "properties": {
20
+ "prompt": {
21
+ "type": "string"
22
+ },
23
+ "athenaSessionId": {
24
+ "type": "string"
25
+ },
26
+ "adapterResumeSessionId": {
27
+ "type": "string"
28
+ },
29
+ "sessionId": {
30
+ "type": "string"
31
+ },
32
+ "projectDir": {
33
+ "type": "string"
34
+ },
35
+ "workflow": {
36
+ "type": "object",
37
+ "properties": {
38
+ "source": {
39
+ "type": "string"
40
+ },
41
+ "ref": {
42
+ "type": "string"
43
+ },
44
+ "version": {
45
+ "type": "string"
46
+ }
47
+ },
48
+ "additionalProperties": {}
49
+ },
50
+ "harness": {
51
+ "type": "string"
52
+ },
53
+ "env": {
54
+ "type": "object",
55
+ "propertyNames": {
56
+ "type": "string"
57
+ },
58
+ "additionalProperties": {
59
+ "type": "string"
60
+ }
61
+ },
62
+ "timeoutSec": {
63
+ "type": "number"
64
+ },
65
+ "callbackWsUrl": {
66
+ "type": "string"
67
+ },
68
+ "callbackToken": {
69
+ "type": "string"
70
+ }
71
+ },
72
+ "additionalProperties": {}
73
+ },
74
+ "runnerId": {
75
+ "type": "string"
76
+ }
77
+ },
78
+ "required": ["type", "runId"],
79
+ "additionalProperties": false
80
+ },
81
+ {
82
+ "type": "object",
83
+ "properties": {
84
+ "type": {
85
+ "type": "string",
86
+ "const": "dashboard_decision"
87
+ },
88
+ "athenaSessionId": {
89
+ "type": "string"
90
+ },
91
+ "requestId": {
92
+ "type": "string"
93
+ },
94
+ "decision": {
95
+ "type": "object",
96
+ "properties": {
97
+ "type": {
98
+ "type": "string",
99
+ "enum": ["passthrough", "block", "json"]
100
+ },
101
+ "source": {
102
+ "type": "string",
103
+ "enum": ["user", "timeout", "rule"]
104
+ },
105
+ "intent": {
106
+ "oneOf": [
107
+ {
108
+ "type": "object",
109
+ "properties": {
110
+ "kind": {
111
+ "type": "string",
112
+ "const": "permission_allow"
113
+ }
114
+ },
115
+ "required": ["kind"],
116
+ "additionalProperties": false
117
+ },
118
+ {
119
+ "type": "object",
120
+ "properties": {
121
+ "kind": {
122
+ "type": "string",
123
+ "const": "permission_deny"
124
+ },
125
+ "reason": {
126
+ "type": "string"
127
+ }
128
+ },
129
+ "required": ["kind", "reason"],
130
+ "additionalProperties": false
131
+ },
132
+ {
133
+ "type": "object",
134
+ "properties": {
135
+ "kind": {
136
+ "type": "string",
137
+ "const": "question_answer"
138
+ },
139
+ "answers": {
140
+ "type": "object",
141
+ "propertyNames": {
142
+ "type": "string"
143
+ },
144
+ "additionalProperties": {
145
+ "type": "string"
146
+ }
147
+ }
148
+ },
149
+ "required": ["kind", "answers"],
150
+ "additionalProperties": false
151
+ },
152
+ {
153
+ "type": "object",
154
+ "properties": {
155
+ "kind": {
156
+ "type": "string",
157
+ "const": "pre_tool_allow"
158
+ }
159
+ },
160
+ "required": ["kind"],
161
+ "additionalProperties": false
162
+ },
163
+ {
164
+ "type": "object",
165
+ "properties": {
166
+ "kind": {
167
+ "type": "string",
168
+ "const": "pre_tool_deny"
169
+ },
170
+ "reason": {
171
+ "type": "string"
172
+ }
173
+ },
174
+ "required": ["kind", "reason"],
175
+ "additionalProperties": false
176
+ },
177
+ {
178
+ "type": "object",
179
+ "properties": {
180
+ "kind": {
181
+ "type": "string",
182
+ "const": "stop_block"
183
+ },
184
+ "reason": {
185
+ "type": "string"
186
+ }
187
+ },
188
+ "required": ["kind", "reason"],
189
+ "additionalProperties": false
190
+ },
191
+ {
192
+ "type": "object",
193
+ "properties": {
194
+ "kind": {
195
+ "type": "string",
196
+ "const": "compact_block"
197
+ },
198
+ "reason": {
199
+ "type": "string"
200
+ }
201
+ },
202
+ "required": ["kind", "reason"],
203
+ "additionalProperties": false
204
+ }
205
+ ]
206
+ },
207
+ "reason": {
208
+ "type": "string"
209
+ },
210
+ "data": {}
211
+ },
212
+ "required": ["type", "source"],
213
+ "additionalProperties": false
214
+ }
215
+ },
216
+ "required": ["type", "athenaSessionId", "requestId", "decision"],
217
+ "additionalProperties": false
218
+ },
219
+ {
220
+ "type": "object",
221
+ "properties": {
222
+ "type": {
223
+ "type": "string",
224
+ "const": "cancel"
225
+ },
226
+ "runId": {
227
+ "type": "string"
228
+ },
229
+ "runnerId": {
230
+ "type": "string"
231
+ }
232
+ },
233
+ "required": ["type", "runId"],
234
+ "additionalProperties": false
235
+ },
236
+ {
237
+ "type": "object",
238
+ "properties": {
239
+ "type": {
240
+ "type": "string",
241
+ "const": "run_event"
242
+ },
243
+ "runId": {
244
+ "type": "string"
245
+ },
246
+ "seq": {
247
+ "type": "integer",
248
+ "minimum": 0,
249
+ "maximum": 9007199254740991
250
+ },
251
+ "ts": {
252
+ "type": "number"
253
+ },
254
+ "kind": {
255
+ "type": "string"
256
+ },
257
+ "payload": {}
258
+ },
259
+ "required": ["type", "runId", "seq", "ts", "kind"],
260
+ "additionalProperties": false
261
+ },
262
+ {
263
+ "type": "object",
264
+ "properties": {
265
+ "type": {
266
+ "type": "string",
267
+ "const": "feed_event"
268
+ },
269
+ "deliverySeq": {
270
+ "type": "integer",
271
+ "minimum": 0,
272
+ "maximum": 9007199254740991
273
+ },
274
+ "envelope": {
275
+ "type": "object",
276
+ "properties": {
277
+ "instanceId": {
278
+ "type": "string"
279
+ },
280
+ "athenaSessionId": {
281
+ "type": "string"
282
+ },
283
+ "runId": {
284
+ "type": "string"
285
+ },
286
+ "origin": {
287
+ "type": "string",
288
+ "enum": ["local", "dashboard"]
289
+ },
290
+ "eventId": {
291
+ "type": "string"
292
+ },
293
+ "feedSeq": {
294
+ "type": "integer",
295
+ "minimum": 0,
296
+ "maximum": 9007199254740991
297
+ },
298
+ "emittedAt": {
299
+ "type": "number"
300
+ },
301
+ "feedEvent": {
302
+ "type": "object",
303
+ "properties": {
304
+ "event_id": {
305
+ "type": "string"
306
+ },
307
+ "seq": {
308
+ "type": "integer",
309
+ "minimum": 0,
310
+ "maximum": 9007199254740991
311
+ },
312
+ "ts": {
313
+ "type": "number"
314
+ },
315
+ "session_id": {
316
+ "type": "string"
317
+ },
318
+ "run_id": {
319
+ "type": "string"
320
+ },
321
+ "prompt_id": {
322
+ "type": "string"
323
+ },
324
+ "effort_level": {
325
+ "type": "string"
326
+ },
327
+ "kind": {
328
+ "type": "string"
329
+ },
330
+ "level": {
331
+ "type": "string",
332
+ "enum": ["debug", "info", "warn", "error"]
333
+ },
334
+ "actor_id": {
335
+ "type": "string"
336
+ },
337
+ "cause": {
338
+ "type": "object",
339
+ "properties": {
340
+ "parent_event_id": {
341
+ "type": "string"
342
+ },
343
+ "hook_request_id": {
344
+ "type": "string"
345
+ },
346
+ "tool_use_id": {
347
+ "type": "string"
348
+ },
349
+ "transcript_path": {
350
+ "type": "string"
351
+ }
352
+ },
353
+ "additionalProperties": false
354
+ },
355
+ "title": {
356
+ "type": "string"
357
+ },
358
+ "body": {
359
+ "type": "string"
360
+ },
361
+ "ui": {
362
+ "type": "object",
363
+ "properties": {
364
+ "collapsed_default": {
365
+ "type": "boolean"
366
+ },
367
+ "pin": {
368
+ "type": "boolean"
369
+ },
370
+ "badge": {
371
+ "type": "string"
372
+ }
373
+ },
374
+ "additionalProperties": false
375
+ },
376
+ "display": {
377
+ "type": "object",
378
+ "properties": {
379
+ "title": {
380
+ "type": "string"
381
+ }
382
+ },
383
+ "additionalProperties": false
384
+ },
385
+ "data": {},
386
+ "raw": {}
387
+ },
388
+ "required": [
389
+ "event_id",
390
+ "seq",
391
+ "ts",
392
+ "session_id",
393
+ "run_id",
394
+ "kind",
395
+ "level",
396
+ "actor_id",
397
+ "title",
398
+ "data"
399
+ ],
400
+ "additionalProperties": {}
401
+ }
402
+ },
403
+ "required": [
404
+ "instanceId",
405
+ "athenaSessionId",
406
+ "runId",
407
+ "origin",
408
+ "eventId",
409
+ "feedSeq",
410
+ "emittedAt",
411
+ "feedEvent"
412
+ ],
413
+ "additionalProperties": false
414
+ }
415
+ },
416
+ "required": ["type", "deliverySeq", "envelope"],
417
+ "additionalProperties": false
418
+ },
419
+ {
420
+ "type": "object",
421
+ "properties": {
422
+ "type": {
423
+ "type": "string",
424
+ "const": "ping"
425
+ },
426
+ "ts": {
427
+ "type": "number"
428
+ }
429
+ },
430
+ "required": ["type", "ts"],
431
+ "additionalProperties": false
432
+ },
433
+ {
434
+ "type": "object",
435
+ "properties": {
436
+ "type": {
437
+ "type": "string",
438
+ "const": "pong"
439
+ },
440
+ "ts": {
441
+ "type": "number"
442
+ }
443
+ },
444
+ "required": ["type", "ts"],
445
+ "additionalProperties": false
446
+ },
447
+ {
448
+ "type": "object",
449
+ "properties": {
450
+ "type": {
451
+ "type": "string",
452
+ "const": "assignment_accepted"
453
+ },
454
+ "runId": {
455
+ "type": "string"
456
+ }
457
+ },
458
+ "required": ["type", "runId"],
459
+ "additionalProperties": false
460
+ },
461
+ {
462
+ "type": "object",
463
+ "properties": {
464
+ "type": {
465
+ "type": "string",
466
+ "const": "assignment_rejected"
467
+ },
468
+ "runId": {
469
+ "type": "string"
470
+ },
471
+ "reason": {
472
+ "type": "string",
473
+ "enum": [
474
+ "local_capacity",
475
+ "duplicate",
476
+ "malformed_assignment",
477
+ "workspace_unresolved",
478
+ "workspace_invalid"
479
+ ]
480
+ },
481
+ "message": {
482
+ "type": "string"
483
+ }
484
+ },
485
+ "required": ["type", "runId", "reason"],
486
+ "additionalProperties": false
487
+ },
488
+ {
489
+ "type": "object",
490
+ "properties": {
491
+ "type": {
492
+ "type": "string",
493
+ "const": "decision_ack"
494
+ },
495
+ "athenaSessionId": {
496
+ "type": "string"
497
+ },
498
+ "requestId": {
499
+ "type": "string"
500
+ }
501
+ },
502
+ "required": ["type", "athenaSessionId", "requestId"],
503
+ "additionalProperties": false
504
+ },
505
+ {
506
+ "type": "object",
507
+ "properties": {
508
+ "type": {
509
+ "type": "string",
510
+ "const": "feed_ack"
511
+ },
512
+ "deliverySeq": {
513
+ "type": "integer",
514
+ "minimum": 0,
515
+ "maximum": 9007199254740991
516
+ },
517
+ "eventId": {
518
+ "type": "string"
519
+ }
520
+ },
521
+ "required": ["type"],
522
+ "additionalProperties": false
523
+ },
524
+ {
525
+ "type": "object",
526
+ "properties": {
527
+ "type": {
528
+ "type": "string",
529
+ "const": "attachments.changed"
530
+ },
531
+ "attachments": {
532
+ "type": "array",
533
+ "items": {
534
+ "type": "object",
535
+ "properties": {
536
+ "runnerId": {
537
+ "type": "string"
538
+ },
539
+ "name": {
540
+ "type": "string"
541
+ },
542
+ "slug": {
543
+ "type": "string"
544
+ },
545
+ "executionTarget": {
546
+ "type": "string"
547
+ },
548
+ "remoteInstanceId": {
549
+ "type": "string"
550
+ }
551
+ },
552
+ "required": ["runnerId"],
553
+ "additionalProperties": false
554
+ }
555
+ }
556
+ },
557
+ "required": ["type", "attachments"],
558
+ "additionalProperties": false
559
+ },
560
+ {
561
+ "type": "object",
562
+ "properties": {
563
+ "type": {
564
+ "type": "string",
565
+ "const": "error"
566
+ },
567
+ "code": {
568
+ "type": "string"
569
+ },
570
+ "message": {
571
+ "type": "string"
572
+ }
573
+ },
574
+ "required": ["type", "code"],
575
+ "additionalProperties": false
576
+ }
577
+ ]
578
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://raw.githubusercontent.com/drisplabs/cli/main/packages/protocol/schema/phase-event.json",
4
+ "title": "phase-event",
5
+ "x-protocol-version": 1,
6
+ "type": "object",
7
+ "properties": {
8
+ "runId": {
9
+ "type": "string"
10
+ },
11
+ "turn": {
12
+ "type": "integer",
13
+ "exclusiveMinimum": 0,
14
+ "maximum": 9007199254740991
15
+ },
16
+ "step": {
17
+ "type": "string",
18
+ "minLength": 1
19
+ },
20
+ "stepIndex": {
21
+ "type": "integer",
22
+ "exclusiveMinimum": 0,
23
+ "maximum": 9007199254740991
24
+ },
25
+ "stepTotal": {
26
+ "type": "integer",
27
+ "exclusiveMinimum": 0,
28
+ "maximum": 9007199254740991
29
+ }
30
+ },
31
+ "required": ["runId", "turn", "step"],
32
+ "additionalProperties": false
33
+ }