nolo-cli 0.103.0-alpha.2 → 0.104.0-alpha.2
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-3UCNJCQA.js → _executeModel-4W7C3ACS.js} +10 -10
- package/{agentDeleteCommand-2YAHAZFJ.js → agentDeleteCommand-YB3S2LPY.js} +1 -1
- package/{agentEmailCommands-WLYF3JRS.js → agentEmailCommands-AQZVMNLR.js} +10 -10
- package/{agentListCommands-JP7S7PT2.js → agentListCommands-3GWH4E4G.js} +3 -62
- package/{agentMachineCommands-HNGAR5GI.js → agentMachineCommands-R5AVYYN3.js} +2 -2
- package/{agentRecordCommands-SXFPW3DL.js → agentRecordCommands-JY4IWSSQ.js} +10 -10
- package/{agentRunCommand-JIQ4HY4D.js → agentRunCommand-7VTYZY3Q.js} +11 -10
- package/{agentRuntimeLocal-VXZSDIGT.js → agentRuntimeLocal-FRUE5P2V.js} +5 -1
- package/{agentSlice-SICQBMCM.js → agentSlice-6LBOYNKN.js} +1 -1
- package/{appDeleteCommands-32MHLR4L.js → appDeleteCommands-JPWTSFID.js} +1 -1
- package/{appDeployCommands-WCQOUSOB.js → appDeployCommands-YCVY2UYO.js} +1 -1
- package/{appDeployStatusCommands-6QKB7DYN.js → appDeployStatusCommands-JMCEIKTI.js} +1 -1
- package/{appGetCommands-SFAPP5PB.js → appGetCommands-EXWT3QAE.js} +1 -1
- package/{appListCommands-EKUBDRUO.js → appListCommands-PKRLSWRE.js} +1 -1
- package/{chatQueueReduxAdapter-HHMUDNXL.js → chatQueueReduxAdapter-WFROMKD3.js} +2 -2
- package/{chunk-XS5SWEDQ.js → chunk-2J5Y72GY.js} +1 -1
- package/{chunk-DNUUJ45N.js → chunk-3ZW5ZJMM.js} +2 -2
- package/{chunk-OZGZPSEG.js → chunk-A6FMKU7M.js} +1 -1
- package/chunk-BMQ2MJUK.js +153 -0
- package/{chunk-RSONHHPE.js → chunk-DJWMIXDZ.js} +2 -2
- package/{chunk-IONPPCL5.js → chunk-EEGDMATE.js} +65 -0
- package/{chunk-XVZ22N6C.js → chunk-FQUHIG5X.js} +8 -8
- package/{chunk-TQBHNYVR.js → chunk-H66KLASO.js} +8 -8
- package/{chunk-6VFARHZW.js → chunk-LC43IGO4.js} +291 -130
- package/{chunk-AGVEIAQA.js → chunk-NXUYQBDZ.js} +5 -5
- package/{chunk-LW4VFPAY.js → chunk-O7EBSHZR.js} +48 -8
- package/{chunk-F2RNI7ZR.js → chunk-RJ4QOQDA.js} +13 -5
- package/{chunk-CUQEXCAU.js → chunk-S6JLBH6Z.js} +1 -1
- package/{chunk-3WLK2JQ5.js → chunk-U3JZVWIB.js} +3 -3
- package/{chunk-4EG4QFTK.js → chunk-VLI5LVL5.js} +3 -3
- package/{chunk-B3TVQ6PI.js → chunk-W324THOB.js} +2 -2
- package/{chunk-3N3W7KBB.js → chunk-YY7I6GQ3.js} +3 -3
- package/{contentThunks-S4S7QPSO.js → contentThunks-LXOZUD2Y.js} +3 -3
- package/{createAgentAutomationAction-ODGL2YGP.js → createAgentAutomationAction-M5NDEIC6.js} +3 -3
- package/{createDialogAction-GFKRXTK4.js → createDialogAction-TDFOINOY.js} +4 -4
- package/{createPageAction-FBV3OWX7.js → createPageAction-WY5ZKP2M.js} +3 -3
- package/{dialogCommands-5J56DFWN.js → dialogCommands-YVMHDEOX.js} +1 -1
- package/{dialogSlice-LEO27SQG.js → dialogSlice-HSGREZGA.js} +2 -2
- package/{docCreateCommands-KYI2DC2U.js → docCreateCommands-7UTWDYJU.js} +1 -1
- package/{docDeleteCommands-67REUSRY.js → docDeleteCommands-GG6BJ4PS.js} +1 -1
- package/{docReadCommands-HOSVSBDJ.js → docReadCommands-QHMQVSLP.js} +1 -1
- package/{docStore-MNX5MHA5.js → docStore-IIS36NGG.js} +1 -1
- package/{docUpdateCommands-EMGCSMXY.js → docUpdateCommands-QPL6IVUK.js} +1 -1
- package/{handleSendMessageAction-YB6KQFJS.js → handleSendMessageAction-FEHCWMN2.js} +6 -48
- package/index.js +41 -41
- package/{machineCommands-7GVQCUAK.js → machineCommands-7DEUPY32.js} +10 -10
- package/{machineWsRunDispatch-XA7TD7Z7.js → machineWsRunDispatch-D2NHL3P7.js} +10 -10
- package/package.json +1 -1
- package/{readlineWorkspace-WA7JNI6J.js → readlineWorkspace-JP2AOALW.js} +26 -18
- package/{runAgentClientLoop-JGFQ6KIR.js → runAgentClientLoop-UY76PPZM.js} +8 -8
- package/{spaceCommands-NKJVJCQQ.js → spaceCommands-BMXKR7H6.js} +1 -1
- package/{streamAgentChatTurn-XLFZ66UC.js → streamAgentChatTurn-3YVIO4KE.js} +9 -9
- package/{tools-NF5AB34X.js → tools-Q6IBBG33.js} +6 -6
- package/{updateDialogTitleAction-6MBTD4UE.js → updateDialogTitleAction-GF5T3VMK.js} +3 -3
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
inlineImageUrlsForCustomProvider,
|
|
6
6
|
prepareTools,
|
|
7
7
|
shouldInlineImageUrlsForAgent
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-DJWMIXDZ.js";
|
|
9
9
|
import {
|
|
10
10
|
INVALID_TOOL_ARGS_REPLACEMENT,
|
|
11
11
|
buildInvalidToolCallSelfHealResult,
|
|
12
12
|
parseToolCallArguments,
|
|
13
13
|
performFetchRequest,
|
|
14
14
|
sanitizeOutboundMessages
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-U3JZVWIB.js";
|
|
16
16
|
import {
|
|
17
17
|
createSSEParser,
|
|
18
18
|
createToolRunId,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
toolRunSetPending,
|
|
24
24
|
toolRunStarted,
|
|
25
25
|
toolRunSucceeded
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-H66KLASO.js";
|
|
27
27
|
import {
|
|
28
28
|
getPublicImageAgentMode
|
|
29
29
|
} from "./chunk-VIDPVFP3.js";
|
|
@@ -35,10 +35,10 @@ import {
|
|
|
35
35
|
messageStreamEnd,
|
|
36
36
|
messageStreaming,
|
|
37
37
|
updateToolMessage
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-FQUHIG5X.js";
|
|
39
39
|
import {
|
|
40
40
|
streamAgentChatTurn
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-YY7I6GQ3.js";
|
|
42
42
|
import {
|
|
43
43
|
addActiveController,
|
|
44
44
|
removeActiveController,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
resolveLocalUserId,
|
|
28
28
|
t,
|
|
29
29
|
toolLabel
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-RJ4QOQDA.js";
|
|
31
31
|
import {
|
|
32
32
|
createRunActivityTracker,
|
|
33
33
|
popSingleQueueMessage,
|
|
@@ -64,7 +64,7 @@ import {
|
|
|
64
64
|
} from "./chunk-LTRXGFMS.js";
|
|
65
65
|
import {
|
|
66
66
|
formatAgentListCard
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-H66KLASO.js";
|
|
68
68
|
import {
|
|
69
69
|
isTransientFetchError
|
|
70
70
|
} from "./chunk-5UTFL4QJ.js";
|
|
@@ -80,16 +80,19 @@ import {
|
|
|
80
80
|
formatStopRunCard,
|
|
81
81
|
isAgentRunTerminalStatus
|
|
82
82
|
} from "./chunk-3VNWWVKB.js";
|
|
83
|
+
import {
|
|
84
|
+
extractGoogleValidationLink
|
|
85
|
+
} from "./chunk-BMQ2MJUK.js";
|
|
83
86
|
import {
|
|
84
87
|
buildMemorySubjectsForAgent,
|
|
85
88
|
chooseMemoryOwners,
|
|
86
89
|
loadMemoryCandidatesFromDb,
|
|
87
90
|
resolveAgentMemoryPolicy
|
|
88
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-3ZW5ZJMM.js";
|
|
89
92
|
import {
|
|
90
93
|
API_REPORTED_COST_MULTIPLIER,
|
|
91
94
|
parseUiAskChoiceContent
|
|
92
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-FQUHIG5X.js";
|
|
93
96
|
import {
|
|
94
97
|
isOAuthApiKeyRef
|
|
95
98
|
} from "./chunk-YYLHWIW6.js";
|
|
@@ -112,7 +115,7 @@ import {
|
|
|
112
115
|
LOCAL_AGENT_CONFIG_MISSING_CODE,
|
|
113
116
|
LOCAL_TURN_ABORTED_CODE,
|
|
114
117
|
readActionGate
|
|
115
|
-
} from "./chunk-
|
|
118
|
+
} from "./chunk-LC43IGO4.js";
|
|
116
119
|
import {
|
|
117
120
|
resolveAgentRuntimeConfigFromRecord
|
|
118
121
|
} from "./chunk-5H7KJX7J.js";
|
|
@@ -386,6 +389,24 @@ function styleCliText(text, style, enabled = resolveCliColorEnabled()) {
|
|
|
386
389
|
function dimCliText(text, enabled = resolveCliColorEnabled()) {
|
|
387
390
|
return styleCliText(text, "dim", enabled);
|
|
388
391
|
}
|
|
392
|
+
var OSC8_OPEN = "\x1B]8;;";
|
|
393
|
+
var OSC8_CLOSE = "\x1B\\";
|
|
394
|
+
function sanitizeHyperlinkLabel(label) {
|
|
395
|
+
return label.replace(/[\u0000-\u001f\u007f]/g, "");
|
|
396
|
+
}
|
|
397
|
+
function resolveCliHyperlinkEnabled(env = process.env, isTTY = Boolean(process.stdout.isTTY)) {
|
|
398
|
+
const setting = asTrimmedLowercaseString(env.NOLO_CLI_HYPERLINKS);
|
|
399
|
+
if (setting === "0" || setting === "false" || setting === "off") return false;
|
|
400
|
+
if (setting === "1" || setting === "true" || setting === "on") return true;
|
|
401
|
+
return isTTY;
|
|
402
|
+
}
|
|
403
|
+
function formatCliHyperlink(url, label, enabled = resolveCliHyperlinkEnabled()) {
|
|
404
|
+
if (!url) return label;
|
|
405
|
+
const safeLabel = sanitizeHyperlinkLabel(label);
|
|
406
|
+
if (!enabled) return `${safeLabel} (${url})`;
|
|
407
|
+
if (!safeLabel) return url;
|
|
408
|
+
return `${OSC8_OPEN}${url}${OSC8_CLOSE}${safeLabel}${OSC8_OPEN}${OSC8_CLOSE}`;
|
|
409
|
+
}
|
|
389
410
|
|
|
390
411
|
// node_modules/ansi-regex/index.js
|
|
391
412
|
function ansiRegex({ onlyFirst = false } = {}) {
|
|
@@ -620,8 +641,12 @@ function stringWidth(input, options = {}) {
|
|
|
620
641
|
|
|
621
642
|
// packages/cli/tui/tuiAnsi.ts
|
|
622
643
|
var ANSI_ESCAPE_REGEX = /\x1b\[[\x30-\x3f]*[\x20-\x2f]*[\x40-\x7e]/g;
|
|
644
|
+
var OSC8_HYPERLINK_REGEX = /\x1b\]8;;[^\x1b]*\x1b\\/g;
|
|
623
645
|
var ALL_ANSI_ESCAPE_REGEX = ansiRegex();
|
|
624
646
|
var FIRST_ANSI_ESCAPE_REGEX = ansiRegex({ onlyFirst: true });
|
|
647
|
+
function stripOsc8Hyperlinks(text) {
|
|
648
|
+
return text.replace(OSC8_HYPERLINK_REGEX, "");
|
|
649
|
+
}
|
|
625
650
|
function stripAnsi2(text) {
|
|
626
651
|
return text.replace(ANSI_ESCAPE_REGEX, "").replace(ALL_ANSI_ESCAPE_REGEX, "");
|
|
627
652
|
}
|
|
@@ -783,6 +808,7 @@ function visibleWidth(str) {
|
|
|
783
808
|
}
|
|
784
809
|
function truncateAnsi(text, maxWidth) {
|
|
785
810
|
if (maxWidth <= 0) return "";
|
|
811
|
+
text = stripOsc8Hyperlinks(text);
|
|
786
812
|
if (visibleWidth(text) <= maxWidth) return text;
|
|
787
813
|
let width = 0;
|
|
788
814
|
let out = "";
|
|
@@ -823,7 +849,7 @@ function countPhysicalLines(text, columns) {
|
|
|
823
849
|
const lines = text.split("\n");
|
|
824
850
|
let total = 0;
|
|
825
851
|
for (const line of lines) {
|
|
826
|
-
const width =
|
|
852
|
+
const width = visibleWidth(stripOsc8Hyperlinks(line));
|
|
827
853
|
total += Math.max(1, Math.ceil(width / columns));
|
|
828
854
|
}
|
|
829
855
|
return Math.max(total, 1);
|
|
@@ -10433,7 +10459,7 @@ function findCollapsedPasteSpanAt(buffer, pos, opts = {}) {
|
|
|
10433
10459
|
// packages/cli/client/agentRun.ts
|
|
10434
10460
|
import { ulid as ulid2 } from "ulid";
|
|
10435
10461
|
async function loadRunLocalAgentTurn() {
|
|
10436
|
-
const { runLocalAgentTurn } = await import("./agentRuntimeLocal-
|
|
10462
|
+
const { runLocalAgentTurn } = await import("./agentRuntimeLocal-FRUE5P2V.js");
|
|
10437
10463
|
return runLocalAgentTurn;
|
|
10438
10464
|
}
|
|
10439
10465
|
var stripDebugNoise = (s) => s.replace(/\s*raw="[\s\S]*"/g, "").replace(/\s*raw=\S+/g, "").replace(/\s*headers=\[[^\]]*\]/g, "").replace(/\s*headers=\S+/g, "").trim();
|
|
@@ -10760,7 +10786,21 @@ var SERVER_FALLBACK_HINT = "or use --server to run on the server explicitly.";
|
|
|
10760
10786
|
function buildAuthFailure(ctx) {
|
|
10761
10787
|
const platformNoToken = ctx.where === "server chat proxy" && isAuthNoTokenBody(ctx.message);
|
|
10762
10788
|
const fix = platformNoToken ? `This install is not logged in \u2014 run \`nolo login\`, or set AUTH_TOKEN / NOLO_SERVER` : ctx.where === "server chat proxy" ? `Check the agent's provider/api-key settings on nolo.chat` : `Fix the local credential/config and retry`;
|
|
10763
|
-
|
|
10789
|
+
const { url: validationUrl, text: validationText } = extractGoogleValidationLink(ctx.message);
|
|
10790
|
+
const validationLabel = validationText || "Verify your account";
|
|
10791
|
+
const validationHint = validationUrl ? `
|
|
10792
|
+
\u24D8 This provider requires a one-time account verification. Open this link in a browser signed into that account, then retry:
|
|
10793
|
+
${formatCliHyperlink(
|
|
10794
|
+
validationUrl,
|
|
10795
|
+
validationLabel
|
|
10796
|
+
)}` + // A 200-char Google url wraps on a narrow terminal, and a wrapped link
|
|
10797
|
+
// loses its hit area in several terminals — so even when the clickable
|
|
10798
|
+
// form is available, the raw url still gets its own copyable line. (In
|
|
10799
|
+
// the disabled path `label (url)` already carries it.)
|
|
10800
|
+
(resolveCliHyperlinkEnabled() ? `
|
|
10801
|
+
\u6216\u590D\u5236\u6B64\u94FE\u63A5: ${validationUrl}` : "") : "";
|
|
10802
|
+
return `${RUN_UNAVAILABLE_PREFIX} (${ctx.where} returned HTTP ${ctx.status}, auth rejected).${validationHint ? `${validationHint}
|
|
10803
|
+
` : " "}Detail: ${ctx.message} ${NO_FALLBACK} ${fix}, ${SERVER_FALLBACK_HINT}.
|
|
10764
10804
|
`;
|
|
10765
10805
|
}
|
|
10766
10806
|
function isAuthNoTokenBody(message) {
|
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
import {
|
|
62
62
|
inlineImageUrlsForCustomProvider,
|
|
63
63
|
prepareTools
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-DJWMIXDZ.js";
|
|
65
65
|
import {
|
|
66
66
|
getServerProviderSecret
|
|
67
67
|
} from "./chunk-HS7MLR74.js";
|
|
@@ -80,7 +80,7 @@ import {
|
|
|
80
80
|
rememberMemoryFunctionSchema,
|
|
81
81
|
resolveAgentRequiredPackIds,
|
|
82
82
|
setTodoListFunc
|
|
83
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-H66KLASO.js";
|
|
84
84
|
import {
|
|
85
85
|
fetchWithTransientRetry,
|
|
86
86
|
isTransientFetchError
|
|
@@ -109,14 +109,14 @@ import {
|
|
|
109
109
|
prepareTokenUsageData,
|
|
110
110
|
resolveBuiltinPlatformAgentConfig,
|
|
111
111
|
runKeyed
|
|
112
|
-
} from "./chunk-
|
|
112
|
+
} from "./chunk-FQUHIG5X.js";
|
|
113
113
|
import {
|
|
114
114
|
BUILTIN_DIALOG_LLM_CHAT_FALLBACK_MODEL,
|
|
115
115
|
BUILTIN_TITLE_LLM_CONFIG
|
|
116
116
|
} from "./chunk-MC4XLIJ7.js";
|
|
117
117
|
import {
|
|
118
118
|
fetchServerSyncedCredential
|
|
119
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-YY7I6GQ3.js";
|
|
120
120
|
import {
|
|
121
121
|
require_date_fns
|
|
122
122
|
} from "./chunk-M76ECQRD.js";
|
|
@@ -156,6 +156,7 @@ import {
|
|
|
156
156
|
executeOpenAiCompatibleChatCompletion,
|
|
157
157
|
fetchAntigravityCloudCodeCompletion,
|
|
158
158
|
filterRetainedLedgerRecords,
|
|
159
|
+
getAgentRuntimeToolParametersIndex,
|
|
159
160
|
internalListWorkspaceEntries,
|
|
160
161
|
internalSearchWorkspace,
|
|
161
162
|
isGemini3Model,
|
|
@@ -170,7 +171,7 @@ import {
|
|
|
170
171
|
resolveOpenAiCompatibleProviderConfig,
|
|
171
172
|
shouldUseGeminiNativeToolRoute,
|
|
172
173
|
summarizeToolArguments
|
|
173
|
-
} from "./chunk-
|
|
174
|
+
} from "./chunk-LC43IGO4.js";
|
|
174
175
|
import {
|
|
175
176
|
PlatformStreamInterruptedError,
|
|
176
177
|
buildPlatformChatCompletionRequest,
|
|
@@ -9313,6 +9314,8 @@ var resolveCursorTransport = async (ctx) => {
|
|
|
9313
9314
|
agentToolNames: activeAgentToolNames,
|
|
9314
9315
|
call,
|
|
9315
9316
|
executors: localToolExecutors,
|
|
9317
|
+
// 分发前参数闸门:与 host adapter 的 executeTool 同口径。
|
|
9318
|
+
toolParametersIndex: getAgentRuntimeToolParametersIndex(),
|
|
9316
9319
|
detachMs: resolveExecShellDetachMs(deps.env),
|
|
9317
9320
|
...deps.confirmDestructiveAction ? { confirmDestructiveAction: deps.confirmDestructiveAction } : {}
|
|
9318
9321
|
});
|
|
@@ -13448,6 +13451,11 @@ function createCliLocalRuntimeAdapter(deps) {
|
|
|
13448
13451
|
runToolNames: activeAgentToolNames,
|
|
13449
13452
|
call: injectedCall,
|
|
13450
13453
|
executors: localToolExecutors,
|
|
13454
|
+
// 分发前参数闸门:只覆盖 agent-runtime 工具族(workspace + nolo
|
|
13455
|
+
// workspace)。ai/tools registry 的工具不接——它们有各自的前置 policy
|
|
13456
|
+
// guard 与结构化结果契约(例:createTable 的 capture 确认守卫),
|
|
13457
|
+
// 闸门抢先拦截会覆盖这些语义(见 toolArgumentGate.ts 的范围说明)。
|
|
13458
|
+
toolParametersIndex: getAgentRuntimeToolParametersIndex(),
|
|
13451
13459
|
abortSignal: opts?.abortSignal,
|
|
13452
13460
|
detachMs: resolveExecShellDetachMs(deps.env),
|
|
13453
13461
|
...deps.confirmDestructiveAction ? { confirmDestructiveAction: deps.confirmDestructiveAction } : {}
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
clipMultilineText,
|
|
9
9
|
fetchAndSerializeTable
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-H66KLASO.js";
|
|
11
11
|
import {
|
|
12
12
|
isGatewayHttpStatus
|
|
13
13
|
} from "./chunk-NF64D32W.js";
|
|
@@ -28,13 +28,13 @@ import {
|
|
|
28
28
|
} from "./chunk-MEYIRKDN.js";
|
|
29
29
|
import {
|
|
30
30
|
fetchAndCacheMessages
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-FQUHIG5X.js";
|
|
32
32
|
import {
|
|
33
33
|
shouldUseServerProxy
|
|
34
34
|
} from "./chunk-YYLHWIW6.js";
|
|
35
35
|
import {
|
|
36
36
|
fetchServerSyncedCredential
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-YY7I6GQ3.js";
|
|
38
38
|
import {
|
|
39
39
|
buildSkillGuidancePromptBlock,
|
|
40
40
|
extractRuntimePageCapabilities,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCliLocalRuntimeAdapter,
|
|
3
3
|
summarizeEndpoint
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-RJ4QOQDA.js";
|
|
5
5
|
import {
|
|
6
6
|
clipMultilineText
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-H66KLASO.js";
|
|
8
8
|
import {
|
|
9
9
|
runLocalAgentTurn
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-LC43IGO4.js";
|
|
11
11
|
import {
|
|
12
12
|
applyToolSurfaceConstraints
|
|
13
13
|
} from "./chunk-IIVGDG4I.js";
|
|
@@ -326,7 +326,7 @@ async function saveDocState(arg, { dispatch, getState }) {
|
|
|
326
326
|
).unwrap();
|
|
327
327
|
if (dbSpaceId) {
|
|
328
328
|
try {
|
|
329
|
-
const { updateContentTitle } = await import("./contentThunks-
|
|
329
|
+
const { updateContentTitle } = await import("./contentThunks-LXOZUD2Y.js");
|
|
330
330
|
await dispatch(
|
|
331
331
|
updateContentTitle({
|
|
332
332
|
spaceId: dbSpaceId,
|
|
@@ -365,7 +365,7 @@ async function saveDocState(arg, { dispatch, getState }) {
|
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
367
|
async function createDocState(args, thunkApi) {
|
|
368
|
-
const { createPageAction } = await import("./createPageAction-
|
|
368
|
+
const { createPageAction } = await import("./createPageAction-WY5ZKP2M.js");
|
|
369
369
|
return createPageAction(args, thunkApi);
|
|
370
370
|
}
|
|
371
371
|
function subscribe(listener) {
|
|
@@ -304,7 +304,7 @@ var slice = createSliceWithThunks({
|
|
|
304
304
|
const overrides = {};
|
|
305
305
|
if (args.systemPromptOverride !== void 0) overrides.prompt = args.systemPromptOverride;
|
|
306
306
|
if (args.toolsOverride !== void 0) overrides.tools = args.toolsOverride;
|
|
307
|
-
const { _executeModel } = await import("./_executeModel-
|
|
307
|
+
const { _executeModel } = await import("./_executeModel-4W7C3ACS.js");
|
|
308
308
|
return _executeModel(
|
|
309
309
|
{
|
|
310
310
|
isStreaming: args.isStreaming ?? false,
|
|
@@ -325,7 +325,7 @@ var slice = createSliceWithThunks({
|
|
|
325
325
|
* - 循环直到无工具调用或触发其他运行时停止条件
|
|
326
326
|
*/
|
|
327
327
|
runAgent: create.asyncThunk(async (args, thunkApi) => {
|
|
328
|
-
const { runAgentClientLoop } = await import("./runAgentClientLoop-
|
|
328
|
+
const { runAgentClientLoop } = await import("./runAgentClientLoop-UY76PPZM.js");
|
|
329
329
|
const { content: loopContent, toolCallCount } = await runAgentClientLoop(
|
|
330
330
|
{
|
|
331
331
|
agentKey: args.agentKey,
|
|
@@ -341,7 +341,7 @@ var slice = createSliceWithThunks({
|
|
|
341
341
|
* 聊天轮次流式 Agent 调用
|
|
342
342
|
*/
|
|
343
343
|
streamAgentChatTurn: create.asyncThunk(async (args, thunkApi) => {
|
|
344
|
-
const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-
|
|
344
|
+
const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-3YVIO4KE.js");
|
|
345
345
|
return streamAgentChatTurnHandler(args, thunkApi);
|
|
346
346
|
}),
|
|
347
347
|
/**
|
|
@@ -7,14 +7,14 @@ import {
|
|
|
7
7
|
updateContentPinned,
|
|
8
8
|
updateContentTitle,
|
|
9
9
|
uploadAndAddFileToSpace
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-A6FMKU7M.js";
|
|
11
11
|
import "./chunk-ZJ7UHBJS.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-FQUHIG5X.js";
|
|
13
13
|
import "./chunk-MC4XLIJ7.js";
|
|
14
14
|
import "./chunk-3BMYXEUW.js";
|
|
15
15
|
import "./chunk-YYLHWIW6.js";
|
|
16
16
|
import "./chunk-AGGIDPCZ.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-YY7I6GQ3.js";
|
|
18
18
|
import "./chunk-TOP2VXOR.js";
|
|
19
19
|
import "./chunk-5RGU3J7P.js";
|
|
20
20
|
import "./chunk-6YTOJY35.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addContentToSpace
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-A6FMKU7M.js";
|
|
4
4
|
import "./chunk-ZJ7UHBJS.js";
|
|
5
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-FQUHIG5X.js";
|
|
6
6
|
import "./chunk-MC4XLIJ7.js";
|
|
7
7
|
import "./chunk-3BMYXEUW.js";
|
|
8
8
|
import "./chunk-YYLHWIW6.js";
|
|
9
9
|
import "./chunk-AGGIDPCZ.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-YY7I6GQ3.js";
|
|
11
11
|
import "./chunk-TOP2VXOR.js";
|
|
12
12
|
import "./chunk-5RGU3J7P.js";
|
|
13
13
|
import "./chunk-6YTOJY35.js";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createDialogAction,
|
|
3
3
|
isLocalOwnerDialogAgents
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-3ZW5ZJMM.js";
|
|
5
|
+
import "./chunk-A6FMKU7M.js";
|
|
6
6
|
import "./chunk-ZJ7UHBJS.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-FQUHIG5X.js";
|
|
8
8
|
import "./chunk-MC4XLIJ7.js";
|
|
9
9
|
import "./chunk-3BMYXEUW.js";
|
|
10
10
|
import "./chunk-YYLHWIW6.js";
|
|
11
11
|
import "./chunk-AGGIDPCZ.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-YY7I6GQ3.js";
|
|
13
13
|
import "./chunk-TOP2VXOR.js";
|
|
14
14
|
import "./chunk-5RGU3J7P.js";
|
|
15
15
|
import "./chunk-6YTOJY35.js";
|
|
@@ -14,16 +14,16 @@ import {
|
|
|
14
14
|
import {
|
|
15
15
|
addContentToSpace,
|
|
16
16
|
client_default
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-A6FMKU7M.js";
|
|
18
18
|
import {
|
|
19
19
|
getCurrentSpaceId
|
|
20
20
|
} from "./chunk-ZJ7UHBJS.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-FQUHIG5X.js";
|
|
22
22
|
import "./chunk-MC4XLIJ7.js";
|
|
23
23
|
import "./chunk-3BMYXEUW.js";
|
|
24
24
|
import "./chunk-YYLHWIW6.js";
|
|
25
25
|
import "./chunk-AGGIDPCZ.js";
|
|
26
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-YY7I6GQ3.js";
|
|
27
27
|
import "./chunk-TOP2VXOR.js";
|
|
28
28
|
import "./chunk-5RGU3J7P.js";
|
|
29
29
|
import "./chunk-6YTOJY35.js";
|
|
@@ -24,7 +24,7 @@ import "./chunk-KQHGZWSV.js";
|
|
|
24
24
|
import "./chunk-3BMYXEUW.js";
|
|
25
25
|
import "./chunk-URMS4XY2.js";
|
|
26
26
|
import "./chunk-GLKOYSRU.js";
|
|
27
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-LC43IGO4.js";
|
|
28
28
|
import "./chunk-ZCYXJSTU.js";
|
|
29
29
|
import "./chunk-Q5FJJ6XI.js";
|
|
30
30
|
import "./chunk-ZNFJWEN4.js";
|
|
@@ -20,12 +20,12 @@ import {
|
|
|
20
20
|
switchDialogAgent,
|
|
21
21
|
updateDialogTitle,
|
|
22
22
|
updateTokens
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-FQUHIG5X.js";
|
|
24
24
|
import "./chunk-MC4XLIJ7.js";
|
|
25
25
|
import "./chunk-3BMYXEUW.js";
|
|
26
26
|
import "./chunk-YYLHWIW6.js";
|
|
27
27
|
import "./chunk-AGGIDPCZ.js";
|
|
28
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-YY7I6GQ3.js";
|
|
29
29
|
import "./chunk-TOP2VXOR.js";
|
|
30
30
|
import {
|
|
31
31
|
getActiveDialogAgentId
|
|
@@ -28,7 +28,7 @@ import "./chunk-SV5IJK6K.js";
|
|
|
28
28
|
import "./chunk-VF4K2QE6.js";
|
|
29
29
|
import "./chunk-Q554LLSI.js";
|
|
30
30
|
import "./chunk-KHCLMKZZ.js";
|
|
31
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-LC43IGO4.js";
|
|
32
32
|
import "./chunk-ZCYXJSTU.js";
|
|
33
33
|
import "./chunk-Q5FJJ6XI.js";
|
|
34
34
|
import "./chunk-ZNFJWEN4.js";
|
|
@@ -21,7 +21,7 @@ import "./chunk-KQHGZWSV.js";
|
|
|
21
21
|
import "./chunk-VF4K2QE6.js";
|
|
22
22
|
import "./chunk-Q554LLSI.js";
|
|
23
23
|
import "./chunk-KHCLMKZZ.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-LC43IGO4.js";
|
|
25
25
|
import "./chunk-ZCYXJSTU.js";
|
|
26
26
|
import "./chunk-Q5FJJ6XI.js";
|
|
27
27
|
import "./chunk-ZNFJWEN4.js";
|
|
@@ -16,7 +16,7 @@ import "./chunk-SV5IJK6K.js";
|
|
|
16
16
|
import "./chunk-VF4K2QE6.js";
|
|
17
17
|
import "./chunk-Q554LLSI.js";
|
|
18
18
|
import "./chunk-KHCLMKZZ.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-LC43IGO4.js";
|
|
20
20
|
import "./chunk-ZCYXJSTU.js";
|
|
21
21
|
import "./chunk-Q5FJJ6XI.js";
|
|
22
22
|
import "./chunk-ZNFJWEN4.js";
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
resolvePageSkillMetadata
|
|
31
31
|
} from "./chunk-Q554LLSI.js";
|
|
32
32
|
import "./chunk-KHCLMKZZ.js";
|
|
33
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-LC43IGO4.js";
|
|
34
34
|
import "./chunk-ZCYXJSTU.js";
|
|
35
35
|
import "./chunk-Q5FJJ6XI.js";
|
|
36
36
|
import "./chunk-ZNFJWEN4.js";
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
scanValidationDetails
|
|
3
|
+
} from "./chunk-BMQ2MJUK.js";
|
|
1
4
|
import {
|
|
2
5
|
waitForAbortableDelay
|
|
3
6
|
} from "./chunk-N4G4PKQ6.js";
|
|
@@ -6,14 +9,14 @@ import {
|
|
|
6
9
|
prepareAndPersistUserMessage,
|
|
7
10
|
resolveHandleSendMessageContext,
|
|
8
11
|
selectAllMsgs
|
|
9
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-FQUHIG5X.js";
|
|
10
13
|
import "./chunk-MC4XLIJ7.js";
|
|
11
14
|
import "./chunk-3BMYXEUW.js";
|
|
12
15
|
import "./chunk-YYLHWIW6.js";
|
|
13
16
|
import "./chunk-AGGIDPCZ.js";
|
|
14
17
|
import {
|
|
15
18
|
streamAgentChatTurn
|
|
16
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-YY7I6GQ3.js";
|
|
17
20
|
import "./chunk-TOP2VXOR.js";
|
|
18
21
|
import "./chunk-5RGU3J7P.js";
|
|
19
22
|
import {
|
|
@@ -90,21 +93,6 @@ function asRecord(value) {
|
|
|
90
93
|
function asString(value) {
|
|
91
94
|
return typeof value === "string" && value.length > 0 ? value : void 0;
|
|
92
95
|
}
|
|
93
|
-
function sanitizeSafeUrl(rawUrl) {
|
|
94
|
-
if (typeof rawUrl !== "string") return void 0;
|
|
95
|
-
const trimmed = rawUrl.trim();
|
|
96
|
-
if (/^https?:\/\//i.test(trimmed)) {
|
|
97
|
-
try {
|
|
98
|
-
const parsed = new URL(trimmed);
|
|
99
|
-
if (parsed.protocol === "http:" || parsed.protocol === "https:") {
|
|
100
|
-
return trimmed;
|
|
101
|
-
}
|
|
102
|
-
} catch {
|
|
103
|
-
return void 0;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
return void 0;
|
|
107
|
-
}
|
|
108
96
|
function extractFullErrorText(error) {
|
|
109
97
|
if (!error) return "Unknown error";
|
|
110
98
|
if (typeof error === "string") return error;
|
|
@@ -126,37 +114,7 @@ function extractFullErrorText(error) {
|
|
|
126
114
|
return error?.message || error?.error || String(error);
|
|
127
115
|
}
|
|
128
116
|
function collectValidationFromDetails(details) {
|
|
129
|
-
|
|
130
|
-
let url;
|
|
131
|
-
let text;
|
|
132
|
-
let learnMoreUrl;
|
|
133
|
-
for (const detail of details) {
|
|
134
|
-
const rec = asRecord(detail);
|
|
135
|
-
if (!rec) continue;
|
|
136
|
-
const metadata = asRecord(rec.metadata);
|
|
137
|
-
if (metadata) {
|
|
138
|
-
url = url ?? sanitizeSafeUrl(metadata.validation_url);
|
|
139
|
-
text = text ?? asString(metadata.validation_url_link_text);
|
|
140
|
-
learnMoreUrl = learnMoreUrl ?? sanitizeSafeUrl(metadata.validation_learn_more_url);
|
|
141
|
-
}
|
|
142
|
-
const help = asRecord(rec);
|
|
143
|
-
if (Array.isArray(help.links)) {
|
|
144
|
-
for (const link of help.links) {
|
|
145
|
-
const linkRec = asRecord(link);
|
|
146
|
-
if (!linkRec) continue;
|
|
147
|
-
const linkUrl = sanitizeSafeUrl(linkRec.url);
|
|
148
|
-
if (!linkUrl) continue;
|
|
149
|
-
const desc = asString(linkRec.description);
|
|
150
|
-
if (!url && desc && /verify|continue/i.test(desc)) {
|
|
151
|
-
url = linkUrl;
|
|
152
|
-
text = desc;
|
|
153
|
-
} else if (!learnMoreUrl && /learn more/i.test(desc ?? "")) {
|
|
154
|
-
learnMoreUrl = linkUrl;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
return { url, text, learnMoreUrl };
|
|
117
|
+
return scanValidationDetails(details);
|
|
160
118
|
}
|
|
161
119
|
function resolveErrorStage(errorText) {
|
|
162
120
|
if (/127\.0\.0\.1:3233|localhost:3233|desktop daemon|desktop agent runtime|runDesktopAgentRuntime|Local turn stream/i.test(
|