agenthooksprotocol 0.1.0 → 0.1.1
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/README.md +41 -0
- package/dist/src/client/composition.d.ts +2 -0
- package/dist/src/client/composition.d.ts.map +1 -1
- package/dist/src/client/composition.js +14 -6
- package/dist/src/client/composition.js.map +1 -1
- package/dist/src/client/content.d.ts +2 -0
- package/dist/src/client/content.d.ts.map +1 -1
- package/dist/src/client/content.js +18 -7
- package/dist/src/client/content.js.map +1 -1
- package/dist/src/client/hooks.d.ts +4 -0
- package/dist/src/client/hooks.d.ts.map +1 -1
- package/dist/src/client/hooks.js +115 -28
- package/dist/src/client/hooks.js.map +1 -1
- package/dist/src/client/index.d.ts +1 -0
- package/dist/src/client/index.d.ts.map +1 -1
- package/dist/src/client/index.js +1 -0
- package/dist/src/client/index.js.map +1 -1
- package/dist/src/client/types.d.ts +2 -2
- package/dist/src/client/types.d.ts.map +1 -1
- package/dist/src/content-upload.d.ts +9 -10
- package/dist/src/content-upload.d.ts.map +1 -1
- package/dist/src/content-upload.js +8 -4
- package/dist/src/content-upload.js.map +1 -1
- package/dist/src/draft/generated.d.ts +73 -47
- package/dist/src/draft/generated.d.ts.map +1 -1
- package/dist/src/draft/generated.js +502 -251
- package/dist/src/draft/generated.js.map +1 -1
- package/dist/src/draft/index.d.ts +4 -1
- package/dist/src/draft/index.d.ts.map +1 -1
- package/dist/src/draft/index.js +2 -0
- package/dist/src/draft/index.js.map +1 -1
- package/dist/src/draft/schemas.d.ts +112 -40
- package/dist/src/draft/schemas.d.ts.map +1 -1
- package/dist/src/draft/schemas.js +158 -120
- package/dist/src/draft/schemas.js.map +1 -1
- package/dist/src/draft-runtime.d.ts +5 -5
- package/dist/src/draft-runtime.d.ts.map +1 -1
- package/dist/src/draft-runtime.js +3 -5
- package/dist/src/draft-runtime.js.map +1 -1
- package/dist/src/server/attachments.d.ts +2 -2
- package/dist/src/server/attachments.d.ts.map +1 -1
- package/dist/src/server/attachments.js +3 -3
- package/dist/src/server/attachments.js.map +1 -1
- package/dist/src/server/hooks.d.ts.map +1 -1
- package/dist/src/server/hooks.js +4 -2
- package/dist/src/server/hooks.js.map +1 -1
- package/dist/src/server/index.d.ts +3 -1
- package/dist/src/server/index.d.ts.map +1 -1
- package/dist/src/server/index.js +1 -0
- package/dist/src/server/index.js.map +1 -1
- package/package.json +1 -1
- package/src/client/composition.ts +15 -6
- package/src/client/content.ts +19 -7
- package/src/client/hooks.ts +138 -29
- package/src/client/index.ts +2 -0
- package/src/client/types.ts +2 -2
- package/src/content-upload.ts +14 -13
- package/src/draft/ahp-codegen.lock.json +14 -6
- package/src/draft/generated.ts +733 -427
- package/src/draft/index.ts +6 -1
- package/src/draft/schemas.ts +160 -120
- package/src/draft-runtime.ts +7 -9
- package/src/server/attachments.ts +5 -5
- package/src/server/hooks.ts +3 -2
- package/src/server/index.ts +5 -0
|
@@ -1378,6 +1378,7 @@ const SCHEMAS = {
|
|
|
1378
1378
|
],
|
|
1379
1379
|
},
|
|
1380
1380
|
CatalogueEvent: {
|
|
1381
|
+
discriminator: "type",
|
|
1381
1382
|
kind: "union",
|
|
1382
1383
|
mode: "oneOf",
|
|
1383
1384
|
variants: [
|
|
@@ -1839,7 +1840,7 @@ const SCHEMAS = {
|
|
|
1839
1840
|
additional: {
|
|
1840
1841
|
kind: "forbidden",
|
|
1841
1842
|
},
|
|
1842
|
-
forbidden_property_sets: [],
|
|
1843
|
+
forbidden_property_sets: [["sha256"], ["size"]],
|
|
1843
1844
|
kind: "object",
|
|
1844
1845
|
properties: [
|
|
1845
1846
|
{
|
|
@@ -1900,20 +1901,6 @@ const SCHEMAS = {
|
|
|
1900
1901
|
},
|
|
1901
1902
|
wire_name: "selection",
|
|
1902
1903
|
},
|
|
1903
|
-
{
|
|
1904
|
-
required: false,
|
|
1905
|
-
shape: {
|
|
1906
|
-
kind: "string",
|
|
1907
|
-
},
|
|
1908
|
-
wire_name: "sha256",
|
|
1909
|
-
},
|
|
1910
|
-
{
|
|
1911
|
-
required: false,
|
|
1912
|
-
shape: {
|
|
1913
|
-
kind: "integer",
|
|
1914
|
-
},
|
|
1915
|
-
wire_name: "size",
|
|
1916
|
-
},
|
|
1917
1904
|
{
|
|
1918
1905
|
required: false,
|
|
1919
1906
|
shape: {
|
|
@@ -2196,7 +2183,7 @@ const SCHEMAS = {
|
|
|
2196
2183
|
additional: {
|
|
2197
2184
|
kind: "forbidden",
|
|
2198
2185
|
},
|
|
2199
|
-
forbidden_property_sets: [],
|
|
2186
|
+
forbidden_property_sets: [["sha256"], ["size"]],
|
|
2200
2187
|
kind: "object",
|
|
2201
2188
|
properties: [
|
|
2202
2189
|
{
|
|
@@ -2206,20 +2193,6 @@ const SCHEMAS = {
|
|
|
2206
2193
|
},
|
|
2207
2194
|
wire_name: "ref",
|
|
2208
2195
|
},
|
|
2209
|
-
{
|
|
2210
|
-
required: true,
|
|
2211
|
-
shape: {
|
|
2212
|
-
kind: "string",
|
|
2213
|
-
},
|
|
2214
|
-
wire_name: "sha256",
|
|
2215
|
-
},
|
|
2216
|
-
{
|
|
2217
|
-
required: true,
|
|
2218
|
-
shape: {
|
|
2219
|
-
kind: "integer",
|
|
2220
|
-
},
|
|
2221
|
-
wire_name: "size",
|
|
2222
|
-
},
|
|
2223
2196
|
],
|
|
2224
2197
|
},
|
|
2225
2198
|
ContentSelection: {
|
|
@@ -2332,6 +2305,36 @@ const SCHEMAS = {
|
|
|
2332
2305
|
},
|
|
2333
2306
|
],
|
|
2334
2307
|
},
|
|
2308
|
+
ContentUploadReceipt: {
|
|
2309
|
+
additional: {
|
|
2310
|
+
kind: "forbidden",
|
|
2311
|
+
},
|
|
2312
|
+
forbidden_property_sets: [],
|
|
2313
|
+
kind: "object",
|
|
2314
|
+
properties: [
|
|
2315
|
+
{
|
|
2316
|
+
required: true,
|
|
2317
|
+
shape: {
|
|
2318
|
+
kind: "string",
|
|
2319
|
+
},
|
|
2320
|
+
wire_name: "ref",
|
|
2321
|
+
},
|
|
2322
|
+
{
|
|
2323
|
+
required: true,
|
|
2324
|
+
shape: {
|
|
2325
|
+
kind: "string",
|
|
2326
|
+
},
|
|
2327
|
+
wire_name: "sha256",
|
|
2328
|
+
},
|
|
2329
|
+
{
|
|
2330
|
+
required: true,
|
|
2331
|
+
shape: {
|
|
2332
|
+
kind: "integer",
|
|
2333
|
+
},
|
|
2334
|
+
wire_name: "size",
|
|
2335
|
+
},
|
|
2336
|
+
],
|
|
2337
|
+
},
|
|
2335
2338
|
ContextCompactAfterCapabilities: {
|
|
2336
2339
|
kind: "intersection",
|
|
2337
2340
|
variants: [
|
|
@@ -2720,6 +2723,141 @@ const SCHEMAS = {
|
|
|
2720
2723
|
},
|
|
2721
2724
|
],
|
|
2722
2725
|
},
|
|
2726
|
+
Event: {
|
|
2727
|
+
discriminator: "type",
|
|
2728
|
+
kind: "union",
|
|
2729
|
+
mode: "oneOf",
|
|
2730
|
+
variants: [
|
|
2731
|
+
{
|
|
2732
|
+
kind: "ref",
|
|
2733
|
+
name: "ToolBeforeEvent",
|
|
2734
|
+
},
|
|
2735
|
+
{
|
|
2736
|
+
kind: "ref",
|
|
2737
|
+
name: "ToolAfterEvent",
|
|
2738
|
+
},
|
|
2739
|
+
{
|
|
2740
|
+
kind: "ref",
|
|
2741
|
+
name: "SessionStartEvent",
|
|
2742
|
+
},
|
|
2743
|
+
{
|
|
2744
|
+
kind: "ref",
|
|
2745
|
+
name: "SessionEndEvent",
|
|
2746
|
+
},
|
|
2747
|
+
{
|
|
2748
|
+
kind: "ref",
|
|
2749
|
+
name: "ConfigChangeBeforeEvent",
|
|
2750
|
+
},
|
|
2751
|
+
{
|
|
2752
|
+
kind: "ref",
|
|
2753
|
+
name: "ConfigChangeAfterEvent",
|
|
2754
|
+
},
|
|
2755
|
+
{
|
|
2756
|
+
kind: "ref",
|
|
2757
|
+
name: "TurnStartEvent",
|
|
2758
|
+
},
|
|
2759
|
+
{
|
|
2760
|
+
kind: "ref",
|
|
2761
|
+
name: "TurnFinishBeforeEvent",
|
|
2762
|
+
},
|
|
2763
|
+
{
|
|
2764
|
+
kind: "ref",
|
|
2765
|
+
name: "TurnEndEvent",
|
|
2766
|
+
},
|
|
2767
|
+
{
|
|
2768
|
+
kind: "ref",
|
|
2769
|
+
name: "TurnProgressEvent",
|
|
2770
|
+
},
|
|
2771
|
+
{
|
|
2772
|
+
kind: "ref",
|
|
2773
|
+
name: "ModelRequestBeforeEvent",
|
|
2774
|
+
},
|
|
2775
|
+
{
|
|
2776
|
+
kind: "ref",
|
|
2777
|
+
name: "ModelResponseAfterEvent",
|
|
2778
|
+
},
|
|
2779
|
+
{
|
|
2780
|
+
kind: "ref",
|
|
2781
|
+
name: "ModelErrorEvent",
|
|
2782
|
+
},
|
|
2783
|
+
{
|
|
2784
|
+
kind: "ref",
|
|
2785
|
+
name: "ModelSwitchBeforeEvent",
|
|
2786
|
+
},
|
|
2787
|
+
{
|
|
2788
|
+
kind: "ref",
|
|
2789
|
+
name: "ModelSwitchAfterEvent",
|
|
2790
|
+
},
|
|
2791
|
+
{
|
|
2792
|
+
kind: "ref",
|
|
2793
|
+
name: "ToolPermissionRequestEvent",
|
|
2794
|
+
},
|
|
2795
|
+
{
|
|
2796
|
+
kind: "ref",
|
|
2797
|
+
name: "ToolPermissionResolvedEvent",
|
|
2798
|
+
},
|
|
2799
|
+
{
|
|
2800
|
+
kind: "ref",
|
|
2801
|
+
name: "ToolProgressEvent",
|
|
2802
|
+
},
|
|
2803
|
+
{
|
|
2804
|
+
kind: "ref",
|
|
2805
|
+
name: "ToolBatchAfterEvent",
|
|
2806
|
+
},
|
|
2807
|
+
{
|
|
2808
|
+
kind: "ref",
|
|
2809
|
+
name: "ContextCompactBeforeEvent",
|
|
2810
|
+
},
|
|
2811
|
+
{
|
|
2812
|
+
kind: "ref",
|
|
2813
|
+
name: "ContextCompactAfterEvent",
|
|
2814
|
+
},
|
|
2815
|
+
{
|
|
2816
|
+
kind: "ref",
|
|
2817
|
+
name: "TaskChangeBeforeEvent",
|
|
2818
|
+
},
|
|
2819
|
+
{
|
|
2820
|
+
kind: "ref",
|
|
2821
|
+
name: "TaskChangeAfterEvent",
|
|
2822
|
+
},
|
|
2823
|
+
{
|
|
2824
|
+
kind: "ref",
|
|
2825
|
+
name: "UserAttentionEvent",
|
|
2826
|
+
},
|
|
2827
|
+
{
|
|
2828
|
+
kind: "ref",
|
|
2829
|
+
name: "UserElicitationRequestEvent",
|
|
2830
|
+
},
|
|
2831
|
+
{
|
|
2832
|
+
kind: "ref",
|
|
2833
|
+
name: "UserElicitationResultEvent",
|
|
2834
|
+
},
|
|
2835
|
+
{
|
|
2836
|
+
kind: "ref",
|
|
2837
|
+
name: "UserMessageInboundEvent",
|
|
2838
|
+
},
|
|
2839
|
+
{
|
|
2840
|
+
kind: "ref",
|
|
2841
|
+
name: "UserMessageOutboundEvent",
|
|
2842
|
+
},
|
|
2843
|
+
{
|
|
2844
|
+
kind: "ref",
|
|
2845
|
+
name: "WorkspaceChangeBeforeEvent",
|
|
2846
|
+
},
|
|
2847
|
+
{
|
|
2848
|
+
kind: "ref",
|
|
2849
|
+
name: "WorkspaceChangeAfterEvent",
|
|
2850
|
+
},
|
|
2851
|
+
{
|
|
2852
|
+
kind: "ref",
|
|
2853
|
+
name: "FileChangedEvent",
|
|
2854
|
+
},
|
|
2855
|
+
{
|
|
2856
|
+
kind: "ref",
|
|
2857
|
+
name: "HookFailureEvent",
|
|
2858
|
+
},
|
|
2859
|
+
],
|
|
2860
|
+
},
|
|
2723
2861
|
ExecutionEvent: {
|
|
2724
2862
|
discriminator: "type",
|
|
2725
2863
|
kind: "union",
|
|
@@ -4170,7 +4308,7 @@ const SCHEMAS = {
|
|
|
4170
4308
|
additional: {
|
|
4171
4309
|
kind: "allowed",
|
|
4172
4310
|
},
|
|
4173
|
-
forbidden_property_sets: [],
|
|
4311
|
+
forbidden_property_sets: [["finishReason"]],
|
|
4174
4312
|
kind: "object",
|
|
4175
4313
|
properties: [
|
|
4176
4314
|
{
|
|
@@ -4390,7 +4528,13 @@ const SCHEMAS = {
|
|
|
4390
4528
|
additional: {
|
|
4391
4529
|
kind: "allowed",
|
|
4392
4530
|
},
|
|
4393
|
-
forbidden_property_sets: [
|
|
4531
|
+
forbidden_property_sets: [
|
|
4532
|
+
["error"],
|
|
4533
|
+
["execution"],
|
|
4534
|
+
["finishReason"],
|
|
4535
|
+
["latencyMs"],
|
|
4536
|
+
["usage"],
|
|
4537
|
+
],
|
|
4394
4538
|
kind: "object",
|
|
4395
4539
|
properties: [
|
|
4396
4540
|
{
|
|
@@ -4562,7 +4706,7 @@ const SCHEMAS = {
|
|
|
4562
4706
|
additional: {
|
|
4563
4707
|
kind: "allowed",
|
|
4564
4708
|
},
|
|
4565
|
-
forbidden_property_sets: [],
|
|
4709
|
+
forbidden_property_sets: [["error"]],
|
|
4566
4710
|
kind: "object",
|
|
4567
4711
|
properties: [
|
|
4568
4712
|
{
|
|
@@ -4752,7 +4896,7 @@ const SCHEMAS = {
|
|
|
4752
4896
|
additional: {
|
|
4753
4897
|
kind: "allowed",
|
|
4754
4898
|
},
|
|
4755
|
-
forbidden_property_sets: [],
|
|
4899
|
+
forbidden_property_sets: [["proposed"]],
|
|
4756
4900
|
kind: "object",
|
|
4757
4901
|
properties: [
|
|
4758
4902
|
{
|
|
@@ -4919,7 +5063,7 @@ const SCHEMAS = {
|
|
|
4919
5063
|
additional: {
|
|
4920
5064
|
kind: "allowed",
|
|
4921
5065
|
},
|
|
4922
|
-
forbidden_property_sets: [],
|
|
5066
|
+
forbidden_property_sets: [["previous"]],
|
|
4923
5067
|
kind: "object",
|
|
4924
5068
|
properties: [
|
|
4925
5069
|
{
|
|
@@ -5449,7 +5593,12 @@ const SCHEMAS = {
|
|
|
5449
5593
|
additional: {
|
|
5450
5594
|
kind: "allowed",
|
|
5451
5595
|
},
|
|
5452
|
-
forbidden_property_sets: [
|
|
5596
|
+
forbidden_property_sets: [
|
|
5597
|
+
["decidedBy"],
|
|
5598
|
+
["decision"],
|
|
5599
|
+
["execution"],
|
|
5600
|
+
["outcome"],
|
|
5601
|
+
],
|
|
5453
5602
|
kind: "object",
|
|
5454
5603
|
properties: [
|
|
5455
5604
|
{
|
|
@@ -5877,7 +6026,7 @@ const SCHEMAS = {
|
|
|
5877
6026
|
additional: {
|
|
5878
6027
|
kind: "allowed",
|
|
5879
6028
|
},
|
|
5880
|
-
forbidden_property_sets: [],
|
|
6029
|
+
forbidden_property_sets: [["execution"], ["outcome"]],
|
|
5881
6030
|
kind: "object",
|
|
5882
6031
|
properties: [
|
|
5883
6032
|
{
|
|
@@ -7902,84 +8051,250 @@ const SCHEMAS = {
|
|
|
7902
8051
|
{
|
|
7903
8052
|
required: true,
|
|
7904
8053
|
shape: {
|
|
7905
|
-
kind: "
|
|
7906
|
-
mode: "oneOf",
|
|
8054
|
+
kind: "intersection",
|
|
7907
8055
|
variants: [
|
|
7908
8056
|
{
|
|
7909
8057
|
kind: "ref",
|
|
7910
|
-
name: "
|
|
7911
|
-
},
|
|
7912
|
-
{
|
|
7913
|
-
kind: "ref",
|
|
7914
|
-
name: "ToolAfterEvent",
|
|
7915
|
-
},
|
|
7916
|
-
{
|
|
7917
|
-
kind: "ref",
|
|
7918
|
-
name: "SessionStartEvent",
|
|
7919
|
-
},
|
|
7920
|
-
{
|
|
7921
|
-
kind: "ref",
|
|
7922
|
-
name: "ConfigChangeBeforeEvent",
|
|
7923
|
-
},
|
|
7924
|
-
{
|
|
7925
|
-
kind: "ref",
|
|
7926
|
-
name: "TurnStartEvent",
|
|
7927
|
-
},
|
|
7928
|
-
{
|
|
7929
|
-
kind: "ref",
|
|
7930
|
-
name: "TurnFinishBeforeEvent",
|
|
7931
|
-
},
|
|
7932
|
-
{
|
|
7933
|
-
kind: "ref",
|
|
7934
|
-
name: "ModelRequestBeforeEvent",
|
|
7935
|
-
},
|
|
7936
|
-
{
|
|
7937
|
-
kind: "ref",
|
|
7938
|
-
name: "ModelSwitchBeforeEvent",
|
|
7939
|
-
},
|
|
7940
|
-
{
|
|
7941
|
-
kind: "ref",
|
|
7942
|
-
name: "ToolPermissionRequestEvent",
|
|
7943
|
-
},
|
|
7944
|
-
{
|
|
7945
|
-
kind: "ref",
|
|
7946
|
-
name: "ToolBatchAfterEvent",
|
|
7947
|
-
},
|
|
7948
|
-
{
|
|
7949
|
-
kind: "ref",
|
|
7950
|
-
name: "ContextCompactBeforeEvent",
|
|
7951
|
-
},
|
|
7952
|
-
{
|
|
7953
|
-
kind: "ref",
|
|
7954
|
-
name: "ContextCompactAfterEvent",
|
|
7955
|
-
},
|
|
7956
|
-
{
|
|
7957
|
-
kind: "ref",
|
|
7958
|
-
name: "TaskChangeBeforeEvent",
|
|
7959
|
-
},
|
|
7960
|
-
{
|
|
7961
|
-
kind: "ref",
|
|
7962
|
-
name: "UserElicitationRequestEvent",
|
|
7963
|
-
},
|
|
7964
|
-
{
|
|
7965
|
-
kind: "ref",
|
|
7966
|
-
name: "UserElicitationResultEvent",
|
|
7967
|
-
},
|
|
7968
|
-
{
|
|
7969
|
-
kind: "ref",
|
|
7970
|
-
name: "UserMessageInboundEvent",
|
|
7971
|
-
},
|
|
7972
|
-
{
|
|
7973
|
-
kind: "ref",
|
|
7974
|
-
name: "UserMessageOutboundEvent",
|
|
7975
|
-
},
|
|
7976
|
-
{
|
|
7977
|
-
kind: "ref",
|
|
7978
|
-
name: "WorkspaceChangeBeforeEvent",
|
|
8058
|
+
name: "Event",
|
|
7979
8059
|
},
|
|
7980
8060
|
{
|
|
7981
|
-
|
|
7982
|
-
|
|
8061
|
+
discriminator: "type",
|
|
8062
|
+
kind: "union",
|
|
8063
|
+
mode: "oneOf",
|
|
8064
|
+
variants: [
|
|
8065
|
+
{
|
|
8066
|
+
kind: "ref",
|
|
8067
|
+
name: "ToolBeforeEvent",
|
|
8068
|
+
},
|
|
8069
|
+
{
|
|
8070
|
+
kind: "ref",
|
|
8071
|
+
name: "ToolAfterEvent",
|
|
8072
|
+
},
|
|
8073
|
+
{
|
|
8074
|
+
kind: "ref",
|
|
8075
|
+
name: "SessionStartEvent",
|
|
8076
|
+
},
|
|
8077
|
+
{
|
|
8078
|
+
kind: "ref",
|
|
8079
|
+
name: "ConfigChangeBeforeEvent",
|
|
8080
|
+
},
|
|
8081
|
+
{
|
|
8082
|
+
kind: "ref",
|
|
8083
|
+
name: "TurnStartEvent",
|
|
8084
|
+
},
|
|
8085
|
+
{
|
|
8086
|
+
kind: "ref",
|
|
8087
|
+
name: "TurnFinishBeforeEvent",
|
|
8088
|
+
},
|
|
8089
|
+
{
|
|
8090
|
+
kind: "ref",
|
|
8091
|
+
name: "ModelRequestBeforeEvent",
|
|
8092
|
+
},
|
|
8093
|
+
{
|
|
8094
|
+
kind: "ref",
|
|
8095
|
+
name: "ModelSwitchBeforeEvent",
|
|
8096
|
+
},
|
|
8097
|
+
{
|
|
8098
|
+
kind: "ref",
|
|
8099
|
+
name: "ToolPermissionRequestEvent",
|
|
8100
|
+
},
|
|
8101
|
+
{
|
|
8102
|
+
kind: "ref",
|
|
8103
|
+
name: "ToolBatchAfterEvent",
|
|
8104
|
+
},
|
|
8105
|
+
{
|
|
8106
|
+
kind: "ref",
|
|
8107
|
+
name: "ContextCompactBeforeEvent",
|
|
8108
|
+
},
|
|
8109
|
+
{
|
|
8110
|
+
kind: "ref",
|
|
8111
|
+
name: "ContextCompactAfterEvent",
|
|
8112
|
+
},
|
|
8113
|
+
{
|
|
8114
|
+
kind: "ref",
|
|
8115
|
+
name: "TaskChangeBeforeEvent",
|
|
8116
|
+
},
|
|
8117
|
+
{
|
|
8118
|
+
kind: "ref",
|
|
8119
|
+
name: "UserElicitationRequestEvent",
|
|
8120
|
+
},
|
|
8121
|
+
{
|
|
8122
|
+
kind: "ref",
|
|
8123
|
+
name: "UserElicitationResultEvent",
|
|
8124
|
+
},
|
|
8125
|
+
{
|
|
8126
|
+
kind: "ref",
|
|
8127
|
+
name: "UserMessageInboundEvent",
|
|
8128
|
+
},
|
|
8129
|
+
{
|
|
8130
|
+
kind: "ref",
|
|
8131
|
+
name: "UserMessageOutboundEvent",
|
|
8132
|
+
},
|
|
8133
|
+
{
|
|
8134
|
+
kind: "ref",
|
|
8135
|
+
name: "WorkspaceChangeBeforeEvent",
|
|
8136
|
+
},
|
|
8137
|
+
{
|
|
8138
|
+
kind: "ref",
|
|
8139
|
+
name: "ModelResponseAfterEvent",
|
|
8140
|
+
},
|
|
8141
|
+
{
|
|
8142
|
+
kind: "intersection",
|
|
8143
|
+
variants: [
|
|
8144
|
+
{
|
|
8145
|
+
kind: "ref",
|
|
8146
|
+
name: "SessionEndEvent",
|
|
8147
|
+
},
|
|
8148
|
+
{
|
|
8149
|
+
kind: "never",
|
|
8150
|
+
},
|
|
8151
|
+
],
|
|
8152
|
+
},
|
|
8153
|
+
{
|
|
8154
|
+
kind: "intersection",
|
|
8155
|
+
variants: [
|
|
8156
|
+
{
|
|
8157
|
+
kind: "ref",
|
|
8158
|
+
name: "ConfigChangeAfterEvent",
|
|
8159
|
+
},
|
|
8160
|
+
{
|
|
8161
|
+
kind: "never",
|
|
8162
|
+
},
|
|
8163
|
+
],
|
|
8164
|
+
},
|
|
8165
|
+
{
|
|
8166
|
+
kind: "intersection",
|
|
8167
|
+
variants: [
|
|
8168
|
+
{
|
|
8169
|
+
kind: "ref",
|
|
8170
|
+
name: "TurnEndEvent",
|
|
8171
|
+
},
|
|
8172
|
+
{
|
|
8173
|
+
kind: "never",
|
|
8174
|
+
},
|
|
8175
|
+
],
|
|
8176
|
+
},
|
|
8177
|
+
{
|
|
8178
|
+
kind: "intersection",
|
|
8179
|
+
variants: [
|
|
8180
|
+
{
|
|
8181
|
+
kind: "ref",
|
|
8182
|
+
name: "TurnProgressEvent",
|
|
8183
|
+
},
|
|
8184
|
+
{
|
|
8185
|
+
kind: "never",
|
|
8186
|
+
},
|
|
8187
|
+
],
|
|
8188
|
+
},
|
|
8189
|
+
{
|
|
8190
|
+
kind: "intersection",
|
|
8191
|
+
variants: [
|
|
8192
|
+
{
|
|
8193
|
+
kind: "ref",
|
|
8194
|
+
name: "ModelErrorEvent",
|
|
8195
|
+
},
|
|
8196
|
+
{
|
|
8197
|
+
kind: "never",
|
|
8198
|
+
},
|
|
8199
|
+
],
|
|
8200
|
+
},
|
|
8201
|
+
{
|
|
8202
|
+
kind: "intersection",
|
|
8203
|
+
variants: [
|
|
8204
|
+
{
|
|
8205
|
+
kind: "ref",
|
|
8206
|
+
name: "ModelSwitchAfterEvent",
|
|
8207
|
+
},
|
|
8208
|
+
{
|
|
8209
|
+
kind: "never",
|
|
8210
|
+
},
|
|
8211
|
+
],
|
|
8212
|
+
},
|
|
8213
|
+
{
|
|
8214
|
+
kind: "intersection",
|
|
8215
|
+
variants: [
|
|
8216
|
+
{
|
|
8217
|
+
kind: "ref",
|
|
8218
|
+
name: "ToolPermissionResolvedEvent",
|
|
8219
|
+
},
|
|
8220
|
+
{
|
|
8221
|
+
kind: "never",
|
|
8222
|
+
},
|
|
8223
|
+
],
|
|
8224
|
+
},
|
|
8225
|
+
{
|
|
8226
|
+
kind: "intersection",
|
|
8227
|
+
variants: [
|
|
8228
|
+
{
|
|
8229
|
+
kind: "ref",
|
|
8230
|
+
name: "ToolProgressEvent",
|
|
8231
|
+
},
|
|
8232
|
+
{
|
|
8233
|
+
kind: "never",
|
|
8234
|
+
},
|
|
8235
|
+
],
|
|
8236
|
+
},
|
|
8237
|
+
{
|
|
8238
|
+
kind: "intersection",
|
|
8239
|
+
variants: [
|
|
8240
|
+
{
|
|
8241
|
+
kind: "ref",
|
|
8242
|
+
name: "TaskChangeAfterEvent",
|
|
8243
|
+
},
|
|
8244
|
+
{
|
|
8245
|
+
kind: "never",
|
|
8246
|
+
},
|
|
8247
|
+
],
|
|
8248
|
+
},
|
|
8249
|
+
{
|
|
8250
|
+
kind: "intersection",
|
|
8251
|
+
variants: [
|
|
8252
|
+
{
|
|
8253
|
+
kind: "ref",
|
|
8254
|
+
name: "UserAttentionEvent",
|
|
8255
|
+
},
|
|
8256
|
+
{
|
|
8257
|
+
kind: "never",
|
|
8258
|
+
},
|
|
8259
|
+
],
|
|
8260
|
+
},
|
|
8261
|
+
{
|
|
8262
|
+
kind: "intersection",
|
|
8263
|
+
variants: [
|
|
8264
|
+
{
|
|
8265
|
+
kind: "ref",
|
|
8266
|
+
name: "WorkspaceChangeAfterEvent",
|
|
8267
|
+
},
|
|
8268
|
+
{
|
|
8269
|
+
kind: "never",
|
|
8270
|
+
},
|
|
8271
|
+
],
|
|
8272
|
+
},
|
|
8273
|
+
{
|
|
8274
|
+
kind: "intersection",
|
|
8275
|
+
variants: [
|
|
8276
|
+
{
|
|
8277
|
+
kind: "ref",
|
|
8278
|
+
name: "FileChangedEvent",
|
|
8279
|
+
},
|
|
8280
|
+
{
|
|
8281
|
+
kind: "never",
|
|
8282
|
+
},
|
|
8283
|
+
],
|
|
8284
|
+
},
|
|
8285
|
+
{
|
|
8286
|
+
kind: "intersection",
|
|
8287
|
+
variants: [
|
|
8288
|
+
{
|
|
8289
|
+
kind: "ref",
|
|
8290
|
+
name: "HookFailureEvent",
|
|
8291
|
+
},
|
|
8292
|
+
{
|
|
8293
|
+
kind: "never",
|
|
8294
|
+
},
|
|
8295
|
+
],
|
|
8296
|
+
},
|
|
8297
|
+
],
|
|
7983
8298
|
},
|
|
7984
8299
|
],
|
|
7985
8300
|
},
|
|
@@ -9616,138 +9931,8 @@ const SCHEMAS = {
|
|
|
9616
9931
|
{
|
|
9617
9932
|
required: true,
|
|
9618
9933
|
shape: {
|
|
9619
|
-
kind: "
|
|
9620
|
-
|
|
9621
|
-
variants: [
|
|
9622
|
-
{
|
|
9623
|
-
kind: "ref",
|
|
9624
|
-
name: "ToolBeforeEvent",
|
|
9625
|
-
},
|
|
9626
|
-
{
|
|
9627
|
-
kind: "ref",
|
|
9628
|
-
name: "ToolAfterEvent",
|
|
9629
|
-
},
|
|
9630
|
-
{
|
|
9631
|
-
kind: "ref",
|
|
9632
|
-
name: "SessionStartEvent",
|
|
9633
|
-
},
|
|
9634
|
-
{
|
|
9635
|
-
kind: "ref",
|
|
9636
|
-
name: "SessionEndEvent",
|
|
9637
|
-
},
|
|
9638
|
-
{
|
|
9639
|
-
kind: "ref",
|
|
9640
|
-
name: "ConfigChangeBeforeEvent",
|
|
9641
|
-
},
|
|
9642
|
-
{
|
|
9643
|
-
kind: "ref",
|
|
9644
|
-
name: "ConfigChangeAfterEvent",
|
|
9645
|
-
},
|
|
9646
|
-
{
|
|
9647
|
-
kind: "ref",
|
|
9648
|
-
name: "TurnStartEvent",
|
|
9649
|
-
},
|
|
9650
|
-
{
|
|
9651
|
-
kind: "ref",
|
|
9652
|
-
name: "TurnFinishBeforeEvent",
|
|
9653
|
-
},
|
|
9654
|
-
{
|
|
9655
|
-
kind: "ref",
|
|
9656
|
-
name: "TurnEndEvent",
|
|
9657
|
-
},
|
|
9658
|
-
{
|
|
9659
|
-
kind: "ref",
|
|
9660
|
-
name: "TurnProgressEvent",
|
|
9661
|
-
},
|
|
9662
|
-
{
|
|
9663
|
-
kind: "ref",
|
|
9664
|
-
name: "ModelRequestBeforeEvent",
|
|
9665
|
-
},
|
|
9666
|
-
{
|
|
9667
|
-
kind: "ref",
|
|
9668
|
-
name: "ModelResponseAfterEvent",
|
|
9669
|
-
},
|
|
9670
|
-
{
|
|
9671
|
-
kind: "ref",
|
|
9672
|
-
name: "ModelErrorEvent",
|
|
9673
|
-
},
|
|
9674
|
-
{
|
|
9675
|
-
kind: "ref",
|
|
9676
|
-
name: "ModelSwitchBeforeEvent",
|
|
9677
|
-
},
|
|
9678
|
-
{
|
|
9679
|
-
kind: "ref",
|
|
9680
|
-
name: "ModelSwitchAfterEvent",
|
|
9681
|
-
},
|
|
9682
|
-
{
|
|
9683
|
-
kind: "ref",
|
|
9684
|
-
name: "ToolPermissionRequestEvent",
|
|
9685
|
-
},
|
|
9686
|
-
{
|
|
9687
|
-
kind: "ref",
|
|
9688
|
-
name: "ToolPermissionResolvedEvent",
|
|
9689
|
-
},
|
|
9690
|
-
{
|
|
9691
|
-
kind: "ref",
|
|
9692
|
-
name: "ToolProgressEvent",
|
|
9693
|
-
},
|
|
9694
|
-
{
|
|
9695
|
-
kind: "ref",
|
|
9696
|
-
name: "ToolBatchAfterEvent",
|
|
9697
|
-
},
|
|
9698
|
-
{
|
|
9699
|
-
kind: "ref",
|
|
9700
|
-
name: "ContextCompactBeforeEvent",
|
|
9701
|
-
},
|
|
9702
|
-
{
|
|
9703
|
-
kind: "ref",
|
|
9704
|
-
name: "ContextCompactAfterEvent",
|
|
9705
|
-
},
|
|
9706
|
-
{
|
|
9707
|
-
kind: "ref",
|
|
9708
|
-
name: "TaskChangeBeforeEvent",
|
|
9709
|
-
},
|
|
9710
|
-
{
|
|
9711
|
-
kind: "ref",
|
|
9712
|
-
name: "TaskChangeAfterEvent",
|
|
9713
|
-
},
|
|
9714
|
-
{
|
|
9715
|
-
kind: "ref",
|
|
9716
|
-
name: "UserAttentionEvent",
|
|
9717
|
-
},
|
|
9718
|
-
{
|
|
9719
|
-
kind: "ref",
|
|
9720
|
-
name: "UserElicitationRequestEvent",
|
|
9721
|
-
},
|
|
9722
|
-
{
|
|
9723
|
-
kind: "ref",
|
|
9724
|
-
name: "UserElicitationResultEvent",
|
|
9725
|
-
},
|
|
9726
|
-
{
|
|
9727
|
-
kind: "ref",
|
|
9728
|
-
name: "UserMessageInboundEvent",
|
|
9729
|
-
},
|
|
9730
|
-
{
|
|
9731
|
-
kind: "ref",
|
|
9732
|
-
name: "UserMessageOutboundEvent",
|
|
9733
|
-
},
|
|
9734
|
-
{
|
|
9735
|
-
kind: "ref",
|
|
9736
|
-
name: "WorkspaceChangeBeforeEvent",
|
|
9737
|
-
},
|
|
9738
|
-
{
|
|
9739
|
-
kind: "ref",
|
|
9740
|
-
name: "WorkspaceChangeAfterEvent",
|
|
9741
|
-
},
|
|
9742
|
-
{
|
|
9743
|
-
kind: "ref",
|
|
9744
|
-
name: "FileChangedEvent",
|
|
9745
|
-
},
|
|
9746
|
-
{
|
|
9747
|
-
kind: "ref",
|
|
9748
|
-
name: "HookFailureEvent",
|
|
9749
|
-
},
|
|
9750
|
-
],
|
|
9934
|
+
kind: "ref",
|
|
9935
|
+
name: "Event",
|
|
9751
9936
|
},
|
|
9752
9937
|
wire_name: "event",
|
|
9753
9938
|
},
|
|
@@ -12370,7 +12555,12 @@ const SCHEMAS = {
|
|
|
12370
12555
|
additional: {
|
|
12371
12556
|
kind: "allowed",
|
|
12372
12557
|
},
|
|
12373
|
-
forbidden_property_sets: [
|
|
12558
|
+
forbidden_property_sets: [
|
|
12559
|
+
["durationMs"],
|
|
12560
|
+
["execution"],
|
|
12561
|
+
["fileChanges"],
|
|
12562
|
+
["outcome"],
|
|
12563
|
+
],
|
|
12374
12564
|
kind: "object",
|
|
12375
12565
|
properties: [
|
|
12376
12566
|
{
|
|
@@ -13953,18 +14143,39 @@ function discriminatorValue(schema, property) {
|
|
|
13953
14143
|
}
|
|
13954
14144
|
return undefined;
|
|
13955
14145
|
}
|
|
13956
|
-
function toSafeJson(value) {
|
|
14146
|
+
function toSafeJson(value, ancestors = new Set()) {
|
|
13957
14147
|
if (value === null || typeof value === "string" || typeof value === "boolean")
|
|
13958
14148
|
return value;
|
|
13959
14149
|
if (typeof value === "number" && Number.isFinite(value))
|
|
13960
14150
|
return value;
|
|
13961
|
-
if (
|
|
13962
|
-
|
|
13963
|
-
|
|
14151
|
+
if (typeof value !== "object" || value === null || ancestors.has(value))
|
|
14152
|
+
throw new TypeError("Input is not an acyclic JSON value");
|
|
14153
|
+
const prototype = Object.getPrototypeOf(value);
|
|
14154
|
+
if (!Array.isArray(value) &&
|
|
14155
|
+
prototype !== Object.prototype &&
|
|
14156
|
+
prototype !== null)
|
|
14157
|
+
throw new TypeError("Expected a plain JSON object");
|
|
14158
|
+
ancestors.add(value);
|
|
14159
|
+
try {
|
|
14160
|
+
if (Array.isArray(value)) {
|
|
14161
|
+
if (Reflect.ownKeys(value).length !== value.length + 1)
|
|
14162
|
+
throw new TypeError("Expected a dense JSON array");
|
|
14163
|
+
return Array.from({ length: value.length }, (_, index) => {
|
|
14164
|
+
const property = Object.getOwnPropertyDescriptor(value, String(index));
|
|
14165
|
+
if (!property?.enumerable || !("value" in property))
|
|
14166
|
+
throw new TypeError("Expected JSON array data elements");
|
|
14167
|
+
return toSafeJson(property.value, ancestors);
|
|
14168
|
+
});
|
|
14169
|
+
}
|
|
13964
14170
|
const result = Object.create(null);
|
|
13965
|
-
for (const
|
|
14171
|
+
for (const key of Reflect.ownKeys(value)) {
|
|
14172
|
+
const property = Object.getOwnPropertyDescriptor(value, key);
|
|
14173
|
+
if (typeof key !== "string" ||
|
|
14174
|
+
!property.enumerable ||
|
|
14175
|
+
!("value" in property))
|
|
14176
|
+
throw new TypeError("Expected enumerable JSON data properties");
|
|
13966
14177
|
Object.defineProperty(result, key, {
|
|
13967
|
-
value: toSafeJson(
|
|
14178
|
+
value: toSafeJson(property.value, ancestors),
|
|
13968
14179
|
enumerable: true,
|
|
13969
14180
|
configurable: true,
|
|
13970
14181
|
writable: true,
|
|
@@ -13972,7 +14183,9 @@ function toSafeJson(value) {
|
|
|
13972
14183
|
}
|
|
13973
14184
|
return result;
|
|
13974
14185
|
}
|
|
13975
|
-
|
|
14186
|
+
finally {
|
|
14187
|
+
ancestors.delete(value);
|
|
14188
|
+
}
|
|
13976
14189
|
}
|
|
13977
14190
|
function encodeJson(value) {
|
|
13978
14191
|
return JSON.stringify(value);
|
|
@@ -13981,7 +14194,16 @@ function isObject(value) {
|
|
|
13981
14194
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
13982
14195
|
}
|
|
13983
14196
|
function sameJson(left, right) {
|
|
13984
|
-
|
|
14197
|
+
if (left === right)
|
|
14198
|
+
return true;
|
|
14199
|
+
if (Array.isArray(left) && Array.isArray(right))
|
|
14200
|
+
return (left.length === right.length &&
|
|
14201
|
+
left.every((value, index) => sameJson(value, right[index])));
|
|
14202
|
+
if (isObject(left) && isObject(right))
|
|
14203
|
+
return (Object.keys(left).length === Object.keys(right).length &&
|
|
14204
|
+
Object.keys(left).every((key) => Object.prototype.hasOwnProperty.call(right, key) &&
|
|
14205
|
+
sameJson(left[key], right[key])));
|
|
14206
|
+
return false;
|
|
13985
14207
|
}
|
|
13986
14208
|
function joinPath(path, key) {
|
|
13987
14209
|
return `${path}/${key.replace(/~/g, "~0").replace(/\//g, "~1")}`;
|
|
@@ -14045,6 +14267,13 @@ export function encodeContentUpload(value) {
|
|
|
14045
14267
|
return encodeJson(value);
|
|
14046
14268
|
}
|
|
14047
14269
|
export const contentUploadSchemaRevision = SCHEMA_REVISION;
|
|
14270
|
+
export function parseContentUploadReceipt(input) {
|
|
14271
|
+
return parseRoot("ContentUploadReceipt", input);
|
|
14272
|
+
}
|
|
14273
|
+
export function encodeContentUploadReceipt(value) {
|
|
14274
|
+
return encodeJson(value);
|
|
14275
|
+
}
|
|
14276
|
+
export const contentUploadReceiptSchemaRevision = SCHEMA_REVISION;
|
|
14048
14277
|
export function parseDenyEffect(input) {
|
|
14049
14278
|
return parseRoot("DenyEffect", input);
|
|
14050
14279
|
}
|
|
@@ -14059,6 +14288,13 @@ export function encodeEffect(value) {
|
|
|
14059
14288
|
return encodeJson(value);
|
|
14060
14289
|
}
|
|
14061
14290
|
export const effectSchemaRevision = SCHEMA_REVISION;
|
|
14291
|
+
export function parseEvent(input) {
|
|
14292
|
+
return parseRoot("Event", input);
|
|
14293
|
+
}
|
|
14294
|
+
export function encodeEvent(value) {
|
|
14295
|
+
return encodeJson(value);
|
|
14296
|
+
}
|
|
14297
|
+
export const eventSchemaRevision = SCHEMA_REVISION;
|
|
14062
14298
|
export function parseExecutionEvent(input) {
|
|
14063
14299
|
return parseRoot("ExecutionEvent", input);
|
|
14064
14300
|
}
|
|
@@ -14171,6 +14407,21 @@ export function encodeWireMessage(value) {
|
|
|
14171
14407
|
return encodeJson(value);
|
|
14172
14408
|
}
|
|
14173
14409
|
export const wireMessageSchemaRevision = SCHEMA_REVISION;
|
|
14410
|
+
/** Schema-derived family identifiers; custom strings remain supported. */
|
|
14411
|
+
export const effectNames = Object.freeze({
|
|
14412
|
+
allow: "allow",
|
|
14413
|
+
ask: "ask",
|
|
14414
|
+
deny: "deny",
|
|
14415
|
+
flow: "flow",
|
|
14416
|
+
inject: "inject",
|
|
14417
|
+
message: "message",
|
|
14418
|
+
modify: "modify",
|
|
14419
|
+
return: "return",
|
|
14420
|
+
});
|
|
14421
|
+
/** Advertised membership only, not authorization or target/operation admission. */
|
|
14422
|
+
export function supports(capabilities, effect) {
|
|
14423
|
+
return capabilities.effects.includes(effect);
|
|
14424
|
+
}
|
|
14174
14425
|
const INPUT_PATHS = {
|
|
14175
14426
|
"config.change.after": {
|
|
14176
14427
|
change: ["change"],
|