happy-imou-cloud 2.1.41 → 2.1.43
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/{BaseReasoningProcessor-Dica2zdX.mjs → BaseReasoningProcessor-CWCPAVJ3.mjs} +4 -2
- package/dist/{BaseReasoningProcessor-DAPsauUX.cjs → BaseReasoningProcessor-D6itItnT.cjs} +4 -2
- package/dist/{ProviderSelectionHandler-4nuTd8AP.cjs → ProviderSelectionHandler-CXwqOJpC.cjs} +2 -2
- package/dist/{ProviderSelectionHandler-CmeZ92yO.mjs → ProviderSelectionHandler-CYUH1U8F.mjs} +2 -2
- package/dist/{api-CwNEbJBM.mjs → api-B89O-SC-.mjs} +398 -43
- package/dist/{api-C_Tnx4UG.cjs → api-zMic8QXq.cjs} +399 -42
- package/dist/{command-D0FxDynx.mjs → command-W01qXC9C.mjs} +2 -2
- package/dist/{command-C3RwwPVD.cjs → command-_qNFoJ-l.cjs} +2 -2
- package/dist/{index-D5m2Duxd.mjs → index-CiHiCC31.mjs} +31 -16
- package/dist/{index-Dh0qGrEd.cjs → index-DVVbyQGZ.cjs} +34 -19
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/lib.cjs +1 -1
- package/dist/lib.d.cts +1041 -214
- package/dist/lib.d.mts +1041 -214
- package/dist/lib.mjs +1 -1
- package/dist/{registerKillSessionHandler-6JloVYkb.mjs → registerKillSessionHandler-BnS3ozFX.mjs} +274 -101
- package/dist/{registerKillSessionHandler-Bkh8uLhC.cjs → registerKillSessionHandler-CDYAY5Ev.cjs} +274 -101
- package/dist/{runClaude-Bng_IsE7.mjs → runClaude-0U7kV07_.mjs} +13 -4
- package/dist/{runClaude-mIFO7YxF.cjs → runClaude-C1xfptKt.cjs} +14 -5
- package/dist/{runCodex-cNuxGshy.cjs → runCodex-BBgKpYLO.cjs} +20 -6
- package/dist/{runCodex-DAc6flez.mjs → runCodex-DnDmHm7E.mjs} +19 -5
- package/dist/{runGemini-DsRFV8WN.cjs → runGemini-CUwQHJ9y.cjs} +21 -5
- package/dist/{runGemini-DdXj8ltI.mjs → runGemini-DcsIBQSc.mjs} +20 -4
- package/package.json +1 -1
package/dist/lib.d.cts
CHANGED
|
@@ -1392,19 +1392,19 @@ declare const UpdateSchema: z.ZodObject<{
|
|
|
1392
1392
|
flavor?: string | null | undefined;
|
|
1393
1393
|
}>>>;
|
|
1394
1394
|
}, "strip", z.ZodTypeAny, {
|
|
1395
|
-
id: string;
|
|
1396
1395
|
t: "new-session";
|
|
1396
|
+
id: string;
|
|
1397
1397
|
seq: number;
|
|
1398
1398
|
metadata: string;
|
|
1399
1399
|
metadataVersion: number;
|
|
1400
1400
|
agentState: string | null;
|
|
1401
1401
|
agentStateVersion: number;
|
|
1402
|
-
createdAt?: number | undefined;
|
|
1403
|
-
updatedAt?: number | undefined;
|
|
1404
1402
|
title?: string | null | undefined;
|
|
1405
1403
|
dataEncryptionKey?: string | null | undefined;
|
|
1406
1404
|
active?: boolean | undefined;
|
|
1407
1405
|
activeAt?: number | undefined;
|
|
1406
|
+
createdAt?: number | undefined;
|
|
1407
|
+
updatedAt?: number | undefined;
|
|
1408
1408
|
sessionIndex?: {
|
|
1409
1409
|
machineId?: string | null | undefined;
|
|
1410
1410
|
hostPid?: number | null | undefined;
|
|
@@ -1413,19 +1413,19 @@ declare const UpdateSchema: z.ZodObject<{
|
|
|
1413
1413
|
flavor?: string | null | undefined;
|
|
1414
1414
|
} | null | undefined;
|
|
1415
1415
|
}, {
|
|
1416
|
-
id: string;
|
|
1417
1416
|
t: "new-session";
|
|
1417
|
+
id: string;
|
|
1418
1418
|
seq: number;
|
|
1419
1419
|
metadata: string;
|
|
1420
1420
|
metadataVersion: number;
|
|
1421
1421
|
agentState: string | null;
|
|
1422
1422
|
agentStateVersion: number;
|
|
1423
|
-
createdAt?: number | undefined;
|
|
1424
|
-
updatedAt?: number | undefined;
|
|
1425
1423
|
title?: string | null | undefined;
|
|
1426
1424
|
dataEncryptionKey?: string | null | undefined;
|
|
1427
1425
|
active?: boolean | undefined;
|
|
1428
1426
|
activeAt?: number | undefined;
|
|
1427
|
+
createdAt?: number | undefined;
|
|
1428
|
+
updatedAt?: number | undefined;
|
|
1429
1429
|
sessionIndex?: {
|
|
1430
1430
|
machineId?: string | null | undefined;
|
|
1431
1431
|
hostPid?: number | null | undefined;
|
|
@@ -1670,22 +1670,22 @@ declare const UpdateSchema: z.ZodObject<{
|
|
|
1670
1670
|
createdAt: z.ZodNumber;
|
|
1671
1671
|
}, "strip", z.ZodTypeAny, {
|
|
1672
1672
|
id: string;
|
|
1673
|
-
createdAt: number;
|
|
1674
1673
|
seq: number;
|
|
1674
|
+
createdAt: number;
|
|
1675
1675
|
body: {
|
|
1676
|
-
id: string;
|
|
1677
1676
|
t: "new-session";
|
|
1677
|
+
id: string;
|
|
1678
1678
|
seq: number;
|
|
1679
1679
|
metadata: string;
|
|
1680
1680
|
metadataVersion: number;
|
|
1681
1681
|
agentState: string | null;
|
|
1682
1682
|
agentStateVersion: number;
|
|
1683
|
-
createdAt?: number | undefined;
|
|
1684
|
-
updatedAt?: number | undefined;
|
|
1685
1683
|
title?: string | null | undefined;
|
|
1686
1684
|
dataEncryptionKey?: string | null | undefined;
|
|
1687
1685
|
active?: boolean | undefined;
|
|
1688
1686
|
activeAt?: number | undefined;
|
|
1687
|
+
createdAt?: number | undefined;
|
|
1688
|
+
updatedAt?: number | undefined;
|
|
1689
1689
|
sessionIndex?: {
|
|
1690
1690
|
machineId?: string | null | undefined;
|
|
1691
1691
|
hostPid?: number | null | undefined;
|
|
@@ -1749,22 +1749,22 @@ declare const UpdateSchema: z.ZodObject<{
|
|
|
1749
1749
|
};
|
|
1750
1750
|
}, {
|
|
1751
1751
|
id: string;
|
|
1752
|
-
createdAt: number;
|
|
1753
1752
|
seq: number;
|
|
1753
|
+
createdAt: number;
|
|
1754
1754
|
body: {
|
|
1755
|
-
id: string;
|
|
1756
1755
|
t: "new-session";
|
|
1756
|
+
id: string;
|
|
1757
1757
|
seq: number;
|
|
1758
1758
|
metadata: string;
|
|
1759
1759
|
metadataVersion: number;
|
|
1760
1760
|
agentState: string | null;
|
|
1761
1761
|
agentStateVersion: number;
|
|
1762
|
-
createdAt?: number | undefined;
|
|
1763
|
-
updatedAt?: number | undefined;
|
|
1764
1762
|
title?: string | null | undefined;
|
|
1765
1763
|
dataEncryptionKey?: string | null | undefined;
|
|
1766
1764
|
active?: boolean | undefined;
|
|
1767
1765
|
activeAt?: number | undefined;
|
|
1766
|
+
createdAt?: number | undefined;
|
|
1767
|
+
updatedAt?: number | undefined;
|
|
1768
1768
|
sessionIndex?: {
|
|
1769
1769
|
machineId?: string | null | undefined;
|
|
1770
1770
|
hostPid?: number | null | undefined;
|
|
@@ -1953,8 +1953,6 @@ declare const ProtocolV3SessionSnapshotResponseSchema: z.ZodObject<{
|
|
|
1953
1953
|
}, "strip", z.ZodTypeAny, {
|
|
1954
1954
|
id: string;
|
|
1955
1955
|
lastChangeSeq: number;
|
|
1956
|
-
createdAt?: number | undefined;
|
|
1957
|
-
updatedAt?: number | undefined;
|
|
1958
1956
|
title?: string | null | undefined;
|
|
1959
1957
|
metadata?: string | undefined;
|
|
1960
1958
|
metadataVersion?: number | undefined;
|
|
@@ -1963,14 +1961,14 @@ declare const ProtocolV3SessionSnapshotResponseSchema: z.ZodObject<{
|
|
|
1963
1961
|
dataEncryptionKey?: string | null | undefined;
|
|
1964
1962
|
active?: boolean | undefined;
|
|
1965
1963
|
activeAt?: number | undefined;
|
|
1964
|
+
createdAt?: number | undefined;
|
|
1965
|
+
updatedAt?: number | undefined;
|
|
1966
1966
|
pendingCount?: number | undefined;
|
|
1967
1967
|
pendingVersion?: number | undefined;
|
|
1968
1968
|
deleted?: boolean | undefined;
|
|
1969
1969
|
}, {
|
|
1970
1970
|
id: string;
|
|
1971
1971
|
lastChangeSeq: number;
|
|
1972
|
-
createdAt?: number | undefined;
|
|
1973
|
-
updatedAt?: number | undefined;
|
|
1974
1972
|
title?: string | null | undefined;
|
|
1975
1973
|
metadata?: string | undefined;
|
|
1976
1974
|
metadataVersion?: number | undefined;
|
|
@@ -1979,6 +1977,8 @@ declare const ProtocolV3SessionSnapshotResponseSchema: z.ZodObject<{
|
|
|
1979
1977
|
dataEncryptionKey?: string | null | undefined;
|
|
1980
1978
|
active?: boolean | undefined;
|
|
1981
1979
|
activeAt?: number | undefined;
|
|
1980
|
+
createdAt?: number | undefined;
|
|
1981
|
+
updatedAt?: number | undefined;
|
|
1982
1982
|
pendingCount?: number | undefined;
|
|
1983
1983
|
pendingVersion?: number | undefined;
|
|
1984
1984
|
deleted?: boolean | undefined;
|
|
@@ -2018,9 +2018,9 @@ declare const ProtocolV3SessionSnapshotResponseSchema: z.ZodObject<{
|
|
|
2018
2018
|
p: string;
|
|
2019
2019
|
};
|
|
2020
2020
|
id: string;
|
|
2021
|
+
seq: number;
|
|
2021
2022
|
createdAt: number;
|
|
2022
2023
|
updatedAt: number;
|
|
2023
|
-
seq: number;
|
|
2024
2024
|
localId: string | null;
|
|
2025
2025
|
}, {
|
|
2026
2026
|
content: {
|
|
@@ -2031,9 +2031,9 @@ declare const ProtocolV3SessionSnapshotResponseSchema: z.ZodObject<{
|
|
|
2031
2031
|
p: string;
|
|
2032
2032
|
};
|
|
2033
2033
|
id: string;
|
|
2034
|
+
seq: number;
|
|
2034
2035
|
createdAt: number;
|
|
2035
2036
|
updatedAt: number;
|
|
2036
|
-
seq: number;
|
|
2037
2037
|
localId: string | null;
|
|
2038
2038
|
}>, "many">;
|
|
2039
2039
|
truncated: z.ZodBoolean;
|
|
@@ -2048,9 +2048,9 @@ declare const ProtocolV3SessionSnapshotResponseSchema: z.ZodObject<{
|
|
|
2048
2048
|
p: string;
|
|
2049
2049
|
};
|
|
2050
2050
|
id: string;
|
|
2051
|
+
seq: number;
|
|
2051
2052
|
createdAt: number;
|
|
2052
2053
|
updatedAt: number;
|
|
2053
|
-
seq: number;
|
|
2054
2054
|
localId: string | null;
|
|
2055
2055
|
}[];
|
|
2056
2056
|
truncated: boolean;
|
|
@@ -2065,9 +2065,9 @@ declare const ProtocolV3SessionSnapshotResponseSchema: z.ZodObject<{
|
|
|
2065
2065
|
p: string;
|
|
2066
2066
|
};
|
|
2067
2067
|
id: string;
|
|
2068
|
+
seq: number;
|
|
2068
2069
|
createdAt: number;
|
|
2069
2070
|
updatedAt: number;
|
|
2070
|
-
seq: number;
|
|
2071
2071
|
localId: string | null;
|
|
2072
2072
|
}[];
|
|
2073
2073
|
truncated: boolean;
|
|
@@ -2086,8 +2086,6 @@ declare const ProtocolV3SessionSnapshotResponseSchema: z.ZodObject<{
|
|
|
2086
2086
|
session: {
|
|
2087
2087
|
id: string;
|
|
2088
2088
|
lastChangeSeq: number;
|
|
2089
|
-
createdAt?: number | undefined;
|
|
2090
|
-
updatedAt?: number | undefined;
|
|
2091
2089
|
title?: string | null | undefined;
|
|
2092
2090
|
metadata?: string | undefined;
|
|
2093
2091
|
metadataVersion?: number | undefined;
|
|
@@ -2096,6 +2094,8 @@ declare const ProtocolV3SessionSnapshotResponseSchema: z.ZodObject<{
|
|
|
2096
2094
|
dataEncryptionKey?: string | null | undefined;
|
|
2097
2095
|
active?: boolean | undefined;
|
|
2098
2096
|
activeAt?: number | undefined;
|
|
2097
|
+
createdAt?: number | undefined;
|
|
2098
|
+
updatedAt?: number | undefined;
|
|
2099
2099
|
pendingCount?: number | undefined;
|
|
2100
2100
|
pendingVersion?: number | undefined;
|
|
2101
2101
|
deleted?: boolean | undefined;
|
|
@@ -2110,9 +2110,9 @@ declare const ProtocolV3SessionSnapshotResponseSchema: z.ZodObject<{
|
|
|
2110
2110
|
p: string;
|
|
2111
2111
|
};
|
|
2112
2112
|
id: string;
|
|
2113
|
+
seq: number;
|
|
2113
2114
|
createdAt: number;
|
|
2114
2115
|
updatedAt: number;
|
|
2115
|
-
seq: number;
|
|
2116
2116
|
localId: string | null;
|
|
2117
2117
|
}[];
|
|
2118
2118
|
truncated: boolean;
|
|
@@ -2131,8 +2131,6 @@ declare const ProtocolV3SessionSnapshotResponseSchema: z.ZodObject<{
|
|
|
2131
2131
|
session: {
|
|
2132
2132
|
id: string;
|
|
2133
2133
|
lastChangeSeq: number;
|
|
2134
|
-
createdAt?: number | undefined;
|
|
2135
|
-
updatedAt?: number | undefined;
|
|
2136
2134
|
title?: string | null | undefined;
|
|
2137
2135
|
metadata?: string | undefined;
|
|
2138
2136
|
metadataVersion?: number | undefined;
|
|
@@ -2141,6 +2139,8 @@ declare const ProtocolV3SessionSnapshotResponseSchema: z.ZodObject<{
|
|
|
2141
2139
|
dataEncryptionKey?: string | null | undefined;
|
|
2142
2140
|
active?: boolean | undefined;
|
|
2143
2141
|
activeAt?: number | undefined;
|
|
2142
|
+
createdAt?: number | undefined;
|
|
2143
|
+
updatedAt?: number | undefined;
|
|
2144
2144
|
pendingCount?: number | undefined;
|
|
2145
2145
|
pendingVersion?: number | undefined;
|
|
2146
2146
|
deleted?: boolean | undefined;
|
|
@@ -2155,9 +2155,9 @@ declare const ProtocolV3SessionSnapshotResponseSchema: z.ZodObject<{
|
|
|
2155
2155
|
p: string;
|
|
2156
2156
|
};
|
|
2157
2157
|
id: string;
|
|
2158
|
+
seq: number;
|
|
2158
2159
|
createdAt: number;
|
|
2159
2160
|
updatedAt: number;
|
|
2160
|
-
seq: number;
|
|
2161
2161
|
localId: string | null;
|
|
2162
2162
|
}[];
|
|
2163
2163
|
truncated: boolean;
|
|
@@ -2273,8 +2273,6 @@ declare const ProtocolV3SessionChangesResponseSchema: z.ZodObject<{
|
|
|
2273
2273
|
}, "strip", z.ZodTypeAny, {
|
|
2274
2274
|
id: string;
|
|
2275
2275
|
lastChangeSeq: number;
|
|
2276
|
-
createdAt?: number | undefined;
|
|
2277
|
-
updatedAt?: number | undefined;
|
|
2278
2276
|
title?: string | null | undefined;
|
|
2279
2277
|
metadata?: string | undefined;
|
|
2280
2278
|
metadataVersion?: number | undefined;
|
|
@@ -2283,14 +2281,14 @@ declare const ProtocolV3SessionChangesResponseSchema: z.ZodObject<{
|
|
|
2283
2281
|
dataEncryptionKey?: string | null | undefined;
|
|
2284
2282
|
active?: boolean | undefined;
|
|
2285
2283
|
activeAt?: number | undefined;
|
|
2284
|
+
createdAt?: number | undefined;
|
|
2285
|
+
updatedAt?: number | undefined;
|
|
2286
2286
|
pendingCount?: number | undefined;
|
|
2287
2287
|
pendingVersion?: number | undefined;
|
|
2288
2288
|
deleted?: boolean | undefined;
|
|
2289
2289
|
}, {
|
|
2290
2290
|
id: string;
|
|
2291
2291
|
lastChangeSeq: number;
|
|
2292
|
-
createdAt?: number | undefined;
|
|
2293
|
-
updatedAt?: number | undefined;
|
|
2294
2292
|
title?: string | null | undefined;
|
|
2295
2293
|
metadata?: string | undefined;
|
|
2296
2294
|
metadataVersion?: number | undefined;
|
|
@@ -2299,6 +2297,8 @@ declare const ProtocolV3SessionChangesResponseSchema: z.ZodObject<{
|
|
|
2299
2297
|
dataEncryptionKey?: string | null | undefined;
|
|
2300
2298
|
active?: boolean | undefined;
|
|
2301
2299
|
activeAt?: number | undefined;
|
|
2300
|
+
createdAt?: number | undefined;
|
|
2301
|
+
updatedAt?: number | undefined;
|
|
2302
2302
|
pendingCount?: number | undefined;
|
|
2303
2303
|
pendingVersion?: number | undefined;
|
|
2304
2304
|
deleted?: boolean | undefined;
|
|
@@ -2345,8 +2345,6 @@ declare const ProtocolV3SessionChangesResponseSchema: z.ZodObject<{
|
|
|
2345
2345
|
session: {
|
|
2346
2346
|
id: string;
|
|
2347
2347
|
lastChangeSeq: number;
|
|
2348
|
-
createdAt?: number | undefined;
|
|
2349
|
-
updatedAt?: number | undefined;
|
|
2350
2348
|
title?: string | null | undefined;
|
|
2351
2349
|
metadata?: string | undefined;
|
|
2352
2350
|
metadataVersion?: number | undefined;
|
|
@@ -2355,6 +2353,8 @@ declare const ProtocolV3SessionChangesResponseSchema: z.ZodObject<{
|
|
|
2355
2353
|
dataEncryptionKey?: string | null | undefined;
|
|
2356
2354
|
active?: boolean | undefined;
|
|
2357
2355
|
activeAt?: number | undefined;
|
|
2356
|
+
createdAt?: number | undefined;
|
|
2357
|
+
updatedAt?: number | undefined;
|
|
2358
2358
|
pendingCount?: number | undefined;
|
|
2359
2359
|
pendingVersion?: number | undefined;
|
|
2360
2360
|
deleted?: boolean | undefined;
|
|
@@ -2383,8 +2383,6 @@ declare const ProtocolV3SessionChangesResponseSchema: z.ZodObject<{
|
|
|
2383
2383
|
session: {
|
|
2384
2384
|
id: string;
|
|
2385
2385
|
lastChangeSeq: number;
|
|
2386
|
-
createdAt?: number | undefined;
|
|
2387
|
-
updatedAt?: number | undefined;
|
|
2388
2386
|
title?: string | null | undefined;
|
|
2389
2387
|
metadata?: string | undefined;
|
|
2390
2388
|
metadataVersion?: number | undefined;
|
|
@@ -2393,6 +2391,8 @@ declare const ProtocolV3SessionChangesResponseSchema: z.ZodObject<{
|
|
|
2393
2391
|
dataEncryptionKey?: string | null | undefined;
|
|
2394
2392
|
active?: boolean | undefined;
|
|
2395
2393
|
activeAt?: number | undefined;
|
|
2394
|
+
createdAt?: number | undefined;
|
|
2395
|
+
updatedAt?: number | undefined;
|
|
2396
2396
|
pendingCount?: number | undefined;
|
|
2397
2397
|
pendingVersion?: number | undefined;
|
|
2398
2398
|
deleted?: boolean | undefined;
|
|
@@ -2790,185 +2790,995 @@ declare const UserMessageSchema: z.ZodObject<{
|
|
|
2790
2790
|
} | undefined;
|
|
2791
2791
|
}>;
|
|
2792
2792
|
type UserMessage = z.infer<typeof UserMessageSchema>;
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2793
|
+
declare const MessageContentSchema: z.ZodUnion<[z.ZodObject<{
|
|
2794
|
+
role: z.ZodLiteral<"user">;
|
|
2795
|
+
content: z.ZodObject<{
|
|
2796
|
+
type: z.ZodLiteral<"text">;
|
|
2797
|
+
text: z.ZodString;
|
|
2798
|
+
}, "strip", z.ZodTypeAny, {
|
|
2799
|
+
type: "text";
|
|
2800
2800
|
text: string;
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
}
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2801
|
+
}, {
|
|
2802
|
+
type: "text";
|
|
2803
|
+
text: string;
|
|
2804
|
+
}>;
|
|
2805
|
+
localKey: z.ZodOptional<z.ZodString>;
|
|
2806
|
+
meta: z.ZodOptional<z.ZodObject<{
|
|
2807
|
+
sentFrom: z.ZodOptional<z.ZodString>;
|
|
2808
|
+
permissionMode: z.ZodOptional<z.ZodEnum<["default", "acceptEdits", "bypassPermissions", "plan", "read-only", "safe-yolo", "yolo"]>>;
|
|
2809
|
+
model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2810
|
+
fallbackModel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2811
|
+
customSystemPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2812
|
+
appendSystemPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2813
|
+
allowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
2814
|
+
disallowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
2815
|
+
happyOrg: z.ZodOptional<z.ZodObject<{
|
|
2816
|
+
taskContext: z.ZodOptional<z.ZodObject<{
|
|
2817
|
+
taskId: z.ZodString;
|
|
2818
|
+
organizationId: z.ZodString;
|
|
2819
|
+
organizationRootPath: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
2820
|
+
memberAgentId: z.ZodString;
|
|
2821
|
+
supervisorAgentId: z.ZodString;
|
|
2822
|
+
positionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
2823
|
+
responsibilityId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
2824
|
+
}, "strip", z.ZodTypeAny, {
|
|
2825
|
+
taskId: string;
|
|
2826
|
+
organizationId: string;
|
|
2827
|
+
memberAgentId: string;
|
|
2828
|
+
supervisorAgentId: string;
|
|
2829
|
+
organizationRootPath?: string | null | undefined;
|
|
2830
|
+
positionId?: string | null | undefined;
|
|
2831
|
+
responsibilityId?: string | null | undefined;
|
|
2832
|
+
}, {
|
|
2833
|
+
taskId: string;
|
|
2834
|
+
organizationId: string;
|
|
2835
|
+
memberAgentId: string;
|
|
2836
|
+
supervisorAgentId: string;
|
|
2837
|
+
organizationRootPath?: string | null | undefined;
|
|
2838
|
+
positionId?: string | null | undefined;
|
|
2839
|
+
responsibilityId?: string | null | undefined;
|
|
2840
|
+
}>>;
|
|
2841
|
+
control: z.ZodOptional<z.ZodObject<{
|
|
2842
|
+
action: z.ZodEnum<["terminate", "reopen"]>;
|
|
2843
|
+
reason: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
2844
|
+
newContext: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
2845
|
+
newDecision: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
2846
|
+
newResource: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
2847
|
+
}, "strip", z.ZodTypeAny, {
|
|
2848
|
+
action: "terminate" | "reopen";
|
|
2849
|
+
reason?: string | null | undefined;
|
|
2850
|
+
newContext?: string | null | undefined;
|
|
2851
|
+
newDecision?: string | null | undefined;
|
|
2852
|
+
newResource?: string | null | undefined;
|
|
2853
|
+
}, {
|
|
2854
|
+
action: "terminate" | "reopen";
|
|
2855
|
+
reason?: string | null | undefined;
|
|
2856
|
+
newContext?: string | null | undefined;
|
|
2857
|
+
newDecision?: string | null | undefined;
|
|
2858
|
+
newResource?: string | null | undefined;
|
|
2859
|
+
}>>;
|
|
2860
|
+
replyContext: z.ZodOptional<z.ZodObject<{
|
|
2861
|
+
dispatchId: z.ZodString;
|
|
2862
|
+
taskId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
2863
|
+
organizationId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
2864
|
+
scope: z.ZodString;
|
|
2865
|
+
replyTo: z.ZodString;
|
|
2866
|
+
memberAgentId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
2867
|
+
sessionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
2868
|
+
positionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
2869
|
+
responsibilityId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
2870
|
+
routeType: z.ZodNullable<z.ZodOptional<z.ZodEnum<["direct_reply", "version_planning_reply", "analysis_task", "implementation_task", "ack_plus_reply"]>>>;
|
|
2871
|
+
ackType: z.ZodNullable<z.ZodOptional<z.ZodEnum<["none", "read_ack", "dispatch_ack", "route_ack", "progress_ack"]>>>;
|
|
2872
|
+
replyMode: z.ZodNullable<z.ZodOptional<z.ZodEnum<["reply-first", "analysis-first"]>>>;
|
|
2873
|
+
planIntent: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
2874
|
+
routerReason: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
2875
|
+
goldenRouteId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
2876
|
+
}, "strip", z.ZodTypeAny, {
|
|
2877
|
+
dispatchId: string;
|
|
2878
|
+
scope: string;
|
|
2879
|
+
replyTo: string;
|
|
2880
|
+
sessionId?: string | null | undefined;
|
|
2881
|
+
taskId?: string | null | undefined;
|
|
2882
|
+
organizationId?: string | null | undefined;
|
|
2883
|
+
memberAgentId?: string | null | undefined;
|
|
2884
|
+
positionId?: string | null | undefined;
|
|
2885
|
+
responsibilityId?: string | null | undefined;
|
|
2886
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
2887
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
2888
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
2889
|
+
planIntent?: string | null | undefined;
|
|
2890
|
+
routerReason?: string | null | undefined;
|
|
2891
|
+
goldenRouteId?: string | null | undefined;
|
|
2892
|
+
}, {
|
|
2893
|
+
dispatchId: string;
|
|
2894
|
+
scope: string;
|
|
2895
|
+
replyTo: string;
|
|
2896
|
+
sessionId?: string | null | undefined;
|
|
2897
|
+
taskId?: string | null | undefined;
|
|
2898
|
+
organizationId?: string | null | undefined;
|
|
2899
|
+
memberAgentId?: string | null | undefined;
|
|
2900
|
+
positionId?: string | null | undefined;
|
|
2901
|
+
responsibilityId?: string | null | undefined;
|
|
2902
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
2903
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
2904
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
2905
|
+
planIntent?: string | null | undefined;
|
|
2906
|
+
routerReason?: string | null | undefined;
|
|
2907
|
+
goldenRouteId?: string | null | undefined;
|
|
2908
|
+
}>>;
|
|
2909
|
+
}, "strip", z.ZodTypeAny, {
|
|
2910
|
+
taskContext?: {
|
|
2911
|
+
taskId: string;
|
|
2912
|
+
organizationId: string;
|
|
2913
|
+
memberAgentId: string;
|
|
2914
|
+
supervisorAgentId: string;
|
|
2915
|
+
organizationRootPath?: string | null | undefined;
|
|
2916
|
+
positionId?: string | null | undefined;
|
|
2917
|
+
responsibilityId?: string | null | undefined;
|
|
2918
|
+
} | undefined;
|
|
2919
|
+
control?: {
|
|
2920
|
+
action: "terminate" | "reopen";
|
|
2921
|
+
reason?: string | null | undefined;
|
|
2922
|
+
newContext?: string | null | undefined;
|
|
2923
|
+
newDecision?: string | null | undefined;
|
|
2924
|
+
newResource?: string | null | undefined;
|
|
2925
|
+
} | undefined;
|
|
2926
|
+
replyContext?: {
|
|
2927
|
+
dispatchId: string;
|
|
2928
|
+
scope: string;
|
|
2929
|
+
replyTo: string;
|
|
2930
|
+
sessionId?: string | null | undefined;
|
|
2931
|
+
taskId?: string | null | undefined;
|
|
2932
|
+
organizationId?: string | null | undefined;
|
|
2933
|
+
memberAgentId?: string | null | undefined;
|
|
2934
|
+
positionId?: string | null | undefined;
|
|
2935
|
+
responsibilityId?: string | null | undefined;
|
|
2936
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
2937
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
2938
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
2939
|
+
planIntent?: string | null | undefined;
|
|
2940
|
+
routerReason?: string | null | undefined;
|
|
2941
|
+
goldenRouteId?: string | null | undefined;
|
|
2942
|
+
} | undefined;
|
|
2943
|
+
}, {
|
|
2944
|
+
taskContext?: {
|
|
2945
|
+
taskId: string;
|
|
2946
|
+
organizationId: string;
|
|
2947
|
+
memberAgentId: string;
|
|
2948
|
+
supervisorAgentId: string;
|
|
2949
|
+
organizationRootPath?: string | null | undefined;
|
|
2950
|
+
positionId?: string | null | undefined;
|
|
2951
|
+
responsibilityId?: string | null | undefined;
|
|
2952
|
+
} | undefined;
|
|
2953
|
+
control?: {
|
|
2954
|
+
action: "terminate" | "reopen";
|
|
2955
|
+
reason?: string | null | undefined;
|
|
2956
|
+
newContext?: string | null | undefined;
|
|
2957
|
+
newDecision?: string | null | undefined;
|
|
2958
|
+
newResource?: string | null | undefined;
|
|
2959
|
+
} | undefined;
|
|
2960
|
+
replyContext?: {
|
|
2961
|
+
dispatchId: string;
|
|
2962
|
+
scope: string;
|
|
2963
|
+
replyTo: string;
|
|
2964
|
+
sessionId?: string | null | undefined;
|
|
2965
|
+
taskId?: string | null | undefined;
|
|
2966
|
+
organizationId?: string | null | undefined;
|
|
2967
|
+
memberAgentId?: string | null | undefined;
|
|
2968
|
+
positionId?: string | null | undefined;
|
|
2969
|
+
responsibilityId?: string | null | undefined;
|
|
2970
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
2971
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
2972
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
2973
|
+
planIntent?: string | null | undefined;
|
|
2974
|
+
routerReason?: string | null | undefined;
|
|
2975
|
+
goldenRouteId?: string | null | undefined;
|
|
2976
|
+
} | undefined;
|
|
2977
|
+
}>>;
|
|
2978
|
+
}, "strip", z.ZodTypeAny, {
|
|
2979
|
+
model?: string | null | undefined;
|
|
2980
|
+
sentFrom?: string | undefined;
|
|
2981
|
+
permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "read-only" | "safe-yolo" | "yolo" | undefined;
|
|
2982
|
+
fallbackModel?: string | null | undefined;
|
|
2983
|
+
customSystemPrompt?: string | null | undefined;
|
|
2984
|
+
appendSystemPrompt?: string | null | undefined;
|
|
2985
|
+
allowedTools?: string[] | null | undefined;
|
|
2986
|
+
disallowedTools?: string[] | null | undefined;
|
|
2987
|
+
happyOrg?: {
|
|
2988
|
+
taskContext?: {
|
|
2989
|
+
taskId: string;
|
|
2990
|
+
organizationId: string;
|
|
2991
|
+
memberAgentId: string;
|
|
2992
|
+
supervisorAgentId: string;
|
|
2993
|
+
organizationRootPath?: string | null | undefined;
|
|
2994
|
+
positionId?: string | null | undefined;
|
|
2995
|
+
responsibilityId?: string | null | undefined;
|
|
2996
|
+
} | undefined;
|
|
2997
|
+
control?: {
|
|
2998
|
+
action: "terminate" | "reopen";
|
|
2999
|
+
reason?: string | null | undefined;
|
|
3000
|
+
newContext?: string | null | undefined;
|
|
3001
|
+
newDecision?: string | null | undefined;
|
|
3002
|
+
newResource?: string | null | undefined;
|
|
3003
|
+
} | undefined;
|
|
3004
|
+
replyContext?: {
|
|
3005
|
+
dispatchId: string;
|
|
3006
|
+
scope: string;
|
|
3007
|
+
replyTo: string;
|
|
3008
|
+
sessionId?: string | null | undefined;
|
|
3009
|
+
taskId?: string | null | undefined;
|
|
3010
|
+
organizationId?: string | null | undefined;
|
|
3011
|
+
memberAgentId?: string | null | undefined;
|
|
3012
|
+
positionId?: string | null | undefined;
|
|
3013
|
+
responsibilityId?: string | null | undefined;
|
|
3014
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
3015
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
3016
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
3017
|
+
planIntent?: string | null | undefined;
|
|
3018
|
+
routerReason?: string | null | undefined;
|
|
3019
|
+
goldenRouteId?: string | null | undefined;
|
|
3020
|
+
} | undefined;
|
|
3021
|
+
} | undefined;
|
|
3022
|
+
}, {
|
|
3023
|
+
model?: string | null | undefined;
|
|
3024
|
+
sentFrom?: string | undefined;
|
|
3025
|
+
permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "read-only" | "safe-yolo" | "yolo" | undefined;
|
|
3026
|
+
fallbackModel?: string | null | undefined;
|
|
3027
|
+
customSystemPrompt?: string | null | undefined;
|
|
3028
|
+
appendSystemPrompt?: string | null | undefined;
|
|
3029
|
+
allowedTools?: string[] | null | undefined;
|
|
3030
|
+
disallowedTools?: string[] | null | undefined;
|
|
3031
|
+
happyOrg?: {
|
|
3032
|
+
taskContext?: {
|
|
3033
|
+
taskId: string;
|
|
3034
|
+
organizationId: string;
|
|
3035
|
+
memberAgentId: string;
|
|
3036
|
+
supervisorAgentId: string;
|
|
3037
|
+
organizationRootPath?: string | null | undefined;
|
|
3038
|
+
positionId?: string | null | undefined;
|
|
3039
|
+
responsibilityId?: string | null | undefined;
|
|
3040
|
+
} | undefined;
|
|
3041
|
+
control?: {
|
|
3042
|
+
action: "terminate" | "reopen";
|
|
3043
|
+
reason?: string | null | undefined;
|
|
3044
|
+
newContext?: string | null | undefined;
|
|
3045
|
+
newDecision?: string | null | undefined;
|
|
3046
|
+
newResource?: string | null | undefined;
|
|
3047
|
+
} | undefined;
|
|
3048
|
+
replyContext?: {
|
|
3049
|
+
dispatchId: string;
|
|
3050
|
+
scope: string;
|
|
3051
|
+
replyTo: string;
|
|
3052
|
+
sessionId?: string | null | undefined;
|
|
3053
|
+
taskId?: string | null | undefined;
|
|
3054
|
+
organizationId?: string | null | undefined;
|
|
3055
|
+
memberAgentId?: string | null | undefined;
|
|
3056
|
+
positionId?: string | null | undefined;
|
|
3057
|
+
responsibilityId?: string | null | undefined;
|
|
3058
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
3059
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
3060
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
3061
|
+
planIntent?: string | null | undefined;
|
|
3062
|
+
routerReason?: string | null | undefined;
|
|
3063
|
+
goldenRouteId?: string | null | undefined;
|
|
3064
|
+
} | undefined;
|
|
3065
|
+
} | undefined;
|
|
3066
|
+
}>>;
|
|
3067
|
+
}, "strip", z.ZodTypeAny, {
|
|
3068
|
+
content: {
|
|
3069
|
+
type: "text";
|
|
3070
|
+
text: string;
|
|
3071
|
+
};
|
|
3072
|
+
role: "user";
|
|
3073
|
+
localKey?: string | undefined;
|
|
3074
|
+
meta?: {
|
|
3075
|
+
model?: string | null | undefined;
|
|
3076
|
+
sentFrom?: string | undefined;
|
|
3077
|
+
permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "read-only" | "safe-yolo" | "yolo" | undefined;
|
|
3078
|
+
fallbackModel?: string | null | undefined;
|
|
3079
|
+
customSystemPrompt?: string | null | undefined;
|
|
3080
|
+
appendSystemPrompt?: string | null | undefined;
|
|
3081
|
+
allowedTools?: string[] | null | undefined;
|
|
3082
|
+
disallowedTools?: string[] | null | undefined;
|
|
3083
|
+
happyOrg?: {
|
|
3084
|
+
taskContext?: {
|
|
3085
|
+
taskId: string;
|
|
3086
|
+
organizationId: string;
|
|
3087
|
+
memberAgentId: string;
|
|
3088
|
+
supervisorAgentId: string;
|
|
3089
|
+
organizationRootPath?: string | null | undefined;
|
|
3090
|
+
positionId?: string | null | undefined;
|
|
3091
|
+
responsibilityId?: string | null | undefined;
|
|
3092
|
+
} | undefined;
|
|
3093
|
+
control?: {
|
|
3094
|
+
action: "terminate" | "reopen";
|
|
3095
|
+
reason?: string | null | undefined;
|
|
3096
|
+
newContext?: string | null | undefined;
|
|
3097
|
+
newDecision?: string | null | undefined;
|
|
3098
|
+
newResource?: string | null | undefined;
|
|
3099
|
+
} | undefined;
|
|
3100
|
+
replyContext?: {
|
|
3101
|
+
dispatchId: string;
|
|
3102
|
+
scope: string;
|
|
3103
|
+
replyTo: string;
|
|
3104
|
+
sessionId?: string | null | undefined;
|
|
3105
|
+
taskId?: string | null | undefined;
|
|
3106
|
+
organizationId?: string | null | undefined;
|
|
3107
|
+
memberAgentId?: string | null | undefined;
|
|
3108
|
+
positionId?: string | null | undefined;
|
|
3109
|
+
responsibilityId?: string | null | undefined;
|
|
3110
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
3111
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
3112
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
3113
|
+
planIntent?: string | null | undefined;
|
|
3114
|
+
routerReason?: string | null | undefined;
|
|
3115
|
+
goldenRouteId?: string | null | undefined;
|
|
3116
|
+
} | undefined;
|
|
3117
|
+
} | undefined;
|
|
3118
|
+
} | undefined;
|
|
3119
|
+
}, {
|
|
3120
|
+
content: {
|
|
3121
|
+
type: "text";
|
|
3122
|
+
text: string;
|
|
3123
|
+
};
|
|
3124
|
+
role: "user";
|
|
3125
|
+
localKey?: string | undefined;
|
|
3126
|
+
meta?: {
|
|
3127
|
+
model?: string | null | undefined;
|
|
3128
|
+
sentFrom?: string | undefined;
|
|
3129
|
+
permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "read-only" | "safe-yolo" | "yolo" | undefined;
|
|
3130
|
+
fallbackModel?: string | null | undefined;
|
|
3131
|
+
customSystemPrompt?: string | null | undefined;
|
|
3132
|
+
appendSystemPrompt?: string | null | undefined;
|
|
3133
|
+
allowedTools?: string[] | null | undefined;
|
|
3134
|
+
disallowedTools?: string[] | null | undefined;
|
|
3135
|
+
happyOrg?: {
|
|
3136
|
+
taskContext?: {
|
|
3137
|
+
taskId: string;
|
|
3138
|
+
organizationId: string;
|
|
3139
|
+
memberAgentId: string;
|
|
3140
|
+
supervisorAgentId: string;
|
|
3141
|
+
organizationRootPath?: string | null | undefined;
|
|
3142
|
+
positionId?: string | null | undefined;
|
|
3143
|
+
responsibilityId?: string | null | undefined;
|
|
3144
|
+
} | undefined;
|
|
3145
|
+
control?: {
|
|
3146
|
+
action: "terminate" | "reopen";
|
|
3147
|
+
reason?: string | null | undefined;
|
|
3148
|
+
newContext?: string | null | undefined;
|
|
3149
|
+
newDecision?: string | null | undefined;
|
|
3150
|
+
newResource?: string | null | undefined;
|
|
3151
|
+
} | undefined;
|
|
3152
|
+
replyContext?: {
|
|
3153
|
+
dispatchId: string;
|
|
3154
|
+
scope: string;
|
|
3155
|
+
replyTo: string;
|
|
3156
|
+
sessionId?: string | null | undefined;
|
|
3157
|
+
taskId?: string | null | undefined;
|
|
3158
|
+
organizationId?: string | null | undefined;
|
|
3159
|
+
memberAgentId?: string | null | undefined;
|
|
3160
|
+
positionId?: string | null | undefined;
|
|
3161
|
+
responsibilityId?: string | null | undefined;
|
|
3162
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
3163
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
3164
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
3165
|
+
planIntent?: string | null | undefined;
|
|
3166
|
+
routerReason?: string | null | undefined;
|
|
3167
|
+
goldenRouteId?: string | null | undefined;
|
|
3168
|
+
} | undefined;
|
|
3169
|
+
} | undefined;
|
|
3170
|
+
} | undefined;
|
|
3171
|
+
}>, z.ZodObject<{
|
|
3172
|
+
role: z.ZodLiteral<"agent">;
|
|
3173
|
+
content: z.ZodUnion<[z.ZodObject<{
|
|
3174
|
+
type: z.ZodLiteral<"output">;
|
|
3175
|
+
data: z.ZodUnknown;
|
|
3176
|
+
}, "strip", z.ZodTypeAny, {
|
|
3177
|
+
type: "output";
|
|
3178
|
+
data?: unknown;
|
|
3179
|
+
}, {
|
|
3180
|
+
type: "output";
|
|
3181
|
+
data?: unknown;
|
|
3182
|
+
}>, z.ZodObject<{
|
|
3183
|
+
type: z.ZodLiteral<"codex">;
|
|
3184
|
+
data: z.ZodUnknown;
|
|
3185
|
+
}, "strip", z.ZodTypeAny, {
|
|
3186
|
+
type: "codex";
|
|
3187
|
+
data?: unknown;
|
|
3188
|
+
}, {
|
|
3189
|
+
type: "codex";
|
|
3190
|
+
data?: unknown;
|
|
3191
|
+
}>, z.ZodObject<{
|
|
3192
|
+
type: z.ZodLiteral<"acp">;
|
|
3193
|
+
provider: z.ZodEnum<["gemini", "codex", "claude", "opencode"]>;
|
|
3194
|
+
data: z.ZodUnknown;
|
|
3195
|
+
}, "strip", z.ZodTypeAny, {
|
|
3196
|
+
type: "acp";
|
|
3197
|
+
provider: "codex" | "gemini" | "claude" | "opencode";
|
|
3198
|
+
data?: unknown;
|
|
3199
|
+
}, {
|
|
3200
|
+
type: "acp";
|
|
3201
|
+
provider: "codex" | "gemini" | "claude" | "opencode";
|
|
3202
|
+
data?: unknown;
|
|
3203
|
+
}>, z.ZodObject<{
|
|
3204
|
+
type: z.ZodLiteral<"event">;
|
|
3205
|
+
id: z.ZodOptional<z.ZodString>;
|
|
3206
|
+
data: z.ZodUnknown;
|
|
3207
|
+
}, "strip", z.ZodTypeAny, {
|
|
3208
|
+
type: "event";
|
|
3209
|
+
id?: string | undefined;
|
|
3210
|
+
data?: unknown;
|
|
3211
|
+
}, {
|
|
3212
|
+
type: "event";
|
|
3213
|
+
id?: string | undefined;
|
|
3214
|
+
data?: unknown;
|
|
3215
|
+
}>]>;
|
|
3216
|
+
meta: z.ZodOptional<z.ZodObject<{
|
|
3217
|
+
sentFrom: z.ZodOptional<z.ZodString>;
|
|
3218
|
+
permissionMode: z.ZodOptional<z.ZodEnum<["default", "acceptEdits", "bypassPermissions", "plan", "read-only", "safe-yolo", "yolo"]>>;
|
|
3219
|
+
model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3220
|
+
fallbackModel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3221
|
+
customSystemPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3222
|
+
appendSystemPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3223
|
+
allowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
3224
|
+
disallowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
3225
|
+
happyOrg: z.ZodOptional<z.ZodObject<{
|
|
3226
|
+
taskContext: z.ZodOptional<z.ZodObject<{
|
|
3227
|
+
taskId: z.ZodString;
|
|
3228
|
+
organizationId: z.ZodString;
|
|
3229
|
+
organizationRootPath: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3230
|
+
memberAgentId: z.ZodString;
|
|
3231
|
+
supervisorAgentId: z.ZodString;
|
|
3232
|
+
positionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3233
|
+
responsibilityId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3234
|
+
}, "strip", z.ZodTypeAny, {
|
|
3235
|
+
taskId: string;
|
|
3236
|
+
organizationId: string;
|
|
3237
|
+
memberAgentId: string;
|
|
3238
|
+
supervisorAgentId: string;
|
|
3239
|
+
organizationRootPath?: string | null | undefined;
|
|
3240
|
+
positionId?: string | null | undefined;
|
|
3241
|
+
responsibilityId?: string | null | undefined;
|
|
3242
|
+
}, {
|
|
3243
|
+
taskId: string;
|
|
3244
|
+
organizationId: string;
|
|
3245
|
+
memberAgentId: string;
|
|
3246
|
+
supervisorAgentId: string;
|
|
3247
|
+
organizationRootPath?: string | null | undefined;
|
|
3248
|
+
positionId?: string | null | undefined;
|
|
3249
|
+
responsibilityId?: string | null | undefined;
|
|
3250
|
+
}>>;
|
|
3251
|
+
control: z.ZodOptional<z.ZodObject<{
|
|
3252
|
+
action: z.ZodEnum<["terminate", "reopen"]>;
|
|
3253
|
+
reason: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3254
|
+
newContext: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3255
|
+
newDecision: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3256
|
+
newResource: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3257
|
+
}, "strip", z.ZodTypeAny, {
|
|
3258
|
+
action: "terminate" | "reopen";
|
|
3259
|
+
reason?: string | null | undefined;
|
|
3260
|
+
newContext?: string | null | undefined;
|
|
3261
|
+
newDecision?: string | null | undefined;
|
|
3262
|
+
newResource?: string | null | undefined;
|
|
3263
|
+
}, {
|
|
3264
|
+
action: "terminate" | "reopen";
|
|
3265
|
+
reason?: string | null | undefined;
|
|
3266
|
+
newContext?: string | null | undefined;
|
|
3267
|
+
newDecision?: string | null | undefined;
|
|
3268
|
+
newResource?: string | null | undefined;
|
|
3269
|
+
}>>;
|
|
3270
|
+
replyContext: z.ZodOptional<z.ZodObject<{
|
|
3271
|
+
dispatchId: z.ZodString;
|
|
3272
|
+
taskId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3273
|
+
organizationId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3274
|
+
scope: z.ZodString;
|
|
3275
|
+
replyTo: z.ZodString;
|
|
3276
|
+
memberAgentId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3277
|
+
sessionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3278
|
+
positionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3279
|
+
responsibilityId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3280
|
+
routeType: z.ZodNullable<z.ZodOptional<z.ZodEnum<["direct_reply", "version_planning_reply", "analysis_task", "implementation_task", "ack_plus_reply"]>>>;
|
|
3281
|
+
ackType: z.ZodNullable<z.ZodOptional<z.ZodEnum<["none", "read_ack", "dispatch_ack", "route_ack", "progress_ack"]>>>;
|
|
3282
|
+
replyMode: z.ZodNullable<z.ZodOptional<z.ZodEnum<["reply-first", "analysis-first"]>>>;
|
|
3283
|
+
planIntent: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3284
|
+
routerReason: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3285
|
+
goldenRouteId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3286
|
+
}, "strip", z.ZodTypeAny, {
|
|
3287
|
+
dispatchId: string;
|
|
3288
|
+
scope: string;
|
|
3289
|
+
replyTo: string;
|
|
3290
|
+
sessionId?: string | null | undefined;
|
|
3291
|
+
taskId?: string | null | undefined;
|
|
3292
|
+
organizationId?: string | null | undefined;
|
|
3293
|
+
memberAgentId?: string | null | undefined;
|
|
3294
|
+
positionId?: string | null | undefined;
|
|
3295
|
+
responsibilityId?: string | null | undefined;
|
|
3296
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
3297
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
3298
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
3299
|
+
planIntent?: string | null | undefined;
|
|
3300
|
+
routerReason?: string | null | undefined;
|
|
3301
|
+
goldenRouteId?: string | null | undefined;
|
|
3302
|
+
}, {
|
|
3303
|
+
dispatchId: string;
|
|
3304
|
+
scope: string;
|
|
3305
|
+
replyTo: string;
|
|
3306
|
+
sessionId?: string | null | undefined;
|
|
3307
|
+
taskId?: string | null | undefined;
|
|
3308
|
+
organizationId?: string | null | undefined;
|
|
3309
|
+
memberAgentId?: string | null | undefined;
|
|
3310
|
+
positionId?: string | null | undefined;
|
|
3311
|
+
responsibilityId?: string | null | undefined;
|
|
3312
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
3313
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
3314
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
3315
|
+
planIntent?: string | null | undefined;
|
|
3316
|
+
routerReason?: string | null | undefined;
|
|
3317
|
+
goldenRouteId?: string | null | undefined;
|
|
3318
|
+
}>>;
|
|
3319
|
+
}, "strip", z.ZodTypeAny, {
|
|
3320
|
+
taskContext?: {
|
|
3321
|
+
taskId: string;
|
|
3322
|
+
organizationId: string;
|
|
3323
|
+
memberAgentId: string;
|
|
3324
|
+
supervisorAgentId: string;
|
|
3325
|
+
organizationRootPath?: string | null | undefined;
|
|
3326
|
+
positionId?: string | null | undefined;
|
|
3327
|
+
responsibilityId?: string | null | undefined;
|
|
3328
|
+
} | undefined;
|
|
3329
|
+
control?: {
|
|
3330
|
+
action: "terminate" | "reopen";
|
|
3331
|
+
reason?: string | null | undefined;
|
|
3332
|
+
newContext?: string | null | undefined;
|
|
3333
|
+
newDecision?: string | null | undefined;
|
|
3334
|
+
newResource?: string | null | undefined;
|
|
3335
|
+
} | undefined;
|
|
3336
|
+
replyContext?: {
|
|
3337
|
+
dispatchId: string;
|
|
3338
|
+
scope: string;
|
|
3339
|
+
replyTo: string;
|
|
3340
|
+
sessionId?: string | null | undefined;
|
|
3341
|
+
taskId?: string | null | undefined;
|
|
3342
|
+
organizationId?: string | null | undefined;
|
|
3343
|
+
memberAgentId?: string | null | undefined;
|
|
3344
|
+
positionId?: string | null | undefined;
|
|
3345
|
+
responsibilityId?: string | null | undefined;
|
|
3346
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
3347
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
3348
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
3349
|
+
planIntent?: string | null | undefined;
|
|
3350
|
+
routerReason?: string | null | undefined;
|
|
3351
|
+
goldenRouteId?: string | null | undefined;
|
|
3352
|
+
} | undefined;
|
|
3353
|
+
}, {
|
|
3354
|
+
taskContext?: {
|
|
3355
|
+
taskId: string;
|
|
3356
|
+
organizationId: string;
|
|
3357
|
+
memberAgentId: string;
|
|
3358
|
+
supervisorAgentId: string;
|
|
3359
|
+
organizationRootPath?: string | null | undefined;
|
|
3360
|
+
positionId?: string | null | undefined;
|
|
3361
|
+
responsibilityId?: string | null | undefined;
|
|
3362
|
+
} | undefined;
|
|
3363
|
+
control?: {
|
|
3364
|
+
action: "terminate" | "reopen";
|
|
3365
|
+
reason?: string | null | undefined;
|
|
3366
|
+
newContext?: string | null | undefined;
|
|
3367
|
+
newDecision?: string | null | undefined;
|
|
3368
|
+
newResource?: string | null | undefined;
|
|
3369
|
+
} | undefined;
|
|
3370
|
+
replyContext?: {
|
|
3371
|
+
dispatchId: string;
|
|
3372
|
+
scope: string;
|
|
3373
|
+
replyTo: string;
|
|
3374
|
+
sessionId?: string | null | undefined;
|
|
3375
|
+
taskId?: string | null | undefined;
|
|
3376
|
+
organizationId?: string | null | undefined;
|
|
3377
|
+
memberAgentId?: string | null | undefined;
|
|
3378
|
+
positionId?: string | null | undefined;
|
|
3379
|
+
responsibilityId?: string | null | undefined;
|
|
3380
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
3381
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
3382
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
3383
|
+
planIntent?: string | null | undefined;
|
|
3384
|
+
routerReason?: string | null | undefined;
|
|
3385
|
+
goldenRouteId?: string | null | undefined;
|
|
3386
|
+
} | undefined;
|
|
3387
|
+
}>>;
|
|
3388
|
+
}, "strip", z.ZodTypeAny, {
|
|
3389
|
+
model?: string | null | undefined;
|
|
3390
|
+
sentFrom?: string | undefined;
|
|
3391
|
+
permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "read-only" | "safe-yolo" | "yolo" | undefined;
|
|
3392
|
+
fallbackModel?: string | null | undefined;
|
|
3393
|
+
customSystemPrompt?: string | null | undefined;
|
|
3394
|
+
appendSystemPrompt?: string | null | undefined;
|
|
3395
|
+
allowedTools?: string[] | null | undefined;
|
|
3396
|
+
disallowedTools?: string[] | null | undefined;
|
|
3397
|
+
happyOrg?: {
|
|
3398
|
+
taskContext?: {
|
|
3399
|
+
taskId: string;
|
|
3400
|
+
organizationId: string;
|
|
3401
|
+
memberAgentId: string;
|
|
3402
|
+
supervisorAgentId: string;
|
|
3403
|
+
organizationRootPath?: string | null | undefined;
|
|
3404
|
+
positionId?: string | null | undefined;
|
|
3405
|
+
responsibilityId?: string | null | undefined;
|
|
3406
|
+
} | undefined;
|
|
3407
|
+
control?: {
|
|
3408
|
+
action: "terminate" | "reopen";
|
|
3409
|
+
reason?: string | null | undefined;
|
|
3410
|
+
newContext?: string | null | undefined;
|
|
3411
|
+
newDecision?: string | null | undefined;
|
|
3412
|
+
newResource?: string | null | undefined;
|
|
3413
|
+
} | undefined;
|
|
3414
|
+
replyContext?: {
|
|
3415
|
+
dispatchId: string;
|
|
3416
|
+
scope: string;
|
|
3417
|
+
replyTo: string;
|
|
3418
|
+
sessionId?: string | null | undefined;
|
|
3419
|
+
taskId?: string | null | undefined;
|
|
3420
|
+
organizationId?: string | null | undefined;
|
|
3421
|
+
memberAgentId?: string | null | undefined;
|
|
3422
|
+
positionId?: string | null | undefined;
|
|
3423
|
+
responsibilityId?: string | null | undefined;
|
|
3424
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
3425
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
3426
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
3427
|
+
planIntent?: string | null | undefined;
|
|
3428
|
+
routerReason?: string | null | undefined;
|
|
3429
|
+
goldenRouteId?: string | null | undefined;
|
|
3430
|
+
} | undefined;
|
|
3431
|
+
} | undefined;
|
|
3432
|
+
}, {
|
|
3433
|
+
model?: string | null | undefined;
|
|
3434
|
+
sentFrom?: string | undefined;
|
|
3435
|
+
permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "read-only" | "safe-yolo" | "yolo" | undefined;
|
|
3436
|
+
fallbackModel?: string | null | undefined;
|
|
3437
|
+
customSystemPrompt?: string | null | undefined;
|
|
3438
|
+
appendSystemPrompt?: string | null | undefined;
|
|
3439
|
+
allowedTools?: string[] | null | undefined;
|
|
3440
|
+
disallowedTools?: string[] | null | undefined;
|
|
3441
|
+
happyOrg?: {
|
|
3442
|
+
taskContext?: {
|
|
3443
|
+
taskId: string;
|
|
3444
|
+
organizationId: string;
|
|
3445
|
+
memberAgentId: string;
|
|
3446
|
+
supervisorAgentId: string;
|
|
3447
|
+
organizationRootPath?: string | null | undefined;
|
|
3448
|
+
positionId?: string | null | undefined;
|
|
3449
|
+
responsibilityId?: string | null | undefined;
|
|
3450
|
+
} | undefined;
|
|
3451
|
+
control?: {
|
|
3452
|
+
action: "terminate" | "reopen";
|
|
3453
|
+
reason?: string | null | undefined;
|
|
3454
|
+
newContext?: string | null | undefined;
|
|
3455
|
+
newDecision?: string | null | undefined;
|
|
3456
|
+
newResource?: string | null | undefined;
|
|
3457
|
+
} | undefined;
|
|
3458
|
+
replyContext?: {
|
|
3459
|
+
dispatchId: string;
|
|
3460
|
+
scope: string;
|
|
3461
|
+
replyTo: string;
|
|
3462
|
+
sessionId?: string | null | undefined;
|
|
3463
|
+
taskId?: string | null | undefined;
|
|
3464
|
+
organizationId?: string | null | undefined;
|
|
3465
|
+
memberAgentId?: string | null | undefined;
|
|
3466
|
+
positionId?: string | null | undefined;
|
|
3467
|
+
responsibilityId?: string | null | undefined;
|
|
3468
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
3469
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
3470
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
3471
|
+
planIntent?: string | null | undefined;
|
|
3472
|
+
routerReason?: string | null | undefined;
|
|
3473
|
+
goldenRouteId?: string | null | undefined;
|
|
3474
|
+
} | undefined;
|
|
3475
|
+
} | undefined;
|
|
3476
|
+
}>>;
|
|
3477
|
+
}, "strip", z.ZodTypeAny, {
|
|
3478
|
+
content: {
|
|
3479
|
+
type: "output";
|
|
3480
|
+
data?: unknown;
|
|
3481
|
+
} | {
|
|
3482
|
+
type: "codex";
|
|
3483
|
+
data?: unknown;
|
|
3484
|
+
} | {
|
|
3485
|
+
type: "acp";
|
|
3486
|
+
provider: "codex" | "gemini" | "claude" | "opencode";
|
|
3487
|
+
data?: unknown;
|
|
3488
|
+
} | {
|
|
3489
|
+
type: "event";
|
|
3490
|
+
id?: string | undefined;
|
|
3491
|
+
data?: unknown;
|
|
3492
|
+
};
|
|
3493
|
+
role: "agent";
|
|
3494
|
+
meta?: {
|
|
3495
|
+
model?: string | null | undefined;
|
|
3496
|
+
sentFrom?: string | undefined;
|
|
3497
|
+
permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "read-only" | "safe-yolo" | "yolo" | undefined;
|
|
3498
|
+
fallbackModel?: string | null | undefined;
|
|
3499
|
+
customSystemPrompt?: string | null | undefined;
|
|
3500
|
+
appendSystemPrompt?: string | null | undefined;
|
|
3501
|
+
allowedTools?: string[] | null | undefined;
|
|
3502
|
+
disallowedTools?: string[] | null | undefined;
|
|
3503
|
+
happyOrg?: {
|
|
3504
|
+
taskContext?: {
|
|
3505
|
+
taskId: string;
|
|
3506
|
+
organizationId: string;
|
|
3507
|
+
memberAgentId: string;
|
|
3508
|
+
supervisorAgentId: string;
|
|
3509
|
+
organizationRootPath?: string | null | undefined;
|
|
3510
|
+
positionId?: string | null | undefined;
|
|
3511
|
+
responsibilityId?: string | null | undefined;
|
|
3512
|
+
} | undefined;
|
|
3513
|
+
control?: {
|
|
3514
|
+
action: "terminate" | "reopen";
|
|
3515
|
+
reason?: string | null | undefined;
|
|
3516
|
+
newContext?: string | null | undefined;
|
|
3517
|
+
newDecision?: string | null | undefined;
|
|
3518
|
+
newResource?: string | null | undefined;
|
|
3519
|
+
} | undefined;
|
|
3520
|
+
replyContext?: {
|
|
3521
|
+
dispatchId: string;
|
|
3522
|
+
scope: string;
|
|
3523
|
+
replyTo: string;
|
|
3524
|
+
sessionId?: string | null | undefined;
|
|
3525
|
+
taskId?: string | null | undefined;
|
|
3526
|
+
organizationId?: string | null | undefined;
|
|
3527
|
+
memberAgentId?: string | null | undefined;
|
|
3528
|
+
positionId?: string | null | undefined;
|
|
3529
|
+
responsibilityId?: string | null | undefined;
|
|
3530
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
3531
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
3532
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
3533
|
+
planIntent?: string | null | undefined;
|
|
3534
|
+
routerReason?: string | null | undefined;
|
|
3535
|
+
goldenRouteId?: string | null | undefined;
|
|
3536
|
+
} | undefined;
|
|
3537
|
+
} | undefined;
|
|
3538
|
+
} | undefined;
|
|
3539
|
+
}, {
|
|
3540
|
+
content: {
|
|
3541
|
+
type: "output";
|
|
3542
|
+
data?: unknown;
|
|
3543
|
+
} | {
|
|
3544
|
+
type: "codex";
|
|
3545
|
+
data?: unknown;
|
|
3546
|
+
} | {
|
|
3547
|
+
type: "acp";
|
|
3548
|
+
provider: "codex" | "gemini" | "claude" | "opencode";
|
|
3549
|
+
data?: unknown;
|
|
3550
|
+
} | {
|
|
3551
|
+
type: "event";
|
|
3552
|
+
id?: string | undefined;
|
|
3553
|
+
data?: unknown;
|
|
3554
|
+
};
|
|
3555
|
+
role: "agent";
|
|
3556
|
+
meta?: {
|
|
3557
|
+
model?: string | null | undefined;
|
|
3558
|
+
sentFrom?: string | undefined;
|
|
3559
|
+
permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "read-only" | "safe-yolo" | "yolo" | undefined;
|
|
3560
|
+
fallbackModel?: string | null | undefined;
|
|
3561
|
+
customSystemPrompt?: string | null | undefined;
|
|
3562
|
+
appendSystemPrompt?: string | null | undefined;
|
|
3563
|
+
allowedTools?: string[] | null | undefined;
|
|
3564
|
+
disallowedTools?: string[] | null | undefined;
|
|
3565
|
+
happyOrg?: {
|
|
3566
|
+
taskContext?: {
|
|
3567
|
+
taskId: string;
|
|
3568
|
+
organizationId: string;
|
|
3569
|
+
memberAgentId: string;
|
|
3570
|
+
supervisorAgentId: string;
|
|
3571
|
+
organizationRootPath?: string | null | undefined;
|
|
3572
|
+
positionId?: string | null | undefined;
|
|
3573
|
+
responsibilityId?: string | null | undefined;
|
|
3574
|
+
} | undefined;
|
|
3575
|
+
control?: {
|
|
3576
|
+
action: "terminate" | "reopen";
|
|
3577
|
+
reason?: string | null | undefined;
|
|
3578
|
+
newContext?: string | null | undefined;
|
|
3579
|
+
newDecision?: string | null | undefined;
|
|
3580
|
+
newResource?: string | null | undefined;
|
|
3581
|
+
} | undefined;
|
|
3582
|
+
replyContext?: {
|
|
3583
|
+
dispatchId: string;
|
|
3584
|
+
scope: string;
|
|
3585
|
+
replyTo: string;
|
|
3586
|
+
sessionId?: string | null | undefined;
|
|
3587
|
+
taskId?: string | null | undefined;
|
|
3588
|
+
organizationId?: string | null | undefined;
|
|
3589
|
+
memberAgentId?: string | null | undefined;
|
|
3590
|
+
positionId?: string | null | undefined;
|
|
3591
|
+
responsibilityId?: string | null | undefined;
|
|
3592
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
3593
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
3594
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
3595
|
+
planIntent?: string | null | undefined;
|
|
3596
|
+
routerReason?: string | null | undefined;
|
|
3597
|
+
goldenRouteId?: string | null | undefined;
|
|
3598
|
+
} | undefined;
|
|
3599
|
+
} | undefined;
|
|
3600
|
+
} | undefined;
|
|
3601
|
+
}>]>;
|
|
3602
|
+
type MessageContent = z.infer<typeof MessageContentSchema>;
|
|
3603
|
+
type Metadata = {
|
|
3604
|
+
path: string;
|
|
3605
|
+
host: string;
|
|
3606
|
+
version?: string;
|
|
3607
|
+
name?: string;
|
|
3608
|
+
os?: string;
|
|
3609
|
+
summary?: {
|
|
3610
|
+
text: string;
|
|
3611
|
+
updatedAt: number;
|
|
3612
|
+
};
|
|
3613
|
+
machineId?: string;
|
|
3614
|
+
claudeSessionId?: string;
|
|
3615
|
+
claudeTranscriptPath?: string;
|
|
3616
|
+
codexSessionId?: string;
|
|
3617
|
+
tools?: string[];
|
|
3618
|
+
slashCommands?: string[];
|
|
3619
|
+
homeDir: string;
|
|
3620
|
+
happyHomeDir: string;
|
|
3621
|
+
happyLibDir: string;
|
|
3622
|
+
happyToolsDir: string;
|
|
3623
|
+
startedFromDaemon?: boolean;
|
|
3624
|
+
hostPid?: number;
|
|
3625
|
+
startedBy?: 'daemon' | 'terminal';
|
|
3626
|
+
managedSessionTag?: string;
|
|
3627
|
+
lifecycleState?: 'running' | 'archiveRequested' | 'archived' | string;
|
|
3628
|
+
lifecycleStateSince?: number;
|
|
3629
|
+
archivedBy?: string;
|
|
3630
|
+
archiveReason?: string;
|
|
3631
|
+
flavor?: string;
|
|
3632
|
+
machineOnline?: boolean;
|
|
3633
|
+
machineOnlineAt?: number;
|
|
3634
|
+
happyOrg?: HappyOrgMetadata;
|
|
3635
|
+
};
|
|
3636
|
+
type AgentState = {
|
|
3637
|
+
controlledByUser?: boolean | null | undefined;
|
|
3638
|
+
requests?: {
|
|
3639
|
+
[id: string]: {
|
|
3640
|
+
tool: string;
|
|
3641
|
+
arguments: any;
|
|
3642
|
+
createdAt: number;
|
|
3643
|
+
requestKind?: 'permission' | 'selection';
|
|
3644
|
+
options?: Array<{
|
|
3645
|
+
optionId: string;
|
|
3646
|
+
label: string;
|
|
3647
|
+
description?: string;
|
|
3648
|
+
}>;
|
|
3649
|
+
defaultOptionId?: string;
|
|
3650
|
+
};
|
|
3651
|
+
};
|
|
3652
|
+
completedRequests?: {
|
|
3653
|
+
[id: string]: {
|
|
3654
|
+
tool: string;
|
|
3655
|
+
arguments: any;
|
|
3656
|
+
createdAt: number;
|
|
3657
|
+
completedAt: number;
|
|
3658
|
+
status: 'canceled' | 'denied' | 'approved';
|
|
3659
|
+
reason?: string;
|
|
3660
|
+
mode?: PermissionMode;
|
|
3661
|
+
decision?: 'approved' | 'approved_for_session' | 'denied' | 'abort';
|
|
3662
|
+
allowTools?: string[];
|
|
3663
|
+
requestKind?: 'permission' | 'selection';
|
|
3664
|
+
selectedOptionId?: string;
|
|
3665
|
+
};
|
|
3666
|
+
};
|
|
3667
|
+
};
|
|
3668
|
+
|
|
3669
|
+
/**
|
|
3670
|
+
* Common RPC types and interfaces for both session and machine clients
|
|
3671
|
+
*/
|
|
3672
|
+
/**
|
|
3673
|
+
* Generic RPC handler function type
|
|
3674
|
+
* @template TRequest - The request data type
|
|
3675
|
+
* @template TResponse - The response data type
|
|
3676
|
+
*/
|
|
3677
|
+
type RpcHandler<TRequest = any, TResponse = any> = (data: TRequest) => TResponse | Promise<TResponse>;
|
|
3678
|
+
/**
|
|
3679
|
+
* RPC request data from server
|
|
3680
|
+
*/
|
|
3681
|
+
interface RpcRequest {
|
|
3682
|
+
method: string;
|
|
3683
|
+
params: string;
|
|
3684
|
+
}
|
|
3685
|
+
/**
|
|
3686
|
+
* Configuration for RPC handler manager
|
|
3687
|
+
*/
|
|
3688
|
+
interface RpcHandlerConfig {
|
|
3689
|
+
scopePrefix: string;
|
|
3690
|
+
encryptionKey: Uint8Array;
|
|
3691
|
+
encryptionVariant: 'legacy' | 'dataKey';
|
|
3692
|
+
logger?: (message: string, data?: any) => void;
|
|
3693
|
+
}
|
|
3694
|
+
|
|
3695
|
+
/**
|
|
3696
|
+
* Generic RPC handler manager for session and machine clients
|
|
3697
|
+
* Manages RPC method registration, encryption/decryption, and handler execution
|
|
3698
|
+
*/
|
|
3699
|
+
|
|
3700
|
+
declare class RpcHandlerManager {
|
|
3701
|
+
private handlers;
|
|
3702
|
+
private readonly scopePrefix;
|
|
3703
|
+
private readonly encryptionKey;
|
|
3704
|
+
private readonly encryptionVariant;
|
|
3705
|
+
private readonly logger;
|
|
3706
|
+
private socket;
|
|
3707
|
+
constructor(config: RpcHandlerConfig);
|
|
3708
|
+
/**
|
|
3709
|
+
* Register an RPC handler for a specific method
|
|
3710
|
+
* @param method - The method name (without prefix)
|
|
3711
|
+
* @param handler - The handler function
|
|
3712
|
+
*/
|
|
3713
|
+
registerHandler<TRequest = any, TResponse = any>(method: string, handler: RpcHandler<TRequest, TResponse>): void;
|
|
3714
|
+
/**
|
|
3715
|
+
* Handle an incoming RPC request
|
|
3716
|
+
* @param request - The RPC request data
|
|
3717
|
+
* @param callback - The response callback
|
|
3718
|
+
*/
|
|
3719
|
+
handleRequest(request: RpcRequest): Promise<any>;
|
|
3720
|
+
onSocketConnect(socket: Socket): void;
|
|
3721
|
+
onSocketDisconnect(): void;
|
|
3722
|
+
/**
|
|
3723
|
+
* Get the number of registered handlers
|
|
3724
|
+
*/
|
|
3725
|
+
getHandlerCount(): number;
|
|
3726
|
+
/**
|
|
3727
|
+
* Check if a handler is registered
|
|
3728
|
+
* @param method - The method name (without prefix)
|
|
3729
|
+
*/
|
|
3730
|
+
hasHandler(method: string): boolean;
|
|
3731
|
+
/**
|
|
3732
|
+
* Clear all handlers
|
|
3733
|
+
*/
|
|
3734
|
+
clearHandlers(): void;
|
|
3735
|
+
/**
|
|
3736
|
+
* Get the prefixed method name
|
|
3737
|
+
* @param method - The method name
|
|
3738
|
+
*/
|
|
3739
|
+
private getPrefixedMethod;
|
|
3740
|
+
}
|
|
3741
|
+
|
|
3742
|
+
/**
|
|
3743
|
+
* Minimal persistence functions for happy CLI
|
|
3744
|
+
*
|
|
3745
|
+
* Handles settings and private key storage in ~/.happy/ or local .happy/
|
|
3746
|
+
*/
|
|
3747
|
+
|
|
3748
|
+
type SigningCredentials = {
|
|
3749
|
+
version: 1;
|
|
3750
|
+
keyId: string;
|
|
3751
|
+
seed: string;
|
|
3752
|
+
algorithm: 'HMAC-SHA256';
|
|
3753
|
+
};
|
|
3754
|
+
type Credentials = {
|
|
3755
|
+
token: string;
|
|
3756
|
+
signing?: SigningCredentials | null;
|
|
3757
|
+
aesKey?: string;
|
|
3758
|
+
encryption: {
|
|
3759
|
+
type: 'legacy';
|
|
3760
|
+
secret: Uint8Array;
|
|
3761
|
+
} | {
|
|
3762
|
+
type: 'dataKey';
|
|
3763
|
+
publicKey: Uint8Array;
|
|
3764
|
+
machineKey: Uint8Array;
|
|
3765
|
+
};
|
|
3766
|
+
};
|
|
3767
|
+
|
|
3768
|
+
type MessageStreamPhase = 'start' | 'delta' | 'commit' | 'abort';
|
|
3769
|
+
type MessageStreamMode = 'append' | 'replace';
|
|
3770
|
+
type MessageStreamMetadata = {
|
|
3771
|
+
streamId: string;
|
|
3772
|
+
messageId: string;
|
|
3773
|
+
phase: MessageStreamPhase;
|
|
3774
|
+
mode: MessageStreamMode;
|
|
3775
|
+
};
|
|
3776
|
+
|
|
3777
|
+
/**
|
|
3778
|
+
* ACP (Agent Communication Protocol) message data types.
|
|
3779
|
+
* This is the unified format for all agent messages - CLI adapts each provider's format to ACP.
|
|
3780
|
+
*/
|
|
3781
|
+
type ACPMessageData = ({
|
|
2972
3782
|
type: 'message';
|
|
2973
3783
|
message: string;
|
|
2974
3784
|
} & Partial<MessageStreamMetadata> & {
|
|
@@ -3030,6 +3840,13 @@ type ACPMessageData = ({
|
|
|
3030
3840
|
type: 'token_count';
|
|
3031
3841
|
[key: string]: unknown;
|
|
3032
3842
|
};
|
|
3843
|
+
type SessionTranscriptSource = 'snapshot' | 'live';
|
|
3844
|
+
interface SessionTranscriptMessage {
|
|
3845
|
+
source: SessionTranscriptSource;
|
|
3846
|
+
seq: number | null;
|
|
3847
|
+
message: MessageContent;
|
|
3848
|
+
queuesPendingInput: boolean;
|
|
3849
|
+
}
|
|
3033
3850
|
interface ProtocolV3SessionSyncOptions {
|
|
3034
3851
|
getSessionSnapshot: (sessionId: string, limit?: number) => Promise<ProtocolV3SessionSnapshotResponse | null>;
|
|
3035
3852
|
getSessionChanges: (sessionId: string, afterSeq: number, limit?: number) => Promise<ProtocolV3SessionChangesResponse | null>;
|
|
@@ -3044,8 +3861,11 @@ declare class ApiSessionClient extends EventEmitter {
|
|
|
3044
3861
|
private agentState;
|
|
3045
3862
|
private agentStateVersion;
|
|
3046
3863
|
private socket;
|
|
3864
|
+
private readonly initialSessionSeq;
|
|
3047
3865
|
private pendingMessages;
|
|
3048
3866
|
private pendingMessageCallback;
|
|
3867
|
+
private pendingSessionMessages;
|
|
3868
|
+
private pendingSessionMessageCallback;
|
|
3049
3869
|
readonly rpcHandlerManager: RpcHandlerManager;
|
|
3050
3870
|
private agentStateLock;
|
|
3051
3871
|
private metadataLock;
|
|
@@ -3077,12 +3897,14 @@ declare class ApiSessionClient extends EventEmitter {
|
|
|
3077
3897
|
private happyOrgSignedCredentialsPromise;
|
|
3078
3898
|
constructor(credentials: Credentials, session: Session);
|
|
3079
3899
|
onUserMessage(callback: (data: UserMessage) => void): void;
|
|
3900
|
+
onSessionMessage(callback: (data: SessionTranscriptMessage) => void): void;
|
|
3080
3901
|
configureProtocolV3Sync(options: ProtocolV3SessionSyncOptions | null): void;
|
|
3081
3902
|
getProtocolV3DescriptorSnapshot(): ProtocolV3Descriptor | null;
|
|
3082
3903
|
getProtocolV3SocketCapabilitiesSnapshot(): ProtocolV3SocketCapabilities | null;
|
|
3083
3904
|
getMetadataSnapshot(): Metadata | null;
|
|
3084
3905
|
getAgentStateSnapshot(): AgentState | null;
|
|
3085
3906
|
private mergeRuntimeMetadata;
|
|
3907
|
+
private didSessionValueChange;
|
|
3086
3908
|
waitForMetadataUpdate(signal?: AbortSignal): Promise<Metadata | null>;
|
|
3087
3909
|
/**
|
|
3088
3910
|
* Send message to session
|
|
@@ -3146,6 +3968,7 @@ declare class ApiSessionClient extends EventEmitter {
|
|
|
3146
3968
|
* The plaintext JSON is parsed and validated as a UserMessage.
|
|
3147
3969
|
*/
|
|
3148
3970
|
private dispatchPlaintextSessionMessage;
|
|
3971
|
+
private dispatchSessionTranscriptMessage;
|
|
3149
3972
|
private maybeAutoAcknowledgeHappyOrgDispatch;
|
|
3150
3973
|
private resolveHappyOrgDispatchBusinessAckCandidate;
|
|
3151
3974
|
private hasRecordedHappyOrgDispatchAck;
|
|
@@ -3203,6 +4026,10 @@ interface SpawnSessionOptions {
|
|
|
3203
4026
|
TMUX_SESSION_NAME?: string;
|
|
3204
4027
|
TMUX_TMPDIR?: string;
|
|
3205
4028
|
};
|
|
4029
|
+
resume?: SpawnSessionResumeOptions;
|
|
4030
|
+
}
|
|
4031
|
+
interface SpawnSessionResumeOptions {
|
|
4032
|
+
providerSessionId: string;
|
|
3206
4033
|
}
|
|
3207
4034
|
type SpawnSessionResult = {
|
|
3208
4035
|
type: 'success';
|