nolo-cli 0.47.0-alpha.3 → 0.47.0-alpha.4
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-5PG6CUWD.js → _executeModel-4NLFAYUJ.js} +14 -12
- package/{agentDeleteCommand-SHSPQZHI.js → agentDeleteCommand-O5XR2A7X.js} +2 -2
- package/{agentEmailCommands-TNFWV6XO.js → agentEmailCommands-QXG4VPDL.js} +15 -12
- package/{agentListCommands-5QTNEYMQ.js → agentListCommands-NF75BYVM.js} +2 -2
- package/{agentMachineCommands-OENA64ZO.js → agentMachineCommands-KGOXL5IA.js} +6 -5
- package/{agentRecordCommands-JLN2EWGC.js → agentRecordCommands-MV6RBJU2.js} +15 -12
- package/{agentRunCommand-CQM7DINV.js → agentRunCommand-PGKXK34X.js} +15 -12
- package/{agentRuntimeLocal-ZKXYFLXI.js → agentRuntimeLocal-O6X4KCUS.js} +2 -2
- package/{agentSlice-NKFLP3RI.js → agentSlice-HM5KSZIO.js} +1 -1
- package/{appDeleteCommands-XYGAZIJX.js → appDeleteCommands-SZTC24KA.js} +2 -2
- package/{appDeployCommands-7T5CABRB.js → appDeployCommands-EAUHYRPF.js} +2 -2
- package/{appDeployStatusCommands-KTFQMRPZ.js → appDeployStatusCommands-K3AKGODG.js} +2 -2
- package/{appGetCommands-HOX2ULSV.js → appGetCommands-L56BQOH5.js} +2 -2
- package/{appListCommands-3SLCEHND.js → appListCommands-WTZKJM4T.js} +2 -2
- package/{chatQueueReduxAdapter-WMMBQK3Y.js → chatQueueReduxAdapter-Z7GK6NWM.js} +2 -2
- package/{chunk-RQSOAMPJ.js → chunk-3L2WKC3W.js} +12 -7
- package/{chunk-4ZNDBDWG.js → chunk-4RUHYZLJ.js} +2 -2
- package/chunk-5XTOKQLW.js +121 -0
- package/{chunk-5OUK7FZE.js → chunk-65NEZURC.js} +1 -1
- package/{chunk-IWUPQUWA.js → chunk-6H5FASZ4.js} +1 -1
- package/{chunk-MQRZ5QUH.js → chunk-ALXHV7NK.js} +4 -2
- package/{chunk-WPFNAEIW.js → chunk-B75HVLQU.js} +1 -1
- package/{chunk-MUIJYGYW.js → chunk-BPRFPWWC.js} +1 -1
- package/{chunk-G46DB6KG.js → chunk-BPYHNK6B.js} +2 -2
- package/{chunk-YNOGNUBC.js → chunk-CXCSIBWY.js} +73 -27
- package/{chunk-XMI3APSU.js → chunk-E5HL3EXN.js} +6 -6
- package/chunk-EADNWBAZ.js +59 -0
- package/{chunk-H2JQB6B6.js → chunk-EPSE5WQL.js} +2 -2
- package/{chunk-3N2KFW63.js → chunk-EUG45QJR.js} +43 -20
- package/{chunk-GYXN23QE.js → chunk-GEGFB75V.js} +15 -176
- package/{chunk-5BPZLBFB.js → chunk-KMWZ2MEG.js} +8 -6
- package/chunk-NF64D32W.js +8 -0
- package/{chunk-XLIHNL4X.js → chunk-T4P5XHZZ.js} +10 -8
- package/{chunk-FAWK6DBF.js → chunk-UVEH34NR.js} +8 -8
- package/{chunk-6LYUN76O.js → chunk-V7FV73B7.js} +3 -3
- package/{chunk-5PPFYHU2.js → chunk-WQDU7TFJ.js} +2 -2
- package/{chunk-5TNI2BMD.js → chunk-XXS34H5T.js} +3 -3
- package/{createAgentAutomationAction-ENDNA3Q4.js → createAgentAutomationAction-QWWQTQ2Q.js} +3 -3
- package/{createDialogAction-2KNX6S2D.js → createDialogAction-XDMNGRXN.js} +4 -4
- package/{createPageAction-SNBCYPK6.js → createPageAction-74TUIHWA.js} +3 -3
- package/{dialogCommands-COU5C635.js → dialogCommands-WPG6I2ZR.js} +6 -3
- package/{dialogSlice-RTPOD6EW.js → dialogSlice-YUVIK53X.js} +2 -2
- package/{docCreateCommands-JWY25UFB.js → docCreateCommands-3T6427C5.js} +2 -2
- package/{docDeleteCommands-BPJOCSX4.js → docDeleteCommands-6ZXYJWUC.js} +2 -2
- package/{docReadCommands-BSEZCYTQ.js → docReadCommands-3VVYJYXK.js} +2 -2
- package/{docStore-TYHVLU7G.js → docStore-4J3GA3JF.js} +4 -4
- package/{docUpdateCommands-S2IE2VV4.js → docUpdateCommands-Z3RO54Y7.js} +2 -2
- package/{handleSendMessageAction-QYXDQXGH.js → handleSendMessageAction-5H53O6P2.js} +2 -2
- package/index.js +40 -40
- package/{machineCommands-MHKXEUGC.js → machineCommands-3L465LNQ.js} +16 -13
- package/{machineWsRunDispatch-ZV736PJZ.js → machineWsRunDispatch-YOHDI23Y.js} +15 -12
- package/package.json +1 -1
- package/{readlineWorkspace-L3IFOIIV.js → readlineWorkspace-SQMRU5UF.js} +16 -13
- package/{runAgentClientLoop-GBLDVBT5.js → runAgentClientLoop-4Z2U3Y4R.js} +12 -10
- package/{spaceCommands-XOLPJMRK.js → spaceCommands-BH3JJ5NE.js} +2 -2
- package/{spaceSlice-OQPAGQDP.js → spaceSlice-R23R5VKL.js} +3 -3
- package/{streamAgentChatTurn-SN5XJJ7U.js → streamAgentChatTurn-L2NUEMDF.js} +13 -11
- package/{tools-Y65Y3CI4.js → tools-W7X3QSN2.js} +9 -7
- package/{updateDialogTitleAction-OAOP7CCE.js → updateDialogTitleAction-Y3NM74D7.js} +3 -3
|
@@ -5,6 +5,9 @@ import {
|
|
|
5
5
|
refreshOpenAiCodexToken,
|
|
6
6
|
xaiRefresh
|
|
7
7
|
} from "./chunk-I4JISVWK.js";
|
|
8
|
+
import {
|
|
9
|
+
defaultLoopbackRequest
|
|
10
|
+
} from "./chunk-EADNWBAZ.js";
|
|
8
11
|
import {
|
|
9
12
|
clearCredentialAvailability,
|
|
10
13
|
markCredentialUnavailable,
|
|
@@ -53,7 +56,7 @@ import {
|
|
|
53
56
|
import {
|
|
54
57
|
inlineImageUrlsForCustomProvider,
|
|
55
58
|
prepareTools
|
|
56
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-6H5FASZ4.js";
|
|
57
60
|
import {
|
|
58
61
|
getServerProviderSecret
|
|
59
62
|
} from "./chunk-HS7MLR74.js";
|
|
@@ -72,13 +75,11 @@ import {
|
|
|
72
75
|
rememberMemoryFunctionSchema,
|
|
73
76
|
resolveAgentRequiredPackIds,
|
|
74
77
|
setTodoListFunc
|
|
75
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-CXCSIBWY.js";
|
|
76
79
|
import {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
parseRetryAfterHeaderMs
|
|
81
|
-
} from "./chunk-RQSOAMPJ.js";
|
|
80
|
+
fetchWithTransientRetry,
|
|
81
|
+
isTransientFetchError
|
|
82
|
+
} from "./chunk-5XTOKQLW.js";
|
|
82
83
|
import {
|
|
83
84
|
TASK_PREVIEW_MAX,
|
|
84
85
|
formatListRunsCard,
|
|
@@ -97,13 +98,13 @@ import {
|
|
|
97
98
|
prepareTokenUsageData,
|
|
98
99
|
resolveBuiltinPlatformAgentConfig,
|
|
99
100
|
runKeyed
|
|
100
|
-
} from "./chunk-
|
|
101
|
+
} from "./chunk-UVEH34NR.js";
|
|
101
102
|
import {
|
|
102
103
|
BUILTIN_TITLE_LLM_CONFIG
|
|
103
104
|
} from "./chunk-EVBFYPDC.js";
|
|
104
105
|
import {
|
|
105
106
|
fetchServerSyncedCredential
|
|
106
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-V7FV73B7.js";
|
|
107
108
|
import {
|
|
108
109
|
require_date_fns
|
|
109
110
|
} from "./chunk-M76ECQRD.js";
|
|
@@ -142,7 +143,7 @@ import {
|
|
|
142
143
|
parseSyncServersEnv,
|
|
143
144
|
resolveOpenAiCompatibleProviderConfig,
|
|
144
145
|
summarizeToolArguments
|
|
145
|
-
} from "./chunk-
|
|
146
|
+
} from "./chunk-BPRFPWWC.js";
|
|
146
147
|
import {
|
|
147
148
|
buildPlatformChatCompletionRequest,
|
|
148
149
|
canUsePlatformChatProvider,
|
|
@@ -235,9 +236,6 @@ import {
|
|
|
235
236
|
import {
|
|
236
237
|
NOLO_CLUSTER_SERVERS
|
|
237
238
|
} from "./chunk-LCBAMY2M.js";
|
|
238
|
-
import {
|
|
239
|
-
isLoopbackHostname
|
|
240
|
-
} from "./chunk-4SN6J65J.js";
|
|
241
239
|
import {
|
|
242
240
|
normalizeServerOrigin
|
|
243
241
|
} from "./chunk-CF7PE763.js";
|
|
@@ -1474,164 +1472,6 @@ function isAnthropicOAuthAgent(agent) {
|
|
|
1474
1472
|
return agent.apiKeyRef?.trim().toLowerCase() === "claude";
|
|
1475
1473
|
}
|
|
1476
1474
|
|
|
1477
|
-
// packages/cli/client/localRuntimeFetchRetry.ts
|
|
1478
|
-
import { request as httpRequest } from "node:http";
|
|
1479
|
-
import { request as httpsRequest } from "node:https";
|
|
1480
|
-
var TRANSIENT_FETCH_MAX_ATTEMPTS = 3;
|
|
1481
|
-
var TRANSIENT_FETCH_RETRY_BASE_DELAY_MS = 250;
|
|
1482
|
-
var CORE_DRAINING_MAX_ATTEMPTS = 30;
|
|
1483
|
-
var RETRYABLE_HTTP_STATUSES = /* @__PURE__ */ new Set([429, 503]);
|
|
1484
|
-
function isTransientFetchError(error) {
|
|
1485
|
-
const message = toErrorMessage(error);
|
|
1486
|
-
return /certificate|handshake|network|socket|timed out|timeout|ECONNRESET/i.test(
|
|
1487
|
-
message
|
|
1488
|
-
);
|
|
1489
|
-
}
|
|
1490
|
-
async function defaultSleep(ms) {
|
|
1491
|
-
await new Promise((resolve) => setTimeout(resolve, ms));
|
|
1492
|
-
}
|
|
1493
|
-
function transientFetchRetryDelayMs(attempt) {
|
|
1494
|
-
return Math.min(attempt * TRANSIENT_FETCH_RETRY_BASE_DELAY_MS, 2e3);
|
|
1495
|
-
}
|
|
1496
|
-
var MAX_RETRY_DELAY_MS = 1e4;
|
|
1497
|
-
async function resolveRetryAfterMs(response, attempt) {
|
|
1498
|
-
const headerMs = parseRetryAfterHeaderMs(
|
|
1499
|
-
response.headers.get("retry-after")
|
|
1500
|
-
);
|
|
1501
|
-
if (headerMs !== null) {
|
|
1502
|
-
return Math.min(headerMs, MAX_RETRY_DELAY_MS);
|
|
1503
|
-
}
|
|
1504
|
-
try {
|
|
1505
|
-
const body = await response.clone().text();
|
|
1506
|
-
const parsed = JSON.parse(body);
|
|
1507
|
-
const ms = normalizeNonNegativeMs(parsed?.retryAfterMs, 0);
|
|
1508
|
-
if (ms > 0) return Math.min(ms, MAX_RETRY_DELAY_MS);
|
|
1509
|
-
} catch {
|
|
1510
|
-
}
|
|
1511
|
-
return transientFetchRetryDelayMs(attempt);
|
|
1512
|
-
}
|
|
1513
|
-
function isLoopbackUrl(input) {
|
|
1514
|
-
try {
|
|
1515
|
-
const target = typeof input === "string" || input instanceof URL ? new URL(String(input)) : new URL(input.url);
|
|
1516
|
-
return isLoopbackHostname(target.hostname);
|
|
1517
|
-
} catch {
|
|
1518
|
-
return false;
|
|
1519
|
-
}
|
|
1520
|
-
}
|
|
1521
|
-
function toNodeRequestBody(body) {
|
|
1522
|
-
if (typeof body === "string") return Buffer.from(body);
|
|
1523
|
-
if (body instanceof Uint8Array) return Buffer.from(body);
|
|
1524
|
-
if (body instanceof ArrayBuffer) return Buffer.from(body);
|
|
1525
|
-
return null;
|
|
1526
|
-
}
|
|
1527
|
-
async function defaultLoopbackRequest(input, init) {
|
|
1528
|
-
const target = typeof input === "string" || input instanceof URL ? new URL(String(input)) : new URL(input.url);
|
|
1529
|
-
const headers = new Headers(init?.headers);
|
|
1530
|
-
const body = toNodeRequestBody(init?.body);
|
|
1531
|
-
if (body && !headers.has("Content-Length")) {
|
|
1532
|
-
headers.set("Content-Length", String(body.byteLength));
|
|
1533
|
-
}
|
|
1534
|
-
return await new Promise((resolve, reject) => {
|
|
1535
|
-
const requestImpl = target.protocol === "https:" ? httpsRequest : httpRequest;
|
|
1536
|
-
const req = requestImpl(
|
|
1537
|
-
target,
|
|
1538
|
-
{
|
|
1539
|
-
method: init?.method ?? "GET",
|
|
1540
|
-
headers: Object.fromEntries(headers.entries())
|
|
1541
|
-
},
|
|
1542
|
-
(res) => {
|
|
1543
|
-
const chunks = [];
|
|
1544
|
-
res.on(
|
|
1545
|
-
"data",
|
|
1546
|
-
(chunk) => chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk))
|
|
1547
|
-
);
|
|
1548
|
-
res.on("end", () => {
|
|
1549
|
-
resolve(
|
|
1550
|
-
new Response(Buffer.concat(chunks), {
|
|
1551
|
-
status: res.statusCode ?? 500,
|
|
1552
|
-
headers: res.headers
|
|
1553
|
-
})
|
|
1554
|
-
);
|
|
1555
|
-
});
|
|
1556
|
-
}
|
|
1557
|
-
);
|
|
1558
|
-
req.on("error", reject);
|
|
1559
|
-
init?.signal?.addEventListener(
|
|
1560
|
-
"abort",
|
|
1561
|
-
() => {
|
|
1562
|
-
req.destroy(
|
|
1563
|
-
init.signal?.reason instanceof Error ? init.signal.reason : new Error("request aborted")
|
|
1564
|
-
);
|
|
1565
|
-
reject(init.signal?.reason ?? new Error("request aborted"));
|
|
1566
|
-
},
|
|
1567
|
-
{ once: true }
|
|
1568
|
-
);
|
|
1569
|
-
if (body) req.write(body);
|
|
1570
|
-
req.end();
|
|
1571
|
-
});
|
|
1572
|
-
}
|
|
1573
|
-
async function isCoreDrainingResponse(response) {
|
|
1574
|
-
if (response.status !== 503) return false;
|
|
1575
|
-
try {
|
|
1576
|
-
const body = await response.clone().json();
|
|
1577
|
-
return isCoreDrainingBody(body);
|
|
1578
|
-
} catch {
|
|
1579
|
-
return false;
|
|
1580
|
-
}
|
|
1581
|
-
}
|
|
1582
|
-
async function fetchWithTransientRetry(fetchImpl, input, init, options = {}) {
|
|
1583
|
-
const retryableStatuses = options.retryableStatuses ?? RETRYABLE_HTTP_STATUSES;
|
|
1584
|
-
const requestedMaxAttempts = Number(options.maxAttempts);
|
|
1585
|
-
const maxAttempts = Number.isFinite(requestedMaxAttempts) ? Math.min(100, Math.max(1, Math.floor(requestedMaxAttempts))) : TRANSIENT_FETCH_MAX_ATTEMPTS;
|
|
1586
|
-
const requestedCoreDrainingMaxAttempts = Number(options.coreDrainingMaxAttempts);
|
|
1587
|
-
const coreDrainingMaxAttempts = Number.isFinite(requestedCoreDrainingMaxAttempts) ? Math.min(100, Math.max(1, Math.floor(requestedCoreDrainingMaxAttempts))) : CORE_DRAINING_MAX_ATTEMPTS;
|
|
1588
|
-
const loopMaxAttempts = Math.max(maxAttempts, coreDrainingMaxAttempts);
|
|
1589
|
-
let lastError;
|
|
1590
|
-
for (let attempt = 1; attempt <= loopMaxAttempts; attempt += 1) {
|
|
1591
|
-
try {
|
|
1592
|
-
if (options.loopbackRequest && isLoopbackUrl(input)) {
|
|
1593
|
-
return await options.loopbackRequest(input, init);
|
|
1594
|
-
}
|
|
1595
|
-
const response = await fetchImpl(input, init);
|
|
1596
|
-
const retryableStatus = retryableStatuses.has(response.status) && !init?.signal?.aborted;
|
|
1597
|
-
const callerAllowsRetry = retryableStatus ? await options.shouldRetryResponse?.(response) ?? true : false;
|
|
1598
|
-
if (retryableStatus && callerAllowsRetry) {
|
|
1599
|
-
const coreDraining = await isCoreDrainingResponse(response);
|
|
1600
|
-
const attemptBudget = coreDraining ? coreDrainingMaxAttempts : maxAttempts;
|
|
1601
|
-
if (attempt < attemptBudget) {
|
|
1602
|
-
const delayMs = await resolveRetryAfterMs(response, attempt);
|
|
1603
|
-
options.onRetry?.({
|
|
1604
|
-
attempt: attempt + 1,
|
|
1605
|
-
maxAttempts: attemptBudget,
|
|
1606
|
-
delayMs
|
|
1607
|
-
});
|
|
1608
|
-
await (options.sleep ?? defaultSleep)(delayMs);
|
|
1609
|
-
continue;
|
|
1610
|
-
}
|
|
1611
|
-
if (coreDraining) {
|
|
1612
|
-
return createDrainExhaustedResponse(response);
|
|
1613
|
-
}
|
|
1614
|
-
}
|
|
1615
|
-
return response;
|
|
1616
|
-
} catch (error) {
|
|
1617
|
-
if (init?.signal?.aborted) throw error;
|
|
1618
|
-
if (!isTransientFetchError(error)) throw error;
|
|
1619
|
-
if (options.retryNetworkErrors === false) throw error;
|
|
1620
|
-
lastError = error;
|
|
1621
|
-
if (attempt < maxAttempts) {
|
|
1622
|
-
const delayMs = transientFetchRetryDelayMs(attempt);
|
|
1623
|
-
options.onRetry?.({
|
|
1624
|
-
attempt: attempt + 1,
|
|
1625
|
-
maxAttempts,
|
|
1626
|
-
delayMs
|
|
1627
|
-
});
|
|
1628
|
-
await (options.sleep ?? defaultSleep)(delayMs);
|
|
1629
|
-
}
|
|
1630
|
-
}
|
|
1631
|
-
}
|
|
1632
|
-
throw lastError;
|
|
1633
|
-
}
|
|
1634
|
-
|
|
1635
1475
|
// packages/cli/client/cliWorkspaceToolVariants.ts
|
|
1636
1476
|
function shouldUseDeclaredOnlyLocalWorkspaceTools(env) {
|
|
1637
1477
|
const value = env.NOLO_LOCAL_WORKSPACE_TOOLSET || env.NOLO_LOCAL_TOOLSET_MODE || "";
|
|
@@ -2836,7 +2676,7 @@ async function readSseEvents(response) {
|
|
|
2836
2676
|
return ev && !Array.isArray(ev) ? ev : null;
|
|
2837
2677
|
});
|
|
2838
2678
|
}
|
|
2839
|
-
var
|
|
2679
|
+
var defaultSleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
2840
2680
|
async function callCodexResponsesOnce(args, accountId) {
|
|
2841
2681
|
const fetchImpl = args.fetchImpl ?? fetch;
|
|
2842
2682
|
const identity = createCodexRequestIdentity();
|
|
@@ -2901,7 +2741,7 @@ async function fetchCodexResponsesCompletion(args) {
|
|
|
2901
2741
|
}
|
|
2902
2742
|
};
|
|
2903
2743
|
}
|
|
2904
|
-
const sleep = args.sleep ??
|
|
2744
|
+
const sleep = args.sleep ?? defaultSleep;
|
|
2905
2745
|
const requestedMaxAttempts = Number(args.maxAttempts);
|
|
2906
2746
|
const maxAttempts = Number.isFinite(requestedMaxAttempts) ? Math.min(10, Math.max(1, Math.floor(requestedMaxAttempts))) : CODEX_STREAM_MAX_ATTEMPTS;
|
|
2907
2747
|
let result = await callCodexResponsesOnce(args, accountId);
|
|
@@ -9561,7 +9401,7 @@ var BUSY_STREAM_RETRY_DELAY_MS = 1200;
|
|
|
9561
9401
|
function isBusyProviderStreamError(error) {
|
|
9562
9402
|
return BUSY_STREAM_ERROR_RE.test(toErrorMessage(error));
|
|
9563
9403
|
}
|
|
9564
|
-
async function
|
|
9404
|
+
async function defaultSleep2(ms) {
|
|
9565
9405
|
await new Promise((resolve) => setTimeout(resolve, ms));
|
|
9566
9406
|
}
|
|
9567
9407
|
function isRetryableProviderStreamError(error) {
|
|
@@ -9602,7 +9442,7 @@ function withProviderStreamRetry(provider, deps) {
|
|
|
9602
9442
|
}
|
|
9603
9443
|
if (isBusyProviderStreamError(error)) {
|
|
9604
9444
|
deps.activityReporter?.("\u670D\u52A1\u5668\u7D27\u5F20 \xB7 \u7A0D\u5019\u81EA\u52A8\u91CD\u8BD5");
|
|
9605
|
-
await (deps.sleep ??
|
|
9445
|
+
await (deps.sleep ?? defaultSleep2)(BUSY_STREAM_RETRY_DELAY_MS);
|
|
9606
9446
|
} else {
|
|
9607
9447
|
deps.activityReporter?.("\u4E0A\u6E38\u6D41\u4E2D\u65AD \xB7 \u81EA\u52A8\u91CD\u8BD5");
|
|
9608
9448
|
}
|
|
@@ -12417,7 +12257,6 @@ function createCliLocalRuntimeAdapter(deps) {
|
|
|
12417
12257
|
|
|
12418
12258
|
export {
|
|
12419
12259
|
clearCliLocalRuntimePreparedAgentCache,
|
|
12420
|
-
isTransientFetchError,
|
|
12421
12260
|
isSubtaskRun,
|
|
12422
12261
|
summarizeEndpoint,
|
|
12423
12262
|
isBuiltinNoloAgentRef,
|
|
@@ -10,14 +10,16 @@ import {
|
|
|
10
10
|
fetchAndSerializeTable,
|
|
11
11
|
resolveBuiltinSkillPage,
|
|
12
12
|
waitForAbortableDelay
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-CXCSIBWY.js";
|
|
14
|
+
import {
|
|
15
|
+
isGatewayHttpStatus
|
|
16
|
+
} from "./chunk-NF64D32W.js";
|
|
14
17
|
import {
|
|
15
18
|
createDrainExhaustedResponse,
|
|
16
19
|
isCoreDrainingBody,
|
|
17
|
-
isGatewayHttpStatus,
|
|
18
20
|
normalizeNonNegativeMs,
|
|
19
21
|
parseRetryAfterHeaderMs
|
|
20
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-3L2WKC3W.js";
|
|
21
23
|
import {
|
|
22
24
|
slateToSimplifiedMarkdown
|
|
23
25
|
} from "./chunk-FJHLA6SX.js";
|
|
@@ -26,13 +28,13 @@ import {
|
|
|
26
28
|
} from "./chunk-MEYIRKDN.js";
|
|
27
29
|
import {
|
|
28
30
|
fetchAndCacheMessages
|
|
29
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-UVEH34NR.js";
|
|
30
32
|
import {
|
|
31
33
|
shouldUseServerProxy
|
|
32
34
|
} from "./chunk-YYLHWIW6.js";
|
|
33
35
|
import {
|
|
34
36
|
fetchServerSyncedCredential
|
|
35
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-V7FV73B7.js";
|
|
36
38
|
import {
|
|
37
39
|
buildSkillGuidancePromptBlock,
|
|
38
40
|
extractRuntimePageCapabilities,
|
|
@@ -44,7 +46,7 @@ import {
|
|
|
44
46
|
buildRuntimeGuidanceBlocks,
|
|
45
47
|
normalizeChatCompletionsBodyForProvider,
|
|
46
48
|
resolveToolGuidedSections
|
|
47
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-BPYHNK6B.js";
|
|
48
50
|
import {
|
|
49
51
|
convertMessagesToResponsesInput,
|
|
50
52
|
getUsageRequestOptions,
|
|
@@ -16,11 +16,10 @@ import {
|
|
|
16
16
|
getCliLocale,
|
|
17
17
|
isBuiltinNoloAgentRef,
|
|
18
18
|
isSubtaskRun,
|
|
19
|
-
isTransientFetchError,
|
|
20
19
|
parseAgentRunEvent,
|
|
21
20
|
t,
|
|
22
21
|
toolLabel
|
|
23
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-GEGFB75V.js";
|
|
24
23
|
import {
|
|
25
24
|
getReadableCliDb
|
|
26
25
|
} from "./chunk-43CXXVJD.js";
|
|
@@ -53,10 +52,13 @@ import {
|
|
|
53
52
|
} from "./chunk-LTRXGFMS.js";
|
|
54
53
|
import {
|
|
55
54
|
formatAgentListCard
|
|
56
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-CXCSIBWY.js";
|
|
56
|
+
import {
|
|
57
|
+
isTransientFetchError
|
|
58
|
+
} from "./chunk-5XTOKQLW.js";
|
|
57
59
|
import {
|
|
58
60
|
isGatewayHttpStatus
|
|
59
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-NF64D32W.js";
|
|
60
62
|
import {
|
|
61
63
|
formatFinishedRunCard,
|
|
62
64
|
formatListRunsCard,
|
|
@@ -72,12 +74,12 @@ import {
|
|
|
72
74
|
chooseMemoryOwners,
|
|
73
75
|
loadMemoryCandidatesFromDb,
|
|
74
76
|
resolveAgentMemoryPolicy
|
|
75
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-4RUHYZLJ.js";
|
|
76
78
|
import {
|
|
77
79
|
API_REPORTED_COST_MULTIPLIER,
|
|
78
80
|
normalizeUsage,
|
|
79
81
|
parseUiAskChoiceContent
|
|
80
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-UVEH34NR.js";
|
|
81
83
|
import {
|
|
82
84
|
getDefaultCliLocalRuntimeDb
|
|
83
85
|
} from "./chunk-IA3A5373.js";
|
|
@@ -93,7 +95,7 @@ import {
|
|
|
93
95
|
LOCAL_TURN_ABORTED_CODE,
|
|
94
96
|
readActionGate,
|
|
95
97
|
readCommandActionGatePayload
|
|
96
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-BPRFPWWC.js";
|
|
97
99
|
import {
|
|
98
100
|
resolveAgentRuntimeConfigFromRecord
|
|
99
101
|
} from "./chunk-XO3G35OV.js";
|
|
@@ -5442,7 +5444,7 @@ function findCollapsedPasteSpanAt(buffer, pos, opts = {}) {
|
|
|
5442
5444
|
// packages/cli/client/agentRun.ts
|
|
5443
5445
|
import { ulid } from "ulid";
|
|
5444
5446
|
async function loadRunLocalAgentTurn() {
|
|
5445
|
-
const { runLocalAgentTurn } = await import("./agentRuntimeLocal-
|
|
5447
|
+
const { runLocalAgentTurn } = await import("./agentRuntimeLocal-O6X4KCUS.js");
|
|
5446
5448
|
return runLocalAgentTurn;
|
|
5447
5449
|
}
|
|
5448
5450
|
async function resolveCurrentMachineId(options) {
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from "./chunk-YYLHWIW6.js";
|
|
11
11
|
import {
|
|
12
12
|
runLlm
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-V7FV73B7.js";
|
|
14
14
|
import {
|
|
15
15
|
getApproxPricePerImage
|
|
16
16
|
} from "./chunk-AGGIDPCZ.js";
|
|
@@ -3584,7 +3584,7 @@ var messageSlice = createSliceWithThunks({
|
|
|
3584
3584
|
runtimeOptions: args.runtimeOptions
|
|
3585
3585
|
});
|
|
3586
3586
|
if (agentKeyToUse) {
|
|
3587
|
-
const { streamAgentChatTurn } = await import("./agentSlice-
|
|
3587
|
+
const { streamAgentChatTurn } = await import("./agentSlice-HM5KSZIO.js");
|
|
3588
3588
|
await dispatch(
|
|
3589
3589
|
streamAgentChatTurn({
|
|
3590
3590
|
agentKey: agentKeyToUse,
|
|
@@ -4848,7 +4848,7 @@ var deleteDialogThunk = async (payload, thunkApi) => {
|
|
|
4848
4848
|
}
|
|
4849
4849
|
if (isCurrentDialog) {
|
|
4850
4850
|
await thunkApi.dispatch(resetMsgs());
|
|
4851
|
-
const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-
|
|
4851
|
+
const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-YUVIK53X.js");
|
|
4852
4852
|
dispatch(clearPendingAttachments2());
|
|
4853
4853
|
}
|
|
4854
4854
|
return { dialogKey, isCurrentDialog, attachmentPlan };
|
|
@@ -4856,15 +4856,15 @@ var deleteDialogThunk = async (payload, thunkApi) => {
|
|
|
4856
4856
|
|
|
4857
4857
|
// packages/chat/dialog/dialogSlice.ts
|
|
4858
4858
|
var runCreateDialogAction = async (args, thunkApi) => {
|
|
4859
|
-
const { createDialogAction } = await import("./createDialogAction-
|
|
4859
|
+
const { createDialogAction } = await import("./createDialogAction-XDMNGRXN.js");
|
|
4860
4860
|
return createDialogAction(args, thunkApi);
|
|
4861
4861
|
};
|
|
4862
4862
|
var runCreateAgentAutomationAction = async (args, thunkApi) => {
|
|
4863
|
-
const { createAgentAutomationAction } = await import("./createAgentAutomationAction-
|
|
4863
|
+
const { createAgentAutomationAction } = await import("./createAgentAutomationAction-QWWQTQ2Q.js");
|
|
4864
4864
|
return createAgentAutomationAction(args, thunkApi);
|
|
4865
4865
|
};
|
|
4866
4866
|
var runUpdateDialogTitleAction = async (args, thunkApi) => {
|
|
4867
|
-
const { updateDialogTitleAction } = await import("./updateDialogTitleAction-
|
|
4867
|
+
const { updateDialogTitleAction } = await import("./updateDialogTitleAction-Y3NM74D7.js");
|
|
4868
4868
|
return updateDialogTitleAction(args, thunkApi);
|
|
4869
4869
|
};
|
|
4870
4870
|
var runAddDialogAgentAction = async (args, thunkApi) => {
|
|
@@ -4888,7 +4888,7 @@ var runSetDialogExtraReferencesAction = async (args, thunkApi) => {
|
|
|
4888
4888
|
return setDialogExtraReferencesAction(args, thunkApi);
|
|
4889
4889
|
};
|
|
4890
4890
|
var runHandleSendMessageAction = async (args, thunkApi) => {
|
|
4891
|
-
const { handleSendMessageAction } = await import("./handleSendMessageAction-
|
|
4891
|
+
const { handleSendMessageAction } = await import("./handleSendMessageAction-5H53O6P2.js");
|
|
4892
4892
|
return handleSendMessageAction(args, thunkApi);
|
|
4893
4893
|
};
|
|
4894
4894
|
function clearDialogState() {
|
|
@@ -4901,7 +4901,7 @@ var createPageAndAddReference = createAsyncThunk(
|
|
|
4901
4901
|
async (payload, { dispatch, getState, rejectWithValue }) => {
|
|
4902
4902
|
const { slateData, jsonData, title, type, fileId, groupId, dialogKey } = payload;
|
|
4903
4903
|
try {
|
|
4904
|
-
const { createDocState } = await import("./docStore-
|
|
4904
|
+
const { createDocState } = await import("./docStore-4J3GA3JF.js");
|
|
4905
4905
|
const pageKey = await createDocState(
|
|
4906
4906
|
{ slateData, title },
|
|
4907
4907
|
{ dispatch, getState }
|
|
@@ -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-4NLFAYUJ.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-4Z2U3Y4R.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-L2NUEMDF.js");
|
|
345
345
|
return streamAgentChatTurnHandler(args, thunkApi);
|
|
346
346
|
}),
|
|
347
347
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
updateContentTitle
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-EPSE5WQL.js";
|
|
4
4
|
import {
|
|
5
5
|
require_date_fns
|
|
6
6
|
} from "./chunk-M76ECQRD.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-74TUIHWA.js");
|
|
371
371
|
return createPageAction(args, thunkApi);
|
|
372
372
|
}
|
|
373
373
|
function subscribe(listener) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCliLocalRuntimeAdapter,
|
|
3
3
|
summarizeEndpoint
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-GEGFB75V.js";
|
|
5
5
|
import {
|
|
6
6
|
clipMultilineText
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-CXCSIBWY.js";
|
|
8
8
|
import {
|
|
9
9
|
runLocalAgentTurn
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-BPRFPWWC.js";
|
|
11
11
|
import {
|
|
12
12
|
resolveLocalRuntimeEnvFromPolicy
|
|
13
13
|
} from "./chunk-NQ4N4IGO.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addContentToSpace
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-EPSE5WQL.js";
|
|
4
|
+
import "./chunk-UVEH34NR.js";
|
|
5
5
|
import "./chunk-EVBFYPDC.js";
|
|
6
6
|
import "./chunk-H2G6JXTR.js";
|
|
7
7
|
import "./chunk-YYLHWIW6.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-V7FV73B7.js";
|
|
9
9
|
import "./chunk-AGGIDPCZ.js";
|
|
10
10
|
import "./chunk-HAPCUPEO.js";
|
|
11
11
|
import "./chunk-5RGU3J7P.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createDialogAction,
|
|
3
3
|
isLocalOwnerDialogAgents
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-4RUHYZLJ.js";
|
|
5
|
+
import "./chunk-EPSE5WQL.js";
|
|
6
|
+
import "./chunk-UVEH34NR.js";
|
|
7
7
|
import "./chunk-EVBFYPDC.js";
|
|
8
8
|
import "./chunk-H2G6JXTR.js";
|
|
9
9
|
import "./chunk-YYLHWIW6.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-V7FV73B7.js";
|
|
11
11
|
import "./chunk-AGGIDPCZ.js";
|
|
12
12
|
import "./chunk-HAPCUPEO.js";
|
|
13
13
|
import "./chunk-5RGU3J7P.js";
|
|
@@ -15,12 +15,12 @@ import {
|
|
|
15
15
|
addContentToSpace,
|
|
16
16
|
client_default,
|
|
17
17
|
getCurrentSpaceId
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-EPSE5WQL.js";
|
|
19
|
+
import "./chunk-UVEH34NR.js";
|
|
20
20
|
import "./chunk-EVBFYPDC.js";
|
|
21
21
|
import "./chunk-H2G6JXTR.js";
|
|
22
22
|
import "./chunk-YYLHWIW6.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-V7FV73B7.js";
|
|
24
24
|
import "./chunk-AGGIDPCZ.js";
|
|
25
25
|
import "./chunk-HAPCUPEO.js";
|
|
26
26
|
import "./chunk-5RGU3J7P.js";
|
|
@@ -10,23 +10,26 @@ import {
|
|
|
10
10
|
runDialogReadCommand,
|
|
11
11
|
runDialogStatusCommand,
|
|
12
12
|
sortDialogs
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-EUG45QJR.js";
|
|
14
14
|
import "./chunk-ID4G2MAR.js";
|
|
15
15
|
import "./chunk-Q24S4NDF.js";
|
|
16
|
+
import "./chunk-EADNWBAZ.js";
|
|
16
17
|
import "./chunk-DQLYEGP7.js";
|
|
17
18
|
import "./chunk-OYNDYVSE.js";
|
|
18
19
|
import "./chunk-EKLRRZIN.js";
|
|
20
|
+
import "./chunk-5XTOKQLW.js";
|
|
21
|
+
import "./chunk-3L2WKC3W.js";
|
|
19
22
|
import "./chunk-KQHGZWSV.js";
|
|
20
23
|
import "./chunk-H2G6JXTR.js";
|
|
21
24
|
import "./chunk-URMS4XY2.js";
|
|
22
25
|
import "./chunk-GLKOYSRU.js";
|
|
23
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-BPRFPWWC.js";
|
|
24
27
|
import "./chunk-AV2CELZZ.js";
|
|
25
28
|
import "./chunk-ZNFJWEN4.js";
|
|
26
29
|
import "./chunk-XO3G35OV.js";
|
|
27
30
|
import "./chunk-T27IEBNQ.js";
|
|
28
31
|
import "./chunk-N7J63Q6C.js";
|
|
29
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-BPYHNK6B.js";
|
|
30
33
|
import "./chunk-6BYAXNH5.js";
|
|
31
34
|
import "./chunk-5UOBIU5G.js";
|
|
32
35
|
import "./chunk-TNPCQNGQ.js";
|
|
@@ -20,11 +20,11 @@ import {
|
|
|
20
20
|
switchDialogAgent,
|
|
21
21
|
updateDialogTitle,
|
|
22
22
|
updateTokens
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-UVEH34NR.js";
|
|
24
24
|
import "./chunk-EVBFYPDC.js";
|
|
25
25
|
import "./chunk-H2G6JXTR.js";
|
|
26
26
|
import "./chunk-YYLHWIW6.js";
|
|
27
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-V7FV73B7.js";
|
|
28
28
|
import "./chunk-AGGIDPCZ.js";
|
|
29
29
|
import "./chunk-HAPCUPEO.js";
|
|
30
30
|
import {
|
|
@@ -28,13 +28,13 @@ import "./chunk-EKLRRZIN.js";
|
|
|
28
28
|
import "./chunk-VF4K2QE6.js";
|
|
29
29
|
import "./chunk-AETZ7AD6.js";
|
|
30
30
|
import "./chunk-KHCLMKZZ.js";
|
|
31
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-BPRFPWWC.js";
|
|
32
32
|
import "./chunk-AV2CELZZ.js";
|
|
33
33
|
import "./chunk-ZNFJWEN4.js";
|
|
34
34
|
import "./chunk-XO3G35OV.js";
|
|
35
35
|
import "./chunk-T27IEBNQ.js";
|
|
36
36
|
import "./chunk-N7J63Q6C.js";
|
|
37
|
-
import "./chunk-
|
|
37
|
+
import "./chunk-BPYHNK6B.js";
|
|
38
38
|
import "./chunk-6BYAXNH5.js";
|
|
39
39
|
import "./chunk-5UOBIU5G.js";
|
|
40
40
|
import "./chunk-TNPCQNGQ.js";
|
|
@@ -21,13 +21,13 @@ import "./chunk-KQHGZWSV.js";
|
|
|
21
21
|
import "./chunk-VF4K2QE6.js";
|
|
22
22
|
import "./chunk-AETZ7AD6.js";
|
|
23
23
|
import "./chunk-KHCLMKZZ.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-BPRFPWWC.js";
|
|
25
25
|
import "./chunk-AV2CELZZ.js";
|
|
26
26
|
import "./chunk-ZNFJWEN4.js";
|
|
27
27
|
import "./chunk-XO3G35OV.js";
|
|
28
28
|
import "./chunk-T27IEBNQ.js";
|
|
29
29
|
import "./chunk-N7J63Q6C.js";
|
|
30
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-BPYHNK6B.js";
|
|
31
31
|
import "./chunk-6BYAXNH5.js";
|
|
32
32
|
import "./chunk-5UOBIU5G.js";
|
|
33
33
|
import "./chunk-TNPCQNGQ.js";
|
|
@@ -16,13 +16,13 @@ import "./chunk-EKLRRZIN.js";
|
|
|
16
16
|
import "./chunk-VF4K2QE6.js";
|
|
17
17
|
import "./chunk-AETZ7AD6.js";
|
|
18
18
|
import "./chunk-KHCLMKZZ.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-BPRFPWWC.js";
|
|
20
20
|
import "./chunk-AV2CELZZ.js";
|
|
21
21
|
import "./chunk-ZNFJWEN4.js";
|
|
22
22
|
import "./chunk-XO3G35OV.js";
|
|
23
23
|
import "./chunk-T27IEBNQ.js";
|
|
24
24
|
import "./chunk-N7J63Q6C.js";
|
|
25
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-BPYHNK6B.js";
|
|
26
26
|
import "./chunk-6BYAXNH5.js";
|
|
27
27
|
import "./chunk-5UOBIU5G.js";
|
|
28
28
|
import "./chunk-TNPCQNGQ.js";
|