@anureo/host 0.0.0-stage → 0.3.11

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,3422 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://cowork.dev/hx/v1/schema.json",
4
+ "$defs": {
5
+ "HxError": {
6
+ "$ref": "urn:anureo:ahp:v1#/$defs/HarnessError"
7
+ },
8
+ "OperationState": {
9
+ "enum": [
10
+ "accepted",
11
+ "completed",
12
+ "failed",
13
+ "unknown"
14
+ ]
15
+ },
16
+ "OperationResult": {
17
+ "type": "object",
18
+ "properties": {
19
+ "operationId": {
20
+ "type": "string",
21
+ "minLength": 1
22
+ },
23
+ "state": {
24
+ "$ref": "#/$defs/OperationState"
25
+ },
26
+ "sessionId": {
27
+ "type": "string",
28
+ "minLength": 1
29
+ },
30
+ "turnId": {
31
+ "type": "string",
32
+ "minLength": 1
33
+ },
34
+ "revision": {
35
+ "type": "integer",
36
+ "minimum": 0
37
+ },
38
+ "outcomeUnknown": {
39
+ "type": "boolean"
40
+ },
41
+ "result": {
42
+ "$ref": "urn:anureo:ahp:v1#/$defs/JsonValue"
43
+ },
44
+ "error": {
45
+ "$ref": "#/$defs/HxError"
46
+ }
47
+ },
48
+ "required": [
49
+ "operationId",
50
+ "state",
51
+ "outcomeUnknown"
52
+ ],
53
+ "additionalProperties": false
54
+ },
55
+ "PublicInteraction": {
56
+ "type": "object",
57
+ "properties": {
58
+ "interactionId": {
59
+ "type": "string",
60
+ "minLength": 1
61
+ },
62
+ "revision": {
63
+ "type": "integer",
64
+ "minimum": 0
65
+ },
66
+ "state": {
67
+ "enum": [
68
+ "pending",
69
+ "responding",
70
+ "resolved"
71
+ ]
72
+ },
73
+ "request": {
74
+ "$ref": "urn:anureo:ahp:v1#/$defs/InteractionRequested"
75
+ },
76
+ "resolution": {
77
+ "$ref": "urn:anureo:ahp:v1#/$defs/InteractionResult"
78
+ }
79
+ },
80
+ "required": [
81
+ "interactionId",
82
+ "revision",
83
+ "state",
84
+ "request"
85
+ ],
86
+ "additionalProperties": false
87
+ },
88
+ "PublicSession": {
89
+ "type": "object",
90
+ "properties": {
91
+ "executionMode": {
92
+ "enum": ["normal", "swarm"]
93
+ },
94
+ "id": {
95
+ "type": "string",
96
+ "minLength": 1
97
+ },
98
+ "projectId": {
99
+ "type": "string",
100
+ "minLength": 1
101
+ },
102
+ "ownerId": {
103
+ "type": "string",
104
+ "minLength": 1
105
+ },
106
+ "adapterId": {
107
+ "type": "string",
108
+ "minLength": 1
109
+ },
110
+ "runtimeConfigId": {
111
+ "type": "string",
112
+ "minLength": 1
113
+ },
114
+ "cwd": {
115
+ "type": "string",
116
+ "minLength": 1
117
+ },
118
+ "config": {
119
+ "$ref": "urn:anureo:ahp:v1#/$defs/JsonObject"
120
+ },
121
+ "revision": {
122
+ "type": "integer",
123
+ "minimum": 0
124
+ },
125
+ "latestSeq": {
126
+ "type": "integer",
127
+ "minimum": 0
128
+ },
129
+ "status": {
130
+ "enum": [
131
+ "opening",
132
+ "ready",
133
+ "running",
134
+ "closing",
135
+ "closed",
136
+ "recoveryRequired"
137
+ ]
138
+ },
139
+ "activeTurnId": {
140
+ "type": "string",
141
+ "minLength": 1
142
+ },
143
+ "archived": {
144
+ "type": "boolean"
145
+ },
146
+ "model": {
147
+ "type": "string",
148
+ "minLength": 1
149
+ },
150
+ "pendingInteractions": {
151
+ "type": "array",
152
+ "items": {
153
+ "$ref": "#/$defs/PublicInteraction"
154
+ }
155
+ },
156
+ "agentId": {
157
+ "type": "string",
158
+ "minLength": 1
159
+ },
160
+ "title": {
161
+ "type": "string"
162
+ },
163
+ "createdAt": {
164
+ "type": "integer",
165
+ "minimum": 0
166
+ },
167
+ "updatedAt": {
168
+ "type": "integer",
169
+ "minimum": 0
170
+ },
171
+ "capabilities": {
172
+ "$ref": "urn:anureo:ahp:v1#/$defs/Capabilities"
173
+ },
174
+ "capabilityRevision": {
175
+ "type": "integer",
176
+ "minimum": 0
177
+ },
178
+ "bindingGeneration": {
179
+ "type": "integer",
180
+ "minimum": 0
181
+ },
182
+ "hostCapabilities": {
183
+ "$ref": "#/$defs/HostCapabilities"
184
+ },
185
+ "workspace": {
186
+ "$ref": "#/$defs/PublicWorkspace"
187
+ },
188
+ "managed": {
189
+ "type": "object",
190
+ "properties": {
191
+ "scopeId": {
192
+ "type": "string",
193
+ "minLength": 1
194
+ },
195
+ "executionKey": {
196
+ "type": "string",
197
+ "minLength": 1
198
+ }
199
+ },
200
+ "required": [
201
+ "scopeId",
202
+ "executionKey"
203
+ ],
204
+ "additionalProperties": false
205
+ },
206
+ "goal": {
207
+ "$ref": "urn:anureo:ahp:v1#/$defs/GoalState"
208
+ },
209
+ "parent": {
210
+ "type": "object",
211
+ "properties": {
212
+ "sessionId": {
213
+ "type": "string",
214
+ "minLength": 1
215
+ },
216
+ "boundary": {
217
+ "$ref": "urn:anureo:ahp:v1#/$defs/Boundary"
218
+ },
219
+ "bindingGeneration": {
220
+ "type": "integer",
221
+ "minimum": 1
222
+ }
223
+ },
224
+ "required": [
225
+ "sessionId",
226
+ "boundary",
227
+ "bindingGeneration"
228
+ ],
229
+ "additionalProperties": false
230
+ },
231
+ "fastMode": {
232
+ "type": "object",
233
+ "description": "Native fast-mode outcome reported by the runtime (requested on may still be off).",
234
+ "properties": {
235
+ "state": {
236
+ "type": "string",
237
+ "enum": [
238
+ "off",
239
+ "cooldown",
240
+ "on"
241
+ ]
242
+ },
243
+ "reason": {
244
+ "type": "string",
245
+ "minLength": 1
246
+ }
247
+ },
248
+ "required": [
249
+ "state"
250
+ ],
251
+ "additionalProperties": false
252
+ },
253
+ "subagents": {
254
+ "type": "array",
255
+ "items": {
256
+ "$ref": "#/$defs/HxSubagent"
257
+ }
258
+ }
259
+ },
260
+ "required": [
261
+ "id",
262
+ "projectId",
263
+ "ownerId",
264
+ "adapterId",
265
+ "runtimeConfigId",
266
+ "cwd",
267
+ "config",
268
+ "revision",
269
+ "latestSeq",
270
+ "status",
271
+ "archived"
272
+ ],
273
+ "additionalProperties": false
274
+ },
275
+ "HostLifecycleEvent": {
276
+ "type": "object",
277
+ "properties": {
278
+ "type": {
279
+ "enum": [
280
+ "host/operation",
281
+ "host/recovery",
282
+ "host/turnObservationEnded",
283
+ "host/turnInput",
284
+ "host/queue",
285
+ "host/binding",
286
+ "host/workspace",
287
+ "host/permissions",
288
+ "host/subagent"
289
+ ]
290
+ },
291
+ "payload": {
292
+ "$ref": "urn:anureo:ahp:v1#/$defs/JsonObject"
293
+ }
294
+ },
295
+ "required": [
296
+ "type",
297
+ "payload"
298
+ ],
299
+ "additionalProperties": false
300
+ },
301
+ "HostEvent": {
302
+ "type": "object",
303
+ "properties": {
304
+ "sessionId": {
305
+ "type": "string",
306
+ "minLength": 1
307
+ },
308
+ "hostSeq": {
309
+ "type": "integer",
310
+ "minimum": 0
311
+ },
312
+ "recordedAt": {
313
+ "type": "string",
314
+ "minLength": 1
315
+ },
316
+ "source": {
317
+ "type": "object",
318
+ "properties": {
319
+ "streamId": {
320
+ "type": "string",
321
+ "minLength": 1
322
+ },
323
+ "seq": {
324
+ "type": "integer",
325
+ "minimum": 0
326
+ }
327
+ },
328
+ "required": [
329
+ "streamId",
330
+ "seq"
331
+ ],
332
+ "additionalProperties": false
333
+ },
334
+ "event": {
335
+ "anyOf": [
336
+ {
337
+ "$ref": "urn:anureo:ahp:v1#/$defs/AhpEventPayload"
338
+ },
339
+ {
340
+ "$ref": "#/$defs/HostLifecycleEvent"
341
+ }
342
+ ]
343
+ },
344
+ "turnId": {
345
+ "type": "string",
346
+ "minLength": 1
347
+ },
348
+ "itemId": {
349
+ "type": "string",
350
+ "minLength": 1
351
+ },
352
+ "bindingGeneration": {
353
+ "type": "integer",
354
+ "minimum": 0
355
+ }
356
+ },
357
+ "required": [
358
+ "sessionId",
359
+ "hostSeq",
360
+ "recordedAt",
361
+ "event"
362
+ ],
363
+ "additionalProperties": false
364
+ },
365
+ "HxNotification": {
366
+ "type": "object",
367
+ "properties": {
368
+ "jsonrpc": {
369
+ "const": "2.0"
370
+ },
371
+ "method": {
372
+ "const": "hx.event"
373
+ },
374
+ "params": {
375
+ "type": "object",
376
+ "properties": {
377
+ "sessionId": {
378
+ "type": "string",
379
+ "minLength": 1
380
+ },
381
+ "hostSeq": {
382
+ "type": "integer",
383
+ "minimum": 0
384
+ },
385
+ "recordedAt": {
386
+ "type": "string",
387
+ "minLength": 1
388
+ },
389
+ "source": {
390
+ "type": "object",
391
+ "properties": {
392
+ "streamId": {
393
+ "type": "string",
394
+ "minLength": 1
395
+ },
396
+ "seq": {
397
+ "type": "integer",
398
+ "minimum": 0
399
+ }
400
+ },
401
+ "required": [
402
+ "streamId",
403
+ "seq"
404
+ ],
405
+ "additionalProperties": false
406
+ },
407
+ "event": {
408
+ "anyOf": [
409
+ {
410
+ "$ref": "urn:anureo:ahp:v1#/$defs/AhpEventPayload"
411
+ },
412
+ {
413
+ "$ref": "#/$defs/HostLifecycleEvent"
414
+ }
415
+ ]
416
+ },
417
+ "subscriptionId": {
418
+ "type": "string",
419
+ "minLength": 1
420
+ },
421
+ "turnId": {
422
+ "type": "string",
423
+ "minLength": 1
424
+ },
425
+ "itemId": {
426
+ "type": "string",
427
+ "minLength": 1
428
+ },
429
+ "bindingGeneration": {
430
+ "type": "integer",
431
+ "minimum": 0
432
+ }
433
+ },
434
+ "required": [
435
+ "sessionId",
436
+ "hostSeq",
437
+ "recordedAt",
438
+ "event",
439
+ "subscriptionId"
440
+ ],
441
+ "additionalProperties": false
442
+ }
443
+ },
444
+ "required": [
445
+ "jsonrpc",
446
+ "method",
447
+ "params"
448
+ ],
449
+ "additionalProperties": false
450
+ },
451
+ "EventPage": {
452
+ "type": "object",
453
+ "properties": {
454
+ "events": {
455
+ "type": "array",
456
+ "items": {
457
+ "$ref": "#/$defs/HostEvent"
458
+ }
459
+ },
460
+ "nextAfterSeq": {
461
+ "type": "integer",
462
+ "minimum": 0
463
+ },
464
+ "hasMore": {
465
+ "type": "boolean"
466
+ },
467
+ "latestSeq": {
468
+ "type": "integer",
469
+ "minimum": 0
470
+ },
471
+ "earliestSeq": {
472
+ "type": "integer",
473
+ "minimum": 0
474
+ },
475
+ "throughSeq": {
476
+ "type": "integer",
477
+ "minimum": 0
478
+ }
479
+ },
480
+ "required": [
481
+ "events",
482
+ "nextAfterSeq",
483
+ "hasMore",
484
+ "latestSeq",
485
+ "earliestSeq",
486
+ "throughSeq"
487
+ ],
488
+ "additionalProperties": false
489
+ },
490
+ "HxInitializeParams": {
491
+ "type": "object",
492
+ "properties": {
493
+ "protocolVersions": {
494
+ "type": "array",
495
+ "items": {
496
+ "type": "integer"
497
+ },
498
+ "minItems": 1
499
+ },
500
+ "clientInfo": {
501
+ "$ref": "urn:anureo:ahp:v1#/$defs/ClientInfo"
502
+ }
503
+ },
504
+ "required": [
505
+ "protocolVersions",
506
+ "clientInfo"
507
+ ],
508
+ "additionalProperties": false
509
+ },
510
+ "HxInitializeResult": {
511
+ "type": "object",
512
+ "properties": {
513
+ "protocolVersion": {
514
+ "const": 1
515
+ },
516
+ "features": {
517
+ "type": "array",
518
+ "items": {
519
+ "type": "string",
520
+ "minLength": 1
521
+ }
522
+ },
523
+ "limits": {
524
+ "$ref": "urn:anureo:ahp:v1#/$defs/JsonObject"
525
+ }
526
+ },
527
+ "required": [
528
+ "protocolVersion",
529
+ "features",
530
+ "limits"
531
+ ],
532
+ "additionalProperties": false
533
+ },
534
+ "HxHarnessListParams": {
535
+ "type": "object",
536
+ "properties": {
537
+ "projectId": {
538
+ "type": "string",
539
+ "minLength": 1
540
+ }
541
+ },
542
+ "required": [
543
+ "projectId"
544
+ ],
545
+ "additionalProperties": false
546
+ },
547
+ "HxHarnessListResult": {
548
+ "type": "object",
549
+ "properties": {
550
+ "harnesses": {
551
+ "type": "array",
552
+ "items": {
553
+ "type": "object",
554
+ "properties": {
555
+ "runtimeConfigId": {
556
+ "type": "string",
557
+ "minLength": 1
558
+ },
559
+ "adapterId": {
560
+ "type": "string",
561
+ "minLength": 1
562
+ },
563
+ "available": {
564
+ "type": "boolean"
565
+ },
566
+ "reason": {
567
+ "type": "string",
568
+ "minLength": 1
569
+ },
570
+ "capabilities": {
571
+ "$ref": "urn:anureo:ahp:v1#/$defs/Capabilities"
572
+ },
573
+ "version": {
574
+ "type": "string",
575
+ "minLength": 1
576
+ },
577
+ "providerId": {
578
+ "type": "string",
579
+ "minLength": 1
580
+ },
581
+ "name": {
582
+ "type": "string",
583
+ "minLength": 1
584
+ },
585
+ "authStatus": {
586
+ "enum": [
587
+ "unknown",
588
+ "required",
589
+ "ready"
590
+ ]
591
+ }
592
+ },
593
+ "required": [
594
+ "runtimeConfigId",
595
+ "adapterId",
596
+ "available"
597
+ ],
598
+ "additionalProperties": false
599
+ }
600
+ }
601
+ },
602
+ "required": [
603
+ "harnesses"
604
+ ],
605
+ "additionalProperties": false
606
+ },
607
+ "HxHarnessModelsParams": {
608
+ "type": "object",
609
+ "properties": {
610
+ "projectId": {
611
+ "type": "string",
612
+ "minLength": 1
613
+ },
614
+ "runtimeConfigId": {
615
+ "type": "string",
616
+ "minLength": 1
617
+ }
618
+ },
619
+ "required": [
620
+ "projectId",
621
+ "runtimeConfigId"
622
+ ],
623
+ "additionalProperties": false
624
+ },
625
+ "HxHarnessModelsResult": {
626
+ "type": "object",
627
+ "properties": {
628
+ "models": {
629
+ "type": "array",
630
+ "items": {
631
+ "type": "object",
632
+ "properties": {
633
+ "id": {
634
+ "type": "string",
635
+ "minLength": 1
636
+ },
637
+ "name": {
638
+ "type": "string",
639
+ "minLength": 1
640
+ },
641
+ "isDefault": {
642
+ "type": "boolean",
643
+ "description": "The runtime's default model (resolved from a native default alias)."
644
+ },
645
+ "group": {
646
+ "type": "string",
647
+ "enum": [
648
+ "primary",
649
+ "more"
650
+ ],
651
+ "description": "primary: newest model per family; more: older or extra models."
652
+ },
653
+ "effortLevels": {
654
+ "type": "array",
655
+ "items": {
656
+ "type": "string",
657
+ "minLength": 1
658
+ },
659
+ "description": "Reasoning effort levels this model accepts; empty when it takes no effort setting. Absent when unknown."
660
+ },
661
+ "defaultEffort": {
662
+ "type": "string",
663
+ "minLength": 1,
664
+ "description": "Effort the model uses when the session sets none."
665
+ },
666
+ "supportsFast": {
667
+ "type": "boolean",
668
+ "description": "The model accepts the fast (priority) service tier."
669
+ }
670
+ },
671
+ "required": [
672
+ "id",
673
+ "name"
674
+ ],
675
+ "additionalProperties": false
676
+ }
677
+ },
678
+ "source": {
679
+ "type": "string",
680
+ "minLength": 1
681
+ },
682
+ "reason": {
683
+ "type": "string",
684
+ "minLength": 1
685
+ }
686
+ },
687
+ "required": [
688
+ "models",
689
+ "source"
690
+ ],
691
+ "additionalProperties": false
692
+ },
693
+ "HxSessionCreateParams": {
694
+ "type": "object",
695
+ "properties": {
696
+ "executionMode": {
697
+ "enum": ["normal", "swarm"]
698
+ },
699
+ "projectId": {
700
+ "type": "string",
701
+ "minLength": 1
702
+ },
703
+ "runtimeConfigId": {
704
+ "type": "string",
705
+ "minLength": 1
706
+ },
707
+ "model": {
708
+ "type": "string",
709
+ "minLength": 1
710
+ },
711
+ "instructions": {
712
+ "type": "string"
713
+ },
714
+ "config": {
715
+ "$ref": "urn:anureo:ahp:v1#/$defs/JsonObject"
716
+ },
717
+ "idempotencyKey": {
718
+ "type": "string",
719
+ "minLength": 1,
720
+ "maxLength": 128
721
+ },
722
+ "agentId": {
723
+ "type": "string",
724
+ "minLength": 1
725
+ },
726
+ "workspace": {
727
+ "$ref": "#/$defs/WorkspaceRequest"
728
+ }
729
+ },
730
+ "required": [
731
+ "projectId",
732
+ "runtimeConfigId",
733
+ "idempotencyKey"
734
+ ],
735
+ "additionalProperties": false
736
+ },
737
+ "HxSessionCreateResult": {
738
+ "$ref": "#/$defs/OperationResult"
739
+ },
740
+ "HxSessionGetParams": {
741
+ "type": "object",
742
+ "properties": {
743
+ "sessionId": {
744
+ "type": "string",
745
+ "minLength": 1
746
+ },
747
+ "projectId": {
748
+ "type": "string",
749
+ "minLength": 1
750
+ }
751
+ },
752
+ "required": [
753
+ "sessionId"
754
+ ],
755
+ "additionalProperties": false
756
+ },
757
+ "HxSessionGetResult": {
758
+ "$ref": "#/$defs/PublicSession"
759
+ },
760
+ "HxSessionListParams": {
761
+ "type": "object",
762
+ "properties": {
763
+ "projectId": {
764
+ "type": "string",
765
+ "minLength": 1
766
+ },
767
+ "archived": {
768
+ "type": "boolean"
769
+ },
770
+ "cursor": {
771
+ "type": "string",
772
+ "minLength": 1
773
+ },
774
+ "limit": {
775
+ "type": "integer",
776
+ "minimum": 1,
777
+ "maximum": 1000
778
+ }
779
+ },
780
+ "required": [
781
+ "projectId"
782
+ ],
783
+ "additionalProperties": false
784
+ },
785
+ "HxSessionListResult": {
786
+ "type": "object",
787
+ "properties": {
788
+ "sessions": {
789
+ "type": "array",
790
+ "items": {
791
+ "$ref": "#/$defs/PublicSession"
792
+ }
793
+ },
794
+ "nextCursor": {
795
+ "anyOf": [
796
+ {
797
+ "type": "string",
798
+ "minLength": 1
799
+ },
800
+ {
801
+ "type": "null"
802
+ }
803
+ ]
804
+ }
805
+ },
806
+ "required": [
807
+ "sessions",
808
+ "nextCursor"
809
+ ],
810
+ "additionalProperties": false
811
+ },
812
+ "HostSessionListSummary": {
813
+ "type": "object",
814
+ "properties": {
815
+ "id": { "type": "string", "minLength": 1 },
816
+ "scopeId": { "type": "string", "minLength": 1 },
817
+ "title": { "type": "string" },
818
+ "status": { "enum": ["opening", "ready", "running", "closing", "closed", "recoveryRequired"] },
819
+ "runtimeConfigId": { "type": "string", "minLength": 1 },
820
+ "updatedAt": { "type": "integer", "minimum": 0 },
821
+ "archived": { "type": "boolean" }
822
+ },
823
+ "required": ["id", "scopeId", "status", "runtimeConfigId", "archived"],
824
+ "additionalProperties": false
825
+ },
826
+ "HostSessionListSummaryPage": {
827
+ "type": "object",
828
+ "properties": {
829
+ "sessions": { "type": "array", "items": { "$ref": "#/$defs/HostSessionListSummary" } },
830
+ "nextCursor": { "anyOf": [{ "type": "string", "minLength": 1 }, { "type": "null" }] }
831
+ },
832
+ "required": ["sessions", "nextCursor"],
833
+ "additionalProperties": false
834
+ },
835
+ "HxSessionOpenParams": {
836
+ "type": "object",
837
+ "properties": {
838
+ "sessionId": {
839
+ "type": "string",
840
+ "minLength": 1
841
+ },
842
+ "projectId": {
843
+ "type": "string",
844
+ "minLength": 1
845
+ },
846
+ "idempotencyKey": {
847
+ "type": "string",
848
+ "minLength": 1,
849
+ "maxLength": 128
850
+ },
851
+ "expectedRevision": {
852
+ "type": "integer",
853
+ "minimum": 0
854
+ }
855
+ },
856
+ "required": [
857
+ "sessionId",
858
+ "idempotencyKey",
859
+ "expectedRevision"
860
+ ],
861
+ "additionalProperties": false
862
+ },
863
+ "HxSessionOpenResult": {
864
+ "$ref": "#/$defs/OperationResult"
865
+ },
866
+ "HxSessionCloseParams": {
867
+ "type": "object",
868
+ "properties": {
869
+ "sessionId": {
870
+ "type": "string",
871
+ "minLength": 1
872
+ },
873
+ "projectId": {
874
+ "type": "string",
875
+ "minLength": 1
876
+ },
877
+ "idempotencyKey": {
878
+ "type": "string",
879
+ "minLength": 1,
880
+ "maxLength": 128
881
+ },
882
+ "expectedRevision": {
883
+ "type": "integer",
884
+ "minimum": 0
885
+ }
886
+ },
887
+ "required": [
888
+ "sessionId",
889
+ "idempotencyKey",
890
+ "expectedRevision"
891
+ ],
892
+ "additionalProperties": false
893
+ },
894
+ "HxSessionCloseResult": {
895
+ "$ref": "#/$defs/OperationResult"
896
+ },
897
+ "HxSessionArchiveParams": {
898
+ "type": "object",
899
+ "properties": {
900
+ "sessionId": {
901
+ "type": "string",
902
+ "minLength": 1
903
+ },
904
+ "projectId": {
905
+ "type": "string",
906
+ "minLength": 1
907
+ },
908
+ "idempotencyKey": {
909
+ "type": "string",
910
+ "minLength": 1,
911
+ "maxLength": 128
912
+ },
913
+ "expectedRevision": {
914
+ "type": "integer",
915
+ "minimum": 0
916
+ }
917
+ },
918
+ "required": [
919
+ "sessionId",
920
+ "idempotencyKey",
921
+ "expectedRevision"
922
+ ],
923
+ "additionalProperties": false
924
+ },
925
+ "HxSessionArchiveResult": {
926
+ "$ref": "#/$defs/OperationResult"
927
+ },
928
+ "HxSessionRestoreParams": {
929
+ "type": "object",
930
+ "properties": {
931
+ "sessionId": {
932
+ "type": "string",
933
+ "minLength": 1
934
+ },
935
+ "projectId": {
936
+ "type": "string",
937
+ "minLength": 1
938
+ },
939
+ "idempotencyKey": {
940
+ "type": "string",
941
+ "minLength": 1,
942
+ "maxLength": 128
943
+ },
944
+ "expectedRevision": {
945
+ "type": "integer",
946
+ "minimum": 0
947
+ }
948
+ },
949
+ "required": [
950
+ "sessionId",
951
+ "idempotencyKey",
952
+ "expectedRevision"
953
+ ],
954
+ "additionalProperties": false
955
+ },
956
+ "HxSessionRestoreResult": {
957
+ "$ref": "#/$defs/OperationResult"
958
+ },
959
+ "HxSessionConfigSetParams": {
960
+ "type": "object",
961
+ "properties": {
962
+ "sessionId": {
963
+ "type": "string",
964
+ "minLength": 1
965
+ },
966
+ "projectId": {
967
+ "type": "string",
968
+ "minLength": 1
969
+ },
970
+ "idempotencyKey": {
971
+ "type": "string",
972
+ "minLength": 1,
973
+ "maxLength": 128
974
+ },
975
+ "expectedRevision": {
976
+ "type": "integer",
977
+ "minimum": 0
978
+ },
979
+ "patch": {
980
+ "$ref": "urn:anureo:ahp:v1#/$defs/JsonObject"
981
+ }
982
+ },
983
+ "required": [
984
+ "sessionId",
985
+ "idempotencyKey",
986
+ "expectedRevision",
987
+ "patch"
988
+ ],
989
+ "additionalProperties": false
990
+ },
991
+ "HxSessionConfigSetResult": {
992
+ "$ref": "#/$defs/OperationResult"
993
+ },
994
+ "HxSessionForkParams": {
995
+ "type": "object",
996
+ "properties": {
997
+ "sessionId": {
998
+ "type": "string",
999
+ "minLength": 1
1000
+ },
1001
+ "projectId": {
1002
+ "type": "string",
1003
+ "minLength": 1
1004
+ },
1005
+ "idempotencyKey": {
1006
+ "type": "string",
1007
+ "minLength": 1,
1008
+ "maxLength": 128
1009
+ },
1010
+ "expectedRevision": {
1011
+ "type": "integer",
1012
+ "minimum": 0
1013
+ },
1014
+ "boundary": {
1015
+ "$ref": "urn:anureo:ahp:v1#/$defs/Boundary"
1016
+ },
1017
+ "workspace": {
1018
+ "$ref": "#/$defs/WorkspaceRequest"
1019
+ }
1020
+ },
1021
+ "required": [
1022
+ "sessionId",
1023
+ "idempotencyKey",
1024
+ "expectedRevision",
1025
+ "boundary"
1026
+ ],
1027
+ "additionalProperties": false
1028
+ },
1029
+ "HxSessionForkResult": {
1030
+ "$ref": "#/$defs/OperationResult"
1031
+ },
1032
+ "HxSessionRevertParams": {
1033
+ "type": "object",
1034
+ "properties": {
1035
+ "sessionId": {
1036
+ "type": "string",
1037
+ "minLength": 1
1038
+ },
1039
+ "projectId": {
1040
+ "type": "string",
1041
+ "minLength": 1
1042
+ },
1043
+ "idempotencyKey": {
1044
+ "type": "string",
1045
+ "minLength": 1,
1046
+ "maxLength": 128
1047
+ },
1048
+ "expectedRevision": {
1049
+ "type": "integer",
1050
+ "minimum": 0
1051
+ },
1052
+ "boundary": {
1053
+ "$ref": "urn:anureo:ahp:v1#/$defs/Boundary"
1054
+ },
1055
+ "scope": {
1056
+ "$ref": "urn:anureo:ahp:v1#/$defs/RevertScope"
1057
+ }
1058
+ },
1059
+ "required": [
1060
+ "sessionId",
1061
+ "idempotencyKey",
1062
+ "expectedRevision",
1063
+ "boundary",
1064
+ "scope"
1065
+ ],
1066
+ "additionalProperties": false
1067
+ },
1068
+ "HxSessionRevertResult": {
1069
+ "$ref": "#/$defs/OperationResult"
1070
+ },
1071
+ "HxSessionReconcileParams": {
1072
+ "type": "object",
1073
+ "properties": {
1074
+ "sessionId": {
1075
+ "type": "string",
1076
+ "minLength": 1
1077
+ },
1078
+ "projectId": {
1079
+ "type": "string",
1080
+ "minLength": 1
1081
+ }
1082
+ },
1083
+ "required": [
1084
+ "sessionId"
1085
+ ],
1086
+ "additionalProperties": false
1087
+ },
1088
+ "HxSessionReconcileResult": {
1089
+ "type": "object",
1090
+ "properties": {
1091
+ "session": {
1092
+ "$ref": "#/$defs/PublicSession"
1093
+ },
1094
+ "operations": {
1095
+ "type": "array",
1096
+ "items": {
1097
+ "$ref": "#/$defs/OperationResult"
1098
+ }
1099
+ }
1100
+ },
1101
+ "required": [
1102
+ "session",
1103
+ "operations"
1104
+ ],
1105
+ "additionalProperties": false
1106
+ },
1107
+ "HxHistoryReadParams": {
1108
+ "type": "object",
1109
+ "properties": {
1110
+ "sessionId": {
1111
+ "type": "string",
1112
+ "minLength": 1
1113
+ },
1114
+ "projectId": {
1115
+ "type": "string",
1116
+ "minLength": 1
1117
+ },
1118
+ "cursor": {
1119
+ "type": "string",
1120
+ "minLength": 1
1121
+ },
1122
+ "limit": {
1123
+ "type": "integer",
1124
+ "minimum": 1,
1125
+ "maximum": 1000
1126
+ },
1127
+ "snapshotToken": {
1128
+ "type": "string",
1129
+ "minLength": 1
1130
+ }
1131
+ },
1132
+ "required": [
1133
+ "sessionId"
1134
+ ],
1135
+ "additionalProperties": false
1136
+ },
1137
+ "HxHistoryReadResult": {
1138
+ "$ref": "urn:anureo:ahp:v1#/$defs/HistoryPage"
1139
+ },
1140
+ "HxTurnStartParams": {
1141
+ "type": "object",
1142
+ "properties": {
1143
+ "sessionId": {
1144
+ "type": "string",
1145
+ "minLength": 1
1146
+ },
1147
+ "projectId": {
1148
+ "type": "string",
1149
+ "minLength": 1
1150
+ },
1151
+ "idempotencyKey": {
1152
+ "type": "string",
1153
+ "minLength": 1,
1154
+ "maxLength": 128
1155
+ },
1156
+ "expectedRevision": {
1157
+ "type": "integer",
1158
+ "minimum": 0
1159
+ },
1160
+ "input": {
1161
+ "type": "array",
1162
+ "items": {
1163
+ "$ref": "urn:anureo:ahp:v1#/$defs/InputBlock"
1164
+ },
1165
+ "minItems": 1
1166
+ },
1167
+ "overrides": {
1168
+ "$ref": "urn:anureo:ahp:v1#/$defs/JsonObject"
1169
+ },
1170
+ "outputSchema": {
1171
+ "$ref": "urn:anureo:ahp:v1#/$defs/JsonSchema"
1172
+ },
1173
+ "references": {
1174
+ "type": "array",
1175
+ "maxItems": 8,
1176
+ "items": {
1177
+ "$ref": "#/$defs/HxContextReference"
1178
+ }
1179
+ }
1180
+ },
1181
+ "required": [
1182
+ "sessionId",
1183
+ "idempotencyKey",
1184
+ "expectedRevision",
1185
+ "input"
1186
+ ],
1187
+ "additionalProperties": false
1188
+ },
1189
+ "HxTurnStartResult": {
1190
+ "$ref": "#/$defs/OperationResult"
1191
+ },
1192
+ "HxTurnSteerParams": {
1193
+ "type": "object",
1194
+ "properties": {
1195
+ "sessionId": {
1196
+ "type": "string",
1197
+ "minLength": 1
1198
+ },
1199
+ "projectId": {
1200
+ "type": "string",
1201
+ "minLength": 1
1202
+ },
1203
+ "expectedTurnId": {
1204
+ "type": "string",
1205
+ "minLength": 1
1206
+ },
1207
+ "input": {
1208
+ "type": "array",
1209
+ "items": {
1210
+ "$ref": "urn:anureo:ahp:v1#/$defs/InputBlock"
1211
+ },
1212
+ "minItems": 1
1213
+ },
1214
+ "idempotencyKey": {
1215
+ "type": "string",
1216
+ "minLength": 1,
1217
+ "maxLength": 128
1218
+ },
1219
+ "references": {
1220
+ "type": "array",
1221
+ "maxItems": 8,
1222
+ "items": {
1223
+ "$ref": "#/$defs/HxContextReference"
1224
+ }
1225
+ }
1226
+ },
1227
+ "required": [
1228
+ "sessionId",
1229
+ "expectedTurnId",
1230
+ "input",
1231
+ "idempotencyKey"
1232
+ ],
1233
+ "additionalProperties": false
1234
+ },
1235
+ "HxTurnSteerResult": {
1236
+ "$ref": "#/$defs/OperationResult"
1237
+ },
1238
+ "HxTurnInterruptParams": {
1239
+ "type": "object",
1240
+ "properties": {
1241
+ "sessionId": {
1242
+ "type": "string",
1243
+ "minLength": 1
1244
+ },
1245
+ "projectId": {
1246
+ "type": "string",
1247
+ "minLength": 1
1248
+ },
1249
+ "turnId": {
1250
+ "type": "string",
1251
+ "minLength": 1
1252
+ },
1253
+ "idempotencyKey": {
1254
+ "type": "string",
1255
+ "minLength": 1,
1256
+ "maxLength": 128
1257
+ }
1258
+ },
1259
+ "required": [
1260
+ "sessionId",
1261
+ "turnId",
1262
+ "idempotencyKey"
1263
+ ],
1264
+ "additionalProperties": false
1265
+ },
1266
+ "HxTurnInterruptResult": {
1267
+ "$ref": "#/$defs/OperationResult"
1268
+ },
1269
+ "HxInteractionListParams": {
1270
+ "type": "object",
1271
+ "properties": {
1272
+ "sessionId": {
1273
+ "type": "string",
1274
+ "minLength": 1
1275
+ },
1276
+ "projectId": {
1277
+ "type": "string",
1278
+ "minLength": 1
1279
+ },
1280
+ "state": {
1281
+ "enum": [
1282
+ "pending",
1283
+ "responding",
1284
+ "resolved"
1285
+ ]
1286
+ }
1287
+ },
1288
+ "required": [
1289
+ "sessionId"
1290
+ ],
1291
+ "additionalProperties": false
1292
+ },
1293
+ "HxInteractionListResult": {
1294
+ "type": "object",
1295
+ "properties": {
1296
+ "interactions": {
1297
+ "type": "array",
1298
+ "items": {
1299
+ "$ref": "#/$defs/PublicInteraction"
1300
+ }
1301
+ }
1302
+ },
1303
+ "required": [
1304
+ "interactions"
1305
+ ],
1306
+ "additionalProperties": false
1307
+ },
1308
+ "HxInteractionPrivateGetParams": {
1309
+ "type": "object",
1310
+ "properties": {
1311
+ "sessionId": {
1312
+ "type": "string",
1313
+ "minLength": 1
1314
+ },
1315
+ "projectId": {
1316
+ "type": "string",
1317
+ "minLength": 1
1318
+ },
1319
+ "interactionId": {
1320
+ "type": "string",
1321
+ "minLength": 1
1322
+ }
1323
+ },
1324
+ "required": [
1325
+ "sessionId",
1326
+ "interactionId"
1327
+ ],
1328
+ "additionalProperties": false
1329
+ },
1330
+ "HxInteractionPrivateGetResult": {
1331
+ "$ref": "urn:anureo:ahp:v1#/$defs/JsonObject"
1332
+ },
1333
+ "HxInteractionRespondParams": {
1334
+ "type": "object",
1335
+ "properties": {
1336
+ "sessionId": {
1337
+ "type": "string",
1338
+ "minLength": 1
1339
+ },
1340
+ "projectId": {
1341
+ "type": "string",
1342
+ "minLength": 1
1343
+ },
1344
+ "interactionId": {
1345
+ "type": "string",
1346
+ "minLength": 1
1347
+ },
1348
+ "expectedInteractionRevision": {
1349
+ "type": "integer",
1350
+ "minimum": 0
1351
+ },
1352
+ "idempotencyKey": {
1353
+ "type": "string",
1354
+ "minLength": 1,
1355
+ "maxLength": 128
1356
+ },
1357
+ "response": {
1358
+ "$ref": "urn:anureo:ahp:v1#/$defs/InteractionResponse"
1359
+ }
1360
+ },
1361
+ "required": [
1362
+ "sessionId",
1363
+ "interactionId",
1364
+ "expectedInteractionRevision",
1365
+ "idempotencyKey",
1366
+ "response"
1367
+ ],
1368
+ "additionalProperties": false
1369
+ },
1370
+ "HxInteractionRespondResult": {
1371
+ "$ref": "#/$defs/OperationResult"
1372
+ },
1373
+ "HxInteractionCancelParams": {
1374
+ "type": "object",
1375
+ "properties": {
1376
+ "sessionId": {
1377
+ "type": "string",
1378
+ "minLength": 1
1379
+ },
1380
+ "projectId": {
1381
+ "type": "string",
1382
+ "minLength": 1
1383
+ },
1384
+ "interactionId": {
1385
+ "type": "string",
1386
+ "minLength": 1
1387
+ },
1388
+ "expectedInteractionRevision": {
1389
+ "type": "integer",
1390
+ "minimum": 0
1391
+ },
1392
+ "idempotencyKey": {
1393
+ "type": "string",
1394
+ "minLength": 1,
1395
+ "maxLength": 128
1396
+ },
1397
+ "reason": {
1398
+ "type": "string",
1399
+ "minLength": 1
1400
+ }
1401
+ },
1402
+ "required": [
1403
+ "sessionId",
1404
+ "interactionId",
1405
+ "expectedInteractionRevision",
1406
+ "idempotencyKey"
1407
+ ],
1408
+ "additionalProperties": false
1409
+ },
1410
+ "HxInteractionCancelResult": {
1411
+ "$ref": "#/$defs/OperationResult"
1412
+ },
1413
+ "HxGoalSetParams": {
1414
+ "type": "object",
1415
+ "properties": {
1416
+ "sessionId": {
1417
+ "type": "string",
1418
+ "minLength": 1
1419
+ },
1420
+ "projectId": {
1421
+ "type": "string",
1422
+ "minLength": 1
1423
+ },
1424
+ "idempotencyKey": {
1425
+ "type": "string",
1426
+ "minLength": 1,
1427
+ "maxLength": 128
1428
+ },
1429
+ "expectedRevision": {
1430
+ "type": "integer",
1431
+ "minimum": 0
1432
+ },
1433
+ "goal": {
1434
+ "$ref": "urn:anureo:ahp:v1#/$defs/JsonObject"
1435
+ }
1436
+ },
1437
+ "required": [
1438
+ "sessionId",
1439
+ "idempotencyKey",
1440
+ "expectedRevision",
1441
+ "goal"
1442
+ ],
1443
+ "additionalProperties": false
1444
+ },
1445
+ "HxGoalSetResult": {
1446
+ "$ref": "#/$defs/OperationResult"
1447
+ },
1448
+ "HxGoalClearParams": {
1449
+ "type": "object",
1450
+ "properties": {
1451
+ "sessionId": {
1452
+ "type": "string",
1453
+ "minLength": 1
1454
+ },
1455
+ "projectId": {
1456
+ "type": "string",
1457
+ "minLength": 1
1458
+ },
1459
+ "idempotencyKey": {
1460
+ "type": "string",
1461
+ "minLength": 1,
1462
+ "maxLength": 128
1463
+ },
1464
+ "expectedRevision": {
1465
+ "type": "integer",
1466
+ "minimum": 0
1467
+ }
1468
+ },
1469
+ "required": [
1470
+ "sessionId",
1471
+ "idempotencyKey",
1472
+ "expectedRevision"
1473
+ ],
1474
+ "additionalProperties": false
1475
+ },
1476
+ "HxGoalClearResult": {
1477
+ "$ref": "#/$defs/OperationResult"
1478
+ },
1479
+ "HxCompactStartParams": {
1480
+ "type": "object",
1481
+ "properties": {
1482
+ "sessionId": {
1483
+ "type": "string",
1484
+ "minLength": 1
1485
+ },
1486
+ "projectId": {
1487
+ "type": "string",
1488
+ "minLength": 1
1489
+ },
1490
+ "idempotencyKey": {
1491
+ "type": "string",
1492
+ "minLength": 1,
1493
+ "maxLength": 128
1494
+ },
1495
+ "expectedRevision": {
1496
+ "type": "integer",
1497
+ "minimum": 0
1498
+ }
1499
+ },
1500
+ "required": [
1501
+ "sessionId",
1502
+ "idempotencyKey",
1503
+ "expectedRevision"
1504
+ ],
1505
+ "additionalProperties": false
1506
+ },
1507
+ "HxCompactStartResult": {
1508
+ "$ref": "#/$defs/OperationResult"
1509
+ },
1510
+ "HxReviewStartParams": {
1511
+ "type": "object",
1512
+ "properties": {
1513
+ "sessionId": {
1514
+ "type": "string",
1515
+ "minLength": 1
1516
+ },
1517
+ "projectId": {
1518
+ "type": "string",
1519
+ "minLength": 1
1520
+ },
1521
+ "idempotencyKey": {
1522
+ "type": "string",
1523
+ "minLength": 1,
1524
+ "maxLength": 128
1525
+ },
1526
+ "expectedRevision": {
1527
+ "type": "integer",
1528
+ "minimum": 0
1529
+ },
1530
+ "target": {
1531
+ "$ref": "urn:anureo:ahp:v1#/$defs/JsonObject"
1532
+ }
1533
+ },
1534
+ "required": [
1535
+ "sessionId",
1536
+ "idempotencyKey",
1537
+ "expectedRevision",
1538
+ "target"
1539
+ ],
1540
+ "additionalProperties": false
1541
+ },
1542
+ "HxReviewStartResult": {
1543
+ "$ref": "#/$defs/OperationResult"
1544
+ },
1545
+ "HxOperationGetParams": {
1546
+ "anyOf": [
1547
+ {
1548
+ "type": "object",
1549
+ "properties": {
1550
+ "operationId": {
1551
+ "type": "string",
1552
+ "minLength": 1
1553
+ },
1554
+ "method": {
1555
+ "type": "string",
1556
+ "minLength": 1
1557
+ },
1558
+ "target": {
1559
+ "type": "string",
1560
+ "minLength": 1
1561
+ },
1562
+ "idempotencyKey": {
1563
+ "type": "string",
1564
+ "minLength": 1
1565
+ }
1566
+ },
1567
+ "required": [
1568
+ "operationId"
1569
+ ],
1570
+ "additionalProperties": false
1571
+ },
1572
+ {
1573
+ "type": "object",
1574
+ "properties": {
1575
+ "operationId": {
1576
+ "type": "string",
1577
+ "minLength": 1
1578
+ },
1579
+ "method": {
1580
+ "type": "string",
1581
+ "minLength": 1
1582
+ },
1583
+ "target": {
1584
+ "type": "string",
1585
+ "minLength": 1
1586
+ },
1587
+ "idempotencyKey": {
1588
+ "type": "string",
1589
+ "minLength": 1
1590
+ }
1591
+ },
1592
+ "required": [
1593
+ "method",
1594
+ "target",
1595
+ "idempotencyKey"
1596
+ ],
1597
+ "additionalProperties": false
1598
+ }
1599
+ ]
1600
+ },
1601
+ "HxOperationGetResult": {
1602
+ "$ref": "#/$defs/OperationResult"
1603
+ },
1604
+ "HxEventsReadParams": {
1605
+ "type": "object",
1606
+ "properties": {
1607
+ "sessionId": {
1608
+ "type": "string",
1609
+ "minLength": 1
1610
+ },
1611
+ "projectId": {
1612
+ "type": "string",
1613
+ "minLength": 1
1614
+ },
1615
+ "afterSeq": {
1616
+ "type": "integer",
1617
+ "minimum": 0
1618
+ },
1619
+ "throughSeq": {
1620
+ "type": "integer",
1621
+ "minimum": 0
1622
+ },
1623
+ "limit": {
1624
+ "type": "integer",
1625
+ "minimum": 1,
1626
+ "maximum": 1000
1627
+ }
1628
+ },
1629
+ "required": [
1630
+ "sessionId"
1631
+ ],
1632
+ "additionalProperties": false
1633
+ },
1634
+ "HxEventsReadResult": {
1635
+ "$ref": "#/$defs/EventPage"
1636
+ },
1637
+ "HxProjectionSnapshotParams": {
1638
+ "type": "object",
1639
+ "properties": {
1640
+ "sessionId": {
1641
+ "type": "string",
1642
+ "minLength": 1
1643
+ },
1644
+ "projectId": {
1645
+ "type": "string",
1646
+ "minLength": 1
1647
+ }
1648
+ },
1649
+ "required": [
1650
+ "sessionId"
1651
+ ],
1652
+ "additionalProperties": false
1653
+ },
1654
+ "HxProjectionSnapshotResult": {
1655
+ "type": "object",
1656
+ "properties": {
1657
+ "checkpoint": {
1658
+ "description": "Materialized HxProjection checkpoint for one hostSeq prefix; null when nothing can be projected (no durable events, or a fork session). The authoritative TS type lives in @cowork/hx-projection; its tuple-bearing internals are intentionally opaque at the contract layer.",
1659
+ "anyOf": [
1660
+ {
1661
+ "type": "object"
1662
+ },
1663
+ {
1664
+ "type": "null"
1665
+ }
1666
+ ]
1667
+ },
1668
+ "seq": {
1669
+ "type": "integer",
1670
+ "minimum": 0
1671
+ },
1672
+ "latestSeq": {
1673
+ "type": "integer",
1674
+ "minimum": 0
1675
+ }
1676
+ },
1677
+ "required": [
1678
+ "checkpoint",
1679
+ "seq",
1680
+ "latestSeq"
1681
+ ],
1682
+ "additionalProperties": false
1683
+ },
1684
+ "HxEventsSubscribeParams": {
1685
+ "type": "object",
1686
+ "properties": {
1687
+ "sessionId": {
1688
+ "type": "string",
1689
+ "minLength": 1
1690
+ },
1691
+ "projectId": {
1692
+ "type": "string",
1693
+ "minLength": 1
1694
+ },
1695
+ "afterSeq": {
1696
+ "type": "integer",
1697
+ "minimum": 0
1698
+ }
1699
+ },
1700
+ "required": [
1701
+ "sessionId",
1702
+ "afterSeq"
1703
+ ],
1704
+ "additionalProperties": false
1705
+ },
1706
+ "HxEventsSubscribeResult": {
1707
+ "type": "object",
1708
+ "properties": {
1709
+ "subscriptionId": {
1710
+ "type": "string",
1711
+ "minLength": 1
1712
+ },
1713
+ "cutoverSeq": {
1714
+ "type": "integer",
1715
+ "minimum": 0
1716
+ },
1717
+ "earliestSeq": {
1718
+ "type": "integer",
1719
+ "minimum": 0
1720
+ }
1721
+ },
1722
+ "required": [
1723
+ "subscriptionId",
1724
+ "cutoverSeq",
1725
+ "earliestSeq"
1726
+ ],
1727
+ "additionalProperties": false
1728
+ },
1729
+ "HxEventsUnsubscribeParams": {
1730
+ "type": "object",
1731
+ "properties": {
1732
+ "subscriptionId": {
1733
+ "type": "string",
1734
+ "minLength": 1
1735
+ }
1736
+ },
1737
+ "required": [
1738
+ "subscriptionId"
1739
+ ],
1740
+ "additionalProperties": false
1741
+ },
1742
+ "HxEventsUnsubscribeResult": {
1743
+ "type": "object",
1744
+ "properties": {
1745
+ "removed": {
1746
+ "type": "boolean"
1747
+ }
1748
+ },
1749
+ "required": [
1750
+ "removed"
1751
+ ],
1752
+ "additionalProperties": false
1753
+ },
1754
+ "SubscriptionError": {
1755
+ "type": "object",
1756
+ "properties": {
1757
+ "subscriptionId": {
1758
+ "type": "string",
1759
+ "minLength": 1
1760
+ },
1761
+ "code": {
1762
+ "type": "string",
1763
+ "minLength": 1
1764
+ },
1765
+ "lastAvailableSeq": {
1766
+ "type": "integer",
1767
+ "minimum": 0
1768
+ }
1769
+ },
1770
+ "required": [
1771
+ "subscriptionId",
1772
+ "code",
1773
+ "lastAvailableSeq"
1774
+ ],
1775
+ "additionalProperties": false
1776
+ },
1777
+ "HxContextReference": {
1778
+ "oneOf": [
1779
+ {
1780
+ "type": "object",
1781
+ "properties": {
1782
+ "type": {
1783
+ "const": "workspace-file"
1784
+ },
1785
+ "resourceKey": {
1786
+ "type": "string",
1787
+ "minLength": 1
1788
+ },
1789
+ "expectedRevision": {
1790
+ "type": "string",
1791
+ "minLength": 1
1792
+ }
1793
+ },
1794
+ "required": [
1795
+ "type",
1796
+ "resourceKey"
1797
+ ],
1798
+ "additionalProperties": false
1799
+ },
1800
+ {
1801
+ "type": "object",
1802
+ "properties": {
1803
+ "type": {
1804
+ "const": "workspace-selection"
1805
+ },
1806
+ "resourceKey": {
1807
+ "type": "string",
1808
+ "minLength": 1
1809
+ },
1810
+ "selectedText": {
1811
+ "type": "string",
1812
+ "minLength": 1
1813
+ },
1814
+ "startLine": {
1815
+ "type": "integer",
1816
+ "minimum": 1
1817
+ },
1818
+ "endLine": {
1819
+ "type": "integer",
1820
+ "minimum": 1
1821
+ },
1822
+ "expectedRevision": {
1823
+ "type": "string",
1824
+ "minLength": 1
1825
+ }
1826
+ },
1827
+ "required": [
1828
+ "type",
1829
+ "resourceKey",
1830
+ "selectedText"
1831
+ ],
1832
+ "additionalProperties": false
1833
+ },
1834
+ {
1835
+ "type": "object",
1836
+ "properties": {
1837
+ "type": {
1838
+ "const": "uploaded-file"
1839
+ },
1840
+ "blobRef": {
1841
+ "type": "string",
1842
+ "minLength": 1
1843
+ },
1844
+ "displayName": {
1845
+ "type": "string",
1846
+ "minLength": 1
1847
+ },
1848
+ "mimeType": {
1849
+ "type": "string",
1850
+ "minLength": 1
1851
+ },
1852
+ "sizeBytes": {
1853
+ "type": "integer",
1854
+ "minimum": 0
1855
+ }
1856
+ },
1857
+ "required": [
1858
+ "type",
1859
+ "blobRef",
1860
+ "displayName"
1861
+ ],
1862
+ "additionalProperties": false
1863
+ }
1864
+ ]
1865
+ },
1866
+ "HxHarnessChangedParams": {
1867
+ "type": "object",
1868
+ "properties": {
1869
+ "projectId": {
1870
+ "type": "string",
1871
+ "minLength": 1
1872
+ },
1873
+ "revision": {
1874
+ "type": "integer",
1875
+ "minimum": 1
1876
+ }
1877
+ },
1878
+ "required": [
1879
+ "projectId",
1880
+ "revision"
1881
+ ],
1882
+ "additionalProperties": false
1883
+ },
1884
+ "HxHarnessChangedNotification": {
1885
+ "type": "object",
1886
+ "properties": {
1887
+ "jsonrpc": {
1888
+ "const": "2.0"
1889
+ },
1890
+ "method": {
1891
+ "const": "hx.harness.changed"
1892
+ },
1893
+ "params": {
1894
+ "$ref": "#/$defs/HxHarnessChangedParams"
1895
+ }
1896
+ },
1897
+ "required": [
1898
+ "jsonrpc",
1899
+ "method",
1900
+ "params"
1901
+ ],
1902
+ "additionalProperties": false
1903
+ },
1904
+ "HxServerNotification": {
1905
+ "oneOf": [
1906
+ {
1907
+ "$ref": "#/$defs/HxNotification"
1908
+ },
1909
+ {
1910
+ "$ref": "#/$defs/HxHarnessChangedNotification"
1911
+ },
1912
+ {
1913
+ "$ref": "#/$defs/HxCatalogChangedNotification"
1914
+ }
1915
+ ]
1916
+ },
1917
+ "HostCapabilities": {
1918
+ "type": "object",
1919
+ "properties": {
1920
+ "queue": {
1921
+ "type": "boolean"
1922
+ },
1923
+ "worktree": {
1924
+ "type": "boolean"
1925
+ },
1926
+ "harnessSwitch": {
1927
+ "type": "boolean"
1928
+ },
1929
+ "managed": {
1930
+ "type": "boolean"
1931
+ },
1932
+ "subagents": {
1933
+ "type": "boolean"
1934
+ }
1935
+ },
1936
+ "required": [
1937
+ "queue",
1938
+ "worktree",
1939
+ "harnessSwitch",
1940
+ "managed"
1941
+ ],
1942
+ "additionalProperties": false
1943
+ },
1944
+ "WorkspaceRequest": {
1945
+ "oneOf": [
1946
+ {
1947
+ "type": "object",
1948
+ "properties": {
1949
+ "kind": {
1950
+ "const": "project"
1951
+ }
1952
+ },
1953
+ "required": [
1954
+ "kind"
1955
+ ],
1956
+ "additionalProperties": false
1957
+ },
1958
+ {
1959
+ "type": "object",
1960
+ "properties": {
1961
+ "kind": {
1962
+ "const": "worktree"
1963
+ },
1964
+ "name": {
1965
+ "type": "string",
1966
+ "minLength": 1
1967
+ },
1968
+ "baseRef": {
1969
+ "type": "string",
1970
+ "minLength": 1
1971
+ },
1972
+ "worktreeId": {
1973
+ "type": "string",
1974
+ "minLength": 1
1975
+ }
1976
+ },
1977
+ "required": [
1978
+ "kind"
1979
+ ],
1980
+ "additionalProperties": false
1981
+ }
1982
+ ]
1983
+ },
1984
+ "PublicWorkspace": {
1985
+ "type": "object",
1986
+ "properties": {
1987
+ "kind": {
1988
+ "enum": [
1989
+ "project",
1990
+ "worktree"
1991
+ ]
1992
+ },
1993
+ "worktreeId": {
1994
+ "type": "string",
1995
+ "minLength": 1
1996
+ },
1997
+ "name": {
1998
+ "type": "string",
1999
+ "minLength": 1
2000
+ },
2001
+ "branch": {
2002
+ "type": "string",
2003
+ "minLength": 1
2004
+ }
2005
+ },
2006
+ "required": [
2007
+ "kind"
2008
+ ],
2009
+ "additionalProperties": false
2010
+ },
2011
+ "HxQueueItem": {
2012
+ "type": "object",
2013
+ "properties": {
2014
+ "id": {
2015
+ "type": "string",
2016
+ "minLength": 1
2017
+ },
2018
+ "turnId": {
2019
+ "type": "string",
2020
+ "minLength": 1
2021
+ },
2022
+ "state": {
2023
+ "enum": [
2024
+ "queued",
2025
+ "dispatching",
2026
+ "running",
2027
+ "completed",
2028
+ "failed",
2029
+ "unknown",
2030
+ "cancelled"
2031
+ ]
2032
+ },
2033
+ "input": {
2034
+ "type": "array",
2035
+ "items": {
2036
+ "$ref": "urn:anureo:ahp:v1#/$defs/InputBlock"
2037
+ }
2038
+ },
2039
+ "references": {
2040
+ "type": "array",
2041
+ "items": {
2042
+ "$ref": "#/$defs/HxContextReference"
2043
+ }
2044
+ },
2045
+ "createdAt": {
2046
+ "type": "integer",
2047
+ "minimum": 0
2048
+ },
2049
+ "updatedAt": {
2050
+ "type": "integer",
2051
+ "minimum": 0
2052
+ },
2053
+ "operationId": {
2054
+ "type": "string",
2055
+ "minLength": 1
2056
+ },
2057
+ "error": {
2058
+ "$ref": "urn:anureo:ahp:v1#/$defs/HarnessError"
2059
+ },
2060
+ "bindingGeneration": {
2061
+ "type": "integer",
2062
+ "minimum": 0
2063
+ }
2064
+ },
2065
+ "required": [
2066
+ "id",
2067
+ "turnId",
2068
+ "state",
2069
+ "input",
2070
+ "createdAt",
2071
+ "updatedAt",
2072
+ "bindingGeneration"
2073
+ ],
2074
+ "additionalProperties": false
2075
+ },
2076
+ "HxQueueState": {
2077
+ "type": "object",
2078
+ "properties": {
2079
+ "revision": {
2080
+ "type": "integer",
2081
+ "minimum": 0
2082
+ },
2083
+ "paused": {
2084
+ "type": "boolean"
2085
+ },
2086
+ "items": {
2087
+ "type": "array",
2088
+ "items": {
2089
+ "$ref": "#/$defs/HxQueueItem"
2090
+ }
2091
+ }
2092
+ },
2093
+ "required": [
2094
+ "revision",
2095
+ "paused",
2096
+ "items"
2097
+ ],
2098
+ "additionalProperties": false
2099
+ },
2100
+ "HxQueueGetParams": {
2101
+ "type": "object",
2102
+ "properties": {
2103
+ "sessionId": {
2104
+ "type": "string",
2105
+ "minLength": 1
2106
+ },
2107
+ "projectId": {
2108
+ "type": "string",
2109
+ "minLength": 1
2110
+ }
2111
+ },
2112
+ "required": [
2113
+ "sessionId"
2114
+ ],
2115
+ "additionalProperties": false
2116
+ },
2117
+ "HxQueueGetResult": {
2118
+ "$ref": "#/$defs/HxQueueState"
2119
+ },
2120
+ "HxQueueEnqueueParams": {
2121
+ "type": "object",
2122
+ "properties": {
2123
+ "sessionId": {
2124
+ "type": "string",
2125
+ "minLength": 1
2126
+ },
2127
+ "projectId": {
2128
+ "type": "string",
2129
+ "minLength": 1
2130
+ },
2131
+ "idempotencyKey": {
2132
+ "type": "string",
2133
+ "minLength": 1
2134
+ },
2135
+ "expectedQueueRevision": {
2136
+ "type": "integer",
2137
+ "minimum": 0
2138
+ },
2139
+ "input": {
2140
+ "type": "array",
2141
+ "items": {
2142
+ "$ref": "urn:anureo:ahp:v1#/$defs/InputBlock"
2143
+ }
2144
+ },
2145
+ "references": {
2146
+ "type": "array",
2147
+ "maxItems": 8,
2148
+ "items": {
2149
+ "$ref": "#/$defs/HxContextReference"
2150
+ }
2151
+ },
2152
+ "overrides": {
2153
+ "$ref": "urn:anureo:ahp:v1#/$defs/JsonObject"
2154
+ },
2155
+ "outputSchema": {
2156
+ "$ref": "urn:anureo:ahp:v1#/$defs/JsonSchema"
2157
+ }
2158
+ },
2159
+ "required": [
2160
+ "sessionId",
2161
+ "idempotencyKey",
2162
+ "expectedQueueRevision",
2163
+ "input"
2164
+ ],
2165
+ "additionalProperties": false
2166
+ },
2167
+ "HxQueueEnqueueResult": {
2168
+ "$ref": "#/$defs/OperationResult"
2169
+ },
2170
+ "HxQueueUpdateParams": {
2171
+ "type": "object",
2172
+ "properties": {
2173
+ "sessionId": {
2174
+ "type": "string",
2175
+ "minLength": 1
2176
+ },
2177
+ "projectId": {
2178
+ "type": "string",
2179
+ "minLength": 1
2180
+ },
2181
+ "idempotencyKey": {
2182
+ "type": "string",
2183
+ "minLength": 1
2184
+ },
2185
+ "expectedQueueRevision": {
2186
+ "type": "integer",
2187
+ "minimum": 0
2188
+ },
2189
+ "input": {
2190
+ "type": "array",
2191
+ "items": {
2192
+ "$ref": "urn:anureo:ahp:v1#/$defs/InputBlock"
2193
+ }
2194
+ },
2195
+ "references": {
2196
+ "type": "array",
2197
+ "maxItems": 8,
2198
+ "items": {
2199
+ "$ref": "#/$defs/HxContextReference"
2200
+ }
2201
+ },
2202
+ "overrides": {
2203
+ "$ref": "urn:anureo:ahp:v1#/$defs/JsonObject"
2204
+ },
2205
+ "outputSchema": {
2206
+ "$ref": "urn:anureo:ahp:v1#/$defs/JsonSchema"
2207
+ },
2208
+ "itemId": {
2209
+ "type": "string",
2210
+ "minLength": 1
2211
+ }
2212
+ },
2213
+ "required": [
2214
+ "sessionId",
2215
+ "idempotencyKey",
2216
+ "expectedQueueRevision",
2217
+ "input",
2218
+ "itemId"
2219
+ ],
2220
+ "additionalProperties": false
2221
+ },
2222
+ "HxQueueUpdateResult": {
2223
+ "$ref": "#/$defs/OperationResult"
2224
+ },
2225
+ "HxQueueRemoveParams": {
2226
+ "type": "object",
2227
+ "properties": {
2228
+ "sessionId": {
2229
+ "type": "string",
2230
+ "minLength": 1
2231
+ },
2232
+ "projectId": {
2233
+ "type": "string",
2234
+ "minLength": 1
2235
+ },
2236
+ "idempotencyKey": {
2237
+ "type": "string",
2238
+ "minLength": 1
2239
+ },
2240
+ "expectedQueueRevision": {
2241
+ "type": "integer",
2242
+ "minimum": 0
2243
+ },
2244
+ "itemId": {
2245
+ "type": "string",
2246
+ "minLength": 1
2247
+ }
2248
+ },
2249
+ "required": [
2250
+ "sessionId",
2251
+ "idempotencyKey",
2252
+ "expectedQueueRevision",
2253
+ "itemId"
2254
+ ],
2255
+ "additionalProperties": false
2256
+ },
2257
+ "HxQueueRemoveResult": {
2258
+ "$ref": "#/$defs/OperationResult"
2259
+ },
2260
+ "HxQueueReorderParams": {
2261
+ "type": "object",
2262
+ "properties": {
2263
+ "sessionId": {
2264
+ "type": "string",
2265
+ "minLength": 1
2266
+ },
2267
+ "projectId": {
2268
+ "type": "string",
2269
+ "minLength": 1
2270
+ },
2271
+ "idempotencyKey": {
2272
+ "type": "string",
2273
+ "minLength": 1
2274
+ },
2275
+ "expectedQueueRevision": {
2276
+ "type": "integer",
2277
+ "minimum": 0
2278
+ },
2279
+ "itemIds": {
2280
+ "type": "array",
2281
+ "uniqueItems": true,
2282
+ "items": {
2283
+ "type": "string",
2284
+ "minLength": 1
2285
+ }
2286
+ }
2287
+ },
2288
+ "required": [
2289
+ "sessionId",
2290
+ "idempotencyKey",
2291
+ "expectedQueueRevision",
2292
+ "itemIds"
2293
+ ],
2294
+ "additionalProperties": false
2295
+ },
2296
+ "HxQueueReorderResult": {
2297
+ "$ref": "#/$defs/OperationResult"
2298
+ },
2299
+ "HxQueueClearParams": {
2300
+ "type": "object",
2301
+ "properties": {
2302
+ "sessionId": {
2303
+ "type": "string",
2304
+ "minLength": 1
2305
+ },
2306
+ "projectId": {
2307
+ "type": "string",
2308
+ "minLength": 1
2309
+ },
2310
+ "idempotencyKey": {
2311
+ "type": "string",
2312
+ "minLength": 1
2313
+ },
2314
+ "expectedQueueRevision": {
2315
+ "type": "integer",
2316
+ "minimum": 0
2317
+ }
2318
+ },
2319
+ "required": [
2320
+ "sessionId",
2321
+ "idempotencyKey",
2322
+ "expectedQueueRevision"
2323
+ ],
2324
+ "additionalProperties": false
2325
+ },
2326
+ "HxQueueClearResult": {
2327
+ "$ref": "#/$defs/OperationResult"
2328
+ },
2329
+ "HxQueuePauseParams": {
2330
+ "type": "object",
2331
+ "properties": {
2332
+ "sessionId": {
2333
+ "type": "string",
2334
+ "minLength": 1
2335
+ },
2336
+ "projectId": {
2337
+ "type": "string",
2338
+ "minLength": 1
2339
+ },
2340
+ "idempotencyKey": {
2341
+ "type": "string",
2342
+ "minLength": 1
2343
+ },
2344
+ "expectedQueueRevision": {
2345
+ "type": "integer",
2346
+ "minimum": 0
2347
+ }
2348
+ },
2349
+ "required": [
2350
+ "sessionId",
2351
+ "idempotencyKey",
2352
+ "expectedQueueRevision"
2353
+ ],
2354
+ "additionalProperties": false
2355
+ },
2356
+ "HxQueuePauseResult": {
2357
+ "$ref": "#/$defs/OperationResult"
2358
+ },
2359
+ "HxQueueResumeParams": {
2360
+ "type": "object",
2361
+ "properties": {
2362
+ "sessionId": {
2363
+ "type": "string",
2364
+ "minLength": 1
2365
+ },
2366
+ "projectId": {
2367
+ "type": "string",
2368
+ "minLength": 1
2369
+ },
2370
+ "idempotencyKey": {
2371
+ "type": "string",
2372
+ "minLength": 1
2373
+ },
2374
+ "expectedQueueRevision": {
2375
+ "type": "integer",
2376
+ "minimum": 0
2377
+ }
2378
+ },
2379
+ "required": [
2380
+ "sessionId",
2381
+ "idempotencyKey",
2382
+ "expectedQueueRevision"
2383
+ ],
2384
+ "additionalProperties": false
2385
+ },
2386
+ "HxQueueResumeResult": {
2387
+ "$ref": "#/$defs/OperationResult"
2388
+ },
2389
+ "HxQueueRunParams": {
2390
+ "type": "object",
2391
+ "properties": {
2392
+ "sessionId": {
2393
+ "type": "string",
2394
+ "minLength": 1
2395
+ },
2396
+ "projectId": {
2397
+ "type": "string",
2398
+ "minLength": 1
2399
+ },
2400
+ "idempotencyKey": {
2401
+ "type": "string",
2402
+ "minLength": 1
2403
+ },
2404
+ "expectedQueueRevision": {
2405
+ "type": "integer",
2406
+ "minimum": 0
2407
+ },
2408
+ "itemId": {
2409
+ "type": "string",
2410
+ "minLength": 1
2411
+ }
2412
+ },
2413
+ "required": [
2414
+ "sessionId",
2415
+ "idempotencyKey",
2416
+ "expectedQueueRevision",
2417
+ "itemId"
2418
+ ],
2419
+ "additionalProperties": false
2420
+ },
2421
+ "HxQueueRunResult": {
2422
+ "$ref": "#/$defs/OperationResult"
2423
+ },
2424
+ "HxQueueSteerParams": {
2425
+ "type": "object",
2426
+ "properties": {
2427
+ "sessionId": {
2428
+ "type": "string",
2429
+ "minLength": 1
2430
+ },
2431
+ "projectId": {
2432
+ "type": "string",
2433
+ "minLength": 1
2434
+ },
2435
+ "idempotencyKey": {
2436
+ "type": "string",
2437
+ "minLength": 1
2438
+ },
2439
+ "expectedQueueRevision": {
2440
+ "type": "integer",
2441
+ "minimum": 0
2442
+ },
2443
+ "itemId": {
2444
+ "type": "string",
2445
+ "minLength": 1
2446
+ },
2447
+ "expectedTurnId": {
2448
+ "type": "string",
2449
+ "minLength": 1
2450
+ }
2451
+ },
2452
+ "required": [
2453
+ "sessionId",
2454
+ "idempotencyKey",
2455
+ "expectedQueueRevision",
2456
+ "itemId",
2457
+ "expectedTurnId"
2458
+ ],
2459
+ "additionalProperties": false
2460
+ },
2461
+ "HxQueueSteerResult": {
2462
+ "$ref": "#/$defs/OperationResult"
2463
+ },
2464
+ "HxQueueRetryParams": {
2465
+ "type": "object",
2466
+ "properties": {
2467
+ "sessionId": {
2468
+ "type": "string",
2469
+ "minLength": 1
2470
+ },
2471
+ "projectId": {
2472
+ "type": "string",
2473
+ "minLength": 1
2474
+ },
2475
+ "idempotencyKey": {
2476
+ "type": "string",
2477
+ "minLength": 1
2478
+ },
2479
+ "expectedQueueRevision": {
2480
+ "type": "integer",
2481
+ "minimum": 0
2482
+ },
2483
+ "itemId": {
2484
+ "type": "string",
2485
+ "minLength": 1
2486
+ }
2487
+ },
2488
+ "required": [
2489
+ "sessionId",
2490
+ "idempotencyKey",
2491
+ "expectedQueueRevision",
2492
+ "itemId"
2493
+ ],
2494
+ "additionalProperties": false
2495
+ },
2496
+ "HxQueueRetryResult": {
2497
+ "$ref": "#/$defs/OperationResult"
2498
+ },
2499
+ "HxSessionHarnessSetParams": {
2500
+ "type": "object",
2501
+ "properties": {
2502
+ "sessionId": {
2503
+ "type": "string",
2504
+ "minLength": 1
2505
+ },
2506
+ "projectId": {
2507
+ "type": "string",
2508
+ "minLength": 1
2509
+ },
2510
+ "idempotencyKey": {
2511
+ "type": "string",
2512
+ "minLength": 1
2513
+ },
2514
+ "expectedRevision": {
2515
+ "type": "integer",
2516
+ "minimum": 0
2517
+ },
2518
+ "runtimeConfigId": {
2519
+ "type": "string",
2520
+ "minLength": 1
2521
+ },
2522
+ "model": {
2523
+ "type": "string",
2524
+ "minLength": 1
2525
+ }
2526
+ },
2527
+ "required": [
2528
+ "sessionId",
2529
+ "runtimeConfigId",
2530
+ "idempotencyKey",
2531
+ "expectedRevision"
2532
+ ],
2533
+ "additionalProperties": false
2534
+ },
2535
+ "HxSessionHarnessSetResult": {
2536
+ "$ref": "#/$defs/OperationResult"
2537
+ },
2538
+ "HxWorkspaceGetParams": {
2539
+ "type": "object",
2540
+ "properties": {
2541
+ "sessionId": {
2542
+ "type": "string",
2543
+ "minLength": 1
2544
+ },
2545
+ "projectId": {
2546
+ "type": "string",
2547
+ "minLength": 1
2548
+ }
2549
+ },
2550
+ "required": [
2551
+ "sessionId"
2552
+ ],
2553
+ "additionalProperties": false
2554
+ },
2555
+ "HxWorkspaceGetResult": {
2556
+ "$ref": "#/$defs/PublicWorkspace"
2557
+ },
2558
+ "HxWorkspaceIntegrateParams": {
2559
+ "type": "object",
2560
+ "properties": {
2561
+ "sessionId": {
2562
+ "type": "string",
2563
+ "minLength": 1
2564
+ },
2565
+ "projectId": {
2566
+ "type": "string",
2567
+ "minLength": 1
2568
+ },
2569
+ "idempotencyKey": {
2570
+ "type": "string",
2571
+ "minLength": 1
2572
+ },
2573
+ "expectedRevision": {
2574
+ "type": "integer",
2575
+ "minimum": 0
2576
+ },
2577
+ "force": {
2578
+ "type": "boolean"
2579
+ },
2580
+ "mode": {
2581
+ "enum": [
2582
+ "merge",
2583
+ "patch"
2584
+ ]
2585
+ },
2586
+ "message": {
2587
+ "type": "string",
2588
+ "minLength": 1
2589
+ }
2590
+ },
2591
+ "required": [
2592
+ "sessionId",
2593
+ "idempotencyKey",
2594
+ "expectedRevision",
2595
+ "mode"
2596
+ ],
2597
+ "additionalProperties": false
2598
+ },
2599
+ "HxWorkspaceIntegrateResult": {
2600
+ "$ref": "#/$defs/OperationResult"
2601
+ },
2602
+ "HxWorkspaceDiscardParams": {
2603
+ "type": "object",
2604
+ "properties": {
2605
+ "sessionId": {
2606
+ "type": "string",
2607
+ "minLength": 1
2608
+ },
2609
+ "projectId": {
2610
+ "type": "string",
2611
+ "minLength": 1
2612
+ },
2613
+ "idempotencyKey": {
2614
+ "type": "string",
2615
+ "minLength": 1
2616
+ },
2617
+ "expectedRevision": {
2618
+ "type": "integer",
2619
+ "minimum": 0
2620
+ },
2621
+ "force": {
2622
+ "type": "boolean"
2623
+ }
2624
+ },
2625
+ "required": [
2626
+ "sessionId",
2627
+ "idempotencyKey",
2628
+ "expectedRevision"
2629
+ ],
2630
+ "additionalProperties": false
2631
+ },
2632
+ "HxWorkspaceDiscardResult": {
2633
+ "$ref": "#/$defs/OperationResult"
2634
+ },
2635
+ "HxUsageEntry": {
2636
+ "type": "object",
2637
+ "properties": {
2638
+ "sessionId": {
2639
+ "type": "string",
2640
+ "minLength": 1
2641
+ },
2642
+ "agentId": {
2643
+ "type": "string",
2644
+ "minLength": 1
2645
+ },
2646
+ "usage": {
2647
+ "oneOf": [
2648
+ {
2649
+ "$ref": "urn:anureo:ahp:v1#/$defs/Usage"
2650
+ },
2651
+ {
2652
+ "type": "null"
2653
+ }
2654
+ ]
2655
+ }
2656
+ },
2657
+ "required": [
2658
+ "sessionId",
2659
+ "usage"
2660
+ ],
2661
+ "additionalProperties": false
2662
+ },
2663
+ "HxUsageGetParams": {
2664
+ "type": "object",
2665
+ "properties": {
2666
+ "projectId": {
2667
+ "type": "string",
2668
+ "minLength": 1
2669
+ },
2670
+ "agentId": {
2671
+ "type": "string",
2672
+ "minLength": 1
2673
+ },
2674
+ "includeArchived": {
2675
+ "type": "boolean"
2676
+ }
2677
+ },
2678
+ "required": [
2679
+ "projectId"
2680
+ ],
2681
+ "additionalProperties": false
2682
+ },
2683
+ "HxUsageGetResult": {
2684
+ "type": "object",
2685
+ "properties": {
2686
+ "sessions": {
2687
+ "type": "array",
2688
+ "items": {
2689
+ "$ref": "#/$defs/HxUsageEntry"
2690
+ }
2691
+ },
2692
+ "totals": {
2693
+ "type": "object",
2694
+ "properties": {
2695
+ "input": {
2696
+ "oneOf": [
2697
+ {
2698
+ "type": "number",
2699
+ "minimum": 0
2700
+ },
2701
+ {
2702
+ "type": "null"
2703
+ }
2704
+ ]
2705
+ },
2706
+ "output": {
2707
+ "oneOf": [
2708
+ {
2709
+ "type": "number",
2710
+ "minimum": 0
2711
+ },
2712
+ {
2713
+ "type": "null"
2714
+ }
2715
+ ]
2716
+ },
2717
+ "total": {
2718
+ "oneOf": [
2719
+ {
2720
+ "type": "number",
2721
+ "minimum": 0
2722
+ },
2723
+ {
2724
+ "type": "null"
2725
+ }
2726
+ ]
2727
+ }
2728
+ },
2729
+ "required": [
2730
+ "input",
2731
+ "output",
2732
+ "total"
2733
+ ],
2734
+ "additionalProperties": false
2735
+ }
2736
+ },
2737
+ "required": [
2738
+ "sessions",
2739
+ "totals"
2740
+ ],
2741
+ "additionalProperties": false
2742
+ },
2743
+ "HxTranscriptReadParams": {
2744
+ "type": "object",
2745
+ "properties": {
2746
+ "sessionId": {
2747
+ "type": "string",
2748
+ "minLength": 1
2749
+ },
2750
+ "projectId": {
2751
+ "type": "string",
2752
+ "minLength": 1
2753
+ }
2754
+ },
2755
+ "required": [
2756
+ "sessionId"
2757
+ ],
2758
+ "additionalProperties": false
2759
+ },
2760
+ "HxTranscriptReadResult": {
2761
+ "type": "object",
2762
+ "properties": {
2763
+ "inherited": {
2764
+ "type": "array",
2765
+ "items": {
2766
+ "$ref": "#/$defs/HostEvent"
2767
+ }
2768
+ }
2769
+ },
2770
+ "required": [
2771
+ "inherited"
2772
+ ],
2773
+ "additionalProperties": false
2774
+ },
2775
+ "CatalogCache": {
2776
+ "type": "object",
2777
+ "properties": {
2778
+ "state": {
2779
+ "enum": [
2780
+ "empty",
2781
+ "fresh",
2782
+ "stale"
2783
+ ]
2784
+ },
2785
+ "lastSuccessAt": {
2786
+ "anyOf": [
2787
+ {
2788
+ "type": "integer",
2789
+ "minimum": 0
2790
+ },
2791
+ {
2792
+ "type": "null"
2793
+ }
2794
+ ]
2795
+ },
2796
+ "freshUntil": {
2797
+ "anyOf": [
2798
+ {
2799
+ "type": "integer",
2800
+ "minimum": 0
2801
+ },
2802
+ {
2803
+ "type": "null"
2804
+ }
2805
+ ]
2806
+ },
2807
+ "refreshing": {
2808
+ "type": "boolean"
2809
+ },
2810
+ "lastErrorCode": {
2811
+ "type": "string",
2812
+ "minLength": 1
2813
+ },
2814
+ "nextRetryAt": {
2815
+ "type": "integer",
2816
+ "minimum": 0
2817
+ }
2818
+ },
2819
+ "required": [
2820
+ "state",
2821
+ "lastSuccessAt",
2822
+ "freshUntil",
2823
+ "refreshing"
2824
+ ],
2825
+ "additionalProperties": false
2826
+ },
2827
+ "CatalogRuntime": {
2828
+ "type": "object",
2829
+ "properties": {
2830
+ "runtimeConfigId": {
2831
+ "type": "string",
2832
+ "minLength": 1
2833
+ },
2834
+ "adapterId": {
2835
+ "type": "string",
2836
+ "minLength": 1
2837
+ },
2838
+ "available": {
2839
+ "type": "boolean"
2840
+ },
2841
+ "reason": {
2842
+ "type": "string",
2843
+ "minLength": 1
2844
+ },
2845
+ "capabilities": {
2846
+ "$ref": "urn:anureo:ahp:v1#/$defs/Capabilities"
2847
+ },
2848
+ "version": {
2849
+ "type": "string",
2850
+ "minLength": 1
2851
+ },
2852
+ "providerId": {
2853
+ "type": "string",
2854
+ "minLength": 1
2855
+ },
2856
+ "name": {
2857
+ "type": "string",
2858
+ "minLength": 1
2859
+ },
2860
+ "authStatus": {
2861
+ "enum": [
2862
+ "unknown",
2863
+ "required",
2864
+ "ready"
2865
+ ]
2866
+ },
2867
+ "readiness": {
2868
+ "enum": [
2869
+ "preparing",
2870
+ "ready",
2871
+ "unavailable"
2872
+ ]
2873
+ },
2874
+ "models": {
2875
+ "type": "array",
2876
+ "items": {
2877
+ "type": "object",
2878
+ "properties": {
2879
+ "id": {
2880
+ "type": "string",
2881
+ "minLength": 1
2882
+ },
2883
+ "name": {
2884
+ "type": "string",
2885
+ "minLength": 1
2886
+ },
2887
+ "isDefault": {
2888
+ "type": "boolean",
2889
+ "description": "The runtime's default model (resolved from a native default alias)."
2890
+ },
2891
+ "group": {
2892
+ "type": "string",
2893
+ "enum": [
2894
+ "primary",
2895
+ "more"
2896
+ ],
2897
+ "description": "primary: newest model per family; more: older or extra models."
2898
+ },
2899
+ "effortLevels": {
2900
+ "type": "array",
2901
+ "items": {
2902
+ "type": "string",
2903
+ "minLength": 1
2904
+ },
2905
+ "description": "Reasoning effort levels this model accepts; empty when it takes no effort setting. Absent when unknown."
2906
+ },
2907
+ "defaultEffort": {
2908
+ "type": "string",
2909
+ "minLength": 1,
2910
+ "description": "Effort the model uses when the session sets none."
2911
+ },
2912
+ "supportsFast": {
2913
+ "type": "boolean",
2914
+ "description": "The model accepts the fast (priority) service tier."
2915
+ }
2916
+ },
2917
+ "required": [
2918
+ "id",
2919
+ "name"
2920
+ ],
2921
+ "additionalProperties": false
2922
+ }
2923
+ },
2924
+ "cache": {
2925
+ "$ref": "#/$defs/CatalogCache"
2926
+ }
2927
+ },
2928
+ "required": [
2929
+ "runtimeConfigId",
2930
+ "adapterId",
2931
+ "available",
2932
+ "readiness",
2933
+ "cache"
2934
+ ],
2935
+ "additionalProperties": false
2936
+ },
2937
+ "HxCatalogGetParams": {
2938
+ "type": "object",
2939
+ "properties": {
2940
+ "projectId": {
2941
+ "type": "string",
2942
+ "minLength": 1
2943
+ },
2944
+ "runtimeConfigId": {
2945
+ "type": "string",
2946
+ "minLength": 1
2947
+ }
2948
+ },
2949
+ "required": [
2950
+ "projectId"
2951
+ ],
2952
+ "additionalProperties": false
2953
+ },
2954
+ "HxCatalogGetResult": {
2955
+ "type": "object",
2956
+ "properties": {
2957
+ "epoch": {
2958
+ "type": "string",
2959
+ "minLength": 1
2960
+ },
2961
+ "revision": {
2962
+ "type": "integer",
2963
+ "minimum": 0
2964
+ },
2965
+ "runtimes": {
2966
+ "type": "array",
2967
+ "items": {
2968
+ "$ref": "#/$defs/CatalogRuntime"
2969
+ }
2970
+ }
2971
+ },
2972
+ "required": [
2973
+ "epoch",
2974
+ "revision",
2975
+ "runtimes"
2976
+ ],
2977
+ "additionalProperties": false
2978
+ },
2979
+ "HxCatalogRefreshParams": {
2980
+ "type": "object",
2981
+ "properties": {
2982
+ "projectId": {
2983
+ "type": "string",
2984
+ "minLength": 1
2985
+ },
2986
+ "runtimeConfigId": {
2987
+ "type": "string",
2988
+ "minLength": 1
2989
+ }
2990
+ },
2991
+ "required": [
2992
+ "projectId",
2993
+ "runtimeConfigId"
2994
+ ],
2995
+ "additionalProperties": false
2996
+ },
2997
+ "HxCatalogRefreshResult": {
2998
+ "type": "object",
2999
+ "properties": {
3000
+ "accepted": {
3001
+ "type": "boolean"
3002
+ },
3003
+ "coalesced": {
3004
+ "type": "boolean"
3005
+ },
3006
+ "refreshId": {
3007
+ "type": "string",
3008
+ "minLength": 1
3009
+ }
3010
+ },
3011
+ "required": [
3012
+ "accepted",
3013
+ "coalesced",
3014
+ "refreshId"
3015
+ ],
3016
+ "additionalProperties": false
3017
+ },
3018
+ "HxCatalogChangedParams": {
3019
+ "type": "object",
3020
+ "properties": {
3021
+ "projectId": {
3022
+ "type": "string",
3023
+ "minLength": 1
3024
+ },
3025
+ "epoch": {
3026
+ "type": "string",
3027
+ "minLength": 1
3028
+ },
3029
+ "revision": {
3030
+ "type": "integer",
3031
+ "minimum": 0
3032
+ },
3033
+ "runtimeConfigIds": {
3034
+ "type": "array",
3035
+ "items": {
3036
+ "type": "string",
3037
+ "minLength": 1
3038
+ }
3039
+ },
3040
+ "changes": {
3041
+ "type": "array",
3042
+ "items": {
3043
+ "enum": [
3044
+ "runtime",
3045
+ "models",
3046
+ "auth",
3047
+ "refresh"
3048
+ ]
3049
+ }
3050
+ }
3051
+ },
3052
+ "required": [
3053
+ "projectId",
3054
+ "epoch",
3055
+ "revision",
3056
+ "runtimeConfigIds",
3057
+ "changes"
3058
+ ],
3059
+ "additionalProperties": false
3060
+ },
3061
+ "HxCatalogChangedNotification": {
3062
+ "type": "object",
3063
+ "properties": {
3064
+ "jsonrpc": {
3065
+ "const": "2.0"
3066
+ },
3067
+ "method": {
3068
+ "const": "hx.catalog.changed"
3069
+ },
3070
+ "params": {
3071
+ "$ref": "#/$defs/HxCatalogChangedParams"
3072
+ }
3073
+ },
3074
+ "required": [
3075
+ "jsonrpc",
3076
+ "method",
3077
+ "params"
3078
+ ],
3079
+ "additionalProperties": false
3080
+ },
3081
+ "HxSubagent": {
3082
+ "type": "object",
3083
+ "properties": {
3084
+ "sessionId": {
3085
+ "type": "string",
3086
+ "minLength": 1
3087
+ },
3088
+ "parentSessionId": {
3089
+ "type": "string",
3090
+ "minLength": 1
3091
+ },
3092
+ "parentTurnId": {
3093
+ "type": "string",
3094
+ "minLength": 1
3095
+ },
3096
+ "name": {
3097
+ "type": "string"
3098
+ },
3099
+ "task": {
3100
+ "type": "string"
3101
+ },
3102
+ "status": {
3103
+ "enum": [
3104
+ "running",
3105
+ "completed",
3106
+ "failed",
3107
+ "interrupted",
3108
+ "disconnected"
3109
+ ]
3110
+ },
3111
+ "canOpen": {
3112
+ "type": "boolean"
3113
+ },
3114
+ "createdAt": {
3115
+ "type": "number"
3116
+ },
3117
+ "updatedAt": {
3118
+ "type": "number"
3119
+ }
3120
+ },
3121
+ "required": [
3122
+ "sessionId",
3123
+ "parentSessionId",
3124
+ "name",
3125
+ "status",
3126
+ "canOpen",
3127
+ "createdAt",
3128
+ "updatedAt"
3129
+ ],
3130
+ "additionalProperties": false
3131
+ },
3132
+ "HxSubagentsListParams": {
3133
+ "type": "object",
3134
+ "properties": {
3135
+ "sessionId": {
3136
+ "type": "string",
3137
+ "minLength": 1
3138
+ },
3139
+ "projectId": {
3140
+ "type": "string",
3141
+ "minLength": 1
3142
+ }
3143
+ },
3144
+ "required": [
3145
+ "sessionId"
3146
+ ],
3147
+ "additionalProperties": false
3148
+ },
3149
+ "HxSubagentsListResult": {
3150
+ "type": "object",
3151
+ "properties": {
3152
+ "subagents": {
3153
+ "type": "array",
3154
+ "items": {
3155
+ "$ref": "#/$defs/HxSubagent"
3156
+ }
3157
+ }
3158
+ },
3159
+ "required": [
3160
+ "subagents"
3161
+ ],
3162
+ "additionalProperties": false
3163
+ },
3164
+ "HxSubagentsHistoryParams": {
3165
+ "type": "object",
3166
+ "properties": {
3167
+ "sessionId": {
3168
+ "type": "string",
3169
+ "minLength": 1
3170
+ },
3171
+ "projectId": {
3172
+ "type": "string",
3173
+ "minLength": 1
3174
+ },
3175
+ "childSessionId": {
3176
+ "type": "string",
3177
+ "minLength": 1
3178
+ },
3179
+ "cursor": {
3180
+ "type": "string",
3181
+ "minLength": 1
3182
+ },
3183
+ "limit": {
3184
+ "type": "integer",
3185
+ "minimum": 1,
3186
+ "maximum": 200
3187
+ }
3188
+ },
3189
+ "required": [
3190
+ "sessionId",
3191
+ "childSessionId"
3192
+ ],
3193
+ "additionalProperties": false
3194
+ },
3195
+ "HxSubagentsHistoryResult": {
3196
+ "type": "object",
3197
+ "properties": {
3198
+ "subagent": {
3199
+ "$ref": "#/$defs/HxSubagent"
3200
+ },
3201
+ "history": {
3202
+ "$ref": "urn:anureo:ahp:v1#/$defs/HistoryPage"
3203
+ }
3204
+ },
3205
+ "required": [
3206
+ "subagent",
3207
+ "history"
3208
+ ],
3209
+ "additionalProperties": false
3210
+ }
3211
+ },
3212
+ "x-methods": {
3213
+ "hx.initialize": [
3214
+ "HxInitializeParams",
3215
+ "HxInitializeResult"
3216
+ ],
3217
+ "hx.harness.list": [
3218
+ "HxHarnessListParams",
3219
+ "HxHarnessListResult"
3220
+ ],
3221
+ "hx.harness.models": [
3222
+ "HxHarnessModelsParams",
3223
+ "HxHarnessModelsResult"
3224
+ ],
3225
+ "hx.session.create": [
3226
+ "HxSessionCreateParams",
3227
+ "HxSessionCreateResult"
3228
+ ],
3229
+ "hx.session.get": [
3230
+ "HxSessionGetParams",
3231
+ "HxSessionGetResult"
3232
+ ],
3233
+ "hx.session.list": [
3234
+ "HxSessionListParams",
3235
+ "HxSessionListResult"
3236
+ ],
3237
+ "hx.session.open": [
3238
+ "HxSessionOpenParams",
3239
+ "HxSessionOpenResult"
3240
+ ],
3241
+ "hx.session.close": [
3242
+ "HxSessionCloseParams",
3243
+ "HxSessionCloseResult"
3244
+ ],
3245
+ "hx.session.archive": [
3246
+ "HxSessionArchiveParams",
3247
+ "HxSessionArchiveResult"
3248
+ ],
3249
+ "hx.session.restore": [
3250
+ "HxSessionRestoreParams",
3251
+ "HxSessionRestoreResult"
3252
+ ],
3253
+ "hx.session.config.set": [
3254
+ "HxSessionConfigSetParams",
3255
+ "HxSessionConfigSetResult"
3256
+ ],
3257
+ "hx.session.fork": [
3258
+ "HxSessionForkParams",
3259
+ "HxSessionForkResult"
3260
+ ],
3261
+ "hx.session.revert": [
3262
+ "HxSessionRevertParams",
3263
+ "HxSessionRevertResult"
3264
+ ],
3265
+ "hx.session.reconcile": [
3266
+ "HxSessionReconcileParams",
3267
+ "HxSessionReconcileResult"
3268
+ ],
3269
+ "hx.history.read": [
3270
+ "HxHistoryReadParams",
3271
+ "HxHistoryReadResult"
3272
+ ],
3273
+ "hx.turn.start": [
3274
+ "HxTurnStartParams",
3275
+ "HxTurnStartResult"
3276
+ ],
3277
+ "hx.turn.steer": [
3278
+ "HxTurnSteerParams",
3279
+ "HxTurnSteerResult"
3280
+ ],
3281
+ "hx.turn.interrupt": [
3282
+ "HxTurnInterruptParams",
3283
+ "HxTurnInterruptResult"
3284
+ ],
3285
+ "hx.interaction.list": [
3286
+ "HxInteractionListParams",
3287
+ "HxInteractionListResult"
3288
+ ],
3289
+ "hx.interaction.private.get": [
3290
+ "HxInteractionPrivateGetParams",
3291
+ "HxInteractionPrivateGetResult"
3292
+ ],
3293
+ "hx.interaction.respond": [
3294
+ "HxInteractionRespondParams",
3295
+ "HxInteractionRespondResult"
3296
+ ],
3297
+ "hx.interaction.cancel": [
3298
+ "HxInteractionCancelParams",
3299
+ "HxInteractionCancelResult"
3300
+ ],
3301
+ "hx.goal.set": [
3302
+ "HxGoalSetParams",
3303
+ "HxGoalSetResult"
3304
+ ],
3305
+ "hx.goal.clear": [
3306
+ "HxGoalClearParams",
3307
+ "HxGoalClearResult"
3308
+ ],
3309
+ "hx.compact.start": [
3310
+ "HxCompactStartParams",
3311
+ "HxCompactStartResult"
3312
+ ],
3313
+ "hx.review.start": [
3314
+ "HxReviewStartParams",
3315
+ "HxReviewStartResult"
3316
+ ],
3317
+ "hx.operation.get": [
3318
+ "HxOperationGetParams",
3319
+ "HxOperationGetResult"
3320
+ ],
3321
+ "hx.events.read": [
3322
+ "HxEventsReadParams",
3323
+ "HxEventsReadResult"
3324
+ ],
3325
+ "hx.projection.snapshot": [
3326
+ "HxProjectionSnapshotParams",
3327
+ "HxProjectionSnapshotResult"
3328
+ ],
3329
+ "hx.events.subscribe": [
3330
+ "HxEventsSubscribeParams",
3331
+ "HxEventsSubscribeResult"
3332
+ ],
3333
+ "hx.events.unsubscribe": [
3334
+ "HxEventsUnsubscribeParams",
3335
+ "HxEventsUnsubscribeResult"
3336
+ ],
3337
+ "hx.queue.get": [
3338
+ "HxQueueGetParams",
3339
+ "HxQueueGetResult"
3340
+ ],
3341
+ "hx.queue.enqueue": [
3342
+ "HxQueueEnqueueParams",
3343
+ "HxQueueEnqueueResult"
3344
+ ],
3345
+ "hx.queue.update": [
3346
+ "HxQueueUpdateParams",
3347
+ "HxQueueUpdateResult"
3348
+ ],
3349
+ "hx.queue.remove": [
3350
+ "HxQueueRemoveParams",
3351
+ "HxQueueRemoveResult"
3352
+ ],
3353
+ "hx.queue.reorder": [
3354
+ "HxQueueReorderParams",
3355
+ "HxQueueReorderResult"
3356
+ ],
3357
+ "hx.queue.clear": [
3358
+ "HxQueueClearParams",
3359
+ "HxQueueClearResult"
3360
+ ],
3361
+ "hx.queue.pause": [
3362
+ "HxQueuePauseParams",
3363
+ "HxQueuePauseResult"
3364
+ ],
3365
+ "hx.queue.resume": [
3366
+ "HxQueueResumeParams",
3367
+ "HxQueueResumeResult"
3368
+ ],
3369
+ "hx.queue.run": [
3370
+ "HxQueueRunParams",
3371
+ "HxQueueRunResult"
3372
+ ],
3373
+ "hx.queue.steer": [
3374
+ "HxQueueSteerParams",
3375
+ "HxQueueSteerResult"
3376
+ ],
3377
+ "hx.queue.retry": [
3378
+ "HxQueueRetryParams",
3379
+ "HxQueueRetryResult"
3380
+ ],
3381
+ "hx.session.harness.set": [
3382
+ "HxSessionHarnessSetParams",
3383
+ "HxSessionHarnessSetResult"
3384
+ ],
3385
+ "hx.workspace.get": [
3386
+ "HxWorkspaceGetParams",
3387
+ "HxWorkspaceGetResult"
3388
+ ],
3389
+ "hx.workspace.integrate": [
3390
+ "HxWorkspaceIntegrateParams",
3391
+ "HxWorkspaceIntegrateResult"
3392
+ ],
3393
+ "hx.workspace.discard": [
3394
+ "HxWorkspaceDiscardParams",
3395
+ "HxWorkspaceDiscardResult"
3396
+ ],
3397
+ "hx.usage.get": [
3398
+ "HxUsageGetParams",
3399
+ "HxUsageGetResult"
3400
+ ],
3401
+ "hx.transcript.read": [
3402
+ "HxTranscriptReadParams",
3403
+ "HxTranscriptReadResult"
3404
+ ],
3405
+ "hx.catalog.get": [
3406
+ "HxCatalogGetParams",
3407
+ "HxCatalogGetResult"
3408
+ ],
3409
+ "hx.catalog.refresh": [
3410
+ "HxCatalogRefreshParams",
3411
+ "HxCatalogRefreshResult"
3412
+ ],
3413
+ "hx.subagents.list": [
3414
+ "HxSubagentsListParams",
3415
+ "HxSubagentsListResult"
3416
+ ],
3417
+ "hx.subagents.history": [
3418
+ "HxSubagentsHistoryParams",
3419
+ "HxSubagentsHistoryResult"
3420
+ ]
3421
+ }
3422
+ }