@anhlp/alp-protocol 0.0.1-beta.3 → 0.0.1-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/conformance/cases.json +1 -1
- package/dist/connection.d.ts +4 -0
- package/dist/contract-v1.d.ts +4867 -1197
- package/dist/contract-v1.js +1 -1
- package/dist/events.d.ts +41 -0
- package/dist/index.d.ts +1 -0
- package/dist/rpc.d.ts +651 -11
- package/dist/schedule.d.ts +43 -0
- package/dist/schedule.js +0 -0
- package/dist/session.d.ts +142 -2
- package/dist/wire.d.ts +112 -0
- package/dist/wire.js +78 -3
- package/fixtures/v1/cases.json +3247 -0
- package/package.json +1 -1
- package/schema/ipc-v1.json +953 -17
- package/schema/methods-v1.json +4854 -933
- package/src/connection.ts +4 -0
- package/src/contract-v1.js +1 -1
- package/src/events.ts +28 -2
- package/src/index.ts +1 -0
- package/src/rpc.ts +171 -12
- package/src/schedule.ts +43 -0
- package/src/session.ts +120 -4
- package/src/wire.js +128 -2
package/schema/ipc-v1.json
CHANGED
|
@@ -111,6 +111,18 @@
|
|
|
111
111
|
"promptImages": {
|
|
112
112
|
"type": "boolean"
|
|
113
113
|
},
|
|
114
|
+
"promptAttachments": {
|
|
115
|
+
"type": "array",
|
|
116
|
+
"minItems": 1,
|
|
117
|
+
"uniqueItems": true,
|
|
118
|
+
"items": {
|
|
119
|
+
"enum": [
|
|
120
|
+
"file.path",
|
|
121
|
+
"document.native",
|
|
122
|
+
"text.extract"
|
|
123
|
+
]
|
|
124
|
+
}
|
|
125
|
+
},
|
|
114
126
|
"usage": {
|
|
115
127
|
"$ref": "#/$defs/usage"
|
|
116
128
|
}
|
|
@@ -343,6 +355,31 @@
|
|
|
343
355
|
],
|
|
344
356
|
"additionalProperties": true
|
|
345
357
|
},
|
|
358
|
+
"attention": {
|
|
359
|
+
"type": "object",
|
|
360
|
+
"properties": {
|
|
361
|
+
"reason": {
|
|
362
|
+
"enum": [
|
|
363
|
+
"finished",
|
|
364
|
+
"error"
|
|
365
|
+
]
|
|
366
|
+
},
|
|
367
|
+
"at": {
|
|
368
|
+
"type": "string"
|
|
369
|
+
},
|
|
370
|
+
"turnId": {
|
|
371
|
+
"type": "string"
|
|
372
|
+
},
|
|
373
|
+
"message": {
|
|
374
|
+
"type": "string"
|
|
375
|
+
}
|
|
376
|
+
},
|
|
377
|
+
"required": [
|
|
378
|
+
"reason",
|
|
379
|
+
"at"
|
|
380
|
+
],
|
|
381
|
+
"additionalProperties": true
|
|
382
|
+
},
|
|
346
383
|
"spec": {
|
|
347
384
|
"type": "object",
|
|
348
385
|
"properties": {
|
|
@@ -530,24 +567,49 @@
|
|
|
530
567
|
]
|
|
531
568
|
},
|
|
532
569
|
"notification": {
|
|
533
|
-
"
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
"
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
570
|
+
"oneOf": [
|
|
571
|
+
{
|
|
572
|
+
"type": "object",
|
|
573
|
+
"properties": {
|
|
574
|
+
"jsonrpc": {
|
|
575
|
+
"const": "2.0"
|
|
576
|
+
},
|
|
577
|
+
"method": {
|
|
578
|
+
"const": "event"
|
|
579
|
+
},
|
|
580
|
+
"params": {
|
|
581
|
+
"$ref": "#/$defs/envelope"
|
|
582
|
+
}
|
|
583
|
+
},
|
|
584
|
+
"required": [
|
|
585
|
+
"jsonrpc",
|
|
586
|
+
"method",
|
|
587
|
+
"params"
|
|
588
|
+
],
|
|
589
|
+
"additionalProperties": true
|
|
540
590
|
},
|
|
541
|
-
|
|
542
|
-
"
|
|
591
|
+
{
|
|
592
|
+
"type": "object",
|
|
593
|
+
"description": "A terminal's output, exit or detach (capability terminal, §12.10).",
|
|
594
|
+
"properties": {
|
|
595
|
+
"jsonrpc": {
|
|
596
|
+
"const": "2.0"
|
|
597
|
+
},
|
|
598
|
+
"method": {
|
|
599
|
+
"const": "terminal.event"
|
|
600
|
+
},
|
|
601
|
+
"params": {
|
|
602
|
+
"$ref": "#/$defs/terminalEvent"
|
|
603
|
+
}
|
|
604
|
+
},
|
|
605
|
+
"required": [
|
|
606
|
+
"jsonrpc",
|
|
607
|
+
"method",
|
|
608
|
+
"params"
|
|
609
|
+
],
|
|
610
|
+
"additionalProperties": true
|
|
543
611
|
}
|
|
544
|
-
|
|
545
|
-
"required": [
|
|
546
|
-
"jsonrpc",
|
|
547
|
-
"method",
|
|
548
|
-
"params"
|
|
549
|
-
],
|
|
550
|
-
"additionalProperties": true
|
|
612
|
+
]
|
|
551
613
|
},
|
|
552
614
|
"knownEvent": {
|
|
553
615
|
"oneOf": [
|
|
@@ -889,6 +951,47 @@
|
|
|
889
951
|
"reason"
|
|
890
952
|
],
|
|
891
953
|
"additionalProperties": true
|
|
954
|
+
},
|
|
955
|
+
{
|
|
956
|
+
"type": "object",
|
|
957
|
+
"properties": {
|
|
958
|
+
"type": {
|
|
959
|
+
"const": "attention"
|
|
960
|
+
},
|
|
961
|
+
"attention": {
|
|
962
|
+
"$ref": "#/$defs/attention"
|
|
963
|
+
}
|
|
964
|
+
},
|
|
965
|
+
"required": [
|
|
966
|
+
"type"
|
|
967
|
+
],
|
|
968
|
+
"additionalProperties": true
|
|
969
|
+
},
|
|
970
|
+
{
|
|
971
|
+
"type": "object",
|
|
972
|
+
"properties": {
|
|
973
|
+
"type": {
|
|
974
|
+
"const": "history.reset"
|
|
975
|
+
},
|
|
976
|
+
"generation": {
|
|
977
|
+
"type": "string",
|
|
978
|
+
"pattern": "^[0-9a-f]{32}$"
|
|
979
|
+
},
|
|
980
|
+
"reason": {
|
|
981
|
+
"const": "rewind"
|
|
982
|
+
},
|
|
983
|
+
"branchId": {
|
|
984
|
+
"type": "string",
|
|
985
|
+
"pattern": "^br_[0-9a-f]{16}$"
|
|
986
|
+
}
|
|
987
|
+
},
|
|
988
|
+
"required": [
|
|
989
|
+
"type",
|
|
990
|
+
"generation",
|
|
991
|
+
"reason",
|
|
992
|
+
"branchId"
|
|
993
|
+
],
|
|
994
|
+
"additionalProperties": true
|
|
892
995
|
}
|
|
893
996
|
]
|
|
894
997
|
},
|
|
@@ -915,7 +1018,9 @@
|
|
|
915
1018
|
"question",
|
|
916
1019
|
"question.resolved",
|
|
917
1020
|
"pin",
|
|
918
|
-
"unpin"
|
|
1021
|
+
"unpin",
|
|
1022
|
+
"attention",
|
|
1023
|
+
"history.reset"
|
|
919
1024
|
]
|
|
920
1025
|
}
|
|
921
1026
|
}
|
|
@@ -945,6 +1050,43 @@
|
|
|
945
1050
|
"images": {
|
|
946
1051
|
"type": "integer",
|
|
947
1052
|
"minimum": 1
|
|
1053
|
+
},
|
|
1054
|
+
"attachments": {
|
|
1055
|
+
"type": "array",
|
|
1056
|
+
"items": {
|
|
1057
|
+
"type": "object",
|
|
1058
|
+
"properties": {
|
|
1059
|
+
"attachmentId": {
|
|
1060
|
+
"type": "string",
|
|
1061
|
+
"pattern": "^att_[0-9a-f]{32}$"
|
|
1062
|
+
},
|
|
1063
|
+
"name": {
|
|
1064
|
+
"type": "string"
|
|
1065
|
+
},
|
|
1066
|
+
"mimeType": {
|
|
1067
|
+
"type": "string"
|
|
1068
|
+
},
|
|
1069
|
+
"size": {
|
|
1070
|
+
"type": "integer",
|
|
1071
|
+
"minimum": 0
|
|
1072
|
+
}
|
|
1073
|
+
},
|
|
1074
|
+
"required": [
|
|
1075
|
+
"attachmentId",
|
|
1076
|
+
"name",
|
|
1077
|
+
"mimeType",
|
|
1078
|
+
"size"
|
|
1079
|
+
],
|
|
1080
|
+
"additionalProperties": false
|
|
1081
|
+
}
|
|
1082
|
+
},
|
|
1083
|
+
"origin": {
|
|
1084
|
+
"enum": [
|
|
1085
|
+
"user",
|
|
1086
|
+
"wake",
|
|
1087
|
+
"assignment",
|
|
1088
|
+
"runtime"
|
|
1089
|
+
]
|
|
948
1090
|
}
|
|
949
1091
|
},
|
|
950
1092
|
"required": [
|
|
@@ -1537,6 +1679,9 @@
|
|
|
1537
1679
|
"archived": {
|
|
1538
1680
|
"type": "boolean"
|
|
1539
1681
|
},
|
|
1682
|
+
"attention": {
|
|
1683
|
+
"$ref": "#/$defs/attention"
|
|
1684
|
+
},
|
|
1540
1685
|
"lastError": {
|
|
1541
1686
|
"type": "object",
|
|
1542
1687
|
"properties": {
|
|
@@ -1557,6 +1702,59 @@
|
|
|
1557
1702
|
},
|
|
1558
1703
|
"updatedAt": {
|
|
1559
1704
|
"type": "string"
|
|
1705
|
+
},
|
|
1706
|
+
"conversation": {
|
|
1707
|
+
"type": "object",
|
|
1708
|
+
"properties": {
|
|
1709
|
+
"fork": {
|
|
1710
|
+
"type": "boolean"
|
|
1711
|
+
},
|
|
1712
|
+
"rewind": {
|
|
1713
|
+
"type": "boolean"
|
|
1714
|
+
},
|
|
1715
|
+
"reload": {
|
|
1716
|
+
"type": "boolean",
|
|
1717
|
+
"description": "Whether session.reload can restart this root's native process (§12.8); the root must also be open and idle."
|
|
1718
|
+
},
|
|
1719
|
+
"configure": {
|
|
1720
|
+
"type": "boolean",
|
|
1721
|
+
"description": "Whether session.configure can change this root's model, effort or team (§12.9); the root must also be open and idle."
|
|
1722
|
+
},
|
|
1723
|
+
"reason": {
|
|
1724
|
+
"enum": [
|
|
1725
|
+
"runtime_unsupported",
|
|
1726
|
+
"not_persistent",
|
|
1727
|
+
"not_root"
|
|
1728
|
+
]
|
|
1729
|
+
}
|
|
1730
|
+
},
|
|
1731
|
+
"required": [
|
|
1732
|
+
"fork",
|
|
1733
|
+
"rewind"
|
|
1734
|
+
],
|
|
1735
|
+
"additionalProperties": true
|
|
1736
|
+
},
|
|
1737
|
+
"forkedFrom": {
|
|
1738
|
+
"$ref": "#/$defs/forkProvenance"
|
|
1739
|
+
},
|
|
1740
|
+
"branches": {
|
|
1741
|
+
"type": "array",
|
|
1742
|
+
"maxItems": 100,
|
|
1743
|
+
"items": {
|
|
1744
|
+
"$ref": "#/$defs/conversationBranch"
|
|
1745
|
+
}
|
|
1746
|
+
},
|
|
1747
|
+
"promptAttachments": {
|
|
1748
|
+
"type": "array",
|
|
1749
|
+
"minItems": 1,
|
|
1750
|
+
"uniqueItems": true,
|
|
1751
|
+
"items": {
|
|
1752
|
+
"enum": [
|
|
1753
|
+
"file.path",
|
|
1754
|
+
"document.native",
|
|
1755
|
+
"text.extract"
|
|
1756
|
+
]
|
|
1757
|
+
}
|
|
1560
1758
|
}
|
|
1561
1759
|
},
|
|
1562
1760
|
"required": [
|
|
@@ -2330,6 +2528,744 @@
|
|
|
2330
2528
|
"data"
|
|
2331
2529
|
],
|
|
2332
2530
|
"additionalProperties": false
|
|
2531
|
+
},
|
|
2532
|
+
"scheduleId": {
|
|
2533
|
+
"type": "string",
|
|
2534
|
+
"pattern": "^sch_[0-9a-f]{16}$"
|
|
2535
|
+
},
|
|
2536
|
+
"scheduleError": {
|
|
2537
|
+
"type": "object",
|
|
2538
|
+
"properties": {
|
|
2539
|
+
"message": {
|
|
2540
|
+
"type": "string"
|
|
2541
|
+
},
|
|
2542
|
+
"code": {
|
|
2543
|
+
"type": "string"
|
|
2544
|
+
}
|
|
2545
|
+
},
|
|
2546
|
+
"required": [
|
|
2547
|
+
"message"
|
|
2548
|
+
],
|
|
2549
|
+
"additionalProperties": true
|
|
2550
|
+
},
|
|
2551
|
+
"scheduleJob": {
|
|
2552
|
+
"type": "object",
|
|
2553
|
+
"properties": {
|
|
2554
|
+
"id": {
|
|
2555
|
+
"$ref": "#/$defs/scheduleId"
|
|
2556
|
+
},
|
|
2557
|
+
"projectRoot": {
|
|
2558
|
+
"$ref": "#/$defs/projectRoot"
|
|
2559
|
+
},
|
|
2560
|
+
"sessionId": {
|
|
2561
|
+
"type": "string"
|
|
2562
|
+
},
|
|
2563
|
+
"prompt": {
|
|
2564
|
+
"type": "string"
|
|
2565
|
+
},
|
|
2566
|
+
"dueAt": {
|
|
2567
|
+
"type": "string",
|
|
2568
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,3})?(Z|[+-]\\d{2}:\\d{2})$"
|
|
2569
|
+
},
|
|
2570
|
+
"status": {
|
|
2571
|
+
"enum": [
|
|
2572
|
+
"pending",
|
|
2573
|
+
"delivered",
|
|
2574
|
+
"failed",
|
|
2575
|
+
"cancelled"
|
|
2576
|
+
]
|
|
2577
|
+
},
|
|
2578
|
+
"attempts": {
|
|
2579
|
+
"type": "integer",
|
|
2580
|
+
"minimum": 0
|
|
2581
|
+
},
|
|
2582
|
+
"createdAt": {
|
|
2583
|
+
"type": "string"
|
|
2584
|
+
},
|
|
2585
|
+
"updatedAt": {
|
|
2586
|
+
"type": "string"
|
|
2587
|
+
},
|
|
2588
|
+
"deliveredAt": {
|
|
2589
|
+
"type": "string"
|
|
2590
|
+
},
|
|
2591
|
+
"failedAt": {
|
|
2592
|
+
"type": "string"
|
|
2593
|
+
},
|
|
2594
|
+
"cancelledAt": {
|
|
2595
|
+
"type": "string"
|
|
2596
|
+
},
|
|
2597
|
+
"attemptedAt": {
|
|
2598
|
+
"type": "string"
|
|
2599
|
+
},
|
|
2600
|
+
"lateByMs": {
|
|
2601
|
+
"type": "integer",
|
|
2602
|
+
"minimum": 0
|
|
2603
|
+
},
|
|
2604
|
+
"lastError": {
|
|
2605
|
+
"$ref": "#/$defs/scheduleError"
|
|
2606
|
+
}
|
|
2607
|
+
},
|
|
2608
|
+
"required": [
|
|
2609
|
+
"id",
|
|
2610
|
+
"projectRoot",
|
|
2611
|
+
"sessionId",
|
|
2612
|
+
"prompt",
|
|
2613
|
+
"dueAt",
|
|
2614
|
+
"status",
|
|
2615
|
+
"attempts",
|
|
2616
|
+
"createdAt",
|
|
2617
|
+
"updatedAt"
|
|
2618
|
+
],
|
|
2619
|
+
"additionalProperties": true
|
|
2620
|
+
},
|
|
2621
|
+
"registryProject": {
|
|
2622
|
+
"type": "object",
|
|
2623
|
+
"properties": {
|
|
2624
|
+
"id": {
|
|
2625
|
+
"type": "string"
|
|
2626
|
+
},
|
|
2627
|
+
"root": {
|
|
2628
|
+
"type": "string"
|
|
2629
|
+
},
|
|
2630
|
+
"customName": {
|
|
2631
|
+
"type": [
|
|
2632
|
+
"string",
|
|
2633
|
+
"null"
|
|
2634
|
+
]
|
|
2635
|
+
},
|
|
2636
|
+
"addedAt": {
|
|
2637
|
+
"type": "string"
|
|
2638
|
+
},
|
|
2639
|
+
"removedAt": {
|
|
2640
|
+
"type": [
|
|
2641
|
+
"string",
|
|
2642
|
+
"null"
|
|
2643
|
+
]
|
|
2644
|
+
},
|
|
2645
|
+
"revision": {
|
|
2646
|
+
"type": "integer",
|
|
2647
|
+
"minimum": 0
|
|
2648
|
+
},
|
|
2649
|
+
"canonical": {
|
|
2650
|
+
"type": "string"
|
|
2651
|
+
}
|
|
2652
|
+
},
|
|
2653
|
+
"required": [
|
|
2654
|
+
"id",
|
|
2655
|
+
"root",
|
|
2656
|
+
"addedAt"
|
|
2657
|
+
],
|
|
2658
|
+
"additionalProperties": false
|
|
2659
|
+
},
|
|
2660
|
+
"registryWorkspace": {
|
|
2661
|
+
"type": "object",
|
|
2662
|
+
"properties": {
|
|
2663
|
+
"id": {
|
|
2664
|
+
"type": "string"
|
|
2665
|
+
},
|
|
2666
|
+
"projectId": {
|
|
2667
|
+
"type": "string"
|
|
2668
|
+
},
|
|
2669
|
+
"directory": {
|
|
2670
|
+
"type": "string"
|
|
2671
|
+
},
|
|
2672
|
+
"title": {
|
|
2673
|
+
"type": [
|
|
2674
|
+
"string",
|
|
2675
|
+
"null"
|
|
2676
|
+
]
|
|
2677
|
+
},
|
|
2678
|
+
"pinnedAt": {
|
|
2679
|
+
"type": [
|
|
2680
|
+
"string",
|
|
2681
|
+
"null"
|
|
2682
|
+
]
|
|
2683
|
+
},
|
|
2684
|
+
"archivedAt": {
|
|
2685
|
+
"type": [
|
|
2686
|
+
"string",
|
|
2687
|
+
"null"
|
|
2688
|
+
]
|
|
2689
|
+
},
|
|
2690
|
+
"labels": {
|
|
2691
|
+
"type": "array",
|
|
2692
|
+
"items": {
|
|
2693
|
+
"type": "string"
|
|
2694
|
+
}
|
|
2695
|
+
},
|
|
2696
|
+
"createdAt": {
|
|
2697
|
+
"type": "string"
|
|
2698
|
+
},
|
|
2699
|
+
"revision": {
|
|
2700
|
+
"type": "integer",
|
|
2701
|
+
"minimum": 0
|
|
2702
|
+
},
|
|
2703
|
+
"canonical": {
|
|
2704
|
+
"type": "string"
|
|
2705
|
+
},
|
|
2706
|
+
"idempotencyKey": {
|
|
2707
|
+
"type": "string"
|
|
2708
|
+
},
|
|
2709
|
+
"branch": {
|
|
2710
|
+
"type": [
|
|
2711
|
+
"string",
|
|
2712
|
+
"null"
|
|
2713
|
+
]
|
|
2714
|
+
},
|
|
2715
|
+
"managedWorktree": {
|
|
2716
|
+
"type": "boolean"
|
|
2717
|
+
}
|
|
2718
|
+
},
|
|
2719
|
+
"required": [
|
|
2720
|
+
"id",
|
|
2721
|
+
"projectId",
|
|
2722
|
+
"directory",
|
|
2723
|
+
"labels",
|
|
2724
|
+
"createdAt"
|
|
2725
|
+
],
|
|
2726
|
+
"additionalProperties": false
|
|
2727
|
+
},
|
|
2728
|
+
"attachment": {
|
|
2729
|
+
"type": "object",
|
|
2730
|
+
"description": "A committed attachment as clients see it: ids, display metadata and its digest, never a host path or URL.",
|
|
2731
|
+
"properties": {
|
|
2732
|
+
"attachmentId": {
|
|
2733
|
+
"type": "string",
|
|
2734
|
+
"pattern": "^att_[0-9a-f]{32}$"
|
|
2735
|
+
},
|
|
2736
|
+
"sessionId": {
|
|
2737
|
+
"type": "string",
|
|
2738
|
+
"minLength": 1,
|
|
2739
|
+
"maxLength": 128
|
|
2740
|
+
},
|
|
2741
|
+
"name": {
|
|
2742
|
+
"type": "string",
|
|
2743
|
+
"minLength": 1,
|
|
2744
|
+
"maxLength": 255
|
|
2745
|
+
},
|
|
2746
|
+
"mimeType": {
|
|
2747
|
+
"type": "string",
|
|
2748
|
+
"minLength": 3,
|
|
2749
|
+
"maxLength": 255
|
|
2750
|
+
},
|
|
2751
|
+
"detectedMimeType": {
|
|
2752
|
+
"type": "string",
|
|
2753
|
+
"minLength": 3,
|
|
2754
|
+
"maxLength": 255
|
|
2755
|
+
},
|
|
2756
|
+
"size": {
|
|
2757
|
+
"type": "integer",
|
|
2758
|
+
"minimum": 0
|
|
2759
|
+
},
|
|
2760
|
+
"sha256": {
|
|
2761
|
+
"type": "string",
|
|
2762
|
+
"pattern": "^[0-9a-f]{64}$"
|
|
2763
|
+
},
|
|
2764
|
+
"createdAt": {
|
|
2765
|
+
"type": "string"
|
|
2766
|
+
},
|
|
2767
|
+
"committedAt": {
|
|
2768
|
+
"type": "string"
|
|
2769
|
+
},
|
|
2770
|
+
"referenced": {
|
|
2771
|
+
"type": "boolean"
|
|
2772
|
+
}
|
|
2773
|
+
},
|
|
2774
|
+
"required": [
|
|
2775
|
+
"attachmentId",
|
|
2776
|
+
"sessionId",
|
|
2777
|
+
"name",
|
|
2778
|
+
"mimeType",
|
|
2779
|
+
"detectedMimeType",
|
|
2780
|
+
"size",
|
|
2781
|
+
"sha256",
|
|
2782
|
+
"createdAt",
|
|
2783
|
+
"committedAt",
|
|
2784
|
+
"referenced"
|
|
2785
|
+
],
|
|
2786
|
+
"additionalProperties": false
|
|
2787
|
+
},
|
|
2788
|
+
"forkProvenance": {
|
|
2789
|
+
"type": "object",
|
|
2790
|
+
"description": "Where a fork came from (§12.7): the source root, and the turn its conversation was cut at.",
|
|
2791
|
+
"properties": {
|
|
2792
|
+
"sessionId": {
|
|
2793
|
+
"type": "string",
|
|
2794
|
+
"minLength": 1,
|
|
2795
|
+
"maxLength": 128
|
|
2796
|
+
},
|
|
2797
|
+
"turnId": {
|
|
2798
|
+
"type": "string",
|
|
2799
|
+
"minLength": 1,
|
|
2800
|
+
"maxLength": 200
|
|
2801
|
+
},
|
|
2802
|
+
"boundary": {
|
|
2803
|
+
"enum": [
|
|
2804
|
+
"through",
|
|
2805
|
+
"before",
|
|
2806
|
+
"whole"
|
|
2807
|
+
]
|
|
2808
|
+
},
|
|
2809
|
+
"branchId": {
|
|
2810
|
+
"type": "string",
|
|
2811
|
+
"pattern": "^br_[0-9a-f]{16}$"
|
|
2812
|
+
},
|
|
2813
|
+
"at": {
|
|
2814
|
+
"type": "string",
|
|
2815
|
+
"minLength": 1,
|
|
2816
|
+
"maxLength": 64
|
|
2817
|
+
}
|
|
2818
|
+
},
|
|
2819
|
+
"required": [
|
|
2820
|
+
"sessionId",
|
|
2821
|
+
"boundary",
|
|
2822
|
+
"at"
|
|
2823
|
+
],
|
|
2824
|
+
"additionalProperties": true
|
|
2825
|
+
},
|
|
2826
|
+
"conversationBranch": {
|
|
2827
|
+
"type": "object",
|
|
2828
|
+
"description": "Later turns a rewind set aside (§12.7): kept, never deleted, recoverable as a new session with session.fork { branchId }.",
|
|
2829
|
+
"properties": {
|
|
2830
|
+
"branchId": {
|
|
2831
|
+
"type": "string",
|
|
2832
|
+
"pattern": "^br_[0-9a-f]{16}$"
|
|
2833
|
+
},
|
|
2834
|
+
"beforeTurnId": {
|
|
2835
|
+
"type": "string",
|
|
2836
|
+
"minLength": 1,
|
|
2837
|
+
"maxLength": 200
|
|
2838
|
+
},
|
|
2839
|
+
"turns": {
|
|
2840
|
+
"type": "integer",
|
|
2841
|
+
"minimum": 0
|
|
2842
|
+
},
|
|
2843
|
+
"at": {
|
|
2844
|
+
"type": "string",
|
|
2845
|
+
"minLength": 1,
|
|
2846
|
+
"maxLength": 64
|
|
2847
|
+
}
|
|
2848
|
+
},
|
|
2849
|
+
"required": [
|
|
2850
|
+
"branchId",
|
|
2851
|
+
"beforeTurnId",
|
|
2852
|
+
"turns",
|
|
2853
|
+
"at"
|
|
2854
|
+
],
|
|
2855
|
+
"additionalProperties": true
|
|
2856
|
+
},
|
|
2857
|
+
"effectiveConfig": {
|
|
2858
|
+
"type": "object",
|
|
2859
|
+
"description": "The configuration a root runs with, or would after a change, as alpd resolved it (§12.9).",
|
|
2860
|
+
"properties": {
|
|
2861
|
+
"team": {
|
|
2862
|
+
"type": "string"
|
|
2863
|
+
},
|
|
2864
|
+
"teamLabel": {
|
|
2865
|
+
"type": "string"
|
|
2866
|
+
},
|
|
2867
|
+
"agent": {
|
|
2868
|
+
"type": "string"
|
|
2869
|
+
},
|
|
2870
|
+
"runtime": {
|
|
2871
|
+
"enum": [
|
|
2872
|
+
"claude",
|
|
2873
|
+
"codex",
|
|
2874
|
+
"acp",
|
|
2875
|
+
"antigravity"
|
|
2876
|
+
]
|
|
2877
|
+
},
|
|
2878
|
+
"model": {
|
|
2879
|
+
"type": "string"
|
|
2880
|
+
},
|
|
2881
|
+
"thinking": {
|
|
2882
|
+
"type": "string"
|
|
2883
|
+
},
|
|
2884
|
+
"mode": {
|
|
2885
|
+
"type": "string"
|
|
2886
|
+
},
|
|
2887
|
+
"permissionProfile": {
|
|
2888
|
+
"type": "string",
|
|
2889
|
+
"description": "The permission profile capping the agent's mode, when one does."
|
|
2890
|
+
},
|
|
2891
|
+
"supervisor": {
|
|
2892
|
+
"type": "boolean"
|
|
2893
|
+
},
|
|
2894
|
+
"maxPeers": {
|
|
2895
|
+
"type": "integer"
|
|
2896
|
+
},
|
|
2897
|
+
"delegates": {
|
|
2898
|
+
"type": "array",
|
|
2899
|
+
"items": {
|
|
2900
|
+
"type": "string"
|
|
2901
|
+
},
|
|
2902
|
+
"description": "Agents the root may delegate to."
|
|
2903
|
+
},
|
|
2904
|
+
"tools": {
|
|
2905
|
+
"type": "array",
|
|
2906
|
+
"items": {
|
|
2907
|
+
"type": "string"
|
|
2908
|
+
},
|
|
2909
|
+
"description": "ALP tools the root's agent is given."
|
|
2910
|
+
},
|
|
2911
|
+
"mcpServers": {
|
|
2912
|
+
"type": "array",
|
|
2913
|
+
"items": {
|
|
2914
|
+
"type": "object",
|
|
2915
|
+
"properties": {
|
|
2916
|
+
"name": {
|
|
2917
|
+
"type": "string"
|
|
2918
|
+
},
|
|
2919
|
+
"kind": {
|
|
2920
|
+
"enum": [
|
|
2921
|
+
"stdio",
|
|
2922
|
+
"http"
|
|
2923
|
+
]
|
|
2924
|
+
}
|
|
2925
|
+
},
|
|
2926
|
+
"required": [
|
|
2927
|
+
"name",
|
|
2928
|
+
"kind"
|
|
2929
|
+
],
|
|
2930
|
+
"additionalProperties": true
|
|
2931
|
+
}
|
|
2932
|
+
},
|
|
2933
|
+
"hooks": {
|
|
2934
|
+
"type": "integer",
|
|
2935
|
+
"minimum": 0,
|
|
2936
|
+
"description": "How many hook commands the agent runs."
|
|
2937
|
+
},
|
|
2938
|
+
"instructionsSha": {
|
|
2939
|
+
"type": "string"
|
|
2940
|
+
}
|
|
2941
|
+
},
|
|
2942
|
+
"required": [
|
|
2943
|
+
"team",
|
|
2944
|
+
"agent",
|
|
2945
|
+
"runtime",
|
|
2946
|
+
"model",
|
|
2947
|
+
"thinking",
|
|
2948
|
+
"mode",
|
|
2949
|
+
"supervisor",
|
|
2950
|
+
"delegates",
|
|
2951
|
+
"tools",
|
|
2952
|
+
"mcpServers",
|
|
2953
|
+
"hooks"
|
|
2954
|
+
],
|
|
2955
|
+
"additionalProperties": true
|
|
2956
|
+
},
|
|
2957
|
+
"configurePreview": {
|
|
2958
|
+
"type": "object",
|
|
2959
|
+
"properties": {
|
|
2960
|
+
"current": {
|
|
2961
|
+
"$ref": "#/$defs/effectiveConfig"
|
|
2962
|
+
},
|
|
2963
|
+
"proposed": {
|
|
2964
|
+
"$ref": "#/$defs/effectiveConfig"
|
|
2965
|
+
},
|
|
2966
|
+
"changes": {
|
|
2967
|
+
"type": "array",
|
|
2968
|
+
"items": {
|
|
2969
|
+
"enum": [
|
|
2970
|
+
"model",
|
|
2971
|
+
"thinking",
|
|
2972
|
+
"team",
|
|
2973
|
+
"mode"
|
|
2974
|
+
]
|
|
2975
|
+
}
|
|
2976
|
+
},
|
|
2977
|
+
"restart": {
|
|
2978
|
+
"type": "boolean",
|
|
2979
|
+
"description": "Whether applying it restarts the root's native process (on its own conversation)."
|
|
2980
|
+
},
|
|
2981
|
+
"allowed": {
|
|
2982
|
+
"type": "boolean",
|
|
2983
|
+
"description": "Whether session.configure would take it now; a busy tree may still refuse it later."
|
|
2984
|
+
},
|
|
2985
|
+
"reason": {
|
|
2986
|
+
"enum": [
|
|
2987
|
+
"session_busy",
|
|
2988
|
+
"session_closed",
|
|
2989
|
+
"not_root",
|
|
2990
|
+
"runtime_unsupported",
|
|
2991
|
+
"runtime_mismatch",
|
|
2992
|
+
"agent_mismatch",
|
|
2993
|
+
"permission_escalation",
|
|
2994
|
+
"team_not_found",
|
|
2995
|
+
"invalid_params",
|
|
2996
|
+
"not_persistent"
|
|
2997
|
+
]
|
|
2998
|
+
},
|
|
2999
|
+
"message": {
|
|
3000
|
+
"type": "string"
|
|
3001
|
+
},
|
|
3002
|
+
"teams": {
|
|
3003
|
+
"type": "array",
|
|
3004
|
+
"items": {
|
|
3005
|
+
"type": "object",
|
|
3006
|
+
"properties": {
|
|
3007
|
+
"id": {
|
|
3008
|
+
"type": "string"
|
|
3009
|
+
},
|
|
3010
|
+
"label": {
|
|
3011
|
+
"type": "string"
|
|
3012
|
+
},
|
|
3013
|
+
"description": {
|
|
3014
|
+
"type": "string"
|
|
3015
|
+
}
|
|
3016
|
+
},
|
|
3017
|
+
"required": [
|
|
3018
|
+
"id",
|
|
3019
|
+
"label"
|
|
3020
|
+
],
|
|
3021
|
+
"additionalProperties": true
|
|
3022
|
+
}
|
|
3023
|
+
}
|
|
3024
|
+
},
|
|
3025
|
+
"required": [
|
|
3026
|
+
"current",
|
|
3027
|
+
"proposed",
|
|
3028
|
+
"changes",
|
|
3029
|
+
"restart",
|
|
3030
|
+
"allowed",
|
|
3031
|
+
"teams"
|
|
3032
|
+
],
|
|
3033
|
+
"additionalProperties": true
|
|
3034
|
+
},
|
|
3035
|
+
"configureOutcome": {
|
|
3036
|
+
"type": "object",
|
|
3037
|
+
"properties": {
|
|
3038
|
+
"status": {
|
|
3039
|
+
"enum": [
|
|
3040
|
+
"applied",
|
|
3041
|
+
"unchanged"
|
|
3042
|
+
]
|
|
3043
|
+
},
|
|
3044
|
+
"requested": {
|
|
3045
|
+
"type": "object",
|
|
3046
|
+
"properties": {
|
|
3047
|
+
"model": {
|
|
3048
|
+
"type": "string"
|
|
3049
|
+
},
|
|
3050
|
+
"thinking": {
|
|
3051
|
+
"type": "string"
|
|
3052
|
+
},
|
|
3053
|
+
"team": {
|
|
3054
|
+
"type": "string"
|
|
3055
|
+
},
|
|
3056
|
+
"mode": {
|
|
3057
|
+
"type": "string"
|
|
3058
|
+
}
|
|
3059
|
+
},
|
|
3060
|
+
"additionalProperties": false
|
|
3061
|
+
},
|
|
3062
|
+
"effective": {
|
|
3063
|
+
"$ref": "#/$defs/effectiveConfig"
|
|
3064
|
+
},
|
|
3065
|
+
"restarted": {
|
|
3066
|
+
"type": "boolean"
|
|
3067
|
+
}
|
|
3068
|
+
},
|
|
3069
|
+
"required": [
|
|
3070
|
+
"status",
|
|
3071
|
+
"requested",
|
|
3072
|
+
"effective",
|
|
3073
|
+
"restarted"
|
|
3074
|
+
],
|
|
3075
|
+
"additionalProperties": true
|
|
3076
|
+
},
|
|
3077
|
+
"terminal": {
|
|
3078
|
+
"type": "object",
|
|
3079
|
+
"description": "A terminal as clients see it: ids, size and state, never a process id, shell path or host path.",
|
|
3080
|
+
"properties": {
|
|
3081
|
+
"terminalId": {
|
|
3082
|
+
"type": "string",
|
|
3083
|
+
"pattern": "^term_[0-9a-f]{32}$"
|
|
3084
|
+
},
|
|
3085
|
+
"workspaceId": {
|
|
3086
|
+
"type": "string",
|
|
3087
|
+
"minLength": 1,
|
|
3088
|
+
"maxLength": 200
|
|
3089
|
+
},
|
|
3090
|
+
"title": {
|
|
3091
|
+
"type": "string",
|
|
3092
|
+
"maxLength": 64
|
|
3093
|
+
},
|
|
3094
|
+
"cols": {
|
|
3095
|
+
"type": "integer",
|
|
3096
|
+
"minimum": 2,
|
|
3097
|
+
"maximum": 500
|
|
3098
|
+
},
|
|
3099
|
+
"rows": {
|
|
3100
|
+
"type": "integer",
|
|
3101
|
+
"minimum": 1,
|
|
3102
|
+
"maximum": 200
|
|
3103
|
+
},
|
|
3104
|
+
"state": {
|
|
3105
|
+
"enum": [
|
|
3106
|
+
"running",
|
|
3107
|
+
"exited"
|
|
3108
|
+
]
|
|
3109
|
+
},
|
|
3110
|
+
"attached": {
|
|
3111
|
+
"type": "boolean"
|
|
3112
|
+
},
|
|
3113
|
+
"createdAt": {
|
|
3114
|
+
"type": "string",
|
|
3115
|
+
"format": "date-time"
|
|
3116
|
+
},
|
|
3117
|
+
"lastActivityAt": {
|
|
3118
|
+
"type": "string",
|
|
3119
|
+
"format": "date-time"
|
|
3120
|
+
},
|
|
3121
|
+
"expiresAt": {
|
|
3122
|
+
"type": "string",
|
|
3123
|
+
"format": "date-time"
|
|
3124
|
+
},
|
|
3125
|
+
"exitCode": {
|
|
3126
|
+
"type": [
|
|
3127
|
+
"integer",
|
|
3128
|
+
"null"
|
|
3129
|
+
]
|
|
3130
|
+
},
|
|
3131
|
+
"signal": {
|
|
3132
|
+
"type": [
|
|
3133
|
+
"integer",
|
|
3134
|
+
"null"
|
|
3135
|
+
]
|
|
3136
|
+
},
|
|
3137
|
+
"endReason": {
|
|
3138
|
+
"enum": [
|
|
3139
|
+
"exited",
|
|
3140
|
+
"closed",
|
|
3141
|
+
"idle",
|
|
3142
|
+
"lifetime",
|
|
3143
|
+
"detached",
|
|
3144
|
+
"revoked",
|
|
3145
|
+
"disabled",
|
|
3146
|
+
"shutdown"
|
|
3147
|
+
]
|
|
3148
|
+
}
|
|
3149
|
+
},
|
|
3150
|
+
"required": [
|
|
3151
|
+
"terminalId",
|
|
3152
|
+
"workspaceId",
|
|
3153
|
+
"title",
|
|
3154
|
+
"cols",
|
|
3155
|
+
"rows",
|
|
3156
|
+
"state",
|
|
3157
|
+
"attached",
|
|
3158
|
+
"createdAt",
|
|
3159
|
+
"lastActivityAt",
|
|
3160
|
+
"expiresAt"
|
|
3161
|
+
],
|
|
3162
|
+
"additionalProperties": false
|
|
3163
|
+
},
|
|
3164
|
+
"terminalEvent": {
|
|
3165
|
+
"description": "params of a terminal.event notification (§12.10): sent only to the connection attached to the terminal.",
|
|
3166
|
+
"oneOf": [
|
|
3167
|
+
{
|
|
3168
|
+
"type": "object",
|
|
3169
|
+
"properties": {
|
|
3170
|
+
"terminalId": {
|
|
3171
|
+
"type": "string",
|
|
3172
|
+
"pattern": "^term_[0-9a-f]{32}$"
|
|
3173
|
+
},
|
|
3174
|
+
"type": {
|
|
3175
|
+
"const": "output"
|
|
3176
|
+
},
|
|
3177
|
+
"seq": {
|
|
3178
|
+
"type": "integer",
|
|
3179
|
+
"minimum": 1
|
|
3180
|
+
},
|
|
3181
|
+
"data": {
|
|
3182
|
+
"type": "string",
|
|
3183
|
+
"minLength": 1,
|
|
3184
|
+
"maxLength": 65536
|
|
3185
|
+
}
|
|
3186
|
+
},
|
|
3187
|
+
"required": [
|
|
3188
|
+
"terminalId",
|
|
3189
|
+
"type",
|
|
3190
|
+
"seq",
|
|
3191
|
+
"data"
|
|
3192
|
+
],
|
|
3193
|
+
"additionalProperties": false
|
|
3194
|
+
},
|
|
3195
|
+
{
|
|
3196
|
+
"type": "object",
|
|
3197
|
+
"properties": {
|
|
3198
|
+
"terminalId": {
|
|
3199
|
+
"type": "string",
|
|
3200
|
+
"pattern": "^term_[0-9a-f]{32}$"
|
|
3201
|
+
},
|
|
3202
|
+
"type": {
|
|
3203
|
+
"const": "exit"
|
|
3204
|
+
},
|
|
3205
|
+
"seq": {
|
|
3206
|
+
"type": "integer",
|
|
3207
|
+
"minimum": 1
|
|
3208
|
+
},
|
|
3209
|
+
"exitCode": {
|
|
3210
|
+
"type": [
|
|
3211
|
+
"integer",
|
|
3212
|
+
"null"
|
|
3213
|
+
]
|
|
3214
|
+
},
|
|
3215
|
+
"signal": {
|
|
3216
|
+
"type": [
|
|
3217
|
+
"integer",
|
|
3218
|
+
"null"
|
|
3219
|
+
]
|
|
3220
|
+
},
|
|
3221
|
+
"reason": {
|
|
3222
|
+
"enum": [
|
|
3223
|
+
"exited",
|
|
3224
|
+
"closed",
|
|
3225
|
+
"idle",
|
|
3226
|
+
"lifetime",
|
|
3227
|
+
"detached",
|
|
3228
|
+
"revoked",
|
|
3229
|
+
"disabled",
|
|
3230
|
+
"shutdown"
|
|
3231
|
+
]
|
|
3232
|
+
}
|
|
3233
|
+
},
|
|
3234
|
+
"required": [
|
|
3235
|
+
"terminalId",
|
|
3236
|
+
"type",
|
|
3237
|
+
"seq",
|
|
3238
|
+
"exitCode",
|
|
3239
|
+
"signal",
|
|
3240
|
+
"reason"
|
|
3241
|
+
],
|
|
3242
|
+
"additionalProperties": false
|
|
3243
|
+
},
|
|
3244
|
+
{
|
|
3245
|
+
"type": "object",
|
|
3246
|
+
"properties": {
|
|
3247
|
+
"terminalId": {
|
|
3248
|
+
"type": "string",
|
|
3249
|
+
"pattern": "^term_[0-9a-f]{32}$"
|
|
3250
|
+
},
|
|
3251
|
+
"type": {
|
|
3252
|
+
"const": "detached"
|
|
3253
|
+
},
|
|
3254
|
+
"reason": {
|
|
3255
|
+
"enum": [
|
|
3256
|
+
"replaced",
|
|
3257
|
+
"slow_consumer"
|
|
3258
|
+
]
|
|
3259
|
+
}
|
|
3260
|
+
},
|
|
3261
|
+
"required": [
|
|
3262
|
+
"terminalId",
|
|
3263
|
+
"type",
|
|
3264
|
+
"reason"
|
|
3265
|
+
],
|
|
3266
|
+
"additionalProperties": false
|
|
3267
|
+
}
|
|
3268
|
+
]
|
|
2333
3269
|
}
|
|
2334
3270
|
}
|
|
2335
3271
|
}
|