happy-imou-cloud 2.1.57 → 2.1.59
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-C67V1qL3.cjs → BaseReasoningProcessor-BSlD8znO.cjs} +1 -1
- package/dist/{BaseReasoningProcessor-D2Q8Nme5.mjs → BaseReasoningProcessor-CCk42d9N.mjs} +1 -1
- package/dist/{ConversationHistory-BBIe2m4P.mjs → ConversationHistory-DK27K3JQ.mjs} +3 -2
- package/dist/{ConversationHistory-atrS3PAx.cjs → ConversationHistory-DeQgZhJ6.cjs} +3 -2
- package/dist/{ProviderSelectionHandler-Qi2pFTxL.mjs → ProviderSelectionHandler-BOpj_9DE.mjs} +76 -3
- package/dist/{ProviderSelectionHandler-h3z4-foa.cjs → ProviderSelectionHandler-D8CA-qU2.cjs} +80 -6
- package/dist/{bootstrapManagedProviderSession-RLtyRq0n.cjs → bootstrapManagedProviderSession-CIeuJe8e.cjs} +8 -6
- package/dist/{bootstrapManagedProviderSession-AhAYHLGj.mjs → bootstrapManagedProviderSession-CIlq-ugZ.mjs} +5 -3
- package/dist/{command-CyzKMQbs.cjs → command-Di3Fzz-y.cjs} +14 -4
- package/dist/{command-DRRTqKEA.mjs → command-DwgpAaWb.mjs} +14 -4
- package/dist/index-DxN29QWa.cjs +13103 -0
- package/dist/index-lyHSYtcT.mjs +13085 -0
- package/dist/index.cjs +18 -11
- package/dist/index.mjs +18 -11
- package/dist/{installFatalProcessHandlers-DyyiLNrG.cjs → installFatalProcessHandlers-1tGjAPvJ.cjs} +1 -1
- package/dist/{installFatalProcessHandlers-B99QpyLN.mjs → installFatalProcessHandlers-D8bPk4i9.mjs} +1 -1
- package/dist/{launch-DRd9FuLt.mjs → launch-CZph2kt_.mjs} +14 -4
- package/dist/{launch-DnWvtpv4.cjs → launch-CtQOCN5k.cjs} +14 -4
- package/dist/lib.cjs +14 -4
- package/dist/lib.d.cts +3049 -381
- package/dist/lib.d.mts +3049 -381
- package/dist/lib.mjs +14 -4
- package/dist/{runClaude-DOlxK2PO.cjs → runClaude-CeqPnUbU.cjs} +38 -147
- package/dist/{runClaude-Df_7_PkI.mjs → runClaude-Xh_udlwO.mjs} +20 -129
- package/dist/runCodex-BSKTTl6d.mjs +9021 -0
- package/dist/runCodex-Dh9NvwOY.cjs +9026 -0
- package/dist/{runCursor-CqElKVpg.mjs → runCursor-2Q3v6cl1.mjs} +22 -13
- package/dist/{runCursor-ClUxehsP.cjs → runCursor-DddNgWaI.cjs} +23 -14
- package/dist/{runGemini-CmrMnkBU.cjs → runGemini-B_4ILaqM.cjs} +29 -293
- package/dist/{runGemini-CVyRbdZg.mjs → runGemini-C2xofHuV.mjs} +23 -287
- package/dist/{sessionControl-BovRthCu.mjs → sessionControl-Bmadpvu8.mjs} +68 -242
- package/dist/{sessionControl-C1bgV3SZ.cjs → sessionControl-JLtbfkf2.cjs} +67 -245
- package/dist/types-CYn-pPZa.cjs +64520 -0
- package/dist/types-CotaFNj0.mjs +64350 -0
- package/package.json +27 -20
- package/scripts/e2e/codex-app-server-goal-smoke.mjs +159 -0
- package/scripts/e2e/codex-mcp-memory-summarizer-smoke.mjs +255 -0
- package/scripts/e2e/fake-codex-app-server.mjs +267 -0
- package/scripts/e2e/local-server-session-roundtrip.mjs +1751 -432
- package/scripts/e2e/mcp-stdio-real-server-probe.mjs +189 -0
- package/dist/config-BXTUTPxJ.mjs +0 -174
- package/dist/config-BqFnXbs0.cjs +0 -184
- package/dist/index-BCLSXYQP.mjs +0 -7565
- package/dist/index-BoSqCbVr.cjs +0 -7582
- package/dist/runCodex-ClqZb2wh.cjs +0 -2307
- package/dist/runCodex-DP-67NuP.mjs +0 -2302
- package/dist/types-BZeEK90l.mjs +0 -14091
- package/dist/types-CcsR2bJq.cjs +0 -14185
package/dist/lib.d.cts
CHANGED
|
@@ -363,15 +363,15 @@ declare const HappyOrgTurnReportSchema: z.ZodObject<{
|
|
|
363
363
|
flavor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
364
364
|
}, "strip", z.ZodTypeAny, {
|
|
365
365
|
homeSlug: string;
|
|
366
|
-
path?: string | null | undefined;
|
|
367
366
|
machineId?: string | null | undefined;
|
|
367
|
+
path?: string | null | undefined;
|
|
368
368
|
startedBy?: "daemon" | "terminal" | null | undefined;
|
|
369
369
|
flavor?: string | null | undefined;
|
|
370
370
|
happySessionId?: string | null | undefined;
|
|
371
371
|
}, {
|
|
372
372
|
homeSlug: string;
|
|
373
|
-
path?: string | null | undefined;
|
|
374
373
|
machineId?: string | null | undefined;
|
|
374
|
+
path?: string | null | undefined;
|
|
375
375
|
startedBy?: "daemon" | "terminal" | null | undefined;
|
|
376
376
|
flavor?: string | null | undefined;
|
|
377
377
|
happySessionId?: string | null | undefined;
|
|
@@ -445,8 +445,8 @@ declare const HappyOrgTurnReportSchema: z.ZodObject<{
|
|
|
445
445
|
} | null | undefined;
|
|
446
446
|
specialistHome?: {
|
|
447
447
|
homeSlug: string;
|
|
448
|
-
path?: string | null | undefined;
|
|
449
448
|
machineId?: string | null | undefined;
|
|
449
|
+
path?: string | null | undefined;
|
|
450
450
|
startedBy?: "daemon" | "terminal" | null | undefined;
|
|
451
451
|
flavor?: string | null | undefined;
|
|
452
452
|
happySessionId?: string | null | undefined;
|
|
@@ -498,8 +498,8 @@ declare const HappyOrgTurnReportSchema: z.ZodObject<{
|
|
|
498
498
|
} | null | undefined;
|
|
499
499
|
specialistHome?: {
|
|
500
500
|
homeSlug: string;
|
|
501
|
-
path?: string | null | undefined;
|
|
502
501
|
machineId?: string | null | undefined;
|
|
502
|
+
path?: string | null | undefined;
|
|
503
503
|
startedBy?: "daemon" | "terminal" | null | undefined;
|
|
504
504
|
flavor?: string | null | undefined;
|
|
505
505
|
happySessionId?: string | null | undefined;
|
|
@@ -695,15 +695,15 @@ declare const HappyOrgMetadataSchema: z.ZodObject<{
|
|
|
695
695
|
flavor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
696
696
|
}, "strip", z.ZodTypeAny, {
|
|
697
697
|
homeSlug: string;
|
|
698
|
-
path?: string | null | undefined;
|
|
699
698
|
machineId?: string | null | undefined;
|
|
699
|
+
path?: string | null | undefined;
|
|
700
700
|
startedBy?: "daemon" | "terminal" | null | undefined;
|
|
701
701
|
flavor?: string | null | undefined;
|
|
702
702
|
happySessionId?: string | null | undefined;
|
|
703
703
|
}, {
|
|
704
704
|
homeSlug: string;
|
|
705
|
-
path?: string | null | undefined;
|
|
706
705
|
machineId?: string | null | undefined;
|
|
706
|
+
path?: string | null | undefined;
|
|
707
707
|
startedBy?: "daemon" | "terminal" | null | undefined;
|
|
708
708
|
flavor?: string | null | undefined;
|
|
709
709
|
happySessionId?: string | null | undefined;
|
|
@@ -842,15 +842,15 @@ declare const HappyOrgMetadataSchema: z.ZodObject<{
|
|
|
842
842
|
flavor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
843
843
|
}, "strip", z.ZodTypeAny, {
|
|
844
844
|
homeSlug: string;
|
|
845
|
-
path?: string | null | undefined;
|
|
846
845
|
machineId?: string | null | undefined;
|
|
846
|
+
path?: string | null | undefined;
|
|
847
847
|
startedBy?: "daemon" | "terminal" | null | undefined;
|
|
848
848
|
flavor?: string | null | undefined;
|
|
849
849
|
happySessionId?: string | null | undefined;
|
|
850
850
|
}, {
|
|
851
851
|
homeSlug: string;
|
|
852
|
-
path?: string | null | undefined;
|
|
853
852
|
machineId?: string | null | undefined;
|
|
853
|
+
path?: string | null | undefined;
|
|
854
854
|
startedBy?: "daemon" | "terminal" | null | undefined;
|
|
855
855
|
flavor?: string | null | undefined;
|
|
856
856
|
happySessionId?: string | null | undefined;
|
|
@@ -924,8 +924,8 @@ declare const HappyOrgMetadataSchema: z.ZodObject<{
|
|
|
924
924
|
} | null | undefined;
|
|
925
925
|
specialistHome?: {
|
|
926
926
|
homeSlug: string;
|
|
927
|
-
path?: string | null | undefined;
|
|
928
927
|
machineId?: string | null | undefined;
|
|
928
|
+
path?: string | null | undefined;
|
|
929
929
|
startedBy?: "daemon" | "terminal" | null | undefined;
|
|
930
930
|
flavor?: string | null | undefined;
|
|
931
931
|
happySessionId?: string | null | undefined;
|
|
@@ -977,8 +977,8 @@ declare const HappyOrgMetadataSchema: z.ZodObject<{
|
|
|
977
977
|
} | null | undefined;
|
|
978
978
|
specialistHome?: {
|
|
979
979
|
homeSlug: string;
|
|
980
|
-
path?: string | null | undefined;
|
|
981
980
|
machineId?: string | null | undefined;
|
|
981
|
+
path?: string | null | undefined;
|
|
982
982
|
startedBy?: "daemon" | "terminal" | null | undefined;
|
|
983
983
|
flavor?: string | null | undefined;
|
|
984
984
|
happySessionId?: string | null | undefined;
|
|
@@ -1025,8 +1025,8 @@ declare const HappyOrgMetadataSchema: z.ZodObject<{
|
|
|
1025
1025
|
} | null | undefined;
|
|
1026
1026
|
specialistHome?: {
|
|
1027
1027
|
homeSlug: string;
|
|
1028
|
-
path?: string | null | undefined;
|
|
1029
1028
|
machineId?: string | null | undefined;
|
|
1029
|
+
path?: string | null | undefined;
|
|
1030
1030
|
startedBy?: "daemon" | "terminal" | null | undefined;
|
|
1031
1031
|
flavor?: string | null | undefined;
|
|
1032
1032
|
happySessionId?: string | null | undefined;
|
|
@@ -1118,8 +1118,8 @@ declare const HappyOrgMetadataSchema: z.ZodObject<{
|
|
|
1118
1118
|
} | null | undefined;
|
|
1119
1119
|
specialistHome?: {
|
|
1120
1120
|
homeSlug: string;
|
|
1121
|
-
path?: string | null | undefined;
|
|
1122
1121
|
machineId?: string | null | undefined;
|
|
1122
|
+
path?: string | null | undefined;
|
|
1123
1123
|
startedBy?: "daemon" | "terminal" | null | undefined;
|
|
1124
1124
|
flavor?: string | null | undefined;
|
|
1125
1125
|
happySessionId?: string | null | undefined;
|
|
@@ -1166,8 +1166,8 @@ declare const HappyOrgMetadataSchema: z.ZodObject<{
|
|
|
1166
1166
|
} | null | undefined;
|
|
1167
1167
|
specialistHome?: {
|
|
1168
1168
|
homeSlug: string;
|
|
1169
|
-
path?: string | null | undefined;
|
|
1170
1169
|
machineId?: string | null | undefined;
|
|
1170
|
+
path?: string | null | undefined;
|
|
1171
1171
|
startedBy?: "daemon" | "terminal" | null | undefined;
|
|
1172
1172
|
flavor?: string | null | undefined;
|
|
1173
1173
|
happySessionId?: string | null | undefined;
|
|
@@ -1259,8 +1259,8 @@ declare const HappyOrgMetadataSchema: z.ZodObject<{
|
|
|
1259
1259
|
} | null | undefined;
|
|
1260
1260
|
specialistHome?: {
|
|
1261
1261
|
homeSlug: string;
|
|
1262
|
-
path?: string | null | undefined;
|
|
1263
1262
|
machineId?: string | null | undefined;
|
|
1263
|
+
path?: string | null | undefined;
|
|
1264
1264
|
startedBy?: "daemon" | "terminal" | null | undefined;
|
|
1265
1265
|
flavor?: string | null | undefined;
|
|
1266
1266
|
happySessionId?: string | null | undefined;
|
|
@@ -1281,6 +1281,430 @@ declare const HappyOrgMetadataSchema: z.ZodObject<{
|
|
|
1281
1281
|
}>;
|
|
1282
1282
|
type HappyOrgMetadata = z.infer<typeof HappyOrgMetadataSchema>;
|
|
1283
1283
|
|
|
1284
|
+
declare const CONNECTED_SERVICE_IDS: readonly ["openai-codex", "openai", "anthropic", "claude-subscription", "gemini", "github"];
|
|
1285
|
+
type ConnectedServiceId = (typeof CONNECTED_SERVICE_IDS)[number];
|
|
1286
|
+
type ConnectedServiceProfileId = string;
|
|
1287
|
+
type ConnectedServiceOauthCredentialPayload = Readonly<{
|
|
1288
|
+
accessToken: string;
|
|
1289
|
+
refreshToken: string;
|
|
1290
|
+
idToken: string | null;
|
|
1291
|
+
scope: string | null;
|
|
1292
|
+
tokenType: string | null;
|
|
1293
|
+
providerAccountId: string | null;
|
|
1294
|
+
providerEmail: string | null;
|
|
1295
|
+
raw: unknown | null;
|
|
1296
|
+
}>;
|
|
1297
|
+
type ConnectedServiceTokenCredentialPayload = Readonly<{
|
|
1298
|
+
token: string;
|
|
1299
|
+
providerAccountId: string | null;
|
|
1300
|
+
providerEmail: string | null;
|
|
1301
|
+
raw: unknown | null;
|
|
1302
|
+
}>;
|
|
1303
|
+
type ConnectedServiceCredentialRecordV1 = Readonly<{
|
|
1304
|
+
v: 1;
|
|
1305
|
+
serviceId: ConnectedServiceId;
|
|
1306
|
+
profileId: ConnectedServiceProfileId;
|
|
1307
|
+
kind: 'oauth';
|
|
1308
|
+
createdAt: number;
|
|
1309
|
+
updatedAt: number;
|
|
1310
|
+
expiresAt: number | null;
|
|
1311
|
+
oauth: ConnectedServiceOauthCredentialPayload;
|
|
1312
|
+
token: null;
|
|
1313
|
+
}> | Readonly<{
|
|
1314
|
+
v: 1;
|
|
1315
|
+
serviceId: ConnectedServiceId;
|
|
1316
|
+
profileId: ConnectedServiceProfileId;
|
|
1317
|
+
kind: 'token';
|
|
1318
|
+
createdAt: number;
|
|
1319
|
+
updatedAt: number;
|
|
1320
|
+
expiresAt: number | null;
|
|
1321
|
+
oauth: null;
|
|
1322
|
+
token: ConnectedServiceTokenCredentialPayload;
|
|
1323
|
+
}>;
|
|
1324
|
+
declare const CONNECTED_SERVICE_QUOTA_UNITS: readonly ["count", "tokens", "credits", "usd", "requests", "unknown"];
|
|
1325
|
+
type ConnectedServiceQuotaUnitV1 = (typeof CONNECTED_SERVICE_QUOTA_UNITS)[number];
|
|
1326
|
+
type ConnectedServiceQuotaMeterV1 = Readonly<{
|
|
1327
|
+
meterId: string;
|
|
1328
|
+
label: string;
|
|
1329
|
+
used: number | null;
|
|
1330
|
+
limit: number | null;
|
|
1331
|
+
unit: ConnectedServiceQuotaUnitV1;
|
|
1332
|
+
utilizationPct: number | null;
|
|
1333
|
+
resetsAt: number | null;
|
|
1334
|
+
status: 'ok' | 'unavailable' | 'estimated';
|
|
1335
|
+
details: Readonly<{
|
|
1336
|
+
note?: string | null;
|
|
1337
|
+
}>;
|
|
1338
|
+
}>;
|
|
1339
|
+
type ConnectedServiceQuotaSnapshotV1 = Readonly<{
|
|
1340
|
+
v: 1;
|
|
1341
|
+
serviceId: ConnectedServiceId;
|
|
1342
|
+
profileId: ConnectedServiceProfileId;
|
|
1343
|
+
fetchedAt: number;
|
|
1344
|
+
staleAfterMs: number;
|
|
1345
|
+
planLabel: string | null;
|
|
1346
|
+
accountLabel: string | null;
|
|
1347
|
+
meters: readonly ConnectedServiceQuotaMeterV1[];
|
|
1348
|
+
}>;
|
|
1349
|
+
|
|
1350
|
+
type AccountConnectedServiceV2Profile = Readonly<{
|
|
1351
|
+
profileId: string;
|
|
1352
|
+
status: 'connected' | 'needs_reauth';
|
|
1353
|
+
kind: 'oauth' | 'token' | null;
|
|
1354
|
+
providerEmail: string | null;
|
|
1355
|
+
providerAccountId: string | null;
|
|
1356
|
+
expiresAt: number | null;
|
|
1357
|
+
lastUsedAt: number | null;
|
|
1358
|
+
}>;
|
|
1359
|
+
type AccountConnectedServiceV2Service = Readonly<{
|
|
1360
|
+
serviceId: ConnectedServiceId;
|
|
1361
|
+
profiles: AccountConnectedServiceV2Profile[];
|
|
1362
|
+
}>;
|
|
1363
|
+
|
|
1364
|
+
type UsageLimitRecoverySettingsV1 = {
|
|
1365
|
+
v: 1;
|
|
1366
|
+
mode: 'ask' | 'auto_wait' | 'auto_switch';
|
|
1367
|
+
promptMode: 'standard';
|
|
1368
|
+
resumePromptMode: 'standard' | 'off';
|
|
1369
|
+
};
|
|
1370
|
+
|
|
1371
|
+
type ActionSurface = 'ui_button' | 'ui_slash_command' | 'voice_tool' | 'voice_action_block' | 'session_agent' | 'mcp' | 'cli';
|
|
1372
|
+
declare const ACTION_TOOL_EXPOSURE_SURFACES: readonly ["session_agent", "mcp", "cli"];
|
|
1373
|
+
type ActionToolExposureSurface = (typeof ACTION_TOOL_EXPOSURE_SURFACES)[number];
|
|
1374
|
+
declare const ACTION_TOOL_EXPOSURE_MODES: readonly ["direct", "discoverable_only"];
|
|
1375
|
+
type ActionToolExposureMode = (typeof ACTION_TOOL_EXPOSURE_MODES)[number];
|
|
1376
|
+
|
|
1377
|
+
type ActionSettingsOverrideV1 = Readonly<{
|
|
1378
|
+
enabled?: boolean;
|
|
1379
|
+
disabledSurfaces?: readonly ActionSurface[];
|
|
1380
|
+
approvalRequiredSurfaces?: readonly ActionSurface[];
|
|
1381
|
+
enabledPlacements?: readonly string[];
|
|
1382
|
+
disabledPlacements?: readonly string[];
|
|
1383
|
+
toolExposureModes?: Partial<Readonly<Record<ActionToolExposureSurface, ActionToolExposureMode>>>;
|
|
1384
|
+
}>;
|
|
1385
|
+
type ActionsSettingsV1 = Readonly<{
|
|
1386
|
+
v: 1;
|
|
1387
|
+
actions: Readonly<Record<string, ActionSettingsOverrideV1>>;
|
|
1388
|
+
}>;
|
|
1389
|
+
|
|
1390
|
+
declare const FOREGROUND_BEHAVIORS: readonly ["full", "silent", "off"];
|
|
1391
|
+
type ForegroundBehavior = (typeof FOREGROUND_BEHAVIORS)[number];
|
|
1392
|
+
type NotificationsSettingsV1 = Readonly<{
|
|
1393
|
+
v: 1;
|
|
1394
|
+
pushEnabled: boolean;
|
|
1395
|
+
ready: boolean;
|
|
1396
|
+
permissionRequest: boolean;
|
|
1397
|
+
userActionRequest: boolean;
|
|
1398
|
+
foregroundBehavior: ForegroundBehavior;
|
|
1399
|
+
}>;
|
|
1400
|
+
type AccountServerProfileV1 = Readonly<{
|
|
1401
|
+
id: string;
|
|
1402
|
+
name: string;
|
|
1403
|
+
serverUrl: string;
|
|
1404
|
+
webappUrl: string;
|
|
1405
|
+
updatedAt: number;
|
|
1406
|
+
}>;
|
|
1407
|
+
type AccountServerProfileDeletionV1 = Readonly<{
|
|
1408
|
+
id: string;
|
|
1409
|
+
deletedAt: number;
|
|
1410
|
+
}>;
|
|
1411
|
+
type ServerProfilesSettingsV1 = Readonly<{
|
|
1412
|
+
v: 1;
|
|
1413
|
+
activeProfileId: string;
|
|
1414
|
+
activeProfileUpdatedAt: number;
|
|
1415
|
+
profiles: readonly AccountServerProfileV1[];
|
|
1416
|
+
deletedProfiles: readonly AccountServerProfileDeletionV1[];
|
|
1417
|
+
}>;
|
|
1418
|
+
type AccountSettings = Readonly<Record<string, unknown> & {
|
|
1419
|
+
schemaVersion: number;
|
|
1420
|
+
backendEnabledById: Readonly<Record<string, boolean>>;
|
|
1421
|
+
scmIncludeCoAuthoredBy?: boolean;
|
|
1422
|
+
actionsSettingsV1: ActionsSettingsV1;
|
|
1423
|
+
notificationsSettingsV1: NotificationsSettingsV1;
|
|
1424
|
+
usageLimitRecoverySettingsV1: UsageLimitRecoverySettingsV1;
|
|
1425
|
+
serverProfilesV1: ServerProfilesSettingsV1;
|
|
1426
|
+
}>;
|
|
1427
|
+
|
|
1428
|
+
type AccountSettingsStoredContentEnvelope = Readonly<{
|
|
1429
|
+
t: 'plain';
|
|
1430
|
+
v: AccountSettings;
|
|
1431
|
+
}> | Readonly<{
|
|
1432
|
+
t: 'encrypted';
|
|
1433
|
+
c: string;
|
|
1434
|
+
}>;
|
|
1435
|
+
|
|
1436
|
+
declare const SESSION_GOAL_SET_STATUSES: readonly ["pending", "active", "paused", "blocked", "complete", "cancelled", "unknown"];
|
|
1437
|
+
type SessionGoalSetStatusV1 = (typeof SESSION_GOAL_SET_STATUSES)[number];
|
|
1438
|
+
type SessionGoalSetRequestV1 = Record<string, unknown> & {
|
|
1439
|
+
objective?: string;
|
|
1440
|
+
status?: SessionGoalSetStatusV1;
|
|
1441
|
+
tokenBudget?: number | null;
|
|
1442
|
+
};
|
|
1443
|
+
type SessionInitialGoalRequestV1 = SessionGoalSetRequestV1 & {
|
|
1444
|
+
objective: string;
|
|
1445
|
+
};
|
|
1446
|
+
|
|
1447
|
+
type ActionExecuteResult = Readonly<{
|
|
1448
|
+
ok: true;
|
|
1449
|
+
result: unknown;
|
|
1450
|
+
}> | Readonly<{
|
|
1451
|
+
ok: false;
|
|
1452
|
+
errorCode: string;
|
|
1453
|
+
error: string;
|
|
1454
|
+
}>;
|
|
1455
|
+
|
|
1456
|
+
declare const DIRECT_SESSIONS_PROVIDER_IDS: readonly ["codex", "claude", "gemini"];
|
|
1457
|
+
declare const DIRECT_SESSION_ACTIVITIES: readonly ["running", "active_recently", "idle", "unknown"];
|
|
1458
|
+
declare const DIRECT_SESSIONS_ERROR_CODES: readonly ["invalid_request", "machine_offline", "provider_unavailable", "internal_error"];
|
|
1459
|
+
type DirectSessionsProviderId = (typeof DIRECT_SESSIONS_PROVIDER_IDS)[number];
|
|
1460
|
+
type DirectSessionActivityV1 = (typeof DIRECT_SESSION_ACTIVITIES)[number];
|
|
1461
|
+
type DirectSessionsErrorCode = (typeof DIRECT_SESSIONS_ERROR_CODES)[number];
|
|
1462
|
+
type DirectSessionsSource = Readonly<{
|
|
1463
|
+
kind: 'codexHome';
|
|
1464
|
+
home: 'user' | 'connectedService';
|
|
1465
|
+
homePath?: string;
|
|
1466
|
+
connectedServiceId?: string;
|
|
1467
|
+
connectedServiceProfileId?: string;
|
|
1468
|
+
connectedServiceGroupId?: string;
|
|
1469
|
+
} & Record<string, unknown>> | Readonly<{
|
|
1470
|
+
kind: 'claudeConfig';
|
|
1471
|
+
configDir?: string | null;
|
|
1472
|
+
projectId?: string | null;
|
|
1473
|
+
} & Record<string, unknown>> | Readonly<{
|
|
1474
|
+
kind: 'opencodeServer';
|
|
1475
|
+
baseUrl?: string | null;
|
|
1476
|
+
directory?: string | null;
|
|
1477
|
+
} & Record<string, unknown>>;
|
|
1478
|
+
type DirectTranscriptRawMessageV1 = Readonly<{
|
|
1479
|
+
id: string;
|
|
1480
|
+
createdAtMs: number;
|
|
1481
|
+
localId?: string | null;
|
|
1482
|
+
raw: Record<string, unknown>;
|
|
1483
|
+
} & Record<string, unknown>>;
|
|
1484
|
+
type DirectSessionTranscriptDeltaEphemeral = Readonly<{
|
|
1485
|
+
type: 'direct-session-transcript-delta';
|
|
1486
|
+
sessionId: string;
|
|
1487
|
+
items: readonly DirectTranscriptRawMessageV1[];
|
|
1488
|
+
nextCursor?: string | null;
|
|
1489
|
+
truncated: boolean;
|
|
1490
|
+
} & Record<string, unknown>>;
|
|
1491
|
+
type DirectSessionFollowPolicy = 'attached_only' | 'background_follow';
|
|
1492
|
+
type DirectSessionObservedProgress = Readonly<{
|
|
1493
|
+
token: string;
|
|
1494
|
+
atMs: number;
|
|
1495
|
+
}>;
|
|
1496
|
+
declare function deriveDirectSessionObservedProgress(items: ReadonlyArray<Pick<DirectTranscriptRawMessageV1, 'createdAtMs' | 'id'>>): DirectSessionObservedProgress | null;
|
|
1497
|
+
|
|
1498
|
+
type MemoryDefaultScopeV1 = Readonly<{
|
|
1499
|
+
type: 'global';
|
|
1500
|
+
} & Record<string, unknown>> | Readonly<{
|
|
1501
|
+
type: 'session';
|
|
1502
|
+
} & Record<string, unknown>>;
|
|
1503
|
+
type MemoryHintsSettingsV1 = Readonly<{
|
|
1504
|
+
summarizerBackendId: string;
|
|
1505
|
+
summarizerModelId: string;
|
|
1506
|
+
summarizerPermissionMode: 'no_tools' | 'read_only';
|
|
1507
|
+
windowSizeMessages: number;
|
|
1508
|
+
maxShardChars: number;
|
|
1509
|
+
maxSummaryChars: number;
|
|
1510
|
+
paddingMessagesOnVerify: number;
|
|
1511
|
+
updateMode: 'onIdle' | 'continuous';
|
|
1512
|
+
idleDelayMs: number;
|
|
1513
|
+
maxRunsPerHour: number;
|
|
1514
|
+
failureBackoffBaseMs: number;
|
|
1515
|
+
failureBackoffMaxMs: number;
|
|
1516
|
+
maxShardsPerSession: number;
|
|
1517
|
+
maxKeywords: number;
|
|
1518
|
+
maxEntities: number;
|
|
1519
|
+
maxDecisions: number;
|
|
1520
|
+
} & Record<string, unknown>>;
|
|
1521
|
+
type MemoryDeepSettingsV1 = Readonly<{
|
|
1522
|
+
recentDays: number;
|
|
1523
|
+
maxChunkChars: number;
|
|
1524
|
+
maxChunkMessages: number;
|
|
1525
|
+
minChunkMessages: number;
|
|
1526
|
+
includeAssistantAcpMessage: boolean;
|
|
1527
|
+
includeToolOutput: boolean;
|
|
1528
|
+
candidateLimit: number;
|
|
1529
|
+
previewChars: number;
|
|
1530
|
+
failureBackoffBaseMs: number;
|
|
1531
|
+
failureBackoffMaxMs: number;
|
|
1532
|
+
} & Record<string, unknown>>;
|
|
1533
|
+
type MemoryEmbeddingsSettingsV1 = Readonly<{
|
|
1534
|
+
enabled: boolean;
|
|
1535
|
+
provider: 'local_transformers' | 'remote';
|
|
1536
|
+
modelId: string;
|
|
1537
|
+
wFts: number;
|
|
1538
|
+
wEmb: number;
|
|
1539
|
+
} & Record<string, unknown>>;
|
|
1540
|
+
type MemoryBudgetsSettingsV1 = Readonly<{
|
|
1541
|
+
maxDiskMbLight: number;
|
|
1542
|
+
maxDiskMbDeep: number;
|
|
1543
|
+
} & Record<string, unknown>>;
|
|
1544
|
+
type MemoryWorkerSettingsV1 = Readonly<{
|
|
1545
|
+
tickIntervalMs: number;
|
|
1546
|
+
inventoryRefreshIntervalMs: number;
|
|
1547
|
+
maxSessionsPerTick: number;
|
|
1548
|
+
sessionListPageLimit: number;
|
|
1549
|
+
} & Record<string, unknown>>;
|
|
1550
|
+
type MemorySettingsV1 = Readonly<{
|
|
1551
|
+
v: 1;
|
|
1552
|
+
enabled: boolean;
|
|
1553
|
+
indexMode: 'hints' | 'deep';
|
|
1554
|
+
defaultScope: MemoryDefaultScopeV1;
|
|
1555
|
+
backfillPolicy: 'new_only' | 'last_30_days' | 'all_history';
|
|
1556
|
+
deleteOnDisable: boolean;
|
|
1557
|
+
hints: MemoryHintsSettingsV1;
|
|
1558
|
+
deep: MemoryDeepSettingsV1;
|
|
1559
|
+
embeddings: MemoryEmbeddingsSettingsV1;
|
|
1560
|
+
budgets: MemoryBudgetsSettingsV1;
|
|
1561
|
+
worker: MemoryWorkerSettingsV1;
|
|
1562
|
+
} & Record<string, unknown>>;
|
|
1563
|
+
|
|
1564
|
+
type McpValueRefV1 = Readonly<{
|
|
1565
|
+
t: 'literal';
|
|
1566
|
+
v: string;
|
|
1567
|
+
}> | Readonly<{
|
|
1568
|
+
t: 'savedSecret';
|
|
1569
|
+
secretId: string;
|
|
1570
|
+
}>;
|
|
1571
|
+
type McpServerCatalogEntryTransportV1 = 'stdio' | 'http' | 'sse';
|
|
1572
|
+
type McpServerCatalogEntryV1 = Readonly<{
|
|
1573
|
+
id: string;
|
|
1574
|
+
name: string;
|
|
1575
|
+
title?: string;
|
|
1576
|
+
description?: string;
|
|
1577
|
+
transport: McpServerCatalogEntryTransportV1;
|
|
1578
|
+
stdio?: Readonly<{
|
|
1579
|
+
command: string;
|
|
1580
|
+
args: readonly string[];
|
|
1581
|
+
}>;
|
|
1582
|
+
remote?: Readonly<{
|
|
1583
|
+
url: string;
|
|
1584
|
+
headers: Readonly<Record<string, McpValueRefV1>>;
|
|
1585
|
+
}>;
|
|
1586
|
+
env: Readonly<Record<string, McpValueRefV1>>;
|
|
1587
|
+
createdAt: number;
|
|
1588
|
+
updatedAt: number;
|
|
1589
|
+
} & Record<string, unknown>>;
|
|
1590
|
+
type McpServerBindingTargetV1 = Readonly<{
|
|
1591
|
+
t: 'allMachines';
|
|
1592
|
+
}> | Readonly<{
|
|
1593
|
+
t: 'machine';
|
|
1594
|
+
machineId: string;
|
|
1595
|
+
}> | Readonly<{
|
|
1596
|
+
t: 'workspace';
|
|
1597
|
+
machineId: string;
|
|
1598
|
+
workspaceRoot: string;
|
|
1599
|
+
}>;
|
|
1600
|
+
type McpServerBindingOverridesV1 = Readonly<{
|
|
1601
|
+
stdio?: Readonly<{
|
|
1602
|
+
command?: string;
|
|
1603
|
+
args?: readonly string[];
|
|
1604
|
+
}>;
|
|
1605
|
+
remote?: Readonly<{
|
|
1606
|
+
url?: string;
|
|
1607
|
+
headersPatch?: Readonly<Record<string, McpValueRefV1 | null>>;
|
|
1608
|
+
}>;
|
|
1609
|
+
envPatch?: Readonly<Record<string, McpValueRefV1 | null>>;
|
|
1610
|
+
}>;
|
|
1611
|
+
type McpServerBindingV1 = Readonly<{
|
|
1612
|
+
id: string;
|
|
1613
|
+
serverId: string;
|
|
1614
|
+
enabled: boolean;
|
|
1615
|
+
target: McpServerBindingTargetV1;
|
|
1616
|
+
overrides?: McpServerBindingOverridesV1;
|
|
1617
|
+
createdAt: number;
|
|
1618
|
+
updatedAt: number;
|
|
1619
|
+
} & Record<string, unknown>>;
|
|
1620
|
+
type McpServersSettingsV1 = Readonly<{
|
|
1621
|
+
v: 1;
|
|
1622
|
+
strictMode: boolean;
|
|
1623
|
+
servers: readonly McpServerCatalogEntryV1[];
|
|
1624
|
+
bindings: readonly McpServerBindingV1[];
|
|
1625
|
+
} & Record<string, unknown>>;
|
|
1626
|
+
type DetectedMcpServerV1 = Readonly<{
|
|
1627
|
+
provider: string;
|
|
1628
|
+
name: string;
|
|
1629
|
+
transport: McpServerCatalogEntryTransportV1;
|
|
1630
|
+
stdio?: Readonly<{
|
|
1631
|
+
command: string;
|
|
1632
|
+
args: readonly string[];
|
|
1633
|
+
}>;
|
|
1634
|
+
remote?: Readonly<{
|
|
1635
|
+
url: string;
|
|
1636
|
+
headers: readonly string[];
|
|
1637
|
+
}>;
|
|
1638
|
+
envKeys: readonly string[];
|
|
1639
|
+
enabled: boolean | null;
|
|
1640
|
+
source: Readonly<{
|
|
1641
|
+
kind: 'user' | 'project';
|
|
1642
|
+
path: string;
|
|
1643
|
+
} & Record<string, unknown>>;
|
|
1644
|
+
} & Record<string, unknown>>;
|
|
1645
|
+
type DaemonMcpServersDetectWarningV1 = Readonly<{
|
|
1646
|
+
provider: string;
|
|
1647
|
+
code: 'read_failed' | 'parse_failed' | 'unsupported';
|
|
1648
|
+
path?: string;
|
|
1649
|
+
detail?: string;
|
|
1650
|
+
} & Record<string, unknown>>;
|
|
1651
|
+
|
|
1652
|
+
type TransferStreamEnvelope = Readonly<{
|
|
1653
|
+
transferId: string;
|
|
1654
|
+
kind: 'open';
|
|
1655
|
+
manifestHash: string;
|
|
1656
|
+
recipientPublicKeyBase64: string;
|
|
1657
|
+
openPayloadBase64?: string;
|
|
1658
|
+
}> | TransferChunkEnvelope | Readonly<{
|
|
1659
|
+
transferId: string;
|
|
1660
|
+
kind: 'ack';
|
|
1661
|
+
nextSequence: number;
|
|
1662
|
+
windowBytes?: number;
|
|
1663
|
+
}> | Readonly<{
|
|
1664
|
+
transferId: string;
|
|
1665
|
+
kind: 'finish';
|
|
1666
|
+
manifestHash: string;
|
|
1667
|
+
}> | Readonly<{
|
|
1668
|
+
transferId: string;
|
|
1669
|
+
kind: 'abort';
|
|
1670
|
+
reason: string;
|
|
1671
|
+
}>;
|
|
1672
|
+
type TransferChunkEnvelope = Readonly<{
|
|
1673
|
+
transferId: string;
|
|
1674
|
+
kind: 'chunk';
|
|
1675
|
+
sequence: number;
|
|
1676
|
+
payloadBase64: string;
|
|
1677
|
+
encryptedDataKeyEnvelopeBase64?: string;
|
|
1678
|
+
}>;
|
|
1679
|
+
type MachineTransferSendEnvelope = Readonly<{
|
|
1680
|
+
targetMachineId: string;
|
|
1681
|
+
envelope: TransferStreamEnvelope;
|
|
1682
|
+
}>;
|
|
1683
|
+
type MachineTransferReceiveEnvelope = Readonly<{
|
|
1684
|
+
sourceMachineId: string;
|
|
1685
|
+
targetMachineId: string;
|
|
1686
|
+
envelope: TransferStreamEnvelope;
|
|
1687
|
+
}>;
|
|
1688
|
+
|
|
1689
|
+
type SessionSummaryShardV1 = Readonly<{
|
|
1690
|
+
v: 1;
|
|
1691
|
+
seqFrom: number;
|
|
1692
|
+
seqTo: number;
|
|
1693
|
+
createdAtFromMs: number;
|
|
1694
|
+
createdAtToMs: number;
|
|
1695
|
+
summary: string;
|
|
1696
|
+
keywords: readonly string[];
|
|
1697
|
+
entities: readonly string[];
|
|
1698
|
+
decisions: readonly string[];
|
|
1699
|
+
} & Record<string, unknown>>;
|
|
1700
|
+
|
|
1701
|
+
type SessionSynopsisV1 = Readonly<{
|
|
1702
|
+
v: 1;
|
|
1703
|
+
seqTo: number;
|
|
1704
|
+
updatedAtMs: number;
|
|
1705
|
+
synopsis: string;
|
|
1706
|
+
} & Record<string, unknown>>;
|
|
1707
|
+
|
|
1284
1708
|
/**
|
|
1285
1709
|
* Permission mode type - includes both Claude and Codex modes
|
|
1286
1710
|
* Must match MessageMetaSchema.permissionMode enum values
|
|
@@ -1351,7 +1775,7 @@ type SocketEphemeralEvent = {
|
|
|
1351
1775
|
machineId: string;
|
|
1352
1776
|
online: boolean;
|
|
1353
1777
|
timestamp: number;
|
|
1354
|
-
};
|
|
1778
|
+
} | DirectSessionTranscriptDeltaEphemeral;
|
|
1355
1779
|
/**
|
|
1356
1780
|
* Update event from server
|
|
1357
1781
|
*/
|
|
@@ -1392,10 +1816,10 @@ declare const UpdateSchema: z.ZodObject<{
|
|
|
1392
1816
|
flavor?: string | null | undefined;
|
|
1393
1817
|
}>>>;
|
|
1394
1818
|
}, "strip", z.ZodTypeAny, {
|
|
1819
|
+
metadata: string;
|
|
1395
1820
|
t: "new-session";
|
|
1396
1821
|
id: string;
|
|
1397
1822
|
seq: number;
|
|
1398
|
-
metadata: string;
|
|
1399
1823
|
metadataVersion: number;
|
|
1400
1824
|
agentState: string | null;
|
|
1401
1825
|
agentStateVersion: number;
|
|
@@ -1413,10 +1837,10 @@ declare const UpdateSchema: z.ZodObject<{
|
|
|
1413
1837
|
flavor?: string | null | undefined;
|
|
1414
1838
|
} | null | undefined;
|
|
1415
1839
|
}, {
|
|
1840
|
+
metadata: string;
|
|
1416
1841
|
t: "new-session";
|
|
1417
1842
|
id: string;
|
|
1418
1843
|
seq: number;
|
|
1419
|
-
metadata: string;
|
|
1420
1844
|
metadataVersion: number;
|
|
1421
1845
|
agentState: string | null;
|
|
1422
1846
|
agentStateVersion: number;
|
|
@@ -1569,12 +1993,12 @@ declare const UpdateSchema: z.ZodObject<{
|
|
|
1569
1993
|
}>>>;
|
|
1570
1994
|
}, "strip", z.ZodTypeAny, {
|
|
1571
1995
|
t: "update-session";
|
|
1572
|
-
id?: string | undefined;
|
|
1573
|
-
title?: string | null | undefined;
|
|
1574
1996
|
metadata?: {
|
|
1575
1997
|
value: string;
|
|
1576
1998
|
version: number;
|
|
1577
1999
|
} | null | undefined;
|
|
2000
|
+
id?: string | undefined;
|
|
2001
|
+
title?: string | null | undefined;
|
|
1578
2002
|
agentState?: {
|
|
1579
2003
|
value: string;
|
|
1580
2004
|
version: number;
|
|
@@ -1590,12 +2014,12 @@ declare const UpdateSchema: z.ZodObject<{
|
|
|
1590
2014
|
changeSeq?: number | undefined;
|
|
1591
2015
|
}, {
|
|
1592
2016
|
t: "update-session";
|
|
1593
|
-
id?: string | undefined;
|
|
1594
|
-
title?: string | null | undefined;
|
|
1595
2017
|
metadata?: {
|
|
1596
2018
|
value: string;
|
|
1597
2019
|
version: number;
|
|
1598
2020
|
} | null | undefined;
|
|
2021
|
+
id?: string | undefined;
|
|
2022
|
+
title?: string | null | undefined;
|
|
1599
2023
|
agentState?: {
|
|
1600
2024
|
value: string;
|
|
1601
2025
|
version: number;
|
|
@@ -1673,10 +2097,10 @@ declare const UpdateSchema: z.ZodObject<{
|
|
|
1673
2097
|
seq: number;
|
|
1674
2098
|
createdAt: number;
|
|
1675
2099
|
body: {
|
|
2100
|
+
metadata: string;
|
|
1676
2101
|
t: "new-session";
|
|
1677
2102
|
id: string;
|
|
1678
2103
|
seq: number;
|
|
1679
|
-
metadata: string;
|
|
1680
2104
|
metadataVersion: number;
|
|
1681
2105
|
agentState: string | null;
|
|
1682
2106
|
agentStateVersion: number;
|
|
@@ -1712,12 +2136,12 @@ declare const UpdateSchema: z.ZodObject<{
|
|
|
1712
2136
|
sid: string;
|
|
1713
2137
|
} | {
|
|
1714
2138
|
t: "update-session";
|
|
1715
|
-
id?: string | undefined;
|
|
1716
|
-
title?: string | null | undefined;
|
|
1717
2139
|
metadata?: {
|
|
1718
2140
|
value: string;
|
|
1719
2141
|
version: number;
|
|
1720
2142
|
} | null | undefined;
|
|
2143
|
+
id?: string | undefined;
|
|
2144
|
+
title?: string | null | undefined;
|
|
1721
2145
|
agentState?: {
|
|
1722
2146
|
value: string;
|
|
1723
2147
|
version: number;
|
|
@@ -1752,10 +2176,10 @@ declare const UpdateSchema: z.ZodObject<{
|
|
|
1752
2176
|
seq: number;
|
|
1753
2177
|
createdAt: number;
|
|
1754
2178
|
body: {
|
|
2179
|
+
metadata: string;
|
|
1755
2180
|
t: "new-session";
|
|
1756
2181
|
id: string;
|
|
1757
2182
|
seq: number;
|
|
1758
|
-
metadata: string;
|
|
1759
2183
|
metadataVersion: number;
|
|
1760
2184
|
agentState: string | null;
|
|
1761
2185
|
agentStateVersion: number;
|
|
@@ -1791,12 +2215,12 @@ declare const UpdateSchema: z.ZodObject<{
|
|
|
1791
2215
|
sid: string;
|
|
1792
2216
|
} | {
|
|
1793
2217
|
t: "update-session";
|
|
1794
|
-
id?: string | undefined;
|
|
1795
|
-
title?: string | null | undefined;
|
|
1796
2218
|
metadata?: {
|
|
1797
2219
|
value: string;
|
|
1798
2220
|
version: number;
|
|
1799
2221
|
} | null | undefined;
|
|
2222
|
+
id?: string | undefined;
|
|
2223
|
+
title?: string | null | undefined;
|
|
1800
2224
|
agentState?: {
|
|
1801
2225
|
value: string;
|
|
1802
2226
|
version: number;
|
|
@@ -1953,8 +2377,8 @@ declare const ProtocolV3SessionSnapshotResponseSchema: z.ZodObject<{
|
|
|
1953
2377
|
}, "strip", z.ZodTypeAny, {
|
|
1954
2378
|
id: string;
|
|
1955
2379
|
lastChangeSeq: number;
|
|
1956
|
-
title?: string | null | undefined;
|
|
1957
2380
|
metadata?: string | undefined;
|
|
2381
|
+
title?: string | null | undefined;
|
|
1958
2382
|
metadataVersion?: number | undefined;
|
|
1959
2383
|
agentState?: string | null | undefined;
|
|
1960
2384
|
agentStateVersion?: number | undefined;
|
|
@@ -1969,8 +2393,8 @@ declare const ProtocolV3SessionSnapshotResponseSchema: z.ZodObject<{
|
|
|
1969
2393
|
}, {
|
|
1970
2394
|
id: string;
|
|
1971
2395
|
lastChangeSeq: number;
|
|
1972
|
-
title?: string | null | undefined;
|
|
1973
2396
|
metadata?: string | undefined;
|
|
2397
|
+
title?: string | null | undefined;
|
|
1974
2398
|
metadataVersion?: number | undefined;
|
|
1975
2399
|
agentState?: string | null | undefined;
|
|
1976
2400
|
agentStateVersion?: number | undefined;
|
|
@@ -2074,20 +2498,11 @@ declare const ProtocolV3SessionSnapshotResponseSchema: z.ZodObject<{
|
|
|
2074
2498
|
oldestRetainedSeq: number | null;
|
|
2075
2499
|
}>;
|
|
2076
2500
|
}, "strip", z.ZodTypeAny, {
|
|
2077
|
-
protocol: {
|
|
2078
|
-
protocolVersion: string;
|
|
2079
|
-
capabilities: string[];
|
|
2080
|
-
serverVersion?: string | undefined;
|
|
2081
|
-
legacyFallback?: {
|
|
2082
|
-
http: string[];
|
|
2083
|
-
websocketPath: string;
|
|
2084
|
-
} | undefined;
|
|
2085
|
-
};
|
|
2086
2501
|
session: {
|
|
2087
2502
|
id: string;
|
|
2088
2503
|
lastChangeSeq: number;
|
|
2089
|
-
title?: string | null | undefined;
|
|
2090
2504
|
metadata?: string | undefined;
|
|
2505
|
+
title?: string | null | undefined;
|
|
2091
2506
|
metadataVersion?: number | undefined;
|
|
2092
2507
|
agentState?: string | null | undefined;
|
|
2093
2508
|
agentStateVersion?: number | undefined;
|
|
@@ -2100,6 +2515,15 @@ declare const ProtocolV3SessionSnapshotResponseSchema: z.ZodObject<{
|
|
|
2100
2515
|
pendingVersion?: number | undefined;
|
|
2101
2516
|
deleted?: boolean | undefined;
|
|
2102
2517
|
};
|
|
2518
|
+
protocol: {
|
|
2519
|
+
protocolVersion: string;
|
|
2520
|
+
capabilities: string[];
|
|
2521
|
+
serverVersion?: string | undefined;
|
|
2522
|
+
legacyFallback?: {
|
|
2523
|
+
http: string[];
|
|
2524
|
+
websocketPath: string;
|
|
2525
|
+
} | undefined;
|
|
2526
|
+
};
|
|
2103
2527
|
snapshot: {
|
|
2104
2528
|
messages: {
|
|
2105
2529
|
content: {
|
|
@@ -2119,20 +2543,11 @@ declare const ProtocolV3SessionSnapshotResponseSchema: z.ZodObject<{
|
|
|
2119
2543
|
oldestRetainedSeq: number | null;
|
|
2120
2544
|
};
|
|
2121
2545
|
}, {
|
|
2122
|
-
protocol: {
|
|
2123
|
-
protocolVersion: string;
|
|
2124
|
-
capabilities: string[];
|
|
2125
|
-
serverVersion?: string | undefined;
|
|
2126
|
-
legacyFallback?: {
|
|
2127
|
-
http: string[];
|
|
2128
|
-
websocketPath: string;
|
|
2129
|
-
} | undefined;
|
|
2130
|
-
};
|
|
2131
2546
|
session: {
|
|
2132
2547
|
id: string;
|
|
2133
2548
|
lastChangeSeq: number;
|
|
2134
|
-
title?: string | null | undefined;
|
|
2135
2549
|
metadata?: string | undefined;
|
|
2550
|
+
title?: string | null | undefined;
|
|
2136
2551
|
metadataVersion?: number | undefined;
|
|
2137
2552
|
agentState?: string | null | undefined;
|
|
2138
2553
|
agentStateVersion?: number | undefined;
|
|
@@ -2145,6 +2560,15 @@ declare const ProtocolV3SessionSnapshotResponseSchema: z.ZodObject<{
|
|
|
2145
2560
|
pendingVersion?: number | undefined;
|
|
2146
2561
|
deleted?: boolean | undefined;
|
|
2147
2562
|
};
|
|
2563
|
+
protocol: {
|
|
2564
|
+
protocolVersion: string;
|
|
2565
|
+
capabilities: string[];
|
|
2566
|
+
serverVersion?: string | undefined;
|
|
2567
|
+
legacyFallback?: {
|
|
2568
|
+
http: string[];
|
|
2569
|
+
websocketPath: string;
|
|
2570
|
+
} | undefined;
|
|
2571
|
+
};
|
|
2148
2572
|
snapshot: {
|
|
2149
2573
|
messages: {
|
|
2150
2574
|
content: {
|
|
@@ -2273,8 +2697,8 @@ declare const ProtocolV3SessionChangesResponseSchema: z.ZodObject<{
|
|
|
2273
2697
|
}, "strip", z.ZodTypeAny, {
|
|
2274
2698
|
id: string;
|
|
2275
2699
|
lastChangeSeq: number;
|
|
2276
|
-
title?: string | null | undefined;
|
|
2277
2700
|
metadata?: string | undefined;
|
|
2701
|
+
title?: string | null | undefined;
|
|
2278
2702
|
metadataVersion?: number | undefined;
|
|
2279
2703
|
agentState?: string | null | undefined;
|
|
2280
2704
|
agentStateVersion?: number | undefined;
|
|
@@ -2289,8 +2713,8 @@ declare const ProtocolV3SessionChangesResponseSchema: z.ZodObject<{
|
|
|
2289
2713
|
}, {
|
|
2290
2714
|
id: string;
|
|
2291
2715
|
lastChangeSeq: number;
|
|
2292
|
-
title?: string | null | undefined;
|
|
2293
2716
|
metadata?: string | undefined;
|
|
2717
|
+
title?: string | null | undefined;
|
|
2294
2718
|
metadataVersion?: number | undefined;
|
|
2295
2719
|
agentState?: string | null | undefined;
|
|
2296
2720
|
agentStateVersion?: number | undefined;
|
|
@@ -2333,20 +2757,11 @@ declare const ProtocolV3SessionChangesResponseSchema: z.ZodObject<{
|
|
|
2333
2757
|
payload: Record<string, unknown>;
|
|
2334
2758
|
}>, "many">;
|
|
2335
2759
|
}, "strip", z.ZodTypeAny, {
|
|
2336
|
-
protocol: {
|
|
2337
|
-
protocolVersion: string;
|
|
2338
|
-
capabilities: string[];
|
|
2339
|
-
serverVersion?: string | undefined;
|
|
2340
|
-
legacyFallback?: {
|
|
2341
|
-
http: string[];
|
|
2342
|
-
websocketPath: string;
|
|
2343
|
-
} | undefined;
|
|
2344
|
-
};
|
|
2345
2760
|
session: {
|
|
2346
2761
|
id: string;
|
|
2347
2762
|
lastChangeSeq: number;
|
|
2348
|
-
title?: string | null | undefined;
|
|
2349
2763
|
metadata?: string | undefined;
|
|
2764
|
+
title?: string | null | undefined;
|
|
2350
2765
|
metadataVersion?: number | undefined;
|
|
2351
2766
|
agentState?: string | null | undefined;
|
|
2352
2767
|
agentStateVersion?: number | undefined;
|
|
@@ -2359,6 +2774,15 @@ declare const ProtocolV3SessionChangesResponseSchema: z.ZodObject<{
|
|
|
2359
2774
|
pendingVersion?: number | undefined;
|
|
2360
2775
|
deleted?: boolean | undefined;
|
|
2361
2776
|
};
|
|
2777
|
+
protocol: {
|
|
2778
|
+
protocolVersion: string;
|
|
2779
|
+
capabilities: string[];
|
|
2780
|
+
serverVersion?: string | undefined;
|
|
2781
|
+
legacyFallback?: {
|
|
2782
|
+
http: string[];
|
|
2783
|
+
websocketPath: string;
|
|
2784
|
+
} | undefined;
|
|
2785
|
+
};
|
|
2362
2786
|
cursor: {
|
|
2363
2787
|
lastChangeSeq: number;
|
|
2364
2788
|
afterSeq: number;
|
|
@@ -2371,20 +2795,11 @@ declare const ProtocolV3SessionChangesResponseSchema: z.ZodObject<{
|
|
|
2371
2795
|
payload: Record<string, unknown>;
|
|
2372
2796
|
}[];
|
|
2373
2797
|
}, {
|
|
2374
|
-
protocol: {
|
|
2375
|
-
protocolVersion: string;
|
|
2376
|
-
capabilities: string[];
|
|
2377
|
-
serverVersion?: string | undefined;
|
|
2378
|
-
legacyFallback?: {
|
|
2379
|
-
http: string[];
|
|
2380
|
-
websocketPath: string;
|
|
2381
|
-
} | undefined;
|
|
2382
|
-
};
|
|
2383
2798
|
session: {
|
|
2384
2799
|
id: string;
|
|
2385
2800
|
lastChangeSeq: number;
|
|
2386
|
-
title?: string | null | undefined;
|
|
2387
2801
|
metadata?: string | undefined;
|
|
2802
|
+
title?: string | null | undefined;
|
|
2388
2803
|
metadataVersion?: number | undefined;
|
|
2389
2804
|
agentState?: string | null | undefined;
|
|
2390
2805
|
agentStateVersion?: number | undefined;
|
|
@@ -2397,6 +2812,15 @@ declare const ProtocolV3SessionChangesResponseSchema: z.ZodObject<{
|
|
|
2397
2812
|
pendingVersion?: number | undefined;
|
|
2398
2813
|
deleted?: boolean | undefined;
|
|
2399
2814
|
};
|
|
2815
|
+
protocol: {
|
|
2816
|
+
protocolVersion: string;
|
|
2817
|
+
capabilities: string[];
|
|
2818
|
+
serverVersion?: string | undefined;
|
|
2819
|
+
legacyFallback?: {
|
|
2820
|
+
http: string[];
|
|
2821
|
+
websocketPath: string;
|
|
2822
|
+
} | undefined;
|
|
2823
|
+
};
|
|
2400
2824
|
cursor: {
|
|
2401
2825
|
lastChangeSeq: number;
|
|
2402
2826
|
afterSeq: number;
|
|
@@ -2595,17 +3019,25 @@ declare const UserMessageSchema: z.ZodObject<{
|
|
|
2595
3019
|
goldenRouteId?: string | null | undefined;
|
|
2596
3020
|
} | undefined;
|
|
2597
3021
|
}>>;
|
|
2598
|
-
}, "
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
fallbackModel
|
|
2603
|
-
customSystemPrompt
|
|
2604
|
-
appendSystemPrompt
|
|
2605
|
-
allowedTools
|
|
2606
|
-
disallowedTools
|
|
2607
|
-
happyOrg
|
|
2608
|
-
taskContext
|
|
3022
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
3023
|
+
sentFrom: z.ZodOptional<z.ZodString>;
|
|
3024
|
+
permissionMode: z.ZodOptional<z.ZodEnum<["default", "acceptEdits", "bypassPermissions", "plan", "read-only", "safe-yolo", "yolo"]>>;
|
|
3025
|
+
model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3026
|
+
fallbackModel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3027
|
+
customSystemPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3028
|
+
appendSystemPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3029
|
+
allowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
3030
|
+
disallowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
3031
|
+
happyOrg: z.ZodOptional<z.ZodObject<{
|
|
3032
|
+
taskContext: z.ZodOptional<z.ZodObject<{
|
|
3033
|
+
taskId: z.ZodString;
|
|
3034
|
+
organizationId: z.ZodString;
|
|
3035
|
+
organizationRootPath: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3036
|
+
memberAgentId: z.ZodString;
|
|
3037
|
+
supervisorAgentId: z.ZodString;
|
|
3038
|
+
positionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3039
|
+
responsibilityId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3040
|
+
}, "strip", z.ZodTypeAny, {
|
|
2609
3041
|
taskId: string;
|
|
2610
3042
|
organizationId: string;
|
|
2611
3043
|
memberAgentId: string;
|
|
@@ -2613,15 +3045,51 @@ declare const UserMessageSchema: z.ZodObject<{
|
|
|
2613
3045
|
organizationRootPath?: string | null | undefined;
|
|
2614
3046
|
positionId?: string | null | undefined;
|
|
2615
3047
|
responsibilityId?: string | null | undefined;
|
|
2616
|
-
}
|
|
2617
|
-
|
|
3048
|
+
}, {
|
|
3049
|
+
taskId: string;
|
|
3050
|
+
organizationId: string;
|
|
3051
|
+
memberAgentId: string;
|
|
3052
|
+
supervisorAgentId: string;
|
|
3053
|
+
organizationRootPath?: string | null | undefined;
|
|
3054
|
+
positionId?: string | null | undefined;
|
|
3055
|
+
responsibilityId?: string | null | undefined;
|
|
3056
|
+
}>>;
|
|
3057
|
+
control: z.ZodOptional<z.ZodObject<{
|
|
3058
|
+
action: z.ZodEnum<["terminate", "reopen"]>;
|
|
3059
|
+
reason: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3060
|
+
newContext: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3061
|
+
newDecision: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3062
|
+
newResource: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3063
|
+
}, "strip", z.ZodTypeAny, {
|
|
2618
3064
|
action: "terminate" | "reopen";
|
|
2619
3065
|
reason?: string | null | undefined;
|
|
2620
3066
|
newContext?: string | null | undefined;
|
|
2621
3067
|
newDecision?: string | null | undefined;
|
|
2622
3068
|
newResource?: string | null | undefined;
|
|
2623
|
-
}
|
|
2624
|
-
|
|
3069
|
+
}, {
|
|
3070
|
+
action: "terminate" | "reopen";
|
|
3071
|
+
reason?: string | null | undefined;
|
|
3072
|
+
newContext?: string | null | undefined;
|
|
3073
|
+
newDecision?: string | null | undefined;
|
|
3074
|
+
newResource?: string | null | undefined;
|
|
3075
|
+
}>>;
|
|
3076
|
+
replyContext: z.ZodOptional<z.ZodObject<{
|
|
3077
|
+
dispatchId: z.ZodString;
|
|
3078
|
+
taskId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3079
|
+
organizationId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3080
|
+
scope: z.ZodString;
|
|
3081
|
+
replyTo: z.ZodString;
|
|
3082
|
+
memberAgentId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3083
|
+
sessionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3084
|
+
positionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3085
|
+
responsibilityId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3086
|
+
routeType: z.ZodNullable<z.ZodOptional<z.ZodEnum<["direct_reply", "version_planning_reply", "analysis_task", "implementation_task", "ack_plus_reply"]>>>;
|
|
3087
|
+
ackType: z.ZodNullable<z.ZodOptional<z.ZodEnum<["none", "read_ack", "dispatch_ack", "route_ack", "progress_ack"]>>>;
|
|
3088
|
+
replyMode: z.ZodNullable<z.ZodOptional<z.ZodEnum<["reply-first", "analysis-first"]>>>;
|
|
3089
|
+
planIntent: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3090
|
+
routerReason: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3091
|
+
goldenRouteId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3092
|
+
}, "strip", z.ZodTypeAny, {
|
|
2625
3093
|
dispatchId: string;
|
|
2626
3094
|
scope: string;
|
|
2627
3095
|
replyTo: string;
|
|
@@ -2637,35 +3105,7 @@ declare const UserMessageSchema: z.ZodObject<{
|
|
|
2637
3105
|
planIntent?: string | null | undefined;
|
|
2638
3106
|
routerReason?: string | null | undefined;
|
|
2639
3107
|
goldenRouteId?: string | null | undefined;
|
|
2640
|
-
}
|
|
2641
|
-
} | undefined;
|
|
2642
|
-
}, {
|
|
2643
|
-
model?: string | null | undefined;
|
|
2644
|
-
sentFrom?: string | undefined;
|
|
2645
|
-
permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "read-only" | "safe-yolo" | "yolo" | undefined;
|
|
2646
|
-
fallbackModel?: string | null | undefined;
|
|
2647
|
-
customSystemPrompt?: string | null | undefined;
|
|
2648
|
-
appendSystemPrompt?: string | null | undefined;
|
|
2649
|
-
allowedTools?: string[] | null | undefined;
|
|
2650
|
-
disallowedTools?: string[] | null | undefined;
|
|
2651
|
-
happyOrg?: {
|
|
2652
|
-
taskContext?: {
|
|
2653
|
-
taskId: string;
|
|
2654
|
-
organizationId: string;
|
|
2655
|
-
memberAgentId: string;
|
|
2656
|
-
supervisorAgentId: string;
|
|
2657
|
-
organizationRootPath?: string | null | undefined;
|
|
2658
|
-
positionId?: string | null | undefined;
|
|
2659
|
-
responsibilityId?: string | null | undefined;
|
|
2660
|
-
} | undefined;
|
|
2661
|
-
control?: {
|
|
2662
|
-
action: "terminate" | "reopen";
|
|
2663
|
-
reason?: string | null | undefined;
|
|
2664
|
-
newContext?: string | null | undefined;
|
|
2665
|
-
newDecision?: string | null | undefined;
|
|
2666
|
-
newResource?: string | null | undefined;
|
|
2667
|
-
} | undefined;
|
|
2668
|
-
replyContext?: {
|
|
3108
|
+
}, {
|
|
2669
3109
|
dispatchId: string;
|
|
2670
3110
|
scope: string;
|
|
2671
3111
|
replyTo: string;
|
|
@@ -2681,26 +3121,8 @@ declare const UserMessageSchema: z.ZodObject<{
|
|
|
2681
3121
|
planIntent?: string | null | undefined;
|
|
2682
3122
|
routerReason?: string | null | undefined;
|
|
2683
3123
|
goldenRouteId?: string | null | undefined;
|
|
2684
|
-
}
|
|
2685
|
-
}
|
|
2686
|
-
}>>;
|
|
2687
|
-
}, "strip", z.ZodTypeAny, {
|
|
2688
|
-
content: {
|
|
2689
|
-
type: "text";
|
|
2690
|
-
text: string;
|
|
2691
|
-
};
|
|
2692
|
-
role: "user";
|
|
2693
|
-
localKey?: string | undefined;
|
|
2694
|
-
meta?: {
|
|
2695
|
-
model?: string | null | undefined;
|
|
2696
|
-
sentFrom?: string | undefined;
|
|
2697
|
-
permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "read-only" | "safe-yolo" | "yolo" | undefined;
|
|
2698
|
-
fallbackModel?: string | null | undefined;
|
|
2699
|
-
customSystemPrompt?: string | null | undefined;
|
|
2700
|
-
appendSystemPrompt?: string | null | undefined;
|
|
2701
|
-
allowedTools?: string[] | null | undefined;
|
|
2702
|
-
disallowedTools?: string[] | null | undefined;
|
|
2703
|
-
happyOrg?: {
|
|
3124
|
+
}>>;
|
|
3125
|
+
}, "strip", z.ZodTypeAny, {
|
|
2704
3126
|
taskContext?: {
|
|
2705
3127
|
taskId: string;
|
|
2706
3128
|
organizationId: string;
|
|
@@ -2734,25 +3156,7 @@ declare const UserMessageSchema: z.ZodObject<{
|
|
|
2734
3156
|
routerReason?: string | null | undefined;
|
|
2735
3157
|
goldenRouteId?: string | null | undefined;
|
|
2736
3158
|
} | undefined;
|
|
2737
|
-
}
|
|
2738
|
-
} | undefined;
|
|
2739
|
-
}, {
|
|
2740
|
-
content: {
|
|
2741
|
-
type: "text";
|
|
2742
|
-
text: string;
|
|
2743
|
-
};
|
|
2744
|
-
role: "user";
|
|
2745
|
-
localKey?: string | undefined;
|
|
2746
|
-
meta?: {
|
|
2747
|
-
model?: string | null | undefined;
|
|
2748
|
-
sentFrom?: string | undefined;
|
|
2749
|
-
permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "read-only" | "safe-yolo" | "yolo" | undefined;
|
|
2750
|
-
fallbackModel?: string | null | undefined;
|
|
2751
|
-
customSystemPrompt?: string | null | undefined;
|
|
2752
|
-
appendSystemPrompt?: string | null | undefined;
|
|
2753
|
-
allowedTools?: string[] | null | undefined;
|
|
2754
|
-
disallowedTools?: string[] | null | undefined;
|
|
2755
|
-
happyOrg?: {
|
|
3159
|
+
}, {
|
|
2756
3160
|
taskContext?: {
|
|
2757
3161
|
taskId: string;
|
|
2758
3162
|
organizationId: string;
|
|
@@ -2786,24 +3190,8 @@ declare const UserMessageSchema: z.ZodObject<{
|
|
|
2786
3190
|
routerReason?: string | null | undefined;
|
|
2787
3191
|
goldenRouteId?: string | null | undefined;
|
|
2788
3192
|
} | undefined;
|
|
2789
|
-
}
|
|
2790
|
-
}
|
|
2791
|
-
}>;
|
|
2792
|
-
type UserMessage = z.infer<typeof UserMessageSchema>;
|
|
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
|
-
text: string;
|
|
2801
|
-
}, {
|
|
2802
|
-
type: "text";
|
|
2803
|
-
text: string;
|
|
2804
|
-
}>;
|
|
2805
|
-
localKey: z.ZodOptional<z.ZodString>;
|
|
2806
|
-
meta: z.ZodOptional<z.ZodObject<{
|
|
3193
|
+
}>>;
|
|
3194
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
2807
3195
|
sentFrom: z.ZodOptional<z.ZodString>;
|
|
2808
3196
|
permissionMode: z.ZodOptional<z.ZodEnum<["default", "acceptEdits", "bypassPermissions", "plan", "read-only", "safe-yolo", "yolo"]>>;
|
|
2809
3197
|
model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -2975,17 +3363,33 @@ declare const MessageContentSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
2975
3363
|
goldenRouteId?: string | null | undefined;
|
|
2976
3364
|
} | undefined;
|
|
2977
3365
|
}>>;
|
|
2978
|
-
},
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
3366
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
3367
|
+
}, "strip", z.ZodTypeAny, {
|
|
3368
|
+
content: {
|
|
3369
|
+
type: "text";
|
|
3370
|
+
text: string;
|
|
3371
|
+
};
|
|
3372
|
+
role: "user";
|
|
3373
|
+
localKey?: string | undefined;
|
|
3374
|
+
meta?: z.objectOutputType<{
|
|
3375
|
+
sentFrom: z.ZodOptional<z.ZodString>;
|
|
3376
|
+
permissionMode: z.ZodOptional<z.ZodEnum<["default", "acceptEdits", "bypassPermissions", "plan", "read-only", "safe-yolo", "yolo"]>>;
|
|
3377
|
+
model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3378
|
+
fallbackModel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3379
|
+
customSystemPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3380
|
+
appendSystemPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3381
|
+
allowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
3382
|
+
disallowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
3383
|
+
happyOrg: z.ZodOptional<z.ZodObject<{
|
|
3384
|
+
taskContext: z.ZodOptional<z.ZodObject<{
|
|
3385
|
+
taskId: z.ZodString;
|
|
3386
|
+
organizationId: z.ZodString;
|
|
3387
|
+
organizationRootPath: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3388
|
+
memberAgentId: z.ZodString;
|
|
3389
|
+
supervisorAgentId: z.ZodString;
|
|
3390
|
+
positionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3391
|
+
responsibilityId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3392
|
+
}, "strip", z.ZodTypeAny, {
|
|
2989
3393
|
taskId: string;
|
|
2990
3394
|
organizationId: string;
|
|
2991
3395
|
memberAgentId: string;
|
|
@@ -2993,15 +3397,51 @@ declare const MessageContentSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
2993
3397
|
organizationRootPath?: string | null | undefined;
|
|
2994
3398
|
positionId?: string | null | undefined;
|
|
2995
3399
|
responsibilityId?: string | null | undefined;
|
|
2996
|
-
}
|
|
2997
|
-
|
|
3400
|
+
}, {
|
|
3401
|
+
taskId: string;
|
|
3402
|
+
organizationId: string;
|
|
3403
|
+
memberAgentId: string;
|
|
3404
|
+
supervisorAgentId: string;
|
|
3405
|
+
organizationRootPath?: string | null | undefined;
|
|
3406
|
+
positionId?: string | null | undefined;
|
|
3407
|
+
responsibilityId?: string | null | undefined;
|
|
3408
|
+
}>>;
|
|
3409
|
+
control: z.ZodOptional<z.ZodObject<{
|
|
3410
|
+
action: z.ZodEnum<["terminate", "reopen"]>;
|
|
3411
|
+
reason: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3412
|
+
newContext: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3413
|
+
newDecision: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3414
|
+
newResource: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3415
|
+
}, "strip", z.ZodTypeAny, {
|
|
2998
3416
|
action: "terminate" | "reopen";
|
|
2999
3417
|
reason?: string | null | undefined;
|
|
3000
3418
|
newContext?: string | null | undefined;
|
|
3001
3419
|
newDecision?: string | null | undefined;
|
|
3002
3420
|
newResource?: string | null | undefined;
|
|
3003
|
-
}
|
|
3004
|
-
|
|
3421
|
+
}, {
|
|
3422
|
+
action: "terminate" | "reopen";
|
|
3423
|
+
reason?: string | null | undefined;
|
|
3424
|
+
newContext?: string | null | undefined;
|
|
3425
|
+
newDecision?: string | null | undefined;
|
|
3426
|
+
newResource?: string | null | undefined;
|
|
3427
|
+
}>>;
|
|
3428
|
+
replyContext: z.ZodOptional<z.ZodObject<{
|
|
3429
|
+
dispatchId: z.ZodString;
|
|
3430
|
+
taskId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3431
|
+
organizationId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3432
|
+
scope: z.ZodString;
|
|
3433
|
+
replyTo: z.ZodString;
|
|
3434
|
+
memberAgentId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3435
|
+
sessionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3436
|
+
positionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3437
|
+
responsibilityId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3438
|
+
routeType: z.ZodNullable<z.ZodOptional<z.ZodEnum<["direct_reply", "version_planning_reply", "analysis_task", "implementation_task", "ack_plus_reply"]>>>;
|
|
3439
|
+
ackType: z.ZodNullable<z.ZodOptional<z.ZodEnum<["none", "read_ack", "dispatch_ack", "route_ack", "progress_ack"]>>>;
|
|
3440
|
+
replyMode: z.ZodNullable<z.ZodOptional<z.ZodEnum<["reply-first", "analysis-first"]>>>;
|
|
3441
|
+
planIntent: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3442
|
+
routerReason: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3443
|
+
goldenRouteId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3444
|
+
}, "strip", z.ZodTypeAny, {
|
|
3005
3445
|
dispatchId: string;
|
|
3006
3446
|
scope: string;
|
|
3007
3447
|
replyTo: string;
|
|
@@ -3017,18 +3457,24 @@ declare const MessageContentSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
3017
3457
|
planIntent?: string | null | undefined;
|
|
3018
3458
|
routerReason?: string | null | undefined;
|
|
3019
3459
|
goldenRouteId?: string | null | undefined;
|
|
3020
|
-
}
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3460
|
+
}, {
|
|
3461
|
+
dispatchId: string;
|
|
3462
|
+
scope: string;
|
|
3463
|
+
replyTo: string;
|
|
3464
|
+
sessionId?: string | null | undefined;
|
|
3465
|
+
taskId?: string | null | undefined;
|
|
3466
|
+
organizationId?: string | null | undefined;
|
|
3467
|
+
memberAgentId?: string | null | undefined;
|
|
3468
|
+
positionId?: string | null | undefined;
|
|
3469
|
+
responsibilityId?: string | null | undefined;
|
|
3470
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
3471
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
3472
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
3473
|
+
planIntent?: string | null | undefined;
|
|
3474
|
+
routerReason?: string | null | undefined;
|
|
3475
|
+
goldenRouteId?: string | null | undefined;
|
|
3476
|
+
}>>;
|
|
3477
|
+
}, "strip", z.ZodTypeAny, {
|
|
3032
3478
|
taskContext?: {
|
|
3033
3479
|
taskId: string;
|
|
3034
3480
|
organizationId: string;
|
|
@@ -3062,25 +3508,7 @@ declare const MessageContentSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
3062
3508
|
routerReason?: string | null | undefined;
|
|
3063
3509
|
goldenRouteId?: string | null | undefined;
|
|
3064
3510
|
} | undefined;
|
|
3065
|
-
}
|
|
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?: {
|
|
3511
|
+
}, {
|
|
3084
3512
|
taskContext?: {
|
|
3085
3513
|
taskId: string;
|
|
3086
3514
|
organizationId: string;
|
|
@@ -3114,8 +3542,8 @@ declare const MessageContentSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
3114
3542
|
routerReason?: string | null | undefined;
|
|
3115
3543
|
goldenRouteId?: string | null | undefined;
|
|
3116
3544
|
} | undefined;
|
|
3117
|
-
}
|
|
3118
|
-
} | undefined;
|
|
3545
|
+
}>>;
|
|
3546
|
+
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
3119
3547
|
}, {
|
|
3120
3548
|
content: {
|
|
3121
3549
|
type: "text";
|
|
@@ -3123,17 +3551,25 @@ declare const MessageContentSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
3123
3551
|
};
|
|
3124
3552
|
role: "user";
|
|
3125
3553
|
localKey?: string | undefined;
|
|
3126
|
-
meta?: {
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
fallbackModel
|
|
3131
|
-
customSystemPrompt
|
|
3132
|
-
appendSystemPrompt
|
|
3133
|
-
allowedTools
|
|
3134
|
-
disallowedTools
|
|
3135
|
-
happyOrg
|
|
3136
|
-
taskContext
|
|
3554
|
+
meta?: z.objectInputType<{
|
|
3555
|
+
sentFrom: z.ZodOptional<z.ZodString>;
|
|
3556
|
+
permissionMode: z.ZodOptional<z.ZodEnum<["default", "acceptEdits", "bypassPermissions", "plan", "read-only", "safe-yolo", "yolo"]>>;
|
|
3557
|
+
model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3558
|
+
fallbackModel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3559
|
+
customSystemPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3560
|
+
appendSystemPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3561
|
+
allowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
3562
|
+
disallowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
3563
|
+
happyOrg: z.ZodOptional<z.ZodObject<{
|
|
3564
|
+
taskContext: z.ZodOptional<z.ZodObject<{
|
|
3565
|
+
taskId: z.ZodString;
|
|
3566
|
+
organizationId: z.ZodString;
|
|
3567
|
+
organizationRootPath: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3568
|
+
memberAgentId: z.ZodString;
|
|
3569
|
+
supervisorAgentId: z.ZodString;
|
|
3570
|
+
positionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3571
|
+
responsibilityId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3572
|
+
}, "strip", z.ZodTypeAny, {
|
|
3137
3573
|
taskId: string;
|
|
3138
3574
|
organizationId: string;
|
|
3139
3575
|
memberAgentId: string;
|
|
@@ -3141,15 +3577,1383 @@ declare const MessageContentSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
3141
3577
|
organizationRootPath?: string | null | undefined;
|
|
3142
3578
|
positionId?: string | null | undefined;
|
|
3143
3579
|
responsibilityId?: string | null | undefined;
|
|
3144
|
-
}
|
|
3145
|
-
|
|
3580
|
+
}, {
|
|
3581
|
+
taskId: string;
|
|
3582
|
+
organizationId: string;
|
|
3583
|
+
memberAgentId: string;
|
|
3584
|
+
supervisorAgentId: string;
|
|
3585
|
+
organizationRootPath?: string | null | undefined;
|
|
3586
|
+
positionId?: string | null | undefined;
|
|
3587
|
+
responsibilityId?: string | null | undefined;
|
|
3588
|
+
}>>;
|
|
3589
|
+
control: z.ZodOptional<z.ZodObject<{
|
|
3590
|
+
action: z.ZodEnum<["terminate", "reopen"]>;
|
|
3591
|
+
reason: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3592
|
+
newContext: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3593
|
+
newDecision: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3594
|
+
newResource: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3595
|
+
}, "strip", z.ZodTypeAny, {
|
|
3146
3596
|
action: "terminate" | "reopen";
|
|
3147
3597
|
reason?: string | null | undefined;
|
|
3148
3598
|
newContext?: string | null | undefined;
|
|
3149
3599
|
newDecision?: string | null | undefined;
|
|
3150
3600
|
newResource?: string | null | undefined;
|
|
3151
|
-
}
|
|
3152
|
-
|
|
3601
|
+
}, {
|
|
3602
|
+
action: "terminate" | "reopen";
|
|
3603
|
+
reason?: string | null | undefined;
|
|
3604
|
+
newContext?: string | null | undefined;
|
|
3605
|
+
newDecision?: string | null | undefined;
|
|
3606
|
+
newResource?: string | null | undefined;
|
|
3607
|
+
}>>;
|
|
3608
|
+
replyContext: z.ZodOptional<z.ZodObject<{
|
|
3609
|
+
dispatchId: z.ZodString;
|
|
3610
|
+
taskId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3611
|
+
organizationId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3612
|
+
scope: z.ZodString;
|
|
3613
|
+
replyTo: z.ZodString;
|
|
3614
|
+
memberAgentId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3615
|
+
sessionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3616
|
+
positionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3617
|
+
responsibilityId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3618
|
+
routeType: z.ZodNullable<z.ZodOptional<z.ZodEnum<["direct_reply", "version_planning_reply", "analysis_task", "implementation_task", "ack_plus_reply"]>>>;
|
|
3619
|
+
ackType: z.ZodNullable<z.ZodOptional<z.ZodEnum<["none", "read_ack", "dispatch_ack", "route_ack", "progress_ack"]>>>;
|
|
3620
|
+
replyMode: z.ZodNullable<z.ZodOptional<z.ZodEnum<["reply-first", "analysis-first"]>>>;
|
|
3621
|
+
planIntent: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3622
|
+
routerReason: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3623
|
+
goldenRouteId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3624
|
+
}, "strip", z.ZodTypeAny, {
|
|
3625
|
+
dispatchId: string;
|
|
3626
|
+
scope: string;
|
|
3627
|
+
replyTo: string;
|
|
3628
|
+
sessionId?: string | null | undefined;
|
|
3629
|
+
taskId?: string | null | undefined;
|
|
3630
|
+
organizationId?: string | null | undefined;
|
|
3631
|
+
memberAgentId?: string | null | undefined;
|
|
3632
|
+
positionId?: string | null | undefined;
|
|
3633
|
+
responsibilityId?: string | null | undefined;
|
|
3634
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
3635
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
3636
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
3637
|
+
planIntent?: string | null | undefined;
|
|
3638
|
+
routerReason?: string | null | undefined;
|
|
3639
|
+
goldenRouteId?: string | null | undefined;
|
|
3640
|
+
}, {
|
|
3641
|
+
dispatchId: string;
|
|
3642
|
+
scope: string;
|
|
3643
|
+
replyTo: string;
|
|
3644
|
+
sessionId?: string | null | undefined;
|
|
3645
|
+
taskId?: string | null | undefined;
|
|
3646
|
+
organizationId?: string | null | undefined;
|
|
3647
|
+
memberAgentId?: string | null | undefined;
|
|
3648
|
+
positionId?: string | null | undefined;
|
|
3649
|
+
responsibilityId?: string | null | undefined;
|
|
3650
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
3651
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
3652
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
3653
|
+
planIntent?: string | null | undefined;
|
|
3654
|
+
routerReason?: string | null | undefined;
|
|
3655
|
+
goldenRouteId?: string | null | undefined;
|
|
3656
|
+
}>>;
|
|
3657
|
+
}, "strip", z.ZodTypeAny, {
|
|
3658
|
+
taskContext?: {
|
|
3659
|
+
taskId: string;
|
|
3660
|
+
organizationId: string;
|
|
3661
|
+
memberAgentId: string;
|
|
3662
|
+
supervisorAgentId: string;
|
|
3663
|
+
organizationRootPath?: string | null | undefined;
|
|
3664
|
+
positionId?: string | null | undefined;
|
|
3665
|
+
responsibilityId?: string | null | undefined;
|
|
3666
|
+
} | undefined;
|
|
3667
|
+
control?: {
|
|
3668
|
+
action: "terminate" | "reopen";
|
|
3669
|
+
reason?: string | null | undefined;
|
|
3670
|
+
newContext?: string | null | undefined;
|
|
3671
|
+
newDecision?: string | null | undefined;
|
|
3672
|
+
newResource?: string | null | undefined;
|
|
3673
|
+
} | undefined;
|
|
3674
|
+
replyContext?: {
|
|
3675
|
+
dispatchId: string;
|
|
3676
|
+
scope: string;
|
|
3677
|
+
replyTo: string;
|
|
3678
|
+
sessionId?: string | null | undefined;
|
|
3679
|
+
taskId?: string | null | undefined;
|
|
3680
|
+
organizationId?: string | null | undefined;
|
|
3681
|
+
memberAgentId?: string | null | undefined;
|
|
3682
|
+
positionId?: string | null | undefined;
|
|
3683
|
+
responsibilityId?: string | null | undefined;
|
|
3684
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
3685
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
3686
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
3687
|
+
planIntent?: string | null | undefined;
|
|
3688
|
+
routerReason?: string | null | undefined;
|
|
3689
|
+
goldenRouteId?: string | null | undefined;
|
|
3690
|
+
} | undefined;
|
|
3691
|
+
}, {
|
|
3692
|
+
taskContext?: {
|
|
3693
|
+
taskId: string;
|
|
3694
|
+
organizationId: string;
|
|
3695
|
+
memberAgentId: string;
|
|
3696
|
+
supervisorAgentId: string;
|
|
3697
|
+
organizationRootPath?: string | null | undefined;
|
|
3698
|
+
positionId?: string | null | undefined;
|
|
3699
|
+
responsibilityId?: string | null | undefined;
|
|
3700
|
+
} | undefined;
|
|
3701
|
+
control?: {
|
|
3702
|
+
action: "terminate" | "reopen";
|
|
3703
|
+
reason?: string | null | undefined;
|
|
3704
|
+
newContext?: string | null | undefined;
|
|
3705
|
+
newDecision?: string | null | undefined;
|
|
3706
|
+
newResource?: string | null | undefined;
|
|
3707
|
+
} | undefined;
|
|
3708
|
+
replyContext?: {
|
|
3709
|
+
dispatchId: string;
|
|
3710
|
+
scope: string;
|
|
3711
|
+
replyTo: string;
|
|
3712
|
+
sessionId?: string | null | undefined;
|
|
3713
|
+
taskId?: string | null | undefined;
|
|
3714
|
+
organizationId?: string | null | undefined;
|
|
3715
|
+
memberAgentId?: string | null | undefined;
|
|
3716
|
+
positionId?: string | null | undefined;
|
|
3717
|
+
responsibilityId?: string | null | undefined;
|
|
3718
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
3719
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
3720
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
3721
|
+
planIntent?: string | null | undefined;
|
|
3722
|
+
routerReason?: string | null | undefined;
|
|
3723
|
+
goldenRouteId?: string | null | undefined;
|
|
3724
|
+
} | undefined;
|
|
3725
|
+
}>>;
|
|
3726
|
+
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
3727
|
+
}>;
|
|
3728
|
+
type UserMessage = z.infer<typeof UserMessageSchema>;
|
|
3729
|
+
declare const MessageContentSchema: z.ZodUnion<[z.ZodObject<{
|
|
3730
|
+
role: z.ZodLiteral<"user">;
|
|
3731
|
+
content: z.ZodObject<{
|
|
3732
|
+
type: z.ZodLiteral<"text">;
|
|
3733
|
+
text: z.ZodString;
|
|
3734
|
+
}, "strip", z.ZodTypeAny, {
|
|
3735
|
+
type: "text";
|
|
3736
|
+
text: string;
|
|
3737
|
+
}, {
|
|
3738
|
+
type: "text";
|
|
3739
|
+
text: string;
|
|
3740
|
+
}>;
|
|
3741
|
+
localKey: z.ZodOptional<z.ZodString>;
|
|
3742
|
+
meta: z.ZodOptional<z.ZodObject<{
|
|
3743
|
+
sentFrom: z.ZodOptional<z.ZodString>;
|
|
3744
|
+
permissionMode: z.ZodOptional<z.ZodEnum<["default", "acceptEdits", "bypassPermissions", "plan", "read-only", "safe-yolo", "yolo"]>>;
|
|
3745
|
+
model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3746
|
+
fallbackModel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3747
|
+
customSystemPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3748
|
+
appendSystemPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3749
|
+
allowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
3750
|
+
disallowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
3751
|
+
happyOrg: z.ZodOptional<z.ZodObject<{
|
|
3752
|
+
taskContext: z.ZodOptional<z.ZodObject<{
|
|
3753
|
+
taskId: z.ZodString;
|
|
3754
|
+
organizationId: z.ZodString;
|
|
3755
|
+
organizationRootPath: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3756
|
+
memberAgentId: z.ZodString;
|
|
3757
|
+
supervisorAgentId: z.ZodString;
|
|
3758
|
+
positionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3759
|
+
responsibilityId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3760
|
+
}, "strip", z.ZodTypeAny, {
|
|
3761
|
+
taskId: string;
|
|
3762
|
+
organizationId: string;
|
|
3763
|
+
memberAgentId: string;
|
|
3764
|
+
supervisorAgentId: string;
|
|
3765
|
+
organizationRootPath?: string | null | undefined;
|
|
3766
|
+
positionId?: string | null | undefined;
|
|
3767
|
+
responsibilityId?: string | null | undefined;
|
|
3768
|
+
}, {
|
|
3769
|
+
taskId: string;
|
|
3770
|
+
organizationId: string;
|
|
3771
|
+
memberAgentId: string;
|
|
3772
|
+
supervisorAgentId: string;
|
|
3773
|
+
organizationRootPath?: string | null | undefined;
|
|
3774
|
+
positionId?: string | null | undefined;
|
|
3775
|
+
responsibilityId?: string | null | undefined;
|
|
3776
|
+
}>>;
|
|
3777
|
+
control: z.ZodOptional<z.ZodObject<{
|
|
3778
|
+
action: z.ZodEnum<["terminate", "reopen"]>;
|
|
3779
|
+
reason: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3780
|
+
newContext: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3781
|
+
newDecision: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3782
|
+
newResource: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3783
|
+
}, "strip", z.ZodTypeAny, {
|
|
3784
|
+
action: "terminate" | "reopen";
|
|
3785
|
+
reason?: string | null | undefined;
|
|
3786
|
+
newContext?: string | null | undefined;
|
|
3787
|
+
newDecision?: string | null | undefined;
|
|
3788
|
+
newResource?: string | null | undefined;
|
|
3789
|
+
}, {
|
|
3790
|
+
action: "terminate" | "reopen";
|
|
3791
|
+
reason?: string | null | undefined;
|
|
3792
|
+
newContext?: string | null | undefined;
|
|
3793
|
+
newDecision?: string | null | undefined;
|
|
3794
|
+
newResource?: string | null | undefined;
|
|
3795
|
+
}>>;
|
|
3796
|
+
replyContext: z.ZodOptional<z.ZodObject<{
|
|
3797
|
+
dispatchId: z.ZodString;
|
|
3798
|
+
taskId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3799
|
+
organizationId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3800
|
+
scope: z.ZodString;
|
|
3801
|
+
replyTo: z.ZodString;
|
|
3802
|
+
memberAgentId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3803
|
+
sessionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3804
|
+
positionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3805
|
+
responsibilityId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3806
|
+
routeType: z.ZodNullable<z.ZodOptional<z.ZodEnum<["direct_reply", "version_planning_reply", "analysis_task", "implementation_task", "ack_plus_reply"]>>>;
|
|
3807
|
+
ackType: z.ZodNullable<z.ZodOptional<z.ZodEnum<["none", "read_ack", "dispatch_ack", "route_ack", "progress_ack"]>>>;
|
|
3808
|
+
replyMode: z.ZodNullable<z.ZodOptional<z.ZodEnum<["reply-first", "analysis-first"]>>>;
|
|
3809
|
+
planIntent: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3810
|
+
routerReason: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3811
|
+
goldenRouteId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3812
|
+
}, "strip", z.ZodTypeAny, {
|
|
3813
|
+
dispatchId: string;
|
|
3814
|
+
scope: string;
|
|
3815
|
+
replyTo: string;
|
|
3816
|
+
sessionId?: string | null | undefined;
|
|
3817
|
+
taskId?: string | null | undefined;
|
|
3818
|
+
organizationId?: string | null | undefined;
|
|
3819
|
+
memberAgentId?: string | null | undefined;
|
|
3820
|
+
positionId?: string | null | undefined;
|
|
3821
|
+
responsibilityId?: string | null | undefined;
|
|
3822
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
3823
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
3824
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
3825
|
+
planIntent?: string | null | undefined;
|
|
3826
|
+
routerReason?: string | null | undefined;
|
|
3827
|
+
goldenRouteId?: string | null | undefined;
|
|
3828
|
+
}, {
|
|
3829
|
+
dispatchId: string;
|
|
3830
|
+
scope: string;
|
|
3831
|
+
replyTo: string;
|
|
3832
|
+
sessionId?: string | null | undefined;
|
|
3833
|
+
taskId?: string | null | undefined;
|
|
3834
|
+
organizationId?: string | null | undefined;
|
|
3835
|
+
memberAgentId?: string | null | undefined;
|
|
3836
|
+
positionId?: string | null | undefined;
|
|
3837
|
+
responsibilityId?: string | null | undefined;
|
|
3838
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
3839
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
3840
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
3841
|
+
planIntent?: string | null | undefined;
|
|
3842
|
+
routerReason?: string | null | undefined;
|
|
3843
|
+
goldenRouteId?: string | null | undefined;
|
|
3844
|
+
}>>;
|
|
3845
|
+
}, "strip", z.ZodTypeAny, {
|
|
3846
|
+
taskContext?: {
|
|
3847
|
+
taskId: string;
|
|
3848
|
+
organizationId: string;
|
|
3849
|
+
memberAgentId: string;
|
|
3850
|
+
supervisorAgentId: string;
|
|
3851
|
+
organizationRootPath?: string | null | undefined;
|
|
3852
|
+
positionId?: string | null | undefined;
|
|
3853
|
+
responsibilityId?: string | null | undefined;
|
|
3854
|
+
} | undefined;
|
|
3855
|
+
control?: {
|
|
3856
|
+
action: "terminate" | "reopen";
|
|
3857
|
+
reason?: string | null | undefined;
|
|
3858
|
+
newContext?: string | null | undefined;
|
|
3859
|
+
newDecision?: string | null | undefined;
|
|
3860
|
+
newResource?: string | null | undefined;
|
|
3861
|
+
} | undefined;
|
|
3862
|
+
replyContext?: {
|
|
3863
|
+
dispatchId: string;
|
|
3864
|
+
scope: string;
|
|
3865
|
+
replyTo: string;
|
|
3866
|
+
sessionId?: string | null | undefined;
|
|
3867
|
+
taskId?: string | null | undefined;
|
|
3868
|
+
organizationId?: string | null | undefined;
|
|
3869
|
+
memberAgentId?: string | null | undefined;
|
|
3870
|
+
positionId?: string | null | undefined;
|
|
3871
|
+
responsibilityId?: string | null | undefined;
|
|
3872
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
3873
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
3874
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
3875
|
+
planIntent?: string | null | undefined;
|
|
3876
|
+
routerReason?: string | null | undefined;
|
|
3877
|
+
goldenRouteId?: string | null | undefined;
|
|
3878
|
+
} | undefined;
|
|
3879
|
+
}, {
|
|
3880
|
+
taskContext?: {
|
|
3881
|
+
taskId: string;
|
|
3882
|
+
organizationId: string;
|
|
3883
|
+
memberAgentId: string;
|
|
3884
|
+
supervisorAgentId: string;
|
|
3885
|
+
organizationRootPath?: string | null | undefined;
|
|
3886
|
+
positionId?: string | null | undefined;
|
|
3887
|
+
responsibilityId?: string | null | undefined;
|
|
3888
|
+
} | undefined;
|
|
3889
|
+
control?: {
|
|
3890
|
+
action: "terminate" | "reopen";
|
|
3891
|
+
reason?: string | null | undefined;
|
|
3892
|
+
newContext?: string | null | undefined;
|
|
3893
|
+
newDecision?: string | null | undefined;
|
|
3894
|
+
newResource?: string | null | undefined;
|
|
3895
|
+
} | undefined;
|
|
3896
|
+
replyContext?: {
|
|
3897
|
+
dispatchId: string;
|
|
3898
|
+
scope: string;
|
|
3899
|
+
replyTo: string;
|
|
3900
|
+
sessionId?: string | null | undefined;
|
|
3901
|
+
taskId?: string | null | undefined;
|
|
3902
|
+
organizationId?: string | null | undefined;
|
|
3903
|
+
memberAgentId?: string | null | undefined;
|
|
3904
|
+
positionId?: string | null | undefined;
|
|
3905
|
+
responsibilityId?: string | null | undefined;
|
|
3906
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
3907
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
3908
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
3909
|
+
planIntent?: string | null | undefined;
|
|
3910
|
+
routerReason?: string | null | undefined;
|
|
3911
|
+
goldenRouteId?: string | null | undefined;
|
|
3912
|
+
} | undefined;
|
|
3913
|
+
}>>;
|
|
3914
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
3915
|
+
sentFrom: z.ZodOptional<z.ZodString>;
|
|
3916
|
+
permissionMode: z.ZodOptional<z.ZodEnum<["default", "acceptEdits", "bypassPermissions", "plan", "read-only", "safe-yolo", "yolo"]>>;
|
|
3917
|
+
model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3918
|
+
fallbackModel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3919
|
+
customSystemPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3920
|
+
appendSystemPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3921
|
+
allowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
3922
|
+
disallowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
3923
|
+
happyOrg: z.ZodOptional<z.ZodObject<{
|
|
3924
|
+
taskContext: z.ZodOptional<z.ZodObject<{
|
|
3925
|
+
taskId: z.ZodString;
|
|
3926
|
+
organizationId: z.ZodString;
|
|
3927
|
+
organizationRootPath: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3928
|
+
memberAgentId: z.ZodString;
|
|
3929
|
+
supervisorAgentId: z.ZodString;
|
|
3930
|
+
positionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3931
|
+
responsibilityId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3932
|
+
}, "strip", z.ZodTypeAny, {
|
|
3933
|
+
taskId: string;
|
|
3934
|
+
organizationId: string;
|
|
3935
|
+
memberAgentId: string;
|
|
3936
|
+
supervisorAgentId: string;
|
|
3937
|
+
organizationRootPath?: string | null | undefined;
|
|
3938
|
+
positionId?: string | null | undefined;
|
|
3939
|
+
responsibilityId?: string | null | undefined;
|
|
3940
|
+
}, {
|
|
3941
|
+
taskId: string;
|
|
3942
|
+
organizationId: string;
|
|
3943
|
+
memberAgentId: string;
|
|
3944
|
+
supervisorAgentId: string;
|
|
3945
|
+
organizationRootPath?: string | null | undefined;
|
|
3946
|
+
positionId?: string | null | undefined;
|
|
3947
|
+
responsibilityId?: string | null | undefined;
|
|
3948
|
+
}>>;
|
|
3949
|
+
control: z.ZodOptional<z.ZodObject<{
|
|
3950
|
+
action: z.ZodEnum<["terminate", "reopen"]>;
|
|
3951
|
+
reason: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3952
|
+
newContext: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3953
|
+
newDecision: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3954
|
+
newResource: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3955
|
+
}, "strip", z.ZodTypeAny, {
|
|
3956
|
+
action: "terminate" | "reopen";
|
|
3957
|
+
reason?: string | null | undefined;
|
|
3958
|
+
newContext?: string | null | undefined;
|
|
3959
|
+
newDecision?: string | null | undefined;
|
|
3960
|
+
newResource?: string | null | undefined;
|
|
3961
|
+
}, {
|
|
3962
|
+
action: "terminate" | "reopen";
|
|
3963
|
+
reason?: string | null | undefined;
|
|
3964
|
+
newContext?: string | null | undefined;
|
|
3965
|
+
newDecision?: string | null | undefined;
|
|
3966
|
+
newResource?: string | null | undefined;
|
|
3967
|
+
}>>;
|
|
3968
|
+
replyContext: z.ZodOptional<z.ZodObject<{
|
|
3969
|
+
dispatchId: z.ZodString;
|
|
3970
|
+
taskId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3971
|
+
organizationId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3972
|
+
scope: z.ZodString;
|
|
3973
|
+
replyTo: z.ZodString;
|
|
3974
|
+
memberAgentId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3975
|
+
sessionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3976
|
+
positionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3977
|
+
responsibilityId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3978
|
+
routeType: z.ZodNullable<z.ZodOptional<z.ZodEnum<["direct_reply", "version_planning_reply", "analysis_task", "implementation_task", "ack_plus_reply"]>>>;
|
|
3979
|
+
ackType: z.ZodNullable<z.ZodOptional<z.ZodEnum<["none", "read_ack", "dispatch_ack", "route_ack", "progress_ack"]>>>;
|
|
3980
|
+
replyMode: z.ZodNullable<z.ZodOptional<z.ZodEnum<["reply-first", "analysis-first"]>>>;
|
|
3981
|
+
planIntent: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3982
|
+
routerReason: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3983
|
+
goldenRouteId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
3984
|
+
}, "strip", z.ZodTypeAny, {
|
|
3985
|
+
dispatchId: string;
|
|
3986
|
+
scope: string;
|
|
3987
|
+
replyTo: string;
|
|
3988
|
+
sessionId?: string | null | undefined;
|
|
3989
|
+
taskId?: string | null | undefined;
|
|
3990
|
+
organizationId?: string | null | undefined;
|
|
3991
|
+
memberAgentId?: string | null | undefined;
|
|
3992
|
+
positionId?: string | null | undefined;
|
|
3993
|
+
responsibilityId?: string | null | undefined;
|
|
3994
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
3995
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
3996
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
3997
|
+
planIntent?: string | null | undefined;
|
|
3998
|
+
routerReason?: string | null | undefined;
|
|
3999
|
+
goldenRouteId?: string | null | undefined;
|
|
4000
|
+
}, {
|
|
4001
|
+
dispatchId: string;
|
|
4002
|
+
scope: string;
|
|
4003
|
+
replyTo: string;
|
|
4004
|
+
sessionId?: string | null | undefined;
|
|
4005
|
+
taskId?: string | null | undefined;
|
|
4006
|
+
organizationId?: string | null | undefined;
|
|
4007
|
+
memberAgentId?: string | null | undefined;
|
|
4008
|
+
positionId?: string | null | undefined;
|
|
4009
|
+
responsibilityId?: string | null | undefined;
|
|
4010
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
4011
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
4012
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
4013
|
+
planIntent?: string | null | undefined;
|
|
4014
|
+
routerReason?: string | null | undefined;
|
|
4015
|
+
goldenRouteId?: string | null | undefined;
|
|
4016
|
+
}>>;
|
|
4017
|
+
}, "strip", z.ZodTypeAny, {
|
|
4018
|
+
taskContext?: {
|
|
4019
|
+
taskId: string;
|
|
4020
|
+
organizationId: string;
|
|
4021
|
+
memberAgentId: string;
|
|
4022
|
+
supervisorAgentId: string;
|
|
4023
|
+
organizationRootPath?: string | null | undefined;
|
|
4024
|
+
positionId?: string | null | undefined;
|
|
4025
|
+
responsibilityId?: string | null | undefined;
|
|
4026
|
+
} | undefined;
|
|
4027
|
+
control?: {
|
|
4028
|
+
action: "terminate" | "reopen";
|
|
4029
|
+
reason?: string | null | undefined;
|
|
4030
|
+
newContext?: string | null | undefined;
|
|
4031
|
+
newDecision?: string | null | undefined;
|
|
4032
|
+
newResource?: string | null | undefined;
|
|
4033
|
+
} | undefined;
|
|
4034
|
+
replyContext?: {
|
|
4035
|
+
dispatchId: string;
|
|
4036
|
+
scope: string;
|
|
4037
|
+
replyTo: string;
|
|
4038
|
+
sessionId?: string | null | undefined;
|
|
4039
|
+
taskId?: string | null | undefined;
|
|
4040
|
+
organizationId?: string | null | undefined;
|
|
4041
|
+
memberAgentId?: string | null | undefined;
|
|
4042
|
+
positionId?: string | null | undefined;
|
|
4043
|
+
responsibilityId?: string | null | undefined;
|
|
4044
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
4045
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
4046
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
4047
|
+
planIntent?: string | null | undefined;
|
|
4048
|
+
routerReason?: string | null | undefined;
|
|
4049
|
+
goldenRouteId?: string | null | undefined;
|
|
4050
|
+
} | undefined;
|
|
4051
|
+
}, {
|
|
4052
|
+
taskContext?: {
|
|
4053
|
+
taskId: string;
|
|
4054
|
+
organizationId: string;
|
|
4055
|
+
memberAgentId: string;
|
|
4056
|
+
supervisorAgentId: string;
|
|
4057
|
+
organizationRootPath?: string | null | undefined;
|
|
4058
|
+
positionId?: string | null | undefined;
|
|
4059
|
+
responsibilityId?: string | null | undefined;
|
|
4060
|
+
} | undefined;
|
|
4061
|
+
control?: {
|
|
4062
|
+
action: "terminate" | "reopen";
|
|
4063
|
+
reason?: string | null | undefined;
|
|
4064
|
+
newContext?: string | null | undefined;
|
|
4065
|
+
newDecision?: string | null | undefined;
|
|
4066
|
+
newResource?: string | null | undefined;
|
|
4067
|
+
} | undefined;
|
|
4068
|
+
replyContext?: {
|
|
4069
|
+
dispatchId: string;
|
|
4070
|
+
scope: string;
|
|
4071
|
+
replyTo: string;
|
|
4072
|
+
sessionId?: string | null | undefined;
|
|
4073
|
+
taskId?: string | null | undefined;
|
|
4074
|
+
organizationId?: string | null | undefined;
|
|
4075
|
+
memberAgentId?: string | null | undefined;
|
|
4076
|
+
positionId?: string | null | undefined;
|
|
4077
|
+
responsibilityId?: string | null | undefined;
|
|
4078
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
4079
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
4080
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
4081
|
+
planIntent?: string | null | undefined;
|
|
4082
|
+
routerReason?: string | null | undefined;
|
|
4083
|
+
goldenRouteId?: string | null | undefined;
|
|
4084
|
+
} | undefined;
|
|
4085
|
+
}>>;
|
|
4086
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
4087
|
+
sentFrom: z.ZodOptional<z.ZodString>;
|
|
4088
|
+
permissionMode: z.ZodOptional<z.ZodEnum<["default", "acceptEdits", "bypassPermissions", "plan", "read-only", "safe-yolo", "yolo"]>>;
|
|
4089
|
+
model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4090
|
+
fallbackModel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4091
|
+
customSystemPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4092
|
+
appendSystemPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4093
|
+
allowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
4094
|
+
disallowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
4095
|
+
happyOrg: z.ZodOptional<z.ZodObject<{
|
|
4096
|
+
taskContext: z.ZodOptional<z.ZodObject<{
|
|
4097
|
+
taskId: z.ZodString;
|
|
4098
|
+
organizationId: z.ZodString;
|
|
4099
|
+
organizationRootPath: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4100
|
+
memberAgentId: z.ZodString;
|
|
4101
|
+
supervisorAgentId: z.ZodString;
|
|
4102
|
+
positionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4103
|
+
responsibilityId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4104
|
+
}, "strip", z.ZodTypeAny, {
|
|
4105
|
+
taskId: string;
|
|
4106
|
+
organizationId: string;
|
|
4107
|
+
memberAgentId: string;
|
|
4108
|
+
supervisorAgentId: string;
|
|
4109
|
+
organizationRootPath?: string | null | undefined;
|
|
4110
|
+
positionId?: string | null | undefined;
|
|
4111
|
+
responsibilityId?: string | null | undefined;
|
|
4112
|
+
}, {
|
|
4113
|
+
taskId: string;
|
|
4114
|
+
organizationId: string;
|
|
4115
|
+
memberAgentId: string;
|
|
4116
|
+
supervisorAgentId: string;
|
|
4117
|
+
organizationRootPath?: string | null | undefined;
|
|
4118
|
+
positionId?: string | null | undefined;
|
|
4119
|
+
responsibilityId?: string | null | undefined;
|
|
4120
|
+
}>>;
|
|
4121
|
+
control: z.ZodOptional<z.ZodObject<{
|
|
4122
|
+
action: z.ZodEnum<["terminate", "reopen"]>;
|
|
4123
|
+
reason: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4124
|
+
newContext: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4125
|
+
newDecision: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4126
|
+
newResource: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4127
|
+
}, "strip", z.ZodTypeAny, {
|
|
4128
|
+
action: "terminate" | "reopen";
|
|
4129
|
+
reason?: string | null | undefined;
|
|
4130
|
+
newContext?: string | null | undefined;
|
|
4131
|
+
newDecision?: string | null | undefined;
|
|
4132
|
+
newResource?: string | null | undefined;
|
|
4133
|
+
}, {
|
|
4134
|
+
action: "terminate" | "reopen";
|
|
4135
|
+
reason?: string | null | undefined;
|
|
4136
|
+
newContext?: string | null | undefined;
|
|
4137
|
+
newDecision?: string | null | undefined;
|
|
4138
|
+
newResource?: string | null | undefined;
|
|
4139
|
+
}>>;
|
|
4140
|
+
replyContext: z.ZodOptional<z.ZodObject<{
|
|
4141
|
+
dispatchId: z.ZodString;
|
|
4142
|
+
taskId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4143
|
+
organizationId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4144
|
+
scope: z.ZodString;
|
|
4145
|
+
replyTo: z.ZodString;
|
|
4146
|
+
memberAgentId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4147
|
+
sessionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4148
|
+
positionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4149
|
+
responsibilityId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4150
|
+
routeType: z.ZodNullable<z.ZodOptional<z.ZodEnum<["direct_reply", "version_planning_reply", "analysis_task", "implementation_task", "ack_plus_reply"]>>>;
|
|
4151
|
+
ackType: z.ZodNullable<z.ZodOptional<z.ZodEnum<["none", "read_ack", "dispatch_ack", "route_ack", "progress_ack"]>>>;
|
|
4152
|
+
replyMode: z.ZodNullable<z.ZodOptional<z.ZodEnum<["reply-first", "analysis-first"]>>>;
|
|
4153
|
+
planIntent: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4154
|
+
routerReason: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4155
|
+
goldenRouteId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4156
|
+
}, "strip", z.ZodTypeAny, {
|
|
4157
|
+
dispatchId: string;
|
|
4158
|
+
scope: string;
|
|
4159
|
+
replyTo: string;
|
|
4160
|
+
sessionId?: string | null | undefined;
|
|
4161
|
+
taskId?: string | null | undefined;
|
|
4162
|
+
organizationId?: string | null | undefined;
|
|
4163
|
+
memberAgentId?: string | null | undefined;
|
|
4164
|
+
positionId?: string | null | undefined;
|
|
4165
|
+
responsibilityId?: string | null | undefined;
|
|
4166
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
4167
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
4168
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
4169
|
+
planIntent?: string | null | undefined;
|
|
4170
|
+
routerReason?: string | null | undefined;
|
|
4171
|
+
goldenRouteId?: string | null | undefined;
|
|
4172
|
+
}, {
|
|
4173
|
+
dispatchId: string;
|
|
4174
|
+
scope: string;
|
|
4175
|
+
replyTo: string;
|
|
4176
|
+
sessionId?: string | null | undefined;
|
|
4177
|
+
taskId?: string | null | undefined;
|
|
4178
|
+
organizationId?: string | null | undefined;
|
|
4179
|
+
memberAgentId?: string | null | undefined;
|
|
4180
|
+
positionId?: string | null | undefined;
|
|
4181
|
+
responsibilityId?: string | null | undefined;
|
|
4182
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
4183
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
4184
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
4185
|
+
planIntent?: string | null | undefined;
|
|
4186
|
+
routerReason?: string | null | undefined;
|
|
4187
|
+
goldenRouteId?: string | null | undefined;
|
|
4188
|
+
}>>;
|
|
4189
|
+
}, "strip", z.ZodTypeAny, {
|
|
4190
|
+
taskContext?: {
|
|
4191
|
+
taskId: string;
|
|
4192
|
+
organizationId: string;
|
|
4193
|
+
memberAgentId: string;
|
|
4194
|
+
supervisorAgentId: string;
|
|
4195
|
+
organizationRootPath?: string | null | undefined;
|
|
4196
|
+
positionId?: string | null | undefined;
|
|
4197
|
+
responsibilityId?: string | null | undefined;
|
|
4198
|
+
} | undefined;
|
|
4199
|
+
control?: {
|
|
4200
|
+
action: "terminate" | "reopen";
|
|
4201
|
+
reason?: string | null | undefined;
|
|
4202
|
+
newContext?: string | null | undefined;
|
|
4203
|
+
newDecision?: string | null | undefined;
|
|
4204
|
+
newResource?: string | null | undefined;
|
|
4205
|
+
} | undefined;
|
|
4206
|
+
replyContext?: {
|
|
4207
|
+
dispatchId: string;
|
|
4208
|
+
scope: string;
|
|
4209
|
+
replyTo: string;
|
|
4210
|
+
sessionId?: string | null | undefined;
|
|
4211
|
+
taskId?: string | null | undefined;
|
|
4212
|
+
organizationId?: string | null | undefined;
|
|
4213
|
+
memberAgentId?: string | null | undefined;
|
|
4214
|
+
positionId?: string | null | undefined;
|
|
4215
|
+
responsibilityId?: string | null | undefined;
|
|
4216
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
4217
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
4218
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
4219
|
+
planIntent?: string | null | undefined;
|
|
4220
|
+
routerReason?: string | null | undefined;
|
|
4221
|
+
goldenRouteId?: string | null | undefined;
|
|
4222
|
+
} | undefined;
|
|
4223
|
+
}, {
|
|
4224
|
+
taskContext?: {
|
|
4225
|
+
taskId: string;
|
|
4226
|
+
organizationId: string;
|
|
4227
|
+
memberAgentId: string;
|
|
4228
|
+
supervisorAgentId: string;
|
|
4229
|
+
organizationRootPath?: string | null | undefined;
|
|
4230
|
+
positionId?: string | null | undefined;
|
|
4231
|
+
responsibilityId?: string | null | undefined;
|
|
4232
|
+
} | undefined;
|
|
4233
|
+
control?: {
|
|
4234
|
+
action: "terminate" | "reopen";
|
|
4235
|
+
reason?: string | null | undefined;
|
|
4236
|
+
newContext?: string | null | undefined;
|
|
4237
|
+
newDecision?: string | null | undefined;
|
|
4238
|
+
newResource?: string | null | undefined;
|
|
4239
|
+
} | undefined;
|
|
4240
|
+
replyContext?: {
|
|
4241
|
+
dispatchId: string;
|
|
4242
|
+
scope: string;
|
|
4243
|
+
replyTo: string;
|
|
4244
|
+
sessionId?: string | null | undefined;
|
|
4245
|
+
taskId?: string | null | undefined;
|
|
4246
|
+
organizationId?: string | null | undefined;
|
|
4247
|
+
memberAgentId?: string | null | undefined;
|
|
4248
|
+
positionId?: string | null | undefined;
|
|
4249
|
+
responsibilityId?: string | null | undefined;
|
|
4250
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
4251
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
4252
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
4253
|
+
planIntent?: string | null | undefined;
|
|
4254
|
+
routerReason?: string | null | undefined;
|
|
4255
|
+
goldenRouteId?: string | null | undefined;
|
|
4256
|
+
} | undefined;
|
|
4257
|
+
}>>;
|
|
4258
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
4259
|
+
}, "strip", z.ZodTypeAny, {
|
|
4260
|
+
content: {
|
|
4261
|
+
type: "text";
|
|
4262
|
+
text: string;
|
|
4263
|
+
};
|
|
4264
|
+
role: "user";
|
|
4265
|
+
localKey?: string | undefined;
|
|
4266
|
+
meta?: z.objectOutputType<{
|
|
4267
|
+
sentFrom: z.ZodOptional<z.ZodString>;
|
|
4268
|
+
permissionMode: z.ZodOptional<z.ZodEnum<["default", "acceptEdits", "bypassPermissions", "plan", "read-only", "safe-yolo", "yolo"]>>;
|
|
4269
|
+
model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4270
|
+
fallbackModel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4271
|
+
customSystemPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4272
|
+
appendSystemPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4273
|
+
allowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
4274
|
+
disallowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
4275
|
+
happyOrg: z.ZodOptional<z.ZodObject<{
|
|
4276
|
+
taskContext: z.ZodOptional<z.ZodObject<{
|
|
4277
|
+
taskId: z.ZodString;
|
|
4278
|
+
organizationId: z.ZodString;
|
|
4279
|
+
organizationRootPath: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4280
|
+
memberAgentId: z.ZodString;
|
|
4281
|
+
supervisorAgentId: z.ZodString;
|
|
4282
|
+
positionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4283
|
+
responsibilityId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4284
|
+
}, "strip", z.ZodTypeAny, {
|
|
4285
|
+
taskId: string;
|
|
4286
|
+
organizationId: string;
|
|
4287
|
+
memberAgentId: string;
|
|
4288
|
+
supervisorAgentId: string;
|
|
4289
|
+
organizationRootPath?: string | null | undefined;
|
|
4290
|
+
positionId?: string | null | undefined;
|
|
4291
|
+
responsibilityId?: string | null | undefined;
|
|
4292
|
+
}, {
|
|
4293
|
+
taskId: string;
|
|
4294
|
+
organizationId: string;
|
|
4295
|
+
memberAgentId: string;
|
|
4296
|
+
supervisorAgentId: string;
|
|
4297
|
+
organizationRootPath?: string | null | undefined;
|
|
4298
|
+
positionId?: string | null | undefined;
|
|
4299
|
+
responsibilityId?: string | null | undefined;
|
|
4300
|
+
}>>;
|
|
4301
|
+
control: z.ZodOptional<z.ZodObject<{
|
|
4302
|
+
action: z.ZodEnum<["terminate", "reopen"]>;
|
|
4303
|
+
reason: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4304
|
+
newContext: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4305
|
+
newDecision: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4306
|
+
newResource: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4307
|
+
}, "strip", z.ZodTypeAny, {
|
|
4308
|
+
action: "terminate" | "reopen";
|
|
4309
|
+
reason?: string | null | undefined;
|
|
4310
|
+
newContext?: string | null | undefined;
|
|
4311
|
+
newDecision?: string | null | undefined;
|
|
4312
|
+
newResource?: string | null | undefined;
|
|
4313
|
+
}, {
|
|
4314
|
+
action: "terminate" | "reopen";
|
|
4315
|
+
reason?: string | null | undefined;
|
|
4316
|
+
newContext?: string | null | undefined;
|
|
4317
|
+
newDecision?: string | null | undefined;
|
|
4318
|
+
newResource?: string | null | undefined;
|
|
4319
|
+
}>>;
|
|
4320
|
+
replyContext: z.ZodOptional<z.ZodObject<{
|
|
4321
|
+
dispatchId: z.ZodString;
|
|
4322
|
+
taskId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4323
|
+
organizationId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4324
|
+
scope: z.ZodString;
|
|
4325
|
+
replyTo: z.ZodString;
|
|
4326
|
+
memberAgentId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4327
|
+
sessionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4328
|
+
positionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4329
|
+
responsibilityId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4330
|
+
routeType: z.ZodNullable<z.ZodOptional<z.ZodEnum<["direct_reply", "version_planning_reply", "analysis_task", "implementation_task", "ack_plus_reply"]>>>;
|
|
4331
|
+
ackType: z.ZodNullable<z.ZodOptional<z.ZodEnum<["none", "read_ack", "dispatch_ack", "route_ack", "progress_ack"]>>>;
|
|
4332
|
+
replyMode: z.ZodNullable<z.ZodOptional<z.ZodEnum<["reply-first", "analysis-first"]>>>;
|
|
4333
|
+
planIntent: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4334
|
+
routerReason: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4335
|
+
goldenRouteId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4336
|
+
}, "strip", z.ZodTypeAny, {
|
|
4337
|
+
dispatchId: string;
|
|
4338
|
+
scope: string;
|
|
4339
|
+
replyTo: string;
|
|
4340
|
+
sessionId?: string | null | undefined;
|
|
4341
|
+
taskId?: string | null | undefined;
|
|
4342
|
+
organizationId?: string | null | undefined;
|
|
4343
|
+
memberAgentId?: string | null | undefined;
|
|
4344
|
+
positionId?: string | null | undefined;
|
|
4345
|
+
responsibilityId?: string | null | undefined;
|
|
4346
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
4347
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
4348
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
4349
|
+
planIntent?: string | null | undefined;
|
|
4350
|
+
routerReason?: string | null | undefined;
|
|
4351
|
+
goldenRouteId?: string | null | undefined;
|
|
4352
|
+
}, {
|
|
4353
|
+
dispatchId: string;
|
|
4354
|
+
scope: string;
|
|
4355
|
+
replyTo: string;
|
|
4356
|
+
sessionId?: string | null | undefined;
|
|
4357
|
+
taskId?: string | null | undefined;
|
|
4358
|
+
organizationId?: string | null | undefined;
|
|
4359
|
+
memberAgentId?: string | null | undefined;
|
|
4360
|
+
positionId?: string | null | undefined;
|
|
4361
|
+
responsibilityId?: string | null | undefined;
|
|
4362
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
4363
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
4364
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
4365
|
+
planIntent?: string | null | undefined;
|
|
4366
|
+
routerReason?: string | null | undefined;
|
|
4367
|
+
goldenRouteId?: string | null | undefined;
|
|
4368
|
+
}>>;
|
|
4369
|
+
}, "strip", z.ZodTypeAny, {
|
|
4370
|
+
taskContext?: {
|
|
4371
|
+
taskId: string;
|
|
4372
|
+
organizationId: string;
|
|
4373
|
+
memberAgentId: string;
|
|
4374
|
+
supervisorAgentId: string;
|
|
4375
|
+
organizationRootPath?: string | null | undefined;
|
|
4376
|
+
positionId?: string | null | undefined;
|
|
4377
|
+
responsibilityId?: string | null | undefined;
|
|
4378
|
+
} | undefined;
|
|
4379
|
+
control?: {
|
|
4380
|
+
action: "terminate" | "reopen";
|
|
4381
|
+
reason?: string | null | undefined;
|
|
4382
|
+
newContext?: string | null | undefined;
|
|
4383
|
+
newDecision?: string | null | undefined;
|
|
4384
|
+
newResource?: string | null | undefined;
|
|
4385
|
+
} | undefined;
|
|
4386
|
+
replyContext?: {
|
|
4387
|
+
dispatchId: string;
|
|
4388
|
+
scope: string;
|
|
4389
|
+
replyTo: string;
|
|
4390
|
+
sessionId?: string | null | undefined;
|
|
4391
|
+
taskId?: string | null | undefined;
|
|
4392
|
+
organizationId?: string | null | undefined;
|
|
4393
|
+
memberAgentId?: string | null | undefined;
|
|
4394
|
+
positionId?: string | null | undefined;
|
|
4395
|
+
responsibilityId?: string | null | undefined;
|
|
4396
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
4397
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
4398
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
4399
|
+
planIntent?: string | null | undefined;
|
|
4400
|
+
routerReason?: string | null | undefined;
|
|
4401
|
+
goldenRouteId?: string | null | undefined;
|
|
4402
|
+
} | undefined;
|
|
4403
|
+
}, {
|
|
4404
|
+
taskContext?: {
|
|
4405
|
+
taskId: string;
|
|
4406
|
+
organizationId: string;
|
|
4407
|
+
memberAgentId: string;
|
|
4408
|
+
supervisorAgentId: string;
|
|
4409
|
+
organizationRootPath?: string | null | undefined;
|
|
4410
|
+
positionId?: string | null | undefined;
|
|
4411
|
+
responsibilityId?: string | null | undefined;
|
|
4412
|
+
} | undefined;
|
|
4413
|
+
control?: {
|
|
4414
|
+
action: "terminate" | "reopen";
|
|
4415
|
+
reason?: string | null | undefined;
|
|
4416
|
+
newContext?: string | null | undefined;
|
|
4417
|
+
newDecision?: string | null | undefined;
|
|
4418
|
+
newResource?: string | null | undefined;
|
|
4419
|
+
} | undefined;
|
|
4420
|
+
replyContext?: {
|
|
4421
|
+
dispatchId: string;
|
|
4422
|
+
scope: string;
|
|
4423
|
+
replyTo: string;
|
|
4424
|
+
sessionId?: string | null | undefined;
|
|
4425
|
+
taskId?: string | null | undefined;
|
|
4426
|
+
organizationId?: string | null | undefined;
|
|
4427
|
+
memberAgentId?: string | null | undefined;
|
|
4428
|
+
positionId?: string | null | undefined;
|
|
4429
|
+
responsibilityId?: string | null | undefined;
|
|
4430
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
4431
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
4432
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
4433
|
+
planIntent?: string | null | undefined;
|
|
4434
|
+
routerReason?: string | null | undefined;
|
|
4435
|
+
goldenRouteId?: string | null | undefined;
|
|
4436
|
+
} | undefined;
|
|
4437
|
+
}>>;
|
|
4438
|
+
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
4439
|
+
}, {
|
|
4440
|
+
content: {
|
|
4441
|
+
type: "text";
|
|
4442
|
+
text: string;
|
|
4443
|
+
};
|
|
4444
|
+
role: "user";
|
|
4445
|
+
localKey?: string | undefined;
|
|
4446
|
+
meta?: z.objectInputType<{
|
|
4447
|
+
sentFrom: z.ZodOptional<z.ZodString>;
|
|
4448
|
+
permissionMode: z.ZodOptional<z.ZodEnum<["default", "acceptEdits", "bypassPermissions", "plan", "read-only", "safe-yolo", "yolo"]>>;
|
|
4449
|
+
model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4450
|
+
fallbackModel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4451
|
+
customSystemPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4452
|
+
appendSystemPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4453
|
+
allowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
4454
|
+
disallowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
4455
|
+
happyOrg: z.ZodOptional<z.ZodObject<{
|
|
4456
|
+
taskContext: z.ZodOptional<z.ZodObject<{
|
|
4457
|
+
taskId: z.ZodString;
|
|
4458
|
+
organizationId: z.ZodString;
|
|
4459
|
+
organizationRootPath: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4460
|
+
memberAgentId: z.ZodString;
|
|
4461
|
+
supervisorAgentId: z.ZodString;
|
|
4462
|
+
positionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4463
|
+
responsibilityId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4464
|
+
}, "strip", z.ZodTypeAny, {
|
|
4465
|
+
taskId: string;
|
|
4466
|
+
organizationId: string;
|
|
4467
|
+
memberAgentId: string;
|
|
4468
|
+
supervisorAgentId: string;
|
|
4469
|
+
organizationRootPath?: string | null | undefined;
|
|
4470
|
+
positionId?: string | null | undefined;
|
|
4471
|
+
responsibilityId?: string | null | undefined;
|
|
4472
|
+
}, {
|
|
4473
|
+
taskId: string;
|
|
4474
|
+
organizationId: string;
|
|
4475
|
+
memberAgentId: string;
|
|
4476
|
+
supervisorAgentId: string;
|
|
4477
|
+
organizationRootPath?: string | null | undefined;
|
|
4478
|
+
positionId?: string | null | undefined;
|
|
4479
|
+
responsibilityId?: string | null | undefined;
|
|
4480
|
+
}>>;
|
|
4481
|
+
control: z.ZodOptional<z.ZodObject<{
|
|
4482
|
+
action: z.ZodEnum<["terminate", "reopen"]>;
|
|
4483
|
+
reason: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4484
|
+
newContext: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4485
|
+
newDecision: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4486
|
+
newResource: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4487
|
+
}, "strip", z.ZodTypeAny, {
|
|
4488
|
+
action: "terminate" | "reopen";
|
|
4489
|
+
reason?: string | null | undefined;
|
|
4490
|
+
newContext?: string | null | undefined;
|
|
4491
|
+
newDecision?: string | null | undefined;
|
|
4492
|
+
newResource?: string | null | undefined;
|
|
4493
|
+
}, {
|
|
4494
|
+
action: "terminate" | "reopen";
|
|
4495
|
+
reason?: string | null | undefined;
|
|
4496
|
+
newContext?: string | null | undefined;
|
|
4497
|
+
newDecision?: string | null | undefined;
|
|
4498
|
+
newResource?: string | null | undefined;
|
|
4499
|
+
}>>;
|
|
4500
|
+
replyContext: z.ZodOptional<z.ZodObject<{
|
|
4501
|
+
dispatchId: z.ZodString;
|
|
4502
|
+
taskId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4503
|
+
organizationId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4504
|
+
scope: z.ZodString;
|
|
4505
|
+
replyTo: z.ZodString;
|
|
4506
|
+
memberAgentId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4507
|
+
sessionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4508
|
+
positionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4509
|
+
responsibilityId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4510
|
+
routeType: z.ZodNullable<z.ZodOptional<z.ZodEnum<["direct_reply", "version_planning_reply", "analysis_task", "implementation_task", "ack_plus_reply"]>>>;
|
|
4511
|
+
ackType: z.ZodNullable<z.ZodOptional<z.ZodEnum<["none", "read_ack", "dispatch_ack", "route_ack", "progress_ack"]>>>;
|
|
4512
|
+
replyMode: z.ZodNullable<z.ZodOptional<z.ZodEnum<["reply-first", "analysis-first"]>>>;
|
|
4513
|
+
planIntent: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4514
|
+
routerReason: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4515
|
+
goldenRouteId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4516
|
+
}, "strip", z.ZodTypeAny, {
|
|
4517
|
+
dispatchId: string;
|
|
4518
|
+
scope: string;
|
|
4519
|
+
replyTo: string;
|
|
4520
|
+
sessionId?: string | null | undefined;
|
|
4521
|
+
taskId?: string | null | undefined;
|
|
4522
|
+
organizationId?: string | null | undefined;
|
|
4523
|
+
memberAgentId?: string | null | undefined;
|
|
4524
|
+
positionId?: string | null | undefined;
|
|
4525
|
+
responsibilityId?: string | null | undefined;
|
|
4526
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
4527
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
4528
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
4529
|
+
planIntent?: string | null | undefined;
|
|
4530
|
+
routerReason?: string | null | undefined;
|
|
4531
|
+
goldenRouteId?: string | null | undefined;
|
|
4532
|
+
}, {
|
|
4533
|
+
dispatchId: string;
|
|
4534
|
+
scope: string;
|
|
4535
|
+
replyTo: string;
|
|
4536
|
+
sessionId?: string | null | undefined;
|
|
4537
|
+
taskId?: string | null | undefined;
|
|
4538
|
+
organizationId?: string | null | undefined;
|
|
4539
|
+
memberAgentId?: string | null | undefined;
|
|
4540
|
+
positionId?: string | null | undefined;
|
|
4541
|
+
responsibilityId?: string | null | undefined;
|
|
4542
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
4543
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
4544
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
4545
|
+
planIntent?: string | null | undefined;
|
|
4546
|
+
routerReason?: string | null | undefined;
|
|
4547
|
+
goldenRouteId?: string | null | undefined;
|
|
4548
|
+
}>>;
|
|
4549
|
+
}, "strip", z.ZodTypeAny, {
|
|
4550
|
+
taskContext?: {
|
|
4551
|
+
taskId: string;
|
|
4552
|
+
organizationId: string;
|
|
4553
|
+
memberAgentId: string;
|
|
4554
|
+
supervisorAgentId: string;
|
|
4555
|
+
organizationRootPath?: string | null | undefined;
|
|
4556
|
+
positionId?: string | null | undefined;
|
|
4557
|
+
responsibilityId?: string | null | undefined;
|
|
4558
|
+
} | undefined;
|
|
4559
|
+
control?: {
|
|
4560
|
+
action: "terminate" | "reopen";
|
|
4561
|
+
reason?: string | null | undefined;
|
|
4562
|
+
newContext?: string | null | undefined;
|
|
4563
|
+
newDecision?: string | null | undefined;
|
|
4564
|
+
newResource?: string | null | undefined;
|
|
4565
|
+
} | undefined;
|
|
4566
|
+
replyContext?: {
|
|
4567
|
+
dispatchId: string;
|
|
4568
|
+
scope: string;
|
|
4569
|
+
replyTo: string;
|
|
4570
|
+
sessionId?: string | null | undefined;
|
|
4571
|
+
taskId?: string | null | undefined;
|
|
4572
|
+
organizationId?: string | null | undefined;
|
|
4573
|
+
memberAgentId?: string | null | undefined;
|
|
4574
|
+
positionId?: string | null | undefined;
|
|
4575
|
+
responsibilityId?: string | null | undefined;
|
|
4576
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
4577
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
4578
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
4579
|
+
planIntent?: string | null | undefined;
|
|
4580
|
+
routerReason?: string | null | undefined;
|
|
4581
|
+
goldenRouteId?: string | null | undefined;
|
|
4582
|
+
} | undefined;
|
|
4583
|
+
}, {
|
|
4584
|
+
taskContext?: {
|
|
4585
|
+
taskId: string;
|
|
4586
|
+
organizationId: string;
|
|
4587
|
+
memberAgentId: string;
|
|
4588
|
+
supervisorAgentId: string;
|
|
4589
|
+
organizationRootPath?: string | null | undefined;
|
|
4590
|
+
positionId?: string | null | undefined;
|
|
4591
|
+
responsibilityId?: string | null | undefined;
|
|
4592
|
+
} | undefined;
|
|
4593
|
+
control?: {
|
|
4594
|
+
action: "terminate" | "reopen";
|
|
4595
|
+
reason?: string | null | undefined;
|
|
4596
|
+
newContext?: string | null | undefined;
|
|
4597
|
+
newDecision?: string | null | undefined;
|
|
4598
|
+
newResource?: string | null | undefined;
|
|
4599
|
+
} | undefined;
|
|
4600
|
+
replyContext?: {
|
|
4601
|
+
dispatchId: string;
|
|
4602
|
+
scope: string;
|
|
4603
|
+
replyTo: string;
|
|
4604
|
+
sessionId?: string | null | undefined;
|
|
4605
|
+
taskId?: string | null | undefined;
|
|
4606
|
+
organizationId?: string | null | undefined;
|
|
4607
|
+
memberAgentId?: string | null | undefined;
|
|
4608
|
+
positionId?: string | null | undefined;
|
|
4609
|
+
responsibilityId?: string | null | undefined;
|
|
4610
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
4611
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
4612
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
4613
|
+
planIntent?: string | null | undefined;
|
|
4614
|
+
routerReason?: string | null | undefined;
|
|
4615
|
+
goldenRouteId?: string | null | undefined;
|
|
4616
|
+
} | undefined;
|
|
4617
|
+
}>>;
|
|
4618
|
+
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
4619
|
+
}>, z.ZodObject<{
|
|
4620
|
+
role: z.ZodLiteral<"agent">;
|
|
4621
|
+
content: z.ZodUnion<[z.ZodObject<{
|
|
4622
|
+
type: z.ZodLiteral<"output">;
|
|
4623
|
+
data: z.ZodUnknown;
|
|
4624
|
+
}, "strip", z.ZodTypeAny, {
|
|
4625
|
+
type: "output";
|
|
4626
|
+
data?: unknown;
|
|
4627
|
+
}, {
|
|
4628
|
+
type: "output";
|
|
4629
|
+
data?: unknown;
|
|
4630
|
+
}>, z.ZodObject<{
|
|
4631
|
+
type: z.ZodLiteral<"codex">;
|
|
4632
|
+
data: z.ZodUnknown;
|
|
4633
|
+
}, "strip", z.ZodTypeAny, {
|
|
4634
|
+
type: "codex";
|
|
4635
|
+
data?: unknown;
|
|
4636
|
+
}, {
|
|
4637
|
+
type: "codex";
|
|
4638
|
+
data?: unknown;
|
|
4639
|
+
}>, z.ZodObject<{
|
|
4640
|
+
type: z.ZodLiteral<"acp">;
|
|
4641
|
+
provider: z.ZodEnum<["gemini", "codex", "cursor", "claude", "opencode"]>;
|
|
4642
|
+
data: z.ZodUnknown;
|
|
4643
|
+
}, "strip", z.ZodTypeAny, {
|
|
4644
|
+
type: "acp";
|
|
4645
|
+
provider: "cursor" | "codex" | "gemini" | "claude" | "opencode";
|
|
4646
|
+
data?: unknown;
|
|
4647
|
+
}, {
|
|
4648
|
+
type: "acp";
|
|
4649
|
+
provider: "cursor" | "codex" | "gemini" | "claude" | "opencode";
|
|
4650
|
+
data?: unknown;
|
|
4651
|
+
}>, z.ZodObject<{
|
|
4652
|
+
type: z.ZodLiteral<"event">;
|
|
4653
|
+
id: z.ZodOptional<z.ZodString>;
|
|
4654
|
+
data: z.ZodUnknown;
|
|
4655
|
+
}, "strip", z.ZodTypeAny, {
|
|
4656
|
+
type: "event";
|
|
4657
|
+
id?: string | undefined;
|
|
4658
|
+
data?: unknown;
|
|
4659
|
+
}, {
|
|
4660
|
+
type: "event";
|
|
4661
|
+
id?: string | undefined;
|
|
4662
|
+
data?: unknown;
|
|
4663
|
+
}>]>;
|
|
4664
|
+
meta: z.ZodOptional<z.ZodObject<{
|
|
4665
|
+
sentFrom: z.ZodOptional<z.ZodString>;
|
|
4666
|
+
permissionMode: z.ZodOptional<z.ZodEnum<["default", "acceptEdits", "bypassPermissions", "plan", "read-only", "safe-yolo", "yolo"]>>;
|
|
4667
|
+
model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4668
|
+
fallbackModel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4669
|
+
customSystemPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4670
|
+
appendSystemPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4671
|
+
allowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
4672
|
+
disallowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
4673
|
+
happyOrg: z.ZodOptional<z.ZodObject<{
|
|
4674
|
+
taskContext: z.ZodOptional<z.ZodObject<{
|
|
4675
|
+
taskId: z.ZodString;
|
|
4676
|
+
organizationId: z.ZodString;
|
|
4677
|
+
organizationRootPath: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4678
|
+
memberAgentId: z.ZodString;
|
|
4679
|
+
supervisorAgentId: z.ZodString;
|
|
4680
|
+
positionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4681
|
+
responsibilityId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4682
|
+
}, "strip", z.ZodTypeAny, {
|
|
4683
|
+
taskId: string;
|
|
4684
|
+
organizationId: string;
|
|
4685
|
+
memberAgentId: string;
|
|
4686
|
+
supervisorAgentId: string;
|
|
4687
|
+
organizationRootPath?: string | null | undefined;
|
|
4688
|
+
positionId?: string | null | undefined;
|
|
4689
|
+
responsibilityId?: string | null | undefined;
|
|
4690
|
+
}, {
|
|
4691
|
+
taskId: string;
|
|
4692
|
+
organizationId: string;
|
|
4693
|
+
memberAgentId: string;
|
|
4694
|
+
supervisorAgentId: string;
|
|
4695
|
+
organizationRootPath?: string | null | undefined;
|
|
4696
|
+
positionId?: string | null | undefined;
|
|
4697
|
+
responsibilityId?: string | null | undefined;
|
|
4698
|
+
}>>;
|
|
4699
|
+
control: z.ZodOptional<z.ZodObject<{
|
|
4700
|
+
action: z.ZodEnum<["terminate", "reopen"]>;
|
|
4701
|
+
reason: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4702
|
+
newContext: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4703
|
+
newDecision: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4704
|
+
newResource: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4705
|
+
}, "strip", z.ZodTypeAny, {
|
|
4706
|
+
action: "terminate" | "reopen";
|
|
4707
|
+
reason?: string | null | undefined;
|
|
4708
|
+
newContext?: string | null | undefined;
|
|
4709
|
+
newDecision?: string | null | undefined;
|
|
4710
|
+
newResource?: string | null | undefined;
|
|
4711
|
+
}, {
|
|
4712
|
+
action: "terminate" | "reopen";
|
|
4713
|
+
reason?: string | null | undefined;
|
|
4714
|
+
newContext?: string | null | undefined;
|
|
4715
|
+
newDecision?: string | null | undefined;
|
|
4716
|
+
newResource?: string | null | undefined;
|
|
4717
|
+
}>>;
|
|
4718
|
+
replyContext: z.ZodOptional<z.ZodObject<{
|
|
4719
|
+
dispatchId: z.ZodString;
|
|
4720
|
+
taskId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4721
|
+
organizationId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4722
|
+
scope: z.ZodString;
|
|
4723
|
+
replyTo: z.ZodString;
|
|
4724
|
+
memberAgentId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4725
|
+
sessionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4726
|
+
positionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4727
|
+
responsibilityId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4728
|
+
routeType: z.ZodNullable<z.ZodOptional<z.ZodEnum<["direct_reply", "version_planning_reply", "analysis_task", "implementation_task", "ack_plus_reply"]>>>;
|
|
4729
|
+
ackType: z.ZodNullable<z.ZodOptional<z.ZodEnum<["none", "read_ack", "dispatch_ack", "route_ack", "progress_ack"]>>>;
|
|
4730
|
+
replyMode: z.ZodNullable<z.ZodOptional<z.ZodEnum<["reply-first", "analysis-first"]>>>;
|
|
4731
|
+
planIntent: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4732
|
+
routerReason: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4733
|
+
goldenRouteId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4734
|
+
}, "strip", z.ZodTypeAny, {
|
|
4735
|
+
dispatchId: string;
|
|
4736
|
+
scope: string;
|
|
4737
|
+
replyTo: string;
|
|
4738
|
+
sessionId?: string | null | undefined;
|
|
4739
|
+
taskId?: string | null | undefined;
|
|
4740
|
+
organizationId?: string | null | undefined;
|
|
4741
|
+
memberAgentId?: string | null | undefined;
|
|
4742
|
+
positionId?: string | null | undefined;
|
|
4743
|
+
responsibilityId?: string | null | undefined;
|
|
4744
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
4745
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
4746
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
4747
|
+
planIntent?: string | null | undefined;
|
|
4748
|
+
routerReason?: string | null | undefined;
|
|
4749
|
+
goldenRouteId?: string | null | undefined;
|
|
4750
|
+
}, {
|
|
4751
|
+
dispatchId: string;
|
|
4752
|
+
scope: string;
|
|
4753
|
+
replyTo: string;
|
|
4754
|
+
sessionId?: string | null | undefined;
|
|
4755
|
+
taskId?: string | null | undefined;
|
|
4756
|
+
organizationId?: string | null | undefined;
|
|
4757
|
+
memberAgentId?: string | null | undefined;
|
|
4758
|
+
positionId?: string | null | undefined;
|
|
4759
|
+
responsibilityId?: string | null | undefined;
|
|
4760
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
4761
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
4762
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
4763
|
+
planIntent?: string | null | undefined;
|
|
4764
|
+
routerReason?: string | null | undefined;
|
|
4765
|
+
goldenRouteId?: string | null | undefined;
|
|
4766
|
+
}>>;
|
|
4767
|
+
}, "strip", z.ZodTypeAny, {
|
|
4768
|
+
taskContext?: {
|
|
4769
|
+
taskId: string;
|
|
4770
|
+
organizationId: string;
|
|
4771
|
+
memberAgentId: string;
|
|
4772
|
+
supervisorAgentId: string;
|
|
4773
|
+
organizationRootPath?: string | null | undefined;
|
|
4774
|
+
positionId?: string | null | undefined;
|
|
4775
|
+
responsibilityId?: string | null | undefined;
|
|
4776
|
+
} | undefined;
|
|
4777
|
+
control?: {
|
|
4778
|
+
action: "terminate" | "reopen";
|
|
4779
|
+
reason?: string | null | undefined;
|
|
4780
|
+
newContext?: string | null | undefined;
|
|
4781
|
+
newDecision?: string | null | undefined;
|
|
4782
|
+
newResource?: string | null | undefined;
|
|
4783
|
+
} | undefined;
|
|
4784
|
+
replyContext?: {
|
|
4785
|
+
dispatchId: string;
|
|
4786
|
+
scope: string;
|
|
4787
|
+
replyTo: string;
|
|
4788
|
+
sessionId?: string | null | undefined;
|
|
4789
|
+
taskId?: string | null | undefined;
|
|
4790
|
+
organizationId?: string | null | undefined;
|
|
4791
|
+
memberAgentId?: string | null | undefined;
|
|
4792
|
+
positionId?: string | null | undefined;
|
|
4793
|
+
responsibilityId?: string | null | undefined;
|
|
4794
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
4795
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
4796
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
4797
|
+
planIntent?: string | null | undefined;
|
|
4798
|
+
routerReason?: string | null | undefined;
|
|
4799
|
+
goldenRouteId?: string | null | undefined;
|
|
4800
|
+
} | undefined;
|
|
4801
|
+
}, {
|
|
4802
|
+
taskContext?: {
|
|
4803
|
+
taskId: string;
|
|
4804
|
+
organizationId: string;
|
|
4805
|
+
memberAgentId: string;
|
|
4806
|
+
supervisorAgentId: string;
|
|
4807
|
+
organizationRootPath?: string | null | undefined;
|
|
4808
|
+
positionId?: string | null | undefined;
|
|
4809
|
+
responsibilityId?: string | null | undefined;
|
|
4810
|
+
} | undefined;
|
|
4811
|
+
control?: {
|
|
4812
|
+
action: "terminate" | "reopen";
|
|
4813
|
+
reason?: string | null | undefined;
|
|
4814
|
+
newContext?: string | null | undefined;
|
|
4815
|
+
newDecision?: string | null | undefined;
|
|
4816
|
+
newResource?: string | null | undefined;
|
|
4817
|
+
} | undefined;
|
|
4818
|
+
replyContext?: {
|
|
4819
|
+
dispatchId: string;
|
|
4820
|
+
scope: string;
|
|
4821
|
+
replyTo: string;
|
|
4822
|
+
sessionId?: string | null | undefined;
|
|
4823
|
+
taskId?: string | null | undefined;
|
|
4824
|
+
organizationId?: string | null | undefined;
|
|
4825
|
+
memberAgentId?: string | null | undefined;
|
|
4826
|
+
positionId?: string | null | undefined;
|
|
4827
|
+
responsibilityId?: string | null | undefined;
|
|
4828
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
4829
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
4830
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
4831
|
+
planIntent?: string | null | undefined;
|
|
4832
|
+
routerReason?: string | null | undefined;
|
|
4833
|
+
goldenRouteId?: string | null | undefined;
|
|
4834
|
+
} | undefined;
|
|
4835
|
+
}>>;
|
|
4836
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
4837
|
+
sentFrom: z.ZodOptional<z.ZodString>;
|
|
4838
|
+
permissionMode: z.ZodOptional<z.ZodEnum<["default", "acceptEdits", "bypassPermissions", "plan", "read-only", "safe-yolo", "yolo"]>>;
|
|
4839
|
+
model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4840
|
+
fallbackModel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4841
|
+
customSystemPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4842
|
+
appendSystemPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4843
|
+
allowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
4844
|
+
disallowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
4845
|
+
happyOrg: z.ZodOptional<z.ZodObject<{
|
|
4846
|
+
taskContext: z.ZodOptional<z.ZodObject<{
|
|
4847
|
+
taskId: z.ZodString;
|
|
4848
|
+
organizationId: z.ZodString;
|
|
4849
|
+
organizationRootPath: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4850
|
+
memberAgentId: z.ZodString;
|
|
4851
|
+
supervisorAgentId: z.ZodString;
|
|
4852
|
+
positionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4853
|
+
responsibilityId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4854
|
+
}, "strip", z.ZodTypeAny, {
|
|
4855
|
+
taskId: string;
|
|
4856
|
+
organizationId: string;
|
|
4857
|
+
memberAgentId: string;
|
|
4858
|
+
supervisorAgentId: string;
|
|
4859
|
+
organizationRootPath?: string | null | undefined;
|
|
4860
|
+
positionId?: string | null | undefined;
|
|
4861
|
+
responsibilityId?: string | null | undefined;
|
|
4862
|
+
}, {
|
|
4863
|
+
taskId: string;
|
|
4864
|
+
organizationId: string;
|
|
4865
|
+
memberAgentId: string;
|
|
4866
|
+
supervisorAgentId: string;
|
|
4867
|
+
organizationRootPath?: string | null | undefined;
|
|
4868
|
+
positionId?: string | null | undefined;
|
|
4869
|
+
responsibilityId?: string | null | undefined;
|
|
4870
|
+
}>>;
|
|
4871
|
+
control: z.ZodOptional<z.ZodObject<{
|
|
4872
|
+
action: z.ZodEnum<["terminate", "reopen"]>;
|
|
4873
|
+
reason: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4874
|
+
newContext: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4875
|
+
newDecision: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4876
|
+
newResource: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4877
|
+
}, "strip", z.ZodTypeAny, {
|
|
4878
|
+
action: "terminate" | "reopen";
|
|
4879
|
+
reason?: string | null | undefined;
|
|
4880
|
+
newContext?: string | null | undefined;
|
|
4881
|
+
newDecision?: string | null | undefined;
|
|
4882
|
+
newResource?: string | null | undefined;
|
|
4883
|
+
}, {
|
|
4884
|
+
action: "terminate" | "reopen";
|
|
4885
|
+
reason?: string | null | undefined;
|
|
4886
|
+
newContext?: string | null | undefined;
|
|
4887
|
+
newDecision?: string | null | undefined;
|
|
4888
|
+
newResource?: string | null | undefined;
|
|
4889
|
+
}>>;
|
|
4890
|
+
replyContext: z.ZodOptional<z.ZodObject<{
|
|
4891
|
+
dispatchId: z.ZodString;
|
|
4892
|
+
taskId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4893
|
+
organizationId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4894
|
+
scope: z.ZodString;
|
|
4895
|
+
replyTo: z.ZodString;
|
|
4896
|
+
memberAgentId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4897
|
+
sessionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4898
|
+
positionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4899
|
+
responsibilityId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4900
|
+
routeType: z.ZodNullable<z.ZodOptional<z.ZodEnum<["direct_reply", "version_planning_reply", "analysis_task", "implementation_task", "ack_plus_reply"]>>>;
|
|
4901
|
+
ackType: z.ZodNullable<z.ZodOptional<z.ZodEnum<["none", "read_ack", "dispatch_ack", "route_ack", "progress_ack"]>>>;
|
|
4902
|
+
replyMode: z.ZodNullable<z.ZodOptional<z.ZodEnum<["reply-first", "analysis-first"]>>>;
|
|
4903
|
+
planIntent: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4904
|
+
routerReason: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4905
|
+
goldenRouteId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
4906
|
+
}, "strip", z.ZodTypeAny, {
|
|
4907
|
+
dispatchId: string;
|
|
4908
|
+
scope: string;
|
|
4909
|
+
replyTo: string;
|
|
4910
|
+
sessionId?: string | null | undefined;
|
|
4911
|
+
taskId?: string | null | undefined;
|
|
4912
|
+
organizationId?: string | null | undefined;
|
|
4913
|
+
memberAgentId?: string | null | undefined;
|
|
4914
|
+
positionId?: string | null | undefined;
|
|
4915
|
+
responsibilityId?: string | null | undefined;
|
|
4916
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
4917
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
4918
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
4919
|
+
planIntent?: string | null | undefined;
|
|
4920
|
+
routerReason?: string | null | undefined;
|
|
4921
|
+
goldenRouteId?: string | null | undefined;
|
|
4922
|
+
}, {
|
|
4923
|
+
dispatchId: string;
|
|
4924
|
+
scope: string;
|
|
4925
|
+
replyTo: string;
|
|
4926
|
+
sessionId?: string | null | undefined;
|
|
4927
|
+
taskId?: string | null | undefined;
|
|
4928
|
+
organizationId?: string | null | undefined;
|
|
4929
|
+
memberAgentId?: string | null | undefined;
|
|
4930
|
+
positionId?: string | null | undefined;
|
|
4931
|
+
responsibilityId?: string | null | undefined;
|
|
4932
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
4933
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
4934
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
4935
|
+
planIntent?: string | null | undefined;
|
|
4936
|
+
routerReason?: string | null | undefined;
|
|
4937
|
+
goldenRouteId?: string | null | undefined;
|
|
4938
|
+
}>>;
|
|
4939
|
+
}, "strip", z.ZodTypeAny, {
|
|
4940
|
+
taskContext?: {
|
|
4941
|
+
taskId: string;
|
|
4942
|
+
organizationId: string;
|
|
4943
|
+
memberAgentId: string;
|
|
4944
|
+
supervisorAgentId: string;
|
|
4945
|
+
organizationRootPath?: string | null | undefined;
|
|
4946
|
+
positionId?: string | null | undefined;
|
|
4947
|
+
responsibilityId?: string | null | undefined;
|
|
4948
|
+
} | undefined;
|
|
4949
|
+
control?: {
|
|
4950
|
+
action: "terminate" | "reopen";
|
|
4951
|
+
reason?: string | null | undefined;
|
|
4952
|
+
newContext?: string | null | undefined;
|
|
4953
|
+
newDecision?: string | null | undefined;
|
|
4954
|
+
newResource?: string | null | undefined;
|
|
4955
|
+
} | undefined;
|
|
4956
|
+
replyContext?: {
|
|
3153
4957
|
dispatchId: string;
|
|
3154
4958
|
scope: string;
|
|
3155
4959
|
replyTo: string;
|
|
@@ -3166,54 +4970,232 @@ declare const MessageContentSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
3166
4970
|
routerReason?: string | null | undefined;
|
|
3167
4971
|
goldenRouteId?: string | null | undefined;
|
|
3168
4972
|
} | undefined;
|
|
3169
|
-
}
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
4973
|
+
}, {
|
|
4974
|
+
taskContext?: {
|
|
4975
|
+
taskId: string;
|
|
4976
|
+
organizationId: string;
|
|
4977
|
+
memberAgentId: string;
|
|
4978
|
+
supervisorAgentId: string;
|
|
4979
|
+
organizationRootPath?: string | null | undefined;
|
|
4980
|
+
positionId?: string | null | undefined;
|
|
4981
|
+
responsibilityId?: string | null | undefined;
|
|
4982
|
+
} | undefined;
|
|
4983
|
+
control?: {
|
|
4984
|
+
action: "terminate" | "reopen";
|
|
4985
|
+
reason?: string | null | undefined;
|
|
4986
|
+
newContext?: string | null | undefined;
|
|
4987
|
+
newDecision?: string | null | undefined;
|
|
4988
|
+
newResource?: string | null | undefined;
|
|
4989
|
+
} | undefined;
|
|
4990
|
+
replyContext?: {
|
|
4991
|
+
dispatchId: string;
|
|
4992
|
+
scope: string;
|
|
4993
|
+
replyTo: string;
|
|
4994
|
+
sessionId?: string | null | undefined;
|
|
4995
|
+
taskId?: string | null | undefined;
|
|
4996
|
+
organizationId?: string | null | undefined;
|
|
4997
|
+
memberAgentId?: string | null | undefined;
|
|
4998
|
+
positionId?: string | null | undefined;
|
|
4999
|
+
responsibilityId?: string | null | undefined;
|
|
5000
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
5001
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
5002
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
5003
|
+
planIntent?: string | null | undefined;
|
|
5004
|
+
routerReason?: string | null | undefined;
|
|
5005
|
+
goldenRouteId?: string | null | undefined;
|
|
5006
|
+
} | undefined;
|
|
5007
|
+
}>>;
|
|
5008
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
5009
|
+
sentFrom: z.ZodOptional<z.ZodString>;
|
|
5010
|
+
permissionMode: z.ZodOptional<z.ZodEnum<["default", "acceptEdits", "bypassPermissions", "plan", "read-only", "safe-yolo", "yolo"]>>;
|
|
5011
|
+
model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
5012
|
+
fallbackModel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
5013
|
+
customSystemPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
5014
|
+
appendSystemPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
5015
|
+
allowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
5016
|
+
disallowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
5017
|
+
happyOrg: z.ZodOptional<z.ZodObject<{
|
|
5018
|
+
taskContext: z.ZodOptional<z.ZodObject<{
|
|
5019
|
+
taskId: z.ZodString;
|
|
5020
|
+
organizationId: z.ZodString;
|
|
5021
|
+
organizationRootPath: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
5022
|
+
memberAgentId: z.ZodString;
|
|
5023
|
+
supervisorAgentId: z.ZodString;
|
|
5024
|
+
positionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
5025
|
+
responsibilityId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
5026
|
+
}, "strip", z.ZodTypeAny, {
|
|
5027
|
+
taskId: string;
|
|
5028
|
+
organizationId: string;
|
|
5029
|
+
memberAgentId: string;
|
|
5030
|
+
supervisorAgentId: string;
|
|
5031
|
+
organizationRootPath?: string | null | undefined;
|
|
5032
|
+
positionId?: string | null | undefined;
|
|
5033
|
+
responsibilityId?: string | null | undefined;
|
|
5034
|
+
}, {
|
|
5035
|
+
taskId: string;
|
|
5036
|
+
organizationId: string;
|
|
5037
|
+
memberAgentId: string;
|
|
5038
|
+
supervisorAgentId: string;
|
|
5039
|
+
organizationRootPath?: string | null | undefined;
|
|
5040
|
+
positionId?: string | null | undefined;
|
|
5041
|
+
responsibilityId?: string | null | undefined;
|
|
5042
|
+
}>>;
|
|
5043
|
+
control: z.ZodOptional<z.ZodObject<{
|
|
5044
|
+
action: z.ZodEnum<["terminate", "reopen"]>;
|
|
5045
|
+
reason: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
5046
|
+
newContext: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
5047
|
+
newDecision: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
5048
|
+
newResource: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
5049
|
+
}, "strip", z.ZodTypeAny, {
|
|
5050
|
+
action: "terminate" | "reopen";
|
|
5051
|
+
reason?: string | null | undefined;
|
|
5052
|
+
newContext?: string | null | undefined;
|
|
5053
|
+
newDecision?: string | null | undefined;
|
|
5054
|
+
newResource?: string | null | undefined;
|
|
5055
|
+
}, {
|
|
5056
|
+
action: "terminate" | "reopen";
|
|
5057
|
+
reason?: string | null | undefined;
|
|
5058
|
+
newContext?: string | null | undefined;
|
|
5059
|
+
newDecision?: string | null | undefined;
|
|
5060
|
+
newResource?: string | null | undefined;
|
|
5061
|
+
}>>;
|
|
5062
|
+
replyContext: z.ZodOptional<z.ZodObject<{
|
|
5063
|
+
dispatchId: z.ZodString;
|
|
5064
|
+
taskId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
5065
|
+
organizationId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
5066
|
+
scope: z.ZodString;
|
|
5067
|
+
replyTo: z.ZodString;
|
|
5068
|
+
memberAgentId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
5069
|
+
sessionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
5070
|
+
positionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
5071
|
+
responsibilityId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
5072
|
+
routeType: z.ZodNullable<z.ZodOptional<z.ZodEnum<["direct_reply", "version_planning_reply", "analysis_task", "implementation_task", "ack_plus_reply"]>>>;
|
|
5073
|
+
ackType: z.ZodNullable<z.ZodOptional<z.ZodEnum<["none", "read_ack", "dispatch_ack", "route_ack", "progress_ack"]>>>;
|
|
5074
|
+
replyMode: z.ZodNullable<z.ZodOptional<z.ZodEnum<["reply-first", "analysis-first"]>>>;
|
|
5075
|
+
planIntent: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
5076
|
+
routerReason: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
5077
|
+
goldenRouteId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
5078
|
+
}, "strip", z.ZodTypeAny, {
|
|
5079
|
+
dispatchId: string;
|
|
5080
|
+
scope: string;
|
|
5081
|
+
replyTo: string;
|
|
5082
|
+
sessionId?: string | null | undefined;
|
|
5083
|
+
taskId?: string | null | undefined;
|
|
5084
|
+
organizationId?: string | null | undefined;
|
|
5085
|
+
memberAgentId?: string | null | undefined;
|
|
5086
|
+
positionId?: string | null | undefined;
|
|
5087
|
+
responsibilityId?: string | null | undefined;
|
|
5088
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
5089
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
5090
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
5091
|
+
planIntent?: string | null | undefined;
|
|
5092
|
+
routerReason?: string | null | undefined;
|
|
5093
|
+
goldenRouteId?: string | null | undefined;
|
|
5094
|
+
}, {
|
|
5095
|
+
dispatchId: string;
|
|
5096
|
+
scope: string;
|
|
5097
|
+
replyTo: string;
|
|
5098
|
+
sessionId?: string | null | undefined;
|
|
5099
|
+
taskId?: string | null | undefined;
|
|
5100
|
+
organizationId?: string | null | undefined;
|
|
5101
|
+
memberAgentId?: string | null | undefined;
|
|
5102
|
+
positionId?: string | null | undefined;
|
|
5103
|
+
responsibilityId?: string | null | undefined;
|
|
5104
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
5105
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
5106
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
5107
|
+
planIntent?: string | null | undefined;
|
|
5108
|
+
routerReason?: string | null | undefined;
|
|
5109
|
+
goldenRouteId?: string | null | undefined;
|
|
5110
|
+
}>>;
|
|
5111
|
+
}, "strip", z.ZodTypeAny, {
|
|
5112
|
+
taskContext?: {
|
|
5113
|
+
taskId: string;
|
|
5114
|
+
organizationId: string;
|
|
5115
|
+
memberAgentId: string;
|
|
5116
|
+
supervisorAgentId: string;
|
|
5117
|
+
organizationRootPath?: string | null | undefined;
|
|
5118
|
+
positionId?: string | null | undefined;
|
|
5119
|
+
responsibilityId?: string | null | undefined;
|
|
5120
|
+
} | undefined;
|
|
5121
|
+
control?: {
|
|
5122
|
+
action: "terminate" | "reopen";
|
|
5123
|
+
reason?: string | null | undefined;
|
|
5124
|
+
newContext?: string | null | undefined;
|
|
5125
|
+
newDecision?: string | null | undefined;
|
|
5126
|
+
newResource?: string | null | undefined;
|
|
5127
|
+
} | undefined;
|
|
5128
|
+
replyContext?: {
|
|
5129
|
+
dispatchId: string;
|
|
5130
|
+
scope: string;
|
|
5131
|
+
replyTo: string;
|
|
5132
|
+
sessionId?: string | null | undefined;
|
|
5133
|
+
taskId?: string | null | undefined;
|
|
5134
|
+
organizationId?: string | null | undefined;
|
|
5135
|
+
memberAgentId?: string | null | undefined;
|
|
5136
|
+
positionId?: string | null | undefined;
|
|
5137
|
+
responsibilityId?: string | null | undefined;
|
|
5138
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
5139
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
5140
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
5141
|
+
planIntent?: string | null | undefined;
|
|
5142
|
+
routerReason?: string | null | undefined;
|
|
5143
|
+
goldenRouteId?: string | null | undefined;
|
|
5144
|
+
} | undefined;
|
|
5145
|
+
}, {
|
|
5146
|
+
taskContext?: {
|
|
5147
|
+
taskId: string;
|
|
5148
|
+
organizationId: string;
|
|
5149
|
+
memberAgentId: string;
|
|
5150
|
+
supervisorAgentId: string;
|
|
5151
|
+
organizationRootPath?: string | null | undefined;
|
|
5152
|
+
positionId?: string | null | undefined;
|
|
5153
|
+
responsibilityId?: string | null | undefined;
|
|
5154
|
+
} | undefined;
|
|
5155
|
+
control?: {
|
|
5156
|
+
action: "terminate" | "reopen";
|
|
5157
|
+
reason?: string | null | undefined;
|
|
5158
|
+
newContext?: string | null | undefined;
|
|
5159
|
+
newDecision?: string | null | undefined;
|
|
5160
|
+
newResource?: string | null | undefined;
|
|
5161
|
+
} | undefined;
|
|
5162
|
+
replyContext?: {
|
|
5163
|
+
dispatchId: string;
|
|
5164
|
+
scope: string;
|
|
5165
|
+
replyTo: string;
|
|
5166
|
+
sessionId?: string | null | undefined;
|
|
5167
|
+
taskId?: string | null | undefined;
|
|
5168
|
+
organizationId?: string | null | undefined;
|
|
5169
|
+
memberAgentId?: string | null | undefined;
|
|
5170
|
+
positionId?: string | null | undefined;
|
|
5171
|
+
responsibilityId?: string | null | undefined;
|
|
5172
|
+
routeType?: "direct_reply" | "version_planning_reply" | "analysis_task" | "implementation_task" | "ack_plus_reply" | null | undefined;
|
|
5173
|
+
ackType?: "none" | "read_ack" | "dispatch_ack" | "route_ack" | "progress_ack" | null | undefined;
|
|
5174
|
+
replyMode?: "reply-first" | "analysis-first" | null | undefined;
|
|
5175
|
+
planIntent?: string | null | undefined;
|
|
5176
|
+
routerReason?: string | null | undefined;
|
|
5177
|
+
goldenRouteId?: string | null | undefined;
|
|
5178
|
+
} | undefined;
|
|
5179
|
+
}>>;
|
|
5180
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
5181
|
+
}, "strip", z.ZodTypeAny, {
|
|
5182
|
+
content: {
|
|
3180
5183
|
type: "output";
|
|
3181
5184
|
data?: unknown;
|
|
3182
|
-
}
|
|
3183
|
-
type: z.ZodLiteral<"codex">;
|
|
3184
|
-
data: z.ZodUnknown;
|
|
3185
|
-
}, "strip", z.ZodTypeAny, {
|
|
3186
|
-
type: "codex";
|
|
3187
|
-
data?: unknown;
|
|
3188
|
-
}, {
|
|
5185
|
+
} | {
|
|
3189
5186
|
type: "codex";
|
|
3190
5187
|
data?: unknown;
|
|
3191
|
-
}
|
|
3192
|
-
type: z.ZodLiteral<"acp">;
|
|
3193
|
-
provider: z.ZodEnum<["gemini", "codex", "cursor", "claude", "opencode"]>;
|
|
3194
|
-
data: z.ZodUnknown;
|
|
3195
|
-
}, "strip", z.ZodTypeAny, {
|
|
3196
|
-
type: "acp";
|
|
3197
|
-
provider: "cursor" | "codex" | "gemini" | "claude" | "opencode";
|
|
3198
|
-
data?: unknown;
|
|
3199
|
-
}, {
|
|
5188
|
+
} | {
|
|
3200
5189
|
type: "acp";
|
|
3201
5190
|
provider: "cursor" | "codex" | "gemini" | "claude" | "opencode";
|
|
3202
5191
|
data?: unknown;
|
|
3203
|
-
}
|
|
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
|
-
}, {
|
|
5192
|
+
} | {
|
|
3212
5193
|
type: "event";
|
|
3213
5194
|
id?: string | undefined;
|
|
3214
5195
|
data?: unknown;
|
|
3215
|
-
}
|
|
3216
|
-
|
|
5196
|
+
};
|
|
5197
|
+
role: "agent";
|
|
5198
|
+
meta?: z.objectOutputType<{
|
|
3217
5199
|
sentFrom: z.ZodOptional<z.ZodString>;
|
|
3218
5200
|
permissionMode: z.ZodOptional<z.ZodEnum<["default", "acceptEdits", "bypassPermissions", "plan", "read-only", "safe-yolo", "yolo"]>>;
|
|
3219
5201
|
model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -3385,17 +5367,43 @@ declare const MessageContentSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
3385
5367
|
goldenRouteId?: string | null | undefined;
|
|
3386
5368
|
} | undefined;
|
|
3387
5369
|
}>>;
|
|
3388
|
-
},
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
5370
|
+
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
5371
|
+
}, {
|
|
5372
|
+
content: {
|
|
5373
|
+
type: "output";
|
|
5374
|
+
data?: unknown;
|
|
5375
|
+
} | {
|
|
5376
|
+
type: "codex";
|
|
5377
|
+
data?: unknown;
|
|
5378
|
+
} | {
|
|
5379
|
+
type: "acp";
|
|
5380
|
+
provider: "cursor" | "codex" | "gemini" | "claude" | "opencode";
|
|
5381
|
+
data?: unknown;
|
|
5382
|
+
} | {
|
|
5383
|
+
type: "event";
|
|
5384
|
+
id?: string | undefined;
|
|
5385
|
+
data?: unknown;
|
|
5386
|
+
};
|
|
5387
|
+
role: "agent";
|
|
5388
|
+
meta?: z.objectInputType<{
|
|
5389
|
+
sentFrom: z.ZodOptional<z.ZodString>;
|
|
5390
|
+
permissionMode: z.ZodOptional<z.ZodEnum<["default", "acceptEdits", "bypassPermissions", "plan", "read-only", "safe-yolo", "yolo"]>>;
|
|
5391
|
+
model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
5392
|
+
fallbackModel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
5393
|
+
customSystemPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
5394
|
+
appendSystemPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
5395
|
+
allowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
5396
|
+
disallowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
5397
|
+
happyOrg: z.ZodOptional<z.ZodObject<{
|
|
5398
|
+
taskContext: z.ZodOptional<z.ZodObject<{
|
|
5399
|
+
taskId: z.ZodString;
|
|
5400
|
+
organizationId: z.ZodString;
|
|
5401
|
+
organizationRootPath: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
5402
|
+
memberAgentId: z.ZodString;
|
|
5403
|
+
supervisorAgentId: z.ZodString;
|
|
5404
|
+
positionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
5405
|
+
responsibilityId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
5406
|
+
}, "strip", z.ZodTypeAny, {
|
|
3399
5407
|
taskId: string;
|
|
3400
5408
|
organizationId: string;
|
|
3401
5409
|
memberAgentId: string;
|
|
@@ -3403,15 +5411,51 @@ declare const MessageContentSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
3403
5411
|
organizationRootPath?: string | null | undefined;
|
|
3404
5412
|
positionId?: string | null | undefined;
|
|
3405
5413
|
responsibilityId?: string | null | undefined;
|
|
3406
|
-
}
|
|
3407
|
-
|
|
5414
|
+
}, {
|
|
5415
|
+
taskId: string;
|
|
5416
|
+
organizationId: string;
|
|
5417
|
+
memberAgentId: string;
|
|
5418
|
+
supervisorAgentId: string;
|
|
5419
|
+
organizationRootPath?: string | null | undefined;
|
|
5420
|
+
positionId?: string | null | undefined;
|
|
5421
|
+
responsibilityId?: string | null | undefined;
|
|
5422
|
+
}>>;
|
|
5423
|
+
control: z.ZodOptional<z.ZodObject<{
|
|
5424
|
+
action: z.ZodEnum<["terminate", "reopen"]>;
|
|
5425
|
+
reason: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
5426
|
+
newContext: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
5427
|
+
newDecision: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
5428
|
+
newResource: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
5429
|
+
}, "strip", z.ZodTypeAny, {
|
|
3408
5430
|
action: "terminate" | "reopen";
|
|
3409
5431
|
reason?: string | null | undefined;
|
|
3410
5432
|
newContext?: string | null | undefined;
|
|
3411
5433
|
newDecision?: string | null | undefined;
|
|
3412
5434
|
newResource?: string | null | undefined;
|
|
3413
|
-
}
|
|
3414
|
-
|
|
5435
|
+
}, {
|
|
5436
|
+
action: "terminate" | "reopen";
|
|
5437
|
+
reason?: string | null | undefined;
|
|
5438
|
+
newContext?: string | null | undefined;
|
|
5439
|
+
newDecision?: string | null | undefined;
|
|
5440
|
+
newResource?: string | null | undefined;
|
|
5441
|
+
}>>;
|
|
5442
|
+
replyContext: z.ZodOptional<z.ZodObject<{
|
|
5443
|
+
dispatchId: z.ZodString;
|
|
5444
|
+
taskId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
5445
|
+
organizationId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
5446
|
+
scope: z.ZodString;
|
|
5447
|
+
replyTo: z.ZodString;
|
|
5448
|
+
memberAgentId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
5449
|
+
sessionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
5450
|
+
positionId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
5451
|
+
responsibilityId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
5452
|
+
routeType: z.ZodNullable<z.ZodOptional<z.ZodEnum<["direct_reply", "version_planning_reply", "analysis_task", "implementation_task", "ack_plus_reply"]>>>;
|
|
5453
|
+
ackType: z.ZodNullable<z.ZodOptional<z.ZodEnum<["none", "read_ack", "dispatch_ack", "route_ack", "progress_ack"]>>>;
|
|
5454
|
+
replyMode: z.ZodNullable<z.ZodOptional<z.ZodEnum<["reply-first", "analysis-first"]>>>;
|
|
5455
|
+
planIntent: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
5456
|
+
routerReason: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
5457
|
+
goldenRouteId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
5458
|
+
}, "strip", z.ZodTypeAny, {
|
|
3415
5459
|
dispatchId: string;
|
|
3416
5460
|
scope: string;
|
|
3417
5461
|
replyTo: string;
|
|
@@ -3427,35 +5471,7 @@ declare const MessageContentSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
3427
5471
|
planIntent?: string | null | undefined;
|
|
3428
5472
|
routerReason?: string | null | undefined;
|
|
3429
5473
|
goldenRouteId?: string | null | undefined;
|
|
3430
|
-
}
|
|
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?: {
|
|
5474
|
+
}, {
|
|
3459
5475
|
dispatchId: string;
|
|
3460
5476
|
scope: string;
|
|
3461
5477
|
replyTo: string;
|
|
@@ -3471,36 +5487,8 @@ declare const MessageContentSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
3471
5487
|
planIntent?: string | null | undefined;
|
|
3472
5488
|
routerReason?: string | null | undefined;
|
|
3473
5489
|
goldenRouteId?: string | null | undefined;
|
|
3474
|
-
}
|
|
3475
|
-
}
|
|
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: "cursor" | "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?: {
|
|
5490
|
+
}>>;
|
|
5491
|
+
}, "strip", z.ZodTypeAny, {
|
|
3504
5492
|
taskContext?: {
|
|
3505
5493
|
taskId: string;
|
|
3506
5494
|
organizationId: string;
|
|
@@ -3534,35 +5522,7 @@ declare const MessageContentSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
3534
5522
|
routerReason?: string | null | undefined;
|
|
3535
5523
|
goldenRouteId?: string | null | undefined;
|
|
3536
5524
|
} | undefined;
|
|
3537
|
-
}
|
|
3538
|
-
} | undefined;
|
|
3539
|
-
}, {
|
|
3540
|
-
content: {
|
|
3541
|
-
type: "output";
|
|
3542
|
-
data?: unknown;
|
|
3543
|
-
} | {
|
|
3544
|
-
type: "codex";
|
|
3545
|
-
data?: unknown;
|
|
3546
|
-
} | {
|
|
3547
|
-
type: "acp";
|
|
3548
|
-
provider: "cursor" | "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?: {
|
|
5525
|
+
}, {
|
|
3566
5526
|
taskContext?: {
|
|
3567
5527
|
taskId: string;
|
|
3568
5528
|
organizationId: string;
|
|
@@ -3596,8 +5556,8 @@ declare const MessageContentSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
3596
5556
|
routerReason?: string | null | undefined;
|
|
3597
5557
|
goldenRouteId?: string | null | undefined;
|
|
3598
5558
|
} | undefined;
|
|
3599
|
-
}
|
|
3600
|
-
} | undefined;
|
|
5559
|
+
}>>;
|
|
5560
|
+
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
3601
5561
|
}>]>;
|
|
3602
5562
|
type MessageContent = z.infer<typeof MessageContentSchema>;
|
|
3603
5563
|
type Metadata = {
|
|
@@ -3632,13 +5592,31 @@ type Metadata = {
|
|
|
3632
5592
|
flavor?: string;
|
|
3633
5593
|
machineOnline?: boolean;
|
|
3634
5594
|
machineOnlineAt?: number;
|
|
5595
|
+
memorySynopsisPointerV1?: {
|
|
5596
|
+
v: 1;
|
|
5597
|
+
localId: string;
|
|
5598
|
+
seqTo: number;
|
|
5599
|
+
updatedAtMs: number;
|
|
5600
|
+
};
|
|
3635
5601
|
happyOrg?: HappyOrgMetadata;
|
|
3636
5602
|
};
|
|
3637
5603
|
type AgentState = {
|
|
3638
5604
|
controlledByUser?: boolean | null | undefined;
|
|
5605
|
+
localControl?: {
|
|
5606
|
+
attached?: boolean | null | undefined;
|
|
5607
|
+
topology?: 'exclusive' | 'shared' | null | undefined;
|
|
5608
|
+
remoteWritable?: boolean | null | undefined;
|
|
5609
|
+
canAttach?: boolean | null | undefined;
|
|
5610
|
+
canDetach?: boolean | null | undefined;
|
|
5611
|
+
} | null | undefined;
|
|
5612
|
+
capabilities?: {
|
|
5613
|
+
inFlightSteer?: boolean;
|
|
5614
|
+
[key: string]: unknown;
|
|
5615
|
+
};
|
|
3639
5616
|
requests?: {
|
|
3640
5617
|
[id: string]: {
|
|
3641
5618
|
tool: string;
|
|
5619
|
+
kind?: 'permission' | 'user_action';
|
|
3642
5620
|
arguments: any;
|
|
3643
5621
|
createdAt: number;
|
|
3644
5622
|
requestKind?: 'permission' | 'selection';
|
|
@@ -3653,6 +5631,7 @@ type AgentState = {
|
|
|
3653
5631
|
completedRequests?: {
|
|
3654
5632
|
[id: string]: {
|
|
3655
5633
|
tool: string;
|
|
5634
|
+
kind?: 'permission' | 'user_action';
|
|
3656
5635
|
arguments: any;
|
|
3657
5636
|
createdAt: number;
|
|
3658
5637
|
completedAt: number;
|
|
@@ -3661,6 +5640,7 @@ type AgentState = {
|
|
|
3661
5640
|
mode?: PermissionMode;
|
|
3662
5641
|
decision?: 'approved' | 'approved_for_session' | 'denied' | 'abort';
|
|
3663
5642
|
allowTools?: string[];
|
|
5643
|
+
answers?: Record<string, string>;
|
|
3664
5644
|
requestKind?: 'permission' | 'selection';
|
|
3665
5645
|
selectedOptionId?: string;
|
|
3666
5646
|
};
|
|
@@ -3719,6 +5699,8 @@ declare class RpcHandlerManager {
|
|
|
3719
5699
|
*/
|
|
3720
5700
|
handleRequest(request: RpcRequest): Promise<any>;
|
|
3721
5701
|
onSocketConnect(socket: Socket): void;
|
|
5702
|
+
private emitRegistrations;
|
|
5703
|
+
private emitRegistration;
|
|
3722
5704
|
onSocketDisconnect(): void;
|
|
3723
5705
|
/**
|
|
3724
5706
|
* Get the number of registered handlers
|
|
@@ -3729,6 +5711,7 @@ declare class RpcHandlerManager {
|
|
|
3729
5711
|
* @param method - The method name (without prefix)
|
|
3730
5712
|
*/
|
|
3731
5713
|
hasHandler(method: string): boolean;
|
|
5714
|
+
invokeLocal<TRequest = any, TResponse = any>(method: string, params: TRequest): Promise<TResponse>;
|
|
3732
5715
|
/**
|
|
3733
5716
|
* Clear all handlers
|
|
3734
5717
|
*/
|
|
@@ -3740,6 +5723,15 @@ declare class RpcHandlerManager {
|
|
|
3740
5723
|
private getPrefixedMethod;
|
|
3741
5724
|
}
|
|
3742
5725
|
|
|
5726
|
+
/** MCP server configuration for tools */
|
|
5727
|
+
interface McpServerConfig {
|
|
5728
|
+
command?: string;
|
|
5729
|
+
url?: string;
|
|
5730
|
+
args?: string[];
|
|
5731
|
+
env?: Record<string, string>;
|
|
5732
|
+
envHttpHeaders?: Record<string, string>;
|
|
5733
|
+
}
|
|
5734
|
+
|
|
3743
5735
|
/**
|
|
3744
5736
|
* Minimal persistence functions for happy CLI
|
|
3745
5737
|
*
|
|
@@ -3842,24 +5834,102 @@ type ACPMessageData = ({
|
|
|
3842
5834
|
[key: string]: unknown;
|
|
3843
5835
|
};
|
|
3844
5836
|
type ACPProvider = 'gemini' | 'codex' | 'cursor' | 'claude' | 'opencode';
|
|
5837
|
+
interface SendCodexMessageOptions {
|
|
5838
|
+
localId?: string | null;
|
|
5839
|
+
meta?: Record<string, unknown> | null;
|
|
5840
|
+
}
|
|
5841
|
+
type SendAgentMessageOptions = SendCodexMessageOptions;
|
|
3845
5842
|
type SessionTranscriptSource = 'snapshot' | 'live';
|
|
3846
5843
|
interface SessionTranscriptMessage {
|
|
3847
5844
|
source: SessionTranscriptSource;
|
|
3848
5845
|
seq: number | null;
|
|
5846
|
+
createdAt?: number | null;
|
|
5847
|
+
localId?: string | null;
|
|
3849
5848
|
message: MessageContent;
|
|
3850
5849
|
queuesPendingInput: boolean;
|
|
3851
5850
|
}
|
|
5851
|
+
type ProviderActivityAfterUserPromptEvidence = 'activity_found' | 'no_activity_found' | 'unknown';
|
|
5852
|
+
type ProviderActivityAfterUserPromptQuery = Readonly<{
|
|
5853
|
+
startSeqInclusive?: number | null;
|
|
5854
|
+
endSeqInclusive?: number | null;
|
|
5855
|
+
take?: number;
|
|
5856
|
+
}>;
|
|
5857
|
+
type LatestCommittedUserTextBeforeFailure = Readonly<{
|
|
5858
|
+
text: string;
|
|
5859
|
+
localId: string | null;
|
|
5860
|
+
createdAt: number;
|
|
5861
|
+
permissionMode: PermissionMode | null;
|
|
5862
|
+
model: string | null;
|
|
5863
|
+
}>;
|
|
3852
5864
|
interface ProtocolV3SessionSyncOptions {
|
|
3853
5865
|
getSessionSnapshot: (sessionId: string, limit?: number) => Promise<ProtocolV3SessionSnapshotResponse | null>;
|
|
3854
5866
|
getSessionChanges: (sessionId: string, afterSeq: number, limit?: number) => Promise<ProtocolV3SessionChangesResponse | null>;
|
|
3855
5867
|
snapshotLimit?: number;
|
|
3856
5868
|
changesLimit?: number;
|
|
3857
5869
|
}
|
|
5870
|
+
type PendingMessageQueueV2WriteBody = Readonly<{
|
|
5871
|
+
localId: string;
|
|
5872
|
+
ciphertext: string;
|
|
5873
|
+
messageRole?: string;
|
|
5874
|
+
} | {
|
|
5875
|
+
localId: string;
|
|
5876
|
+
content: unknown;
|
|
5877
|
+
messageRole?: string;
|
|
5878
|
+
}>;
|
|
5879
|
+
type PendingMessageQueueV2UpdateBody = Readonly<{
|
|
5880
|
+
ciphertext: string;
|
|
5881
|
+
messageRole?: string;
|
|
5882
|
+
} | {
|
|
5883
|
+
content: unknown;
|
|
5884
|
+
messageRole?: string;
|
|
5885
|
+
}>;
|
|
5886
|
+
type PendingMessageQueueV2ReorderBody = Readonly<{
|
|
5887
|
+
orderedLocalIds: string[];
|
|
5888
|
+
}>;
|
|
5889
|
+
type PendingMessageQueueV2WriteResult = Readonly<{
|
|
5890
|
+
ok: true;
|
|
5891
|
+
didWrite: boolean;
|
|
5892
|
+
pendingCount: number;
|
|
5893
|
+
pendingVersion: number;
|
|
5894
|
+
}>;
|
|
5895
|
+
type PendingMessageQueueV2UserTextBody = Readonly<{
|
|
5896
|
+
localId: string;
|
|
5897
|
+
text: string;
|
|
5898
|
+
permissionMode?: PermissionMode;
|
|
5899
|
+
model?: string | null;
|
|
5900
|
+
}>;
|
|
5901
|
+
type PendingMessageQueueV2MutationResult = Readonly<{
|
|
5902
|
+
ok: true;
|
|
5903
|
+
pendingCount: number;
|
|
5904
|
+
pendingVersion: number;
|
|
5905
|
+
}>;
|
|
5906
|
+
type PendingMessageQueueV2MaterializedMessage = Readonly<{
|
|
5907
|
+
id: string | null;
|
|
5908
|
+
seq: number;
|
|
5909
|
+
localId: string | null;
|
|
5910
|
+
content: unknown;
|
|
5911
|
+
createdAt: number | null;
|
|
5912
|
+
updatedAt: number | null;
|
|
5913
|
+
}>;
|
|
5914
|
+
type PendingMessageQueueV2MaterializeResult = Readonly<{
|
|
5915
|
+
ok: true;
|
|
5916
|
+
didMaterialize: boolean;
|
|
5917
|
+
localId: string | null;
|
|
5918
|
+
didWrite: boolean;
|
|
5919
|
+
message: PendingMessageQueueV2MaterializedMessage | null;
|
|
5920
|
+
pendingCount: number;
|
|
5921
|
+
pendingVersion: number;
|
|
5922
|
+
}>;
|
|
3858
5923
|
type MetadataUpdateDurability = 'durable' | 'snapshot-only';
|
|
5924
|
+
type PendingMessageQueueV2DiscardReason = 'switch_to_local' | 'manual';
|
|
3859
5925
|
interface UpdateMetadataOptions {
|
|
3860
5926
|
durability?: MetadataUpdateDurability;
|
|
3861
5927
|
requireCapability?: boolean;
|
|
3862
5928
|
}
|
|
5929
|
+
type CommittedUserMessageSeqWaitOptions = Readonly<{
|
|
5930
|
+
timeoutMs?: number;
|
|
5931
|
+
pollMs?: number;
|
|
5932
|
+
}>;
|
|
3863
5933
|
declare class ApiSessionClient extends EventEmitter {
|
|
3864
5934
|
private credentials;
|
|
3865
5935
|
readonly sessionId: string;
|
|
@@ -3873,6 +5943,7 @@ declare class ApiSessionClient extends EventEmitter {
|
|
|
3873
5943
|
private pendingMessageCallback;
|
|
3874
5944
|
private pendingSessionMessages;
|
|
3875
5945
|
private pendingSessionMessageCallback;
|
|
5946
|
+
private recentSessionTranscriptMessages;
|
|
3876
5947
|
readonly rpcHandlerManager: RpcHandlerManager;
|
|
3877
5948
|
private agentStateLock;
|
|
3878
5949
|
private metadataLock;
|
|
@@ -3892,6 +5963,8 @@ declare class ApiSessionClient extends EventEmitter {
|
|
|
3892
5963
|
private bufferedLiveSessionEventsDuringProtocolSync;
|
|
3893
5964
|
private initialProtocolV3SnapshotComplete;
|
|
3894
5965
|
private lastChangeSeq;
|
|
5966
|
+
private readonly committedUserMessageSeqByLocalId;
|
|
5967
|
+
private readonly committedUserMessageSeqWaitersByLocalId;
|
|
3895
5968
|
private protocolV3Descriptor;
|
|
3896
5969
|
private protocolV3SocketCapabilities;
|
|
3897
5970
|
private protocolV3SessionSyncWaitTimer;
|
|
@@ -3902,13 +5975,54 @@ declare class ApiSessionClient extends EventEmitter {
|
|
|
3902
5975
|
private pendingHappyOrgTaskTurnReports;
|
|
3903
5976
|
private recordedHappyOrgTaskTurnReports;
|
|
3904
5977
|
private happyOrgSignedCredentialsPromise;
|
|
5978
|
+
private connectedServicesApiPromise;
|
|
3905
5979
|
constructor(credentials: Credentials, session: Session);
|
|
3906
5980
|
onUserMessage(callback: (data: UserMessage) => void): void;
|
|
3907
5981
|
onSessionMessage(callback: (data: SessionTranscriptMessage) => void): void;
|
|
3908
5982
|
configureProtocolV3Sync(options: ProtocolV3SessionSyncOptions | null): void;
|
|
3909
5983
|
getProtocolV3DescriptorSnapshot(): ProtocolV3Descriptor | null;
|
|
3910
5984
|
getProtocolV3SocketCapabilitiesSnapshot(): ProtocolV3SocketCapabilities | null;
|
|
5985
|
+
getLastObservedMessageSeq(): number;
|
|
5986
|
+
getCommittedUserMessageSeq(localId: string): number | null;
|
|
5987
|
+
detectProviderActivityAfterUserPrompt(params: ProviderActivityAfterUserPromptQuery): Promise<ProviderActivityAfterUserPromptEvidence>;
|
|
5988
|
+
hasCommittedUserMessageAfterMs(params: Readonly<{
|
|
5989
|
+
failureAtMs: number;
|
|
5990
|
+
take?: number;
|
|
5991
|
+
}>): Promise<boolean>;
|
|
5992
|
+
getLatestCommittedUserTextAtOrBeforeMs(params: Readonly<{
|
|
5993
|
+
failureAtMs: number;
|
|
5994
|
+
take?: number;
|
|
5995
|
+
}>): Promise<LatestCommittedUserTextBeforeFailure | null>;
|
|
5996
|
+
detectProviderActivityAfterLatestUserMessageBeforeMs(params: Readonly<{
|
|
5997
|
+
failureAtMs: number;
|
|
5998
|
+
take?: number;
|
|
5999
|
+
}>): Promise<ProviderActivityAfterUserPromptEvidence>;
|
|
6000
|
+
private readProtocolV3SnapshotTranscriptRows;
|
|
6001
|
+
private readRecentTimestampedTranscriptRows;
|
|
6002
|
+
private readProtocolV3SnapshotTimestampedRows;
|
|
6003
|
+
private readSessionTranscriptMessageContent;
|
|
6004
|
+
waitForCommittedUserMessageSeq(localId: string, options?: CommittedUserMessageSeqWaitOptions): Promise<number | null>;
|
|
6005
|
+
listPendingMessageQueueV2LocalIds(): Promise<string[]>;
|
|
6006
|
+
peekPendingMessageQueueV2Count(): Promise<number>;
|
|
6007
|
+
enqueuePendingMessageQueueV2(body: PendingMessageQueueV2WriteBody): Promise<PendingMessageQueueV2WriteResult>;
|
|
6008
|
+
enqueueUserTextPendingMessageQueueV2(body: PendingMessageQueueV2UserTextBody): Promise<PendingMessageQueueV2WriteResult>;
|
|
6009
|
+
updatePendingMessageQueueV2(localId: string, body: PendingMessageQueueV2UpdateBody): Promise<PendingMessageQueueV2MutationResult>;
|
|
6010
|
+
deletePendingMessageQueueV2(localId: string): Promise<PendingMessageQueueV2MutationResult>;
|
|
6011
|
+
discardPendingMessageQueueV2(localId: string, opts: {
|
|
6012
|
+
reason: PendingMessageQueueV2DiscardReason;
|
|
6013
|
+
}): Promise<PendingMessageQueueV2MutationResult>;
|
|
6014
|
+
restorePendingMessageQueueV2(localId: string): Promise<PendingMessageQueueV2MutationResult>;
|
|
6015
|
+
reorderPendingMessageQueueV2(body: PendingMessageQueueV2ReorderBody): Promise<PendingMessageQueueV2MutationResult>;
|
|
6016
|
+
materializeNextPendingMessageQueueV2(): Promise<PendingMessageQueueV2MaterializeResult>;
|
|
6017
|
+
discardPendingMessageQueueV2All(opts: {
|
|
6018
|
+
reason: PendingMessageQueueV2DiscardReason;
|
|
6019
|
+
}): Promise<number>;
|
|
6020
|
+
discardCommittedMessageLocalIds(opts: {
|
|
6021
|
+
localIds: string[];
|
|
6022
|
+
reason: PendingMessageQueueV2DiscardReason;
|
|
6023
|
+
}): Promise<number>;
|
|
3911
6024
|
getMetadataSnapshot(): Metadata | null;
|
|
6025
|
+
private getDefaultConnectedServicesApi;
|
|
3912
6026
|
getAgentStateSnapshot(): AgentState | null;
|
|
3913
6027
|
private mergeRuntimeMetadata;
|
|
3914
6028
|
private didSessionValueChange;
|
|
@@ -3918,7 +6032,7 @@ declare class ApiSessionClient extends EventEmitter {
|
|
|
3918
6032
|
* @param body - Message body (can be MessageContent or raw content for agent messages)
|
|
3919
6033
|
*/
|
|
3920
6034
|
sendClaudeSessionMessage(body: RawJSONLines): void;
|
|
3921
|
-
sendCodexMessage(body: any): void;
|
|
6035
|
+
sendCodexMessage(body: any, options?: SendCodexMessageOptions): void;
|
|
3922
6036
|
/**
|
|
3923
6037
|
* Send a generic agent message to the session using ACP (Agent Communication Protocol) format.
|
|
3924
6038
|
* Works for any agent type (Gemini, Codex, Claude, etc.) - CLI normalizes to unified ACP format.
|
|
@@ -3926,7 +6040,17 @@ declare class ApiSessionClient extends EventEmitter {
|
|
|
3926
6040
|
* @param provider - The agent provider sending the message (e.g., 'gemini', 'codex', 'claude')
|
|
3927
6041
|
* @param body - The message payload (type: 'message' | 'reasoning' | 'tool-call' | 'tool-result')
|
|
3928
6042
|
*/
|
|
3929
|
-
sendAgentMessage(provider: ACPProvider, body: ACPMessageData): void;
|
|
6043
|
+
sendAgentMessage(provider: ACPProvider, body: ACPMessageData, options?: SendAgentMessageOptions): void;
|
|
6044
|
+
sendAgentMessageCommitted(provider: ACPProvider, body: ACPMessageData, options: {
|
|
6045
|
+
localId: string;
|
|
6046
|
+
meta?: Record<string, unknown>;
|
|
6047
|
+
}): Promise<void>;
|
|
6048
|
+
sendAgentMessageEphemeral(provider: ACPProvider, body: ACPMessageData, options: {
|
|
6049
|
+
localId: string;
|
|
6050
|
+
createdAt: number;
|
|
6051
|
+
updatedAt?: number;
|
|
6052
|
+
meta?: Record<string, unknown>;
|
|
6053
|
+
}): void;
|
|
3930
6054
|
sendSessionEvent(event: {
|
|
3931
6055
|
type: 'switch';
|
|
3932
6056
|
mode: 'local' | 'remote';
|
|
@@ -3955,7 +6079,9 @@ declare class ApiSessionClient extends EventEmitter {
|
|
|
3955
6079
|
* Update session metadata
|
|
3956
6080
|
* @param handler - Handler function that returns the updated metadata
|
|
3957
6081
|
*/
|
|
6082
|
+
updateMetadataCommitted(handler: (metadata: Metadata) => Metadata, options?: UpdateMetadataOptions): Promise<void>;
|
|
3958
6083
|
updateMetadata(handler: (metadata: Metadata) => Metadata, options?: UpdateMetadataOptions): void;
|
|
6084
|
+
private commitMetadataUpdate;
|
|
3959
6085
|
/**
|
|
3960
6086
|
* Update session agent state
|
|
3961
6087
|
* @param handler - Handler function that returns the updated agent state
|
|
@@ -3968,6 +6094,11 @@ declare class ApiSessionClient extends EventEmitter {
|
|
|
3968
6094
|
close(): Promise<void>;
|
|
3969
6095
|
private trackPendingBackgroundTask;
|
|
3970
6096
|
private waitForPendingBackgroundTasksToDrain;
|
|
6097
|
+
private recordCommittedUserMessageSeq;
|
|
6098
|
+
private resolveCommittedUserMessageSeqWaiters;
|
|
6099
|
+
private trimCommittedUserMessageSeqs;
|
|
6100
|
+
private clearCommittedUserMessageSeqTracker;
|
|
6101
|
+
private withDispatchLocalKey;
|
|
3971
6102
|
private handleSocketUpdate;
|
|
3972
6103
|
private dispatchEncryptedSessionMessage;
|
|
3973
6104
|
/**
|
|
@@ -3976,6 +6107,7 @@ declare class ApiSessionClient extends EventEmitter {
|
|
|
3976
6107
|
*/
|
|
3977
6108
|
private dispatchPlaintextSessionMessage;
|
|
3978
6109
|
private dispatchSessionTranscriptMessage;
|
|
6110
|
+
private recordRecentSessionTranscriptMessage;
|
|
3979
6111
|
private maybeAutoAcknowledgeHappyOrgDispatch;
|
|
3980
6112
|
private resolveHappyOrgDispatchBusinessAckCandidate;
|
|
3981
6113
|
private hasRecordedHappyOrgDispatchAck;
|
|
@@ -4020,6 +6152,8 @@ declare class ApiSessionClient extends EventEmitter {
|
|
|
4020
6152
|
private normalizeSocketError;
|
|
4021
6153
|
}
|
|
4022
6154
|
|
|
6155
|
+
type CodexBackendMode = 'appServer' | 'acp';
|
|
6156
|
+
|
|
4023
6157
|
type SessionLaunchMode = 'background' | 'terminalWindow' | 'localTerminal';
|
|
4024
6158
|
interface SpawnSessionOptions {
|
|
4025
6159
|
machineId?: string;
|
|
@@ -4028,6 +6162,9 @@ interface SpawnSessionOptions {
|
|
|
4028
6162
|
managedSessionTag?: string;
|
|
4029
6163
|
approvedNewDirectoryCreation?: boolean;
|
|
4030
6164
|
agent?: 'claude' | 'codex' | 'cursor' | 'gemini';
|
|
6165
|
+
codexBackendMode?: CodexBackendMode;
|
|
6166
|
+
experimentalCodexAcp?: boolean;
|
|
6167
|
+
experimentalCodexResume?: boolean;
|
|
4031
6168
|
token?: string;
|
|
4032
6169
|
launchMode?: SessionLaunchMode;
|
|
4033
6170
|
environmentVariables?: {
|
|
@@ -4038,6 +6175,12 @@ interface SpawnSessionOptions {
|
|
|
4038
6175
|
TMUX_TMPDIR?: string;
|
|
4039
6176
|
};
|
|
4040
6177
|
resume?: SpawnSessionResumeOptions;
|
|
6178
|
+
transcriptStorage?: 'direct' | 'persisted';
|
|
6179
|
+
managedSessionMetadata?: Metadata;
|
|
6180
|
+
managedSessionState?: AgentState;
|
|
6181
|
+
permissionMode?: PermissionMode;
|
|
6182
|
+
modelId?: string;
|
|
6183
|
+
initialGoal?: SessionInitialGoalRequestV1;
|
|
4041
6184
|
}
|
|
4042
6185
|
interface SpawnSessionResumeOptions {
|
|
4043
6186
|
providerSessionId: string;
|
|
@@ -4054,6 +6197,312 @@ type SpawnSessionResult = {
|
|
|
4054
6197
|
errorMessage: string;
|
|
4055
6198
|
};
|
|
4056
6199
|
|
|
6200
|
+
type LoadedCodexDirectSession = Readonly<{
|
|
6201
|
+
sessionId: string;
|
|
6202
|
+
machineId: string;
|
|
6203
|
+
providerId: DirectSessionsProviderId;
|
|
6204
|
+
remoteSessionId: string;
|
|
6205
|
+
source: DirectSessionsSource;
|
|
6206
|
+
directory: string;
|
|
6207
|
+
metadata: Metadata & Record<string, unknown>;
|
|
6208
|
+
}>;
|
|
6209
|
+
type LoadCodexDirectSessionResult = Readonly<{
|
|
6210
|
+
ok: true;
|
|
6211
|
+
session: LoadedCodexDirectSession;
|
|
6212
|
+
}> | Readonly<{
|
|
6213
|
+
ok: false;
|
|
6214
|
+
errorCode: DirectSessionsErrorCode;
|
|
6215
|
+
error: string;
|
|
6216
|
+
}>;
|
|
6217
|
+
|
|
6218
|
+
type CodexAppServerDirectSessionCandidate = Readonly<{
|
|
6219
|
+
remoteSessionId: string;
|
|
6220
|
+
title?: string;
|
|
6221
|
+
createdAtMs: number;
|
|
6222
|
+
updatedAtMs: number;
|
|
6223
|
+
activity?: DirectSessionActivityV1;
|
|
6224
|
+
archived: boolean;
|
|
6225
|
+
details: Readonly<{
|
|
6226
|
+
cwd?: string;
|
|
6227
|
+
codexBackendMode: 'appServer';
|
|
6228
|
+
agentRuntimeDescriptorV1: Readonly<{
|
|
6229
|
+
provider: 'codex';
|
|
6230
|
+
backendMode: 'appServer';
|
|
6231
|
+
vendorSessionId: string;
|
|
6232
|
+
}>;
|
|
6233
|
+
runtimeDescriptor?: Record<string, unknown>;
|
|
6234
|
+
}>;
|
|
6235
|
+
}>;
|
|
6236
|
+
declare function listCodexDirectSessionCandidatesViaAppServer(params: Readonly<{
|
|
6237
|
+
codexHome: string;
|
|
6238
|
+
cwd: string;
|
|
6239
|
+
env?: NodeJS.ProcessEnv;
|
|
6240
|
+
}>): Promise<CodexAppServerDirectSessionCandidate[]>;
|
|
6241
|
+
|
|
6242
|
+
type CodexDirectSessionLinkResult = Readonly<{
|
|
6243
|
+
sessionId: string;
|
|
6244
|
+
created: boolean;
|
|
6245
|
+
tag: string;
|
|
6246
|
+
}>;
|
|
6247
|
+
type CodexDirectSessionLinkGetOrCreateSession = (params: Readonly<{
|
|
6248
|
+
tag: string;
|
|
6249
|
+
metadata: Metadata & Record<string, unknown>;
|
|
6250
|
+
agentState: AgentState | null;
|
|
6251
|
+
stableDataKeyPath: readonly string[];
|
|
6252
|
+
}>) => Promise<{
|
|
6253
|
+
sessionId: string;
|
|
6254
|
+
} | null>;
|
|
6255
|
+
type CodexDirectSessionLinkFindExistingSession = (tag: string) => Promise<string | null>;
|
|
6256
|
+
type CodexDirectSessionLinkRequest = Readonly<{
|
|
6257
|
+
machineId: string;
|
|
6258
|
+
providerId: DirectSessionsProviderId;
|
|
6259
|
+
remoteSessionId: string;
|
|
6260
|
+
source: DirectSessionsSource;
|
|
6261
|
+
titleHint?: string | null;
|
|
6262
|
+
directoryHint?: string | null;
|
|
6263
|
+
codexBackendMode?: string | null;
|
|
6264
|
+
runtimeDescriptor?: Record<string, unknown> | null;
|
|
6265
|
+
nowMs?: () => number;
|
|
6266
|
+
findExistingSessionIdByTag: CodexDirectSessionLinkFindExistingSession;
|
|
6267
|
+
getOrCreateSessionByTag: CodexDirectSessionLinkGetOrCreateSession;
|
|
6268
|
+
}>;
|
|
6269
|
+
declare function ensureCodexDirectSessionLink(params: CodexDirectSessionLinkRequest): Promise<CodexDirectSessionLinkResult>;
|
|
6270
|
+
|
|
6271
|
+
type DirectSessionFollowLease = Readonly<{
|
|
6272
|
+
release: () => void | Promise<void>;
|
|
6273
|
+
getTailCursor?: () => string | null;
|
|
6274
|
+
subscribeToTranscriptUpdates?: (listener: (update: Readonly<{
|
|
6275
|
+
items: Iterable<DirectTranscriptRawMessageV1>;
|
|
6276
|
+
nextCursor?: string | null;
|
|
6277
|
+
truncated: boolean;
|
|
6278
|
+
}>) => void | Promise<void>) => () => void;
|
|
6279
|
+
}>;
|
|
6280
|
+
type FollowLeaseAcquirer = () => Promise<DirectSessionFollowLease | null>;
|
|
6281
|
+
type DirectSessionFollowLeaseManagerParams = Readonly<{
|
|
6282
|
+
now?: () => number;
|
|
6283
|
+
randomId?: () => string;
|
|
6284
|
+
setTimer?: typeof setTimeout;
|
|
6285
|
+
clearTimer?: typeof clearTimeout;
|
|
6286
|
+
}>;
|
|
6287
|
+
declare function createDirectSessionFollowLeaseManager(params?: DirectSessionFollowLeaseManagerParams): {
|
|
6288
|
+
attach(input: Readonly<{
|
|
6289
|
+
sessionId: string;
|
|
6290
|
+
leaseId?: string | null;
|
|
6291
|
+
ttlMs: number;
|
|
6292
|
+
acquireFollowLease?: FollowLeaseAcquirer;
|
|
6293
|
+
}>): Promise<{
|
|
6294
|
+
readonly leaseId: string;
|
|
6295
|
+
readonly expiresAtMs: number;
|
|
6296
|
+
readonly renewed: boolean;
|
|
6297
|
+
}>;
|
|
6298
|
+
detach(input: Readonly<{
|
|
6299
|
+
sessionId: string;
|
|
6300
|
+
leaseId: string;
|
|
6301
|
+
}>): Promise<{
|
|
6302
|
+
readonly detached: boolean;
|
|
6303
|
+
}>;
|
|
6304
|
+
setBackgroundFollowEnabled(input: Readonly<{
|
|
6305
|
+
sessionId: string;
|
|
6306
|
+
enabled: boolean;
|
|
6307
|
+
acquireFollowLease?: FollowLeaseAcquirer;
|
|
6308
|
+
}>): Promise<{
|
|
6309
|
+
readonly enabled: false;
|
|
6310
|
+
readonly leaseAcquired: false;
|
|
6311
|
+
readonly followLease?: undefined;
|
|
6312
|
+
} | {
|
|
6313
|
+
readonly enabled: true;
|
|
6314
|
+
readonly leaseAcquired: false;
|
|
6315
|
+
readonly followLease?: undefined;
|
|
6316
|
+
} | {
|
|
6317
|
+
readonly enabled: true;
|
|
6318
|
+
readonly leaseAcquired: true;
|
|
6319
|
+
readonly followLease: Readonly<{
|
|
6320
|
+
release: () => void | Promise<void>;
|
|
6321
|
+
getTailCursor?: () => string | null;
|
|
6322
|
+
subscribeToTranscriptUpdates?: (listener: (update: Readonly<{
|
|
6323
|
+
items: Iterable<DirectTranscriptRawMessageV1>;
|
|
6324
|
+
nextCursor?: string | null;
|
|
6325
|
+
truncated: boolean;
|
|
6326
|
+
}>) => void | Promise<void>) => () => void;
|
|
6327
|
+
}>;
|
|
6328
|
+
}>;
|
|
6329
|
+
countActiveLeases(sessionId: string): number;
|
|
6330
|
+
isBackgroundFollowEnabled(sessionId: string): boolean;
|
|
6331
|
+
hasBackgroundFollowLease(sessionId: string): boolean;
|
|
6332
|
+
};
|
|
6333
|
+
|
|
6334
|
+
type CodexDirectSessionObservedProgressUpdater = (params: Readonly<{
|
|
6335
|
+
sessionId: string;
|
|
6336
|
+
providerId: DirectSessionsProviderId;
|
|
6337
|
+
remoteSessionId: string;
|
|
6338
|
+
source: DirectSessionsSource;
|
|
6339
|
+
observedProgress?: ReturnType<typeof deriveDirectSessionObservedProgress>;
|
|
6340
|
+
lastKnownActivityAtMs?: number | null;
|
|
6341
|
+
}>) => Promise<void>;
|
|
6342
|
+
|
|
6343
|
+
type CodexDirectTranscriptCommitter = (params: Readonly<{
|
|
6344
|
+
sessionId: string;
|
|
6345
|
+
localId: string;
|
|
6346
|
+
message: MessageContent;
|
|
6347
|
+
}>) => Promise<void>;
|
|
6348
|
+
|
|
6349
|
+
type CodexAppServerDirectTranscriptPage = Readonly<{
|
|
6350
|
+
items: DirectTranscriptRawMessageV1[];
|
|
6351
|
+
nextCursor: string | null;
|
|
6352
|
+
tailCursor: string | null;
|
|
6353
|
+
hasMore: boolean;
|
|
6354
|
+
truncated?: boolean;
|
|
6355
|
+
}>;
|
|
6356
|
+
type CodexAppServerDirectTranscriptReadAfter = Readonly<{
|
|
6357
|
+
items: DirectTranscriptRawMessageV1[];
|
|
6358
|
+
nextCursor: string | null;
|
|
6359
|
+
truncated: boolean;
|
|
6360
|
+
}>;
|
|
6361
|
+
declare function pageCodexDirectSessionTranscriptViaAppServer(params: Readonly<{
|
|
6362
|
+
codexHome: string;
|
|
6363
|
+
cwd: string;
|
|
6364
|
+
env?: NodeJS.ProcessEnv;
|
|
6365
|
+
remoteSessionId: string;
|
|
6366
|
+
direction: 'older' | 'newer';
|
|
6367
|
+
cursor?: string;
|
|
6368
|
+
maxBytes?: number;
|
|
6369
|
+
maxItems?: number;
|
|
6370
|
+
}>): Promise<CodexAppServerDirectTranscriptPage>;
|
|
6371
|
+
declare function readAfterCodexDirectSessionTranscriptViaAppServer(params: Readonly<{
|
|
6372
|
+
codexHome: string;
|
|
6373
|
+
cwd: string;
|
|
6374
|
+
env?: NodeJS.ProcessEnv;
|
|
6375
|
+
remoteSessionId: string;
|
|
6376
|
+
cursor: string;
|
|
6377
|
+
maxBytes?: number;
|
|
6378
|
+
maxItems?: number;
|
|
6379
|
+
}>): Promise<CodexAppServerDirectTranscriptReadAfter>;
|
|
6380
|
+
|
|
6381
|
+
type LocalSessionRegistration = {
|
|
6382
|
+
pid: number;
|
|
6383
|
+
sessionId: string;
|
|
6384
|
+
metadata: Metadata;
|
|
6385
|
+
updatedAt: number;
|
|
6386
|
+
};
|
|
6387
|
+
|
|
6388
|
+
type CodexDirectSessionMachineHandlerDeps = Readonly<{
|
|
6389
|
+
env?: NodeJS.ProcessEnv;
|
|
6390
|
+
listCodexCandidates?: typeof listCodexDirectSessionCandidatesViaAppServer;
|
|
6391
|
+
ensureCodexLink?: (params: Omit<CodexDirectSessionLinkRequest, 'findExistingSessionIdByTag' | 'getOrCreateSessionByTag'>) => Promise<Awaited<ReturnType<typeof ensureCodexDirectSessionLink>>>;
|
|
6392
|
+
followLeaseManager?: ReturnType<typeof createDirectSessionFollowLeaseManager>;
|
|
6393
|
+
acquireCodexFollowLease?: (params: Readonly<{
|
|
6394
|
+
sessionId: string;
|
|
6395
|
+
remoteSessionId: string;
|
|
6396
|
+
source: DirectSessionsSource;
|
|
6397
|
+
reason: 'attached_view' | 'background_follow';
|
|
6398
|
+
}>) => Promise<DirectSessionFollowLease | null>;
|
|
6399
|
+
loadCodexDirectSession?: (params: Readonly<{
|
|
6400
|
+
sessionId: string;
|
|
6401
|
+
machineId: string;
|
|
6402
|
+
}>) => Promise<LoadCodexDirectSessionResult>;
|
|
6403
|
+
commitCodexDirectSessionTranscriptMessage?: CodexDirectTranscriptCommitter;
|
|
6404
|
+
updateCodexDirectSessionFollowPolicy?: (params: Readonly<{
|
|
6405
|
+
sessionId: string;
|
|
6406
|
+
policy: 'attached_only' | 'background_follow';
|
|
6407
|
+
updatedAtMs: number;
|
|
6408
|
+
}>) => Promise<void>;
|
|
6409
|
+
updateCodexDirectSessionObservedProgress?: CodexDirectSessionObservedProgressUpdater;
|
|
6410
|
+
convertCodexDirectSessionToPersisted?: (params: Readonly<{
|
|
6411
|
+
sessionId: string;
|
|
6412
|
+
providerId: string;
|
|
6413
|
+
remoteSessionId: string;
|
|
6414
|
+
source: DirectSessionsSource;
|
|
6415
|
+
directory: string;
|
|
6416
|
+
importedCount: number;
|
|
6417
|
+
}>) => Promise<void>;
|
|
6418
|
+
emitDirectSessionTranscriptUpdate?: (payload: DirectSessionTranscriptDeltaEphemeral) => void | Promise<void>;
|
|
6419
|
+
spawnSession?: (options: SpawnSessionOptions) => Promise<SpawnSessionResult>;
|
|
6420
|
+
stopSession?: (sessionId: string) => Promise<boolean> | boolean;
|
|
6421
|
+
pageCodexTranscript?: typeof pageCodexDirectSessionTranscriptViaAppServer;
|
|
6422
|
+
readAfterCodexTranscript?: typeof readAfterCodexDirectSessionTranscriptViaAppServer;
|
|
6423
|
+
listLocalSessions?: () => Promise<LocalSessionRegistration[]>;
|
|
6424
|
+
isSessionPidAlive?: (pid: number) => Promise<boolean> | boolean;
|
|
6425
|
+
nowMs?: () => number;
|
|
6426
|
+
}>;
|
|
6427
|
+
|
|
6428
|
+
type StreamedTranscriptWriterSession = Readonly<{
|
|
6429
|
+
sendAgentMessage?: (provider: ACPProvider, body: ACPMessageData, opts?: {
|
|
6430
|
+
localId?: string;
|
|
6431
|
+
meta?: Record<string, unknown>;
|
|
6432
|
+
}) => void;
|
|
6433
|
+
sendAgentMessageCommitted?: (provider: ACPProvider, body: ACPMessageData, opts: {
|
|
6434
|
+
localId: string;
|
|
6435
|
+
meta?: Record<string, unknown>;
|
|
6436
|
+
}) => Promise<void>;
|
|
6437
|
+
sendAgentMessageEphemeral?: (provider: ACPProvider, body: ACPMessageData, opts: {
|
|
6438
|
+
localId: string;
|
|
6439
|
+
createdAt: number;
|
|
6440
|
+
updatedAt?: number;
|
|
6441
|
+
meta?: Record<string, unknown>;
|
|
6442
|
+
}) => void;
|
|
6443
|
+
}>;
|
|
6444
|
+
|
|
6445
|
+
type MemoryWindowApi = Readonly<{
|
|
6446
|
+
getOrLoadSessionSyncClient(sessionId: string): Promise<ApiSessionClient | null>;
|
|
6447
|
+
getSessionSnapshotV3(sessionId: string, limit?: number): Promise<ProtocolV3SessionSnapshotResponse | null>;
|
|
6448
|
+
listSessionsIndex?: () => Promise<readonly {
|
|
6449
|
+
id: string;
|
|
6450
|
+
active?: boolean;
|
|
6451
|
+
activeAt?: number;
|
|
6452
|
+
updatedAt?: number;
|
|
6453
|
+
createdAt?: number;
|
|
6454
|
+
}[]>;
|
|
6455
|
+
listSessionsIndexPage?: (args: Readonly<{
|
|
6456
|
+
cursor?: string | null;
|
|
6457
|
+
limit?: number;
|
|
6458
|
+
activeOnly?: boolean;
|
|
6459
|
+
includeArchived?: boolean;
|
|
6460
|
+
}>) => Promise<Readonly<{
|
|
6461
|
+
sessions: readonly {
|
|
6462
|
+
id: string;
|
|
6463
|
+
active?: boolean;
|
|
6464
|
+
activeAt?: number;
|
|
6465
|
+
updatedAt?: number;
|
|
6466
|
+
createdAt?: number;
|
|
6467
|
+
}[];
|
|
6468
|
+
nextCursor: string | null;
|
|
6469
|
+
hasNext: boolean;
|
|
6470
|
+
}>>;
|
|
6471
|
+
commitMemoryHintArtifacts?: (args: Readonly<{
|
|
6472
|
+
sessionId: string;
|
|
6473
|
+
shardPayload: SessionSummaryShardV1;
|
|
6474
|
+
synopsisPayload: SessionSynopsisV1 | null;
|
|
6475
|
+
}>) => Promise<void>;
|
|
6476
|
+
}>;
|
|
6477
|
+
|
|
6478
|
+
type McpServerToolSummary = Readonly<{
|
|
6479
|
+
name: string;
|
|
6480
|
+
}>;
|
|
6481
|
+
type DetectProviderMcpServersResult = Readonly<{
|
|
6482
|
+
servers: readonly DetectedMcpServerV1[];
|
|
6483
|
+
warnings?: readonly DaemonMcpServersDetectWarningV1[];
|
|
6484
|
+
}>;
|
|
6485
|
+
type McpServersMachineHandlerDeps = Readonly<{
|
|
6486
|
+
env?: NodeJS.ProcessEnv;
|
|
6487
|
+
nowMs?: () => number;
|
|
6488
|
+
readMcpServersSettings?: () => McpServersSettingsV1 | Promise<McpServersSettingsV1>;
|
|
6489
|
+
readAccountSettings?: () => unknown | Promise<unknown>;
|
|
6490
|
+
settingsSecretsReadKeys?: ReadonlyArray<Uint8Array | null | undefined>;
|
|
6491
|
+
resolveSavedSecret?: (secretId: string) => string | null | Promise<string | null>;
|
|
6492
|
+
detectProviderMcpServers?: (params: Readonly<{
|
|
6493
|
+
machineId: string;
|
|
6494
|
+
directory: string | null;
|
|
6495
|
+
providers?: readonly string[];
|
|
6496
|
+
env: NodeJS.ProcessEnv;
|
|
6497
|
+
}>) => DetectProviderMcpServersResult | Promise<DetectProviderMcpServersResult>;
|
|
6498
|
+
probeMcpServerTools?: (params: Readonly<{
|
|
6499
|
+
serverName: string;
|
|
6500
|
+
config: McpServerConfig;
|
|
6501
|
+
directory: string;
|
|
6502
|
+
env: NodeJS.ProcessEnv;
|
|
6503
|
+
}>) => readonly McpServerToolSummary[] | Promise<readonly McpServerToolSummary[]>;
|
|
6504
|
+
}>;
|
|
6505
|
+
|
|
4057
6506
|
/**
|
|
4058
6507
|
* WebSocket client for machine/daemon communication with Happy server
|
|
4059
6508
|
* Similar to ApiSessionClient but for machine-scoped connections
|
|
@@ -4064,19 +6513,80 @@ type MachineRpcHandlers = {
|
|
|
4064
6513
|
stopSession: (sessionId: string) => boolean;
|
|
4065
6514
|
requestShutdown: () => void;
|
|
4066
6515
|
};
|
|
6516
|
+
type ApiMachineClientOptions = Readonly<{
|
|
6517
|
+
loadSessionMetadataForHandoff?: (input: Readonly<{
|
|
6518
|
+
sessionId: string;
|
|
6519
|
+
sourceMachineId: string;
|
|
6520
|
+
}>) => Promise<Metadata | null>;
|
|
6521
|
+
listCodexUsageLimitRecoverySessions?: (machineId: string) => Promise<CodexUsageLimitRecoverySessionSnapshot[]>;
|
|
6522
|
+
createMemoryApi?: () => Promise<MemoryWindowApi | null>;
|
|
6523
|
+
readMemorySettings?: () => Promise<MemorySettingsV1>;
|
|
6524
|
+
writeMemorySettings?: (next: unknown) => Promise<MemorySettingsV1>;
|
|
6525
|
+
autoStartMemoryWorker?: boolean;
|
|
6526
|
+
getTranscriptWriterSession?: (sessionId: string) => StreamedTranscriptWriterSession | null | undefined | Promise<StreamedTranscriptWriterSession | null | undefined>;
|
|
6527
|
+
ensureCodexDirectSessionLink?: CodexDirectSessionMachineHandlerDeps['ensureCodexLink'];
|
|
6528
|
+
loadCodexDirectSessionForTakeover?: CodexDirectSessionMachineHandlerDeps['loadCodexDirectSession'];
|
|
6529
|
+
commitCodexDirectSessionTranscriptMessage?: CodexDirectSessionMachineHandlerDeps['commitCodexDirectSessionTranscriptMessage'];
|
|
6530
|
+
convertCodexDirectSessionToPersisted?: CodexDirectSessionMachineHandlerDeps['convertCodexDirectSessionToPersisted'];
|
|
6531
|
+
updateCodexDirectSessionFollowPolicy?: CodexDirectSessionMachineHandlerDeps['updateCodexDirectSessionFollowPolicy'];
|
|
6532
|
+
updateCodexDirectSessionObservedProgress?: CodexDirectSessionMachineHandlerDeps['updateCodexDirectSessionObservedProgress'];
|
|
6533
|
+
readMcpServersSettings?: () => Promise<McpServersSettingsV1>;
|
|
6534
|
+
readAccountSettings?: () => Promise<unknown>;
|
|
6535
|
+
detectProviderMcpServers?: McpServersMachineHandlerDeps['detectProviderMcpServers'];
|
|
6536
|
+
}>;
|
|
4067
6537
|
declare class ApiMachineClient {
|
|
4068
6538
|
private credentials;
|
|
4069
6539
|
private machine;
|
|
6540
|
+
private options;
|
|
4070
6541
|
private socket;
|
|
4071
6542
|
private keepAliveInterval;
|
|
4072
6543
|
private rpcHandlerManager;
|
|
4073
6544
|
private terminalPtySessionManager;
|
|
4074
6545
|
private executionRunManager;
|
|
4075
|
-
|
|
6546
|
+
private codexUsageLimitRecoveryScheduler;
|
|
6547
|
+
private memoryIndex;
|
|
6548
|
+
private memoryWorker;
|
|
6549
|
+
private codexHandoffDirectPeerRuntime;
|
|
6550
|
+
private codexHandoffDirectPeerRuntimeStartup;
|
|
6551
|
+
private readonly codexHandoffDirectPeerTransfer;
|
|
6552
|
+
private codexUsageLimitRecoveryRestored;
|
|
6553
|
+
private executionRunMarkerRecoveryStarted;
|
|
6554
|
+
private codexHandoffImportRecoveryStarted;
|
|
6555
|
+
private workspaceReplicationRecoveryStarted;
|
|
6556
|
+
private machineTransferListeners;
|
|
6557
|
+
private recoverCodexHandoffImportsOnStartup;
|
|
6558
|
+
private directSessionFollowLeaseManager;
|
|
6559
|
+
private connectedServicesApiPromise;
|
|
6560
|
+
constructor(credentials: Credentials, machine: Machine, options?: ApiMachineClientOptions);
|
|
6561
|
+
private registerCodexDirectSessionHandlers;
|
|
6562
|
+
private registerCodexSessionGoalHandlers;
|
|
6563
|
+
private registerCodexSessionCatalogHandlers;
|
|
6564
|
+
private restoreCodexUsageLimitRecoverySchedules;
|
|
6565
|
+
private recoverExecutionRunsFromMarkers;
|
|
6566
|
+
private recoverCodexSessionHandoffImports;
|
|
6567
|
+
private recoverWorkspaceReplicationJobsAfterRestart;
|
|
4076
6568
|
private registerTerminalHandlers;
|
|
4077
6569
|
private registerExecutionRunHandlers;
|
|
6570
|
+
private registerMemoryHandlers;
|
|
6571
|
+
private createDefaultMemoryApi;
|
|
6572
|
+
private getDefaultConnectedServicesApi;
|
|
6573
|
+
private loadSessionMetadataForHandoff;
|
|
6574
|
+
private registerMcpServersHandlers;
|
|
6575
|
+
private readAccountSettingsForMcp;
|
|
6576
|
+
private readMcpServersSettings;
|
|
6577
|
+
private resolveMemoryEmbeddingsProvider;
|
|
6578
|
+
private embedMemoryDocuments;
|
|
6579
|
+
private embedMemoryQuery;
|
|
6580
|
+
private runMemoryHintsSummarizer;
|
|
6581
|
+
private readMemorySettings;
|
|
6582
|
+
private writeMemorySettings;
|
|
4078
6583
|
private emitExecutionRunUpdate;
|
|
6584
|
+
private emitDirectSessionTranscriptUpdate;
|
|
6585
|
+
onMachineTransferEnvelope(listener: (payload: MachineTransferReceiveEnvelope) => void): () => void;
|
|
6586
|
+
sendMachineTransferEnvelope(payload: MachineTransferSendEnvelope): void;
|
|
6587
|
+
private dispatchMachineTransferEnvelope;
|
|
4079
6588
|
setRPCHandlers({ spawnSession, stopSession, requestShutdown }: MachineRpcHandlers): void;
|
|
6589
|
+
private startCodexHandoffDirectPeerRuntime;
|
|
4080
6590
|
/**
|
|
4081
6591
|
* Update machine metadata
|
|
4082
6592
|
* Currently unused, changes from the mobile client are more likely
|
|
@@ -4121,6 +6631,7 @@ declare class ApiUserObserverClient extends EventEmitter {
|
|
|
4121
6631
|
interface PushToken {
|
|
4122
6632
|
id: string;
|
|
4123
6633
|
token: string;
|
|
6634
|
+
clientServerUrl?: string | null;
|
|
4124
6635
|
createdAt: number;
|
|
4125
6636
|
updatedAt: number;
|
|
4126
6637
|
}
|
|
@@ -4144,6 +6655,7 @@ declare class PushNotificationClient {
|
|
|
4144
6655
|
* @param body - Notification body
|
|
4145
6656
|
* @param data - Additional data to send with the notification
|
|
4146
6657
|
*/
|
|
6658
|
+
sendToAllDevicesAsync(title: string, body: string, data?: Record<string, any>): Promise<void>;
|
|
4147
6659
|
sendToAllDevices(title: string, body: string, data?: Record<string, any>): void;
|
|
4148
6660
|
}
|
|
4149
6661
|
|
|
@@ -4326,10 +6838,80 @@ type SessionIndexRecord = {
|
|
|
4326
6838
|
updatedAt: number;
|
|
4327
6839
|
sessionIndex: SessionRuntimeIndex | null;
|
|
4328
6840
|
};
|
|
6841
|
+
type SessionIndexPage = {
|
|
6842
|
+
sessions: SessionIndexRecord[];
|
|
6843
|
+
nextCursor: string | null;
|
|
6844
|
+
hasNext: boolean;
|
|
6845
|
+
};
|
|
6846
|
+
type CodexUsageLimitRecoverySessionSnapshot = {
|
|
6847
|
+
sessionId: string;
|
|
6848
|
+
cwd: string | null;
|
|
6849
|
+
metadata: Metadata;
|
|
6850
|
+
rawSession: {
|
|
6851
|
+
latestTurnStatus: string | null;
|
|
6852
|
+
lastRuntimeIssue: unknown;
|
|
6853
|
+
};
|
|
6854
|
+
};
|
|
6855
|
+
type ActionAgentBackendsResponse = {
|
|
6856
|
+
items: unknown[];
|
|
6857
|
+
};
|
|
6858
|
+
type ActionAgentModelsResponse = {
|
|
6859
|
+
agentId?: string;
|
|
6860
|
+
items: unknown[];
|
|
6861
|
+
source?: string;
|
|
6862
|
+
};
|
|
6863
|
+
type ServerActionExecuteRequest = {
|
|
6864
|
+
actionId: string;
|
|
6865
|
+
input?: Record<string, unknown> | null;
|
|
6866
|
+
surface?: ActionSurface | null;
|
|
6867
|
+
defaultSessionId?: string | null;
|
|
6868
|
+
placement?: string | null;
|
|
6869
|
+
};
|
|
6870
|
+
type SessionTitleUpdateResponse = {
|
|
6871
|
+
success: boolean;
|
|
6872
|
+
version?: number;
|
|
6873
|
+
title?: string;
|
|
6874
|
+
metadata?: string;
|
|
6875
|
+
};
|
|
6876
|
+
type SessionArchiveResponse = {
|
|
6877
|
+
success: boolean;
|
|
6878
|
+
archived: boolean;
|
|
6879
|
+
alreadyArchived?: boolean;
|
|
6880
|
+
alreadyUnarchived?: boolean;
|
|
6881
|
+
active?: boolean;
|
|
6882
|
+
activeAt?: number;
|
|
6883
|
+
sessionIndex?: SessionRuntimeIndex | null;
|
|
6884
|
+
};
|
|
6885
|
+
type ConnectedServiceQuotaMetadataV3 = {
|
|
6886
|
+
fetchedAt: number;
|
|
6887
|
+
staleAfterMs: number;
|
|
6888
|
+
status: 'ok' | 'unavailable' | 'estimated' | 'error';
|
|
6889
|
+
refreshRequestedAt?: number;
|
|
6890
|
+
};
|
|
6891
|
+
type ConnectedServiceQuotaSnapshotV3 = {
|
|
6892
|
+
content: {
|
|
6893
|
+
t: 'plain';
|
|
6894
|
+
v: ConnectedServiceQuotaSnapshotV1;
|
|
6895
|
+
};
|
|
6896
|
+
metadata: ConnectedServiceQuotaMetadataV3;
|
|
6897
|
+
};
|
|
6898
|
+
type ConnectedServicesV3Response = {
|
|
6899
|
+
services: AccountConnectedServiceV2Service[];
|
|
6900
|
+
};
|
|
6901
|
+
type ConnectedServiceProfilesV3Response = {
|
|
6902
|
+
serviceId: ConnectedServiceId;
|
|
6903
|
+
profiles: AccountConnectedServiceV2Service['profiles'];
|
|
6904
|
+
};
|
|
6905
|
+
type ConnectedServiceRefreshLeaseResponse = {
|
|
6906
|
+
acquired: boolean;
|
|
6907
|
+
leaseUntil: number;
|
|
6908
|
+
};
|
|
4329
6909
|
declare class ApiClient {
|
|
4330
6910
|
static create(credential: Credentials): Promise<ApiClient>;
|
|
4331
6911
|
private readonly credential;
|
|
4332
6912
|
private readonly pushClient;
|
|
6913
|
+
private readonly sessionSyncClients;
|
|
6914
|
+
private readonly sessionSyncClientLoads;
|
|
4333
6915
|
private constructor();
|
|
4334
6916
|
private createAuthenticationError;
|
|
4335
6917
|
private requestProtocolV3Resource;
|
|
@@ -4374,9 +6956,63 @@ declare class ApiClient {
|
|
|
4374
6956
|
note?: string | null;
|
|
4375
6957
|
}): Promise<HappyOrgDispatchReceiptView>;
|
|
4376
6958
|
getProtocolV3Descriptor(): Promise<ProtocolV3Descriptor | null>;
|
|
6959
|
+
getAccountSettingsV2(): Promise<Readonly<{
|
|
6960
|
+
content: AccountSettingsStoredContentEnvelope | null;
|
|
6961
|
+
version: number;
|
|
6962
|
+
}> | null>;
|
|
6963
|
+
getAccountSettingsV2Content(): Promise<AccountSettingsStoredContentEnvelope | null>;
|
|
6964
|
+
updatePlainAccountSettingsV2WithRetry(mutate: (settings: AccountSettings) => AccountSettings, options?: Readonly<{
|
|
6965
|
+
maxAttempts?: number;
|
|
6966
|
+
}>): Promise<boolean>;
|
|
6967
|
+
getSettingsSecretsReadKeys(): readonly Uint8Array[];
|
|
4377
6968
|
getSessionSnapshotV3(sessionId: string, limit?: number): Promise<ProtocolV3SessionSnapshotResponse | null>;
|
|
4378
6969
|
getSessionChangesV3(sessionId: string, afterSeq: number, limit?: number): Promise<ProtocolV3SessionChangesResponse | null>;
|
|
6970
|
+
commitSessionMessageV3(opts: {
|
|
6971
|
+
sessionId: string;
|
|
6972
|
+
message: MessageContent;
|
|
6973
|
+
localId: string;
|
|
6974
|
+
}): Promise<void>;
|
|
6975
|
+
convertCodexDirectSessionToPersisted(opts: {
|
|
6976
|
+
sessionId: string;
|
|
6977
|
+
providerId: string;
|
|
6978
|
+
remoteSessionId: string;
|
|
6979
|
+
source: unknown;
|
|
6980
|
+
directory: string;
|
|
6981
|
+
}): Promise<void>;
|
|
6982
|
+
updateCodexDirectSessionFollowPolicy(opts: {
|
|
6983
|
+
sessionId: string;
|
|
6984
|
+
policy: DirectSessionFollowPolicy;
|
|
6985
|
+
updatedAtMs: number;
|
|
6986
|
+
}): Promise<void>;
|
|
6987
|
+
updateCodexDirectSessionObservedProgress(opts: {
|
|
6988
|
+
sessionId: string;
|
|
6989
|
+
providerId: DirectSessionsProviderId;
|
|
6990
|
+
remoteSessionId: string;
|
|
6991
|
+
source: DirectSessionsSource;
|
|
6992
|
+
observedProgress?: DirectSessionObservedProgress | null;
|
|
6993
|
+
lastKnownActivityAtMs?: number | null;
|
|
6994
|
+
}): Promise<void>;
|
|
4379
6995
|
listSessionsIndex(): Promise<SessionIndexRecord[]>;
|
|
6996
|
+
listSessionsIndexPage(opts?: {
|
|
6997
|
+
cursor?: string | null;
|
|
6998
|
+
limit?: number;
|
|
6999
|
+
activeOnly?: boolean;
|
|
7000
|
+
includeArchived?: boolean;
|
|
7001
|
+
}): Promise<SessionIndexPage>;
|
|
7002
|
+
findSessionIdByMetadataTag(tag: string, opts?: {
|
|
7003
|
+
maxPages?: number;
|
|
7004
|
+
}): Promise<string | null>;
|
|
7005
|
+
loadCodexDirectSessionForTakeover(params: {
|
|
7006
|
+
sessionId: string;
|
|
7007
|
+
machineId: string;
|
|
7008
|
+
}): Promise<LoadCodexDirectSessionResult>;
|
|
7009
|
+
listCodexUsageLimitRecoverySessions(machineId: string): Promise<CodexUsageLimitRecoverySessionSnapshot[]>;
|
|
7010
|
+
private decryptSessionListItemEnvelope;
|
|
7011
|
+
private decryptSessionListItemMetadata;
|
|
7012
|
+
private hydrateSessionListItem;
|
|
7013
|
+
private hydrateSessionListItemWithLocalStableKeyFallback;
|
|
7014
|
+
private loadSessionListItem;
|
|
7015
|
+
getOrLoadSessionSyncClient(sessionId: string): Promise<ApiSessionClient | null>;
|
|
4380
7016
|
/**
|
|
4381
7017
|
* Create a new session or load existing one with the given tag
|
|
4382
7018
|
*/
|
|
@@ -4398,7 +7034,36 @@ declare class ApiClient {
|
|
|
4398
7034
|
sessionSyncClient(session: Session): ApiSessionClient;
|
|
4399
7035
|
machineSyncClient(machine: Machine): ApiMachineClient;
|
|
4400
7036
|
userScopedObserverClient(): ApiUserObserverClient;
|
|
7037
|
+
listActionAgentBackends(opts?: {
|
|
7038
|
+
includeDisabled?: boolean;
|
|
7039
|
+
query?: string;
|
|
7040
|
+
limit?: number;
|
|
7041
|
+
}): Promise<ActionAgentBackendsResponse>;
|
|
7042
|
+
listActionAgentModels(opts?: {
|
|
7043
|
+
agentId?: string;
|
|
7044
|
+
backendTargetKey?: string;
|
|
7045
|
+
machineId?: string;
|
|
7046
|
+
query?: string;
|
|
7047
|
+
limit?: number;
|
|
7048
|
+
}): Promise<ActionAgentModelsResponse>;
|
|
7049
|
+
executeServerAction(opts: ServerActionExecuteRequest): Promise<ActionExecuteResult>;
|
|
7050
|
+
updateSessionTitle(sessionId: string, title: string): Promise<SessionTitleUpdateResponse>;
|
|
7051
|
+
setSessionArchived(sessionId: string, archived: boolean): Promise<SessionArchiveResponse>;
|
|
7052
|
+
relaySessionRPC<R = unknown, A = unknown>(sessionId: string, method: string, params: A): Promise<R>;
|
|
7053
|
+
relayMachineRPC<R = unknown, A = unknown>(machineId: string, method: string, params: A): Promise<R>;
|
|
4401
7054
|
push(): PushNotificationClient;
|
|
7055
|
+
getConnectedServiceCredentialV3(serviceId: string, profileId: string): Promise<ConnectedServiceCredentialRecordV1 | null>;
|
|
7056
|
+
putConnectedServiceCredentialV3(serviceId: string, profileId: string, record: ConnectedServiceCredentialRecordV1): Promise<void>;
|
|
7057
|
+
getConnectedServiceQuotaSnapshotV3(serviceId: string, profileId: string): Promise<ConnectedServiceQuotaSnapshotV3 | null>;
|
|
7058
|
+
putConnectedServiceQuotaSnapshotV3(serviceId: string, profileId: string, snapshot: ConnectedServiceQuotaSnapshotV1, metadata: ConnectedServiceQuotaMetadataV3): Promise<void>;
|
|
7059
|
+
listConnectedServicesV3(): Promise<ConnectedServicesV3Response>;
|
|
7060
|
+
listConnectedServiceProfilesV3(serviceId: string): Promise<ConnectedServiceProfilesV3Response>;
|
|
7061
|
+
acquireConnectedServiceRefreshLease(params: {
|
|
7062
|
+
serviceId: string;
|
|
7063
|
+
profileId: string;
|
|
7064
|
+
machineId: string;
|
|
7065
|
+
leaseMs: number;
|
|
7066
|
+
}): Promise<ConnectedServiceRefreshLeaseResponse | null>;
|
|
4402
7067
|
/**
|
|
4403
7068
|
* Register a vendor API token with the server
|
|
4404
7069
|
* The token is sent as a JSON string - server handles encryption
|
|
@@ -4449,6 +7114,9 @@ declare class Configuration {
|
|
|
4449
7114
|
readonly currentCliVersion: string;
|
|
4450
7115
|
readonly isExperimentalEnabled: boolean;
|
|
4451
7116
|
readonly disableCaffeinate: boolean;
|
|
7117
|
+
readonly permissionRequestPushRetryDelaysMs: readonly number[];
|
|
7118
|
+
readonly permissionRequestPushRetryMaxMs: number;
|
|
7119
|
+
readonly permissionRequestPushDedupeMaxEntries: number;
|
|
4452
7120
|
constructor();
|
|
4453
7121
|
}
|
|
4454
7122
|
declare const configuration: Configuration;
|