agenthooksprotocol 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +58 -20
- package/dist/src/client/content.d.ts.map +1 -1
- package/dist/src/client/content.js +358 -105
- 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 +162 -54
- 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 +6 -3
- package/dist/src/client/types.d.ts.map +1 -1
- package/dist/src/client/types.js.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 +350 -113
- package/src/client/hooks.ts +188 -60
- package/src/client/index.ts +2 -0
- package/src/client/types.ts +6 -3
- 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
package/src/draft/generated.ts
CHANGED
|
@@ -83,12 +83,15 @@ export type Authentication =
|
|
|
83
83
|
tokenEnv?: string;
|
|
84
84
|
tokenRef?: string;
|
|
85
85
|
type: "bearer";
|
|
86
|
-
} & AdditionalProperties &
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
86
|
+
} & AdditionalProperties &
|
|
87
|
+
(
|
|
88
|
+
| ({
|
|
89
|
+
tokenEnv: JsonValue;
|
|
90
|
+
} & AdditionalProperties)
|
|
91
|
+
| ({
|
|
92
|
+
tokenRef: JsonValue;
|
|
93
|
+
} & AdditionalProperties)
|
|
94
|
+
))
|
|
92
95
|
| ({
|
|
93
96
|
clientId: string;
|
|
94
97
|
clientSecretRef?: string;
|
|
@@ -141,96 +144,114 @@ export type Capabilities = {
|
|
|
141
144
|
} & AdditionalProperties;
|
|
142
145
|
} & AdditionalProperties;
|
|
143
146
|
modify?: {
|
|
144
|
-
content?:
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
147
|
+
content?: {
|
|
148
|
+
merge: boolean;
|
|
149
|
+
replace: boolean;
|
|
150
|
+
} & AdditionalProperties &
|
|
151
|
+
(
|
|
152
|
+
| ({
|
|
149
153
|
replace: true;
|
|
150
154
|
} & AdditionalProperties)
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
155
|
+
| ({
|
|
156
|
+
merge: true;
|
|
157
|
+
} & AdditionalProperties)
|
|
158
|
+
);
|
|
159
|
+
input?: {
|
|
160
|
+
merge: boolean;
|
|
161
|
+
replace: boolean;
|
|
162
|
+
} & AdditionalProperties &
|
|
163
|
+
(
|
|
164
|
+
| ({
|
|
159
165
|
replace: true;
|
|
160
166
|
} & AdditionalProperties)
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
167
|
+
| ({
|
|
168
|
+
merge: true;
|
|
169
|
+
} & AdditionalProperties)
|
|
170
|
+
);
|
|
171
|
+
instructions?: {
|
|
172
|
+
merge: boolean;
|
|
173
|
+
replace: boolean;
|
|
174
|
+
} & AdditionalProperties &
|
|
175
|
+
(
|
|
176
|
+
| ({
|
|
169
177
|
replace: true;
|
|
170
178
|
} & AdditionalProperties)
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
+
| ({
|
|
180
|
+
merge: true;
|
|
181
|
+
} & AdditionalProperties)
|
|
182
|
+
);
|
|
183
|
+
output?: {
|
|
184
|
+
merge: boolean;
|
|
185
|
+
replace: boolean;
|
|
186
|
+
} & AdditionalProperties &
|
|
187
|
+
(
|
|
188
|
+
| ({
|
|
179
189
|
replace: true;
|
|
180
190
|
} & AdditionalProperties)
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
191
|
+
| ({
|
|
192
|
+
merge: true;
|
|
193
|
+
} & AdditionalProperties)
|
|
194
|
+
);
|
|
195
|
+
prompt?: {
|
|
196
|
+
merge: boolean;
|
|
197
|
+
replace: boolean;
|
|
198
|
+
} & AdditionalProperties &
|
|
199
|
+
(
|
|
200
|
+
| ({
|
|
189
201
|
replace: true;
|
|
190
202
|
} & AdditionalProperties)
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
203
|
+
| ({
|
|
204
|
+
merge: true;
|
|
205
|
+
} & AdditionalProperties)
|
|
206
|
+
);
|
|
207
|
+
request?: {
|
|
208
|
+
merge: boolean;
|
|
209
|
+
replace: boolean;
|
|
210
|
+
} & AdditionalProperties &
|
|
211
|
+
(
|
|
212
|
+
| ({
|
|
199
213
|
replace: true;
|
|
200
214
|
} & AdditionalProperties)
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
215
|
+
| ({
|
|
216
|
+
merge: true;
|
|
217
|
+
} & AdditionalProperties)
|
|
218
|
+
);
|
|
219
|
+
response?: {
|
|
220
|
+
merge: boolean;
|
|
221
|
+
replace: boolean;
|
|
222
|
+
} & AdditionalProperties &
|
|
223
|
+
(
|
|
224
|
+
| ({
|
|
209
225
|
replace: true;
|
|
210
226
|
} & AdditionalProperties)
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
227
|
+
| ({
|
|
228
|
+
merge: true;
|
|
229
|
+
} & AdditionalProperties)
|
|
230
|
+
);
|
|
231
|
+
summary?: {
|
|
232
|
+
merge: boolean;
|
|
233
|
+
replace: boolean;
|
|
234
|
+
} & AdditionalProperties &
|
|
235
|
+
(
|
|
236
|
+
| ({
|
|
219
237
|
replace: true;
|
|
220
238
|
} & AdditionalProperties)
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
239
|
+
| ({
|
|
240
|
+
merge: true;
|
|
241
|
+
} & AdditionalProperties)
|
|
242
|
+
);
|
|
243
|
+
workspace?: {
|
|
244
|
+
merge: boolean;
|
|
245
|
+
replace: boolean;
|
|
246
|
+
} & AdditionalProperties &
|
|
247
|
+
(
|
|
248
|
+
| ({
|
|
229
249
|
replace: true;
|
|
230
250
|
} & AdditionalProperties)
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
251
|
+
| ({
|
|
252
|
+
merge: true;
|
|
253
|
+
} & AdditionalProperties)
|
|
254
|
+
);
|
|
234
255
|
} & AdditionalProperties;
|
|
235
256
|
} & AdditionalProperties;
|
|
236
257
|
|
|
@@ -341,7 +362,8 @@ export type CatalogueEvent =
|
|
|
341
362
|
| WorkspaceChangeBeforeEvent
|
|
342
363
|
| WorkspaceChangeAfterEvent
|
|
343
364
|
| FileChangedEvent
|
|
344
|
-
| HookFailureEvent
|
|
365
|
+
| HookFailureEvent
|
|
366
|
+
| UnknownVariant<"type">;
|
|
345
367
|
|
|
346
368
|
/** Source: schema/draft/catalogue-event.schema.json#/$defs/config.change.after */
|
|
347
369
|
export type ConfigChangeAfterEvent = {
|
|
@@ -409,8 +431,6 @@ export type ContentItem =
|
|
|
409
431
|
parentItemId?: string;
|
|
410
432
|
role?: string;
|
|
411
433
|
selection: "body";
|
|
412
|
-
sha256?: string;
|
|
413
|
-
size?: number;
|
|
414
434
|
synthesized?: boolean;
|
|
415
435
|
} & AdditionalProperties)
|
|
416
436
|
| ({
|
|
@@ -457,8 +477,6 @@ export type ContentItem =
|
|
|
457
477
|
/** Source: schema/draft/content-reference.schema.json# */
|
|
458
478
|
export type ContentReference = {
|
|
459
479
|
ref: string;
|
|
460
|
-
sha256: string;
|
|
461
|
-
size: number;
|
|
462
480
|
} & AdditionalProperties;
|
|
463
481
|
|
|
464
482
|
/** Source: schema/draft/content-selection.schema.json# */
|
|
@@ -480,6 +498,13 @@ export type ContentUpload = {
|
|
|
480
498
|
timeoutMs: number;
|
|
481
499
|
} & AdditionalProperties;
|
|
482
500
|
|
|
501
|
+
/** Source: schema/draft/content-upload-receipt.schema.json# */
|
|
502
|
+
export type ContentUploadReceipt = {
|
|
503
|
+
ref: string;
|
|
504
|
+
sha256: string;
|
|
505
|
+
size: number;
|
|
506
|
+
} & AdditionalProperties;
|
|
507
|
+
|
|
483
508
|
/** Source: schema/draft/capabilities.schema.json#/$defs/context.compact.after */
|
|
484
509
|
export type ContextCompactAfterCapabilities = Capabilities & {
|
|
485
510
|
effects?: Array<OpenString<"inject" | "modify" | "message">>;
|
|
@@ -559,6 +584,42 @@ export type Effect =
|
|
|
559
584
|
value: JsonValue;
|
|
560
585
|
} & AdditionalProperties);
|
|
561
586
|
|
|
587
|
+
/** Source: schema/draft/event.schema.json# */
|
|
588
|
+
export type Event =
|
|
589
|
+
| ToolBeforeEvent
|
|
590
|
+
| ToolAfterEvent
|
|
591
|
+
| SessionStartEvent
|
|
592
|
+
| SessionEndEvent
|
|
593
|
+
| ConfigChangeBeforeEvent
|
|
594
|
+
| ConfigChangeAfterEvent
|
|
595
|
+
| TurnStartEvent
|
|
596
|
+
| TurnFinishBeforeEvent
|
|
597
|
+
| TurnEndEvent
|
|
598
|
+
| TurnProgressEvent
|
|
599
|
+
| ModelRequestBeforeEvent
|
|
600
|
+
| ModelResponseAfterEvent
|
|
601
|
+
| ModelErrorEvent
|
|
602
|
+
| ModelSwitchBeforeEvent
|
|
603
|
+
| ModelSwitchAfterEvent
|
|
604
|
+
| ToolPermissionRequestEvent
|
|
605
|
+
| ToolPermissionResolvedEvent
|
|
606
|
+
| ToolProgressEvent
|
|
607
|
+
| ToolBatchAfterEvent
|
|
608
|
+
| ContextCompactBeforeEvent
|
|
609
|
+
| ContextCompactAfterEvent
|
|
610
|
+
| TaskChangeBeforeEvent
|
|
611
|
+
| TaskChangeAfterEvent
|
|
612
|
+
| UserAttentionEvent
|
|
613
|
+
| UserElicitationRequestEvent
|
|
614
|
+
| UserElicitationResultEvent
|
|
615
|
+
| UserMessageInboundEvent
|
|
616
|
+
| UserMessageOutboundEvent
|
|
617
|
+
| WorkspaceChangeBeforeEvent
|
|
618
|
+
| WorkspaceChangeAfterEvent
|
|
619
|
+
| FileChangedEvent
|
|
620
|
+
| HookFailureEvent
|
|
621
|
+
| UnknownVariant<"type">;
|
|
622
|
+
|
|
562
623
|
/** Source: schema/draft/execution-event.schema.json# */
|
|
563
624
|
export type ExecutionEvent =
|
|
564
625
|
| ExecutionEventTurnStart
|
|
@@ -721,12 +782,15 @@ export type ExecutionEventMcp = {
|
|
|
721
782
|
>;
|
|
722
783
|
transport: "http";
|
|
723
784
|
url?: string;
|
|
724
|
-
} & AdditionalProperties &
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
785
|
+
} & AdditionalProperties &
|
|
786
|
+
(
|
|
787
|
+
| ({
|
|
788
|
+
url: JsonValue;
|
|
789
|
+
} & AdditionalProperties)
|
|
790
|
+
| ({
|
|
791
|
+
gaps: JsonValue;
|
|
792
|
+
} & AdditionalProperties)
|
|
793
|
+
))
|
|
730
794
|
| ({
|
|
731
795
|
gaps?: Array<
|
|
732
796
|
{
|
|
@@ -736,12 +800,15 @@ export type ExecutionEventMcp = {
|
|
|
736
800
|
>;
|
|
737
801
|
transport: "sse";
|
|
738
802
|
url?: string;
|
|
739
|
-
} & AdditionalProperties &
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
803
|
+
} & AdditionalProperties &
|
|
804
|
+
(
|
|
805
|
+
| ({
|
|
806
|
+
url: JsonValue;
|
|
807
|
+
} & AdditionalProperties)
|
|
808
|
+
| ({
|
|
809
|
+
gaps: JsonValue;
|
|
810
|
+
} & AdditionalProperties)
|
|
811
|
+
))
|
|
745
812
|
| ({
|
|
746
813
|
args?: Array<string>;
|
|
747
814
|
command?: string;
|
|
@@ -753,22 +820,31 @@ export type ExecutionEventMcp = {
|
|
|
753
820
|
} & AdditionalProperties
|
|
754
821
|
>;
|
|
755
822
|
transport: "stdio";
|
|
756
|
-
} & AdditionalProperties &
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
823
|
+
} & AdditionalProperties &
|
|
824
|
+
(
|
|
825
|
+
| ({
|
|
826
|
+
command: JsonValue;
|
|
827
|
+
} & AdditionalProperties)
|
|
828
|
+
| ({
|
|
829
|
+
gaps: JsonValue;
|
|
830
|
+
} & AdditionalProperties)
|
|
831
|
+
) &
|
|
832
|
+
(
|
|
833
|
+
| ({
|
|
834
|
+
args: JsonValue;
|
|
835
|
+
} & AdditionalProperties)
|
|
836
|
+
| ({
|
|
837
|
+
gaps: JsonValue;
|
|
838
|
+
} & AdditionalProperties)
|
|
839
|
+
) &
|
|
840
|
+
(
|
|
841
|
+
| ({
|
|
842
|
+
cwd: JsonValue;
|
|
843
|
+
} & AdditionalProperties)
|
|
844
|
+
| ({
|
|
845
|
+
gaps: JsonValue;
|
|
846
|
+
} & AdditionalProperties)
|
|
847
|
+
))
|
|
772
848
|
| ({
|
|
773
849
|
address?: string;
|
|
774
850
|
addressForm?: string;
|
|
@@ -779,17 +855,23 @@ export type ExecutionEventMcp = {
|
|
|
779
855
|
} & AdditionalProperties
|
|
780
856
|
>;
|
|
781
857
|
transport: string;
|
|
782
|
-
} & AdditionalProperties &
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
858
|
+
} & AdditionalProperties &
|
|
859
|
+
(
|
|
860
|
+
| ({
|
|
861
|
+
addressForm: JsonValue;
|
|
862
|
+
} & AdditionalProperties)
|
|
863
|
+
| ({
|
|
864
|
+
gaps: JsonValue;
|
|
865
|
+
} & AdditionalProperties)
|
|
866
|
+
) &
|
|
867
|
+
(
|
|
868
|
+
| ({
|
|
869
|
+
address: JsonValue;
|
|
870
|
+
} & AdditionalProperties)
|
|
871
|
+
| ({
|
|
872
|
+
gaps: JsonValue;
|
|
873
|
+
} & AdditionalProperties)
|
|
874
|
+
))
|
|
793
875
|
| UnknownVariant<"transport">;
|
|
794
876
|
provenance: OpenString<"runtime" | "inferred">;
|
|
795
877
|
server: {
|
|
@@ -1414,26 +1496,7 @@ export type InterceptRequest = JsonRpcRequest & {
|
|
|
1414
1496
|
capabilities: Capabilities & {
|
|
1415
1497
|
flow?: JsonValue;
|
|
1416
1498
|
} & AdditionalProperties;
|
|
1417
|
-
event:
|
|
1418
|
-
| ToolBeforeEvent
|
|
1419
|
-
| ToolAfterEvent
|
|
1420
|
-
| SessionStartEvent
|
|
1421
|
-
| ConfigChangeBeforeEvent
|
|
1422
|
-
| TurnStartEvent
|
|
1423
|
-
| TurnFinishBeforeEvent
|
|
1424
|
-
| ModelRequestBeforeEvent
|
|
1425
|
-
| ModelSwitchBeforeEvent
|
|
1426
|
-
| ToolPermissionRequestEvent
|
|
1427
|
-
| ToolBatchAfterEvent
|
|
1428
|
-
| ContextCompactBeforeEvent
|
|
1429
|
-
| ContextCompactAfterEvent
|
|
1430
|
-
| TaskChangeBeforeEvent
|
|
1431
|
-
| UserElicitationRequestEvent
|
|
1432
|
-
| UserElicitationResultEvent
|
|
1433
|
-
| UserMessageInboundEvent
|
|
1434
|
-
| UserMessageOutboundEvent
|
|
1435
|
-
| WorkspaceChangeBeforeEvent
|
|
1436
|
-
| ModelResponseAfterEvent;
|
|
1499
|
+
event: Event;
|
|
1437
1500
|
extensions?: Extensions;
|
|
1438
1501
|
protocolVersion: ProtocolVersion;
|
|
1439
1502
|
state?: {
|
|
@@ -1760,39 +1823,7 @@ export type NativeEvent = JsonValue;
|
|
|
1760
1823
|
export type ObserveNotification = JsonRpcNotification & {
|
|
1761
1824
|
method?: "hooks/observe";
|
|
1762
1825
|
params?: {
|
|
1763
|
-
event:
|
|
1764
|
-
| ToolBeforeEvent
|
|
1765
|
-
| ToolAfterEvent
|
|
1766
|
-
| SessionStartEvent
|
|
1767
|
-
| SessionEndEvent
|
|
1768
|
-
| ConfigChangeBeforeEvent
|
|
1769
|
-
| ConfigChangeAfterEvent
|
|
1770
|
-
| TurnStartEvent
|
|
1771
|
-
| TurnFinishBeforeEvent
|
|
1772
|
-
| TurnEndEvent
|
|
1773
|
-
| TurnProgressEvent
|
|
1774
|
-
| ModelRequestBeforeEvent
|
|
1775
|
-
| ModelResponseAfterEvent
|
|
1776
|
-
| ModelErrorEvent
|
|
1777
|
-
| ModelSwitchBeforeEvent
|
|
1778
|
-
| ModelSwitchAfterEvent
|
|
1779
|
-
| ToolPermissionRequestEvent
|
|
1780
|
-
| ToolPermissionResolvedEvent
|
|
1781
|
-
| ToolProgressEvent
|
|
1782
|
-
| ToolBatchAfterEvent
|
|
1783
|
-
| ContextCompactBeforeEvent
|
|
1784
|
-
| ContextCompactAfterEvent
|
|
1785
|
-
| TaskChangeBeforeEvent
|
|
1786
|
-
| TaskChangeAfterEvent
|
|
1787
|
-
| UserAttentionEvent
|
|
1788
|
-
| UserElicitationRequestEvent
|
|
1789
|
-
| UserElicitationResultEvent
|
|
1790
|
-
| UserMessageInboundEvent
|
|
1791
|
-
| UserMessageOutboundEvent
|
|
1792
|
-
| WorkspaceChangeBeforeEvent
|
|
1793
|
-
| WorkspaceChangeAfterEvent
|
|
1794
|
-
| FileChangedEvent
|
|
1795
|
-
| HookFailureEvent;
|
|
1826
|
+
event: Event;
|
|
1796
1827
|
protocolVersion: ProtocolVersion;
|
|
1797
1828
|
} & AdditionalProperties;
|
|
1798
1829
|
} & AdditionalProperties;
|
|
@@ -3913,6 +3944,7 @@ const SCHEMAS: Record<string, SchemaNode> = {
|
|
|
3913
3944
|
],
|
|
3914
3945
|
},
|
|
3915
3946
|
CatalogueEvent: {
|
|
3947
|
+
discriminator: "type",
|
|
3916
3948
|
kind: "union",
|
|
3917
3949
|
mode: "oneOf",
|
|
3918
3950
|
variants: [
|
|
@@ -4374,7 +4406,7 @@ const SCHEMAS: Record<string, SchemaNode> = {
|
|
|
4374
4406
|
additional: {
|
|
4375
4407
|
kind: "forbidden",
|
|
4376
4408
|
},
|
|
4377
|
-
forbidden_property_sets: [],
|
|
4409
|
+
forbidden_property_sets: [["sha256"], ["size"]],
|
|
4378
4410
|
kind: "object",
|
|
4379
4411
|
properties: [
|
|
4380
4412
|
{
|
|
@@ -4435,20 +4467,6 @@ const SCHEMAS: Record<string, SchemaNode> = {
|
|
|
4435
4467
|
},
|
|
4436
4468
|
wire_name: "selection",
|
|
4437
4469
|
},
|
|
4438
|
-
{
|
|
4439
|
-
required: false,
|
|
4440
|
-
shape: {
|
|
4441
|
-
kind: "string",
|
|
4442
|
-
},
|
|
4443
|
-
wire_name: "sha256",
|
|
4444
|
-
},
|
|
4445
|
-
{
|
|
4446
|
-
required: false,
|
|
4447
|
-
shape: {
|
|
4448
|
-
kind: "integer",
|
|
4449
|
-
},
|
|
4450
|
-
wire_name: "size",
|
|
4451
|
-
},
|
|
4452
4470
|
{
|
|
4453
4471
|
required: false,
|
|
4454
4472
|
shape: {
|
|
@@ -4731,7 +4749,7 @@ const SCHEMAS: Record<string, SchemaNode> = {
|
|
|
4731
4749
|
additional: {
|
|
4732
4750
|
kind: "forbidden",
|
|
4733
4751
|
},
|
|
4734
|
-
forbidden_property_sets: [],
|
|
4752
|
+
forbidden_property_sets: [["sha256"], ["size"]],
|
|
4735
4753
|
kind: "object",
|
|
4736
4754
|
properties: [
|
|
4737
4755
|
{
|
|
@@ -4741,20 +4759,6 @@ const SCHEMAS: Record<string, SchemaNode> = {
|
|
|
4741
4759
|
},
|
|
4742
4760
|
wire_name: "ref",
|
|
4743
4761
|
},
|
|
4744
|
-
{
|
|
4745
|
-
required: true,
|
|
4746
|
-
shape: {
|
|
4747
|
-
kind: "string",
|
|
4748
|
-
},
|
|
4749
|
-
wire_name: "sha256",
|
|
4750
|
-
},
|
|
4751
|
-
{
|
|
4752
|
-
required: true,
|
|
4753
|
-
shape: {
|
|
4754
|
-
kind: "integer",
|
|
4755
|
-
},
|
|
4756
|
-
wire_name: "size",
|
|
4757
|
-
},
|
|
4758
4762
|
],
|
|
4759
4763
|
},
|
|
4760
4764
|
ContentSelection: {
|
|
@@ -4867,6 +4871,36 @@ const SCHEMAS: Record<string, SchemaNode> = {
|
|
|
4867
4871
|
},
|
|
4868
4872
|
],
|
|
4869
4873
|
},
|
|
4874
|
+
ContentUploadReceipt: {
|
|
4875
|
+
additional: {
|
|
4876
|
+
kind: "forbidden",
|
|
4877
|
+
},
|
|
4878
|
+
forbidden_property_sets: [],
|
|
4879
|
+
kind: "object",
|
|
4880
|
+
properties: [
|
|
4881
|
+
{
|
|
4882
|
+
required: true,
|
|
4883
|
+
shape: {
|
|
4884
|
+
kind: "string",
|
|
4885
|
+
},
|
|
4886
|
+
wire_name: "ref",
|
|
4887
|
+
},
|
|
4888
|
+
{
|
|
4889
|
+
required: true,
|
|
4890
|
+
shape: {
|
|
4891
|
+
kind: "string",
|
|
4892
|
+
},
|
|
4893
|
+
wire_name: "sha256",
|
|
4894
|
+
},
|
|
4895
|
+
{
|
|
4896
|
+
required: true,
|
|
4897
|
+
shape: {
|
|
4898
|
+
kind: "integer",
|
|
4899
|
+
},
|
|
4900
|
+
wire_name: "size",
|
|
4901
|
+
},
|
|
4902
|
+
],
|
|
4903
|
+
},
|
|
4870
4904
|
ContextCompactAfterCapabilities: {
|
|
4871
4905
|
kind: "intersection",
|
|
4872
4906
|
variants: [
|
|
@@ -5255,6 +5289,141 @@ const SCHEMAS: Record<string, SchemaNode> = {
|
|
|
5255
5289
|
},
|
|
5256
5290
|
],
|
|
5257
5291
|
},
|
|
5292
|
+
Event: {
|
|
5293
|
+
discriminator: "type",
|
|
5294
|
+
kind: "union",
|
|
5295
|
+
mode: "oneOf",
|
|
5296
|
+
variants: [
|
|
5297
|
+
{
|
|
5298
|
+
kind: "ref",
|
|
5299
|
+
name: "ToolBeforeEvent",
|
|
5300
|
+
},
|
|
5301
|
+
{
|
|
5302
|
+
kind: "ref",
|
|
5303
|
+
name: "ToolAfterEvent",
|
|
5304
|
+
},
|
|
5305
|
+
{
|
|
5306
|
+
kind: "ref",
|
|
5307
|
+
name: "SessionStartEvent",
|
|
5308
|
+
},
|
|
5309
|
+
{
|
|
5310
|
+
kind: "ref",
|
|
5311
|
+
name: "SessionEndEvent",
|
|
5312
|
+
},
|
|
5313
|
+
{
|
|
5314
|
+
kind: "ref",
|
|
5315
|
+
name: "ConfigChangeBeforeEvent",
|
|
5316
|
+
},
|
|
5317
|
+
{
|
|
5318
|
+
kind: "ref",
|
|
5319
|
+
name: "ConfigChangeAfterEvent",
|
|
5320
|
+
},
|
|
5321
|
+
{
|
|
5322
|
+
kind: "ref",
|
|
5323
|
+
name: "TurnStartEvent",
|
|
5324
|
+
},
|
|
5325
|
+
{
|
|
5326
|
+
kind: "ref",
|
|
5327
|
+
name: "TurnFinishBeforeEvent",
|
|
5328
|
+
},
|
|
5329
|
+
{
|
|
5330
|
+
kind: "ref",
|
|
5331
|
+
name: "TurnEndEvent",
|
|
5332
|
+
},
|
|
5333
|
+
{
|
|
5334
|
+
kind: "ref",
|
|
5335
|
+
name: "TurnProgressEvent",
|
|
5336
|
+
},
|
|
5337
|
+
{
|
|
5338
|
+
kind: "ref",
|
|
5339
|
+
name: "ModelRequestBeforeEvent",
|
|
5340
|
+
},
|
|
5341
|
+
{
|
|
5342
|
+
kind: "ref",
|
|
5343
|
+
name: "ModelResponseAfterEvent",
|
|
5344
|
+
},
|
|
5345
|
+
{
|
|
5346
|
+
kind: "ref",
|
|
5347
|
+
name: "ModelErrorEvent",
|
|
5348
|
+
},
|
|
5349
|
+
{
|
|
5350
|
+
kind: "ref",
|
|
5351
|
+
name: "ModelSwitchBeforeEvent",
|
|
5352
|
+
},
|
|
5353
|
+
{
|
|
5354
|
+
kind: "ref",
|
|
5355
|
+
name: "ModelSwitchAfterEvent",
|
|
5356
|
+
},
|
|
5357
|
+
{
|
|
5358
|
+
kind: "ref",
|
|
5359
|
+
name: "ToolPermissionRequestEvent",
|
|
5360
|
+
},
|
|
5361
|
+
{
|
|
5362
|
+
kind: "ref",
|
|
5363
|
+
name: "ToolPermissionResolvedEvent",
|
|
5364
|
+
},
|
|
5365
|
+
{
|
|
5366
|
+
kind: "ref",
|
|
5367
|
+
name: "ToolProgressEvent",
|
|
5368
|
+
},
|
|
5369
|
+
{
|
|
5370
|
+
kind: "ref",
|
|
5371
|
+
name: "ToolBatchAfterEvent",
|
|
5372
|
+
},
|
|
5373
|
+
{
|
|
5374
|
+
kind: "ref",
|
|
5375
|
+
name: "ContextCompactBeforeEvent",
|
|
5376
|
+
},
|
|
5377
|
+
{
|
|
5378
|
+
kind: "ref",
|
|
5379
|
+
name: "ContextCompactAfterEvent",
|
|
5380
|
+
},
|
|
5381
|
+
{
|
|
5382
|
+
kind: "ref",
|
|
5383
|
+
name: "TaskChangeBeforeEvent",
|
|
5384
|
+
},
|
|
5385
|
+
{
|
|
5386
|
+
kind: "ref",
|
|
5387
|
+
name: "TaskChangeAfterEvent",
|
|
5388
|
+
},
|
|
5389
|
+
{
|
|
5390
|
+
kind: "ref",
|
|
5391
|
+
name: "UserAttentionEvent",
|
|
5392
|
+
},
|
|
5393
|
+
{
|
|
5394
|
+
kind: "ref",
|
|
5395
|
+
name: "UserElicitationRequestEvent",
|
|
5396
|
+
},
|
|
5397
|
+
{
|
|
5398
|
+
kind: "ref",
|
|
5399
|
+
name: "UserElicitationResultEvent",
|
|
5400
|
+
},
|
|
5401
|
+
{
|
|
5402
|
+
kind: "ref",
|
|
5403
|
+
name: "UserMessageInboundEvent",
|
|
5404
|
+
},
|
|
5405
|
+
{
|
|
5406
|
+
kind: "ref",
|
|
5407
|
+
name: "UserMessageOutboundEvent",
|
|
5408
|
+
},
|
|
5409
|
+
{
|
|
5410
|
+
kind: "ref",
|
|
5411
|
+
name: "WorkspaceChangeBeforeEvent",
|
|
5412
|
+
},
|
|
5413
|
+
{
|
|
5414
|
+
kind: "ref",
|
|
5415
|
+
name: "WorkspaceChangeAfterEvent",
|
|
5416
|
+
},
|
|
5417
|
+
{
|
|
5418
|
+
kind: "ref",
|
|
5419
|
+
name: "FileChangedEvent",
|
|
5420
|
+
},
|
|
5421
|
+
{
|
|
5422
|
+
kind: "ref",
|
|
5423
|
+
name: "HookFailureEvent",
|
|
5424
|
+
},
|
|
5425
|
+
],
|
|
5426
|
+
},
|
|
5258
5427
|
ExecutionEvent: {
|
|
5259
5428
|
discriminator: "type",
|
|
5260
5429
|
kind: "union",
|
|
@@ -6705,7 +6874,7 @@ const SCHEMAS: Record<string, SchemaNode> = {
|
|
|
6705
6874
|
additional: {
|
|
6706
6875
|
kind: "allowed",
|
|
6707
6876
|
},
|
|
6708
|
-
forbidden_property_sets: [],
|
|
6877
|
+
forbidden_property_sets: [["finishReason"]],
|
|
6709
6878
|
kind: "object",
|
|
6710
6879
|
properties: [
|
|
6711
6880
|
{
|
|
@@ -6925,7 +7094,13 @@ const SCHEMAS: Record<string, SchemaNode> = {
|
|
|
6925
7094
|
additional: {
|
|
6926
7095
|
kind: "allowed",
|
|
6927
7096
|
},
|
|
6928
|
-
forbidden_property_sets: [
|
|
7097
|
+
forbidden_property_sets: [
|
|
7098
|
+
["error"],
|
|
7099
|
+
["execution"],
|
|
7100
|
+
["finishReason"],
|
|
7101
|
+
["latencyMs"],
|
|
7102
|
+
["usage"],
|
|
7103
|
+
],
|
|
6929
7104
|
kind: "object",
|
|
6930
7105
|
properties: [
|
|
6931
7106
|
{
|
|
@@ -7097,7 +7272,7 @@ const SCHEMAS: Record<string, SchemaNode> = {
|
|
|
7097
7272
|
additional: {
|
|
7098
7273
|
kind: "allowed",
|
|
7099
7274
|
},
|
|
7100
|
-
forbidden_property_sets: [],
|
|
7275
|
+
forbidden_property_sets: [["error"]],
|
|
7101
7276
|
kind: "object",
|
|
7102
7277
|
properties: [
|
|
7103
7278
|
{
|
|
@@ -7287,7 +7462,7 @@ const SCHEMAS: Record<string, SchemaNode> = {
|
|
|
7287
7462
|
additional: {
|
|
7288
7463
|
kind: "allowed",
|
|
7289
7464
|
},
|
|
7290
|
-
forbidden_property_sets: [],
|
|
7465
|
+
forbidden_property_sets: [["proposed"]],
|
|
7291
7466
|
kind: "object",
|
|
7292
7467
|
properties: [
|
|
7293
7468
|
{
|
|
@@ -7454,7 +7629,7 @@ const SCHEMAS: Record<string, SchemaNode> = {
|
|
|
7454
7629
|
additional: {
|
|
7455
7630
|
kind: "allowed",
|
|
7456
7631
|
},
|
|
7457
|
-
forbidden_property_sets: [],
|
|
7632
|
+
forbidden_property_sets: [["previous"]],
|
|
7458
7633
|
kind: "object",
|
|
7459
7634
|
properties: [
|
|
7460
7635
|
{
|
|
@@ -7984,7 +8159,12 @@ const SCHEMAS: Record<string, SchemaNode> = {
|
|
|
7984
8159
|
additional: {
|
|
7985
8160
|
kind: "allowed",
|
|
7986
8161
|
},
|
|
7987
|
-
forbidden_property_sets: [
|
|
8162
|
+
forbidden_property_sets: [
|
|
8163
|
+
["decidedBy"],
|
|
8164
|
+
["decision"],
|
|
8165
|
+
["execution"],
|
|
8166
|
+
["outcome"],
|
|
8167
|
+
],
|
|
7988
8168
|
kind: "object",
|
|
7989
8169
|
properties: [
|
|
7990
8170
|
{
|
|
@@ -8412,7 +8592,7 @@ const SCHEMAS: Record<string, SchemaNode> = {
|
|
|
8412
8592
|
additional: {
|
|
8413
8593
|
kind: "allowed",
|
|
8414
8594
|
},
|
|
8415
|
-
forbidden_property_sets: [],
|
|
8595
|
+
forbidden_property_sets: [["execution"], ["outcome"]],
|
|
8416
8596
|
kind: "object",
|
|
8417
8597
|
properties: [
|
|
8418
8598
|
{
|
|
@@ -10437,84 +10617,250 @@ const SCHEMAS: Record<string, SchemaNode> = {
|
|
|
10437
10617
|
{
|
|
10438
10618
|
required: true,
|
|
10439
10619
|
shape: {
|
|
10440
|
-
kind: "
|
|
10441
|
-
mode: "oneOf",
|
|
10620
|
+
kind: "intersection",
|
|
10442
10621
|
variants: [
|
|
10443
10622
|
{
|
|
10444
10623
|
kind: "ref",
|
|
10445
|
-
name: "
|
|
10446
|
-
},
|
|
10447
|
-
{
|
|
10448
|
-
kind: "ref",
|
|
10449
|
-
name: "ToolAfterEvent",
|
|
10450
|
-
},
|
|
10451
|
-
{
|
|
10452
|
-
kind: "ref",
|
|
10453
|
-
name: "SessionStartEvent",
|
|
10454
|
-
},
|
|
10455
|
-
{
|
|
10456
|
-
kind: "ref",
|
|
10457
|
-
name: "ConfigChangeBeforeEvent",
|
|
10458
|
-
},
|
|
10459
|
-
{
|
|
10460
|
-
kind: "ref",
|
|
10461
|
-
name: "TurnStartEvent",
|
|
10462
|
-
},
|
|
10463
|
-
{
|
|
10464
|
-
kind: "ref",
|
|
10465
|
-
name: "TurnFinishBeforeEvent",
|
|
10466
|
-
},
|
|
10467
|
-
{
|
|
10468
|
-
kind: "ref",
|
|
10469
|
-
name: "ModelRequestBeforeEvent",
|
|
10470
|
-
},
|
|
10471
|
-
{
|
|
10472
|
-
kind: "ref",
|
|
10473
|
-
name: "ModelSwitchBeforeEvent",
|
|
10474
|
-
},
|
|
10475
|
-
{
|
|
10476
|
-
kind: "ref",
|
|
10477
|
-
name: "ToolPermissionRequestEvent",
|
|
10478
|
-
},
|
|
10479
|
-
{
|
|
10480
|
-
kind: "ref",
|
|
10481
|
-
name: "ToolBatchAfterEvent",
|
|
10482
|
-
},
|
|
10483
|
-
{
|
|
10484
|
-
kind: "ref",
|
|
10485
|
-
name: "ContextCompactBeforeEvent",
|
|
10486
|
-
},
|
|
10487
|
-
{
|
|
10488
|
-
kind: "ref",
|
|
10489
|
-
name: "ContextCompactAfterEvent",
|
|
10490
|
-
},
|
|
10491
|
-
{
|
|
10492
|
-
kind: "ref",
|
|
10493
|
-
name: "TaskChangeBeforeEvent",
|
|
10494
|
-
},
|
|
10495
|
-
{
|
|
10496
|
-
kind: "ref",
|
|
10497
|
-
name: "UserElicitationRequestEvent",
|
|
10498
|
-
},
|
|
10499
|
-
{
|
|
10500
|
-
kind: "ref",
|
|
10501
|
-
name: "UserElicitationResultEvent",
|
|
10502
|
-
},
|
|
10503
|
-
{
|
|
10504
|
-
kind: "ref",
|
|
10505
|
-
name: "UserMessageInboundEvent",
|
|
10506
|
-
},
|
|
10507
|
-
{
|
|
10508
|
-
kind: "ref",
|
|
10509
|
-
name: "UserMessageOutboundEvent",
|
|
10510
|
-
},
|
|
10511
|
-
{
|
|
10512
|
-
kind: "ref",
|
|
10513
|
-
name: "WorkspaceChangeBeforeEvent",
|
|
10624
|
+
name: "Event",
|
|
10514
10625
|
},
|
|
10515
10626
|
{
|
|
10516
|
-
|
|
10517
|
-
|
|
10627
|
+
discriminator: "type",
|
|
10628
|
+
kind: "union",
|
|
10629
|
+
mode: "oneOf",
|
|
10630
|
+
variants: [
|
|
10631
|
+
{
|
|
10632
|
+
kind: "ref",
|
|
10633
|
+
name: "ToolBeforeEvent",
|
|
10634
|
+
},
|
|
10635
|
+
{
|
|
10636
|
+
kind: "ref",
|
|
10637
|
+
name: "ToolAfterEvent",
|
|
10638
|
+
},
|
|
10639
|
+
{
|
|
10640
|
+
kind: "ref",
|
|
10641
|
+
name: "SessionStartEvent",
|
|
10642
|
+
},
|
|
10643
|
+
{
|
|
10644
|
+
kind: "ref",
|
|
10645
|
+
name: "ConfigChangeBeforeEvent",
|
|
10646
|
+
},
|
|
10647
|
+
{
|
|
10648
|
+
kind: "ref",
|
|
10649
|
+
name: "TurnStartEvent",
|
|
10650
|
+
},
|
|
10651
|
+
{
|
|
10652
|
+
kind: "ref",
|
|
10653
|
+
name: "TurnFinishBeforeEvent",
|
|
10654
|
+
},
|
|
10655
|
+
{
|
|
10656
|
+
kind: "ref",
|
|
10657
|
+
name: "ModelRequestBeforeEvent",
|
|
10658
|
+
},
|
|
10659
|
+
{
|
|
10660
|
+
kind: "ref",
|
|
10661
|
+
name: "ModelSwitchBeforeEvent",
|
|
10662
|
+
},
|
|
10663
|
+
{
|
|
10664
|
+
kind: "ref",
|
|
10665
|
+
name: "ToolPermissionRequestEvent",
|
|
10666
|
+
},
|
|
10667
|
+
{
|
|
10668
|
+
kind: "ref",
|
|
10669
|
+
name: "ToolBatchAfterEvent",
|
|
10670
|
+
},
|
|
10671
|
+
{
|
|
10672
|
+
kind: "ref",
|
|
10673
|
+
name: "ContextCompactBeforeEvent",
|
|
10674
|
+
},
|
|
10675
|
+
{
|
|
10676
|
+
kind: "ref",
|
|
10677
|
+
name: "ContextCompactAfterEvent",
|
|
10678
|
+
},
|
|
10679
|
+
{
|
|
10680
|
+
kind: "ref",
|
|
10681
|
+
name: "TaskChangeBeforeEvent",
|
|
10682
|
+
},
|
|
10683
|
+
{
|
|
10684
|
+
kind: "ref",
|
|
10685
|
+
name: "UserElicitationRequestEvent",
|
|
10686
|
+
},
|
|
10687
|
+
{
|
|
10688
|
+
kind: "ref",
|
|
10689
|
+
name: "UserElicitationResultEvent",
|
|
10690
|
+
},
|
|
10691
|
+
{
|
|
10692
|
+
kind: "ref",
|
|
10693
|
+
name: "UserMessageInboundEvent",
|
|
10694
|
+
},
|
|
10695
|
+
{
|
|
10696
|
+
kind: "ref",
|
|
10697
|
+
name: "UserMessageOutboundEvent",
|
|
10698
|
+
},
|
|
10699
|
+
{
|
|
10700
|
+
kind: "ref",
|
|
10701
|
+
name: "WorkspaceChangeBeforeEvent",
|
|
10702
|
+
},
|
|
10703
|
+
{
|
|
10704
|
+
kind: "ref",
|
|
10705
|
+
name: "ModelResponseAfterEvent",
|
|
10706
|
+
},
|
|
10707
|
+
{
|
|
10708
|
+
kind: "intersection",
|
|
10709
|
+
variants: [
|
|
10710
|
+
{
|
|
10711
|
+
kind: "ref",
|
|
10712
|
+
name: "SessionEndEvent",
|
|
10713
|
+
},
|
|
10714
|
+
{
|
|
10715
|
+
kind: "never",
|
|
10716
|
+
},
|
|
10717
|
+
],
|
|
10718
|
+
},
|
|
10719
|
+
{
|
|
10720
|
+
kind: "intersection",
|
|
10721
|
+
variants: [
|
|
10722
|
+
{
|
|
10723
|
+
kind: "ref",
|
|
10724
|
+
name: "ConfigChangeAfterEvent",
|
|
10725
|
+
},
|
|
10726
|
+
{
|
|
10727
|
+
kind: "never",
|
|
10728
|
+
},
|
|
10729
|
+
],
|
|
10730
|
+
},
|
|
10731
|
+
{
|
|
10732
|
+
kind: "intersection",
|
|
10733
|
+
variants: [
|
|
10734
|
+
{
|
|
10735
|
+
kind: "ref",
|
|
10736
|
+
name: "TurnEndEvent",
|
|
10737
|
+
},
|
|
10738
|
+
{
|
|
10739
|
+
kind: "never",
|
|
10740
|
+
},
|
|
10741
|
+
],
|
|
10742
|
+
},
|
|
10743
|
+
{
|
|
10744
|
+
kind: "intersection",
|
|
10745
|
+
variants: [
|
|
10746
|
+
{
|
|
10747
|
+
kind: "ref",
|
|
10748
|
+
name: "TurnProgressEvent",
|
|
10749
|
+
},
|
|
10750
|
+
{
|
|
10751
|
+
kind: "never",
|
|
10752
|
+
},
|
|
10753
|
+
],
|
|
10754
|
+
},
|
|
10755
|
+
{
|
|
10756
|
+
kind: "intersection",
|
|
10757
|
+
variants: [
|
|
10758
|
+
{
|
|
10759
|
+
kind: "ref",
|
|
10760
|
+
name: "ModelErrorEvent",
|
|
10761
|
+
},
|
|
10762
|
+
{
|
|
10763
|
+
kind: "never",
|
|
10764
|
+
},
|
|
10765
|
+
],
|
|
10766
|
+
},
|
|
10767
|
+
{
|
|
10768
|
+
kind: "intersection",
|
|
10769
|
+
variants: [
|
|
10770
|
+
{
|
|
10771
|
+
kind: "ref",
|
|
10772
|
+
name: "ModelSwitchAfterEvent",
|
|
10773
|
+
},
|
|
10774
|
+
{
|
|
10775
|
+
kind: "never",
|
|
10776
|
+
},
|
|
10777
|
+
],
|
|
10778
|
+
},
|
|
10779
|
+
{
|
|
10780
|
+
kind: "intersection",
|
|
10781
|
+
variants: [
|
|
10782
|
+
{
|
|
10783
|
+
kind: "ref",
|
|
10784
|
+
name: "ToolPermissionResolvedEvent",
|
|
10785
|
+
},
|
|
10786
|
+
{
|
|
10787
|
+
kind: "never",
|
|
10788
|
+
},
|
|
10789
|
+
],
|
|
10790
|
+
},
|
|
10791
|
+
{
|
|
10792
|
+
kind: "intersection",
|
|
10793
|
+
variants: [
|
|
10794
|
+
{
|
|
10795
|
+
kind: "ref",
|
|
10796
|
+
name: "ToolProgressEvent",
|
|
10797
|
+
},
|
|
10798
|
+
{
|
|
10799
|
+
kind: "never",
|
|
10800
|
+
},
|
|
10801
|
+
],
|
|
10802
|
+
},
|
|
10803
|
+
{
|
|
10804
|
+
kind: "intersection",
|
|
10805
|
+
variants: [
|
|
10806
|
+
{
|
|
10807
|
+
kind: "ref",
|
|
10808
|
+
name: "TaskChangeAfterEvent",
|
|
10809
|
+
},
|
|
10810
|
+
{
|
|
10811
|
+
kind: "never",
|
|
10812
|
+
},
|
|
10813
|
+
],
|
|
10814
|
+
},
|
|
10815
|
+
{
|
|
10816
|
+
kind: "intersection",
|
|
10817
|
+
variants: [
|
|
10818
|
+
{
|
|
10819
|
+
kind: "ref",
|
|
10820
|
+
name: "UserAttentionEvent",
|
|
10821
|
+
},
|
|
10822
|
+
{
|
|
10823
|
+
kind: "never",
|
|
10824
|
+
},
|
|
10825
|
+
],
|
|
10826
|
+
},
|
|
10827
|
+
{
|
|
10828
|
+
kind: "intersection",
|
|
10829
|
+
variants: [
|
|
10830
|
+
{
|
|
10831
|
+
kind: "ref",
|
|
10832
|
+
name: "WorkspaceChangeAfterEvent",
|
|
10833
|
+
},
|
|
10834
|
+
{
|
|
10835
|
+
kind: "never",
|
|
10836
|
+
},
|
|
10837
|
+
],
|
|
10838
|
+
},
|
|
10839
|
+
{
|
|
10840
|
+
kind: "intersection",
|
|
10841
|
+
variants: [
|
|
10842
|
+
{
|
|
10843
|
+
kind: "ref",
|
|
10844
|
+
name: "FileChangedEvent",
|
|
10845
|
+
},
|
|
10846
|
+
{
|
|
10847
|
+
kind: "never",
|
|
10848
|
+
},
|
|
10849
|
+
],
|
|
10850
|
+
},
|
|
10851
|
+
{
|
|
10852
|
+
kind: "intersection",
|
|
10853
|
+
variants: [
|
|
10854
|
+
{
|
|
10855
|
+
kind: "ref",
|
|
10856
|
+
name: "HookFailureEvent",
|
|
10857
|
+
},
|
|
10858
|
+
{
|
|
10859
|
+
kind: "never",
|
|
10860
|
+
},
|
|
10861
|
+
],
|
|
10862
|
+
},
|
|
10863
|
+
],
|
|
10518
10864
|
},
|
|
10519
10865
|
],
|
|
10520
10866
|
},
|
|
@@ -12151,138 +12497,8 @@ const SCHEMAS: Record<string, SchemaNode> = {
|
|
|
12151
12497
|
{
|
|
12152
12498
|
required: true,
|
|
12153
12499
|
shape: {
|
|
12154
|
-
kind: "
|
|
12155
|
-
|
|
12156
|
-
variants: [
|
|
12157
|
-
{
|
|
12158
|
-
kind: "ref",
|
|
12159
|
-
name: "ToolBeforeEvent",
|
|
12160
|
-
},
|
|
12161
|
-
{
|
|
12162
|
-
kind: "ref",
|
|
12163
|
-
name: "ToolAfterEvent",
|
|
12164
|
-
},
|
|
12165
|
-
{
|
|
12166
|
-
kind: "ref",
|
|
12167
|
-
name: "SessionStartEvent",
|
|
12168
|
-
},
|
|
12169
|
-
{
|
|
12170
|
-
kind: "ref",
|
|
12171
|
-
name: "SessionEndEvent",
|
|
12172
|
-
},
|
|
12173
|
-
{
|
|
12174
|
-
kind: "ref",
|
|
12175
|
-
name: "ConfigChangeBeforeEvent",
|
|
12176
|
-
},
|
|
12177
|
-
{
|
|
12178
|
-
kind: "ref",
|
|
12179
|
-
name: "ConfigChangeAfterEvent",
|
|
12180
|
-
},
|
|
12181
|
-
{
|
|
12182
|
-
kind: "ref",
|
|
12183
|
-
name: "TurnStartEvent",
|
|
12184
|
-
},
|
|
12185
|
-
{
|
|
12186
|
-
kind: "ref",
|
|
12187
|
-
name: "TurnFinishBeforeEvent",
|
|
12188
|
-
},
|
|
12189
|
-
{
|
|
12190
|
-
kind: "ref",
|
|
12191
|
-
name: "TurnEndEvent",
|
|
12192
|
-
},
|
|
12193
|
-
{
|
|
12194
|
-
kind: "ref",
|
|
12195
|
-
name: "TurnProgressEvent",
|
|
12196
|
-
},
|
|
12197
|
-
{
|
|
12198
|
-
kind: "ref",
|
|
12199
|
-
name: "ModelRequestBeforeEvent",
|
|
12200
|
-
},
|
|
12201
|
-
{
|
|
12202
|
-
kind: "ref",
|
|
12203
|
-
name: "ModelResponseAfterEvent",
|
|
12204
|
-
},
|
|
12205
|
-
{
|
|
12206
|
-
kind: "ref",
|
|
12207
|
-
name: "ModelErrorEvent",
|
|
12208
|
-
},
|
|
12209
|
-
{
|
|
12210
|
-
kind: "ref",
|
|
12211
|
-
name: "ModelSwitchBeforeEvent",
|
|
12212
|
-
},
|
|
12213
|
-
{
|
|
12214
|
-
kind: "ref",
|
|
12215
|
-
name: "ModelSwitchAfterEvent",
|
|
12216
|
-
},
|
|
12217
|
-
{
|
|
12218
|
-
kind: "ref",
|
|
12219
|
-
name: "ToolPermissionRequestEvent",
|
|
12220
|
-
},
|
|
12221
|
-
{
|
|
12222
|
-
kind: "ref",
|
|
12223
|
-
name: "ToolPermissionResolvedEvent",
|
|
12224
|
-
},
|
|
12225
|
-
{
|
|
12226
|
-
kind: "ref",
|
|
12227
|
-
name: "ToolProgressEvent",
|
|
12228
|
-
},
|
|
12229
|
-
{
|
|
12230
|
-
kind: "ref",
|
|
12231
|
-
name: "ToolBatchAfterEvent",
|
|
12232
|
-
},
|
|
12233
|
-
{
|
|
12234
|
-
kind: "ref",
|
|
12235
|
-
name: "ContextCompactBeforeEvent",
|
|
12236
|
-
},
|
|
12237
|
-
{
|
|
12238
|
-
kind: "ref",
|
|
12239
|
-
name: "ContextCompactAfterEvent",
|
|
12240
|
-
},
|
|
12241
|
-
{
|
|
12242
|
-
kind: "ref",
|
|
12243
|
-
name: "TaskChangeBeforeEvent",
|
|
12244
|
-
},
|
|
12245
|
-
{
|
|
12246
|
-
kind: "ref",
|
|
12247
|
-
name: "TaskChangeAfterEvent",
|
|
12248
|
-
},
|
|
12249
|
-
{
|
|
12250
|
-
kind: "ref",
|
|
12251
|
-
name: "UserAttentionEvent",
|
|
12252
|
-
},
|
|
12253
|
-
{
|
|
12254
|
-
kind: "ref",
|
|
12255
|
-
name: "UserElicitationRequestEvent",
|
|
12256
|
-
},
|
|
12257
|
-
{
|
|
12258
|
-
kind: "ref",
|
|
12259
|
-
name: "UserElicitationResultEvent",
|
|
12260
|
-
},
|
|
12261
|
-
{
|
|
12262
|
-
kind: "ref",
|
|
12263
|
-
name: "UserMessageInboundEvent",
|
|
12264
|
-
},
|
|
12265
|
-
{
|
|
12266
|
-
kind: "ref",
|
|
12267
|
-
name: "UserMessageOutboundEvent",
|
|
12268
|
-
},
|
|
12269
|
-
{
|
|
12270
|
-
kind: "ref",
|
|
12271
|
-
name: "WorkspaceChangeBeforeEvent",
|
|
12272
|
-
},
|
|
12273
|
-
{
|
|
12274
|
-
kind: "ref",
|
|
12275
|
-
name: "WorkspaceChangeAfterEvent",
|
|
12276
|
-
},
|
|
12277
|
-
{
|
|
12278
|
-
kind: "ref",
|
|
12279
|
-
name: "FileChangedEvent",
|
|
12280
|
-
},
|
|
12281
|
-
{
|
|
12282
|
-
kind: "ref",
|
|
12283
|
-
name: "HookFailureEvent",
|
|
12284
|
-
},
|
|
12285
|
-
],
|
|
12500
|
+
kind: "ref",
|
|
12501
|
+
name: "Event",
|
|
12286
12502
|
},
|
|
12287
12503
|
wire_name: "event",
|
|
12288
12504
|
},
|
|
@@ -14905,7 +15121,12 @@ const SCHEMAS: Record<string, SchemaNode> = {
|
|
|
14905
15121
|
additional: {
|
|
14906
15122
|
kind: "allowed",
|
|
14907
15123
|
},
|
|
14908
|
-
forbidden_property_sets: [
|
|
15124
|
+
forbidden_property_sets: [
|
|
15125
|
+
["durationMs"],
|
|
15126
|
+
["execution"],
|
|
15127
|
+
["fileChanges"],
|
|
15128
|
+
["outcome"],
|
|
15129
|
+
],
|
|
14909
15130
|
kind: "object",
|
|
14910
15131
|
properties: [
|
|
14911
15132
|
{
|
|
@@ -16557,26 +16778,51 @@ function discriminatorValue(
|
|
|
16557
16778
|
return undefined;
|
|
16558
16779
|
}
|
|
16559
16780
|
|
|
16560
|
-
function toSafeJson(value: unknown): JsonValue {
|
|
16781
|
+
function toSafeJson(value: unknown, ancestors = new Set<object>()): JsonValue {
|
|
16561
16782
|
if (value === null || typeof value === "string" || typeof value === "boolean")
|
|
16562
16783
|
return value;
|
|
16563
16784
|
if (typeof value === "number" && Number.isFinite(value)) return value;
|
|
16564
|
-
if (
|
|
16565
|
-
|
|
16785
|
+
if (typeof value !== "object" || value === null || ancestors.has(value))
|
|
16786
|
+
throw new TypeError("Input is not an acyclic JSON value");
|
|
16787
|
+
const prototype: unknown = Object.getPrototypeOf(value);
|
|
16788
|
+
if (
|
|
16789
|
+
!Array.isArray(value) &&
|
|
16790
|
+
prototype !== Object.prototype &&
|
|
16791
|
+
prototype !== null
|
|
16792
|
+
)
|
|
16793
|
+
throw new TypeError("Expected a plain JSON object");
|
|
16794
|
+
ancestors.add(value);
|
|
16795
|
+
try {
|
|
16796
|
+
if (Array.isArray(value)) {
|
|
16797
|
+
if (Reflect.ownKeys(value).length !== value.length + 1)
|
|
16798
|
+
throw new TypeError("Expected a dense JSON array");
|
|
16799
|
+
return Array.from({ length: value.length }, (_, index) => {
|
|
16800
|
+
const property = Object.getOwnPropertyDescriptor(value, String(index));
|
|
16801
|
+
if (!property?.enumerable || !("value" in property))
|
|
16802
|
+
throw new TypeError("Expected JSON array data elements");
|
|
16803
|
+
return toSafeJson(property.value, ancestors);
|
|
16804
|
+
});
|
|
16805
|
+
}
|
|
16566
16806
|
const result = Object.create(null) as Record<string, JsonValue>;
|
|
16567
|
-
for (const
|
|
16568
|
-
|
|
16569
|
-
|
|
16807
|
+
for (const key of Reflect.ownKeys(value)) {
|
|
16808
|
+
const property = Object.getOwnPropertyDescriptor(value, key)!;
|
|
16809
|
+
if (
|
|
16810
|
+
typeof key !== "string" ||
|
|
16811
|
+
!property.enumerable ||
|
|
16812
|
+
!("value" in property)
|
|
16813
|
+
)
|
|
16814
|
+
throw new TypeError("Expected enumerable JSON data properties");
|
|
16570
16815
|
Object.defineProperty(result, key, {
|
|
16571
|
-
value: toSafeJson(
|
|
16816
|
+
value: toSafeJson(property.value, ancestors),
|
|
16572
16817
|
enumerable: true,
|
|
16573
16818
|
configurable: true,
|
|
16574
16819
|
writable: true,
|
|
16575
16820
|
});
|
|
16576
16821
|
}
|
|
16577
16822
|
return result;
|
|
16823
|
+
} finally {
|
|
16824
|
+
ancestors.delete(value);
|
|
16578
16825
|
}
|
|
16579
|
-
throw new TypeError("Input is not a JSON value");
|
|
16580
16826
|
}
|
|
16581
16827
|
|
|
16582
16828
|
function encodeJson(value: JsonValue): string {
|
|
@@ -16586,7 +16832,22 @@ function isObject(value: JsonValue): value is Record<string, JsonValue> {
|
|
|
16586
16832
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
16587
16833
|
}
|
|
16588
16834
|
function sameJson(left: JsonValue, right: JsonValue): boolean {
|
|
16589
|
-
|
|
16835
|
+
if (left === right) return true;
|
|
16836
|
+
if (Array.isArray(left) && Array.isArray(right))
|
|
16837
|
+
return (
|
|
16838
|
+
left.length === right.length &&
|
|
16839
|
+
left.every((value, index) => sameJson(value, right[index]!))
|
|
16840
|
+
);
|
|
16841
|
+
if (isObject(left) && isObject(right))
|
|
16842
|
+
return (
|
|
16843
|
+
Object.keys(left).length === Object.keys(right).length &&
|
|
16844
|
+
Object.keys(left).every(
|
|
16845
|
+
(key) =>
|
|
16846
|
+
Object.prototype.hasOwnProperty.call(right, key) &&
|
|
16847
|
+
sameJson(left[key]!, right[key]!),
|
|
16848
|
+
)
|
|
16849
|
+
);
|
|
16850
|
+
return false;
|
|
16590
16851
|
}
|
|
16591
16852
|
function joinPath(path: string, key: string): string {
|
|
16592
16853
|
return `${path}/${key.replace(/~/g, "~0").replace(/\//g, "~1")}`;
|
|
@@ -16687,6 +16948,21 @@ export function encodeContentUpload(value: ContentUpload): string {
|
|
|
16687
16948
|
}
|
|
16688
16949
|
export const contentUploadSchemaRevision = SCHEMA_REVISION;
|
|
16689
16950
|
|
|
16951
|
+
export function parseContentUploadReceipt(
|
|
16952
|
+
input: string | unknown,
|
|
16953
|
+
): ParseResult<ContentUploadReceipt> {
|
|
16954
|
+
return parseRoot(
|
|
16955
|
+
"ContentUploadReceipt",
|
|
16956
|
+
input,
|
|
16957
|
+
) as ParseResult<ContentUploadReceipt>;
|
|
16958
|
+
}
|
|
16959
|
+
export function encodeContentUploadReceipt(
|
|
16960
|
+
value: ContentUploadReceipt,
|
|
16961
|
+
): string {
|
|
16962
|
+
return encodeJson(value as JsonValue);
|
|
16963
|
+
}
|
|
16964
|
+
export const contentUploadReceiptSchemaRevision = SCHEMA_REVISION;
|
|
16965
|
+
|
|
16690
16966
|
export function parseDenyEffect(
|
|
16691
16967
|
input: string | unknown,
|
|
16692
16968
|
): ParseResult<DenyEffect> {
|
|
@@ -16705,6 +16981,14 @@ export function encodeEffect(value: Effect): string {
|
|
|
16705
16981
|
}
|
|
16706
16982
|
export const effectSchemaRevision = SCHEMA_REVISION;
|
|
16707
16983
|
|
|
16984
|
+
export function parseEvent(input: string | unknown): ParseResult<Event> {
|
|
16985
|
+
return parseRoot("Event", input) as ParseResult<Event>;
|
|
16986
|
+
}
|
|
16987
|
+
export function encodeEvent(value: Event): string {
|
|
16988
|
+
return encodeJson(value as JsonValue);
|
|
16989
|
+
}
|
|
16990
|
+
export const eventSchemaRevision = SCHEMA_REVISION;
|
|
16991
|
+
|
|
16708
16992
|
export function parseExecutionEvent(
|
|
16709
16993
|
input: string | unknown,
|
|
16710
16994
|
): ParseResult<ExecutionEvent> {
|
|
@@ -16895,6 +17179,28 @@ export type DeliveryDiagnosticCode =
|
|
|
16895
17179
|
| "deadline_exceeded"
|
|
16896
17180
|
| "preparation"
|
|
16897
17181
|
| "capacity";
|
|
17182
|
+
|
|
17183
|
+
/** Schema-derived family identifiers; custom strings remain supported. */
|
|
17184
|
+
export const effectNames = Object.freeze({
|
|
17185
|
+
allow: "allow",
|
|
17186
|
+
ask: "ask",
|
|
17187
|
+
deny: "deny",
|
|
17188
|
+
flow: "flow",
|
|
17189
|
+
inject: "inject",
|
|
17190
|
+
message: "message",
|
|
17191
|
+
modify: "modify",
|
|
17192
|
+
return: "return",
|
|
17193
|
+
} as const);
|
|
17194
|
+
export type EffectName = OpenString<
|
|
17195
|
+
(typeof effectNames)[keyof typeof effectNames]
|
|
17196
|
+
>;
|
|
17197
|
+
/** Advertised membership only, not authorization or target/operation admission. */
|
|
17198
|
+
export function supports(
|
|
17199
|
+
capabilities: { readonly effects: readonly string[] },
|
|
17200
|
+
effect: EffectName,
|
|
17201
|
+
): boolean {
|
|
17202
|
+
return capabilities.effects.includes(effect);
|
|
17203
|
+
}
|
|
16898
17204
|
export type ConfigChangeAfterInput = {
|
|
16899
17205
|
change: {
|
|
16900
17206
|
mcpServers?: Array<{} & AdditionalProperties>;
|