@spunto/build 0.22.0 → 0.23.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,672 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://spunto.net/schemas/agent-contract.v1.json",
4
+ "title": "Spunto agent contract, v1",
5
+ "description": "What an agent app's runner prints on stdout (one `output` object per line) and reads on stdin (one `input` object per line). See docs/agent-contract.md.",
6
+ "$defs": {
7
+ "output": {
8
+ "oneOf": [
9
+ {
10
+ "type": "object",
11
+ "properties": {
12
+ "type": {
13
+ "const": "session.started"
14
+ },
15
+ "source": {
16
+ "description": "The harness's own message this event was read from, verbatim — kept so the projection can be replayed."
17
+ },
18
+ "harness": {
19
+ "type": "string"
20
+ },
21
+ "model": {
22
+ "anyOf": [
23
+ {
24
+ "type": "string"
25
+ },
26
+ {
27
+ "type": "null"
28
+ }
29
+ ]
30
+ },
31
+ "sessionId": {
32
+ "anyOf": [
33
+ {
34
+ "type": "string"
35
+ },
36
+ {
37
+ "type": "null"
38
+ }
39
+ ]
40
+ },
41
+ "cwd": {
42
+ "anyOf": [
43
+ {
44
+ "type": "string"
45
+ },
46
+ {
47
+ "type": "null"
48
+ }
49
+ ]
50
+ },
51
+ "tools": {
52
+ "type": "array",
53
+ "items": {
54
+ "type": "string"
55
+ }
56
+ },
57
+ "contextWindow": {
58
+ "anyOf": [
59
+ {
60
+ "type": "number"
61
+ },
62
+ {
63
+ "type": "null"
64
+ }
65
+ ]
66
+ }
67
+ },
68
+ "required": [
69
+ "type",
70
+ "harness"
71
+ ],
72
+ "additionalProperties": false
73
+ },
74
+ {
75
+ "type": "object",
76
+ "properties": {
77
+ "type": {
78
+ "const": "session.title"
79
+ },
80
+ "source": {
81
+ "description": "The harness's own message this event was read from, verbatim — kept so the projection can be replayed."
82
+ },
83
+ "title": {
84
+ "type": "string"
85
+ }
86
+ },
87
+ "required": [
88
+ "type",
89
+ "title"
90
+ ],
91
+ "additionalProperties": false
92
+ },
93
+ {
94
+ "type": "object",
95
+ "properties": {
96
+ "type": {
97
+ "const": "message"
98
+ },
99
+ "source": {
100
+ "description": "The harness's own message this event was read from, verbatim — kept so the projection can be replayed."
101
+ },
102
+ "role": {
103
+ "type": "string",
104
+ "enum": [
105
+ "assistant",
106
+ "user"
107
+ ]
108
+ },
109
+ "text": {
110
+ "type": "string"
111
+ },
112
+ "truncated": {
113
+ "type": "boolean"
114
+ },
115
+ "limit": {
116
+ "anyOf": [
117
+ {
118
+ "type": "object",
119
+ "properties": {
120
+ "kind": {
121
+ "type": "string",
122
+ "enum": [
123
+ "usage",
124
+ "rate",
125
+ "overloaded"
126
+ ]
127
+ },
128
+ "status": {
129
+ "anyOf": [
130
+ {
131
+ "type": "number"
132
+ },
133
+ {
134
+ "type": "null"
135
+ }
136
+ ]
137
+ },
138
+ "message": {
139
+ "type": "string"
140
+ },
141
+ "resetsAt": {
142
+ "anyOf": [
143
+ {
144
+ "type": "string"
145
+ },
146
+ {
147
+ "type": "null"
148
+ }
149
+ ]
150
+ }
151
+ },
152
+ "required": [
153
+ "kind",
154
+ "message"
155
+ ],
156
+ "additionalProperties": false
157
+ },
158
+ {
159
+ "type": "null"
160
+ }
161
+ ]
162
+ }
163
+ },
164
+ "required": [
165
+ "type",
166
+ "role",
167
+ "text"
168
+ ],
169
+ "additionalProperties": false
170
+ },
171
+ {
172
+ "type": "object",
173
+ "properties": {
174
+ "type": {
175
+ "const": "thinking"
176
+ },
177
+ "source": {
178
+ "description": "The harness's own message this event was read from, verbatim — kept so the projection can be replayed."
179
+ },
180
+ "text": {
181
+ "type": "string"
182
+ },
183
+ "truncated": {
184
+ "type": "boolean"
185
+ }
186
+ },
187
+ "required": [
188
+ "type",
189
+ "text"
190
+ ],
191
+ "additionalProperties": false
192
+ },
193
+ {
194
+ "type": "object",
195
+ "properties": {
196
+ "type": {
197
+ "const": "tool.call"
198
+ },
199
+ "source": {
200
+ "description": "The harness's own message this event was read from, verbatim — kept so the projection can be replayed."
201
+ },
202
+ "callId": {
203
+ "anyOf": [
204
+ {
205
+ "type": "string"
206
+ },
207
+ {
208
+ "type": "null"
209
+ }
210
+ ]
211
+ },
212
+ "name": {
213
+ "type": "string"
214
+ },
215
+ "input": {
216
+ "type": "string"
217
+ },
218
+ "truncated": {
219
+ "type": "boolean"
220
+ }
221
+ },
222
+ "required": [
223
+ "type",
224
+ "name",
225
+ "input"
226
+ ],
227
+ "additionalProperties": false
228
+ },
229
+ {
230
+ "type": "object",
231
+ "properties": {
232
+ "type": {
233
+ "const": "tool.result"
234
+ },
235
+ "source": {
236
+ "description": "The harness's own message this event was read from, verbatim — kept so the projection can be replayed."
237
+ },
238
+ "callId": {
239
+ "anyOf": [
240
+ {
241
+ "type": "string"
242
+ },
243
+ {
244
+ "type": "null"
245
+ }
246
+ ]
247
+ },
248
+ "isError": {
249
+ "type": "boolean"
250
+ },
251
+ "output": {
252
+ "type": "string"
253
+ },
254
+ "truncated": {
255
+ "type": "boolean"
256
+ }
257
+ },
258
+ "required": [
259
+ "type",
260
+ "isError",
261
+ "output"
262
+ ],
263
+ "additionalProperties": false
264
+ },
265
+ {
266
+ "type": "object",
267
+ "properties": {
268
+ "type": {
269
+ "const": "plan"
270
+ },
271
+ "source": {
272
+ "description": "The harness's own message this event was read from, verbatim — kept so the projection can be replayed."
273
+ },
274
+ "steps": {
275
+ "type": "array",
276
+ "items": {
277
+ "type": "object",
278
+ "properties": {
279
+ "text": {
280
+ "type": "string"
281
+ },
282
+ "status": {
283
+ "type": "string"
284
+ }
285
+ },
286
+ "required": [
287
+ "text",
288
+ "status"
289
+ ],
290
+ "additionalProperties": false
291
+ }
292
+ }
293
+ },
294
+ "required": [
295
+ "type",
296
+ "steps"
297
+ ],
298
+ "additionalProperties": false
299
+ },
300
+ {
301
+ "type": "object",
302
+ "properties": {
303
+ "type": {
304
+ "const": "usage"
305
+ },
306
+ "source": {
307
+ "description": "The harness's own message this event was read from, verbatim — kept so the projection can be replayed."
308
+ },
309
+ "scope": {
310
+ "type": "string",
311
+ "enum": [
312
+ "call",
313
+ "session"
314
+ ]
315
+ },
316
+ "model": {
317
+ "anyOf": [
318
+ {
319
+ "type": "string"
320
+ },
321
+ {
322
+ "type": "null"
323
+ }
324
+ ]
325
+ },
326
+ "inputTokens": {
327
+ "anyOf": [
328
+ {
329
+ "type": "number"
330
+ },
331
+ {
332
+ "type": "null"
333
+ }
334
+ ]
335
+ },
336
+ "outputTokens": {
337
+ "anyOf": [
338
+ {
339
+ "type": "number"
340
+ },
341
+ {
342
+ "type": "null"
343
+ }
344
+ ]
345
+ },
346
+ "cacheReadTokens": {
347
+ "anyOf": [
348
+ {
349
+ "type": "number"
350
+ },
351
+ {
352
+ "type": "null"
353
+ }
354
+ ]
355
+ },
356
+ "cacheCreationTokens": {
357
+ "anyOf": [
358
+ {
359
+ "type": "number"
360
+ },
361
+ {
362
+ "type": "null"
363
+ }
364
+ ]
365
+ },
366
+ "contextTokens": {
367
+ "anyOf": [
368
+ {
369
+ "type": "number"
370
+ },
371
+ {
372
+ "type": "null"
373
+ }
374
+ ]
375
+ },
376
+ "contextWindow": {
377
+ "anyOf": [
378
+ {
379
+ "type": "number"
380
+ },
381
+ {
382
+ "type": "null"
383
+ }
384
+ ]
385
+ },
386
+ "costUsd": {
387
+ "anyOf": [
388
+ {
389
+ "type": "number"
390
+ },
391
+ {
392
+ "type": "null"
393
+ }
394
+ ]
395
+ },
396
+ "turns": {
397
+ "anyOf": [
398
+ {
399
+ "type": "number"
400
+ },
401
+ {
402
+ "type": "null"
403
+ }
404
+ ]
405
+ },
406
+ "durationMs": {
407
+ "anyOf": [
408
+ {
409
+ "type": "number"
410
+ },
411
+ {
412
+ "type": "null"
413
+ }
414
+ ]
415
+ }
416
+ },
417
+ "required": [
418
+ "type",
419
+ "scope"
420
+ ],
421
+ "additionalProperties": false
422
+ },
423
+ {
424
+ "type": "object",
425
+ "properties": {
426
+ "type": {
427
+ "const": "session.ended"
428
+ },
429
+ "source": {
430
+ "description": "The harness's own message this event was read from, verbatim — kept so the projection can be replayed."
431
+ },
432
+ "status": {
433
+ "type": "string",
434
+ "enum": [
435
+ "succeeded",
436
+ "failed"
437
+ ]
438
+ },
439
+ "stopReason": {
440
+ "anyOf": [
441
+ {
442
+ "type": "string"
443
+ },
444
+ {
445
+ "type": "null"
446
+ }
447
+ ]
448
+ },
449
+ "summary": {
450
+ "type": "string"
451
+ },
452
+ "limit": {
453
+ "anyOf": [
454
+ {
455
+ "type": "object",
456
+ "properties": {
457
+ "kind": {
458
+ "type": "string",
459
+ "enum": [
460
+ "usage",
461
+ "rate",
462
+ "overloaded"
463
+ ]
464
+ },
465
+ "status": {
466
+ "anyOf": [
467
+ {
468
+ "type": "number"
469
+ },
470
+ {
471
+ "type": "null"
472
+ }
473
+ ]
474
+ },
475
+ "message": {
476
+ "type": "string"
477
+ },
478
+ "resetsAt": {
479
+ "anyOf": [
480
+ {
481
+ "type": "string"
482
+ },
483
+ {
484
+ "type": "null"
485
+ }
486
+ ]
487
+ }
488
+ },
489
+ "required": [
490
+ "kind",
491
+ "message"
492
+ ],
493
+ "additionalProperties": false
494
+ },
495
+ {
496
+ "type": "null"
497
+ }
498
+ ]
499
+ }
500
+ },
501
+ "required": [
502
+ "type",
503
+ "status"
504
+ ],
505
+ "additionalProperties": false
506
+ },
507
+ {
508
+ "type": "object",
509
+ "properties": {
510
+ "type": {
511
+ "const": "session.background"
512
+ },
513
+ "source": {
514
+ "description": "The harness's own message this event was read from, verbatim — kept so the projection can be replayed."
515
+ },
516
+ "tasks": {
517
+ "type": "array",
518
+ "items": {
519
+ "type": "object",
520
+ "properties": {
521
+ "id": {
522
+ "anyOf": [
523
+ {
524
+ "type": "string"
525
+ },
526
+ {
527
+ "type": "null"
528
+ }
529
+ ]
530
+ },
531
+ "kind": {
532
+ "anyOf": [
533
+ {
534
+ "type": "string"
535
+ },
536
+ {
537
+ "type": "null"
538
+ }
539
+ ]
540
+ },
541
+ "description": {
542
+ "anyOf": [
543
+ {
544
+ "type": "string"
545
+ },
546
+ {
547
+ "type": "null"
548
+ }
549
+ ]
550
+ }
551
+ },
552
+ "additionalProperties": false
553
+ }
554
+ }
555
+ },
556
+ "required": [
557
+ "type",
558
+ "tasks"
559
+ ],
560
+ "additionalProperties": false
561
+ },
562
+ {
563
+ "type": "object",
564
+ "properties": {
565
+ "type": {
566
+ "const": "raw"
567
+ },
568
+ "source": {
569
+ "description": "The harness's own message this event was read from, verbatim — kept so the projection can be replayed."
570
+ },
571
+ "json": {},
572
+ "text": {
573
+ "type": "string"
574
+ }
575
+ },
576
+ "required": [
577
+ "type"
578
+ ],
579
+ "additionalProperties": false
580
+ },
581
+ {
582
+ "type": "object",
583
+ "properties": {
584
+ "type": {
585
+ "const": "message.delta"
586
+ },
587
+ "source": {
588
+ "description": "The harness's own message this event was read from, verbatim — kept so the projection can be replayed."
589
+ },
590
+ "text": {
591
+ "type": "string"
592
+ },
593
+ "start": {
594
+ "type": "boolean"
595
+ }
596
+ },
597
+ "required": [
598
+ "type",
599
+ "text"
600
+ ],
601
+ "additionalProperties": false
602
+ }
603
+ ]
604
+ },
605
+ "input": {
606
+ "oneOf": [
607
+ {
608
+ "type": "object",
609
+ "properties": {
610
+ "type": {
611
+ "type": "string",
612
+ "enum": [
613
+ "user"
614
+ ]
615
+ },
616
+ "text": {
617
+ "type": "string"
618
+ }
619
+ },
620
+ "required": [
621
+ "type",
622
+ "text"
623
+ ],
624
+ "additionalProperties": false
625
+ },
626
+ {
627
+ "type": "object",
628
+ "properties": {
629
+ "type": {
630
+ "type": "string",
631
+ "enum": [
632
+ "interrupt"
633
+ ]
634
+ },
635
+ "id": {
636
+ "type": "string"
637
+ }
638
+ },
639
+ "required": [
640
+ "type",
641
+ "id"
642
+ ],
643
+ "additionalProperties": false
644
+ },
645
+ {
646
+ "type": "object",
647
+ "properties": {
648
+ "type": {
649
+ "type": "string",
650
+ "enum": [
651
+ "title"
652
+ ]
653
+ },
654
+ "id": {
655
+ "type": "string"
656
+ },
657
+ "description": {
658
+ "type": "string"
659
+ }
660
+ },
661
+ "required": [
662
+ "type",
663
+ "id",
664
+ "description"
665
+ ],
666
+ "additionalProperties": false
667
+ }
668
+ ]
669
+ }
670
+ },
671
+ "$ref": "#/$defs/output"
672
+ }