@agentrix/shared 2.0.6 → 2.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { SDKUserMessage, SDKMessage, HookCallback } from '@anthropic-ai/claude-agent-sdk';
2
+ import { SDKUserMessage, SDKAssistantMessage, SDKMessage, HookCallback } from '@anthropic-ai/claude-agent-sdk';
3
3
  import tweetnacl from 'tweetnacl';
4
4
 
5
5
  /**
@@ -778,6 +778,7 @@ type ShareAuthResponse = z.infer<typeof ShareAuthResponseSchema>;
778
778
  /**
779
779
  * Task HTTP request/response schemas
780
780
  * Task management endpoints (start, resume, cancel, stop, permission-response, list)
781
+ * Extended with multi-agent collaboration support (rootTaskId, parentTaskId)
781
782
  */
782
783
 
783
784
  /**
@@ -795,6 +796,7 @@ declare const StartTaskRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
795
796
  baseBranch: z.ZodOptional<z.ZodString>;
796
797
  repositorySourceType: z.ZodOptional<z.ZodEnum<["temporary", "directory", "git-server"]>>;
797
798
  dataEncryptionKey: z.ZodOptional<z.ZodString>;
799
+ parentTaskId: z.ZodOptional<z.ZodString>;
798
800
  }, "strip", z.ZodTypeAny, {
799
801
  chatId: string;
800
802
  message?: SDKUserMessage | undefined;
@@ -807,6 +809,7 @@ declare const StartTaskRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
807
809
  baseBranch?: string | undefined;
808
810
  repositorySourceType?: "temporary" | "directory" | "git-server" | undefined;
809
811
  dataEncryptionKey?: string | undefined;
812
+ parentTaskId?: string | undefined;
810
813
  }, {
811
814
  chatId: string;
812
815
  message?: SDKUserMessage | undefined;
@@ -819,6 +822,7 @@ declare const StartTaskRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
819
822
  baseBranch?: string | undefined;
820
823
  repositorySourceType?: "temporary" | "directory" | "git-server" | undefined;
821
824
  dataEncryptionKey?: string | undefined;
825
+ parentTaskId?: string | undefined;
822
826
  }>, {
823
827
  chatId: string;
824
828
  message?: SDKUserMessage | undefined;
@@ -831,6 +835,7 @@ declare const StartTaskRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
831
835
  baseBranch?: string | undefined;
832
836
  repositorySourceType?: "temporary" | "directory" | "git-server" | undefined;
833
837
  dataEncryptionKey?: string | undefined;
838
+ parentTaskId?: string | undefined;
834
839
  }, {
835
840
  chatId: string;
836
841
  message?: SDKUserMessage | undefined;
@@ -843,6 +848,7 @@ declare const StartTaskRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
843
848
  baseBranch?: string | undefined;
844
849
  repositorySourceType?: "temporary" | "directory" | "git-server" | undefined;
845
850
  dataEncryptionKey?: string | undefined;
851
+ parentTaskId?: string | undefined;
846
852
  }>, {
847
853
  chatId: string;
848
854
  message?: SDKUserMessage | undefined;
@@ -855,6 +861,7 @@ declare const StartTaskRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
855
861
  baseBranch?: string | undefined;
856
862
  repositorySourceType?: "temporary" | "directory" | "git-server" | undefined;
857
863
  dataEncryptionKey?: string | undefined;
864
+ parentTaskId?: string | undefined;
858
865
  }, {
859
866
  chatId: string;
860
867
  message?: SDKUserMessage | undefined;
@@ -867,6 +874,7 @@ declare const StartTaskRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
867
874
  baseBranch?: string | undefined;
868
875
  repositorySourceType?: "temporary" | "directory" | "git-server" | undefined;
869
876
  dataEncryptionKey?: string | undefined;
877
+ parentTaskId?: string | undefined;
870
878
  }>;
871
879
  type StartTaskRequest = z.infer<typeof StartTaskRequestSchema>;
872
880
  declare const startTaskSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
@@ -881,6 +889,7 @@ declare const startTaskSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
881
889
  baseBranch: z.ZodOptional<z.ZodString>;
882
890
  repositorySourceType: z.ZodOptional<z.ZodEnum<["temporary", "directory", "git-server"]>>;
883
891
  dataEncryptionKey: z.ZodOptional<z.ZodString>;
892
+ parentTaskId: z.ZodOptional<z.ZodString>;
884
893
  }, "strip", z.ZodTypeAny, {
885
894
  chatId: string;
886
895
  message?: SDKUserMessage | undefined;
@@ -893,6 +902,7 @@ declare const startTaskSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
893
902
  baseBranch?: string | undefined;
894
903
  repositorySourceType?: "temporary" | "directory" | "git-server" | undefined;
895
904
  dataEncryptionKey?: string | undefined;
905
+ parentTaskId?: string | undefined;
896
906
  }, {
897
907
  chatId: string;
898
908
  message?: SDKUserMessage | undefined;
@@ -905,6 +915,7 @@ declare const startTaskSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
905
915
  baseBranch?: string | undefined;
906
916
  repositorySourceType?: "temporary" | "directory" | "git-server" | undefined;
907
917
  dataEncryptionKey?: string | undefined;
918
+ parentTaskId?: string | undefined;
908
919
  }>, {
909
920
  chatId: string;
910
921
  message?: SDKUserMessage | undefined;
@@ -917,6 +928,7 @@ declare const startTaskSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
917
928
  baseBranch?: string | undefined;
918
929
  repositorySourceType?: "temporary" | "directory" | "git-server" | undefined;
919
930
  dataEncryptionKey?: string | undefined;
931
+ parentTaskId?: string | undefined;
920
932
  }, {
921
933
  chatId: string;
922
934
  message?: SDKUserMessage | undefined;
@@ -929,6 +941,7 @@ declare const startTaskSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
929
941
  baseBranch?: string | undefined;
930
942
  repositorySourceType?: "temporary" | "directory" | "git-server" | undefined;
931
943
  dataEncryptionKey?: string | undefined;
944
+ parentTaskId?: string | undefined;
932
945
  }>, {
933
946
  chatId: string;
934
947
  message?: SDKUserMessage | undefined;
@@ -941,6 +954,7 @@ declare const startTaskSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
941
954
  baseBranch?: string | undefined;
942
955
  repositorySourceType?: "temporary" | "directory" | "git-server" | undefined;
943
956
  dataEncryptionKey?: string | undefined;
957
+ parentTaskId?: string | undefined;
944
958
  }, {
945
959
  chatId: string;
946
960
  message?: SDKUserMessage | undefined;
@@ -953,6 +967,7 @@ declare const startTaskSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
953
967
  baseBranch?: string | undefined;
954
968
  repositorySourceType?: "temporary" | "directory" | "git-server" | undefined;
955
969
  dataEncryptionKey?: string | undefined;
970
+ parentTaskId?: string | undefined;
956
971
  }>;
957
972
  /**
958
973
  * POST /v1/tasks/start - Response schema (201 Created)
@@ -1064,6 +1079,8 @@ declare const TaskItemSchema: z.ZodObject<{
1064
1079
  }[];
1065
1080
  }>>;
1066
1081
  totalDuration: z.ZodNullable<z.ZodNumber>;
1082
+ rootTaskId: z.ZodNullable<z.ZodString>;
1083
+ parentTaskId: z.ZodNullable<z.ZodString>;
1067
1084
  createdAt: z.ZodString;
1068
1085
  updatedAt: z.ZodString;
1069
1086
  }, "strip", z.ZodTypeAny, {
@@ -1080,6 +1097,7 @@ declare const TaskItemSchema: z.ZodObject<{
1080
1097
  baseBranch: string | null;
1081
1098
  repositorySourceType: "temporary" | "directory" | "git-server" | null;
1082
1099
  dataEncryptionKey: string | null;
1100
+ parentTaskId: string | null;
1083
1101
  agentId: string;
1084
1102
  title: string | null;
1085
1103
  userCwd: string | null;
@@ -1101,6 +1119,7 @@ declare const TaskItemSchema: z.ZodObject<{
1101
1119
  }[];
1102
1120
  } | null;
1103
1121
  totalDuration: number | null;
1122
+ rootTaskId: string | null;
1104
1123
  }, {
1105
1124
  id: string;
1106
1125
  createdAt: string;
@@ -1115,6 +1134,7 @@ declare const TaskItemSchema: z.ZodObject<{
1115
1134
  baseBranch: string | null;
1116
1135
  repositorySourceType: "temporary" | "directory" | "git-server" | null;
1117
1136
  dataEncryptionKey: string | null;
1137
+ parentTaskId: string | null;
1118
1138
  agentId: string;
1119
1139
  title: string | null;
1120
1140
  userCwd: string | null;
@@ -1136,6 +1156,7 @@ declare const TaskItemSchema: z.ZodObject<{
1136
1156
  }[];
1137
1157
  } | null;
1138
1158
  totalDuration: number | null;
1159
+ rootTaskId: string | null;
1139
1160
  }>;
1140
1161
  type TaskItem = z.infer<typeof TaskItemSchema>;
1141
1162
  /**
@@ -1219,6 +1240,8 @@ declare const ListTasksResponseSchema: z.ZodObject<{
1219
1240
  }[];
1220
1241
  }>>;
1221
1242
  totalDuration: z.ZodNullable<z.ZodNumber>;
1243
+ rootTaskId: z.ZodNullable<z.ZodString>;
1244
+ parentTaskId: z.ZodNullable<z.ZodString>;
1222
1245
  createdAt: z.ZodString;
1223
1246
  updatedAt: z.ZodString;
1224
1247
  }, "strip", z.ZodTypeAny, {
@@ -1235,6 +1258,7 @@ declare const ListTasksResponseSchema: z.ZodObject<{
1235
1258
  baseBranch: string | null;
1236
1259
  repositorySourceType: "temporary" | "directory" | "git-server" | null;
1237
1260
  dataEncryptionKey: string | null;
1261
+ parentTaskId: string | null;
1238
1262
  agentId: string;
1239
1263
  title: string | null;
1240
1264
  userCwd: string | null;
@@ -1256,6 +1280,7 @@ declare const ListTasksResponseSchema: z.ZodObject<{
1256
1280
  }[];
1257
1281
  } | null;
1258
1282
  totalDuration: number | null;
1283
+ rootTaskId: string | null;
1259
1284
  }, {
1260
1285
  id: string;
1261
1286
  createdAt: string;
@@ -1270,6 +1295,7 @@ declare const ListTasksResponseSchema: z.ZodObject<{
1270
1295
  baseBranch: string | null;
1271
1296
  repositorySourceType: "temporary" | "directory" | "git-server" | null;
1272
1297
  dataEncryptionKey: string | null;
1298
+ parentTaskId: string | null;
1273
1299
  agentId: string;
1274
1300
  title: string | null;
1275
1301
  userCwd: string | null;
@@ -1291,6 +1317,7 @@ declare const ListTasksResponseSchema: z.ZodObject<{
1291
1317
  }[];
1292
1318
  } | null;
1293
1319
  totalDuration: number | null;
1320
+ rootTaskId: string | null;
1294
1321
  }>, "many">;
1295
1322
  nextCursor: z.ZodNullable<z.ZodString>;
1296
1323
  hasMore: z.ZodBoolean;
@@ -1309,6 +1336,7 @@ declare const ListTasksResponseSchema: z.ZodObject<{
1309
1336
  baseBranch: string | null;
1310
1337
  repositorySourceType: "temporary" | "directory" | "git-server" | null;
1311
1338
  dataEncryptionKey: string | null;
1339
+ parentTaskId: string | null;
1312
1340
  agentId: string;
1313
1341
  title: string | null;
1314
1342
  userCwd: string | null;
@@ -1330,6 +1358,7 @@ declare const ListTasksResponseSchema: z.ZodObject<{
1330
1358
  }[];
1331
1359
  } | null;
1332
1360
  totalDuration: number | null;
1361
+ rootTaskId: string | null;
1333
1362
  }[];
1334
1363
  nextCursor: string | null;
1335
1364
  hasMore: boolean;
@@ -1348,6 +1377,7 @@ declare const ListTasksResponseSchema: z.ZodObject<{
1348
1377
  baseBranch: string | null;
1349
1378
  repositorySourceType: "temporary" | "directory" | "git-server" | null;
1350
1379
  dataEncryptionKey: string | null;
1380
+ parentTaskId: string | null;
1351
1381
  agentId: string;
1352
1382
  title: string | null;
1353
1383
  userCwd: string | null;
@@ -1369,6 +1399,7 @@ declare const ListTasksResponseSchema: z.ZodObject<{
1369
1399
  }[];
1370
1400
  } | null;
1371
1401
  totalDuration: number | null;
1402
+ rootTaskId: string | null;
1372
1403
  }[];
1373
1404
  nextCursor: string | null;
1374
1405
  hasMore: boolean;
@@ -1887,6 +1918,8 @@ declare const ArchiveTaskResponseSchema: z.ZodObject<{
1887
1918
  }[];
1888
1919
  }>>;
1889
1920
  totalDuration: z.ZodNullable<z.ZodNumber>;
1921
+ rootTaskId: z.ZodNullable<z.ZodString>;
1922
+ parentTaskId: z.ZodNullable<z.ZodString>;
1890
1923
  createdAt: z.ZodString;
1891
1924
  updatedAt: z.ZodString;
1892
1925
  }, "strip", z.ZodTypeAny, {
@@ -1903,6 +1936,7 @@ declare const ArchiveTaskResponseSchema: z.ZodObject<{
1903
1936
  baseBranch: string | null;
1904
1937
  repositorySourceType: "temporary" | "directory" | "git-server" | null;
1905
1938
  dataEncryptionKey: string | null;
1939
+ parentTaskId: string | null;
1906
1940
  agentId: string;
1907
1941
  title: string | null;
1908
1942
  userCwd: string | null;
@@ -1924,6 +1958,7 @@ declare const ArchiveTaskResponseSchema: z.ZodObject<{
1924
1958
  }[];
1925
1959
  } | null;
1926
1960
  totalDuration: number | null;
1961
+ rootTaskId: string | null;
1927
1962
  }, {
1928
1963
  id: string;
1929
1964
  createdAt: string;
@@ -1938,6 +1973,7 @@ declare const ArchiveTaskResponseSchema: z.ZodObject<{
1938
1973
  baseBranch: string | null;
1939
1974
  repositorySourceType: "temporary" | "directory" | "git-server" | null;
1940
1975
  dataEncryptionKey: string | null;
1976
+ parentTaskId: string | null;
1941
1977
  agentId: string;
1942
1978
  title: string | null;
1943
1979
  userCwd: string | null;
@@ -1959,6 +1995,7 @@ declare const ArchiveTaskResponseSchema: z.ZodObject<{
1959
1995
  }[];
1960
1996
  } | null;
1961
1997
  totalDuration: number | null;
1998
+ rootTaskId: string | null;
1962
1999
  }>;
1963
2000
  }, "strip", z.ZodTypeAny, {
1964
2001
  success: boolean;
@@ -1976,6 +2013,7 @@ declare const ArchiveTaskResponseSchema: z.ZodObject<{
1976
2013
  baseBranch: string | null;
1977
2014
  repositorySourceType: "temporary" | "directory" | "git-server" | null;
1978
2015
  dataEncryptionKey: string | null;
2016
+ parentTaskId: string | null;
1979
2017
  agentId: string;
1980
2018
  title: string | null;
1981
2019
  userCwd: string | null;
@@ -1997,6 +2035,7 @@ declare const ArchiveTaskResponseSchema: z.ZodObject<{
1997
2035
  }[];
1998
2036
  } | null;
1999
2037
  totalDuration: number | null;
2038
+ rootTaskId: string | null;
2000
2039
  };
2001
2040
  }, {
2002
2041
  success: boolean;
@@ -2014,6 +2053,7 @@ declare const ArchiveTaskResponseSchema: z.ZodObject<{
2014
2053
  baseBranch: string | null;
2015
2054
  repositorySourceType: "temporary" | "directory" | "git-server" | null;
2016
2055
  dataEncryptionKey: string | null;
2056
+ parentTaskId: string | null;
2017
2057
  agentId: string;
2018
2058
  title: string | null;
2019
2059
  userCwd: string | null;
@@ -2035,6 +2075,7 @@ declare const ArchiveTaskResponseSchema: z.ZodObject<{
2035
2075
  }[];
2036
2076
  } | null;
2037
2077
  totalDuration: number | null;
2078
+ rootTaskId: string | null;
2038
2079
  };
2039
2080
  }>;
2040
2081
  type ArchiveTaskResponse = z.infer<typeof ArchiveTaskResponseSchema>;
@@ -2105,6 +2146,8 @@ declare const UnarchiveTaskResponseSchema: z.ZodObject<{
2105
2146
  }[];
2106
2147
  }>>;
2107
2148
  totalDuration: z.ZodNullable<z.ZodNumber>;
2149
+ rootTaskId: z.ZodNullable<z.ZodString>;
2150
+ parentTaskId: z.ZodNullable<z.ZodString>;
2108
2151
  createdAt: z.ZodString;
2109
2152
  updatedAt: z.ZodString;
2110
2153
  }, "strip", z.ZodTypeAny, {
@@ -2121,6 +2164,7 @@ declare const UnarchiveTaskResponseSchema: z.ZodObject<{
2121
2164
  baseBranch: string | null;
2122
2165
  repositorySourceType: "temporary" | "directory" | "git-server" | null;
2123
2166
  dataEncryptionKey: string | null;
2167
+ parentTaskId: string | null;
2124
2168
  agentId: string;
2125
2169
  title: string | null;
2126
2170
  userCwd: string | null;
@@ -2142,6 +2186,7 @@ declare const UnarchiveTaskResponseSchema: z.ZodObject<{
2142
2186
  }[];
2143
2187
  } | null;
2144
2188
  totalDuration: number | null;
2189
+ rootTaskId: string | null;
2145
2190
  }, {
2146
2191
  id: string;
2147
2192
  createdAt: string;
@@ -2156,6 +2201,7 @@ declare const UnarchiveTaskResponseSchema: z.ZodObject<{
2156
2201
  baseBranch: string | null;
2157
2202
  repositorySourceType: "temporary" | "directory" | "git-server" | null;
2158
2203
  dataEncryptionKey: string | null;
2204
+ parentTaskId: string | null;
2159
2205
  agentId: string;
2160
2206
  title: string | null;
2161
2207
  userCwd: string | null;
@@ -2177,6 +2223,7 @@ declare const UnarchiveTaskResponseSchema: z.ZodObject<{
2177
2223
  }[];
2178
2224
  } | null;
2179
2225
  totalDuration: number | null;
2226
+ rootTaskId: string | null;
2180
2227
  }>;
2181
2228
  }, "strip", z.ZodTypeAny, {
2182
2229
  success: boolean;
@@ -2194,6 +2241,7 @@ declare const UnarchiveTaskResponseSchema: z.ZodObject<{
2194
2241
  baseBranch: string | null;
2195
2242
  repositorySourceType: "temporary" | "directory" | "git-server" | null;
2196
2243
  dataEncryptionKey: string | null;
2244
+ parentTaskId: string | null;
2197
2245
  agentId: string;
2198
2246
  title: string | null;
2199
2247
  userCwd: string | null;
@@ -2215,6 +2263,7 @@ declare const UnarchiveTaskResponseSchema: z.ZodObject<{
2215
2263
  }[];
2216
2264
  } | null;
2217
2265
  totalDuration: number | null;
2266
+ rootTaskId: string | null;
2218
2267
  };
2219
2268
  }, {
2220
2269
  success: boolean;
@@ -2232,6 +2281,7 @@ declare const UnarchiveTaskResponseSchema: z.ZodObject<{
2232
2281
  baseBranch: string | null;
2233
2282
  repositorySourceType: "temporary" | "directory" | "git-server" | null;
2234
2283
  dataEncryptionKey: string | null;
2284
+ parentTaskId: string | null;
2235
2285
  agentId: string;
2236
2286
  title: string | null;
2237
2287
  userCwd: string | null;
@@ -2253,6 +2303,7 @@ declare const UnarchiveTaskResponseSchema: z.ZodObject<{
2253
2303
  }[];
2254
2304
  } | null;
2255
2305
  totalDuration: number | null;
2306
+ rootTaskId: string | null;
2256
2307
  };
2257
2308
  }>;
2258
2309
  type UnarchiveTaskResponse = z.infer<typeof UnarchiveTaskResponseSchema>;
@@ -2329,6 +2380,8 @@ declare const UpdateTaskTitleResponseSchema: z.ZodObject<{
2329
2380
  }[];
2330
2381
  }>>;
2331
2382
  totalDuration: z.ZodNullable<z.ZodNumber>;
2383
+ rootTaskId: z.ZodNullable<z.ZodString>;
2384
+ parentTaskId: z.ZodNullable<z.ZodString>;
2332
2385
  createdAt: z.ZodString;
2333
2386
  updatedAt: z.ZodString;
2334
2387
  }, "strip", z.ZodTypeAny, {
@@ -2345,6 +2398,7 @@ declare const UpdateTaskTitleResponseSchema: z.ZodObject<{
2345
2398
  baseBranch: string | null;
2346
2399
  repositorySourceType: "temporary" | "directory" | "git-server" | null;
2347
2400
  dataEncryptionKey: string | null;
2401
+ parentTaskId: string | null;
2348
2402
  agentId: string;
2349
2403
  title: string | null;
2350
2404
  userCwd: string | null;
@@ -2366,6 +2420,7 @@ declare const UpdateTaskTitleResponseSchema: z.ZodObject<{
2366
2420
  }[];
2367
2421
  } | null;
2368
2422
  totalDuration: number | null;
2423
+ rootTaskId: string | null;
2369
2424
  }, {
2370
2425
  id: string;
2371
2426
  createdAt: string;
@@ -2380,6 +2435,7 @@ declare const UpdateTaskTitleResponseSchema: z.ZodObject<{
2380
2435
  baseBranch: string | null;
2381
2436
  repositorySourceType: "temporary" | "directory" | "git-server" | null;
2382
2437
  dataEncryptionKey: string | null;
2438
+ parentTaskId: string | null;
2383
2439
  agentId: string;
2384
2440
  title: string | null;
2385
2441
  userCwd: string | null;
@@ -2401,6 +2457,7 @@ declare const UpdateTaskTitleResponseSchema: z.ZodObject<{
2401
2457
  }[];
2402
2458
  } | null;
2403
2459
  totalDuration: number | null;
2460
+ rootTaskId: string | null;
2404
2461
  }>;
2405
2462
  }, "strip", z.ZodTypeAny, {
2406
2463
  success: boolean;
@@ -2418,6 +2475,7 @@ declare const UpdateTaskTitleResponseSchema: z.ZodObject<{
2418
2475
  baseBranch: string | null;
2419
2476
  repositorySourceType: "temporary" | "directory" | "git-server" | null;
2420
2477
  dataEncryptionKey: string | null;
2478
+ parentTaskId: string | null;
2421
2479
  agentId: string;
2422
2480
  title: string | null;
2423
2481
  userCwd: string | null;
@@ -2439,6 +2497,7 @@ declare const UpdateTaskTitleResponseSchema: z.ZodObject<{
2439
2497
  }[];
2440
2498
  } | null;
2441
2499
  totalDuration: number | null;
2500
+ rootTaskId: string | null;
2442
2501
  };
2443
2502
  }, {
2444
2503
  success: boolean;
@@ -2456,6 +2515,7 @@ declare const UpdateTaskTitleResponseSchema: z.ZodObject<{
2456
2515
  baseBranch: string | null;
2457
2516
  repositorySourceType: "temporary" | "directory" | "git-server" | null;
2458
2517
  dataEncryptionKey: string | null;
2518
+ parentTaskId: string | null;
2459
2519
  agentId: string;
2460
2520
  title: string | null;
2461
2521
  userCwd: string | null;
@@ -2477,9 +2537,116 @@ declare const UpdateTaskTitleResponseSchema: z.ZodObject<{
2477
2537
  }[];
2478
2538
  } | null;
2479
2539
  totalDuration: number | null;
2540
+ rootTaskId: string | null;
2480
2541
  };
2481
2542
  }>;
2482
2543
  type UpdateTaskTitleResponse = z.infer<typeof UpdateTaskTitleResponseSchema>;
2544
+ /**
2545
+ * Message target type
2546
+ * - 'agent': Send to task's agent worker (injects as user message)
2547
+ * - 'user': Send to users viewing the task (shows in chat UI)
2548
+ */
2549
+ type SendMessageTarget = 'agent' | 'user';
2550
+ /**
2551
+ * POST /v1/tasks/:taskId/send-message - Request schema
2552
+ * Sends a message to a task's worker or to users viewing the task
2553
+ *
2554
+ * Target behavior:
2555
+ * - 'agent': Routes SDKUserMessage to task's agent worker
2556
+ * - 'user': Broadcasts SDKAssistantMessage to users viewing the task
2557
+ */
2558
+ declare const SendTaskMessageRequestSchema: z.ZodObject<{
2559
+ message: z.ZodType<SDKUserMessage | SDKAssistantMessage, z.ZodTypeDef, SDKUserMessage | SDKAssistantMessage>;
2560
+ target: z.ZodEnum<["agent", "user"]>;
2561
+ fromTaskId: z.ZodOptional<z.ZodString>;
2562
+ }, "strip", z.ZodTypeAny, {
2563
+ message: SDKUserMessage | SDKAssistantMessage;
2564
+ target: "user" | "agent";
2565
+ fromTaskId?: string | undefined;
2566
+ }, {
2567
+ message: SDKUserMessage | SDKAssistantMessage;
2568
+ target: "user" | "agent";
2569
+ fromTaskId?: string | undefined;
2570
+ }>;
2571
+ type SendTaskMessageRequest = z.infer<typeof SendTaskMessageRequestSchema>;
2572
+ /**
2573
+ * POST /v1/tasks/:taskId/send-message - Response schema
2574
+ */
2575
+ declare const SendTaskMessageResponseSchema: z.ZodObject<{
2576
+ success: z.ZodBoolean;
2577
+ }, "strip", z.ZodTypeAny, {
2578
+ success: boolean;
2579
+ }, {
2580
+ success: boolean;
2581
+ }>;
2582
+ type SendTaskMessageResponse = z.infer<typeof SendTaskMessageResponseSchema>;
2583
+ /**
2584
+ * POST /v1/tasks/:taskId/show-modal - Request schema
2585
+ * Shows a modal dialog to users viewing the task
2586
+ */
2587
+ declare const ShowModalRequestSchema: z.ZodObject<{
2588
+ modalName: z.ZodString;
2589
+ modalData: z.ZodRecord<z.ZodString, z.ZodAny>;
2590
+ }, "strip", z.ZodTypeAny, {
2591
+ modalName: string;
2592
+ modalData: Record<string, any>;
2593
+ }, {
2594
+ modalName: string;
2595
+ modalData: Record<string, any>;
2596
+ }>;
2597
+ type ShowModalRequest = z.infer<typeof ShowModalRequestSchema>;
2598
+ /**
2599
+ * POST /v1/tasks/:taskId/show-modal - Response schema
2600
+ */
2601
+ declare const ShowModalResponseSchema: z.ZodObject<{
2602
+ success: z.ZodBoolean;
2603
+ }, "strip", z.ZodTypeAny, {
2604
+ success: boolean;
2605
+ }, {
2606
+ success: boolean;
2607
+ }>;
2608
+ type ShowModalResponse = z.infer<typeof ShowModalResponseSchema>;
2609
+ /**
2610
+ * GET /v1/tasks/:taskId/session - Response schema
2611
+ * Returns the session file path and current state
2612
+ */
2613
+ declare const GetTaskSessionResponseSchema: z.ZodObject<{
2614
+ sessionPath: z.ZodString;
2615
+ state: z.ZodString;
2616
+ }, "strip", z.ZodTypeAny, {
2617
+ state: string;
2618
+ sessionPath: string;
2619
+ }, {
2620
+ state: string;
2621
+ sessionPath: string;
2622
+ }>;
2623
+ type GetTaskSessionResponse = z.infer<typeof GetTaskSessionResponseSchema>;
2624
+ /**
2625
+ * GET /v1/tasks/find-by-agent - Query parameters schema
2626
+ * Finds a task by parentTaskId and agentId
2627
+ */
2628
+ declare const FindTaskByAgentRequestSchema: z.ZodObject<{
2629
+ parentTaskId: z.ZodString;
2630
+ agentId: z.ZodString;
2631
+ }, "strip", z.ZodTypeAny, {
2632
+ parentTaskId: string;
2633
+ agentId: string;
2634
+ }, {
2635
+ parentTaskId: string;
2636
+ agentId: string;
2637
+ }>;
2638
+ type FindTaskByAgentRequest = z.infer<typeof FindTaskByAgentRequestSchema>;
2639
+ /**
2640
+ * GET /v1/tasks/find-by-agent - Response schema
2641
+ */
2642
+ declare const FindTaskByAgentResponseSchema: z.ZodObject<{
2643
+ taskId: z.ZodNullable<z.ZodString>;
2644
+ }, "strip", z.ZodTypeAny, {
2645
+ taskId: string | null;
2646
+ }, {
2647
+ taskId: string | null;
2648
+ }>;
2649
+ type FindTaskByAgentResponse = z.infer<typeof FindTaskByAgentResponseSchema>;
2483
2650
 
2484
2651
  /**
2485
2652
  * Chat HTTP request/response schemas
@@ -2498,7 +2665,7 @@ declare const ChatMemberSchema: z.ZodObject<{
2498
2665
  createdAt: z.ZodString;
2499
2666
  updatedAt: z.ZodString;
2500
2667
  }, "strip", z.ZodTypeAny, {
2501
- type: "human" | "agent";
2668
+ type: "agent" | "human";
2502
2669
  id: string;
2503
2670
  createdAt: string;
2504
2671
  chatId: string;
@@ -2506,7 +2673,7 @@ declare const ChatMemberSchema: z.ZodObject<{
2506
2673
  memberCode: string;
2507
2674
  role: string;
2508
2675
  }, {
2509
- type: "human" | "agent";
2676
+ type: "agent" | "human";
2510
2677
  id: string;
2511
2678
  createdAt: string;
2512
2679
  chatId: string;
@@ -2527,6 +2694,7 @@ declare const ChatSchema: z.ZodObject<{
2527
2694
  id: z.ZodString;
2528
2695
  owner: z.ZodString;
2529
2696
  type: z.ZodEnum<["direct", "group"]>;
2697
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2530
2698
  createdAt: z.ZodString;
2531
2699
  updatedAt: z.ZodString;
2532
2700
  }, "strip", z.ZodTypeAny, {
@@ -2535,12 +2703,14 @@ declare const ChatSchema: z.ZodObject<{
2535
2703
  createdAt: string;
2536
2704
  updatedAt: string;
2537
2705
  owner: string;
2706
+ title?: string | null | undefined;
2538
2707
  }, {
2539
2708
  type: "direct" | "group";
2540
2709
  id: string;
2541
2710
  createdAt: string;
2542
2711
  updatedAt: string;
2543
2712
  owner: string;
2713
+ title?: string | null | undefined;
2544
2714
  }>;
2545
2715
  type Chat = z.infer<typeof ChatSchema>;
2546
2716
  /**
@@ -2550,6 +2720,7 @@ declare const ChatWithMembersSchema: z.ZodObject<{
2550
2720
  id: z.ZodString;
2551
2721
  owner: z.ZodString;
2552
2722
  type: z.ZodEnum<["direct", "group"]>;
2723
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2553
2724
  createdAt: z.ZodString;
2554
2725
  updatedAt: z.ZodString;
2555
2726
  } & {
@@ -2562,7 +2733,7 @@ declare const ChatWithMembersSchema: z.ZodObject<{
2562
2733
  createdAt: z.ZodString;
2563
2734
  updatedAt: z.ZodString;
2564
2735
  }, "strip", z.ZodTypeAny, {
2565
- type: "human" | "agent";
2736
+ type: "agent" | "human";
2566
2737
  id: string;
2567
2738
  createdAt: string;
2568
2739
  chatId: string;
@@ -2570,7 +2741,7 @@ declare const ChatWithMembersSchema: z.ZodObject<{
2570
2741
  memberCode: string;
2571
2742
  role: string;
2572
2743
  }, {
2573
- type: "human" | "agent";
2744
+ type: "agent" | "human";
2574
2745
  id: string;
2575
2746
  createdAt: string;
2576
2747
  chatId: string;
@@ -2585,7 +2756,7 @@ declare const ChatWithMembersSchema: z.ZodObject<{
2585
2756
  updatedAt: string;
2586
2757
  owner: string;
2587
2758
  members: {
2588
- type: "human" | "agent";
2759
+ type: "agent" | "human";
2589
2760
  id: string;
2590
2761
  createdAt: string;
2591
2762
  chatId: string;
@@ -2593,6 +2764,7 @@ declare const ChatWithMembersSchema: z.ZodObject<{
2593
2764
  memberCode: string;
2594
2765
  role: string;
2595
2766
  }[];
2767
+ title?: string | null | undefined;
2596
2768
  }, {
2597
2769
  type: "direct" | "group";
2598
2770
  id: string;
@@ -2600,7 +2772,7 @@ declare const ChatWithMembersSchema: z.ZodObject<{
2600
2772
  updatedAt: string;
2601
2773
  owner: string;
2602
2774
  members: {
2603
- type: "human" | "agent";
2775
+ type: "agent" | "human";
2604
2776
  id: string;
2605
2777
  createdAt: string;
2606
2778
  chatId: string;
@@ -2608,6 +2780,7 @@ declare const ChatWithMembersSchema: z.ZodObject<{
2608
2780
  memberCode: string;
2609
2781
  role: string;
2610
2782
  }[];
2783
+ title?: string | null | undefined;
2611
2784
  }>;
2612
2785
  type ChatWithMembers = z.infer<typeof ChatWithMembersSchema>;
2613
2786
  /**
@@ -2617,10 +2790,10 @@ declare const ChatMemberInputSchema: z.ZodObject<{
2617
2790
  memberCode: z.ZodString;
2618
2791
  type: z.ZodEnum<["human", "agent"]>;
2619
2792
  }, "strip", z.ZodTypeAny, {
2620
- type: "human" | "agent";
2793
+ type: "agent" | "human";
2621
2794
  memberCode: string;
2622
2795
  }, {
2623
- type: "human" | "agent";
2796
+ type: "agent" | "human";
2624
2797
  memberCode: string;
2625
2798
  }>;
2626
2799
  type ChatMemberInput = z.infer<typeof ChatMemberInputSchema>;
@@ -2633,21 +2806,21 @@ declare const CreateChatRequestSchema: z.ZodObject<{
2633
2806
  memberCode: z.ZodString;
2634
2807
  type: z.ZodEnum<["human", "agent"]>;
2635
2808
  }, "strip", z.ZodTypeAny, {
2636
- type: "human" | "agent";
2809
+ type: "agent" | "human";
2637
2810
  memberCode: string;
2638
2811
  }, {
2639
- type: "human" | "agent";
2812
+ type: "agent" | "human";
2640
2813
  memberCode: string;
2641
2814
  }>, "many">;
2642
2815
  }, "strip", z.ZodTypeAny, {
2643
2816
  type: "direct" | "group";
2644
2817
  members: {
2645
- type: "human" | "agent";
2818
+ type: "agent" | "human";
2646
2819
  memberCode: string;
2647
2820
  }[];
2648
2821
  }, {
2649
2822
  members: {
2650
- type: "human" | "agent";
2823
+ type: "agent" | "human";
2651
2824
  memberCode: string;
2652
2825
  }[];
2653
2826
  type?: "direct" | "group" | undefined;
@@ -2660,6 +2833,7 @@ declare const CreateChatResponseSchema: z.ZodObject<{
2660
2833
  id: z.ZodString;
2661
2834
  owner: z.ZodString;
2662
2835
  type: z.ZodEnum<["direct", "group"]>;
2836
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2663
2837
  createdAt: z.ZodString;
2664
2838
  updatedAt: z.ZodString;
2665
2839
  } & {
@@ -2672,7 +2846,7 @@ declare const CreateChatResponseSchema: z.ZodObject<{
2672
2846
  createdAt: z.ZodString;
2673
2847
  updatedAt: z.ZodString;
2674
2848
  }, "strip", z.ZodTypeAny, {
2675
- type: "human" | "agent";
2849
+ type: "agent" | "human";
2676
2850
  id: string;
2677
2851
  createdAt: string;
2678
2852
  chatId: string;
@@ -2680,7 +2854,7 @@ declare const CreateChatResponseSchema: z.ZodObject<{
2680
2854
  memberCode: string;
2681
2855
  role: string;
2682
2856
  }, {
2683
- type: "human" | "agent";
2857
+ type: "agent" | "human";
2684
2858
  id: string;
2685
2859
  createdAt: string;
2686
2860
  chatId: string;
@@ -2695,7 +2869,7 @@ declare const CreateChatResponseSchema: z.ZodObject<{
2695
2869
  updatedAt: string;
2696
2870
  owner: string;
2697
2871
  members: {
2698
- type: "human" | "agent";
2872
+ type: "agent" | "human";
2699
2873
  id: string;
2700
2874
  createdAt: string;
2701
2875
  chatId: string;
@@ -2703,6 +2877,7 @@ declare const CreateChatResponseSchema: z.ZodObject<{
2703
2877
  memberCode: string;
2704
2878
  role: string;
2705
2879
  }[];
2880
+ title?: string | null | undefined;
2706
2881
  }, {
2707
2882
  type: "direct" | "group";
2708
2883
  id: string;
@@ -2710,7 +2885,7 @@ declare const CreateChatResponseSchema: z.ZodObject<{
2710
2885
  updatedAt: string;
2711
2886
  owner: string;
2712
2887
  members: {
2713
- type: "human" | "agent";
2888
+ type: "agent" | "human";
2714
2889
  id: string;
2715
2890
  createdAt: string;
2716
2891
  chatId: string;
@@ -2718,6 +2893,7 @@ declare const CreateChatResponseSchema: z.ZodObject<{
2718
2893
  memberCode: string;
2719
2894
  role: string;
2720
2895
  }[];
2896
+ title?: string | null | undefined;
2721
2897
  }>;
2722
2898
  type CreateChatResponse = z.infer<typeof CreateChatResponseSchema>;
2723
2899
  /**
@@ -2745,6 +2921,7 @@ declare const ListChatsResponseSchema: z.ZodObject<{
2745
2921
  id: z.ZodString;
2746
2922
  owner: z.ZodString;
2747
2923
  type: z.ZodEnum<["direct", "group"]>;
2924
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2748
2925
  createdAt: z.ZodString;
2749
2926
  updatedAt: z.ZodString;
2750
2927
  } & {
@@ -2757,7 +2934,7 @@ declare const ListChatsResponseSchema: z.ZodObject<{
2757
2934
  createdAt: z.ZodString;
2758
2935
  updatedAt: z.ZodString;
2759
2936
  }, "strip", z.ZodTypeAny, {
2760
- type: "human" | "agent";
2937
+ type: "agent" | "human";
2761
2938
  id: string;
2762
2939
  createdAt: string;
2763
2940
  chatId: string;
@@ -2765,7 +2942,7 @@ declare const ListChatsResponseSchema: z.ZodObject<{
2765
2942
  memberCode: string;
2766
2943
  role: string;
2767
2944
  }, {
2768
- type: "human" | "agent";
2945
+ type: "agent" | "human";
2769
2946
  id: string;
2770
2947
  createdAt: string;
2771
2948
  chatId: string;
@@ -2780,7 +2957,7 @@ declare const ListChatsResponseSchema: z.ZodObject<{
2780
2957
  updatedAt: string;
2781
2958
  owner: string;
2782
2959
  members: {
2783
- type: "human" | "agent";
2960
+ type: "agent" | "human";
2784
2961
  id: string;
2785
2962
  createdAt: string;
2786
2963
  chatId: string;
@@ -2788,6 +2965,7 @@ declare const ListChatsResponseSchema: z.ZodObject<{
2788
2965
  memberCode: string;
2789
2966
  role: string;
2790
2967
  }[];
2968
+ title?: string | null | undefined;
2791
2969
  }, {
2792
2970
  type: "direct" | "group";
2793
2971
  id: string;
@@ -2795,7 +2973,7 @@ declare const ListChatsResponseSchema: z.ZodObject<{
2795
2973
  updatedAt: string;
2796
2974
  owner: string;
2797
2975
  members: {
2798
- type: "human" | "agent";
2976
+ type: "agent" | "human";
2799
2977
  id: string;
2800
2978
  createdAt: string;
2801
2979
  chatId: string;
@@ -2803,6 +2981,7 @@ declare const ListChatsResponseSchema: z.ZodObject<{
2803
2981
  memberCode: string;
2804
2982
  role: string;
2805
2983
  }[];
2984
+ title?: string | null | undefined;
2806
2985
  }>, "many">;
2807
2986
  hasMore: z.ZodBoolean;
2808
2987
  }, "strip", z.ZodTypeAny, {
@@ -2814,7 +2993,7 @@ declare const ListChatsResponseSchema: z.ZodObject<{
2814
2993
  updatedAt: string;
2815
2994
  owner: string;
2816
2995
  members: {
2817
- type: "human" | "agent";
2996
+ type: "agent" | "human";
2818
2997
  id: string;
2819
2998
  createdAt: string;
2820
2999
  chatId: string;
@@ -2822,6 +3001,7 @@ declare const ListChatsResponseSchema: z.ZodObject<{
2822
3001
  memberCode: string;
2823
3002
  role: string;
2824
3003
  }[];
3004
+ title?: string | null | undefined;
2825
3005
  }[];
2826
3006
  }, {
2827
3007
  hasMore: boolean;
@@ -2832,7 +3012,7 @@ declare const ListChatsResponseSchema: z.ZodObject<{
2832
3012
  updatedAt: string;
2833
3013
  owner: string;
2834
3014
  members: {
2835
- type: "human" | "agent";
3015
+ type: "agent" | "human";
2836
3016
  id: string;
2837
3017
  createdAt: string;
2838
3018
  chatId: string;
@@ -2840,6 +3020,7 @@ declare const ListChatsResponseSchema: z.ZodObject<{
2840
3020
  memberCode: string;
2841
3021
  role: string;
2842
3022
  }[];
3023
+ title?: string | null | undefined;
2843
3024
  }[];
2844
3025
  }>;
2845
3026
  type ListChatsResponse = z.infer<typeof ListChatsResponseSchema>;
@@ -2850,6 +3031,7 @@ declare const GetChatResponseSchema: z.ZodObject<{
2850
3031
  id: z.ZodString;
2851
3032
  owner: z.ZodString;
2852
3033
  type: z.ZodEnum<["direct", "group"]>;
3034
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2853
3035
  createdAt: z.ZodString;
2854
3036
  updatedAt: z.ZodString;
2855
3037
  } & {
@@ -2862,7 +3044,7 @@ declare const GetChatResponseSchema: z.ZodObject<{
2862
3044
  createdAt: z.ZodString;
2863
3045
  updatedAt: z.ZodString;
2864
3046
  }, "strip", z.ZodTypeAny, {
2865
- type: "human" | "agent";
3047
+ type: "agent" | "human";
2866
3048
  id: string;
2867
3049
  createdAt: string;
2868
3050
  chatId: string;
@@ -2870,7 +3052,7 @@ declare const GetChatResponseSchema: z.ZodObject<{
2870
3052
  memberCode: string;
2871
3053
  role: string;
2872
3054
  }, {
2873
- type: "human" | "agent";
3055
+ type: "agent" | "human";
2874
3056
  id: string;
2875
3057
  createdAt: string;
2876
3058
  chatId: string;
@@ -2885,7 +3067,7 @@ declare const GetChatResponseSchema: z.ZodObject<{
2885
3067
  updatedAt: string;
2886
3068
  owner: string;
2887
3069
  members: {
2888
- type: "human" | "agent";
3070
+ type: "agent" | "human";
2889
3071
  id: string;
2890
3072
  createdAt: string;
2891
3073
  chatId: string;
@@ -2893,6 +3075,7 @@ declare const GetChatResponseSchema: z.ZodObject<{
2893
3075
  memberCode: string;
2894
3076
  role: string;
2895
3077
  }[];
3078
+ title?: string | null | undefined;
2896
3079
  }, {
2897
3080
  type: "direct" | "group";
2898
3081
  id: string;
@@ -2900,7 +3083,7 @@ declare const GetChatResponseSchema: z.ZodObject<{
2900
3083
  updatedAt: string;
2901
3084
  owner: string;
2902
3085
  members: {
2903
- type: "human" | "agent";
3086
+ type: "agent" | "human";
2904
3087
  id: string;
2905
3088
  createdAt: string;
2906
3089
  chatId: string;
@@ -2908,6 +3091,7 @@ declare const GetChatResponseSchema: z.ZodObject<{
2908
3091
  memberCode: string;
2909
3092
  role: string;
2910
3093
  }[];
3094
+ title?: string | null | undefined;
2911
3095
  }>;
2912
3096
  type GetChatResponse = z.infer<typeof GetChatResponseSchema>;
2913
3097
  /**
@@ -2923,7 +3107,7 @@ declare const ListChatMembersResponseSchema: z.ZodObject<{
2923
3107
  createdAt: z.ZodString;
2924
3108
  updatedAt: z.ZodString;
2925
3109
  }, "strip", z.ZodTypeAny, {
2926
- type: "human" | "agent";
3110
+ type: "agent" | "human";
2927
3111
  id: string;
2928
3112
  createdAt: string;
2929
3113
  chatId: string;
@@ -2931,7 +3115,7 @@ declare const ListChatMembersResponseSchema: z.ZodObject<{
2931
3115
  memberCode: string;
2932
3116
  role: string;
2933
3117
  }, {
2934
- type: "human" | "agent";
3118
+ type: "agent" | "human";
2935
3119
  id: string;
2936
3120
  createdAt: string;
2937
3121
  chatId: string;
@@ -2941,7 +3125,7 @@ declare const ListChatMembersResponseSchema: z.ZodObject<{
2941
3125
  }>, "many">;
2942
3126
  }, "strip", z.ZodTypeAny, {
2943
3127
  members: {
2944
- type: "human" | "agent";
3128
+ type: "agent" | "human";
2945
3129
  id: string;
2946
3130
  createdAt: string;
2947
3131
  chatId: string;
@@ -2951,7 +3135,7 @@ declare const ListChatMembersResponseSchema: z.ZodObject<{
2951
3135
  }[];
2952
3136
  }, {
2953
3137
  members: {
2954
- type: "human" | "agent";
3138
+ type: "agent" | "human";
2955
3139
  id: string;
2956
3140
  createdAt: string;
2957
3141
  chatId: string;
@@ -2970,20 +3154,20 @@ declare const AddChatMemberRequestSchema: z.ZodObject<{
2970
3154
  memberCode: z.ZodString;
2971
3155
  type: z.ZodEnum<["human", "agent"]>;
2972
3156
  }, "strip", z.ZodTypeAny, {
2973
- type: "human" | "agent";
3157
+ type: "agent" | "human";
2974
3158
  memberCode: string;
2975
3159
  }, {
2976
- type: "human" | "agent";
3160
+ type: "agent" | "human";
2977
3161
  memberCode: string;
2978
3162
  }>, "many">;
2979
3163
  }, "strip", z.ZodTypeAny, {
2980
3164
  members: {
2981
- type: "human" | "agent";
3165
+ type: "agent" | "human";
2982
3166
  memberCode: string;
2983
3167
  }[];
2984
3168
  }, {
2985
3169
  members: {
2986
- type: "human" | "agent";
3170
+ type: "agent" | "human";
2987
3171
  memberCode: string;
2988
3172
  }[];
2989
3173
  }>;
@@ -3001,7 +3185,7 @@ declare const AddChatMemberResponseSchema: z.ZodObject<{
3001
3185
  createdAt: z.ZodString;
3002
3186
  updatedAt: z.ZodString;
3003
3187
  }, "strip", z.ZodTypeAny, {
3004
- type: "human" | "agent";
3188
+ type: "agent" | "human";
3005
3189
  id: string;
3006
3190
  createdAt: string;
3007
3191
  chatId: string;
@@ -3009,7 +3193,7 @@ declare const AddChatMemberResponseSchema: z.ZodObject<{
3009
3193
  memberCode: string;
3010
3194
  role: string;
3011
3195
  }, {
3012
- type: "human" | "agent";
3196
+ type: "agent" | "human";
3013
3197
  id: string;
3014
3198
  createdAt: string;
3015
3199
  chatId: string;
@@ -3019,7 +3203,7 @@ declare const AddChatMemberResponseSchema: z.ZodObject<{
3019
3203
  }>, "many">;
3020
3204
  }, "strip", z.ZodTypeAny, {
3021
3205
  members: {
3022
- type: "human" | "agent";
3206
+ type: "agent" | "human";
3023
3207
  id: string;
3024
3208
  createdAt: string;
3025
3209
  chatId: string;
@@ -3029,7 +3213,7 @@ declare const AddChatMemberResponseSchema: z.ZodObject<{
3029
3213
  }[];
3030
3214
  }, {
3031
3215
  members: {
3032
- type: "human" | "agent";
3216
+ type: "agent" | "human";
3033
3217
  id: string;
3034
3218
  createdAt: string;
3035
3219
  chatId: string;
@@ -3048,20 +3232,20 @@ declare const RemoveChatMemberRequestSchema: z.ZodObject<{
3048
3232
  memberCode: z.ZodString;
3049
3233
  type: z.ZodEnum<["human", "agent"]>;
3050
3234
  }, "strip", z.ZodTypeAny, {
3051
- type: "human" | "agent";
3235
+ type: "agent" | "human";
3052
3236
  memberCode: string;
3053
3237
  }, {
3054
- type: "human" | "agent";
3238
+ type: "agent" | "human";
3055
3239
  memberCode: string;
3056
3240
  }>, "many">;
3057
3241
  }, "strip", z.ZodTypeAny, {
3058
3242
  members: {
3059
- type: "human" | "agent";
3243
+ type: "agent" | "human";
3060
3244
  memberCode: string;
3061
3245
  }[];
3062
3246
  }, {
3063
3247
  members: {
3064
- type: "human" | "agent";
3248
+ type: "agent" | "human";
3065
3249
  memberCode: string;
3066
3250
  }[];
3067
3251
  }>;
@@ -3130,6 +3314,8 @@ declare const ListChatTasksResponseSchema: z.ZodObject<{
3130
3314
  }[];
3131
3315
  }>>;
3132
3316
  totalDuration: z.ZodNullable<z.ZodNumber>;
3317
+ rootTaskId: z.ZodNullable<z.ZodString>;
3318
+ parentTaskId: z.ZodNullable<z.ZodString>;
3133
3319
  createdAt: z.ZodString;
3134
3320
  updatedAt: z.ZodString;
3135
3321
  }, "strip", z.ZodTypeAny, {
@@ -3146,6 +3332,7 @@ declare const ListChatTasksResponseSchema: z.ZodObject<{
3146
3332
  baseBranch: string | null;
3147
3333
  repositorySourceType: "temporary" | "directory" | "git-server" | null;
3148
3334
  dataEncryptionKey: string | null;
3335
+ parentTaskId: string | null;
3149
3336
  agentId: string;
3150
3337
  title: string | null;
3151
3338
  userCwd: string | null;
@@ -3167,6 +3354,7 @@ declare const ListChatTasksResponseSchema: z.ZodObject<{
3167
3354
  }[];
3168
3355
  } | null;
3169
3356
  totalDuration: number | null;
3357
+ rootTaskId: string | null;
3170
3358
  }, {
3171
3359
  id: string;
3172
3360
  createdAt: string;
@@ -3181,6 +3369,7 @@ declare const ListChatTasksResponseSchema: z.ZodObject<{
3181
3369
  baseBranch: string | null;
3182
3370
  repositorySourceType: "temporary" | "directory" | "git-server" | null;
3183
3371
  dataEncryptionKey: string | null;
3372
+ parentTaskId: string | null;
3184
3373
  agentId: string;
3185
3374
  title: string | null;
3186
3375
  userCwd: string | null;
@@ -3202,6 +3391,7 @@ declare const ListChatTasksResponseSchema: z.ZodObject<{
3202
3391
  }[];
3203
3392
  } | null;
3204
3393
  totalDuration: number | null;
3394
+ rootTaskId: string | null;
3205
3395
  }>, "many">;
3206
3396
  }, "strip", z.ZodTypeAny, {
3207
3397
  tasks: {
@@ -3218,6 +3408,7 @@ declare const ListChatTasksResponseSchema: z.ZodObject<{
3218
3408
  baseBranch: string | null;
3219
3409
  repositorySourceType: "temporary" | "directory" | "git-server" | null;
3220
3410
  dataEncryptionKey: string | null;
3411
+ parentTaskId: string | null;
3221
3412
  agentId: string;
3222
3413
  title: string | null;
3223
3414
  userCwd: string | null;
@@ -3239,6 +3430,7 @@ declare const ListChatTasksResponseSchema: z.ZodObject<{
3239
3430
  }[];
3240
3431
  } | null;
3241
3432
  totalDuration: number | null;
3433
+ rootTaskId: string | null;
3242
3434
  }[];
3243
3435
  }, {
3244
3436
  tasks: {
@@ -3255,6 +3447,7 @@ declare const ListChatTasksResponseSchema: z.ZodObject<{
3255
3447
  baseBranch: string | null;
3256
3448
  repositorySourceType: "temporary" | "directory" | "git-server" | null;
3257
3449
  dataEncryptionKey: string | null;
3450
+ parentTaskId: string | null;
3258
3451
  agentId: string;
3259
3452
  title: string | null;
3260
3453
  userCwd: string | null;
@@ -3276,6 +3469,7 @@ declare const ListChatTasksResponseSchema: z.ZodObject<{
3276
3469
  }[];
3277
3470
  } | null;
3278
3471
  totalDuration: number | null;
3472
+ rootTaskId: string | null;
3279
3473
  }[];
3280
3474
  }>;
3281
3475
  type ListChatTasksResponse = z.infer<typeof ListChatTasksResponseSchema>;
@@ -6143,6 +6337,66 @@ declare const GetUserAgentsResponseSchema: z.ZodObject<{
6143
6337
  }[];
6144
6338
  }>;
6145
6339
  type GetUserAgentsResponse = z.infer<typeof GetUserAgentsResponseSchema>;
6340
+ /**
6341
+ * POST /v1/agents/publish - Request schema
6342
+ * Publish a draft agent to production
6343
+ */
6344
+ declare const PublishDraftAgentRequestSchema: z.ZodEffects<z.ZodObject<{
6345
+ draftAgentId: z.ZodString;
6346
+ machineId: z.ZodOptional<z.ZodString>;
6347
+ cloudId: z.ZodOptional<z.ZodString>;
6348
+ name: z.ZodOptional<z.ZodString>;
6349
+ avatar: z.ZodOptional<z.ZodString>;
6350
+ isSystemAgent: z.ZodOptional<z.ZodBoolean>;
6351
+ supportLocal: z.ZodOptional<z.ZodBoolean>;
6352
+ }, "strip", z.ZodTypeAny, {
6353
+ draftAgentId: string;
6354
+ avatar?: string | undefined;
6355
+ machineId?: string | undefined;
6356
+ cloudId?: string | undefined;
6357
+ name?: string | undefined;
6358
+ supportLocal?: boolean | undefined;
6359
+ isSystemAgent?: boolean | undefined;
6360
+ }, {
6361
+ draftAgentId: string;
6362
+ avatar?: string | undefined;
6363
+ machineId?: string | undefined;
6364
+ cloudId?: string | undefined;
6365
+ name?: string | undefined;
6366
+ supportLocal?: boolean | undefined;
6367
+ isSystemAgent?: boolean | undefined;
6368
+ }>, {
6369
+ draftAgentId: string;
6370
+ avatar?: string | undefined;
6371
+ machineId?: string | undefined;
6372
+ cloudId?: string | undefined;
6373
+ name?: string | undefined;
6374
+ supportLocal?: boolean | undefined;
6375
+ isSystemAgent?: boolean | undefined;
6376
+ }, {
6377
+ draftAgentId: string;
6378
+ avatar?: string | undefined;
6379
+ machineId?: string | undefined;
6380
+ cloudId?: string | undefined;
6381
+ name?: string | undefined;
6382
+ supportLocal?: boolean | undefined;
6383
+ isSystemAgent?: boolean | undefined;
6384
+ }>;
6385
+ type PublishDraftAgentRequest = z.infer<typeof PublishDraftAgentRequestSchema>;
6386
+ /**
6387
+ * POST /v1/agents/publish - Response schema
6388
+ */
6389
+ declare const PublishDraftAgentResponseSchema: z.ZodObject<{
6390
+ agentId: z.ZodString;
6391
+ taskId: z.ZodString;
6392
+ }, "strip", z.ZodTypeAny, {
6393
+ taskId: string;
6394
+ agentId: string;
6395
+ }, {
6396
+ taskId: string;
6397
+ agentId: string;
6398
+ }>;
6399
+ type PublishDraftAgentResponse = z.infer<typeof PublishDraftAgentResponseSchema>;
6146
6400
 
6147
6401
  /**
6148
6402
  * Machine HTTP request/response schemas
@@ -8974,6 +9228,9 @@ declare const baseTaskSchema: z.ZodObject<{
8974
9228
  repositoryId: z.ZodOptional<z.ZodString>;
8975
9229
  repositorySourceType: z.ZodOptional<z.ZodEnum<["temporary", "directory", "git-server"]>>;
8976
9230
  environmentVariables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
9231
+ rootTaskId: z.ZodOptional<z.ZodString>;
9232
+ parentTaskId: z.ZodOptional<z.ZodString>;
9233
+ chatAgents: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
8977
9234
  }, "strip", z.ZodTypeAny, {
8978
9235
  userId: string;
8979
9236
  taskId: string;
@@ -8987,7 +9244,9 @@ declare const baseTaskSchema: z.ZodObject<{
8987
9244
  baseBranch?: string | undefined;
8988
9245
  repositorySourceType?: "temporary" | "directory" | "git-server" | undefined;
8989
9246
  dataEncryptionKey?: string | undefined;
9247
+ parentTaskId?: string | undefined;
8990
9248
  userCwd?: string | undefined;
9249
+ rootTaskId?: string | undefined;
8991
9250
  agentDir?: string | undefined;
8992
9251
  gitUrl?: string | undefined;
8993
9252
  model?: string | undefined;
@@ -8996,6 +9255,7 @@ declare const baseTaskSchema: z.ZodObject<{
8996
9255
  api_key?: string | undefined;
8997
9256
  maxTurns?: number | undefined;
8998
9257
  environmentVariables?: Record<string, string> | undefined;
9258
+ chatAgents?: Record<string, string> | undefined;
8999
9259
  }, {
9000
9260
  userId: string;
9001
9261
  taskId: string;
@@ -9008,7 +9268,9 @@ declare const baseTaskSchema: z.ZodObject<{
9008
9268
  baseBranch?: string | undefined;
9009
9269
  repositorySourceType?: "temporary" | "directory" | "git-server" | undefined;
9010
9270
  dataEncryptionKey?: string | undefined;
9271
+ parentTaskId?: string | undefined;
9011
9272
  userCwd?: string | undefined;
9273
+ rootTaskId?: string | undefined;
9012
9274
  agentDir?: string | undefined;
9013
9275
  gitUrl?: string | undefined;
9014
9276
  agentType?: string | undefined;
@@ -9018,6 +9280,7 @@ declare const baseTaskSchema: z.ZodObject<{
9018
9280
  api_key?: string | undefined;
9019
9281
  maxTurns?: number | undefined;
9020
9282
  environmentVariables?: Record<string, string> | undefined;
9283
+ chatAgents?: Record<string, string> | undefined;
9021
9284
  }>;
9022
9285
  declare const createTaskSchema: z.ZodEffects<z.ZodObject<{
9023
9286
  eventId: z.ZodString;
@@ -9042,6 +9305,9 @@ declare const createTaskSchema: z.ZodEffects<z.ZodObject<{
9042
9305
  repositoryId: z.ZodOptional<z.ZodString>;
9043
9306
  repositorySourceType: z.ZodOptional<z.ZodEnum<["temporary", "directory", "git-server"]>>;
9044
9307
  environmentVariables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
9308
+ rootTaskId: z.ZodOptional<z.ZodString>;
9309
+ parentTaskId: z.ZodOptional<z.ZodString>;
9310
+ chatAgents: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
9045
9311
  } & {
9046
9312
  message: z.ZodOptional<z.ZodType<SDKUserMessage, z.ZodTypeDef, SDKUserMessage>>;
9047
9313
  encryptedMessage: z.ZodOptional<z.ZodString>;
@@ -9060,7 +9326,9 @@ declare const createTaskSchema: z.ZodEffects<z.ZodObject<{
9060
9326
  baseBranch?: string | undefined;
9061
9327
  repositorySourceType?: "temporary" | "directory" | "git-server" | undefined;
9062
9328
  dataEncryptionKey?: string | undefined;
9329
+ parentTaskId?: string | undefined;
9063
9330
  userCwd?: string | undefined;
9331
+ rootTaskId?: string | undefined;
9064
9332
  agentDir?: string | undefined;
9065
9333
  gitUrl?: string | undefined;
9066
9334
  model?: string | undefined;
@@ -9069,6 +9337,7 @@ declare const createTaskSchema: z.ZodEffects<z.ZodObject<{
9069
9337
  api_key?: string | undefined;
9070
9338
  maxTurns?: number | undefined;
9071
9339
  environmentVariables?: Record<string, string> | undefined;
9340
+ chatAgents?: Record<string, string> | undefined;
9072
9341
  }, {
9073
9342
  userId: string;
9074
9343
  taskId: string;
@@ -9083,7 +9352,9 @@ declare const createTaskSchema: z.ZodEffects<z.ZodObject<{
9083
9352
  baseBranch?: string | undefined;
9084
9353
  repositorySourceType?: "temporary" | "directory" | "git-server" | undefined;
9085
9354
  dataEncryptionKey?: string | undefined;
9355
+ parentTaskId?: string | undefined;
9086
9356
  userCwd?: string | undefined;
9357
+ rootTaskId?: string | undefined;
9087
9358
  agentDir?: string | undefined;
9088
9359
  gitUrl?: string | undefined;
9089
9360
  agentType?: string | undefined;
@@ -9093,6 +9364,7 @@ declare const createTaskSchema: z.ZodEffects<z.ZodObject<{
9093
9364
  api_key?: string | undefined;
9094
9365
  maxTurns?: number | undefined;
9095
9366
  environmentVariables?: Record<string, string> | undefined;
9367
+ chatAgents?: Record<string, string> | undefined;
9096
9368
  }>, {
9097
9369
  userId: string;
9098
9370
  taskId: string;
@@ -9108,7 +9380,9 @@ declare const createTaskSchema: z.ZodEffects<z.ZodObject<{
9108
9380
  baseBranch?: string | undefined;
9109
9381
  repositorySourceType?: "temporary" | "directory" | "git-server" | undefined;
9110
9382
  dataEncryptionKey?: string | undefined;
9383
+ parentTaskId?: string | undefined;
9111
9384
  userCwd?: string | undefined;
9385
+ rootTaskId?: string | undefined;
9112
9386
  agentDir?: string | undefined;
9113
9387
  gitUrl?: string | undefined;
9114
9388
  model?: string | undefined;
@@ -9117,6 +9391,7 @@ declare const createTaskSchema: z.ZodEffects<z.ZodObject<{
9117
9391
  api_key?: string | undefined;
9118
9392
  maxTurns?: number | undefined;
9119
9393
  environmentVariables?: Record<string, string> | undefined;
9394
+ chatAgents?: Record<string, string> | undefined;
9120
9395
  }, {
9121
9396
  userId: string;
9122
9397
  taskId: string;
@@ -9131,7 +9406,9 @@ declare const createTaskSchema: z.ZodEffects<z.ZodObject<{
9131
9406
  baseBranch?: string | undefined;
9132
9407
  repositorySourceType?: "temporary" | "directory" | "git-server" | undefined;
9133
9408
  dataEncryptionKey?: string | undefined;
9409
+ parentTaskId?: string | undefined;
9134
9410
  userCwd?: string | undefined;
9411
+ rootTaskId?: string | undefined;
9135
9412
  agentDir?: string | undefined;
9136
9413
  gitUrl?: string | undefined;
9137
9414
  agentType?: string | undefined;
@@ -9141,6 +9418,7 @@ declare const createTaskSchema: z.ZodEffects<z.ZodObject<{
9141
9418
  api_key?: string | undefined;
9142
9419
  maxTurns?: number | undefined;
9143
9420
  environmentVariables?: Record<string, string> | undefined;
9421
+ chatAgents?: Record<string, string> | undefined;
9144
9422
  }>;
9145
9423
  type CreateTaskEventData = z.infer<typeof createTaskSchema>;
9146
9424
  declare const resumeTaskSchema: z.ZodObject<{
@@ -9166,6 +9444,9 @@ declare const resumeTaskSchema: z.ZodObject<{
9166
9444
  repositoryId: z.ZodOptional<z.ZodString>;
9167
9445
  repositorySourceType: z.ZodOptional<z.ZodEnum<["temporary", "directory", "git-server"]>>;
9168
9446
  environmentVariables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
9447
+ rootTaskId: z.ZodOptional<z.ZodString>;
9448
+ parentTaskId: z.ZodOptional<z.ZodString>;
9449
+ chatAgents: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
9169
9450
  } & {
9170
9451
  agentSessionId: z.ZodString;
9171
9452
  event: z.ZodOptional<z.ZodString>;
@@ -9188,7 +9469,9 @@ declare const resumeTaskSchema: z.ZodObject<{
9188
9469
  baseBranch?: string | undefined;
9189
9470
  repositorySourceType?: "temporary" | "directory" | "git-server" | undefined;
9190
9471
  dataEncryptionKey?: string | undefined;
9472
+ parentTaskId?: string | undefined;
9191
9473
  userCwd?: string | undefined;
9474
+ rootTaskId?: string | undefined;
9192
9475
  agentDir?: string | undefined;
9193
9476
  gitUrl?: string | undefined;
9194
9477
  model?: string | undefined;
@@ -9197,6 +9480,7 @@ declare const resumeTaskSchema: z.ZodObject<{
9197
9480
  api_key?: string | undefined;
9198
9481
  maxTurns?: number | undefined;
9199
9482
  environmentVariables?: Record<string, string> | undefined;
9483
+ chatAgents?: Record<string, string> | undefined;
9200
9484
  event?: string | undefined;
9201
9485
  eventData?: any;
9202
9486
  }, {
@@ -9214,7 +9498,9 @@ declare const resumeTaskSchema: z.ZodObject<{
9214
9498
  baseBranch?: string | undefined;
9215
9499
  repositorySourceType?: "temporary" | "directory" | "git-server" | undefined;
9216
9500
  dataEncryptionKey?: string | undefined;
9501
+ parentTaskId?: string | undefined;
9217
9502
  userCwd?: string | undefined;
9503
+ rootTaskId?: string | undefined;
9218
9504
  agentDir?: string | undefined;
9219
9505
  gitUrl?: string | undefined;
9220
9506
  agentType?: string | undefined;
@@ -9224,6 +9510,7 @@ declare const resumeTaskSchema: z.ZodObject<{
9224
9510
  api_key?: string | undefined;
9225
9511
  maxTurns?: number | undefined;
9226
9512
  environmentVariables?: Record<string, string> | undefined;
9513
+ chatAgents?: Record<string, string> | undefined;
9227
9514
  event?: string | undefined;
9228
9515
  eventData?: any;
9229
9516
  }>;
@@ -9277,6 +9564,8 @@ declare const TaskMessageSchema: z.ZodEffects<z.ZodObject<{
9277
9564
  sequence: z.ZodOptional<z.ZodNumber>;
9278
9565
  message: z.ZodOptional<z.ZodType<TaskMessagePayload, z.ZodTypeDef, TaskMessagePayload>>;
9279
9566
  encryptedMessage: z.ZodOptional<z.ZodString>;
9567
+ agentId: z.ZodOptional<z.ZodString>;
9568
+ rootTaskId: z.ZodOptional<z.ZodString>;
9280
9569
  }, "strip", z.ZodTypeAny, {
9281
9570
  taskId: string;
9282
9571
  eventId: string;
@@ -9284,6 +9573,8 @@ declare const TaskMessageSchema: z.ZodEffects<z.ZodObject<{
9284
9573
  message?: TaskMessagePayload | undefined;
9285
9574
  chatId?: string | undefined;
9286
9575
  encryptedMessage?: string | undefined;
9576
+ agentId?: string | undefined;
9577
+ rootTaskId?: string | undefined;
9287
9578
  opCode?: string | undefined;
9288
9579
  sequence?: number | undefined;
9289
9580
  }, {
@@ -9293,6 +9584,8 @@ declare const TaskMessageSchema: z.ZodEffects<z.ZodObject<{
9293
9584
  message?: TaskMessagePayload | undefined;
9294
9585
  chatId?: string | undefined;
9295
9586
  encryptedMessage?: string | undefined;
9587
+ agentId?: string | undefined;
9588
+ rootTaskId?: string | undefined;
9296
9589
  opCode?: string | undefined;
9297
9590
  sequence?: number | undefined;
9298
9591
  }>, {
@@ -9302,6 +9595,8 @@ declare const TaskMessageSchema: z.ZodEffects<z.ZodObject<{
9302
9595
  message?: TaskMessagePayload | undefined;
9303
9596
  chatId?: string | undefined;
9304
9597
  encryptedMessage?: string | undefined;
9598
+ agentId?: string | undefined;
9599
+ rootTaskId?: string | undefined;
9305
9600
  opCode?: string | undefined;
9306
9601
  sequence?: number | undefined;
9307
9602
  }, {
@@ -9311,6 +9606,8 @@ declare const TaskMessageSchema: z.ZodEffects<z.ZodObject<{
9311
9606
  message?: TaskMessagePayload | undefined;
9312
9607
  chatId?: string | undefined;
9313
9608
  encryptedMessage?: string | undefined;
9609
+ agentId?: string | undefined;
9610
+ rootTaskId?: string | undefined;
9314
9611
  opCode?: string | undefined;
9315
9612
  sequence?: number | undefined;
9316
9613
  }>;
@@ -9360,18 +9657,18 @@ declare const ShowModalEventDataSchema: z.ZodObject<{
9360
9657
  modalData: z.ZodRecord<z.ZodString, z.ZodAny>;
9361
9658
  }, "strip", z.ZodTypeAny, {
9362
9659
  taskId: string;
9363
- timestamp: string;
9364
- eventId: string;
9365
9660
  modalName: string;
9366
9661
  modalData: Record<string, any>;
9662
+ timestamp: string;
9663
+ eventId: string;
9367
9664
  chatId?: string | undefined;
9368
9665
  sequence?: number | undefined;
9369
9666
  }, {
9370
9667
  taskId: string;
9371
- timestamp: string;
9372
- eventId: string;
9373
9668
  modalName: string;
9374
9669
  modalData: Record<string, any>;
9670
+ timestamp: string;
9671
+ eventId: string;
9375
9672
  chatId?: string | undefined;
9376
9673
  sequence?: number | undefined;
9377
9674
  }>;
@@ -9797,6 +10094,56 @@ declare const MergeRequestEventSchema: z.ZodObject<{
9797
10094
  description?: string | undefined;
9798
10095
  }>;
9799
10096
  type MergeRequestEventData = z.infer<typeof MergeRequestEventSchema>;
10097
+ /**
10098
+ * Task stopped event (Worker -> API)
10099
+ * Sent by CLI hook when a task stops, API decides callbacks based on task config
10100
+ */
10101
+ declare const TaskStoppedEventSchema: z.ZodObject<{
10102
+ eventId: z.ZodString;
10103
+ } & {
10104
+ taskId: z.ZodString;
10105
+ }, "strip", z.ZodTypeAny, {
10106
+ taskId: string;
10107
+ eventId: string;
10108
+ }, {
10109
+ taskId: string;
10110
+ eventId: string;
10111
+ }>;
10112
+ type TaskStoppedEventData = z.infer<typeof TaskStoppedEventSchema>;
10113
+ /**
10114
+ * Sub task completed event (API -> parentTask's Worker)
10115
+ * Sent when a sub task completes and has 'notify_parent' callback registered
10116
+ */
10117
+ declare const SubTaskCompletedEventSchema: z.ZodObject<{
10118
+ eventId: z.ZodString;
10119
+ } & {
10120
+ taskId: z.ZodString;
10121
+ parentTaskId: z.ZodString;
10122
+ rootTaskId: z.ZodString;
10123
+ agentName: z.ZodString;
10124
+ taskName: z.ZodOptional<z.ZodString>;
10125
+ sessionPath: z.ZodOptional<z.ZodString>;
10126
+ cwd: z.ZodOptional<z.ZodString>;
10127
+ }, "strip", z.ZodTypeAny, {
10128
+ taskId: string;
10129
+ parentTaskId: string;
10130
+ rootTaskId: string;
10131
+ eventId: string;
10132
+ agentName: string;
10133
+ cwd?: string | undefined;
10134
+ sessionPath?: string | undefined;
10135
+ taskName?: string | undefined;
10136
+ }, {
10137
+ taskId: string;
10138
+ parentTaskId: string;
10139
+ rootTaskId: string;
10140
+ eventId: string;
10141
+ agentName: string;
10142
+ cwd?: string | undefined;
10143
+ sessionPath?: string | undefined;
10144
+ taskName?: string | undefined;
10145
+ }>;
10146
+ type SubTaskCompletedEventData = z.infer<typeof SubTaskCompletedEventSchema>;
9800
10147
  declare const MergePullRequestEventSchema: z.ZodObject<{
9801
10148
  eventId: z.ZodString;
9802
10149
  } & {
@@ -9821,6 +10168,115 @@ interface MergePullRequestAck {
9821
10168
  error?: string;
9822
10169
  errorType?: 'github_conflict' | 'pr_not_open' | 'permission_denied' | 'merge_failed' | 'unknown';
9823
10170
  }
10171
+ /**
10172
+ * Deploy agent event (API → CLI)
10173
+ * Triggers agent deployment from draft to production
10174
+ */
10175
+ declare const DeployAgentEventSchema: z.ZodEffects<z.ZodObject<{
10176
+ eventId: z.ZodString;
10177
+ } & {
10178
+ taskId: z.ZodString;
10179
+ draftAgentId: z.ZodString;
10180
+ userId: z.ZodString;
10181
+ machineId: z.ZodOptional<z.ZodString>;
10182
+ cloudId: z.ZodOptional<z.ZodString>;
10183
+ sourcePath: z.ZodString;
10184
+ targetAgentId: z.ZodString;
10185
+ name: z.ZodOptional<z.ZodString>;
10186
+ avatar: z.ZodOptional<z.ZodString>;
10187
+ isSystemAgent: z.ZodOptional<z.ZodBoolean>;
10188
+ supportLocal: z.ZodOptional<z.ZodBoolean>;
10189
+ }, "strip", z.ZodTypeAny, {
10190
+ userId: string;
10191
+ taskId: string;
10192
+ draftAgentId: string;
10193
+ eventId: string;
10194
+ sourcePath: string;
10195
+ targetAgentId: string;
10196
+ avatar?: string | undefined;
10197
+ machineId?: string | undefined;
10198
+ cloudId?: string | undefined;
10199
+ name?: string | undefined;
10200
+ supportLocal?: boolean | undefined;
10201
+ isSystemAgent?: boolean | undefined;
10202
+ }, {
10203
+ userId: string;
10204
+ taskId: string;
10205
+ draftAgentId: string;
10206
+ eventId: string;
10207
+ sourcePath: string;
10208
+ targetAgentId: string;
10209
+ avatar?: string | undefined;
10210
+ machineId?: string | undefined;
10211
+ cloudId?: string | undefined;
10212
+ name?: string | undefined;
10213
+ supportLocal?: boolean | undefined;
10214
+ isSystemAgent?: boolean | undefined;
10215
+ }>, {
10216
+ userId: string;
10217
+ taskId: string;
10218
+ draftAgentId: string;
10219
+ eventId: string;
10220
+ sourcePath: string;
10221
+ targetAgentId: string;
10222
+ avatar?: string | undefined;
10223
+ machineId?: string | undefined;
10224
+ cloudId?: string | undefined;
10225
+ name?: string | undefined;
10226
+ supportLocal?: boolean | undefined;
10227
+ isSystemAgent?: boolean | undefined;
10228
+ }, {
10229
+ userId: string;
10230
+ taskId: string;
10231
+ draftAgentId: string;
10232
+ eventId: string;
10233
+ sourcePath: string;
10234
+ targetAgentId: string;
10235
+ avatar?: string | undefined;
10236
+ machineId?: string | undefined;
10237
+ cloudId?: string | undefined;
10238
+ name?: string | undefined;
10239
+ supportLocal?: boolean | undefined;
10240
+ isSystemAgent?: boolean | undefined;
10241
+ }>;
10242
+ type DeployAgentEventData = z.infer<typeof DeployAgentEventSchema>;
10243
+ /**
10244
+ * Deploy agent complete event (CLI → API)
10245
+ * Sent when agent deployment completes (success or failure)
10246
+ */
10247
+ declare const DeployAgentCompleteEventSchema: z.ZodObject<{
10248
+ eventId: z.ZodString;
10249
+ } & {
10250
+ taskId: z.ZodString;
10251
+ targetAgentId: z.ZodString;
10252
+ success: z.ZodBoolean;
10253
+ error: z.ZodOptional<z.ZodString>;
10254
+ name: z.ZodOptional<z.ZodString>;
10255
+ avatar: z.ZodOptional<z.ZodString>;
10256
+ isSystemAgent: z.ZodOptional<z.ZodBoolean>;
10257
+ supportLocal: z.ZodOptional<z.ZodBoolean>;
10258
+ }, "strip", z.ZodTypeAny, {
10259
+ success: boolean;
10260
+ taskId: string;
10261
+ eventId: string;
10262
+ targetAgentId: string;
10263
+ error?: string | undefined;
10264
+ avatar?: string | undefined;
10265
+ name?: string | undefined;
10266
+ supportLocal?: boolean | undefined;
10267
+ isSystemAgent?: boolean | undefined;
10268
+ }, {
10269
+ success: boolean;
10270
+ taskId: string;
10271
+ eventId: string;
10272
+ targetAgentId: string;
10273
+ error?: string | undefined;
10274
+ avatar?: string | undefined;
10275
+ name?: string | undefined;
10276
+ supportLocal?: boolean | undefined;
10277
+ isSystemAgent?: boolean | undefined;
10278
+ }>;
10279
+ type DeployAgentCompleteEventData = z.infer<typeof DeployAgentCompleteEventSchema>;
9824
10280
  declare const AssociateRepoEventDataSchema: z.ZodObject<{
9825
10281
  eventId: z.ZodString;
9826
10282
  } & {
@@ -9895,6 +10351,7 @@ declare const SystemMessageSchema: z.ZodObject<{
9895
10351
  id: z.ZodString;
9896
10352
  owner: z.ZodString;
9897
10353
  type: z.ZodEnum<["direct", "group"]>;
10354
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
9898
10355
  createdAt: z.ZodString;
9899
10356
  updatedAt: z.ZodString;
9900
10357
  }, "strip", z.ZodTypeAny, {
@@ -9903,12 +10360,14 @@ declare const SystemMessageSchema: z.ZodObject<{
9903
10360
  createdAt: string;
9904
10361
  updatedAt: string;
9905
10362
  owner: string;
10363
+ title?: string | null | undefined;
9906
10364
  }, {
9907
10365
  type: "direct" | "group";
9908
10366
  id: string;
9909
10367
  createdAt: string;
9910
10368
  updatedAt: string;
9911
10369
  owner: string;
10370
+ title?: string | null | undefined;
9912
10371
  }>, z.ZodArray<z.ZodObject<{
9913
10372
  id: z.ZodString;
9914
10373
  chatId: z.ZodString;
@@ -9918,7 +10377,7 @@ declare const SystemMessageSchema: z.ZodObject<{
9918
10377
  createdAt: z.ZodString;
9919
10378
  updatedAt: z.ZodString;
9920
10379
  }, "strip", z.ZodTypeAny, {
9921
- type: "human" | "agent";
10380
+ type: "agent" | "human";
9922
10381
  id: string;
9923
10382
  createdAt: string;
9924
10383
  chatId: string;
@@ -9926,7 +10385,7 @@ declare const SystemMessageSchema: z.ZodObject<{
9926
10385
  memberCode: string;
9927
10386
  role: string;
9928
10387
  }, {
9929
- type: "human" | "agent";
10388
+ type: "agent" | "human";
9930
10389
  id: string;
9931
10390
  createdAt: string;
9932
10391
  chatId: string;
@@ -10252,8 +10711,9 @@ declare const SystemMessageSchema: z.ZodObject<{
10252
10711
  createdAt: string;
10253
10712
  updatedAt: string;
10254
10713
  owner: string;
10714
+ title?: string | null | undefined;
10255
10715
  } | {
10256
- type: "human" | "agent";
10716
+ type: "agent" | "human";
10257
10717
  id: string;
10258
10718
  createdAt: string;
10259
10719
  chatId: string;
@@ -10340,8 +10800,9 @@ declare const SystemMessageSchema: z.ZodObject<{
10340
10800
  createdAt: string;
10341
10801
  updatedAt: string;
10342
10802
  owner: string;
10803
+ title?: string | null | undefined;
10343
10804
  } | {
10344
- type: "human" | "agent";
10805
+ type: "agent" | "human";
10345
10806
  id: string;
10346
10807
  createdAt: string;
10347
10808
  chatId: string;
@@ -10422,7 +10883,7 @@ declare const SystemMessageSchema: z.ZodObject<{
10422
10883
  eventId: string;
10423
10884
  }>;
10424
10885
  type SystemMessageEventData = z.infer<typeof SystemMessageSchema>;
10425
- type EventData = AppAliveEventData | ApiServerAliveEventData | MachineAliveEventData | ShutdownMachineData | WorkerInitializingEventData | WorkerInitializedEventData | WorkerReadyEventData | WorkerAliveEventData | WorkerExitEventData | WorkerRunningEventData | WorkerStatusRequestEventData | CreateTaskEventData | ResumeTaskEventData | CancelTaskEventData | StopTaskEventData | TaskMessageEventData | ChangeTaskTitleEventData | TaskStateChangeEventData | UpdateTaskAgentSessionIdEventData | TaskInfoUpdateEventData | TaskArtifactsUpdatedEventData | MergeRequestEventData | SystemMessageEventData | CreditExhaustedEventData | RtcIceServersRequestEventData | RtcIceServersResponseEventData | MachineRtcRequestEventData | MachineRtcResponseEventData | RtcSignalEventData | WorkspaceFileRequestEventData | WorkspaceFileResponseEventData;
10886
+ type EventData = AppAliveEventData | ApiServerAliveEventData | MachineAliveEventData | ShutdownMachineData | WorkerInitializingEventData | WorkerInitializedEventData | WorkerReadyEventData | WorkerAliveEventData | WorkerExitEventData | WorkerRunningEventData | WorkerStatusRequestEventData | CreateTaskEventData | ResumeTaskEventData | CancelTaskEventData | StopTaskEventData | TaskMessageEventData | ChangeTaskTitleEventData | TaskStateChangeEventData | UpdateTaskAgentSessionIdEventData | TaskInfoUpdateEventData | TaskArtifactsUpdatedEventData | MergeRequestEventData | TaskStoppedEventData | SubTaskCompletedEventData | SystemMessageEventData | CreditExhaustedEventData | RtcIceServersRequestEventData | RtcIceServersResponseEventData | MachineRtcRequestEventData | MachineRtcResponseEventData | RtcSignalEventData | WorkspaceFileRequestEventData | WorkspaceFileResponseEventData;
10426
10887
  type EventMap = {
10427
10888
  "app-alive": AppAliveEventData;
10428
10889
  "api-server-alive": ApiServerAliveEventData;
@@ -10447,6 +10908,10 @@ type EventMap = {
10447
10908
  "show-modal": ShowModalEventData;
10448
10909
  "merge-request": MergeRequestEventData;
10449
10910
  "merge-pr": MergePullRequestEventData;
10911
+ "deploy-agent": DeployAgentEventData;
10912
+ "deploy-agent-complete": DeployAgentCompleteEventData;
10913
+ "task-stopped": TaskStoppedEventData;
10914
+ "sub-task-completed": SubTaskCompletedEventData;
10450
10915
  "associate-repo": AssociateRepoEventData;
10451
10916
  "system-message": SystemMessageEventData;
10452
10917
  "credit-exhausted": CreditExhaustedEventData;
@@ -10485,6 +10950,7 @@ declare function workerAuth(token: string, machineId: string, taskId: string): A
10485
10950
  * Different environments (CLI, API server) implement this interface
10486
10951
  * to provide agent directory resolution
10487
10952
  */
10953
+
10488
10954
  interface AgentContext {
10489
10955
  /**
10490
10956
  * Resolve the full path to an agent directory
@@ -10514,6 +10980,25 @@ interface AgentrixContext {
10514
10980
  * Get the current task ID
10515
10981
  */
10516
10982
  getTaskId(): string;
10983
+ /**
10984
+ * Get the current chat ID
10985
+ */
10986
+ getChatId(): string;
10987
+ /**
10988
+ * Get the root task ID of the current task tree
10989
+ * If this task is the root, returns its own ID
10990
+ */
10991
+ getRootTaskId(): string;
10992
+ /**
10993
+ * Get the parent task ID
10994
+ * Returns null if this is a root task
10995
+ */
10996
+ getParentTaskId(): string | null;
10997
+ /**
10998
+ * Get all agents in the current chat
10999
+ * Returns a map of { displayName: agentId }
11000
+ */
11001
+ getChatAgents(): Record<string, string>;
10517
11002
  /**
10518
11003
  * create a new draft agent or update the existing one in the database
10519
11004
  */
@@ -10535,6 +11020,53 @@ interface AgentrixContext {
10535
11020
  agentId: string;
10536
11021
  displayName: string;
10537
11022
  }>;
11023
+ /**
11024
+ * Create a sub task for multi-agent collaboration
11025
+ * Automatically inherits chatId, rootTaskId, machineId/cloudId from current task
11026
+ * Sets parentTaskId to current taskId
11027
+ */
11028
+ startSubTask(params: {
11029
+ agentId: string;
11030
+ message: SDKUserMessage;
11031
+ }): Promise<{
11032
+ taskId: string;
11033
+ }>;
11034
+ /**
11035
+ * Send a message to a task
11036
+ *
11037
+ * Target behavior:
11038
+ * - 'agent': Routes SDKUserMessage to task's agent worker (injects as user input)
11039
+ * - 'user': Broadcasts SDKAssistantMessage to users viewing the task (shows in chat UI)
11040
+ */
11041
+ sendMessage(params: {
11042
+ taskId: string;
11043
+ message: SDKUserMessage | SDKAssistantMessage;
11044
+ target: SendMessageTarget;
11045
+ }): Promise<void>;
11046
+ /**
11047
+ * Show a modal dialog to users viewing a task
11048
+ * Used for interactive UI elements like configuration dialogs
11049
+ */
11050
+ showModal(params: {
11051
+ taskId: string;
11052
+ modalName: string;
11053
+ modalData: Record<string, any>;
11054
+ }): Promise<void>;
11055
+ /**
11056
+ * Get the session file path and state of a task
11057
+ * Used to read completed task's session for analysis
11058
+ */
11059
+ getTaskSession(taskId: string): Promise<{
11060
+ sessionPath: string;
11061
+ state: TaskState;
11062
+ }>;
11063
+ /**
11064
+ * Find a sub task by agent ID
11065
+ * Searches direct sub tasks (parentTaskId = current taskId) for the given agent
11066
+ */
11067
+ findSubTaskByAgent(agentId: string): Promise<{
11068
+ taskId: string;
11069
+ } | null>;
10538
11070
  }
10539
11071
 
10540
11072
  /**
@@ -10949,5 +11481,5 @@ declare function decodeRtcChunkHeader(data: Uint8Array): RtcChunkHeader;
10949
11481
  declare function buildRtcChunkFrame(header: RtcChunkHeader, payload: Uint8Array): Uint8Array;
10950
11482
  declare function splitRtcChunkFrame(data: Uint8Array): RtcChunkFrame;
10951
11483
 
10952
- export { AddChatMemberRequestSchema, AddChatMemberResponseSchema, AgentConfigValidationError, AgentCustomConfigSchema, AgentError, AgentLoadError, AgentMetadataSchema, AgentNotFoundError, AgentPermissionsSchema, AgentSchema, AgentTypeSchema, ApiErrorSchema, ApiServerAliveEventSchema, AppAliveEventSchema, ApprovalStatusResponseSchema, ApprovePrRequestSchema, ApprovePrResponseSchema, ArchiveTaskRequestSchema, ArchiveTaskResponseSchema, AskUserMessageSchema, AskUserOptionSchema, AskUserQuestionSchema, AskUserResponseMessageSchema, AskUserResponseReasonSchema, AskUserResponseStatusSchema, AssociateRepoEventDataSchema, BillingStatsResponseSchema, BranchSchema, CancelTaskRequestSchema, CancelTaskResponseSchema, ChangeTaskTitleEventSchema, ChargeTransactionSchema, ChatMemberInputSchema, ChatMemberSchema, ChatSchema, ChatTypeSchema, ChatWithMembersSchema, ClaudeConfigSchema, CloudJoinApprovalRequestSchema, CloudJoinRequestSchema, CloudJoinResultQuerySchema, CloudJoinStatusQuerySchema, CloudMachineSchema, CloudSchema, ConfirmUploadRequestSchema, ConfirmUploadResponseSchema, ConsumeTransactionSchema, CreateAgentRequestSchema, CreateAgentResponseSchema, CreateChatRequestSchema, CreateChatResponseSchema, CreateCloudRequestSchema, CreateCloudResponseSchema, CreateDraftAgentRequestSchema, CreateMergeRequestResponseSchema, CreateMergeRequestSchema, CreateOAuthServerRequestSchema, CreateOAuthServerResponseSchema, CreateTaskShareResponseSchema, CreateTaskShareSchema, CreditExhaustedEventSchema, CreditsPackageSchema, DateSchema, DeleteAgentResponseSchema, DeleteOAuthServerResponseSchema, DisplayConfigKeysSchema, DisplayConfigSchema, DraftAgentConfigSchema, DraftAgentSchema, EnvironmentVariableSchema, EventAckSchema, EventSchemaMap, FRAMEWORK_TYPES, FileItemSchema, FileStatsSchema, FileVisibilitySchema, FillEventsRequestSchema, FrameworkNotSupportedError, GetAgentResponseSchema, GetChatResponseSchema, GetEnvironmentVariablesResponseSchema, GetGitServerResponseSchema, GetGitUrlQuerySchema, GetGitUrlResponseSchema, GetInstallUrlResponseSchema, GetOAuthServerResponseSchema, GetRepositoryResponseSchema, GetUploadUrlsRequestSchema, GetUploadUrlsResponseSchema, GetUserAgentsResponseSchema, GitHubIssueListItemSchema, GitHubIssueSchema, GitServerSchema, IdSchema, ListAgentsResponseSchema, ListBranchesResponseSchema, ListChatMembersResponseSchema, ListChatTasksResponseSchema, ListChatsQuerySchema, ListChatsResponseSchema, ListFilesQuerySchema, ListFilesResponseSchema, ListGitServersResponseSchema, ListIssuesQuerySchema, ListIssuesResponseSchema, ListMachinesResponseSchema, ListOAuthServersPublicResponseSchema, ListOAuthServersQuerySchema, ListOAuthServersResponseSchema, ListPackagesQuerySchema, ListPackagesResponseSchema, ListRepositoriesResponseSchema, ListTasksRequestSchema, ListTasksResponseSchema, ListTransactionsQuerySchema, ListTransactionsResponseSchema, LocalMachineSchema, LogoutResponseSchema, MachineAliveEventSchema, MachineApprovalRequestSchema, MachineApprovalStatusQuerySchema, MachineAuthAuthorizedResponseSchema, MachineAuthRequestSchema, MachineAuthResultQuerySchema, MachineRtcRequestSchema, MachineRtcResponseSchema, MergePullRequestEventSchema, MergeRequestEventSchema, MissingAgentFileError, OAuthAccountInfoSchema, OAuthBindCallbackResponseSchema, OAuthBindQuerySchema, OAuthBindResponseSchema, OAuthCallbackQuerySchema, OAuthCallbackResponseSchema, OAuthLoginQuerySchema, OAuthServerPublicSchema, OAuthServerSchema, OAuthUnbindResponseSchema, PaginatedResponseSchema, PermissionResponseRequestSchema, PermissionResponseResponseSchema, ProjectDirectoryResponseSchema, ProjectEntrySchema, QueryEventsRequestSchema, RTC_CHUNK_HEADER_SIZE, RechargeResponseSchema, RemoveChatMemberRequestSchema, RepositorySchema, ResetSecretRequestSchema, ResetSecretResponseSchema, ResumeTaskRequestSchema, ResumeTaskResponseSchema, RpcCallEventSchema, RpcResponseSchema, RtcChunkFlags, RtcIceServerSchema, RtcIceServersRequestSchema, RtcIceServersResponseSchema, RtcSignalSchema, SetEnvironmentVariablesRequestSchema, ShareAuthQuerySchema, ShareAuthResponseSchema, ShowModalEventDataSchema, ShutdownMachineSchema, SignatureAuthRequestSchema, SignatureAuthResponseSchema, SimpleSuccessSchema, StartTaskRequestSchema, StartTaskResponseSchema, StatsQuerySchema, StopTaskRequestSchema, StopTaskResponseSchema, StopTaskSchema, SyncCloudMachineResponseSchema, SyncLocalMachineResponseSchema, SyncMachineRequestSchema, SystemMessageSchema, TaskArtifactsMessageSchema, TaskArtifactsUpdatedEventSchema, TaskInfoUpdateEventDataSchema, TaskItemSchema, TaskMessageSchema, TaskSharePermissionsSchema, TaskStateChangeEventSchema, TaskTransactionsResponseSchema, ToggleOAuthServerRequestSchema, ToggleOAuthServerResponseSchema, TransactionSchema, UnarchiveTaskRequestSchema, UnarchiveTaskResponseSchema, UpdateAgentRequestSchema, UpdateAgentResponseSchema, UpdateOAuthServerRequestSchema, UpdateOAuthServerResponseSchema, UpdateTaskAgentSessionIdEventSchema, UpdateTaskTitleRequestSchema, UpdateTaskTitleResponseSchema, UploadUrlResultSchema, UserBalanceResponseSchema, UserBasicInfoSchema, UserProfileResponseSchema, UserWithOAuthAccountsSchema, WorkerAliveEventSchema, WorkerExitSchema, WorkerInitializedSchema, WorkerInitializingSchema, WorkerReadySchema, WorkerRunningSchema, WorkerStatusRequestSchema, WorkspaceFileRequestSchema, WorkspaceFileResponseSchema, assertAgentExists, assertFileExists, baseTaskSchema, buildRtcChunkFrame, cancelTaskRequestSchema, cancelTaskSchema, createEventId, createKeyPair, createKeyPairWithUit8Array, createMergeRequestSchema, createTaskSchema, decodeBase64, decodeRtcChunkHeader, decryptAES, decryptFileContent, decryptMachineEncryptionKey, decryptSdkMessage, decryptWithEphemeralKey, discoverPlugins, encodeBase64, encodeBase64Url, encodeRtcChunkHeader, encryptAES, encryptFileContent, encryptMachineEncryptionKey, encryptSdkMessage, encryptWithEphemeralKey, generateAESKey, generateAESKeyBase64, getAgentContext, getRandomBytes, isAskUserMessage, isAskUserResponseMessage, isSDKMessage, isTaskArtifactsMessage, loadAgentConfig, machineAuth, permissionResponseRequestSchema, replacePromptPlaceholders, resumeTaskRequestSchema, resumeTaskSchema, setAgentContext, splitRtcChunkFrame, startTaskSchema, stopTaskRequestSchema, userAuth, validateAgentDirectory, validateFrameworkDirectory, workerAuth, workerTaskEvents };
10953
- export type { AddChatMemberRequest, AddChatMemberResponse, Agent, AgentConfig, AgentContext, AgentCustomConfig, AgentMetadata, AgentPermissions, AgentType, AgentrixContext, ApiError, ApiServerAliveEventData, AppAliveEventData, ApprovalStatusResponse, ApprovePrRequest, ApprovePrResponse, ArchiveTaskRequest, ArchiveTaskResponse, AskUserMessage, AskUserOption, AskUserQuestion, AskUserResponseMessage, AskUserResponseReason, AskUserResponseStatus, AssociateRepoEventData, AuthPayload, BillingStatsResponse, Branch, CancelTaskEventData, CancelTaskRequest, CancelTaskResponse, ChangeTaskTitleEventData, ChargeTransaction, Chat, ChatMember, ChatMemberInput, ChatType, ChatWithMembers, ClaudeAgentConfig, ClientType, Cloud, CloudJoinApprovalRequest, CloudJoinRequest, CloudJoinResultQuery, CloudJoinStatusQuery, CloudMachine, ConfirmUploadRequest, ConfirmUploadResponse, ConsumeTransaction, CreateAgentRequest, CreateAgentResponse, CreateChatRequest, CreateChatResponse, CreateCloudRequest, CreateCloudResponse, CreateDraftAgentRequest, CreateMergeRequestRequest, CreateMergeRequestResponse, CreateOAuthServerRequest, CreateOAuthServerResponse, CreateTaskEventData, CreateTaskShareRequest, CreateTaskShareResponse, CreditExhaustedEventData, CreditsPackage, DeleteAgentResponse, DeleteOAuthServerResponse, DisplayConfig, DisplayConfigKeys, DraftAgent, DraftAgentConfig, EnvironmentVariable, EventAckData, EventData, EventMap, EventName, FileItem, FileStats, FileVisibility, FillEventsRequest, FillEventsResponse, FrameworkType, GetAgentResponse, GetChatResponse, GetEnvironmentVariablesResponse, GetGitServerResponse, GetGitUrlQuery, GetGitUrlResponse, GetInstallUrlResponse, GetOAuthServerResponse, GetRepositoryResponse, GetUploadUrlsRequest, GetUploadUrlsResponse, GetUserAgentsResponse, GitHubIssue, GitHubIssueListItem, GitServer, HookFactory, ListAgentsResponse, ListBranchesResponse, ListChatMembersResponse, ListChatTasksResponse, ListChatsQuery, ListChatsResponse, ListFilesQuery, ListFilesResponse, ListGitServersResponse, ListIssuesQuery, ListIssuesResponse, ListMachinesResponse, ListOAuthServersPublicResponse, ListOAuthServersQuery, ListOAuthServersResponse, ListPackagesQuery, ListPackagesResponse, ListRepositoriesResponse, ListTasksRequest, ListTasksResponse, ListTransactionsQuery, ListTransactionsResponse, LoadAgentOptions, LocalMachine, LogoutResponse, MachineAliveEventData, MachineApprovalRequest, MachineApprovalStatusQuery, MachineAuthAuthorizedResponse, MachineAuthRequest, MachineAuthResultQuery, MachineEncryptionKey, MachineRtcRequestEventData, MachineRtcResponseEventData, MergePullRequestAck, MergePullRequestEventData, MergeRequestEventData, OAuthAccountInfo, OAuthBindCallbackResponse, OAuthBindQuery, OAuthBindResponse, OAuthCallbackQuery, OAuthCallbackResponse, OAuthLoginQuery, OAuthServer, OAuthServerPublic, OAuthUnbindResponse, PermissionResponseRequest, PermissionResponseResponse, PrStateChangedData, ProjectDirectoryResponse, ProjectEntry, QueryEventsRequest, QueryEventsResponse, RechargeResponse, RemoveChatMemberRequest, Repository, RepositoryInitHookInput, ResetSecretRequest, ResetSecretResponse, ResumeTaskEventData, ResumeTaskRequest, ResumeTaskResponse, RpcCallEventData, RpcResponseData, RtcChunkFrame, RtcChunkHeader, RtcControlChannel, RtcControlMessage, RtcIceServer, RtcIceServersRequestEventData, RtcIceServersResponseEventData, RtcSignalEventData, SetEnvironmentVariablesRequest, ShareAuthQuery, ShareAuthResponse, ShowModalEventData, ShutdownMachineData, SignatureAuthRequest, SignatureAuthResponse, SimpleSuccess, StartTaskRequest, StartTaskResponse, StatsQuery, StopTaskEventData, StopTaskRequest, StopTaskResponse, SyncCloudMachineResponse, SyncLocalMachineResponse, SyncMachineRequest, SystemMessageEventData, SystemMessageType, TaskArtifactsMessage, TaskArtifactsUpdatedEventData, TaskEvent, TaskInfoUpdateEventData, TaskItem, TaskMessageEventData, TaskMessagePayload, TaskSharePermissions, TaskState, TaskStateChangeEventData, TaskTransactionsResponse, ToggleOAuthServerRequest, ToggleOAuthServerResponse, Transaction, UnarchiveTaskRequest, UnarchiveTaskResponse, UpdateAgentRequest, UpdateAgentResponse, UpdateOAuthServerRequest, UpdateOAuthServerResponse, UpdateTaskAgentSessionIdEventData, UpdateTaskTitleRequest, UpdateTaskTitleResponse, UploadUrlResult, UserBalanceResponse, UserBasicInfo, UserProfileResponse, UserWithOAuthAccounts, ValidationResult, WorkerAliveEventData, WorkerExitEventData, WorkerInitializedEventData, WorkerInitializingEventData, WorkerReadyEventData, WorkerRunningEventData, WorkerStatusRequestEventData, WorkerTaskEvent, WorkspaceFileRequestEventData, WorkspaceFileResponseEventData };
11484
+ export { AddChatMemberRequestSchema, AddChatMemberResponseSchema, AgentConfigValidationError, AgentCustomConfigSchema, AgentError, AgentLoadError, AgentMetadataSchema, AgentNotFoundError, AgentPermissionsSchema, AgentSchema, AgentTypeSchema, ApiErrorSchema, ApiServerAliveEventSchema, AppAliveEventSchema, ApprovalStatusResponseSchema, ApprovePrRequestSchema, ApprovePrResponseSchema, ArchiveTaskRequestSchema, ArchiveTaskResponseSchema, AskUserMessageSchema, AskUserOptionSchema, AskUserQuestionSchema, AskUserResponseMessageSchema, AskUserResponseReasonSchema, AskUserResponseStatusSchema, AssociateRepoEventDataSchema, BillingStatsResponseSchema, BranchSchema, CancelTaskRequestSchema, CancelTaskResponseSchema, ChangeTaskTitleEventSchema, ChargeTransactionSchema, ChatMemberInputSchema, ChatMemberSchema, ChatSchema, ChatTypeSchema, ChatWithMembersSchema, ClaudeConfigSchema, CloudJoinApprovalRequestSchema, CloudJoinRequestSchema, CloudJoinResultQuerySchema, CloudJoinStatusQuerySchema, CloudMachineSchema, CloudSchema, ConfirmUploadRequestSchema, ConfirmUploadResponseSchema, ConsumeTransactionSchema, CreateAgentRequestSchema, CreateAgentResponseSchema, CreateChatRequestSchema, CreateChatResponseSchema, CreateCloudRequestSchema, CreateCloudResponseSchema, CreateDraftAgentRequestSchema, CreateMergeRequestResponseSchema, CreateMergeRequestSchema, CreateOAuthServerRequestSchema, CreateOAuthServerResponseSchema, CreateTaskShareResponseSchema, CreateTaskShareSchema, CreditExhaustedEventSchema, CreditsPackageSchema, DateSchema, DeleteAgentResponseSchema, DeleteOAuthServerResponseSchema, DeployAgentCompleteEventSchema, DeployAgentEventSchema, DisplayConfigKeysSchema, DisplayConfigSchema, DraftAgentConfigSchema, DraftAgentSchema, EnvironmentVariableSchema, EventAckSchema, EventSchemaMap, FRAMEWORK_TYPES, FileItemSchema, FileStatsSchema, FileVisibilitySchema, FillEventsRequestSchema, FindTaskByAgentRequestSchema, FindTaskByAgentResponseSchema, FrameworkNotSupportedError, GetAgentResponseSchema, GetChatResponseSchema, GetEnvironmentVariablesResponseSchema, GetGitServerResponseSchema, GetGitUrlQuerySchema, GetGitUrlResponseSchema, GetInstallUrlResponseSchema, GetOAuthServerResponseSchema, GetRepositoryResponseSchema, GetTaskSessionResponseSchema, GetUploadUrlsRequestSchema, GetUploadUrlsResponseSchema, GetUserAgentsResponseSchema, GitHubIssueListItemSchema, GitHubIssueSchema, GitServerSchema, IdSchema, ListAgentsResponseSchema, ListBranchesResponseSchema, ListChatMembersResponseSchema, ListChatTasksResponseSchema, ListChatsQuerySchema, ListChatsResponseSchema, ListFilesQuerySchema, ListFilesResponseSchema, ListGitServersResponseSchema, ListIssuesQuerySchema, ListIssuesResponseSchema, ListMachinesResponseSchema, ListOAuthServersPublicResponseSchema, ListOAuthServersQuerySchema, ListOAuthServersResponseSchema, ListPackagesQuerySchema, ListPackagesResponseSchema, ListRepositoriesResponseSchema, ListTasksRequestSchema, ListTasksResponseSchema, ListTransactionsQuerySchema, ListTransactionsResponseSchema, LocalMachineSchema, LogoutResponseSchema, MachineAliveEventSchema, MachineApprovalRequestSchema, MachineApprovalStatusQuerySchema, MachineAuthAuthorizedResponseSchema, MachineAuthRequestSchema, MachineAuthResultQuerySchema, MachineRtcRequestSchema, MachineRtcResponseSchema, MergePullRequestEventSchema, MergeRequestEventSchema, MissingAgentFileError, OAuthAccountInfoSchema, OAuthBindCallbackResponseSchema, OAuthBindQuerySchema, OAuthBindResponseSchema, OAuthCallbackQuerySchema, OAuthCallbackResponseSchema, OAuthLoginQuerySchema, OAuthServerPublicSchema, OAuthServerSchema, OAuthUnbindResponseSchema, PaginatedResponseSchema, PermissionResponseRequestSchema, PermissionResponseResponseSchema, ProjectDirectoryResponseSchema, ProjectEntrySchema, PublishDraftAgentRequestSchema, PublishDraftAgentResponseSchema, QueryEventsRequestSchema, RTC_CHUNK_HEADER_SIZE, RechargeResponseSchema, RemoveChatMemberRequestSchema, RepositorySchema, ResetSecretRequestSchema, ResetSecretResponseSchema, ResumeTaskRequestSchema, ResumeTaskResponseSchema, RpcCallEventSchema, RpcResponseSchema, RtcChunkFlags, RtcIceServerSchema, RtcIceServersRequestSchema, RtcIceServersResponseSchema, RtcSignalSchema, SendTaskMessageRequestSchema, SendTaskMessageResponseSchema, SetEnvironmentVariablesRequestSchema, ShareAuthQuerySchema, ShareAuthResponseSchema, ShowModalEventDataSchema, ShowModalRequestSchema, ShowModalResponseSchema, ShutdownMachineSchema, SignatureAuthRequestSchema, SignatureAuthResponseSchema, SimpleSuccessSchema, StartTaskRequestSchema, StartTaskResponseSchema, StatsQuerySchema, StopTaskRequestSchema, StopTaskResponseSchema, StopTaskSchema, SubTaskCompletedEventSchema, SyncCloudMachineResponseSchema, SyncLocalMachineResponseSchema, SyncMachineRequestSchema, SystemMessageSchema, TaskArtifactsMessageSchema, TaskArtifactsUpdatedEventSchema, TaskInfoUpdateEventDataSchema, TaskItemSchema, TaskMessageSchema, TaskSharePermissionsSchema, TaskStateChangeEventSchema, TaskStoppedEventSchema, TaskTransactionsResponseSchema, ToggleOAuthServerRequestSchema, ToggleOAuthServerResponseSchema, TransactionSchema, UnarchiveTaskRequestSchema, UnarchiveTaskResponseSchema, UpdateAgentRequestSchema, UpdateAgentResponseSchema, UpdateOAuthServerRequestSchema, UpdateOAuthServerResponseSchema, UpdateTaskAgentSessionIdEventSchema, UpdateTaskTitleRequestSchema, UpdateTaskTitleResponseSchema, UploadUrlResultSchema, UserBalanceResponseSchema, UserBasicInfoSchema, UserProfileResponseSchema, UserWithOAuthAccountsSchema, WorkerAliveEventSchema, WorkerExitSchema, WorkerInitializedSchema, WorkerInitializingSchema, WorkerReadySchema, WorkerRunningSchema, WorkerStatusRequestSchema, WorkspaceFileRequestSchema, WorkspaceFileResponseSchema, assertAgentExists, assertFileExists, baseTaskSchema, buildRtcChunkFrame, cancelTaskRequestSchema, cancelTaskSchema, createEventId, createKeyPair, createKeyPairWithUit8Array, createMergeRequestSchema, createTaskSchema, decodeBase64, decodeRtcChunkHeader, decryptAES, decryptFileContent, decryptMachineEncryptionKey, decryptSdkMessage, decryptWithEphemeralKey, discoverPlugins, encodeBase64, encodeBase64Url, encodeRtcChunkHeader, encryptAES, encryptFileContent, encryptMachineEncryptionKey, encryptSdkMessage, encryptWithEphemeralKey, generateAESKey, generateAESKeyBase64, getAgentContext, getRandomBytes, isAskUserMessage, isAskUserResponseMessage, isSDKMessage, isTaskArtifactsMessage, loadAgentConfig, machineAuth, permissionResponseRequestSchema, replacePromptPlaceholders, resumeTaskRequestSchema, resumeTaskSchema, setAgentContext, splitRtcChunkFrame, startTaskSchema, stopTaskRequestSchema, userAuth, validateAgentDirectory, validateFrameworkDirectory, workerAuth, workerTaskEvents };
11485
+ export type { AddChatMemberRequest, AddChatMemberResponse, Agent, AgentConfig, AgentContext, AgentCustomConfig, AgentMetadata, AgentPermissions, AgentType, AgentrixContext, ApiError, ApiServerAliveEventData, AppAliveEventData, ApprovalStatusResponse, ApprovePrRequest, ApprovePrResponse, ArchiveTaskRequest, ArchiveTaskResponse, AskUserMessage, AskUserOption, AskUserQuestion, AskUserResponseMessage, AskUserResponseReason, AskUserResponseStatus, AssociateRepoEventData, AuthPayload, BillingStatsResponse, Branch, CancelTaskEventData, CancelTaskRequest, CancelTaskResponse, ChangeTaskTitleEventData, ChargeTransaction, Chat, ChatMember, ChatMemberInput, ChatType, ChatWithMembers, ClaudeAgentConfig, ClientType, Cloud, CloudJoinApprovalRequest, CloudJoinRequest, CloudJoinResultQuery, CloudJoinStatusQuery, CloudMachine, ConfirmUploadRequest, ConfirmUploadResponse, ConsumeTransaction, CreateAgentRequest, CreateAgentResponse, CreateChatRequest, CreateChatResponse, CreateCloudRequest, CreateCloudResponse, CreateDraftAgentRequest, CreateMergeRequestRequest, CreateMergeRequestResponse, CreateOAuthServerRequest, CreateOAuthServerResponse, CreateTaskEventData, CreateTaskShareRequest, CreateTaskShareResponse, CreditExhaustedEventData, CreditsPackage, DeleteAgentResponse, DeleteOAuthServerResponse, DeployAgentCompleteEventData, DeployAgentEventData, DisplayConfig, DisplayConfigKeys, DraftAgent, DraftAgentConfig, EnvironmentVariable, EventAckData, EventData, EventMap, EventName, FileItem, FileStats, FileVisibility, FillEventsRequest, FillEventsResponse, FindTaskByAgentRequest, FindTaskByAgentResponse, FrameworkType, GetAgentResponse, GetChatResponse, GetEnvironmentVariablesResponse, GetGitServerResponse, GetGitUrlQuery, GetGitUrlResponse, GetInstallUrlResponse, GetOAuthServerResponse, GetRepositoryResponse, GetTaskSessionResponse, GetUploadUrlsRequest, GetUploadUrlsResponse, GetUserAgentsResponse, GitHubIssue, GitHubIssueListItem, GitServer, HookFactory, ListAgentsResponse, ListBranchesResponse, ListChatMembersResponse, ListChatTasksResponse, ListChatsQuery, ListChatsResponse, ListFilesQuery, ListFilesResponse, ListGitServersResponse, ListIssuesQuery, ListIssuesResponse, ListMachinesResponse, ListOAuthServersPublicResponse, ListOAuthServersQuery, ListOAuthServersResponse, ListPackagesQuery, ListPackagesResponse, ListRepositoriesResponse, ListTasksRequest, ListTasksResponse, ListTransactionsQuery, ListTransactionsResponse, LoadAgentOptions, LocalMachine, LogoutResponse, MachineAliveEventData, MachineApprovalRequest, MachineApprovalStatusQuery, MachineAuthAuthorizedResponse, MachineAuthRequest, MachineAuthResultQuery, MachineEncryptionKey, MachineRtcRequestEventData, MachineRtcResponseEventData, MergePullRequestAck, MergePullRequestEventData, MergeRequestEventData, OAuthAccountInfo, OAuthBindCallbackResponse, OAuthBindQuery, OAuthBindResponse, OAuthCallbackQuery, OAuthCallbackResponse, OAuthLoginQuery, OAuthServer, OAuthServerPublic, OAuthUnbindResponse, PermissionResponseRequest, PermissionResponseResponse, PrStateChangedData, ProjectDirectoryResponse, ProjectEntry, PublishDraftAgentRequest, PublishDraftAgentResponse, QueryEventsRequest, QueryEventsResponse, RechargeResponse, RemoveChatMemberRequest, Repository, RepositoryInitHookInput, ResetSecretRequest, ResetSecretResponse, ResumeTaskEventData, ResumeTaskRequest, ResumeTaskResponse, RpcCallEventData, RpcResponseData, RtcChunkFrame, RtcChunkHeader, RtcControlChannel, RtcControlMessage, RtcIceServer, RtcIceServersRequestEventData, RtcIceServersResponseEventData, RtcSignalEventData, SendMessageTarget, SendTaskMessageRequest, SendTaskMessageResponse, SetEnvironmentVariablesRequest, ShareAuthQuery, ShareAuthResponse, ShowModalEventData, ShowModalRequest, ShowModalResponse, ShutdownMachineData, SignatureAuthRequest, SignatureAuthResponse, SimpleSuccess, StartTaskRequest, StartTaskResponse, StatsQuery, StopTaskEventData, StopTaskRequest, StopTaskResponse, SubTaskCompletedEventData, SyncCloudMachineResponse, SyncLocalMachineResponse, SyncMachineRequest, SystemMessageEventData, SystemMessageType, TaskArtifactsMessage, TaskArtifactsUpdatedEventData, TaskEvent, TaskInfoUpdateEventData, TaskItem, TaskMessageEventData, TaskMessagePayload, TaskSharePermissions, TaskState, TaskStateChangeEventData, TaskStoppedEventData, TaskTransactionsResponse, ToggleOAuthServerRequest, ToggleOAuthServerResponse, Transaction, UnarchiveTaskRequest, UnarchiveTaskResponse, UpdateAgentRequest, UpdateAgentResponse, UpdateOAuthServerRequest, UpdateOAuthServerResponse, UpdateTaskAgentSessionIdEventData, UpdateTaskTitleRequest, UpdateTaskTitleResponse, UploadUrlResult, UserBalanceResponse, UserBasicInfo, UserProfileResponse, UserWithOAuthAccounts, ValidationResult, WorkerAliveEventData, WorkerExitEventData, WorkerInitializedEventData, WorkerInitializingEventData, WorkerReadyEventData, WorkerRunningEventData, WorkerStatusRequestEventData, WorkerTaskEvent, WorkspaceFileRequestEventData, WorkspaceFileResponseEventData };