nolo-cli 0.30.0-alpha.2 → 0.30.0-alpha.21
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/{_executeModel-VBHHG7LT.js → _executeModel-LW6XMEQD.js} +29 -28
- package/{action-FENWPT3C.js → action-HI3VRQLP.js} +7 -7
- package/{addContentAction-Z5S5ZQ7I.js → addContentAction-NCURJ6PK.js} +6 -6
- package/{addDialogAgentAction-VUNVD2XR.js → addDialogAgentAction-RCY4ECF4.js} +5 -5
- package/{agentDeleteCommand-LLGZXUYJ.js → agentDeleteCommand-QQPG6AQH.js} +23 -22
- package/{agentEmailCommands-LC2FPN6G.js → agentEmailCommands-A2B3LAYP.js} +35 -34
- package/{agentListCommands-A6OBQ3QX.js → agentListCommands-W7I62AVC.js} +25 -24
- package/{agentMachineCommands-4O4Q5B5X.js → agentMachineCommands-JKL7NOXS.js} +23 -22
- package/{agentRecordCommands-W22RIQRV.js → agentRecordCommands-AIAB73R4.js} +34 -33
- package/{agentRunCommand-V4OBU4FB.js → agentRunCommand-C4AYZUAT.js} +34 -33
- package/{agentRunControl-AKBN2366.js → agentRunControl-SCIVRZWX.js} +9 -1
- package/{agentRuntimeLocal-I57YSGH4.js → agentRuntimeLocal-DA4COW6A.js} +20 -19
- package/{agentSlice-3ZHY7RAO.js → agentSlice-DSOHD3MB.js} +6 -6
- package/{appDeleteCommands-DJJF466K.js → appDeleteCommands-EYCHHGBM.js} +24 -23
- package/{appDeployCommands-WJZGIOEZ.js → appDeployCommands-AA6N3ZVV.js} +24 -23
- package/{appDeployStatusCommands-ICYXUJNO.js → appDeployStatusCommands-2DO4AB5S.js} +24 -23
- package/{appGetCommands-UOCWYJPV.js → appGetCommands-JZ5UFPSO.js} +24 -23
- package/{appListCommands-EOKWTXPW.js → appListCommands-4DJRONNU.js} +24 -23
- package/{authCommand-H5KE7K7K.js → authCommand-3GQR43KB.js} +5 -5
- package/{chunk-ZFTCLBEX.js → chunk-2IJAKBK2.js} +3 -1
- package/chunk-2K4NDPT5.js +1524 -0
- package/{chunk-3RIWR23B.js → chunk-3SCONADU.js} +1 -1
- package/{chunk-Q24P6TUS.js → chunk-43EPBPZ2.js} +1 -1
- package/{chunk-R5V5G73M.js → chunk-5RDLGLAP.js} +0 -1
- package/{chunk-KWKD3BCC.js → chunk-64LVM22D.js} +12 -12
- package/{chunk-MEUZFIAJ.js → chunk-65677FXQ.js} +1 -1
- package/{chunk-G6VITLCZ.js → chunk-6EWJFERV.js} +2 -2
- package/{chunk-HI7QZNWX.js → chunk-6M5ICJPJ.js} +4 -4
- package/{chunk-4SAV7BD7.js → chunk-7KNERA53.js} +53 -15
- package/{chunk-DCWBP2O7.js → chunk-7WNY3WEK.js} +10 -10
- package/{chunk-FS5TTXPS.js → chunk-AK7XNO3W.js} +3 -3
- package/{chunk-IZ3CBMD5.js → chunk-ATK5WJOA.js} +4 -4
- package/{chunk-HLG6GAUD.js → chunk-E2N2B4V4.js} +1 -1
- package/{chunk-YWGSCF37.js → chunk-E3APEOIM.js} +1 -1
- package/{chunk-GAGUBI42.js → chunk-EKVRQQWQ.js} +5 -5
- package/{chunk-MMCVBEAD.js → chunk-EUTKGPCR.js} +41 -31
- package/{chunk-G5JHHUAK.js → chunk-F3MP7CP6.js} +1 -1
- package/{chunk-446VANPP.js → chunk-G5GVZAXF.js} +4 -4
- package/{chunk-QLV2GKU5.js → chunk-HF5JU6H6.js} +7 -5
- package/{chunk-UTQZ73QQ.js → chunk-JSE3MHSM.js} +1 -1
- package/{chunk-DKRT67FG.js → chunk-KGEVMUMI.js} +3 -3
- package/{chunk-66O5MZYH.js → chunk-KVT5HYP4.js} +1 -1
- package/{chunk-56IUA7RU.js → chunk-L5K5RQSD.js} +1 -1
- package/{chunk-A4JDTA5T.js → chunk-LAXMH7JY.js} +6 -6
- package/chunk-MZWET5XZ.js +7889 -0
- package/{chunk-SZ5CBYMZ.js → chunk-O2C4C6KG.js} +2 -2
- package/{chunk-SWOTB2TX.js → chunk-OISWAB2K.js} +47 -33
- package/{chunk-2XM5KUNE.js → chunk-P554G7UT.js} +2 -2
- package/{chunk-GVKTKT3O.js → chunk-PDOJZ63B.js} +3 -3
- package/{chunk-L3VQOVKK.js → chunk-PDXNQKOK.js} +4 -4
- package/{chunk-CV6I4HBA.js → chunk-PTHDLIRB.js} +1 -1
- package/{chunk-T3Y5EMJS.js → chunk-SFWZUTCI.js} +1 -1
- package/{chunk-W2YKDXT7.js → chunk-T42XB7CG.js} +1 -1
- package/{chunk-XD5NQEOH.js → chunk-UDA3ZYLW.js} +1 -1
- package/{chunk-OYK7PA5U.js → chunk-UNTKW3PH.js} +6 -6
- package/{chunk-7CD24PU4.js → chunk-UPXS3PUC.js} +5 -5
- package/{chunk-YLADSPDU.js → chunk-V54H24CQ.js} +2 -2
- package/{chunk-UKC5HU2C.js → chunk-W4UIMWYV.js} +5 -5
- package/chunk-WJBS5LLH.js +5558 -0
- package/{chunk-DI6MXJK5.js → chunk-X4H5KOUK.js} +16 -14
- package/{chunk-KW47OSRJ.js → chunk-XAJUBTKJ.js} +50 -70
- package/{chunk-TJYWZ3LO.js → chunk-YHGHADBQ.js} +2 -2
- package/{chunk-BOL2D2JW.js → chunk-ZJ2WITOO.js} +2 -2
- package/{chunk-DWQNDGO7.js → chunk-ZJH3LKEW.js} +2 -2
- package/{createAgentAutomationAction-3GMH6ORX.js → createAgentAutomationAction-3IA4MYO3.js} +12 -11
- package/{createDialogAction-R5MCL4RE.js → createDialogAction-45X273ND.js} +13 -12
- package/{createPageAction-QYTG656R.js → createPageAction-2B2R7D77.js} +12 -11
- package/{db-IPCJ43PW.js → db-6DPSJ6WT.js} +4 -2
- package/{dbSlice-OBV7VFCF.js → dbSlice-BBL3PEVW.js} +5 -5
- package/{deleteFile-AC45HYSM.js → deleteFile-RJTEPOT4.js} +3 -3
- package/{dialogCommands-NUQGIXVZ.js → dialogCommands-5M2Z7QVJ.js} +24 -23
- package/{dialogSlice-CFDECXEU.js → dialogSlice-KYF3FAOK.js} +11 -11
- package/{docCreateCommands-UNFCXB5N.js → docCreateCommands-LBOVRLYF.js} +23 -22
- package/{docDeleteCommands-NG5IVKE5.js → docDeleteCommands-VK5GIBEA.js} +24 -23
- package/{docReadCommands-6J7MUUX6.js → docReadCommands-E3SQN6LN.js} +23 -22
- package/{docStore-MZZWJM4F.js → docStore-2RB2S465.js} +13 -12
- package/{docUpdateCommands-6AW3VZOX.js → docUpdateCommands-YF6YOQDR.js} +23 -22
- package/{getPricing-XQYSSVV6.js → getPricing-QO5TYNCK.js} +2 -2
- package/{handleSendMessageAction-IU2QNTLM.js → handleSendMessageAction-XCOWKRQF.js} +11 -11
- package/index.js +63 -63
- package/{localDialogRead-P72W2U2R.js → localDialogRead-3DBXVYXS.js} +1 -1
- package/{machineCommands-Z2QEWTHZ.js → machineCommands-75YQ7FO3.js} +33 -32
- package/{machineWsRunDispatch-SJTYHZHN.js → machineWsRunDispatch-NS37M6VP.js} +33 -32
- package/package.json +1 -1
- package/{read-QK7ZRX6G.js → read-64OQDO3I.js} +3 -3
- package/{readDocTool-EYDMVRBL.js → readDocTool-MXM3T6PE.js} +1 -1
- package/{readlineWorkspace-BGKPABK4.js → readlineWorkspace-MJMNMSOD.js} +37 -36
- package/{removeDialogAgentAction-TBW3UZJW.js → removeDialogAgentAction-NEKVAMSH.js} +7 -7
- package/{runAgentClientLoop-N3YDLTMS.js → runAgentClientLoop-JPLRHUUZ.js} +25 -24
- package/{setDialogExtraReferencesAction-Q3ANF2NR.js → setDialogExtraReferencesAction-WTOHQDIV.js} +6 -6
- package/{setPrimaryDialogAgentAction-FQ5R3EFJ.js → setPrimaryDialogAgentAction-LDJOYC4F.js} +7 -7
- package/{settingSlice-JKKV2T7O.js → settingSlice-4M37TN7V.js} +6 -6
- package/{spaceCommands-R6AEQNLG.js → spaceCommands-RNJYLPTF.js} +207 -25
- package/{spaceSlice-MCH7RLLP.js → spaceSlice-C4QIRTSA.js} +12 -11
- package/{streamAgentChatTurn-Q4U2CVMI.js → streamAgentChatTurn-TP7XSPS2.js} +30 -28
- package/{switchDialogAgentAction-QQGVE4SL.js → switchDialogAgentAction-XVWGKR2Z.js} +5 -5
- package/{tableCommands-PRJNWN6Q.js → tableCommands-RJZ3V4TF.js} +1 -1
- package/{tools-Y3UBLLYW.js → tools-N6DZQQXE.js} +20 -19
- package/{tuiSummaryLlmCaller-4474IBTI.js → tuiSummaryLlmCaller-LBL5NS77.js} +3 -3
- package/{updateDialogTitleAction-3J7GH67I.js → updateDialogTitleAction-ANZ4DQ5T.js} +15 -13
- package/chunk-THTAR67C.js +0 -16338
- package/chunk-VSTUQGLT.js +0 -4937
|
@@ -19,12 +19,12 @@ import {
|
|
|
19
19
|
parseAgentRunEvent,
|
|
20
20
|
t,
|
|
21
21
|
toolLabel
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-EUTKGPCR.js";
|
|
23
23
|
import {
|
|
24
24
|
createRunActivityTracker,
|
|
25
25
|
finalizeRunRecord,
|
|
26
26
|
spawnLocalBackgroundRun
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-7KNERA53.js";
|
|
28
28
|
import {
|
|
29
29
|
CliProviderQuotaError
|
|
30
30
|
} from "./chunk-JDSUTNYY.js";
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
normalizeAgentHandle,
|
|
39
39
|
readDbRecord,
|
|
40
40
|
resolveAgentRecordFromHybridStore
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-L5K5RQSD.js";
|
|
42
42
|
import {
|
|
43
43
|
NOLO_PROJECT_MANAGER_AGENT_KEY,
|
|
44
44
|
isLocalCliAgentKey
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
LOCAL_TURN_ABORTED_CODE,
|
|
59
59
|
readActionGate,
|
|
60
60
|
readCommandActionGatePayload
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-XAJUBTKJ.js";
|
|
62
62
|
import {
|
|
63
63
|
createThinkParserState,
|
|
64
64
|
flushThinkParser,
|
|
@@ -73,10 +73,10 @@ import {
|
|
|
73
73
|
} from "./chunk-PJY5AH5A.js";
|
|
74
74
|
import {
|
|
75
75
|
resolvePlatformAuthToken
|
|
76
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-UDA3ZYLW.js";
|
|
77
77
|
import {
|
|
78
78
|
formatAgentListCard
|
|
79
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-OISWAB2K.js";
|
|
80
80
|
import {
|
|
81
81
|
isGatewayHttpStatus
|
|
82
82
|
} from "./chunk-Z5MXSEOJ.js";
|
|
@@ -95,14 +95,14 @@ import {
|
|
|
95
95
|
chooseMemoryOwners,
|
|
96
96
|
loadMemoryCandidatesFromDb,
|
|
97
97
|
resolveAgentMemoryPolicy
|
|
98
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-HF5JU6H6.js";
|
|
99
99
|
import {
|
|
100
100
|
API_REPORTED_COST_MULTIPLIER,
|
|
101
101
|
DEFAULT_CONTEXT_WINDOW,
|
|
102
102
|
getModelContextWindow,
|
|
103
103
|
normalizeUsage,
|
|
104
104
|
parseUiAskChoiceContent
|
|
105
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-WJBS5LLH.js";
|
|
106
106
|
import {
|
|
107
107
|
clipCompactText
|
|
108
108
|
} from "./chunk-OB6FBSH3.js";
|
|
@@ -114,7 +114,7 @@ import {
|
|
|
114
114
|
} from "./chunk-DWLEOOGR.js";
|
|
115
115
|
import {
|
|
116
116
|
findModelConfig
|
|
117
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-2K4NDPT5.js";
|
|
118
118
|
import {
|
|
119
119
|
readPipeText,
|
|
120
120
|
spawnProcess
|
|
@@ -124,14 +124,14 @@ import {
|
|
|
124
124
|
} from "./chunk-A7GB5UGH.js";
|
|
125
125
|
import {
|
|
126
126
|
parsePositiveFiniteNumberOrFallback
|
|
127
|
-
} from "./chunk-
|
|
127
|
+
} from "./chunk-G5GVZAXF.js";
|
|
128
128
|
import {
|
|
129
129
|
asTrimmedLowercaseString
|
|
130
130
|
} from "./chunk-QSJ3HFEF.js";
|
|
131
131
|
import {
|
|
132
132
|
BUILTIN_NOLO_AGENT_KEY,
|
|
133
133
|
PUBLIC_DEEPSEEK_V4_FLASH_AGENT_KEY
|
|
134
|
-
} from "./chunk-
|
|
134
|
+
} from "./chunk-ZJH3LKEW.js";
|
|
135
135
|
import {
|
|
136
136
|
isLoopbackUrl
|
|
137
137
|
} from "./chunk-4SN6J65J.js";
|
|
@@ -3538,7 +3538,7 @@ function findCollapsedPasteSpanAt(buffer, pos, opts = {}) {
|
|
|
3538
3538
|
// packages/cli/client/agentRun.ts
|
|
3539
3539
|
import { ulid } from "ulid";
|
|
3540
3540
|
async function loadRunLocalAgentTurn() {
|
|
3541
|
-
const { runLocalAgentTurn } = await import("./agentRuntimeLocal-
|
|
3541
|
+
const { runLocalAgentTurn } = await import("./agentRuntimeLocal-DA4COW6A.js");
|
|
3542
3542
|
return runLocalAgentTurn;
|
|
3543
3543
|
}
|
|
3544
3544
|
async function resolveCurrentMachineId(options) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
clearCliLocalRuntimePreparedAgentCache
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-EUTKGPCR.js";
|
|
4
4
|
import {
|
|
5
5
|
getReadableCliDb
|
|
6
6
|
} from "./chunk-WFHXMLHZ.js";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
resolveAgentRecordFromHybridStore,
|
|
13
13
|
sanitizeAgentRecordForCliOutput,
|
|
14
14
|
writeAgentRecord
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-L5K5RQSD.js";
|
|
16
16
|
import {
|
|
17
17
|
resolveCliAgentKeyInput
|
|
18
18
|
} from "./chunk-K6QEHQZ3.js";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCliLocalRuntimeAdapter,
|
|
3
3
|
summarizeEndpoint
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-EUTKGPCR.js";
|
|
5
5
|
import {
|
|
6
6
|
runLocalAgentTurn
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-XAJUBTKJ.js";
|
|
8
8
|
import {
|
|
9
9
|
clipMultilineText
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-UNTKW3PH.js";
|
|
11
11
|
import {
|
|
12
12
|
resolveLocalRuntimeEnvFromPolicy
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-EKVRQQWQ.js";
|
|
14
14
|
import {
|
|
15
15
|
toErrorMessage
|
|
16
16
|
} from "./chunk-HNMXYYJR.js";
|
|
@@ -897,6 +897,44 @@ async function runAgentLogsCommand(args, deps) {
|
|
|
897
897
|
deps.output.write(content);
|
|
898
898
|
return 0;
|
|
899
899
|
}
|
|
900
|
+
var TERMINATE_GRACE_MS = 1e4;
|
|
901
|
+
var TERMINATE_POLL_MS = 250;
|
|
902
|
+
var TERMINATE_KILL_GRACE_MS = 5e3;
|
|
903
|
+
async function terminateRunProcess(record, initialSignal, deps) {
|
|
904
|
+
const pid = record.pid;
|
|
905
|
+
if (typeof pid !== "number" || pid <= 0) return true;
|
|
906
|
+
const kill = deps.kill ?? ((p, s) => {
|
|
907
|
+
process.kill(p, s);
|
|
908
|
+
});
|
|
909
|
+
const sleep = deps.sleep ?? ((ms) => new Promise((r) => setTimeout(r, ms)));
|
|
910
|
+
const nowMs = () => deps.now ? deps.now().getTime() : Date.now();
|
|
911
|
+
const signalGroup = (sig) => {
|
|
912
|
+
try {
|
|
913
|
+
if (process.platform !== "win32") {
|
|
914
|
+
kill(-pid, sig);
|
|
915
|
+
} else {
|
|
916
|
+
kill(pid, sig);
|
|
917
|
+
}
|
|
918
|
+
} catch {
|
|
919
|
+
}
|
|
920
|
+
};
|
|
921
|
+
if (isPidGone(pid, deps)) return true;
|
|
922
|
+
signalGroup(initialSignal);
|
|
923
|
+
if (initialSignal === "SIGTERM") {
|
|
924
|
+
const deadline = nowMs() + TERMINATE_GRACE_MS;
|
|
925
|
+
while (!isPidGone(pid, deps) && nowMs() < deadline) {
|
|
926
|
+
await sleep(TERMINATE_POLL_MS);
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
if (!isPidGone(pid, deps)) {
|
|
930
|
+
signalGroup("SIGKILL");
|
|
931
|
+
const killDeadline = nowMs() + TERMINATE_KILL_GRACE_MS;
|
|
932
|
+
while (!isPidGone(pid, deps) && nowMs() < killDeadline) {
|
|
933
|
+
await sleep(TERMINATE_POLL_MS);
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
return isPidGone(pid, deps);
|
|
937
|
+
}
|
|
900
938
|
async function runSignalCommand(args, signal, verb, deps) {
|
|
901
939
|
const target = args[0];
|
|
902
940
|
if (!target) {
|
|
@@ -915,23 +953,19 @@ async function runSignalCommand(args, signal, verb, deps) {
|
|
|
915
953
|
`);
|
|
916
954
|
return 1;
|
|
917
955
|
}
|
|
918
|
-
const
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
`);
|
|
926
|
-
} else {
|
|
927
|
-
deps.output.write(`Failed to ${verb} ${record.runId}: ${error}
|
|
928
|
-
`);
|
|
929
|
-
return 1;
|
|
930
|
-
}
|
|
956
|
+
const confirmed = await terminateRunProcess(record, signal, deps);
|
|
957
|
+
if (!confirmed) {
|
|
958
|
+
deps.output.write(
|
|
959
|
+
`Failed to ${verb} ${record.runId} (pid ${record.pid}): process still alive after SIGKILL.
|
|
960
|
+
`
|
|
961
|
+
);
|
|
962
|
+
return 1;
|
|
931
963
|
}
|
|
932
964
|
finalizeRunRecord(record.runId, { status: "killed" }, deps);
|
|
933
|
-
deps.output.write(
|
|
934
|
-
`)
|
|
965
|
+
deps.output.write(
|
|
966
|
+
`Stopped ${record.runId} (pid ${record.pid}): process group confirmed gone.
|
|
967
|
+
`
|
|
968
|
+
);
|
|
935
969
|
return 0;
|
|
936
970
|
}
|
|
937
971
|
async function runAgentStopCommand(args, deps) {
|
|
@@ -982,6 +1016,10 @@ export {
|
|
|
982
1016
|
runAgentPsCommand,
|
|
983
1017
|
runAgentStatusCommand,
|
|
984
1018
|
runAgentLogsCommand,
|
|
1019
|
+
TERMINATE_GRACE_MS,
|
|
1020
|
+
TERMINATE_POLL_MS,
|
|
1021
|
+
TERMINATE_KILL_GRACE_MS,
|
|
1022
|
+
terminateRunProcess,
|
|
985
1023
|
runAgentStopCommand,
|
|
986
1024
|
runAgentKillCommand
|
|
987
1025
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ANTIGRAVITY_CLOUD_CODE_BASE_URL,
|
|
3
3
|
isAntigravityOAuthAgent
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-YHGHADBQ.js";
|
|
5
5
|
import {
|
|
6
6
|
buildCurrentTimeBlock,
|
|
7
7
|
buildIdentityBlock,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
requiresBareImageUrl,
|
|
10
10
|
resolveToolGuidedSections,
|
|
11
11
|
toBareImageUrlMessages
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-UPXS3PUC.js";
|
|
13
13
|
import {
|
|
14
14
|
convertMessagesToResponsesInput,
|
|
15
15
|
preserveAgentStateFields
|
|
@@ -19,14 +19,14 @@ import {
|
|
|
19
19
|
isOpenAiResponsesModel,
|
|
20
20
|
resolvePlatformChatCompletionsEndpoint,
|
|
21
21
|
resolvePlatformResponsesEndpoint
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-UDA3ZYLW.js";
|
|
23
23
|
import {
|
|
24
24
|
MEMORY_USE_GUIDANCE,
|
|
25
25
|
wrapHistoricalSummaryWithReplayGuard
|
|
26
26
|
} from "./chunk-4PWB7JRR.js";
|
|
27
27
|
import {
|
|
28
28
|
waitForAbortableDelay
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-OISWAB2K.js";
|
|
30
30
|
import {
|
|
31
31
|
createDrainExhaustedResponse,
|
|
32
32
|
isCoreDrainingBody,
|
|
@@ -36,15 +36,15 @@ import {
|
|
|
36
36
|
} from "./chunk-Z5MXSEOJ.js";
|
|
37
37
|
import {
|
|
38
38
|
resolveBuiltinSkillPage
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-UNTKW3PH.js";
|
|
40
40
|
import {
|
|
41
41
|
estimateTokenCount,
|
|
42
42
|
shouldUseServerProxy
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-WJBS5LLH.js";
|
|
44
44
|
import {
|
|
45
45
|
createFileCredentialBroker,
|
|
46
46
|
fetchServerSyncedCredential
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-EKVRQQWQ.js";
|
|
48
48
|
import {
|
|
49
49
|
toErrorMessage
|
|
50
50
|
} from "./chunk-HNMXYYJR.js";
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
clampReasoningEffort,
|
|
53
53
|
getModelConfig,
|
|
54
54
|
isModelSupportReasoningEffort
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-2K4NDPT5.js";
|
|
56
56
|
import {
|
|
57
57
|
isDeepInfraKimiModel,
|
|
58
58
|
isFireworksKimiModel,
|
|
@@ -60,13 +60,13 @@ import {
|
|
|
60
60
|
} from "./chunk-CAENRKNJ.js";
|
|
61
61
|
import {
|
|
62
62
|
read
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-LAXMH7JY.js";
|
|
64
64
|
import {
|
|
65
65
|
asTrimmedLowercaseString
|
|
66
66
|
} from "./chunk-QSJ3HFEF.js";
|
|
67
67
|
import {
|
|
68
68
|
isAbortError
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-5RDLGLAP.js";
|
|
70
70
|
import {
|
|
71
71
|
API_ENDPOINTS
|
|
72
72
|
} from "./chunk-LCBAMY2M.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
updateContentTitle
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MZWET5XZ.js";
|
|
4
4
|
import {
|
|
5
5
|
require_date_fns
|
|
6
6
|
} from "./chunk-M76ECQRD.js";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
patch,
|
|
15
15
|
readAndWait
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-LAXMH7JY.js";
|
|
17
17
|
import {
|
|
18
18
|
asOptionalTrimmedString
|
|
19
19
|
} from "./chunk-G3SUCT4W.js";
|
|
@@ -367,7 +367,7 @@ async function saveDocState(arg, { dispatch, getState }) {
|
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
369
|
async function createDocState(args, thunkApi) {
|
|
370
|
-
const { createPageAction } = await import("./createPageAction-
|
|
370
|
+
const { createPageAction } = await import("./createPageAction-2B2R7D77.js");
|
|
371
371
|
return createPageAction(args, thunkApi);
|
|
372
372
|
}
|
|
373
373
|
function subscribe(listener) {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
selectCurrentServer
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-G5GVZAXF.js";
|
|
4
4
|
import {
|
|
5
5
|
patch
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-LAXMH7JY.js";
|
|
7
7
|
import {
|
|
8
8
|
selectIdentityToken
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-2IJAKBK2.js";
|
|
10
10
|
import {
|
|
11
11
|
getIsDesktopApp
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-5RDLGLAP.js";
|
|
13
13
|
|
|
14
14
|
// packages/ai/agent/cliChatClient.ts
|
|
15
15
|
function getCliChatRequestConfig(thunkApi) {
|
|
@@ -8,12 +8,12 @@ import {
|
|
|
8
8
|
patch,
|
|
9
9
|
remove,
|
|
10
10
|
write
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-LAXMH7JY.js";
|
|
12
12
|
import {
|
|
13
13
|
asyncThunkCreator,
|
|
14
14
|
buildCreateSlice,
|
|
15
15
|
getRuntimeServerContext
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-2IJAKBK2.js";
|
|
17
17
|
import {
|
|
18
18
|
createAgentKey,
|
|
19
19
|
toTrimmedString
|
|
@@ -583,7 +583,7 @@ var slice = createSliceWithThunks({
|
|
|
583
583
|
const overrides = {};
|
|
584
584
|
if (args.systemPromptOverride !== void 0) overrides.prompt = args.systemPromptOverride;
|
|
585
585
|
if (args.toolsOverride !== void 0) overrides.tools = args.toolsOverride;
|
|
586
|
-
const { _executeModel } = await import("./_executeModel-
|
|
586
|
+
const { _executeModel } = await import("./_executeModel-LW6XMEQD.js");
|
|
587
587
|
return _executeModel(
|
|
588
588
|
{
|
|
589
589
|
isStreaming: args.isStreaming ?? false,
|
|
@@ -604,7 +604,7 @@ var slice = createSliceWithThunks({
|
|
|
604
604
|
* - 循环直到无工具调用或触发其他运行时停止条件
|
|
605
605
|
*/
|
|
606
606
|
runAgent: create.asyncThunk(async (args, thunkApi) => {
|
|
607
|
-
const { runAgentClientLoop } = await import("./runAgentClientLoop-
|
|
607
|
+
const { runAgentClientLoop } = await import("./runAgentClientLoop-JPLRHUUZ.js");
|
|
608
608
|
const { content: loopContent, toolCallCount } = await runAgentClientLoop(
|
|
609
609
|
{
|
|
610
610
|
agentKey: args.agentKey,
|
|
@@ -620,7 +620,7 @@ var slice = createSliceWithThunks({
|
|
|
620
620
|
* 聊天轮次流式 Agent 调用
|
|
621
621
|
*/
|
|
622
622
|
streamAgentChatTurn: create.asyncThunk(async (args, thunkApi) => {
|
|
623
|
-
const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-
|
|
623
|
+
const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-TP7XSPS2.js");
|
|
624
624
|
return streamAgentChatTurnHandler(args, thunkApi);
|
|
625
625
|
}),
|
|
626
626
|
/**
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
refreshAntigravityOAuthToken,
|
|
5
5
|
refreshOpenAiCodexToken,
|
|
6
6
|
xaiRefresh
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-SFWZUTCI.js";
|
|
8
8
|
import {
|
|
9
9
|
ackRunRecord,
|
|
10
10
|
checkStaleRun,
|
|
@@ -15,8 +15,9 @@ import {
|
|
|
15
15
|
gcRunRecords,
|
|
16
16
|
queryRunRecords,
|
|
17
17
|
releaseRunRecordAck,
|
|
18
|
-
spawnLocalBackgroundRun
|
|
19
|
-
|
|
18
|
+
spawnLocalBackgroundRun,
|
|
19
|
+
terminateRunProcess
|
|
20
|
+
} from "./chunk-7KNERA53.js";
|
|
20
21
|
import {
|
|
21
22
|
CliProviderQuotaError,
|
|
22
23
|
executeCli
|
|
@@ -26,7 +27,7 @@ import {
|
|
|
26
27
|
} from "./chunk-WJRJDX2W.js";
|
|
27
28
|
import {
|
|
28
29
|
buildLocalAgentLookupKeys
|
|
29
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-KVT5HYP4.js";
|
|
30
31
|
import {
|
|
31
32
|
LOCAL_CODEX_AGENT_ID,
|
|
32
33
|
LOCAL_CODEX_AGENT_KEY,
|
|
@@ -53,7 +54,7 @@ import {
|
|
|
53
54
|
readOpenAiCompatibleSseCompletion,
|
|
54
55
|
resolveAgentNextAvailableAt,
|
|
55
56
|
resolveOpenAiCompatibleProviderConfig
|
|
56
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-W4UIMWYV.js";
|
|
57
58
|
import {
|
|
58
59
|
buildPlatformChatCompletionRequest,
|
|
59
60
|
canUsePlatformChatProvider,
|
|
@@ -63,7 +64,7 @@ import {
|
|
|
63
64
|
readSseDataValues,
|
|
64
65
|
resolvePlatformChatProviderConfig,
|
|
65
66
|
shouldUsePlatformChatProvider
|
|
66
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-65677FXQ.js";
|
|
67
68
|
import {
|
|
68
69
|
buildCliPrompt
|
|
69
70
|
} from "./chunk-ATNTHIZI.js";
|
|
@@ -73,25 +74,25 @@ import {
|
|
|
73
74
|
import {
|
|
74
75
|
inlineImageUrlsForCustomProvider,
|
|
75
76
|
prepareTools
|
|
76
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-T42XB7CG.js";
|
|
77
78
|
import {
|
|
78
79
|
inferCaptureIntent,
|
|
79
80
|
resolveHistoricalToolContentCap,
|
|
80
81
|
summarizeToolArguments
|
|
81
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-XAJUBTKJ.js";
|
|
82
83
|
import {
|
|
83
84
|
getAntigravityUserAgent,
|
|
84
85
|
isAntigravityOAuthAgent,
|
|
85
86
|
readAntigravityProjectId,
|
|
86
87
|
resolveAntigravityCloudCodeBaseUrl
|
|
87
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-YHGHADBQ.js";
|
|
88
89
|
import {
|
|
89
90
|
convertMessagesToResponsesInput,
|
|
90
91
|
toResponsesTools
|
|
91
92
|
} from "./chunk-D34RI6NI.js";
|
|
92
93
|
import {
|
|
93
94
|
resolvePlatformAuthToken
|
|
94
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-UDA3ZYLW.js";
|
|
95
96
|
import {
|
|
96
97
|
buildDialogFallbackTitleFromUserInput,
|
|
97
98
|
normalizeDialogTitle
|
|
@@ -103,7 +104,7 @@ import {
|
|
|
103
104
|
readXhsProfileFunctionSchema,
|
|
104
105
|
rememberMemoryFunctionSchema,
|
|
105
106
|
setTodoListFunc
|
|
106
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-OISWAB2K.js";
|
|
107
108
|
import {
|
|
108
109
|
createDrainExhaustedResponse,
|
|
109
110
|
isCoreDrainingBody,
|
|
@@ -127,13 +128,13 @@ import {
|
|
|
127
128
|
parseNoloWorkspaceToolArguments,
|
|
128
129
|
resolveAgentRequiredPackIds,
|
|
129
130
|
resolveRuntimeToolSurfaceForAgent
|
|
130
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-UNTKW3PH.js";
|
|
131
132
|
import {
|
|
132
133
|
applyTokenUsageToDayStats,
|
|
133
134
|
prepareTokenUsageData,
|
|
134
135
|
resolveBuiltinPlatformAgentConfig,
|
|
135
136
|
runKeyed
|
|
136
|
-
} from "./chunk-
|
|
137
|
+
} from "./chunk-WJBS5LLH.js";
|
|
137
138
|
import {
|
|
138
139
|
BUILTIN_TITLE_LLM_CONFIG,
|
|
139
140
|
clipCompactText
|
|
@@ -144,7 +145,7 @@ import {
|
|
|
144
145
|
resolveCurrentRunRuntimeToolPolicy,
|
|
145
146
|
resolveLocalWorkspaceExecutorOptionsFromPolicy,
|
|
146
147
|
resolveRequestedRuntimeToolNames
|
|
147
|
-
} from "./chunk-
|
|
148
|
+
} from "./chunk-EKVRQQWQ.js";
|
|
148
149
|
import {
|
|
149
150
|
createOAuthTokenStore,
|
|
150
151
|
isTokenExpired,
|
|
@@ -162,7 +163,7 @@ import {
|
|
|
162
163
|
} from "./chunk-DWLEOOGR.js";
|
|
163
164
|
import {
|
|
164
165
|
isAdaptiveThinkingModelId
|
|
165
|
-
} from "./chunk-
|
|
166
|
+
} from "./chunk-2K4NDPT5.js";
|
|
166
167
|
import {
|
|
167
168
|
isCompiledBinary,
|
|
168
169
|
parseUserIdFromAuthToken
|
|
@@ -175,7 +176,7 @@ import {
|
|
|
175
176
|
} from "./chunk-QSJ3HFEF.js";
|
|
176
177
|
import {
|
|
177
178
|
isSystemBuiltinTrustedAgentKey
|
|
178
|
-
} from "./chunk-
|
|
179
|
+
} from "./chunk-ZJH3LKEW.js";
|
|
179
180
|
import {
|
|
180
181
|
NOLO_CLUSTER_SERVERS
|
|
181
182
|
} from "./chunk-LCBAMY2M.js";
|
|
@@ -2713,12 +2714,19 @@ function createCliControlAgentRunExecutor(deps = {}) {
|
|
|
2713
2714
|
}
|
|
2714
2715
|
}
|
|
2715
2716
|
if (typeof record.pid === "number") {
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2717
|
+
const confirmed = await terminateRunProcess(record, "SIGTERM", deps);
|
|
2718
|
+
if (!confirmed) {
|
|
2719
|
+
return {
|
|
2720
|
+
content: JSON.stringify({
|
|
2721
|
+
runId: record.runId,
|
|
2722
|
+
found: true,
|
|
2723
|
+
status: record.status,
|
|
2724
|
+
stopConfirmed: false
|
|
2725
|
+
}),
|
|
2726
|
+
metadata: {
|
|
2727
|
+
displayData: `stop failed: process ${record.pid} still alive after SIGKILL`
|
|
2728
|
+
}
|
|
2729
|
+
};
|
|
2722
2730
|
}
|
|
2723
2731
|
}
|
|
2724
2732
|
finalizeRunRecord(record.runId, { status: "killed" }, deps);
|
|
@@ -3091,7 +3099,7 @@ function extractInlineDataParts(content) {
|
|
|
3091
3099
|
function convertOpenAiMessagesToGemini(messages, options) {
|
|
3092
3100
|
const contents = [];
|
|
3093
3101
|
const systemTexts = [];
|
|
3094
|
-
|
|
3102
|
+
let toolCallIndex = 0;
|
|
3095
3103
|
let pendingFunctionCalls = [];
|
|
3096
3104
|
const pushOrMergeContent = (role, parts) => {
|
|
3097
3105
|
if (parts.length === 0) return;
|
|
@@ -3105,8 +3113,12 @@ function convertOpenAiMessagesToGemini(messages, options) {
|
|
|
3105
3113
|
const flushPendingFunctionCalls = () => {
|
|
3106
3114
|
if (pendingFunctionCalls.length === 0) return;
|
|
3107
3115
|
const dummyResponses = pendingFunctionCalls.map(
|
|
3108
|
-
({ name }) => ({
|
|
3109
|
-
functionResponse: {
|
|
3116
|
+
({ name, id }) => ({
|
|
3117
|
+
functionResponse: {
|
|
3118
|
+
name,
|
|
3119
|
+
response: { output: "{}" },
|
|
3120
|
+
...id ? { id } : {}
|
|
3121
|
+
}
|
|
3110
3122
|
})
|
|
3111
3123
|
);
|
|
3112
3124
|
pendingFunctionCalls = [];
|
|
@@ -3144,16 +3156,14 @@ function convertOpenAiMessagesToGemini(messages, options) {
|
|
|
3144
3156
|
content
|
|
3145
3157
|
);
|
|
3146
3158
|
const toolCalls = "tool_calls" in raw && Array.isArray(raw.tool_calls) ? raw.tool_calls ?? [] : [];
|
|
3147
|
-
if (text) pushOrMergeContent("model", [{ text }]);
|
|
3148
|
-
if (toolCalls.length > 0 && contents.length > 0 && contents[contents.length - 1]?.role !== "user") {
|
|
3149
|
-
contents.push({ role: "user", parts: [{ text: "" }] });
|
|
3150
|
-
}
|
|
3151
3159
|
const parts = [];
|
|
3160
|
+
if (text) {
|
|
3161
|
+
parts.push({ text });
|
|
3162
|
+
}
|
|
3152
3163
|
for (const call of toolCalls) {
|
|
3153
3164
|
const name = call?.function?.name?.trim();
|
|
3154
3165
|
if (!name) continue;
|
|
3155
|
-
const id = call.id?.trim() || `${name}_${
|
|
3156
|
-
toolNamesById.set(id, name);
|
|
3166
|
+
const id = call.id?.trim() || `${name}_${toolCallIndex++}`;
|
|
3157
3167
|
pendingFunctionCalls.push({ name, id });
|
|
3158
3168
|
const realSignature = typeof call.thought_signature === "string" && call.thought_signature ? call.thought_signature : void 0;
|
|
3159
3169
|
const isFirstFunctionCallPart = !parts.some(
|
|
@@ -52,7 +52,7 @@ async function readDocFunc(args, thunkApi) {
|
|
|
52
52
|
throw new Error(`\u65E0\u6548\u7684\u9875\u9762 ID: ${id}\u3002\u9875\u9762 ID \u901A\u5E38\u4EE5 "page-" \u5F00\u5934\u3002`);
|
|
53
53
|
}
|
|
54
54
|
try {
|
|
55
|
-
const { readAction } = await import("./read-
|
|
55
|
+
const { readAction } = await import("./read-64OQDO3I.js");
|
|
56
56
|
const pageData = await readAction({ dbKey: id }, thunkApi);
|
|
57
57
|
if (!pageData) {
|
|
58
58
|
throw new Error(`\u672A\u627E\u5230 ID \u4E3A ${id} \u7684\u9875\u9762\u3002`);
|