@linkshell/gateway 0.2.32 → 0.2.33

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.
@@ -701,6 +701,74 @@ export declare const agentPermissionSchema: z.ZodObject<{
701
701
  toolInput?: string | undefined;
702
702
  context?: string | undefined;
703
703
  }>;
704
+ export declare const agentModelOptionSchema: z.ZodObject<{
705
+ id: z.ZodString;
706
+ label: z.ZodString;
707
+ }, "strip", z.ZodTypeAny, {
708
+ id: string;
709
+ label: string;
710
+ }, {
711
+ id: string;
712
+ label: string;
713
+ }>;
714
+ export declare const agentProviderCapabilitySchema: z.ZodObject<{
715
+ id: z.ZodEnum<["codex", "claude", "custom"]>;
716
+ label: z.ZodString;
717
+ enabled: z.ZodBoolean;
718
+ reason: z.ZodOptional<z.ZodString>;
719
+ supportsImages: z.ZodOptional<z.ZodBoolean>;
720
+ supportsPermission: z.ZodOptional<z.ZodBoolean>;
721
+ supportsPlan: z.ZodOptional<z.ZodBoolean>;
722
+ supportsCancel: z.ZodOptional<z.ZodBoolean>;
723
+ models: z.ZodOptional<z.ZodArray<z.ZodObject<{
724
+ id: z.ZodString;
725
+ label: z.ZodString;
726
+ }, "strip", z.ZodTypeAny, {
727
+ id: string;
728
+ label: string;
729
+ }, {
730
+ id: string;
731
+ label: string;
732
+ }>, "many">>;
733
+ defaultModel: z.ZodOptional<z.ZodString>;
734
+ reasoningEfforts: z.ZodOptional<z.ZodArray<z.ZodEnum<["none", "minimal", "low", "medium", "high", "xhigh"]>, "many">>;
735
+ permissionModes: z.ZodOptional<z.ZodArray<z.ZodEnum<["read_only", "workspace_write", "full_access"]>, "many">>;
736
+ features: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
737
+ }, "strip", z.ZodTypeAny, {
738
+ id: "claude" | "codex" | "custom";
739
+ enabled: boolean;
740
+ label: string;
741
+ reason?: string | undefined;
742
+ supportsImages?: boolean | undefined;
743
+ supportsPermission?: boolean | undefined;
744
+ supportsPlan?: boolean | undefined;
745
+ supportsCancel?: boolean | undefined;
746
+ models?: {
747
+ id: string;
748
+ label: string;
749
+ }[] | undefined;
750
+ defaultModel?: string | undefined;
751
+ reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh")[] | undefined;
752
+ permissionModes?: ("read_only" | "workspace_write" | "full_access")[] | undefined;
753
+ features?: Record<string, boolean> | undefined;
754
+ }, {
755
+ id: "claude" | "codex" | "custom";
756
+ enabled: boolean;
757
+ label: string;
758
+ reason?: string | undefined;
759
+ supportsImages?: boolean | undefined;
760
+ supportsPermission?: boolean | undefined;
761
+ supportsPlan?: boolean | undefined;
762
+ supportsCancel?: boolean | undefined;
763
+ models?: {
764
+ id: string;
765
+ label: string;
766
+ }[] | undefined;
767
+ defaultModel?: string | undefined;
768
+ reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh")[] | undefined;
769
+ permissionModes?: ("read_only" | "workspace_write" | "full_access")[] | undefined;
770
+ features?: Record<string, boolean> | undefined;
771
+ }>;
704
772
  export declare const agentCapabilitiesPayloadSchema: z.ZodObject<{
705
773
  enabled: z.ZodBoolean;
706
774
  provider: z.ZodOptional<z.ZodEnum<["codex", "claude", "custom"]>>;
@@ -713,6 +781,20 @@ export declare const agentCapabilitiesPayloadSchema: z.ZodObject<{
713
781
  supportsPermission: z.ZodOptional<z.ZodBoolean>;
714
782
  supportsPlan: z.ZodOptional<z.ZodBoolean>;
715
783
  supportsCancel: z.ZodOptional<z.ZodBoolean>;
784
+ models: z.ZodOptional<z.ZodArray<z.ZodObject<{
785
+ id: z.ZodString;
786
+ label: z.ZodString;
787
+ }, "strip", z.ZodTypeAny, {
788
+ id: string;
789
+ label: string;
790
+ }, {
791
+ id: string;
792
+ label: string;
793
+ }>, "many">>;
794
+ defaultModel: z.ZodOptional<z.ZodString>;
795
+ reasoningEfforts: z.ZodOptional<z.ZodArray<z.ZodEnum<["none", "minimal", "low", "medium", "high", "xhigh"]>, "many">>;
796
+ permissionModes: z.ZodOptional<z.ZodArray<z.ZodEnum<["read_only", "workspace_write", "full_access"]>, "many">>;
797
+ features: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
716
798
  }, "strip", z.ZodTypeAny, {
717
799
  id: "claude" | "codex" | "custom";
718
800
  enabled: boolean;
@@ -722,6 +804,14 @@ export declare const agentCapabilitiesPayloadSchema: z.ZodObject<{
722
804
  supportsPermission?: boolean | undefined;
723
805
  supportsPlan?: boolean | undefined;
724
806
  supportsCancel?: boolean | undefined;
807
+ models?: {
808
+ id: string;
809
+ label: string;
810
+ }[] | undefined;
811
+ defaultModel?: string | undefined;
812
+ reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh")[] | undefined;
813
+ permissionModes?: ("read_only" | "workspace_write" | "full_access")[] | undefined;
814
+ features?: Record<string, boolean> | undefined;
725
815
  }, {
726
816
  id: "claude" | "codex" | "custom";
727
817
  enabled: boolean;
@@ -731,6 +821,14 @@ export declare const agentCapabilitiesPayloadSchema: z.ZodObject<{
731
821
  supportsPermission?: boolean | undefined;
732
822
  supportsPlan?: boolean | undefined;
733
823
  supportsCancel?: boolean | undefined;
824
+ models?: {
825
+ id: string;
826
+ label: string;
827
+ }[] | undefined;
828
+ defaultModel?: string | undefined;
829
+ reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh")[] | undefined;
830
+ permissionModes?: ("read_only" | "workspace_write" | "full_access")[] | undefined;
831
+ features?: Record<string, boolean> | undefined;
734
832
  }>, "many">>;
735
833
  protocolVersion: z.ZodOptional<z.ZodNumber>;
736
834
  error: z.ZodOptional<z.ZodString>;
@@ -762,6 +860,14 @@ export declare const agentCapabilitiesPayloadSchema: z.ZodObject<{
762
860
  supportsPermission?: boolean | undefined;
763
861
  supportsPlan?: boolean | undefined;
764
862
  supportsCancel?: boolean | undefined;
863
+ models?: {
864
+ id: string;
865
+ label: string;
866
+ }[] | undefined;
867
+ defaultModel?: string | undefined;
868
+ reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh")[] | undefined;
869
+ permissionModes?: ("read_only" | "workspace_write" | "full_access")[] | undefined;
870
+ features?: Record<string, boolean> | undefined;
765
871
  }[] | undefined;
766
872
  }, {
767
873
  enabled: boolean;
@@ -781,6 +887,14 @@ export declare const agentCapabilitiesPayloadSchema: z.ZodObject<{
781
887
  supportsPermission?: boolean | undefined;
782
888
  supportsPlan?: boolean | undefined;
783
889
  supportsCancel?: boolean | undefined;
890
+ models?: {
891
+ id: string;
892
+ label: string;
893
+ }[] | undefined;
894
+ defaultModel?: string | undefined;
895
+ reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh")[] | undefined;
896
+ permissionModes?: ("read_only" | "workspace_write" | "full_access")[] | undefined;
897
+ features?: Record<string, boolean> | undefined;
784
898
  }[] | undefined;
785
899
  supportsSessionList?: boolean | undefined;
786
900
  supportsSessionLoad?: boolean | undefined;
@@ -1051,6 +1165,20 @@ export declare const agentSnapshotPayloadSchema: z.ZodObject<{
1051
1165
  supportsPermission: z.ZodOptional<z.ZodBoolean>;
1052
1166
  supportsPlan: z.ZodOptional<z.ZodBoolean>;
1053
1167
  supportsCancel: z.ZodOptional<z.ZodBoolean>;
1168
+ models: z.ZodOptional<z.ZodArray<z.ZodObject<{
1169
+ id: z.ZodString;
1170
+ label: z.ZodString;
1171
+ }, "strip", z.ZodTypeAny, {
1172
+ id: string;
1173
+ label: string;
1174
+ }, {
1175
+ id: string;
1176
+ label: string;
1177
+ }>, "many">>;
1178
+ defaultModel: z.ZodOptional<z.ZodString>;
1179
+ reasoningEfforts: z.ZodOptional<z.ZodArray<z.ZodEnum<["none", "minimal", "low", "medium", "high", "xhigh"]>, "many">>;
1180
+ permissionModes: z.ZodOptional<z.ZodArray<z.ZodEnum<["read_only", "workspace_write", "full_access"]>, "many">>;
1181
+ features: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
1054
1182
  }, "strip", z.ZodTypeAny, {
1055
1183
  id: "claude" | "codex" | "custom";
1056
1184
  enabled: boolean;
@@ -1060,6 +1188,14 @@ export declare const agentSnapshotPayloadSchema: z.ZodObject<{
1060
1188
  supportsPermission?: boolean | undefined;
1061
1189
  supportsPlan?: boolean | undefined;
1062
1190
  supportsCancel?: boolean | undefined;
1191
+ models?: {
1192
+ id: string;
1193
+ label: string;
1194
+ }[] | undefined;
1195
+ defaultModel?: string | undefined;
1196
+ reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh")[] | undefined;
1197
+ permissionModes?: ("read_only" | "workspace_write" | "full_access")[] | undefined;
1198
+ features?: Record<string, boolean> | undefined;
1063
1199
  }, {
1064
1200
  id: "claude" | "codex" | "custom";
1065
1201
  enabled: boolean;
@@ -1069,6 +1205,14 @@ export declare const agentSnapshotPayloadSchema: z.ZodObject<{
1069
1205
  supportsPermission?: boolean | undefined;
1070
1206
  supportsPlan?: boolean | undefined;
1071
1207
  supportsCancel?: boolean | undefined;
1208
+ models?: {
1209
+ id: string;
1210
+ label: string;
1211
+ }[] | undefined;
1212
+ defaultModel?: string | undefined;
1213
+ reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh")[] | undefined;
1214
+ permissionModes?: ("read_only" | "workspace_write" | "full_access")[] | undefined;
1215
+ features?: Record<string, boolean> | undefined;
1072
1216
  }>, "many">>;
1073
1217
  protocolVersion: z.ZodOptional<z.ZodNumber>;
1074
1218
  error: z.ZodOptional<z.ZodString>;
@@ -1100,6 +1244,14 @@ export declare const agentSnapshotPayloadSchema: z.ZodObject<{
1100
1244
  supportsPermission?: boolean | undefined;
1101
1245
  supportsPlan?: boolean | undefined;
1102
1246
  supportsCancel?: boolean | undefined;
1247
+ models?: {
1248
+ id: string;
1249
+ label: string;
1250
+ }[] | undefined;
1251
+ defaultModel?: string | undefined;
1252
+ reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh")[] | undefined;
1253
+ permissionModes?: ("read_only" | "workspace_write" | "full_access")[] | undefined;
1254
+ features?: Record<string, boolean> | undefined;
1103
1255
  }[] | undefined;
1104
1256
  }, {
1105
1257
  enabled: boolean;
@@ -1119,6 +1271,14 @@ export declare const agentSnapshotPayloadSchema: z.ZodObject<{
1119
1271
  supportsPermission?: boolean | undefined;
1120
1272
  supportsPlan?: boolean | undefined;
1121
1273
  supportsCancel?: boolean | undefined;
1274
+ models?: {
1275
+ id: string;
1276
+ label: string;
1277
+ }[] | undefined;
1278
+ defaultModel?: string | undefined;
1279
+ reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh")[] | undefined;
1280
+ permissionModes?: ("read_only" | "workspace_write" | "full_access")[] | undefined;
1281
+ features?: Record<string, boolean> | undefined;
1122
1282
  }[] | undefined;
1123
1283
  supportsSessionList?: boolean | undefined;
1124
1284
  supportsSessionLoad?: boolean | undefined;
@@ -1257,6 +1417,14 @@ export declare const agentSnapshotPayloadSchema: z.ZodObject<{
1257
1417
  supportsPermission?: boolean | undefined;
1258
1418
  supportsPlan?: boolean | undefined;
1259
1419
  supportsCancel?: boolean | undefined;
1420
+ models?: {
1421
+ id: string;
1422
+ label: string;
1423
+ }[] | undefined;
1424
+ defaultModel?: string | undefined;
1425
+ reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh")[] | undefined;
1426
+ permissionModes?: ("read_only" | "workspace_write" | "full_access")[] | undefined;
1427
+ features?: Record<string, boolean> | undefined;
1260
1428
  }[] | undefined;
1261
1429
  } | undefined;
1262
1430
  }, {
@@ -1281,6 +1449,14 @@ export declare const agentSnapshotPayloadSchema: z.ZodObject<{
1281
1449
  supportsPermission?: boolean | undefined;
1282
1450
  supportsPlan?: boolean | undefined;
1283
1451
  supportsCancel?: boolean | undefined;
1452
+ models?: {
1453
+ id: string;
1454
+ label: string;
1455
+ }[] | undefined;
1456
+ defaultModel?: string | undefined;
1457
+ reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh")[] | undefined;
1458
+ permissionModes?: ("read_only" | "workspace_write" | "full_access")[] | undefined;
1459
+ features?: Record<string, boolean> | undefined;
1284
1460
  }[] | undefined;
1285
1461
  supportsSessionList?: boolean | undefined;
1286
1462
  supportsSessionLoad?: boolean | undefined;
@@ -2228,6 +2404,20 @@ export declare const agentV2CapabilitiesPayloadSchema: z.ZodObject<{
2228
2404
  supportsPermission: z.ZodOptional<z.ZodBoolean>;
2229
2405
  supportsPlan: z.ZodOptional<z.ZodBoolean>;
2230
2406
  supportsCancel: z.ZodOptional<z.ZodBoolean>;
2407
+ models: z.ZodOptional<z.ZodArray<z.ZodObject<{
2408
+ id: z.ZodString;
2409
+ label: z.ZodString;
2410
+ }, "strip", z.ZodTypeAny, {
2411
+ id: string;
2412
+ label: string;
2413
+ }, {
2414
+ id: string;
2415
+ label: string;
2416
+ }>, "many">>;
2417
+ defaultModel: z.ZodOptional<z.ZodString>;
2418
+ reasoningEfforts: z.ZodOptional<z.ZodArray<z.ZodEnum<["none", "minimal", "low", "medium", "high", "xhigh"]>, "many">>;
2419
+ permissionModes: z.ZodOptional<z.ZodArray<z.ZodEnum<["read_only", "workspace_write", "full_access"]>, "many">>;
2420
+ features: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
2231
2421
  }, "strip", z.ZodTypeAny, {
2232
2422
  id: "claude" | "codex" | "custom";
2233
2423
  enabled: boolean;
@@ -2237,6 +2427,14 @@ export declare const agentV2CapabilitiesPayloadSchema: z.ZodObject<{
2237
2427
  supportsPermission?: boolean | undefined;
2238
2428
  supportsPlan?: boolean | undefined;
2239
2429
  supportsCancel?: boolean | undefined;
2430
+ models?: {
2431
+ id: string;
2432
+ label: string;
2433
+ }[] | undefined;
2434
+ defaultModel?: string | undefined;
2435
+ reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh")[] | undefined;
2436
+ permissionModes?: ("read_only" | "workspace_write" | "full_access")[] | undefined;
2437
+ features?: Record<string, boolean> | undefined;
2240
2438
  }, {
2241
2439
  id: "claude" | "codex" | "custom";
2242
2440
  enabled: boolean;
@@ -2246,6 +2444,14 @@ export declare const agentV2CapabilitiesPayloadSchema: z.ZodObject<{
2246
2444
  supportsPermission?: boolean | undefined;
2247
2445
  supportsPlan?: boolean | undefined;
2248
2446
  supportsCancel?: boolean | undefined;
2447
+ models?: {
2448
+ id: string;
2449
+ label: string;
2450
+ }[] | undefined;
2451
+ defaultModel?: string | undefined;
2452
+ reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh")[] | undefined;
2453
+ permissionModes?: ("read_only" | "workspace_write" | "full_access")[] | undefined;
2454
+ features?: Record<string, boolean> | undefined;
2249
2455
  }>, "many">>;
2250
2456
  protocolVersion: z.ZodOptional<z.ZodNumber>;
2251
2457
  error: z.ZodOptional<z.ZodString>;
@@ -2280,6 +2486,14 @@ export declare const agentV2CapabilitiesPayloadSchema: z.ZodObject<{
2280
2486
  supportsPermission?: boolean | undefined;
2281
2487
  supportsPlan?: boolean | undefined;
2282
2488
  supportsCancel?: boolean | undefined;
2489
+ models?: {
2490
+ id: string;
2491
+ label: string;
2492
+ }[] | undefined;
2493
+ defaultModel?: string | undefined;
2494
+ reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh")[] | undefined;
2495
+ permissionModes?: ("read_only" | "workspace_write" | "full_access")[] | undefined;
2496
+ features?: Record<string, boolean> | undefined;
2283
2497
  }[] | undefined;
2284
2498
  }, {
2285
2499
  enabled: boolean;
@@ -2299,6 +2513,14 @@ export declare const agentV2CapabilitiesPayloadSchema: z.ZodObject<{
2299
2513
  supportsPermission?: boolean | undefined;
2300
2514
  supportsPlan?: boolean | undefined;
2301
2515
  supportsCancel?: boolean | undefined;
2516
+ models?: {
2517
+ id: string;
2518
+ label: string;
2519
+ }[] | undefined;
2520
+ defaultModel?: string | undefined;
2521
+ reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh")[] | undefined;
2522
+ permissionModes?: ("read_only" | "workspace_write" | "full_access")[] | undefined;
2523
+ features?: Record<string, boolean> | undefined;
2302
2524
  }[] | undefined;
2303
2525
  supportsSessionList?: boolean | undefined;
2304
2526
  supportsSessionLoad?: boolean | undefined;
@@ -4696,6 +4918,25 @@ export declare const agentV2EventPayloadSchema: z.ZodObject<{
4696
4918
  }>>;
4697
4919
  patch: z.ZodOptional<z.ZodObject<{
4698
4920
  itemId: z.ZodString;
4921
+ kind: z.ZodOptional<z.ZodEnum<["chat", "thinking", "tool_activity", "command_execution", "file_change", "subagent_action", "plan", "user_input_prompt", "review", "context_compaction"]>>;
4922
+ role: z.ZodOptional<z.ZodEnum<["user", "assistant", "system"]>>;
4923
+ content: z.ZodOptional<z.ZodArray<z.ZodObject<{
4924
+ type: z.ZodEnum<["text", "image"]>;
4925
+ text: z.ZodOptional<z.ZodString>;
4926
+ data: z.ZodOptional<z.ZodString>;
4927
+ mimeType: z.ZodOptional<z.ZodString>;
4928
+ }, "strip", z.ZodTypeAny, {
4929
+ type: "text" | "image";
4930
+ data?: string | undefined;
4931
+ text?: string | undefined;
4932
+ mimeType?: string | undefined;
4933
+ }, {
4934
+ type: "text" | "image";
4935
+ data?: string | undefined;
4936
+ text?: string | undefined;
4937
+ mimeType?: string | undefined;
4938
+ }>, "many">>;
4939
+ text: z.ZodOptional<z.ZodString>;
4699
4940
  textDelta: z.ZodOptional<z.ZodString>;
4700
4941
  status: z.ZodOptional<z.ZodEnum<["unavailable", "idle", "running", "waiting_permission", "error"]>>;
4701
4942
  toolCall: z.ZodOptional<z.ZodObject<{
@@ -4720,122 +4961,561 @@ export declare const agentV2EventPayloadSchema: z.ZodObject<{
4720
4961
  input?: string | undefined;
4721
4962
  output?: string | undefined;
4722
4963
  }>>;
4723
- updatedAt: z.ZodOptional<z.ZodNumber>;
4724
- isStreaming: z.ZodOptional<z.ZodBoolean>;
4725
- }, "strip", z.ZodTypeAny, {
4726
- itemId: string;
4727
- status?: "error" | "running" | "idle" | "waiting_permission" | "unavailable" | undefined;
4728
- isStreaming?: boolean | undefined;
4729
- toolCall?: {
4730
- status: "running" | "pending" | "completed" | "failed";
4731
- id: string;
4732
- name: string;
4733
- createdAt?: number | undefined;
4734
- input?: string | undefined;
4735
- output?: string | undefined;
4736
- } | undefined;
4737
- updatedAt?: number | undefined;
4738
- textDelta?: string | undefined;
4739
- }, {
4740
- itemId: string;
4741
- status?: "error" | "running" | "idle" | "waiting_permission" | "unavailable" | undefined;
4742
- isStreaming?: boolean | undefined;
4743
- toolCall?: {
4744
- id: string;
4745
- name: string;
4964
+ commandExecution: z.ZodOptional<z.ZodObject<{
4965
+ command: z.ZodOptional<z.ZodString>;
4966
+ cwd: z.ZodOptional<z.ZodString>;
4967
+ output: z.ZodOptional<z.ZodString>;
4968
+ exitCode: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
4969
+ status: z.ZodOptional<z.ZodEnum<["pending", "running", "completed", "failed"]>>;
4970
+ }, "strip", z.ZodTypeAny, {
4746
4971
  status?: "running" | "pending" | "completed" | "failed" | undefined;
4747
- createdAt?: number | undefined;
4748
- input?: string | undefined;
4749
- output?: string | undefined;
4750
- } | undefined;
4751
- updatedAt?: number | undefined;
4752
- textDelta?: string | undefined;
4753
- }>>;
4754
- }, "strip", z.ZodTypeAny, {
4755
- conversationId: string;
4756
- conversation?: {
4757
- status: "error" | "running" | "idle" | "waiting_permission" | "unavailable";
4758
- id: string;
4759
- provider: "claude" | "codex" | "custom";
4760
- cwd: string;
4761
- createdAt: number;
4762
- archived: boolean;
4763
- lastActivityAt: number;
4764
- agentSessionId?: string | undefined;
4765
- model?: string | undefined;
4766
- reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
4767
- permissionMode?: "read_only" | "workspace_write" | "full_access" | undefined;
4768
- title?: string | undefined;
4769
- lastMessagePreview?: string | undefined;
4770
- } | undefined;
4771
- item?: {
4772
- type: "error" | "message" | "status" | "tool_call" | "plan" | "permission";
4773
- id: string;
4774
- createdAt: number;
4775
- conversationId: string;
4776
- error?: string | undefined;
4777
- status?: "error" | "running" | "idle" | "waiting_permission" | "unavailable" | undefined;
4778
- role?: "user" | "assistant" | "system" | undefined;
4779
- text?: string | undefined;
4780
- kind?: "thinking" | "plan" | "chat" | "tool_activity" | "command_execution" | "file_change" | "subagent_action" | "user_input_prompt" | "review" | "context_compaction" | undefined;
4781
- plan?: {
4782
- status: "pending" | "completed" | "in_progress";
4783
- id: string;
4784
- text: string;
4785
- }[] | undefined;
4786
- content?: {
4787
- type: "text" | "image";
4788
- data?: string | undefined;
4789
- text?: string | undefined;
4790
- mimeType?: string | undefined;
4791
- }[] | undefined;
4792
- isStreaming?: boolean | undefined;
4793
- toolCall?: {
4794
- status: "running" | "pending" | "completed" | "failed";
4795
- id: string;
4796
- name: string;
4797
- createdAt?: number | undefined;
4798
- input?: string | undefined;
4972
+ cwd?: string | undefined;
4973
+ exitCode?: number | null | undefined;
4799
4974
  output?: string | undefined;
4800
- } | undefined;
4801
- permission?: {
4802
- options: {
4803
- id: string;
4804
- label: string;
4805
- kind: "allow" | "deny" | "other";
4806
- }[];
4807
- requestId: string;
4808
- toolName?: string | undefined;
4809
- toolInput?: string | undefined;
4810
- context?: string | undefined;
4811
- } | undefined;
4812
- turnId?: string | undefined;
4813
- itemId?: string | undefined;
4814
- commandExecution?: {
4975
+ command?: string | undefined;
4976
+ }, {
4815
4977
  status?: "running" | "pending" | "completed" | "failed" | undefined;
4816
4978
  cwd?: string | undefined;
4817
4979
  exitCode?: number | null | undefined;
4818
4980
  output?: string | undefined;
4819
4981
  command?: string | undefined;
4820
- } | undefined;
4821
- fileChange?: {
4822
- entries: {
4982
+ }>>;
4983
+ fileChange: z.ZodOptional<z.ZodObject<{
4984
+ entries: z.ZodDefault<z.ZodArray<z.ZodObject<{
4985
+ path: z.ZodString;
4986
+ kind: z.ZodOptional<z.ZodString>;
4987
+ added: z.ZodOptional<z.ZodNumber>;
4988
+ removed: z.ZodOptional<z.ZodNumber>;
4989
+ }, "strip", z.ZodTypeAny, {
4823
4990
  path: string;
4824
4991
  kind?: string | undefined;
4825
4992
  added?: number | undefined;
4826
4993
  removed?: number | undefined;
4827
- }[];
4828
- status?: "running" | "pending" | "completed" | "failed" | undefined;
4829
- summary?: string | undefined;
4830
- diff?: string | undefined;
4831
- changeSetId?: string | undefined;
4832
- } | undefined;
4833
- subagent?: {
4834
- status: string;
4835
- tool: string;
4836
- receiverThreadIds: string[];
4837
- receiverAgents: {
4838
- threadId: string;
4994
+ }, {
4995
+ path: string;
4996
+ kind?: string | undefined;
4997
+ added?: number | undefined;
4998
+ removed?: number | undefined;
4999
+ }>, "many">>;
5000
+ diff: z.ZodOptional<z.ZodString>;
5001
+ summary: z.ZodOptional<z.ZodString>;
5002
+ changeSetId: z.ZodOptional<z.ZodString>;
5003
+ status: z.ZodOptional<z.ZodEnum<["pending", "running", "completed", "failed"]>>;
5004
+ }, "strip", z.ZodTypeAny, {
5005
+ entries: {
5006
+ path: string;
5007
+ kind?: string | undefined;
5008
+ added?: number | undefined;
5009
+ removed?: number | undefined;
5010
+ }[];
5011
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
5012
+ summary?: string | undefined;
5013
+ diff?: string | undefined;
5014
+ changeSetId?: string | undefined;
5015
+ }, {
5016
+ entries?: {
5017
+ path: string;
5018
+ kind?: string | undefined;
5019
+ added?: number | undefined;
5020
+ removed?: number | undefined;
5021
+ }[] | undefined;
5022
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
5023
+ summary?: string | undefined;
5024
+ diff?: string | undefined;
5025
+ changeSetId?: string | undefined;
5026
+ }>>;
5027
+ subagent: z.ZodOptional<z.ZodObject<{
5028
+ tool: z.ZodString;
5029
+ status: z.ZodString;
5030
+ prompt: z.ZodOptional<z.ZodString>;
5031
+ model: z.ZodOptional<z.ZodString>;
5032
+ receiverThreadIds: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
5033
+ receiverAgents: z.ZodDefault<z.ZodArray<z.ZodObject<{
5034
+ threadId: z.ZodString;
5035
+ agentId: z.ZodOptional<z.ZodString>;
5036
+ nickname: z.ZodOptional<z.ZodString>;
5037
+ role: z.ZodOptional<z.ZodString>;
5038
+ model: z.ZodOptional<z.ZodString>;
5039
+ prompt: z.ZodOptional<z.ZodString>;
5040
+ }, "strip", z.ZodTypeAny, {
5041
+ threadId: string;
5042
+ role?: string | undefined;
5043
+ model?: string | undefined;
5044
+ prompt?: string | undefined;
5045
+ agentId?: string | undefined;
5046
+ nickname?: string | undefined;
5047
+ }, {
5048
+ threadId: string;
5049
+ role?: string | undefined;
5050
+ model?: string | undefined;
5051
+ prompt?: string | undefined;
5052
+ agentId?: string | undefined;
5053
+ nickname?: string | undefined;
5054
+ }>, "many">>;
5055
+ agentStates: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
5056
+ threadId: z.ZodString;
5057
+ status: z.ZodString;
5058
+ message: z.ZodOptional<z.ZodString>;
5059
+ }, "strip", z.ZodTypeAny, {
5060
+ status: string;
5061
+ threadId: string;
5062
+ message?: string | undefined;
5063
+ }, {
5064
+ status: string;
5065
+ threadId: string;
5066
+ message?: string | undefined;
5067
+ }>>>;
5068
+ }, "strip", z.ZodTypeAny, {
5069
+ status: string;
5070
+ tool: string;
5071
+ receiverThreadIds: string[];
5072
+ receiverAgents: {
5073
+ threadId: string;
5074
+ role?: string | undefined;
5075
+ model?: string | undefined;
5076
+ prompt?: string | undefined;
5077
+ agentId?: string | undefined;
5078
+ nickname?: string | undefined;
5079
+ }[];
5080
+ agentStates: Record<string, {
5081
+ status: string;
5082
+ threadId: string;
5083
+ message?: string | undefined;
5084
+ }>;
5085
+ model?: string | undefined;
5086
+ prompt?: string | undefined;
5087
+ }, {
5088
+ status: string;
5089
+ tool: string;
5090
+ model?: string | undefined;
5091
+ prompt?: string | undefined;
5092
+ receiverThreadIds?: string[] | undefined;
5093
+ receiverAgents?: {
5094
+ threadId: string;
5095
+ role?: string | undefined;
5096
+ model?: string | undefined;
5097
+ prompt?: string | undefined;
5098
+ agentId?: string | undefined;
5099
+ nickname?: string | undefined;
5100
+ }[] | undefined;
5101
+ agentStates?: Record<string, {
5102
+ status: string;
5103
+ threadId: string;
5104
+ message?: string | undefined;
5105
+ }> | undefined;
5106
+ }>>;
5107
+ structuredInput: z.ZodOptional<z.ZodObject<{
5108
+ requestId: z.ZodString;
5109
+ questions: z.ZodDefault<z.ZodArray<z.ZodObject<{
5110
+ id: z.ZodString;
5111
+ header: z.ZodOptional<z.ZodString>;
5112
+ question: z.ZodString;
5113
+ isOther: z.ZodOptional<z.ZodBoolean>;
5114
+ isSecret: z.ZodOptional<z.ZodBoolean>;
5115
+ selectionLimit: z.ZodOptional<z.ZodNumber>;
5116
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
5117
+ id: z.ZodString;
5118
+ label: z.ZodString;
5119
+ description: z.ZodOptional<z.ZodString>;
5120
+ }, "strip", z.ZodTypeAny, {
5121
+ id: string;
5122
+ label: string;
5123
+ description?: string | undefined;
5124
+ }, {
5125
+ id: string;
5126
+ label: string;
5127
+ description?: string | undefined;
5128
+ }>, "many">>;
5129
+ }, "strip", z.ZodTypeAny, {
5130
+ id: string;
5131
+ question: string;
5132
+ options?: {
5133
+ id: string;
5134
+ label: string;
5135
+ description?: string | undefined;
5136
+ }[] | undefined;
5137
+ header?: string | undefined;
5138
+ isOther?: boolean | undefined;
5139
+ isSecret?: boolean | undefined;
5140
+ selectionLimit?: number | undefined;
5141
+ }, {
5142
+ id: string;
5143
+ question: string;
5144
+ options?: {
5145
+ id: string;
5146
+ label: string;
5147
+ description?: string | undefined;
5148
+ }[] | undefined;
5149
+ header?: string | undefined;
5150
+ isOther?: boolean | undefined;
5151
+ isSecret?: boolean | undefined;
5152
+ selectionLimit?: number | undefined;
5153
+ }>, "many">>;
5154
+ }, "strip", z.ZodTypeAny, {
5155
+ requestId: string;
5156
+ questions: {
5157
+ id: string;
5158
+ question: string;
5159
+ options?: {
5160
+ id: string;
5161
+ label: string;
5162
+ description?: string | undefined;
5163
+ }[] | undefined;
5164
+ header?: string | undefined;
5165
+ isOther?: boolean | undefined;
5166
+ isSecret?: boolean | undefined;
5167
+ selectionLimit?: number | undefined;
5168
+ }[];
5169
+ }, {
5170
+ requestId: string;
5171
+ questions?: {
5172
+ id: string;
5173
+ question: string;
5174
+ options?: {
5175
+ id: string;
5176
+ label: string;
5177
+ description?: string | undefined;
5178
+ }[] | undefined;
5179
+ header?: string | undefined;
5180
+ isOther?: boolean | undefined;
5181
+ isSecret?: boolean | undefined;
5182
+ selectionLimit?: number | undefined;
5183
+ }[] | undefined;
5184
+ }>>;
5185
+ plan: z.ZodOptional<z.ZodArray<z.ZodObject<{
5186
+ id: z.ZodString;
5187
+ text: z.ZodString;
5188
+ status: z.ZodEnum<["pending", "in_progress", "completed"]>;
5189
+ }, "strip", z.ZodTypeAny, {
5190
+ status: "pending" | "completed" | "in_progress";
5191
+ id: string;
5192
+ text: string;
5193
+ }, {
5194
+ status: "pending" | "completed" | "in_progress";
5195
+ id: string;
5196
+ text: string;
5197
+ }>, "many">>;
5198
+ permission: z.ZodOptional<z.ZodObject<{
5199
+ requestId: z.ZodString;
5200
+ toolName: z.ZodOptional<z.ZodString>;
5201
+ toolInput: z.ZodOptional<z.ZodString>;
5202
+ context: z.ZodOptional<z.ZodString>;
5203
+ options: z.ZodDefault<z.ZodArray<z.ZodObject<{
5204
+ id: z.ZodString;
5205
+ label: z.ZodString;
5206
+ kind: z.ZodDefault<z.ZodEnum<["allow", "deny", "other"]>>;
5207
+ }, "strip", z.ZodTypeAny, {
5208
+ id: string;
5209
+ label: string;
5210
+ kind: "allow" | "deny" | "other";
5211
+ }, {
5212
+ id: string;
5213
+ label: string;
5214
+ kind?: "allow" | "deny" | "other" | undefined;
5215
+ }>, "many">>;
5216
+ }, "strip", z.ZodTypeAny, {
5217
+ options: {
5218
+ id: string;
5219
+ label: string;
5220
+ kind: "allow" | "deny" | "other";
5221
+ }[];
5222
+ requestId: string;
5223
+ toolName?: string | undefined;
5224
+ toolInput?: string | undefined;
5225
+ context?: string | undefined;
5226
+ }, {
5227
+ requestId: string;
5228
+ options?: {
5229
+ id: string;
5230
+ label: string;
5231
+ kind?: "allow" | "deny" | "other" | undefined;
5232
+ }[] | undefined;
5233
+ toolName?: string | undefined;
5234
+ toolInput?: string | undefined;
5235
+ context?: string | undefined;
5236
+ }>>;
5237
+ error: z.ZodOptional<z.ZodString>;
5238
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
5239
+ updatedAt: z.ZodOptional<z.ZodNumber>;
5240
+ isStreaming: z.ZodOptional<z.ZodBoolean>;
5241
+ }, "strip", z.ZodTypeAny, {
5242
+ itemId: string;
5243
+ error?: string | undefined;
5244
+ status?: "error" | "running" | "idle" | "waiting_permission" | "unavailable" | undefined;
5245
+ role?: "user" | "assistant" | "system" | undefined;
5246
+ text?: string | undefined;
5247
+ kind?: "thinking" | "plan" | "chat" | "tool_activity" | "command_execution" | "file_change" | "subagent_action" | "user_input_prompt" | "review" | "context_compaction" | undefined;
5248
+ plan?: {
5249
+ status: "pending" | "completed" | "in_progress";
5250
+ id: string;
5251
+ text: string;
5252
+ }[] | undefined;
5253
+ content?: {
5254
+ type: "text" | "image";
5255
+ data?: string | undefined;
5256
+ text?: string | undefined;
5257
+ mimeType?: string | undefined;
5258
+ }[] | undefined;
5259
+ isStreaming?: boolean | undefined;
5260
+ toolCall?: {
5261
+ status: "running" | "pending" | "completed" | "failed";
5262
+ id: string;
5263
+ name: string;
5264
+ createdAt?: number | undefined;
5265
+ input?: string | undefined;
5266
+ output?: string | undefined;
5267
+ } | undefined;
5268
+ permission?: {
5269
+ options: {
5270
+ id: string;
5271
+ label: string;
5272
+ kind: "allow" | "deny" | "other";
5273
+ }[];
5274
+ requestId: string;
5275
+ toolName?: string | undefined;
5276
+ toolInput?: string | undefined;
5277
+ context?: string | undefined;
5278
+ } | undefined;
5279
+ commandExecution?: {
5280
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
5281
+ cwd?: string | undefined;
5282
+ exitCode?: number | null | undefined;
5283
+ output?: string | undefined;
5284
+ command?: string | undefined;
5285
+ } | undefined;
5286
+ fileChange?: {
5287
+ entries: {
5288
+ path: string;
5289
+ kind?: string | undefined;
5290
+ added?: number | undefined;
5291
+ removed?: number | undefined;
5292
+ }[];
5293
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
5294
+ summary?: string | undefined;
5295
+ diff?: string | undefined;
5296
+ changeSetId?: string | undefined;
5297
+ } | undefined;
5298
+ subagent?: {
5299
+ status: string;
5300
+ tool: string;
5301
+ receiverThreadIds: string[];
5302
+ receiverAgents: {
5303
+ threadId: string;
5304
+ role?: string | undefined;
5305
+ model?: string | undefined;
5306
+ prompt?: string | undefined;
5307
+ agentId?: string | undefined;
5308
+ nickname?: string | undefined;
5309
+ }[];
5310
+ agentStates: Record<string, {
5311
+ status: string;
5312
+ threadId: string;
5313
+ message?: string | undefined;
5314
+ }>;
5315
+ model?: string | undefined;
5316
+ prompt?: string | undefined;
5317
+ } | undefined;
5318
+ structuredInput?: {
5319
+ requestId: string;
5320
+ questions: {
5321
+ id: string;
5322
+ question: string;
5323
+ options?: {
5324
+ id: string;
5325
+ label: string;
5326
+ description?: string | undefined;
5327
+ }[] | undefined;
5328
+ header?: string | undefined;
5329
+ isOther?: boolean | undefined;
5330
+ isSecret?: boolean | undefined;
5331
+ selectionLimit?: number | undefined;
5332
+ }[];
5333
+ } | undefined;
5334
+ metadata?: Record<string, unknown> | undefined;
5335
+ updatedAt?: number | undefined;
5336
+ textDelta?: string | undefined;
5337
+ }, {
5338
+ itemId: string;
5339
+ error?: string | undefined;
5340
+ status?: "error" | "running" | "idle" | "waiting_permission" | "unavailable" | undefined;
5341
+ role?: "user" | "assistant" | "system" | undefined;
5342
+ text?: string | undefined;
5343
+ kind?: "thinking" | "plan" | "chat" | "tool_activity" | "command_execution" | "file_change" | "subagent_action" | "user_input_prompt" | "review" | "context_compaction" | undefined;
5344
+ plan?: {
5345
+ status: "pending" | "completed" | "in_progress";
5346
+ id: string;
5347
+ text: string;
5348
+ }[] | undefined;
5349
+ content?: {
5350
+ type: "text" | "image";
5351
+ data?: string | undefined;
5352
+ text?: string | undefined;
5353
+ mimeType?: string | undefined;
5354
+ }[] | undefined;
5355
+ isStreaming?: boolean | undefined;
5356
+ toolCall?: {
5357
+ id: string;
5358
+ name: string;
5359
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
5360
+ createdAt?: number | undefined;
5361
+ input?: string | undefined;
5362
+ output?: string | undefined;
5363
+ } | undefined;
5364
+ permission?: {
5365
+ requestId: string;
5366
+ options?: {
5367
+ id: string;
5368
+ label: string;
5369
+ kind?: "allow" | "deny" | "other" | undefined;
5370
+ }[] | undefined;
5371
+ toolName?: string | undefined;
5372
+ toolInput?: string | undefined;
5373
+ context?: string | undefined;
5374
+ } | undefined;
5375
+ commandExecution?: {
5376
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
5377
+ cwd?: string | undefined;
5378
+ exitCode?: number | null | undefined;
5379
+ output?: string | undefined;
5380
+ command?: string | undefined;
5381
+ } | undefined;
5382
+ fileChange?: {
5383
+ entries?: {
5384
+ path: string;
5385
+ kind?: string | undefined;
5386
+ added?: number | undefined;
5387
+ removed?: number | undefined;
5388
+ }[] | undefined;
5389
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
5390
+ summary?: string | undefined;
5391
+ diff?: string | undefined;
5392
+ changeSetId?: string | undefined;
5393
+ } | undefined;
5394
+ subagent?: {
5395
+ status: string;
5396
+ tool: string;
5397
+ model?: string | undefined;
5398
+ prompt?: string | undefined;
5399
+ receiverThreadIds?: string[] | undefined;
5400
+ receiverAgents?: {
5401
+ threadId: string;
5402
+ role?: string | undefined;
5403
+ model?: string | undefined;
5404
+ prompt?: string | undefined;
5405
+ agentId?: string | undefined;
5406
+ nickname?: string | undefined;
5407
+ }[] | undefined;
5408
+ agentStates?: Record<string, {
5409
+ status: string;
5410
+ threadId: string;
5411
+ message?: string | undefined;
5412
+ }> | undefined;
5413
+ } | undefined;
5414
+ structuredInput?: {
5415
+ requestId: string;
5416
+ questions?: {
5417
+ id: string;
5418
+ question: string;
5419
+ options?: {
5420
+ id: string;
5421
+ label: string;
5422
+ description?: string | undefined;
5423
+ }[] | undefined;
5424
+ header?: string | undefined;
5425
+ isOther?: boolean | undefined;
5426
+ isSecret?: boolean | undefined;
5427
+ selectionLimit?: number | undefined;
5428
+ }[] | undefined;
5429
+ } | undefined;
5430
+ metadata?: Record<string, unknown> | undefined;
5431
+ updatedAt?: number | undefined;
5432
+ textDelta?: string | undefined;
5433
+ }>>;
5434
+ }, "strip", z.ZodTypeAny, {
5435
+ conversationId: string;
5436
+ conversation?: {
5437
+ status: "error" | "running" | "idle" | "waiting_permission" | "unavailable";
5438
+ id: string;
5439
+ provider: "claude" | "codex" | "custom";
5440
+ cwd: string;
5441
+ createdAt: number;
5442
+ archived: boolean;
5443
+ lastActivityAt: number;
5444
+ agentSessionId?: string | undefined;
5445
+ model?: string | undefined;
5446
+ reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
5447
+ permissionMode?: "read_only" | "workspace_write" | "full_access" | undefined;
5448
+ title?: string | undefined;
5449
+ lastMessagePreview?: string | undefined;
5450
+ } | undefined;
5451
+ item?: {
5452
+ type: "error" | "message" | "status" | "tool_call" | "plan" | "permission";
5453
+ id: string;
5454
+ createdAt: number;
5455
+ conversationId: string;
5456
+ error?: string | undefined;
5457
+ status?: "error" | "running" | "idle" | "waiting_permission" | "unavailable" | undefined;
5458
+ role?: "user" | "assistant" | "system" | undefined;
5459
+ text?: string | undefined;
5460
+ kind?: "thinking" | "plan" | "chat" | "tool_activity" | "command_execution" | "file_change" | "subagent_action" | "user_input_prompt" | "review" | "context_compaction" | undefined;
5461
+ plan?: {
5462
+ status: "pending" | "completed" | "in_progress";
5463
+ id: string;
5464
+ text: string;
5465
+ }[] | undefined;
5466
+ content?: {
5467
+ type: "text" | "image";
5468
+ data?: string | undefined;
5469
+ text?: string | undefined;
5470
+ mimeType?: string | undefined;
5471
+ }[] | undefined;
5472
+ isStreaming?: boolean | undefined;
5473
+ toolCall?: {
5474
+ status: "running" | "pending" | "completed" | "failed";
5475
+ id: string;
5476
+ name: string;
5477
+ createdAt?: number | undefined;
5478
+ input?: string | undefined;
5479
+ output?: string | undefined;
5480
+ } | undefined;
5481
+ permission?: {
5482
+ options: {
5483
+ id: string;
5484
+ label: string;
5485
+ kind: "allow" | "deny" | "other";
5486
+ }[];
5487
+ requestId: string;
5488
+ toolName?: string | undefined;
5489
+ toolInput?: string | undefined;
5490
+ context?: string | undefined;
5491
+ } | undefined;
5492
+ turnId?: string | undefined;
5493
+ itemId?: string | undefined;
5494
+ commandExecution?: {
5495
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
5496
+ cwd?: string | undefined;
5497
+ exitCode?: number | null | undefined;
5498
+ output?: string | undefined;
5499
+ command?: string | undefined;
5500
+ } | undefined;
5501
+ fileChange?: {
5502
+ entries: {
5503
+ path: string;
5504
+ kind?: string | undefined;
5505
+ added?: number | undefined;
5506
+ removed?: number | undefined;
5507
+ }[];
5508
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
5509
+ summary?: string | undefined;
5510
+ diff?: string | undefined;
5511
+ changeSetId?: string | undefined;
5512
+ } | undefined;
5513
+ subagent?: {
5514
+ status: string;
5515
+ tool: string;
5516
+ receiverThreadIds: string[];
5517
+ receiverAgents: {
5518
+ threadId: string;
4839
5519
  role?: string | undefined;
4840
5520
  model?: string | undefined;
4841
5521
  prompt?: string | undefined;
@@ -4871,7 +5551,22 @@ export declare const agentV2EventPayloadSchema: z.ZodObject<{
4871
5551
  } | undefined;
4872
5552
  patch?: {
4873
5553
  itemId: string;
5554
+ error?: string | undefined;
4874
5555
  status?: "error" | "running" | "idle" | "waiting_permission" | "unavailable" | undefined;
5556
+ role?: "user" | "assistant" | "system" | undefined;
5557
+ text?: string | undefined;
5558
+ kind?: "thinking" | "plan" | "chat" | "tool_activity" | "command_execution" | "file_change" | "subagent_action" | "user_input_prompt" | "review" | "context_compaction" | undefined;
5559
+ plan?: {
5560
+ status: "pending" | "completed" | "in_progress";
5561
+ id: string;
5562
+ text: string;
5563
+ }[] | undefined;
5564
+ content?: {
5565
+ type: "text" | "image";
5566
+ data?: string | undefined;
5567
+ text?: string | undefined;
5568
+ mimeType?: string | undefined;
5569
+ }[] | undefined;
4875
5570
  isStreaming?: boolean | undefined;
4876
5571
  toolCall?: {
4877
5572
  status: "running" | "pending" | "completed" | "failed";
@@ -4881,6 +5576,73 @@ export declare const agentV2EventPayloadSchema: z.ZodObject<{
4881
5576
  input?: string | undefined;
4882
5577
  output?: string | undefined;
4883
5578
  } | undefined;
5579
+ permission?: {
5580
+ options: {
5581
+ id: string;
5582
+ label: string;
5583
+ kind: "allow" | "deny" | "other";
5584
+ }[];
5585
+ requestId: string;
5586
+ toolName?: string | undefined;
5587
+ toolInput?: string | undefined;
5588
+ context?: string | undefined;
5589
+ } | undefined;
5590
+ commandExecution?: {
5591
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
5592
+ cwd?: string | undefined;
5593
+ exitCode?: number | null | undefined;
5594
+ output?: string | undefined;
5595
+ command?: string | undefined;
5596
+ } | undefined;
5597
+ fileChange?: {
5598
+ entries: {
5599
+ path: string;
5600
+ kind?: string | undefined;
5601
+ added?: number | undefined;
5602
+ removed?: number | undefined;
5603
+ }[];
5604
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
5605
+ summary?: string | undefined;
5606
+ diff?: string | undefined;
5607
+ changeSetId?: string | undefined;
5608
+ } | undefined;
5609
+ subagent?: {
5610
+ status: string;
5611
+ tool: string;
5612
+ receiverThreadIds: string[];
5613
+ receiverAgents: {
5614
+ threadId: string;
5615
+ role?: string | undefined;
5616
+ model?: string | undefined;
5617
+ prompt?: string | undefined;
5618
+ agentId?: string | undefined;
5619
+ nickname?: string | undefined;
5620
+ }[];
5621
+ agentStates: Record<string, {
5622
+ status: string;
5623
+ threadId: string;
5624
+ message?: string | undefined;
5625
+ }>;
5626
+ model?: string | undefined;
5627
+ prompt?: string | undefined;
5628
+ } | undefined;
5629
+ structuredInput?: {
5630
+ requestId: string;
5631
+ questions: {
5632
+ id: string;
5633
+ question: string;
5634
+ options?: {
5635
+ id: string;
5636
+ label: string;
5637
+ description?: string | undefined;
5638
+ }[] | undefined;
5639
+ header?: string | undefined;
5640
+ isOther?: boolean | undefined;
5641
+ isSecret?: boolean | undefined;
5642
+ selectionLimit?: number | undefined;
5643
+ }[];
5644
+ } | undefined;
5645
+ metadata?: Record<string, unknown> | undefined;
4884
5646
  updatedAt?: number | undefined;
4885
5647
  textDelta?: string | undefined;
4886
5648
  } | undefined;
@@ -5004,7 +5766,22 @@ export declare const agentV2EventPayloadSchema: z.ZodObject<{
5004
5766
  } | undefined;
5005
5767
  patch?: {
5006
5768
  itemId: string;
5769
+ error?: string | undefined;
5007
5770
  status?: "error" | "running" | "idle" | "waiting_permission" | "unavailable" | undefined;
5771
+ role?: "user" | "assistant" | "system" | undefined;
5772
+ text?: string | undefined;
5773
+ kind?: "thinking" | "plan" | "chat" | "tool_activity" | "command_execution" | "file_change" | "subagent_action" | "user_input_prompt" | "review" | "context_compaction" | undefined;
5774
+ plan?: {
5775
+ status: "pending" | "completed" | "in_progress";
5776
+ id: string;
5777
+ text: string;
5778
+ }[] | undefined;
5779
+ content?: {
5780
+ type: "text" | "image";
5781
+ data?: string | undefined;
5782
+ text?: string | undefined;
5783
+ mimeType?: string | undefined;
5784
+ }[] | undefined;
5008
5785
  isStreaming?: boolean | undefined;
5009
5786
  toolCall?: {
5010
5787
  id: string;
@@ -5014,6 +5791,73 @@ export declare const agentV2EventPayloadSchema: z.ZodObject<{
5014
5791
  input?: string | undefined;
5015
5792
  output?: string | undefined;
5016
5793
  } | undefined;
5794
+ permission?: {
5795
+ requestId: string;
5796
+ options?: {
5797
+ id: string;
5798
+ label: string;
5799
+ kind?: "allow" | "deny" | "other" | undefined;
5800
+ }[] | undefined;
5801
+ toolName?: string | undefined;
5802
+ toolInput?: string | undefined;
5803
+ context?: string | undefined;
5804
+ } | undefined;
5805
+ commandExecution?: {
5806
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
5807
+ cwd?: string | undefined;
5808
+ exitCode?: number | null | undefined;
5809
+ output?: string | undefined;
5810
+ command?: string | undefined;
5811
+ } | undefined;
5812
+ fileChange?: {
5813
+ entries?: {
5814
+ path: string;
5815
+ kind?: string | undefined;
5816
+ added?: number | undefined;
5817
+ removed?: number | undefined;
5818
+ }[] | undefined;
5819
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
5820
+ summary?: string | undefined;
5821
+ diff?: string | undefined;
5822
+ changeSetId?: string | undefined;
5823
+ } | undefined;
5824
+ subagent?: {
5825
+ status: string;
5826
+ tool: string;
5827
+ model?: string | undefined;
5828
+ prompt?: string | undefined;
5829
+ receiverThreadIds?: string[] | undefined;
5830
+ receiverAgents?: {
5831
+ threadId: string;
5832
+ role?: string | undefined;
5833
+ model?: string | undefined;
5834
+ prompt?: string | undefined;
5835
+ agentId?: string | undefined;
5836
+ nickname?: string | undefined;
5837
+ }[] | undefined;
5838
+ agentStates?: Record<string, {
5839
+ status: string;
5840
+ threadId: string;
5841
+ message?: string | undefined;
5842
+ }> | undefined;
5843
+ } | undefined;
5844
+ structuredInput?: {
5845
+ requestId: string;
5846
+ questions?: {
5847
+ id: string;
5848
+ question: string;
5849
+ options?: {
5850
+ id: string;
5851
+ label: string;
5852
+ description?: string | undefined;
5853
+ }[] | undefined;
5854
+ header?: string | undefined;
5855
+ isOther?: boolean | undefined;
5856
+ isSecret?: boolean | undefined;
5857
+ selectionLimit?: number | undefined;
5858
+ }[] | undefined;
5859
+ } | undefined;
5860
+ metadata?: Record<string, unknown> | undefined;
5017
5861
  updatedAt?: number | undefined;
5018
5862
  textDelta?: string | undefined;
5019
5863
  } | undefined;
@@ -6333,6 +7177,20 @@ export declare const protocolMessageSchemas: {
6333
7177
  supportsPermission: z.ZodOptional<z.ZodBoolean>;
6334
7178
  supportsPlan: z.ZodOptional<z.ZodBoolean>;
6335
7179
  supportsCancel: z.ZodOptional<z.ZodBoolean>;
7180
+ models: z.ZodOptional<z.ZodArray<z.ZodObject<{
7181
+ id: z.ZodString;
7182
+ label: z.ZodString;
7183
+ }, "strip", z.ZodTypeAny, {
7184
+ id: string;
7185
+ label: string;
7186
+ }, {
7187
+ id: string;
7188
+ label: string;
7189
+ }>, "many">>;
7190
+ defaultModel: z.ZodOptional<z.ZodString>;
7191
+ reasoningEfforts: z.ZodOptional<z.ZodArray<z.ZodEnum<["none", "minimal", "low", "medium", "high", "xhigh"]>, "many">>;
7192
+ permissionModes: z.ZodOptional<z.ZodArray<z.ZodEnum<["read_only", "workspace_write", "full_access"]>, "many">>;
7193
+ features: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
6336
7194
  }, "strip", z.ZodTypeAny, {
6337
7195
  id: "claude" | "codex" | "custom";
6338
7196
  enabled: boolean;
@@ -6342,6 +7200,14 @@ export declare const protocolMessageSchemas: {
6342
7200
  supportsPermission?: boolean | undefined;
6343
7201
  supportsPlan?: boolean | undefined;
6344
7202
  supportsCancel?: boolean | undefined;
7203
+ models?: {
7204
+ id: string;
7205
+ label: string;
7206
+ }[] | undefined;
7207
+ defaultModel?: string | undefined;
7208
+ reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh")[] | undefined;
7209
+ permissionModes?: ("read_only" | "workspace_write" | "full_access")[] | undefined;
7210
+ features?: Record<string, boolean> | undefined;
6345
7211
  }, {
6346
7212
  id: "claude" | "codex" | "custom";
6347
7213
  enabled: boolean;
@@ -6351,6 +7217,14 @@ export declare const protocolMessageSchemas: {
6351
7217
  supportsPermission?: boolean | undefined;
6352
7218
  supportsPlan?: boolean | undefined;
6353
7219
  supportsCancel?: boolean | undefined;
7220
+ models?: {
7221
+ id: string;
7222
+ label: string;
7223
+ }[] | undefined;
7224
+ defaultModel?: string | undefined;
7225
+ reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh")[] | undefined;
7226
+ permissionModes?: ("read_only" | "workspace_write" | "full_access")[] | undefined;
7227
+ features?: Record<string, boolean> | undefined;
6354
7228
  }>, "many">>;
6355
7229
  protocolVersion: z.ZodOptional<z.ZodNumber>;
6356
7230
  error: z.ZodOptional<z.ZodString>;
@@ -6382,6 +7256,14 @@ export declare const protocolMessageSchemas: {
6382
7256
  supportsPermission?: boolean | undefined;
6383
7257
  supportsPlan?: boolean | undefined;
6384
7258
  supportsCancel?: boolean | undefined;
7259
+ models?: {
7260
+ id: string;
7261
+ label: string;
7262
+ }[] | undefined;
7263
+ defaultModel?: string | undefined;
7264
+ reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh")[] | undefined;
7265
+ permissionModes?: ("read_only" | "workspace_write" | "full_access")[] | undefined;
7266
+ features?: Record<string, boolean> | undefined;
6385
7267
  }[] | undefined;
6386
7268
  }, {
6387
7269
  enabled: boolean;
@@ -6401,6 +7283,14 @@ export declare const protocolMessageSchemas: {
6401
7283
  supportsPermission?: boolean | undefined;
6402
7284
  supportsPlan?: boolean | undefined;
6403
7285
  supportsCancel?: boolean | undefined;
7286
+ models?: {
7287
+ id: string;
7288
+ label: string;
7289
+ }[] | undefined;
7290
+ defaultModel?: string | undefined;
7291
+ reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh")[] | undefined;
7292
+ permissionModes?: ("read_only" | "workspace_write" | "full_access")[] | undefined;
7293
+ features?: Record<string, boolean> | undefined;
6404
7294
  }[] | undefined;
6405
7295
  supportsSessionList?: boolean | undefined;
6406
7296
  supportsSessionLoad?: boolean | undefined;
@@ -6670,6 +7560,20 @@ export declare const protocolMessageSchemas: {
6670
7560
  supportsPermission: z.ZodOptional<z.ZodBoolean>;
6671
7561
  supportsPlan: z.ZodOptional<z.ZodBoolean>;
6672
7562
  supportsCancel: z.ZodOptional<z.ZodBoolean>;
7563
+ models: z.ZodOptional<z.ZodArray<z.ZodObject<{
7564
+ id: z.ZodString;
7565
+ label: z.ZodString;
7566
+ }, "strip", z.ZodTypeAny, {
7567
+ id: string;
7568
+ label: string;
7569
+ }, {
7570
+ id: string;
7571
+ label: string;
7572
+ }>, "many">>;
7573
+ defaultModel: z.ZodOptional<z.ZodString>;
7574
+ reasoningEfforts: z.ZodOptional<z.ZodArray<z.ZodEnum<["none", "minimal", "low", "medium", "high", "xhigh"]>, "many">>;
7575
+ permissionModes: z.ZodOptional<z.ZodArray<z.ZodEnum<["read_only", "workspace_write", "full_access"]>, "many">>;
7576
+ features: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
6673
7577
  }, "strip", z.ZodTypeAny, {
6674
7578
  id: "claude" | "codex" | "custom";
6675
7579
  enabled: boolean;
@@ -6679,6 +7583,14 @@ export declare const protocolMessageSchemas: {
6679
7583
  supportsPermission?: boolean | undefined;
6680
7584
  supportsPlan?: boolean | undefined;
6681
7585
  supportsCancel?: boolean | undefined;
7586
+ models?: {
7587
+ id: string;
7588
+ label: string;
7589
+ }[] | undefined;
7590
+ defaultModel?: string | undefined;
7591
+ reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh")[] | undefined;
7592
+ permissionModes?: ("read_only" | "workspace_write" | "full_access")[] | undefined;
7593
+ features?: Record<string, boolean> | undefined;
6682
7594
  }, {
6683
7595
  id: "claude" | "codex" | "custom";
6684
7596
  enabled: boolean;
@@ -6688,6 +7600,14 @@ export declare const protocolMessageSchemas: {
6688
7600
  supportsPermission?: boolean | undefined;
6689
7601
  supportsPlan?: boolean | undefined;
6690
7602
  supportsCancel?: boolean | undefined;
7603
+ models?: {
7604
+ id: string;
7605
+ label: string;
7606
+ }[] | undefined;
7607
+ defaultModel?: string | undefined;
7608
+ reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh")[] | undefined;
7609
+ permissionModes?: ("read_only" | "workspace_write" | "full_access")[] | undefined;
7610
+ features?: Record<string, boolean> | undefined;
6691
7611
  }>, "many">>;
6692
7612
  protocolVersion: z.ZodOptional<z.ZodNumber>;
6693
7613
  error: z.ZodOptional<z.ZodString>;
@@ -6719,6 +7639,14 @@ export declare const protocolMessageSchemas: {
6719
7639
  supportsPermission?: boolean | undefined;
6720
7640
  supportsPlan?: boolean | undefined;
6721
7641
  supportsCancel?: boolean | undefined;
7642
+ models?: {
7643
+ id: string;
7644
+ label: string;
7645
+ }[] | undefined;
7646
+ defaultModel?: string | undefined;
7647
+ reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh")[] | undefined;
7648
+ permissionModes?: ("read_only" | "workspace_write" | "full_access")[] | undefined;
7649
+ features?: Record<string, boolean> | undefined;
6722
7650
  }[] | undefined;
6723
7651
  }, {
6724
7652
  enabled: boolean;
@@ -6738,6 +7666,14 @@ export declare const protocolMessageSchemas: {
6738
7666
  supportsPermission?: boolean | undefined;
6739
7667
  supportsPlan?: boolean | undefined;
6740
7668
  supportsCancel?: boolean | undefined;
7669
+ models?: {
7670
+ id: string;
7671
+ label: string;
7672
+ }[] | undefined;
7673
+ defaultModel?: string | undefined;
7674
+ reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh")[] | undefined;
7675
+ permissionModes?: ("read_only" | "workspace_write" | "full_access")[] | undefined;
7676
+ features?: Record<string, boolean> | undefined;
6741
7677
  }[] | undefined;
6742
7678
  supportsSessionList?: boolean | undefined;
6743
7679
  supportsSessionLoad?: boolean | undefined;
@@ -6876,6 +7812,14 @@ export declare const protocolMessageSchemas: {
6876
7812
  supportsPermission?: boolean | undefined;
6877
7813
  supportsPlan?: boolean | undefined;
6878
7814
  supportsCancel?: boolean | undefined;
7815
+ models?: {
7816
+ id: string;
7817
+ label: string;
7818
+ }[] | undefined;
7819
+ defaultModel?: string | undefined;
7820
+ reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh")[] | undefined;
7821
+ permissionModes?: ("read_only" | "workspace_write" | "full_access")[] | undefined;
7822
+ features?: Record<string, boolean> | undefined;
6879
7823
  }[] | undefined;
6880
7824
  } | undefined;
6881
7825
  }, {
@@ -6900,6 +7844,14 @@ export declare const protocolMessageSchemas: {
6900
7844
  supportsPermission?: boolean | undefined;
6901
7845
  supportsPlan?: boolean | undefined;
6902
7846
  supportsCancel?: boolean | undefined;
7847
+ models?: {
7848
+ id: string;
7849
+ label: string;
7850
+ }[] | undefined;
7851
+ defaultModel?: string | undefined;
7852
+ reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh")[] | undefined;
7853
+ permissionModes?: ("read_only" | "workspace_write" | "full_access")[] | undefined;
7854
+ features?: Record<string, boolean> | undefined;
6903
7855
  }[] | undefined;
6904
7856
  supportsSessionList?: boolean | undefined;
6905
7857
  supportsSessionLoad?: boolean | undefined;
@@ -6945,6 +7897,20 @@ export declare const protocolMessageSchemas: {
6945
7897
  supportsPermission: z.ZodOptional<z.ZodBoolean>;
6946
7898
  supportsPlan: z.ZodOptional<z.ZodBoolean>;
6947
7899
  supportsCancel: z.ZodOptional<z.ZodBoolean>;
7900
+ models: z.ZodOptional<z.ZodArray<z.ZodObject<{
7901
+ id: z.ZodString;
7902
+ label: z.ZodString;
7903
+ }, "strip", z.ZodTypeAny, {
7904
+ id: string;
7905
+ label: string;
7906
+ }, {
7907
+ id: string;
7908
+ label: string;
7909
+ }>, "many">>;
7910
+ defaultModel: z.ZodOptional<z.ZodString>;
7911
+ reasoningEfforts: z.ZodOptional<z.ZodArray<z.ZodEnum<["none", "minimal", "low", "medium", "high", "xhigh"]>, "many">>;
7912
+ permissionModes: z.ZodOptional<z.ZodArray<z.ZodEnum<["read_only", "workspace_write", "full_access"]>, "many">>;
7913
+ features: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
6948
7914
  }, "strip", z.ZodTypeAny, {
6949
7915
  id: "claude" | "codex" | "custom";
6950
7916
  enabled: boolean;
@@ -6954,6 +7920,14 @@ export declare const protocolMessageSchemas: {
6954
7920
  supportsPermission?: boolean | undefined;
6955
7921
  supportsPlan?: boolean | undefined;
6956
7922
  supportsCancel?: boolean | undefined;
7923
+ models?: {
7924
+ id: string;
7925
+ label: string;
7926
+ }[] | undefined;
7927
+ defaultModel?: string | undefined;
7928
+ reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh")[] | undefined;
7929
+ permissionModes?: ("read_only" | "workspace_write" | "full_access")[] | undefined;
7930
+ features?: Record<string, boolean> | undefined;
6957
7931
  }, {
6958
7932
  id: "claude" | "codex" | "custom";
6959
7933
  enabled: boolean;
@@ -6963,6 +7937,14 @@ export declare const protocolMessageSchemas: {
6963
7937
  supportsPermission?: boolean | undefined;
6964
7938
  supportsPlan?: boolean | undefined;
6965
7939
  supportsCancel?: boolean | undefined;
7940
+ models?: {
7941
+ id: string;
7942
+ label: string;
7943
+ }[] | undefined;
7944
+ defaultModel?: string | undefined;
7945
+ reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh")[] | undefined;
7946
+ permissionModes?: ("read_only" | "workspace_write" | "full_access")[] | undefined;
7947
+ features?: Record<string, boolean> | undefined;
6966
7948
  }>, "many">>;
6967
7949
  protocolVersion: z.ZodOptional<z.ZodNumber>;
6968
7950
  error: z.ZodOptional<z.ZodString>;
@@ -6997,6 +7979,14 @@ export declare const protocolMessageSchemas: {
6997
7979
  supportsPermission?: boolean | undefined;
6998
7980
  supportsPlan?: boolean | undefined;
6999
7981
  supportsCancel?: boolean | undefined;
7982
+ models?: {
7983
+ id: string;
7984
+ label: string;
7985
+ }[] | undefined;
7986
+ defaultModel?: string | undefined;
7987
+ reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh")[] | undefined;
7988
+ permissionModes?: ("read_only" | "workspace_write" | "full_access")[] | undefined;
7989
+ features?: Record<string, boolean> | undefined;
7000
7990
  }[] | undefined;
7001
7991
  }, {
7002
7992
  enabled: boolean;
@@ -7016,6 +8006,14 @@ export declare const protocolMessageSchemas: {
7016
8006
  supportsPermission?: boolean | undefined;
7017
8007
  supportsPlan?: boolean | undefined;
7018
8008
  supportsCancel?: boolean | undefined;
8009
+ models?: {
8010
+ id: string;
8011
+ label: string;
8012
+ }[] | undefined;
8013
+ defaultModel?: string | undefined;
8014
+ reasoningEfforts?: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh")[] | undefined;
8015
+ permissionModes?: ("read_only" | "workspace_write" | "full_access")[] | undefined;
8016
+ features?: Record<string, boolean> | undefined;
7019
8017
  }[] | undefined;
7020
8018
  supportsSessionList?: boolean | undefined;
7021
8019
  supportsSessionLoad?: boolean | undefined;
@@ -9273,7 +10271,243 @@ export declare const protocolMessageSchemas: {
9273
10271
  } | undefined;
9274
10272
  metadata?: Record<string, unknown> | undefined;
9275
10273
  updatedAt?: number | undefined;
9276
- }, {
10274
+ }, {
10275
+ type: "error" | "message" | "status" | "tool_call" | "plan" | "permission";
10276
+ id: string;
10277
+ createdAt: number;
10278
+ conversationId: string;
10279
+ error?: string | undefined;
10280
+ status?: "error" | "running" | "idle" | "waiting_permission" | "unavailable" | undefined;
10281
+ role?: "user" | "assistant" | "system" | undefined;
10282
+ text?: string | undefined;
10283
+ kind?: "thinking" | "plan" | "chat" | "tool_activity" | "command_execution" | "file_change" | "subagent_action" | "user_input_prompt" | "review" | "context_compaction" | undefined;
10284
+ plan?: {
10285
+ status: "pending" | "completed" | "in_progress";
10286
+ id: string;
10287
+ text: string;
10288
+ }[] | undefined;
10289
+ content?: {
10290
+ type: "text" | "image";
10291
+ data?: string | undefined;
10292
+ text?: string | undefined;
10293
+ mimeType?: string | undefined;
10294
+ }[] | undefined;
10295
+ isStreaming?: boolean | undefined;
10296
+ toolCall?: {
10297
+ id: string;
10298
+ name: string;
10299
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
10300
+ createdAt?: number | undefined;
10301
+ input?: string | undefined;
10302
+ output?: string | undefined;
10303
+ } | undefined;
10304
+ permission?: {
10305
+ requestId: string;
10306
+ options?: {
10307
+ id: string;
10308
+ label: string;
10309
+ kind?: "allow" | "deny" | "other" | undefined;
10310
+ }[] | undefined;
10311
+ toolName?: string | undefined;
10312
+ toolInput?: string | undefined;
10313
+ context?: string | undefined;
10314
+ } | undefined;
10315
+ turnId?: string | undefined;
10316
+ itemId?: string | undefined;
10317
+ commandExecution?: {
10318
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
10319
+ cwd?: string | undefined;
10320
+ exitCode?: number | null | undefined;
10321
+ output?: string | undefined;
10322
+ command?: string | undefined;
10323
+ } | undefined;
10324
+ fileChange?: {
10325
+ entries?: {
10326
+ path: string;
10327
+ kind?: string | undefined;
10328
+ added?: number | undefined;
10329
+ removed?: number | undefined;
10330
+ }[] | undefined;
10331
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
10332
+ summary?: string | undefined;
10333
+ diff?: string | undefined;
10334
+ changeSetId?: string | undefined;
10335
+ } | undefined;
10336
+ subagent?: {
10337
+ status: string;
10338
+ tool: string;
10339
+ model?: string | undefined;
10340
+ prompt?: string | undefined;
10341
+ receiverThreadIds?: string[] | undefined;
10342
+ receiverAgents?: {
10343
+ threadId: string;
10344
+ role?: string | undefined;
10345
+ model?: string | undefined;
10346
+ prompt?: string | undefined;
10347
+ agentId?: string | undefined;
10348
+ nickname?: string | undefined;
10349
+ }[] | undefined;
10350
+ agentStates?: Record<string, {
10351
+ status: string;
10352
+ threadId: string;
10353
+ message?: string | undefined;
10354
+ }> | undefined;
10355
+ } | undefined;
10356
+ structuredInput?: {
10357
+ requestId: string;
10358
+ questions?: {
10359
+ id: string;
10360
+ question: string;
10361
+ options?: {
10362
+ id: string;
10363
+ label: string;
10364
+ description?: string | undefined;
10365
+ }[] | undefined;
10366
+ header?: string | undefined;
10367
+ isOther?: boolean | undefined;
10368
+ isSecret?: boolean | undefined;
10369
+ selectionLimit?: number | undefined;
10370
+ }[] | undefined;
10371
+ } | undefined;
10372
+ metadata?: Record<string, unknown> | undefined;
10373
+ updatedAt?: number | undefined;
10374
+ }>, "many">>;
10375
+ }, "strip", z.ZodTypeAny, {
10376
+ conversations: {
10377
+ status: "error" | "running" | "idle" | "waiting_permission" | "unavailable";
10378
+ id: string;
10379
+ provider: "claude" | "codex" | "custom";
10380
+ cwd: string;
10381
+ createdAt: number;
10382
+ archived: boolean;
10383
+ lastActivityAt: number;
10384
+ agentSessionId?: string | undefined;
10385
+ model?: string | undefined;
10386
+ reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
10387
+ permissionMode?: "read_only" | "workspace_write" | "full_access" | undefined;
10388
+ title?: string | undefined;
10389
+ lastMessagePreview?: string | undefined;
10390
+ }[];
10391
+ items: {
10392
+ type: "error" | "message" | "status" | "tool_call" | "plan" | "permission";
10393
+ id: string;
10394
+ createdAt: number;
10395
+ conversationId: string;
10396
+ error?: string | undefined;
10397
+ status?: "error" | "running" | "idle" | "waiting_permission" | "unavailable" | undefined;
10398
+ role?: "user" | "assistant" | "system" | undefined;
10399
+ text?: string | undefined;
10400
+ kind?: "thinking" | "plan" | "chat" | "tool_activity" | "command_execution" | "file_change" | "subagent_action" | "user_input_prompt" | "review" | "context_compaction" | undefined;
10401
+ plan?: {
10402
+ status: "pending" | "completed" | "in_progress";
10403
+ id: string;
10404
+ text: string;
10405
+ }[] | undefined;
10406
+ content?: {
10407
+ type: "text" | "image";
10408
+ data?: string | undefined;
10409
+ text?: string | undefined;
10410
+ mimeType?: string | undefined;
10411
+ }[] | undefined;
10412
+ isStreaming?: boolean | undefined;
10413
+ toolCall?: {
10414
+ status: "running" | "pending" | "completed" | "failed";
10415
+ id: string;
10416
+ name: string;
10417
+ createdAt?: number | undefined;
10418
+ input?: string | undefined;
10419
+ output?: string | undefined;
10420
+ } | undefined;
10421
+ permission?: {
10422
+ options: {
10423
+ id: string;
10424
+ label: string;
10425
+ kind: "allow" | "deny" | "other";
10426
+ }[];
10427
+ requestId: string;
10428
+ toolName?: string | undefined;
10429
+ toolInput?: string | undefined;
10430
+ context?: string | undefined;
10431
+ } | undefined;
10432
+ turnId?: string | undefined;
10433
+ itemId?: string | undefined;
10434
+ commandExecution?: {
10435
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
10436
+ cwd?: string | undefined;
10437
+ exitCode?: number | null | undefined;
10438
+ output?: string | undefined;
10439
+ command?: string | undefined;
10440
+ } | undefined;
10441
+ fileChange?: {
10442
+ entries: {
10443
+ path: string;
10444
+ kind?: string | undefined;
10445
+ added?: number | undefined;
10446
+ removed?: number | undefined;
10447
+ }[];
10448
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
10449
+ summary?: string | undefined;
10450
+ diff?: string | undefined;
10451
+ changeSetId?: string | undefined;
10452
+ } | undefined;
10453
+ subagent?: {
10454
+ status: string;
10455
+ tool: string;
10456
+ receiverThreadIds: string[];
10457
+ receiverAgents: {
10458
+ threadId: string;
10459
+ role?: string | undefined;
10460
+ model?: string | undefined;
10461
+ prompt?: string | undefined;
10462
+ agentId?: string | undefined;
10463
+ nickname?: string | undefined;
10464
+ }[];
10465
+ agentStates: Record<string, {
10466
+ status: string;
10467
+ threadId: string;
10468
+ message?: string | undefined;
10469
+ }>;
10470
+ model?: string | undefined;
10471
+ prompt?: string | undefined;
10472
+ } | undefined;
10473
+ structuredInput?: {
10474
+ requestId: string;
10475
+ questions: {
10476
+ id: string;
10477
+ question: string;
10478
+ options?: {
10479
+ id: string;
10480
+ label: string;
10481
+ description?: string | undefined;
10482
+ }[] | undefined;
10483
+ header?: string | undefined;
10484
+ isOther?: boolean | undefined;
10485
+ isSecret?: boolean | undefined;
10486
+ selectionLimit?: number | undefined;
10487
+ }[];
10488
+ } | undefined;
10489
+ metadata?: Record<string, unknown> | undefined;
10490
+ updatedAt?: number | undefined;
10491
+ }[];
10492
+ activeConversationId?: string | undefined;
10493
+ }, {
10494
+ conversations?: {
10495
+ id: string;
10496
+ cwd: string;
10497
+ createdAt: number;
10498
+ lastActivityAt: number;
10499
+ status?: "error" | "running" | "idle" | "waiting_permission" | "unavailable" | undefined;
10500
+ provider?: "claude" | "codex" | "custom" | undefined;
10501
+ agentSessionId?: string | undefined;
10502
+ model?: string | undefined;
10503
+ reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
10504
+ permissionMode?: "read_only" | "workspace_write" | "full_access" | undefined;
10505
+ title?: string | undefined;
10506
+ archived?: boolean | undefined;
10507
+ lastMessagePreview?: string | undefined;
10508
+ }[] | undefined;
10509
+ activeConversationId?: string | undefined;
10510
+ items?: {
9277
10511
  type: "error" | "message" | "status" | "tool_call" | "plan" | "permission";
9278
10512
  id: string;
9279
10513
  createdAt: number;
@@ -9354,8 +10588,325 @@ export declare const protocolMessageSchemas: {
9354
10588
  threadId: string;
9355
10589
  message?: string | undefined;
9356
10590
  }> | undefined;
9357
- } | undefined;
9358
- structuredInput?: {
10591
+ } | undefined;
10592
+ structuredInput?: {
10593
+ requestId: string;
10594
+ questions?: {
10595
+ id: string;
10596
+ question: string;
10597
+ options?: {
10598
+ id: string;
10599
+ label: string;
10600
+ description?: string | undefined;
10601
+ }[] | undefined;
10602
+ header?: string | undefined;
10603
+ isOther?: boolean | undefined;
10604
+ isSecret?: boolean | undefined;
10605
+ selectionLimit?: number | undefined;
10606
+ }[] | undefined;
10607
+ } | undefined;
10608
+ metadata?: Record<string, unknown> | undefined;
10609
+ updatedAt?: number | undefined;
10610
+ }[] | undefined;
10611
+ }>;
10612
+ readonly "agent.v2.event": z.ZodObject<{
10613
+ conversationId: z.ZodString;
10614
+ conversation: z.ZodOptional<z.ZodObject<{
10615
+ id: z.ZodString;
10616
+ agentSessionId: z.ZodOptional<z.ZodString>;
10617
+ provider: z.ZodDefault<z.ZodEnum<["codex", "claude", "custom"]>>;
10618
+ cwd: z.ZodString;
10619
+ title: z.ZodOptional<z.ZodString>;
10620
+ model: z.ZodOptional<z.ZodString>;
10621
+ reasoningEffort: z.ZodOptional<z.ZodEnum<["none", "minimal", "low", "medium", "high", "xhigh"]>>;
10622
+ permissionMode: z.ZodOptional<z.ZodEnum<["read_only", "workspace_write", "full_access"]>>;
10623
+ status: z.ZodDefault<z.ZodEnum<["unavailable", "idle", "running", "waiting_permission", "error"]>>;
10624
+ archived: z.ZodDefault<z.ZodBoolean>;
10625
+ lastMessagePreview: z.ZodOptional<z.ZodString>;
10626
+ lastActivityAt: z.ZodNumber;
10627
+ createdAt: z.ZodNumber;
10628
+ }, "strip", z.ZodTypeAny, {
10629
+ status: "error" | "running" | "idle" | "waiting_permission" | "unavailable";
10630
+ id: string;
10631
+ provider: "claude" | "codex" | "custom";
10632
+ cwd: string;
10633
+ createdAt: number;
10634
+ archived: boolean;
10635
+ lastActivityAt: number;
10636
+ agentSessionId?: string | undefined;
10637
+ model?: string | undefined;
10638
+ reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
10639
+ permissionMode?: "read_only" | "workspace_write" | "full_access" | undefined;
10640
+ title?: string | undefined;
10641
+ lastMessagePreview?: string | undefined;
10642
+ }, {
10643
+ id: string;
10644
+ cwd: string;
10645
+ createdAt: number;
10646
+ lastActivityAt: number;
10647
+ status?: "error" | "running" | "idle" | "waiting_permission" | "unavailable" | undefined;
10648
+ provider?: "claude" | "codex" | "custom" | undefined;
10649
+ agentSessionId?: string | undefined;
10650
+ model?: string | undefined;
10651
+ reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
10652
+ permissionMode?: "read_only" | "workspace_write" | "full_access" | undefined;
10653
+ title?: string | undefined;
10654
+ archived?: boolean | undefined;
10655
+ lastMessagePreview?: string | undefined;
10656
+ }>>;
10657
+ item: z.ZodOptional<z.ZodObject<{
10658
+ id: z.ZodString;
10659
+ conversationId: z.ZodString;
10660
+ type: z.ZodEnum<["message", "tool_call", "plan", "permission", "status", "error"]>;
10661
+ kind: z.ZodOptional<z.ZodEnum<["chat", "thinking", "tool_activity", "command_execution", "file_change", "subagent_action", "plan", "user_input_prompt", "review", "context_compaction"]>>;
10662
+ turnId: z.ZodOptional<z.ZodString>;
10663
+ itemId: z.ZodOptional<z.ZodString>;
10664
+ role: z.ZodOptional<z.ZodEnum<["user", "assistant", "system"]>>;
10665
+ content: z.ZodOptional<z.ZodArray<z.ZodObject<{
10666
+ type: z.ZodEnum<["text", "image"]>;
10667
+ text: z.ZodOptional<z.ZodString>;
10668
+ data: z.ZodOptional<z.ZodString>;
10669
+ mimeType: z.ZodOptional<z.ZodString>;
10670
+ }, "strip", z.ZodTypeAny, {
10671
+ type: "text" | "image";
10672
+ data?: string | undefined;
10673
+ text?: string | undefined;
10674
+ mimeType?: string | undefined;
10675
+ }, {
10676
+ type: "text" | "image";
10677
+ data?: string | undefined;
10678
+ text?: string | undefined;
10679
+ mimeType?: string | undefined;
10680
+ }>, "many">>;
10681
+ text: z.ZodOptional<z.ZodString>;
10682
+ toolCall: z.ZodOptional<z.ZodObject<{
10683
+ id: z.ZodString;
10684
+ name: z.ZodString;
10685
+ input: z.ZodOptional<z.ZodString>;
10686
+ output: z.ZodOptional<z.ZodString>;
10687
+ createdAt: z.ZodOptional<z.ZodNumber>;
10688
+ status: z.ZodDefault<z.ZodEnum<["pending", "running", "completed", "failed"]>>;
10689
+ }, "strip", z.ZodTypeAny, {
10690
+ status: "running" | "pending" | "completed" | "failed";
10691
+ id: string;
10692
+ name: string;
10693
+ createdAt?: number | undefined;
10694
+ input?: string | undefined;
10695
+ output?: string | undefined;
10696
+ }, {
10697
+ id: string;
10698
+ name: string;
10699
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
10700
+ createdAt?: number | undefined;
10701
+ input?: string | undefined;
10702
+ output?: string | undefined;
10703
+ }>>;
10704
+ commandExecution: z.ZodOptional<z.ZodObject<{
10705
+ command: z.ZodOptional<z.ZodString>;
10706
+ cwd: z.ZodOptional<z.ZodString>;
10707
+ output: z.ZodOptional<z.ZodString>;
10708
+ exitCode: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
10709
+ status: z.ZodOptional<z.ZodEnum<["pending", "running", "completed", "failed"]>>;
10710
+ }, "strip", z.ZodTypeAny, {
10711
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
10712
+ cwd?: string | undefined;
10713
+ exitCode?: number | null | undefined;
10714
+ output?: string | undefined;
10715
+ command?: string | undefined;
10716
+ }, {
10717
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
10718
+ cwd?: string | undefined;
10719
+ exitCode?: number | null | undefined;
10720
+ output?: string | undefined;
10721
+ command?: string | undefined;
10722
+ }>>;
10723
+ fileChange: z.ZodOptional<z.ZodObject<{
10724
+ entries: z.ZodDefault<z.ZodArray<z.ZodObject<{
10725
+ path: z.ZodString;
10726
+ kind: z.ZodOptional<z.ZodString>;
10727
+ added: z.ZodOptional<z.ZodNumber>;
10728
+ removed: z.ZodOptional<z.ZodNumber>;
10729
+ }, "strip", z.ZodTypeAny, {
10730
+ path: string;
10731
+ kind?: string | undefined;
10732
+ added?: number | undefined;
10733
+ removed?: number | undefined;
10734
+ }, {
10735
+ path: string;
10736
+ kind?: string | undefined;
10737
+ added?: number | undefined;
10738
+ removed?: number | undefined;
10739
+ }>, "many">>;
10740
+ diff: z.ZodOptional<z.ZodString>;
10741
+ summary: z.ZodOptional<z.ZodString>;
10742
+ changeSetId: z.ZodOptional<z.ZodString>;
10743
+ status: z.ZodOptional<z.ZodEnum<["pending", "running", "completed", "failed"]>>;
10744
+ }, "strip", z.ZodTypeAny, {
10745
+ entries: {
10746
+ path: string;
10747
+ kind?: string | undefined;
10748
+ added?: number | undefined;
10749
+ removed?: number | undefined;
10750
+ }[];
10751
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
10752
+ summary?: string | undefined;
10753
+ diff?: string | undefined;
10754
+ changeSetId?: string | undefined;
10755
+ }, {
10756
+ entries?: {
10757
+ path: string;
10758
+ kind?: string | undefined;
10759
+ added?: number | undefined;
10760
+ removed?: number | undefined;
10761
+ }[] | undefined;
10762
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
10763
+ summary?: string | undefined;
10764
+ diff?: string | undefined;
10765
+ changeSetId?: string | undefined;
10766
+ }>>;
10767
+ subagent: z.ZodOptional<z.ZodObject<{
10768
+ tool: z.ZodString;
10769
+ status: z.ZodString;
10770
+ prompt: z.ZodOptional<z.ZodString>;
10771
+ model: z.ZodOptional<z.ZodString>;
10772
+ receiverThreadIds: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
10773
+ receiverAgents: z.ZodDefault<z.ZodArray<z.ZodObject<{
10774
+ threadId: z.ZodString;
10775
+ agentId: z.ZodOptional<z.ZodString>;
10776
+ nickname: z.ZodOptional<z.ZodString>;
10777
+ role: z.ZodOptional<z.ZodString>;
10778
+ model: z.ZodOptional<z.ZodString>;
10779
+ prompt: z.ZodOptional<z.ZodString>;
10780
+ }, "strip", z.ZodTypeAny, {
10781
+ threadId: string;
10782
+ role?: string | undefined;
10783
+ model?: string | undefined;
10784
+ prompt?: string | undefined;
10785
+ agentId?: string | undefined;
10786
+ nickname?: string | undefined;
10787
+ }, {
10788
+ threadId: string;
10789
+ role?: string | undefined;
10790
+ model?: string | undefined;
10791
+ prompt?: string | undefined;
10792
+ agentId?: string | undefined;
10793
+ nickname?: string | undefined;
10794
+ }>, "many">>;
10795
+ agentStates: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
10796
+ threadId: z.ZodString;
10797
+ status: z.ZodString;
10798
+ message: z.ZodOptional<z.ZodString>;
10799
+ }, "strip", z.ZodTypeAny, {
10800
+ status: string;
10801
+ threadId: string;
10802
+ message?: string | undefined;
10803
+ }, {
10804
+ status: string;
10805
+ threadId: string;
10806
+ message?: string | undefined;
10807
+ }>>>;
10808
+ }, "strip", z.ZodTypeAny, {
10809
+ status: string;
10810
+ tool: string;
10811
+ receiverThreadIds: string[];
10812
+ receiverAgents: {
10813
+ threadId: string;
10814
+ role?: string | undefined;
10815
+ model?: string | undefined;
10816
+ prompt?: string | undefined;
10817
+ agentId?: string | undefined;
10818
+ nickname?: string | undefined;
10819
+ }[];
10820
+ agentStates: Record<string, {
10821
+ status: string;
10822
+ threadId: string;
10823
+ message?: string | undefined;
10824
+ }>;
10825
+ model?: string | undefined;
10826
+ prompt?: string | undefined;
10827
+ }, {
10828
+ status: string;
10829
+ tool: string;
10830
+ model?: string | undefined;
10831
+ prompt?: string | undefined;
10832
+ receiverThreadIds?: string[] | undefined;
10833
+ receiverAgents?: {
10834
+ threadId: string;
10835
+ role?: string | undefined;
10836
+ model?: string | undefined;
10837
+ prompt?: string | undefined;
10838
+ agentId?: string | undefined;
10839
+ nickname?: string | undefined;
10840
+ }[] | undefined;
10841
+ agentStates?: Record<string, {
10842
+ status: string;
10843
+ threadId: string;
10844
+ message?: string | undefined;
10845
+ }> | undefined;
10846
+ }>>;
10847
+ structuredInput: z.ZodOptional<z.ZodObject<{
10848
+ requestId: z.ZodString;
10849
+ questions: z.ZodDefault<z.ZodArray<z.ZodObject<{
10850
+ id: z.ZodString;
10851
+ header: z.ZodOptional<z.ZodString>;
10852
+ question: z.ZodString;
10853
+ isOther: z.ZodOptional<z.ZodBoolean>;
10854
+ isSecret: z.ZodOptional<z.ZodBoolean>;
10855
+ selectionLimit: z.ZodOptional<z.ZodNumber>;
10856
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
10857
+ id: z.ZodString;
10858
+ label: z.ZodString;
10859
+ description: z.ZodOptional<z.ZodString>;
10860
+ }, "strip", z.ZodTypeAny, {
10861
+ id: string;
10862
+ label: string;
10863
+ description?: string | undefined;
10864
+ }, {
10865
+ id: string;
10866
+ label: string;
10867
+ description?: string | undefined;
10868
+ }>, "many">>;
10869
+ }, "strip", z.ZodTypeAny, {
10870
+ id: string;
10871
+ question: string;
10872
+ options?: {
10873
+ id: string;
10874
+ label: string;
10875
+ description?: string | undefined;
10876
+ }[] | undefined;
10877
+ header?: string | undefined;
10878
+ isOther?: boolean | undefined;
10879
+ isSecret?: boolean | undefined;
10880
+ selectionLimit?: number | undefined;
10881
+ }, {
10882
+ id: string;
10883
+ question: string;
10884
+ options?: {
10885
+ id: string;
10886
+ label: string;
10887
+ description?: string | undefined;
10888
+ }[] | undefined;
10889
+ header?: string | undefined;
10890
+ isOther?: boolean | undefined;
10891
+ isSecret?: boolean | undefined;
10892
+ selectionLimit?: number | undefined;
10893
+ }>, "many">>;
10894
+ }, "strip", z.ZodTypeAny, {
10895
+ requestId: string;
10896
+ questions: {
10897
+ id: string;
10898
+ question: string;
10899
+ options?: {
10900
+ id: string;
10901
+ label: string;
10902
+ description?: string | undefined;
10903
+ }[] | undefined;
10904
+ header?: string | undefined;
10905
+ isOther?: boolean | undefined;
10906
+ isSecret?: boolean | undefined;
10907
+ selectionLimit?: number | undefined;
10908
+ }[];
10909
+ }, {
9359
10910
  requestId: string;
9360
10911
  questions?: {
9361
10912
  id: string;
@@ -9370,27 +10921,66 @@ export declare const protocolMessageSchemas: {
9370
10921
  isSecret?: boolean | undefined;
9371
10922
  selectionLimit?: number | undefined;
9372
10923
  }[] | undefined;
9373
- } | undefined;
9374
- metadata?: Record<string, unknown> | undefined;
9375
- updatedAt?: number | undefined;
9376
- }>, "many">>;
9377
- }, "strip", z.ZodTypeAny, {
9378
- conversations: {
9379
- status: "error" | "running" | "idle" | "waiting_permission" | "unavailable";
9380
- id: string;
9381
- provider: "claude" | "codex" | "custom";
9382
- cwd: string;
9383
- createdAt: number;
9384
- archived: boolean;
9385
- lastActivityAt: number;
9386
- agentSessionId?: string | undefined;
9387
- model?: string | undefined;
9388
- reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
9389
- permissionMode?: "read_only" | "workspace_write" | "full_access" | undefined;
9390
- title?: string | undefined;
9391
- lastMessagePreview?: string | undefined;
9392
- }[];
9393
- items: {
10924
+ }>>;
10925
+ plan: z.ZodOptional<z.ZodArray<z.ZodObject<{
10926
+ id: z.ZodString;
10927
+ text: z.ZodString;
10928
+ status: z.ZodEnum<["pending", "in_progress", "completed"]>;
10929
+ }, "strip", z.ZodTypeAny, {
10930
+ status: "pending" | "completed" | "in_progress";
10931
+ id: string;
10932
+ text: string;
10933
+ }, {
10934
+ status: "pending" | "completed" | "in_progress";
10935
+ id: string;
10936
+ text: string;
10937
+ }>, "many">>;
10938
+ permission: z.ZodOptional<z.ZodObject<{
10939
+ requestId: z.ZodString;
10940
+ toolName: z.ZodOptional<z.ZodString>;
10941
+ toolInput: z.ZodOptional<z.ZodString>;
10942
+ context: z.ZodOptional<z.ZodString>;
10943
+ options: z.ZodDefault<z.ZodArray<z.ZodObject<{
10944
+ id: z.ZodString;
10945
+ label: z.ZodString;
10946
+ kind: z.ZodDefault<z.ZodEnum<["allow", "deny", "other"]>>;
10947
+ }, "strip", z.ZodTypeAny, {
10948
+ id: string;
10949
+ label: string;
10950
+ kind: "allow" | "deny" | "other";
10951
+ }, {
10952
+ id: string;
10953
+ label: string;
10954
+ kind?: "allow" | "deny" | "other" | undefined;
10955
+ }>, "many">>;
10956
+ }, "strip", z.ZodTypeAny, {
10957
+ options: {
10958
+ id: string;
10959
+ label: string;
10960
+ kind: "allow" | "deny" | "other";
10961
+ }[];
10962
+ requestId: string;
10963
+ toolName?: string | undefined;
10964
+ toolInput?: string | undefined;
10965
+ context?: string | undefined;
10966
+ }, {
10967
+ requestId: string;
10968
+ options?: {
10969
+ id: string;
10970
+ label: string;
10971
+ kind?: "allow" | "deny" | "other" | undefined;
10972
+ }[] | undefined;
10973
+ toolName?: string | undefined;
10974
+ toolInput?: string | undefined;
10975
+ context?: string | undefined;
10976
+ }>>;
10977
+ status: z.ZodOptional<z.ZodEnum<["unavailable", "idle", "running", "waiting_permission", "error"]>>;
10978
+ error: z.ZodOptional<z.ZodString>;
10979
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
10980
+ createdAt: z.ZodNumber;
10981
+ updatedAt: z.ZodOptional<z.ZodNumber>;
10982
+ isStreaming: z.ZodOptional<z.ZodBoolean>;
10983
+ }, "strip", z.ZodTypeAny, {
9394
10984
  type: "error" | "message" | "status" | "tool_call" | "plan" | "permission";
9395
10985
  id: string;
9396
10986
  createdAt: number;
@@ -9490,26 +11080,7 @@ export declare const protocolMessageSchemas: {
9490
11080
  } | undefined;
9491
11081
  metadata?: Record<string, unknown> | undefined;
9492
11082
  updatedAt?: number | undefined;
9493
- }[];
9494
- activeConversationId?: string | undefined;
9495
- }, {
9496
- conversations?: {
9497
- id: string;
9498
- cwd: string;
9499
- createdAt: number;
9500
- lastActivityAt: number;
9501
- status?: "error" | "running" | "idle" | "waiting_permission" | "unavailable" | undefined;
9502
- provider?: "claude" | "codex" | "custom" | undefined;
9503
- agentSessionId?: string | undefined;
9504
- model?: string | undefined;
9505
- reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
9506
- permissionMode?: "read_only" | "workspace_write" | "full_access" | undefined;
9507
- title?: string | undefined;
9508
- archived?: boolean | undefined;
9509
- lastMessagePreview?: string | undefined;
9510
- }[] | undefined;
9511
- activeConversationId?: string | undefined;
9512
- items?: {
11083
+ }, {
9513
11084
  type: "error" | "message" | "status" | "tool_call" | "plan" | "permission";
9514
11085
  id: string;
9515
11086
  createdAt: number;
@@ -9600,69 +11171,19 @@ export declare const protocolMessageSchemas: {
9600
11171
  id: string;
9601
11172
  label: string;
9602
11173
  description?: string | undefined;
9603
- }[] | undefined;
9604
- header?: string | undefined;
9605
- isOther?: boolean | undefined;
9606
- isSecret?: boolean | undefined;
9607
- selectionLimit?: number | undefined;
9608
- }[] | undefined;
9609
- } | undefined;
9610
- metadata?: Record<string, unknown> | undefined;
9611
- updatedAt?: number | undefined;
9612
- }[] | undefined;
9613
- }>;
9614
- readonly "agent.v2.event": z.ZodObject<{
9615
- conversationId: z.ZodString;
9616
- conversation: z.ZodOptional<z.ZodObject<{
9617
- id: z.ZodString;
9618
- agentSessionId: z.ZodOptional<z.ZodString>;
9619
- provider: z.ZodDefault<z.ZodEnum<["codex", "claude", "custom"]>>;
9620
- cwd: z.ZodString;
9621
- title: z.ZodOptional<z.ZodString>;
9622
- model: z.ZodOptional<z.ZodString>;
9623
- reasoningEffort: z.ZodOptional<z.ZodEnum<["none", "minimal", "low", "medium", "high", "xhigh"]>>;
9624
- permissionMode: z.ZodOptional<z.ZodEnum<["read_only", "workspace_write", "full_access"]>>;
9625
- status: z.ZodDefault<z.ZodEnum<["unavailable", "idle", "running", "waiting_permission", "error"]>>;
9626
- archived: z.ZodDefault<z.ZodBoolean>;
9627
- lastMessagePreview: z.ZodOptional<z.ZodString>;
9628
- lastActivityAt: z.ZodNumber;
9629
- createdAt: z.ZodNumber;
9630
- }, "strip", z.ZodTypeAny, {
9631
- status: "error" | "running" | "idle" | "waiting_permission" | "unavailable";
9632
- id: string;
9633
- provider: "claude" | "codex" | "custom";
9634
- cwd: string;
9635
- createdAt: number;
9636
- archived: boolean;
9637
- lastActivityAt: number;
9638
- agentSessionId?: string | undefined;
9639
- model?: string | undefined;
9640
- reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
9641
- permissionMode?: "read_only" | "workspace_write" | "full_access" | undefined;
9642
- title?: string | undefined;
9643
- lastMessagePreview?: string | undefined;
9644
- }, {
9645
- id: string;
9646
- cwd: string;
9647
- createdAt: number;
9648
- lastActivityAt: number;
9649
- status?: "error" | "running" | "idle" | "waiting_permission" | "unavailable" | undefined;
9650
- provider?: "claude" | "codex" | "custom" | undefined;
9651
- agentSessionId?: string | undefined;
9652
- model?: string | undefined;
9653
- reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
9654
- permissionMode?: "read_only" | "workspace_write" | "full_access" | undefined;
9655
- title?: string | undefined;
9656
- archived?: boolean | undefined;
9657
- lastMessagePreview?: string | undefined;
11174
+ }[] | undefined;
11175
+ header?: string | undefined;
11176
+ isOther?: boolean | undefined;
11177
+ isSecret?: boolean | undefined;
11178
+ selectionLimit?: number | undefined;
11179
+ }[] | undefined;
11180
+ } | undefined;
11181
+ metadata?: Record<string, unknown> | undefined;
11182
+ updatedAt?: number | undefined;
9658
11183
  }>>;
9659
- item: z.ZodOptional<z.ZodObject<{
9660
- id: z.ZodString;
9661
- conversationId: z.ZodString;
9662
- type: z.ZodEnum<["message", "tool_call", "plan", "permission", "status", "error"]>;
11184
+ patch: z.ZodOptional<z.ZodObject<{
11185
+ itemId: z.ZodString;
9663
11186
  kind: z.ZodOptional<z.ZodEnum<["chat", "thinking", "tool_activity", "command_execution", "file_change", "subagent_action", "plan", "user_input_prompt", "review", "context_compaction"]>>;
9664
- turnId: z.ZodOptional<z.ZodString>;
9665
- itemId: z.ZodOptional<z.ZodString>;
9666
11187
  role: z.ZodOptional<z.ZodEnum<["user", "assistant", "system"]>>;
9667
11188
  content: z.ZodOptional<z.ZodArray<z.ZodObject<{
9668
11189
  type: z.ZodEnum<["text", "image"]>;
@@ -9681,6 +11202,8 @@ export declare const protocolMessageSchemas: {
9681
11202
  mimeType?: string | undefined;
9682
11203
  }>, "many">>;
9683
11204
  text: z.ZodOptional<z.ZodString>;
11205
+ textDelta: z.ZodOptional<z.ZodString>;
11206
+ status: z.ZodOptional<z.ZodEnum<["unavailable", "idle", "running", "waiting_permission", "error"]>>;
9684
11207
  toolCall: z.ZodOptional<z.ZodObject<{
9685
11208
  id: z.ZodString;
9686
11209
  name: z.ZodString;
@@ -9976,17 +11499,12 @@ export declare const protocolMessageSchemas: {
9976
11499
  toolInput?: string | undefined;
9977
11500
  context?: string | undefined;
9978
11501
  }>>;
9979
- status: z.ZodOptional<z.ZodEnum<["unavailable", "idle", "running", "waiting_permission", "error"]>>;
9980
11502
  error: z.ZodOptional<z.ZodString>;
9981
11503
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
9982
- createdAt: z.ZodNumber;
9983
11504
  updatedAt: z.ZodOptional<z.ZodNumber>;
9984
11505
  isStreaming: z.ZodOptional<z.ZodBoolean>;
9985
11506
  }, "strip", z.ZodTypeAny, {
9986
- type: "error" | "message" | "status" | "tool_call" | "plan" | "permission";
9987
- id: string;
9988
- createdAt: number;
9989
- conversationId: string;
11507
+ itemId: string;
9990
11508
  error?: string | undefined;
9991
11509
  status?: "error" | "running" | "idle" | "waiting_permission" | "unavailable" | undefined;
9992
11510
  role?: "user" | "assistant" | "system" | undefined;
@@ -10023,8 +11541,6 @@ export declare const protocolMessageSchemas: {
10023
11541
  toolInput?: string | undefined;
10024
11542
  context?: string | undefined;
10025
11543
  } | undefined;
10026
- turnId?: string | undefined;
10027
- itemId?: string | undefined;
10028
11544
  commandExecution?: {
10029
11545
  status?: "running" | "pending" | "completed" | "failed" | undefined;
10030
11546
  cwd?: string | undefined;
@@ -10082,11 +11598,9 @@ export declare const protocolMessageSchemas: {
10082
11598
  } | undefined;
10083
11599
  metadata?: Record<string, unknown> | undefined;
10084
11600
  updatedAt?: number | undefined;
11601
+ textDelta?: string | undefined;
10085
11602
  }, {
10086
- type: "error" | "message" | "status" | "tool_call" | "plan" | "permission";
10087
- id: string;
10088
- createdAt: number;
10089
- conversationId: string;
11603
+ itemId: string;
10090
11604
  error?: string | undefined;
10091
11605
  status?: "error" | "running" | "idle" | "waiting_permission" | "unavailable" | undefined;
10092
11606
  role?: "user" | "assistant" | "system" | undefined;
@@ -10123,8 +11637,6 @@ export declare const protocolMessageSchemas: {
10123
11637
  toolInput?: string | undefined;
10124
11638
  context?: string | undefined;
10125
11639
  } | undefined;
10126
- turnId?: string | undefined;
10127
- itemId?: string | undefined;
10128
11640
  commandExecution?: {
10129
11641
  status?: "running" | "pending" | "completed" | "failed" | undefined;
10130
11642
  cwd?: string | undefined;
@@ -10182,62 +11694,6 @@ export declare const protocolMessageSchemas: {
10182
11694
  } | undefined;
10183
11695
  metadata?: Record<string, unknown> | undefined;
10184
11696
  updatedAt?: number | undefined;
10185
- }>>;
10186
- patch: z.ZodOptional<z.ZodObject<{
10187
- itemId: z.ZodString;
10188
- textDelta: z.ZodOptional<z.ZodString>;
10189
- status: z.ZodOptional<z.ZodEnum<["unavailable", "idle", "running", "waiting_permission", "error"]>>;
10190
- toolCall: z.ZodOptional<z.ZodObject<{
10191
- id: z.ZodString;
10192
- name: z.ZodString;
10193
- input: z.ZodOptional<z.ZodString>;
10194
- output: z.ZodOptional<z.ZodString>;
10195
- createdAt: z.ZodOptional<z.ZodNumber>;
10196
- status: z.ZodDefault<z.ZodEnum<["pending", "running", "completed", "failed"]>>;
10197
- }, "strip", z.ZodTypeAny, {
10198
- status: "running" | "pending" | "completed" | "failed";
10199
- id: string;
10200
- name: string;
10201
- createdAt?: number | undefined;
10202
- input?: string | undefined;
10203
- output?: string | undefined;
10204
- }, {
10205
- id: string;
10206
- name: string;
10207
- status?: "running" | "pending" | "completed" | "failed" | undefined;
10208
- createdAt?: number | undefined;
10209
- input?: string | undefined;
10210
- output?: string | undefined;
10211
- }>>;
10212
- updatedAt: z.ZodOptional<z.ZodNumber>;
10213
- isStreaming: z.ZodOptional<z.ZodBoolean>;
10214
- }, "strip", z.ZodTypeAny, {
10215
- itemId: string;
10216
- status?: "error" | "running" | "idle" | "waiting_permission" | "unavailable" | undefined;
10217
- isStreaming?: boolean | undefined;
10218
- toolCall?: {
10219
- status: "running" | "pending" | "completed" | "failed";
10220
- id: string;
10221
- name: string;
10222
- createdAt?: number | undefined;
10223
- input?: string | undefined;
10224
- output?: string | undefined;
10225
- } | undefined;
10226
- updatedAt?: number | undefined;
10227
- textDelta?: string | undefined;
10228
- }, {
10229
- itemId: string;
10230
- status?: "error" | "running" | "idle" | "waiting_permission" | "unavailable" | undefined;
10231
- isStreaming?: boolean | undefined;
10232
- toolCall?: {
10233
- id: string;
10234
- name: string;
10235
- status?: "running" | "pending" | "completed" | "failed" | undefined;
10236
- createdAt?: number | undefined;
10237
- input?: string | undefined;
10238
- output?: string | undefined;
10239
- } | undefined;
10240
- updatedAt?: number | undefined;
10241
11697
  textDelta?: string | undefined;
10242
11698
  }>>;
10243
11699
  }, "strip", z.ZodTypeAny, {
@@ -10360,7 +11816,22 @@ export declare const protocolMessageSchemas: {
10360
11816
  } | undefined;
10361
11817
  patch?: {
10362
11818
  itemId: string;
11819
+ error?: string | undefined;
10363
11820
  status?: "error" | "running" | "idle" | "waiting_permission" | "unavailable" | undefined;
11821
+ role?: "user" | "assistant" | "system" | undefined;
11822
+ text?: string | undefined;
11823
+ kind?: "thinking" | "plan" | "chat" | "tool_activity" | "command_execution" | "file_change" | "subagent_action" | "user_input_prompt" | "review" | "context_compaction" | undefined;
11824
+ plan?: {
11825
+ status: "pending" | "completed" | "in_progress";
11826
+ id: string;
11827
+ text: string;
11828
+ }[] | undefined;
11829
+ content?: {
11830
+ type: "text" | "image";
11831
+ data?: string | undefined;
11832
+ text?: string | undefined;
11833
+ mimeType?: string | undefined;
11834
+ }[] | undefined;
10364
11835
  isStreaming?: boolean | undefined;
10365
11836
  toolCall?: {
10366
11837
  status: "running" | "pending" | "completed" | "failed";
@@ -10370,6 +11841,73 @@ export declare const protocolMessageSchemas: {
10370
11841
  input?: string | undefined;
10371
11842
  output?: string | undefined;
10372
11843
  } | undefined;
11844
+ permission?: {
11845
+ options: {
11846
+ id: string;
11847
+ label: string;
11848
+ kind: "allow" | "deny" | "other";
11849
+ }[];
11850
+ requestId: string;
11851
+ toolName?: string | undefined;
11852
+ toolInput?: string | undefined;
11853
+ context?: string | undefined;
11854
+ } | undefined;
11855
+ commandExecution?: {
11856
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
11857
+ cwd?: string | undefined;
11858
+ exitCode?: number | null | undefined;
11859
+ output?: string | undefined;
11860
+ command?: string | undefined;
11861
+ } | undefined;
11862
+ fileChange?: {
11863
+ entries: {
11864
+ path: string;
11865
+ kind?: string | undefined;
11866
+ added?: number | undefined;
11867
+ removed?: number | undefined;
11868
+ }[];
11869
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
11870
+ summary?: string | undefined;
11871
+ diff?: string | undefined;
11872
+ changeSetId?: string | undefined;
11873
+ } | undefined;
11874
+ subagent?: {
11875
+ status: string;
11876
+ tool: string;
11877
+ receiverThreadIds: string[];
11878
+ receiverAgents: {
11879
+ threadId: string;
11880
+ role?: string | undefined;
11881
+ model?: string | undefined;
11882
+ prompt?: string | undefined;
11883
+ agentId?: string | undefined;
11884
+ nickname?: string | undefined;
11885
+ }[];
11886
+ agentStates: Record<string, {
11887
+ status: string;
11888
+ threadId: string;
11889
+ message?: string | undefined;
11890
+ }>;
11891
+ model?: string | undefined;
11892
+ prompt?: string | undefined;
11893
+ } | undefined;
11894
+ structuredInput?: {
11895
+ requestId: string;
11896
+ questions: {
11897
+ id: string;
11898
+ question: string;
11899
+ options?: {
11900
+ id: string;
11901
+ label: string;
11902
+ description?: string | undefined;
11903
+ }[] | undefined;
11904
+ header?: string | undefined;
11905
+ isOther?: boolean | undefined;
11906
+ isSecret?: boolean | undefined;
11907
+ selectionLimit?: number | undefined;
11908
+ }[];
11909
+ } | undefined;
11910
+ metadata?: Record<string, unknown> | undefined;
10373
11911
  updatedAt?: number | undefined;
10374
11912
  textDelta?: string | undefined;
10375
11913
  } | undefined;
@@ -10493,7 +12031,22 @@ export declare const protocolMessageSchemas: {
10493
12031
  } | undefined;
10494
12032
  patch?: {
10495
12033
  itemId: string;
12034
+ error?: string | undefined;
10496
12035
  status?: "error" | "running" | "idle" | "waiting_permission" | "unavailable" | undefined;
12036
+ role?: "user" | "assistant" | "system" | undefined;
12037
+ text?: string | undefined;
12038
+ kind?: "thinking" | "plan" | "chat" | "tool_activity" | "command_execution" | "file_change" | "subagent_action" | "user_input_prompt" | "review" | "context_compaction" | undefined;
12039
+ plan?: {
12040
+ status: "pending" | "completed" | "in_progress";
12041
+ id: string;
12042
+ text: string;
12043
+ }[] | undefined;
12044
+ content?: {
12045
+ type: "text" | "image";
12046
+ data?: string | undefined;
12047
+ text?: string | undefined;
12048
+ mimeType?: string | undefined;
12049
+ }[] | undefined;
10497
12050
  isStreaming?: boolean | undefined;
10498
12051
  toolCall?: {
10499
12052
  id: string;
@@ -10503,6 +12056,73 @@ export declare const protocolMessageSchemas: {
10503
12056
  input?: string | undefined;
10504
12057
  output?: string | undefined;
10505
12058
  } | undefined;
12059
+ permission?: {
12060
+ requestId: string;
12061
+ options?: {
12062
+ id: string;
12063
+ label: string;
12064
+ kind?: "allow" | "deny" | "other" | undefined;
12065
+ }[] | undefined;
12066
+ toolName?: string | undefined;
12067
+ toolInput?: string | undefined;
12068
+ context?: string | undefined;
12069
+ } | undefined;
12070
+ commandExecution?: {
12071
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
12072
+ cwd?: string | undefined;
12073
+ exitCode?: number | null | undefined;
12074
+ output?: string | undefined;
12075
+ command?: string | undefined;
12076
+ } | undefined;
12077
+ fileChange?: {
12078
+ entries?: {
12079
+ path: string;
12080
+ kind?: string | undefined;
12081
+ added?: number | undefined;
12082
+ removed?: number | undefined;
12083
+ }[] | undefined;
12084
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
12085
+ summary?: string | undefined;
12086
+ diff?: string | undefined;
12087
+ changeSetId?: string | undefined;
12088
+ } | undefined;
12089
+ subagent?: {
12090
+ status: string;
12091
+ tool: string;
12092
+ model?: string | undefined;
12093
+ prompt?: string | undefined;
12094
+ receiverThreadIds?: string[] | undefined;
12095
+ receiverAgents?: {
12096
+ threadId: string;
12097
+ role?: string | undefined;
12098
+ model?: string | undefined;
12099
+ prompt?: string | undefined;
12100
+ agentId?: string | undefined;
12101
+ nickname?: string | undefined;
12102
+ }[] | undefined;
12103
+ agentStates?: Record<string, {
12104
+ status: string;
12105
+ threadId: string;
12106
+ message?: string | undefined;
12107
+ }> | undefined;
12108
+ } | undefined;
12109
+ structuredInput?: {
12110
+ requestId: string;
12111
+ questions?: {
12112
+ id: string;
12113
+ question: string;
12114
+ options?: {
12115
+ id: string;
12116
+ label: string;
12117
+ description?: string | undefined;
12118
+ }[] | undefined;
12119
+ header?: string | undefined;
12120
+ isOther?: boolean | undefined;
12121
+ isSecret?: boolean | undefined;
12122
+ selectionLimit?: number | undefined;
12123
+ }[] | undefined;
12124
+ } | undefined;
12125
+ metadata?: Record<string, unknown> | undefined;
10506
12126
  updatedAt?: number | undefined;
10507
12127
  textDelta?: string | undefined;
10508
12128
  } | undefined;