linkshell-cli 0.2.98 → 0.2.100

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.
Files changed (31) hide show
  1. package/dist/cli/src/runtime/acp/acp-client.d.ts +1 -0
  2. package/dist/cli/src/runtime/acp/acp-client.js +17 -3
  3. package/dist/cli/src/runtime/acp/acp-client.js.map +1 -1
  4. package/dist/cli/src/runtime/acp/agent-session.d.ts +1 -0
  5. package/dist/cli/src/runtime/acp/agent-session.js +73 -19
  6. package/dist/cli/src/runtime/acp/agent-session.js.map +1 -1
  7. package/dist/cli/src/runtime/acp/agent-workspace.d.ts +6 -1
  8. package/dist/cli/src/runtime/acp/agent-workspace.js +346 -57
  9. package/dist/cli/src/runtime/acp/agent-workspace.js.map +1 -1
  10. package/dist/cli/src/runtime/acp/claude-sdk-client.d.ts +51 -0
  11. package/dist/cli/src/runtime/acp/claude-sdk-client.js +318 -0
  12. package/dist/cli/src/runtime/acp/claude-sdk-client.js.map +1 -0
  13. package/dist/cli/src/runtime/acp/claude-stream-json-client.js +27 -2
  14. package/dist/cli/src/runtime/acp/claude-stream-json-client.js.map +1 -1
  15. package/dist/cli/src/runtime/acp/provider-resolver.d.ts +1 -1
  16. package/dist/cli/src/runtime/acp/provider-resolver.js +22 -2
  17. package/dist/cli/src/runtime/acp/provider-resolver.js.map +1 -1
  18. package/dist/cli/src/runtime/bridge-session.js +1 -0
  19. package/dist/cli/src/runtime/bridge-session.js.map +1 -1
  20. package/dist/cli/tsconfig.tsbuildinfo +1 -1
  21. package/dist/shared-protocol/src/index.d.ts +1885 -265
  22. package/dist/shared-protocol/src/index.js +36 -10
  23. package/dist/shared-protocol/src/index.js.map +1 -1
  24. package/package.json +8 -5
  25. package/src/runtime/acp/acp-client.ts +18 -3
  26. package/src/runtime/acp/agent-session.ts +68 -14
  27. package/src/runtime/acp/agent-workspace.ts +376 -54
  28. package/src/runtime/acp/claude-sdk-client.ts +372 -0
  29. package/src/runtime/acp/claude-stream-json-client.ts +26 -2
  30. package/src/runtime/acp/provider-resolver.ts +24 -3
  31. package/src/runtime/bridge-session.ts +1 -0
@@ -701,6 +701,74 @@ export declare const agentPermissionSchema: z.ZodObject<{
701
701
  }[] | 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
+ enabled: boolean;
739
+ id: "claude" | "codex" | "custom";
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
+ enabled: boolean;
756
+ id: "claude" | "codex" | "custom";
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
  enabled: boolean;
718
800
  id: "claude" | "codex" | "custom";
@@ -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
  enabled: boolean;
727
817
  id: "claude" | "codex" | "custom";
@@ -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
  enabled: boolean;
1056
1184
  id: "claude" | "codex" | "custom";
@@ -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
  enabled: boolean;
1065
1201
  id: "claude" | "codex" | "custom";
@@ -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
  enabled: boolean;
2233
2423
  id: "claude" | "codex" | "custom";
@@ -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
  enabled: boolean;
2242
2440
  id: "claude" | "codex" | "custom";
@@ -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
+ text?: string | undefined;
4931
+ data?: string | undefined;
4932
+ mimeType?: string | undefined;
4933
+ }, {
4934
+ type: "text" | "image";
4935
+ text?: string | undefined;
4936
+ data?: 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,61 +4961,47 @@ export declare const agentV2EventPayloadSchema: z.ZodObject<{
4720
4961
  output?: string | undefined;
4721
4962
  createdAt?: number | 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" | "unavailable" | "idle" | "running" | "waiting_permission" | undefined;
4728
- isStreaming?: boolean | undefined;
4729
- toolCall?: {
4730
- status: "running" | "pending" | "completed" | "failed";
4731
- id: string;
4732
- name: string;
4733
- input?: string | undefined;
4734
- output?: string | undefined;
4735
- createdAt?: number | undefined;
4736
- } | undefined;
4737
- updatedAt?: number | undefined;
4738
- textDelta?: string | undefined;
4739
- }, {
4740
- itemId: string;
4741
- status?: "error" | "unavailable" | "idle" | "running" | "waiting_permission" | 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
- input?: string | undefined;
4748
4972
  output?: string | undefined;
4749
- createdAt?: number | undefined;
4750
- } | undefined;
4751
- updatedAt?: number | undefined;
4752
- textDelta?: string | undefined;
4753
- }>>;
4754
- }, "strip", z.ZodTypeAny, {
4755
- conversationId: string;
4756
- item?: {
4757
- id: string;
4758
- type: "status" | "error" | "message" | "plan" | "tool_call" | "permission";
4759
- createdAt: number;
4760
- conversationId: string;
4761
- status?: "error" | "unavailable" | "idle" | "running" | "waiting_permission" | undefined;
4762
- error?: string | undefined;
4763
- plan?: {
4764
- status: "pending" | "completed" | "in_progress";
4765
- text: string;
4766
- id: string;
4767
- }[] | undefined;
4768
- text?: string | undefined;
4769
- itemId?: string | undefined;
4770
- commandExecution?: {
4973
+ command?: string | undefined;
4974
+ cwd?: string | undefined;
4975
+ exitCode?: number | null | undefined;
4976
+ }, {
4771
4977
  status?: "running" | "pending" | "completed" | "failed" | undefined;
4772
4978
  output?: string | undefined;
4773
4979
  command?: string | undefined;
4774
4980
  cwd?: string | undefined;
4775
4981
  exitCode?: number | null | undefined;
4776
- } | undefined;
4777
- fileChange?: {
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, {
4990
+ path: string;
4991
+ kind?: string | undefined;
4992
+ added?: number | undefined;
4993
+ removed?: number | undefined;
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, {
4778
5005
  entries: {
4779
5006
  path: string;
4780
5007
  kind?: string | undefined;
@@ -4785,48 +5012,501 @@ export declare const agentV2EventPayloadSchema: z.ZodObject<{
4785
5012
  diff?: string | undefined;
4786
5013
  summary?: string | undefined;
4787
5014
  changeSetId?: string | undefined;
4788
- } | undefined;
4789
- role?: "user" | "assistant" | "system" | undefined;
4790
- kind?: "plan" | "thinking" | "chat" | "tool_activity" | "command_execution" | "file_change" | "subagent_action" | "user_input_prompt" | "review" | "context_compaction" | undefined;
4791
- content?: {
4792
- type: "text" | "image";
4793
- text?: string | undefined;
4794
- data?: string | undefined;
4795
- mimeType?: string | undefined;
4796
- }[] | undefined;
4797
- isStreaming?: boolean | undefined;
4798
- toolCall?: {
4799
- status: "running" | "pending" | "completed" | "failed";
4800
- id: string;
4801
- name: string;
4802
- input?: string | undefined;
4803
- output?: string | undefined;
4804
- createdAt?: number | undefined;
4805
- } | undefined;
4806
- permission?: {
4807
- options: {
4808
- id: string;
4809
- label: string;
4810
- kind: "allow" | "deny" | "other";
4811
- }[];
4812
- requestId: string;
4813
- toolName?: string | undefined;
4814
- toolInput?: string | undefined;
4815
- context?: string | undefined;
4816
- } | undefined;
4817
- turnId?: string | undefined;
4818
- subagent?: {
4819
- status: string;
4820
- tool: string;
4821
- receiverThreadIds: string[];
4822
- receiverAgents: {
4823
- threadId: string;
4824
- role?: string | undefined;
4825
- model?: string | undefined;
4826
- prompt?: string | undefined;
4827
- agentId?: string | undefined;
4828
- nickname?: string | undefined;
4829
- }[];
5015
+ }, {
5016
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
5017
+ entries?: {
5018
+ path: string;
5019
+ kind?: string | undefined;
5020
+ added?: number | undefined;
5021
+ removed?: number | undefined;
5022
+ }[] | undefined;
5023
+ diff?: string | undefined;
5024
+ summary?: 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
+ text: string;
5192
+ id: string;
5193
+ }, {
5194
+ status: "pending" | "completed" | "in_progress";
5195
+ text: string;
5196
+ id: 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
+ toolName?: string | undefined;
5229
+ toolInput?: string | undefined;
5230
+ options?: {
5231
+ id: string;
5232
+ label: string;
5233
+ kind?: "allow" | "deny" | "other" | undefined;
5234
+ }[] | 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
+ status?: "error" | "unavailable" | "idle" | "running" | "waiting_permission" | undefined;
5244
+ error?: string | undefined;
5245
+ plan?: {
5246
+ status: "pending" | "completed" | "in_progress";
5247
+ text: string;
5248
+ id: string;
5249
+ }[] | undefined;
5250
+ text?: string | undefined;
5251
+ commandExecution?: {
5252
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
5253
+ output?: string | undefined;
5254
+ command?: string | undefined;
5255
+ cwd?: string | undefined;
5256
+ exitCode?: number | null | undefined;
5257
+ } | undefined;
5258
+ fileChange?: {
5259
+ entries: {
5260
+ path: string;
5261
+ kind?: string | undefined;
5262
+ added?: number | undefined;
5263
+ removed?: number | undefined;
5264
+ }[];
5265
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
5266
+ diff?: string | undefined;
5267
+ summary?: string | undefined;
5268
+ changeSetId?: string | undefined;
5269
+ } | undefined;
5270
+ role?: "user" | "assistant" | "system" | undefined;
5271
+ kind?: "plan" | "thinking" | "chat" | "tool_activity" | "command_execution" | "file_change" | "subagent_action" | "user_input_prompt" | "review" | "context_compaction" | undefined;
5272
+ content?: {
5273
+ type: "text" | "image";
5274
+ text?: string | undefined;
5275
+ data?: string | undefined;
5276
+ mimeType?: string | undefined;
5277
+ }[] | undefined;
5278
+ isStreaming?: boolean | undefined;
5279
+ toolCall?: {
5280
+ status: "running" | "pending" | "completed" | "failed";
5281
+ id: string;
5282
+ name: string;
5283
+ input?: string | undefined;
5284
+ output?: string | undefined;
5285
+ createdAt?: number | undefined;
5286
+ } | undefined;
5287
+ permission?: {
5288
+ options: {
5289
+ id: string;
5290
+ label: string;
5291
+ kind: "allow" | "deny" | "other";
5292
+ }[];
5293
+ requestId: string;
5294
+ toolName?: string | undefined;
5295
+ toolInput?: string | undefined;
5296
+ context?: 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
+ status?: "error" | "unavailable" | "idle" | "running" | "waiting_permission" | undefined;
5340
+ error?: string | undefined;
5341
+ plan?: {
5342
+ status: "pending" | "completed" | "in_progress";
5343
+ text: string;
5344
+ id: string;
5345
+ }[] | undefined;
5346
+ text?: string | undefined;
5347
+ commandExecution?: {
5348
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
5349
+ output?: string | undefined;
5350
+ command?: string | undefined;
5351
+ cwd?: string | undefined;
5352
+ exitCode?: number | null | undefined;
5353
+ } | undefined;
5354
+ fileChange?: {
5355
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
5356
+ entries?: {
5357
+ path: string;
5358
+ kind?: string | undefined;
5359
+ added?: number | undefined;
5360
+ removed?: number | undefined;
5361
+ }[] | undefined;
5362
+ diff?: string | undefined;
5363
+ summary?: string | undefined;
5364
+ changeSetId?: string | undefined;
5365
+ } | undefined;
5366
+ role?: "user" | "assistant" | "system" | undefined;
5367
+ kind?: "plan" | "thinking" | "chat" | "tool_activity" | "command_execution" | "file_change" | "subagent_action" | "user_input_prompt" | "review" | "context_compaction" | undefined;
5368
+ content?: {
5369
+ type: "text" | "image";
5370
+ text?: string | undefined;
5371
+ data?: string | undefined;
5372
+ mimeType?: string | undefined;
5373
+ }[] | undefined;
5374
+ isStreaming?: boolean | undefined;
5375
+ toolCall?: {
5376
+ id: string;
5377
+ name: string;
5378
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
5379
+ input?: string | undefined;
5380
+ output?: string | undefined;
5381
+ createdAt?: number | undefined;
5382
+ } | undefined;
5383
+ permission?: {
5384
+ requestId: string;
5385
+ toolName?: string | undefined;
5386
+ toolInput?: string | undefined;
5387
+ options?: {
5388
+ id: string;
5389
+ label: string;
5390
+ kind?: "allow" | "deny" | "other" | undefined;
5391
+ }[] | undefined;
5392
+ context?: 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
+ item?: {
5437
+ id: string;
5438
+ type: "status" | "error" | "message" | "plan" | "tool_call" | "permission";
5439
+ createdAt: number;
5440
+ conversationId: string;
5441
+ status?: "error" | "unavailable" | "idle" | "running" | "waiting_permission" | undefined;
5442
+ error?: string | undefined;
5443
+ plan?: {
5444
+ status: "pending" | "completed" | "in_progress";
5445
+ text: string;
5446
+ id: string;
5447
+ }[] | undefined;
5448
+ text?: string | undefined;
5449
+ itemId?: string | undefined;
5450
+ commandExecution?: {
5451
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
5452
+ output?: string | undefined;
5453
+ command?: string | undefined;
5454
+ cwd?: string | undefined;
5455
+ exitCode?: number | null | undefined;
5456
+ } | undefined;
5457
+ fileChange?: {
5458
+ entries: {
5459
+ path: string;
5460
+ kind?: string | undefined;
5461
+ added?: number | undefined;
5462
+ removed?: number | undefined;
5463
+ }[];
5464
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
5465
+ diff?: string | undefined;
5466
+ summary?: string | undefined;
5467
+ changeSetId?: string | undefined;
5468
+ } | undefined;
5469
+ role?: "user" | "assistant" | "system" | undefined;
5470
+ kind?: "plan" | "thinking" | "chat" | "tool_activity" | "command_execution" | "file_change" | "subagent_action" | "user_input_prompt" | "review" | "context_compaction" | undefined;
5471
+ content?: {
5472
+ type: "text" | "image";
5473
+ text?: string | undefined;
5474
+ data?: string | undefined;
5475
+ mimeType?: string | undefined;
5476
+ }[] | undefined;
5477
+ isStreaming?: boolean | undefined;
5478
+ toolCall?: {
5479
+ status: "running" | "pending" | "completed" | "failed";
5480
+ id: string;
5481
+ name: string;
5482
+ input?: string | undefined;
5483
+ output?: string | undefined;
5484
+ createdAt?: number | undefined;
5485
+ } | undefined;
5486
+ permission?: {
5487
+ options: {
5488
+ id: string;
5489
+ label: string;
5490
+ kind: "allow" | "deny" | "other";
5491
+ }[];
5492
+ requestId: string;
5493
+ toolName?: string | undefined;
5494
+ toolInput?: string | undefined;
5495
+ context?: string | undefined;
5496
+ } | undefined;
5497
+ turnId?: string | undefined;
5498
+ subagent?: {
5499
+ status: string;
5500
+ tool: string;
5501
+ receiverThreadIds: string[];
5502
+ receiverAgents: {
5503
+ threadId: string;
5504
+ role?: string | undefined;
5505
+ model?: string | undefined;
5506
+ prompt?: string | undefined;
5507
+ agentId?: string | undefined;
5508
+ nickname?: string | undefined;
5509
+ }[];
4830
5510
  agentStates: Record<string, {
4831
5511
  status: string;
4832
5512
  threadId: string;
@@ -4857,6 +5537,40 @@ export declare const agentV2EventPayloadSchema: z.ZodObject<{
4857
5537
  patch?: {
4858
5538
  itemId: string;
4859
5539
  status?: "error" | "unavailable" | "idle" | "running" | "waiting_permission" | undefined;
5540
+ error?: string | undefined;
5541
+ plan?: {
5542
+ status: "pending" | "completed" | "in_progress";
5543
+ text: string;
5544
+ id: string;
5545
+ }[] | undefined;
5546
+ text?: string | undefined;
5547
+ commandExecution?: {
5548
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
5549
+ output?: string | undefined;
5550
+ command?: string | undefined;
5551
+ cwd?: string | undefined;
5552
+ exitCode?: number | null | undefined;
5553
+ } | undefined;
5554
+ fileChange?: {
5555
+ entries: {
5556
+ path: string;
5557
+ kind?: string | undefined;
5558
+ added?: number | undefined;
5559
+ removed?: number | undefined;
5560
+ }[];
5561
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
5562
+ diff?: string | undefined;
5563
+ summary?: string | undefined;
5564
+ changeSetId?: string | undefined;
5565
+ } | undefined;
5566
+ role?: "user" | "assistant" | "system" | undefined;
5567
+ kind?: "plan" | "thinking" | "chat" | "tool_activity" | "command_execution" | "file_change" | "subagent_action" | "user_input_prompt" | "review" | "context_compaction" | undefined;
5568
+ content?: {
5569
+ type: "text" | "image";
5570
+ text?: string | undefined;
5571
+ data?: string | undefined;
5572
+ mimeType?: string | undefined;
5573
+ }[] | undefined;
4860
5574
  isStreaming?: boolean | undefined;
4861
5575
  toolCall?: {
4862
5576
  status: "running" | "pending" | "completed" | "failed";
@@ -4866,6 +5580,54 @@ export declare const agentV2EventPayloadSchema: z.ZodObject<{
4866
5580
  output?: string | undefined;
4867
5581
  createdAt?: number | undefined;
4868
5582
  } | undefined;
5583
+ permission?: {
5584
+ options: {
5585
+ id: string;
5586
+ label: string;
5587
+ kind: "allow" | "deny" | "other";
5588
+ }[];
5589
+ requestId: string;
5590
+ toolName?: string | undefined;
5591
+ toolInput?: string | undefined;
5592
+ context?: string | undefined;
5593
+ } | undefined;
5594
+ subagent?: {
5595
+ status: string;
5596
+ tool: string;
5597
+ receiverThreadIds: string[];
5598
+ receiverAgents: {
5599
+ threadId: string;
5600
+ role?: string | undefined;
5601
+ model?: string | undefined;
5602
+ prompt?: string | undefined;
5603
+ agentId?: string | undefined;
5604
+ nickname?: string | undefined;
5605
+ }[];
5606
+ agentStates: Record<string, {
5607
+ status: string;
5608
+ threadId: string;
5609
+ message?: string | undefined;
5610
+ }>;
5611
+ model?: string | undefined;
5612
+ prompt?: string | undefined;
5613
+ } | undefined;
5614
+ structuredInput?: {
5615
+ requestId: string;
5616
+ questions: {
5617
+ id: string;
5618
+ question: string;
5619
+ options?: {
5620
+ id: string;
5621
+ label: string;
5622
+ description?: string | undefined;
5623
+ }[] | undefined;
5624
+ header?: string | undefined;
5625
+ isOther?: boolean | undefined;
5626
+ isSecret?: boolean | undefined;
5627
+ selectionLimit?: number | undefined;
5628
+ }[];
5629
+ } | undefined;
5630
+ metadata?: Record<string, unknown> | undefined;
4869
5631
  updatedAt?: number | undefined;
4870
5632
  textDelta?: string | undefined;
4871
5633
  } | undefined;
@@ -4990,6 +5752,40 @@ export declare const agentV2EventPayloadSchema: z.ZodObject<{
4990
5752
  patch?: {
4991
5753
  itemId: string;
4992
5754
  status?: "error" | "unavailable" | "idle" | "running" | "waiting_permission" | undefined;
5755
+ error?: string | undefined;
5756
+ plan?: {
5757
+ status: "pending" | "completed" | "in_progress";
5758
+ text: string;
5759
+ id: string;
5760
+ }[] | undefined;
5761
+ text?: string | undefined;
5762
+ commandExecution?: {
5763
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
5764
+ output?: string | undefined;
5765
+ command?: string | undefined;
5766
+ cwd?: string | undefined;
5767
+ exitCode?: number | null | undefined;
5768
+ } | undefined;
5769
+ fileChange?: {
5770
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
5771
+ entries?: {
5772
+ path: string;
5773
+ kind?: string | undefined;
5774
+ added?: number | undefined;
5775
+ removed?: number | undefined;
5776
+ }[] | undefined;
5777
+ diff?: string | undefined;
5778
+ summary?: string | undefined;
5779
+ changeSetId?: string | undefined;
5780
+ } | undefined;
5781
+ role?: "user" | "assistant" | "system" | undefined;
5782
+ kind?: "plan" | "thinking" | "chat" | "tool_activity" | "command_execution" | "file_change" | "subagent_action" | "user_input_prompt" | "review" | "context_compaction" | undefined;
5783
+ content?: {
5784
+ type: "text" | "image";
5785
+ text?: string | undefined;
5786
+ data?: string | undefined;
5787
+ mimeType?: string | undefined;
5788
+ }[] | undefined;
4993
5789
  isStreaming?: boolean | undefined;
4994
5790
  toolCall?: {
4995
5791
  id: string;
@@ -4999,6 +5795,54 @@ export declare const agentV2EventPayloadSchema: z.ZodObject<{
4999
5795
  output?: string | undefined;
5000
5796
  createdAt?: number | undefined;
5001
5797
  } | undefined;
5798
+ permission?: {
5799
+ requestId: string;
5800
+ toolName?: string | undefined;
5801
+ toolInput?: string | undefined;
5802
+ options?: {
5803
+ id: string;
5804
+ label: string;
5805
+ kind?: "allow" | "deny" | "other" | undefined;
5806
+ }[] | undefined;
5807
+ context?: string | undefined;
5808
+ } | undefined;
5809
+ subagent?: {
5810
+ status: string;
5811
+ tool: string;
5812
+ model?: string | undefined;
5813
+ prompt?: string | undefined;
5814
+ receiverThreadIds?: string[] | undefined;
5815
+ receiverAgents?: {
5816
+ threadId: string;
5817
+ role?: string | undefined;
5818
+ model?: string | undefined;
5819
+ prompt?: string | undefined;
5820
+ agentId?: string | undefined;
5821
+ nickname?: string | undefined;
5822
+ }[] | undefined;
5823
+ agentStates?: Record<string, {
5824
+ status: string;
5825
+ threadId: string;
5826
+ message?: string | undefined;
5827
+ }> | undefined;
5828
+ } | undefined;
5829
+ structuredInput?: {
5830
+ requestId: string;
5831
+ questions?: {
5832
+ id: string;
5833
+ question: string;
5834
+ options?: {
5835
+ id: string;
5836
+ label: string;
5837
+ description?: string | undefined;
5838
+ }[] | undefined;
5839
+ header?: string | undefined;
5840
+ isOther?: boolean | undefined;
5841
+ isSecret?: boolean | undefined;
5842
+ selectionLimit?: number | undefined;
5843
+ }[] | undefined;
5844
+ } | undefined;
5845
+ metadata?: Record<string, unknown> | undefined;
5002
5846
  updatedAt?: number | undefined;
5003
5847
  textDelta?: string | undefined;
5004
5848
  } | 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
  enabled: boolean;
6338
7196
  id: "claude" | "codex" | "custom";
@@ -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
  enabled: boolean;
6347
7213
  id: "claude" | "codex" | "custom";
@@ -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
  enabled: boolean;
6675
7579
  id: "claude" | "codex" | "custom";
@@ -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
  enabled: boolean;
6684
7596
  id: "claude" | "codex" | "custom";
@@ -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
  enabled: boolean;
6950
7916
  id: "claude" | "codex" | "custom";
@@ -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
  enabled: boolean;
6959
7933
  id: "claude" | "codex" | "custom";
@@ -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
+ id: string;
10276
+ type: "status" | "error" | "message" | "plan" | "tool_call" | "permission";
10277
+ createdAt: number;
10278
+ conversationId: string;
10279
+ status?: "error" | "unavailable" | "idle" | "running" | "waiting_permission" | undefined;
10280
+ error?: string | undefined;
10281
+ plan?: {
10282
+ status: "pending" | "completed" | "in_progress";
10283
+ text: string;
10284
+ id: string;
10285
+ }[] | undefined;
10286
+ text?: string | undefined;
10287
+ itemId?: string | undefined;
10288
+ commandExecution?: {
10289
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
10290
+ output?: string | undefined;
10291
+ command?: string | undefined;
10292
+ cwd?: string | undefined;
10293
+ exitCode?: number | null | undefined;
10294
+ } | undefined;
10295
+ fileChange?: {
10296
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
10297
+ entries?: {
10298
+ path: string;
10299
+ kind?: string | undefined;
10300
+ added?: number | undefined;
10301
+ removed?: number | undefined;
10302
+ }[] | undefined;
10303
+ diff?: string | undefined;
10304
+ summary?: string | undefined;
10305
+ changeSetId?: string | undefined;
10306
+ } | undefined;
10307
+ role?: "user" | "assistant" | "system" | undefined;
10308
+ kind?: "plan" | "thinking" | "chat" | "tool_activity" | "command_execution" | "file_change" | "subagent_action" | "user_input_prompt" | "review" | "context_compaction" | undefined;
10309
+ content?: {
10310
+ type: "text" | "image";
10311
+ text?: string | undefined;
10312
+ data?: string | undefined;
10313
+ mimeType?: string | undefined;
10314
+ }[] | undefined;
10315
+ isStreaming?: boolean | undefined;
10316
+ toolCall?: {
10317
+ id: string;
10318
+ name: string;
10319
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
10320
+ input?: string | undefined;
10321
+ output?: string | undefined;
10322
+ createdAt?: number | undefined;
10323
+ } | undefined;
10324
+ permission?: {
10325
+ requestId: string;
10326
+ toolName?: string | undefined;
10327
+ toolInput?: string | undefined;
10328
+ options?: {
10329
+ id: string;
10330
+ label: string;
10331
+ kind?: "allow" | "deny" | "other" | undefined;
10332
+ }[] | undefined;
10333
+ context?: string | undefined;
10334
+ } | undefined;
10335
+ turnId?: string | 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" | "unavailable" | "idle" | "running" | "waiting_permission";
10378
+ id: string;
10379
+ cwd: string;
10380
+ provider: "claude" | "codex" | "custom";
10381
+ createdAt: number;
10382
+ archived: boolean;
10383
+ lastActivityAt: number;
10384
+ title?: string | undefined;
10385
+ agentSessionId?: string | undefined;
10386
+ model?: string | undefined;
10387
+ reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
10388
+ permissionMode?: "read_only" | "workspace_write" | "full_access" | undefined;
10389
+ lastMessagePreview?: string | undefined;
10390
+ }[];
10391
+ items: {
10392
+ id: string;
10393
+ type: "status" | "error" | "message" | "plan" | "tool_call" | "permission";
10394
+ createdAt: number;
10395
+ conversationId: string;
10396
+ status?: "error" | "unavailable" | "idle" | "running" | "waiting_permission" | undefined;
10397
+ error?: string | undefined;
10398
+ plan?: {
10399
+ status: "pending" | "completed" | "in_progress";
10400
+ text: string;
10401
+ id: string;
10402
+ }[] | undefined;
10403
+ text?: string | undefined;
10404
+ itemId?: string | undefined;
10405
+ commandExecution?: {
10406
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
10407
+ output?: string | undefined;
10408
+ command?: string | undefined;
10409
+ cwd?: string | undefined;
10410
+ exitCode?: number | null | undefined;
10411
+ } | undefined;
10412
+ fileChange?: {
10413
+ entries: {
10414
+ path: string;
10415
+ kind?: string | undefined;
10416
+ added?: number | undefined;
10417
+ removed?: number | undefined;
10418
+ }[];
10419
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
10420
+ diff?: string | undefined;
10421
+ summary?: string | undefined;
10422
+ changeSetId?: string | undefined;
10423
+ } | undefined;
10424
+ role?: "user" | "assistant" | "system" | undefined;
10425
+ kind?: "plan" | "thinking" | "chat" | "tool_activity" | "command_execution" | "file_change" | "subagent_action" | "user_input_prompt" | "review" | "context_compaction" | undefined;
10426
+ content?: {
10427
+ type: "text" | "image";
10428
+ text?: string | undefined;
10429
+ data?: string | undefined;
10430
+ mimeType?: string | undefined;
10431
+ }[] | undefined;
10432
+ isStreaming?: boolean | undefined;
10433
+ toolCall?: {
10434
+ status: "running" | "pending" | "completed" | "failed";
10435
+ id: string;
10436
+ name: string;
10437
+ input?: string | undefined;
10438
+ output?: string | undefined;
10439
+ createdAt?: number | undefined;
10440
+ } | undefined;
10441
+ permission?: {
10442
+ options: {
10443
+ id: string;
10444
+ label: string;
10445
+ kind: "allow" | "deny" | "other";
10446
+ }[];
10447
+ requestId: string;
10448
+ toolName?: string | undefined;
10449
+ toolInput?: string | undefined;
10450
+ context?: string | undefined;
10451
+ } | undefined;
10452
+ turnId?: string | 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" | "unavailable" | "idle" | "running" | "waiting_permission" | undefined;
10500
+ title?: string | undefined;
10501
+ provider?: "claude" | "codex" | "custom" | undefined;
10502
+ agentSessionId?: string | undefined;
10503
+ model?: string | undefined;
10504
+ reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
10505
+ permissionMode?: "read_only" | "workspace_write" | "full_access" | undefined;
10506
+ archived?: boolean | undefined;
10507
+ lastMessagePreview?: string | undefined;
10508
+ }[] | undefined;
10509
+ activeConversationId?: string | undefined;
10510
+ items?: {
9277
10511
  id: string;
9278
10512
  type: "status" | "error" | "message" | "plan" | "tool_call" | "permission";
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" | "unavailable" | "idle" | "running" | "waiting_permission";
10630
+ id: string;
10631
+ cwd: string;
10632
+ provider: "claude" | "codex" | "custom";
10633
+ createdAt: number;
10634
+ archived: boolean;
10635
+ lastActivityAt: number;
10636
+ title?: string | undefined;
10637
+ agentSessionId?: string | undefined;
10638
+ model?: string | undefined;
10639
+ reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
10640
+ permissionMode?: "read_only" | "workspace_write" | "full_access" | undefined;
10641
+ lastMessagePreview?: string | undefined;
10642
+ }, {
10643
+ id: string;
10644
+ cwd: string;
10645
+ createdAt: number;
10646
+ lastActivityAt: number;
10647
+ status?: "error" | "unavailable" | "idle" | "running" | "waiting_permission" | undefined;
10648
+ title?: string | undefined;
10649
+ provider?: "claude" | "codex" | "custom" | undefined;
10650
+ agentSessionId?: string | undefined;
10651
+ model?: string | undefined;
10652
+ reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
10653
+ permissionMode?: "read_only" | "workspace_write" | "full_access" | 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
+ text?: string | undefined;
10673
+ data?: string | undefined;
10674
+ mimeType?: string | undefined;
10675
+ }, {
10676
+ type: "text" | "image";
10677
+ text?: string | undefined;
10678
+ data?: 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
+ input?: string | undefined;
10694
+ output?: string | undefined;
10695
+ createdAt?: number | undefined;
10696
+ }, {
10697
+ id: string;
10698
+ name: string;
10699
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
10700
+ input?: string | undefined;
10701
+ output?: string | undefined;
10702
+ createdAt?: number | 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
+ output?: string | undefined;
10713
+ command?: string | undefined;
10714
+ cwd?: string | undefined;
10715
+ exitCode?: number | null | undefined;
10716
+ }, {
10717
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
10718
+ output?: string | undefined;
10719
+ command?: string | undefined;
10720
+ cwd?: string | undefined;
10721
+ exitCode?: number | null | 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
+ diff?: string | undefined;
10753
+ summary?: string | undefined;
10754
+ changeSetId?: string | undefined;
10755
+ }, {
10756
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
10757
+ entries?: {
10758
+ path: string;
10759
+ kind?: string | undefined;
10760
+ added?: number | undefined;
10761
+ removed?: number | undefined;
10762
+ }[] | undefined;
10763
+ diff?: string | undefined;
10764
+ summary?: 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" | "unavailable" | "idle" | "running" | "waiting_permission";
9380
- id: string;
9381
- cwd: string;
9382
- provider: "claude" | "codex" | "custom";
9383
- createdAt: number;
9384
- archived: boolean;
9385
- lastActivityAt: number;
9386
- title?: string | undefined;
9387
- agentSessionId?: string | undefined;
9388
- model?: string | undefined;
9389
- reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
9390
- permissionMode?: "read_only" | "workspace_write" | "full_access" | 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
+ text: string;
10932
+ id: string;
10933
+ }, {
10934
+ status: "pending" | "completed" | "in_progress";
10935
+ text: string;
10936
+ id: 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
+ toolName?: string | undefined;
10969
+ toolInput?: string | undefined;
10970
+ options?: {
10971
+ id: string;
10972
+ label: string;
10973
+ kind?: "allow" | "deny" | "other" | undefined;
10974
+ }[] | 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
  id: string;
9395
10985
  type: "status" | "error" | "message" | "plan" | "tool_call" | "permission";
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" | "unavailable" | "idle" | "running" | "waiting_permission" | undefined;
9502
- title?: string | undefined;
9503
- provider?: "claude" | "codex" | "custom" | undefined;
9504
- agentSessionId?: string | undefined;
9505
- model?: string | undefined;
9506
- reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
9507
- permissionMode?: "read_only" | "workspace_write" | "full_access" | undefined;
9508
- archived?: boolean | undefined;
9509
- lastMessagePreview?: string | undefined;
9510
- }[] | undefined;
9511
- activeConversationId?: string | undefined;
9512
- items?: {
11083
+ }, {
9513
11084
  id: string;
9514
11085
  type: "status" | "error" | "message" | "plan" | "tool_call" | "permission";
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" | "unavailable" | "idle" | "running" | "waiting_permission";
9632
- id: string;
9633
- cwd: string;
9634
- provider: "claude" | "codex" | "custom";
9635
- createdAt: number;
9636
- archived: boolean;
9637
- lastActivityAt: number;
9638
- title?: string | undefined;
9639
- agentSessionId?: string | undefined;
9640
- model?: string | undefined;
9641
- reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
9642
- permissionMode?: "read_only" | "workspace_write" | "full_access" | undefined;
9643
- lastMessagePreview?: string | undefined;
9644
- }, {
9645
- id: string;
9646
- cwd: string;
9647
- createdAt: number;
9648
- lastActivityAt: number;
9649
- status?: "error" | "unavailable" | "idle" | "running" | "waiting_permission" | undefined;
9650
- title?: string | undefined;
9651
- provider?: "claude" | "codex" | "custom" | undefined;
9652
- agentSessionId?: string | undefined;
9653
- model?: string | undefined;
9654
- reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
9655
- permissionMode?: "read_only" | "workspace_write" | "full_access" | 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
  }[] | 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
- id: string;
9987
- type: "status" | "error" | "message" | "plan" | "tool_call" | "permission";
9988
- createdAt: number;
9989
- conversationId: string;
11507
+ itemId: string;
9990
11508
  status?: "error" | "unavailable" | "idle" | "running" | "waiting_permission" | undefined;
9991
11509
  error?: string | undefined;
9992
11510
  plan?: {
@@ -9995,7 +11513,6 @@ export declare const protocolMessageSchemas: {
9995
11513
  id: string;
9996
11514
  }[] | undefined;
9997
11515
  text?: string | undefined;
9998
- itemId?: string | undefined;
9999
11516
  commandExecution?: {
10000
11517
  status?: "running" | "pending" | "completed" | "failed" | undefined;
10001
11518
  output?: string | undefined;
@@ -10043,7 +11560,6 @@ export declare const protocolMessageSchemas: {
10043
11560
  toolInput?: string | undefined;
10044
11561
  context?: string | undefined;
10045
11562
  } | undefined;
10046
- turnId?: string | undefined;
10047
11563
  subagent?: {
10048
11564
  status: string;
10049
11565
  tool: string;
@@ -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
- id: string;
10087
- type: "status" | "error" | "message" | "plan" | "tool_call" | "permission";
10088
- createdAt: number;
10089
- conversationId: string;
11603
+ itemId: string;
10090
11604
  status?: "error" | "unavailable" | "idle" | "running" | "waiting_permission" | undefined;
10091
11605
  error?: string | undefined;
10092
11606
  plan?: {
@@ -10095,7 +11609,6 @@ export declare const protocolMessageSchemas: {
10095
11609
  id: string;
10096
11610
  }[] | undefined;
10097
11611
  text?: string | undefined;
10098
- itemId?: string | undefined;
10099
11612
  commandExecution?: {
10100
11613
  status?: "running" | "pending" | "completed" | "failed" | undefined;
10101
11614
  output?: string | undefined;
@@ -10143,7 +11656,6 @@ export declare const protocolMessageSchemas: {
10143
11656
  }[] | undefined;
10144
11657
  context?: string | undefined;
10145
11658
  } | undefined;
10146
- turnId?: string | undefined;
10147
11659
  subagent?: {
10148
11660
  status: string;
10149
11661
  tool: string;
@@ -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
- input?: string | undefined;
10202
- output?: string | undefined;
10203
- createdAt?: number | undefined;
10204
- }, {
10205
- id: string;
10206
- name: string;
10207
- status?: "running" | "pending" | "completed" | "failed" | undefined;
10208
- input?: string | undefined;
10209
- output?: string | undefined;
10210
- createdAt?: number | undefined;
10211
- }>>;
10212
- updatedAt: z.ZodOptional<z.ZodNumber>;
10213
- isStreaming: z.ZodOptional<z.ZodBoolean>;
10214
- }, "strip", z.ZodTypeAny, {
10215
- itemId: string;
10216
- status?: "error" | "unavailable" | "idle" | "running" | "waiting_permission" | undefined;
10217
- isStreaming?: boolean | undefined;
10218
- toolCall?: {
10219
- status: "running" | "pending" | "completed" | "failed";
10220
- id: string;
10221
- name: string;
10222
- input?: string | undefined;
10223
- output?: string | undefined;
10224
- createdAt?: number | undefined;
10225
- } | undefined;
10226
- updatedAt?: number | undefined;
10227
- textDelta?: string | undefined;
10228
- }, {
10229
- itemId: string;
10230
- status?: "error" | "unavailable" | "idle" | "running" | "waiting_permission" | undefined;
10231
- isStreaming?: boolean | undefined;
10232
- toolCall?: {
10233
- id: string;
10234
- name: string;
10235
- status?: "running" | "pending" | "completed" | "failed" | undefined;
10236
- input?: string | undefined;
10237
- output?: string | undefined;
10238
- createdAt?: number | undefined;
10239
- } | undefined;
10240
- updatedAt?: number | undefined;
10241
11697
  textDelta?: string | undefined;
10242
11698
  }>>;
10243
11699
  }, "strip", z.ZodTypeAny, {
@@ -10346,6 +11802,40 @@ export declare const protocolMessageSchemas: {
10346
11802
  patch?: {
10347
11803
  itemId: string;
10348
11804
  status?: "error" | "unavailable" | "idle" | "running" | "waiting_permission" | undefined;
11805
+ error?: string | undefined;
11806
+ plan?: {
11807
+ status: "pending" | "completed" | "in_progress";
11808
+ text: string;
11809
+ id: string;
11810
+ }[] | undefined;
11811
+ text?: string | undefined;
11812
+ commandExecution?: {
11813
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
11814
+ output?: string | undefined;
11815
+ command?: string | undefined;
11816
+ cwd?: string | undefined;
11817
+ exitCode?: number | null | undefined;
11818
+ } | undefined;
11819
+ fileChange?: {
11820
+ entries: {
11821
+ path: string;
11822
+ kind?: string | undefined;
11823
+ added?: number | undefined;
11824
+ removed?: number | undefined;
11825
+ }[];
11826
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
11827
+ diff?: string | undefined;
11828
+ summary?: string | undefined;
11829
+ changeSetId?: string | undefined;
11830
+ } | undefined;
11831
+ role?: "user" | "assistant" | "system" | undefined;
11832
+ kind?: "plan" | "thinking" | "chat" | "tool_activity" | "command_execution" | "file_change" | "subagent_action" | "user_input_prompt" | "review" | "context_compaction" | undefined;
11833
+ content?: {
11834
+ type: "text" | "image";
11835
+ text?: string | undefined;
11836
+ data?: string | undefined;
11837
+ mimeType?: string | undefined;
11838
+ }[] | undefined;
10349
11839
  isStreaming?: boolean | undefined;
10350
11840
  toolCall?: {
10351
11841
  status: "running" | "pending" | "completed" | "failed";
@@ -10355,6 +11845,54 @@ export declare const protocolMessageSchemas: {
10355
11845
  output?: string | undefined;
10356
11846
  createdAt?: number | undefined;
10357
11847
  } | undefined;
11848
+ permission?: {
11849
+ options: {
11850
+ id: string;
11851
+ label: string;
11852
+ kind: "allow" | "deny" | "other";
11853
+ }[];
11854
+ requestId: string;
11855
+ toolName?: string | undefined;
11856
+ toolInput?: string | undefined;
11857
+ context?: string | undefined;
11858
+ } | undefined;
11859
+ subagent?: {
11860
+ status: string;
11861
+ tool: string;
11862
+ receiverThreadIds: string[];
11863
+ receiverAgents: {
11864
+ threadId: string;
11865
+ role?: string | undefined;
11866
+ model?: string | undefined;
11867
+ prompt?: string | undefined;
11868
+ agentId?: string | undefined;
11869
+ nickname?: string | undefined;
11870
+ }[];
11871
+ agentStates: Record<string, {
11872
+ status: string;
11873
+ threadId: string;
11874
+ message?: string | undefined;
11875
+ }>;
11876
+ model?: string | undefined;
11877
+ prompt?: string | undefined;
11878
+ } | undefined;
11879
+ structuredInput?: {
11880
+ requestId: string;
11881
+ questions: {
11882
+ id: string;
11883
+ question: string;
11884
+ options?: {
11885
+ id: string;
11886
+ label: string;
11887
+ description?: string | undefined;
11888
+ }[] | undefined;
11889
+ header?: string | undefined;
11890
+ isOther?: boolean | undefined;
11891
+ isSecret?: boolean | undefined;
11892
+ selectionLimit?: number | undefined;
11893
+ }[];
11894
+ } | undefined;
11895
+ metadata?: Record<string, unknown> | undefined;
10358
11896
  updatedAt?: number | undefined;
10359
11897
  textDelta?: string | undefined;
10360
11898
  } | undefined;
@@ -10479,6 +12017,40 @@ export declare const protocolMessageSchemas: {
10479
12017
  patch?: {
10480
12018
  itemId: string;
10481
12019
  status?: "error" | "unavailable" | "idle" | "running" | "waiting_permission" | undefined;
12020
+ error?: string | undefined;
12021
+ plan?: {
12022
+ status: "pending" | "completed" | "in_progress";
12023
+ text: string;
12024
+ id: string;
12025
+ }[] | undefined;
12026
+ text?: string | undefined;
12027
+ commandExecution?: {
12028
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
12029
+ output?: string | undefined;
12030
+ command?: string | undefined;
12031
+ cwd?: string | undefined;
12032
+ exitCode?: number | null | undefined;
12033
+ } | undefined;
12034
+ fileChange?: {
12035
+ status?: "running" | "pending" | "completed" | "failed" | undefined;
12036
+ entries?: {
12037
+ path: string;
12038
+ kind?: string | undefined;
12039
+ added?: number | undefined;
12040
+ removed?: number | undefined;
12041
+ }[] | undefined;
12042
+ diff?: string | undefined;
12043
+ summary?: string | undefined;
12044
+ changeSetId?: string | undefined;
12045
+ } | undefined;
12046
+ role?: "user" | "assistant" | "system" | undefined;
12047
+ kind?: "plan" | "thinking" | "chat" | "tool_activity" | "command_execution" | "file_change" | "subagent_action" | "user_input_prompt" | "review" | "context_compaction" | undefined;
12048
+ content?: {
12049
+ type: "text" | "image";
12050
+ text?: string | undefined;
12051
+ data?: string | undefined;
12052
+ mimeType?: string | undefined;
12053
+ }[] | undefined;
10482
12054
  isStreaming?: boolean | undefined;
10483
12055
  toolCall?: {
10484
12056
  id: string;
@@ -10488,6 +12060,54 @@ export declare const protocolMessageSchemas: {
10488
12060
  output?: string | undefined;
10489
12061
  createdAt?: number | undefined;
10490
12062
  } | undefined;
12063
+ permission?: {
12064
+ requestId: string;
12065
+ toolName?: string | undefined;
12066
+ toolInput?: string | undefined;
12067
+ options?: {
12068
+ id: string;
12069
+ label: string;
12070
+ kind?: "allow" | "deny" | "other" | undefined;
12071
+ }[] | undefined;
12072
+ context?: string | undefined;
12073
+ } | undefined;
12074
+ subagent?: {
12075
+ status: string;
12076
+ tool: string;
12077
+ model?: string | undefined;
12078
+ prompt?: string | undefined;
12079
+ receiverThreadIds?: string[] | undefined;
12080
+ receiverAgents?: {
12081
+ threadId: string;
12082
+ role?: string | undefined;
12083
+ model?: string | undefined;
12084
+ prompt?: string | undefined;
12085
+ agentId?: string | undefined;
12086
+ nickname?: string | undefined;
12087
+ }[] | undefined;
12088
+ agentStates?: Record<string, {
12089
+ status: string;
12090
+ threadId: string;
12091
+ message?: string | undefined;
12092
+ }> | undefined;
12093
+ } | undefined;
12094
+ structuredInput?: {
12095
+ requestId: string;
12096
+ questions?: {
12097
+ id: string;
12098
+ question: string;
12099
+ options?: {
12100
+ id: string;
12101
+ label: string;
12102
+ description?: string | undefined;
12103
+ }[] | undefined;
12104
+ header?: string | undefined;
12105
+ isOther?: boolean | undefined;
12106
+ isSecret?: boolean | undefined;
12107
+ selectionLimit?: number | undefined;
12108
+ }[] | undefined;
12109
+ } | undefined;
12110
+ metadata?: Record<string, unknown> | undefined;
10491
12111
  updatedAt?: number | undefined;
10492
12112
  textDelta?: string | undefined;
10493
12113
  } | undefined;