nolo-cli 0.67.0 → 0.68.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-C5K4UL5I.js → _executeModel-XCNYHC6S.js} +13 -13
- package/{agentDeleteCommand-7RESZDRC.js → agentDeleteCommand-Z3DTLQEG.js} +5 -5
- package/{agentEmailCommands-KES5FG2E.js → agentEmailCommands-DFK2MIXR.js} +14 -14
- package/{agentListCommands-VFBLREFU.js → agentListCommands-FSX7RY7U.js} +5 -5
- package/{agentMachineCommands-UJ77TKWZ.js → agentMachineCommands-FYPV45TJ.js} +6 -6
- package/{agentRecordCommands-MZBPYUGL.js → agentRecordCommands-SXOCVBX7.js} +14 -14
- package/{agentRunCommand-R3RWG53B.js → agentRunCommand-XISX4ICI.js} +14 -14
- package/{agentRuntimeLocal-BD7R3OJL.js → agentRuntimeLocal-2ENB2B2Z.js} +5 -5
- package/{agentSlice-UP66DIC2.js → agentSlice-QLZWET7H.js} +1 -1
- package/{appDeleteCommands-X3UF4ZHF.js → appDeleteCommands-XKAUWKUI.js} +5 -5
- package/{appDeployCommands-MFHLJIYZ.js → appDeployCommands-SNXZY5IX.js} +5 -5
- package/{appDeployStatusCommands-BGXSUHY6.js → appDeployStatusCommands-NXUJ6LXS.js} +5 -5
- package/{appGetCommands-KEA6FZTF.js → appGetCommands-DNRYKGOK.js} +5 -5
- package/{appListCommands-CZGMZW3L.js → appListCommands-URESGUKU.js} +5 -5
- package/{chatQueueReduxAdapter-VVXE2NXW.js → chatQueueReduxAdapter-FNXZNIAT.js} +4 -4
- package/{chunk-HQ3ZLBSI.js → chunk-2XENHR3P.js} +96 -0
- package/{chunk-TDTSQVDX.js → chunk-3E67YXGD.js} +85 -88
- package/{chunk-RCNQCXPM.js → chunk-5JTJG4OG.js} +115 -121
- package/{chunk-MN2XJEWL.js → chunk-7NG5APVZ.js} +16 -133
- package/{chunk-UZXOOSHF.js → chunk-AUA5DTWI.js} +15 -14
- package/{chunk-HPRMNGAM.js → chunk-IX6H4NKR.js} +1 -1
- package/{chunk-UBWLW3KY.js → chunk-IY2BLZKO.js} +3 -3
- package/{chunk-5DUAG5G7.js → chunk-K4326DRU.js} +202 -11729
- package/{chunk-AVJQ4TDL.js → chunk-K5YS7FAN.js} +1 -1
- package/{chunk-TTTW4DIT.js → chunk-LNOW66U4.js} +6 -6
- package/{chunk-NFTTUZ3L.js → chunk-LTLZPAO7.js} +1 -1
- package/{chunk-QPXRNDI3.js → chunk-MIN5X7GI.js} +2 -2
- package/{chunk-OHJWIXXW.js → chunk-RLZ6HZSX.js} +3 -3
- package/{chunk-BG7ZGBKH.js → chunk-SM4ED2LZ.js} +4 -4
- package/{chunk-FPT2E44F.js → chunk-VHADFQCI.js} +2 -2
- package/{chunk-UNAVSDC5.js → chunk-XHNOCBUU.js} +4 -2
- package/chunk-XNO3T6RB.js +18504 -0
- package/chunk-Z6S2JBE4.js +2471 -0
- package/{chunk-M3HN7RBV.js → chunk-ZCVO2HLZ.js} +1 -1
- package/{contentThunks-BHML6O7K.js → contentThunks-6K4RZXKH.js} +5 -5
- package/{createAgentAutomationAction-K5YJO4IA.js → createAgentAutomationAction-6XYIZ3GS.js} +5 -5
- package/{createDialogAction-SFMZLPS4.js → createDialogAction-TJWDXAKL.js} +6 -6
- package/{createPageAction-UD7BSFQS.js → createPageAction-EZ2LPB6K.js} +5 -5
- package/{dialogCommands-2ABSL4ND.js → dialogCommands-ULXMRIAM.js} +5 -5
- package/{dialogSlice-DEC5GV6X.js → dialogSlice-5DRM6AQQ.js} +4 -4
- package/{docCreateCommands-2QZCW4HZ.js → docCreateCommands-PPHO6KUM.js} +5 -5
- package/{docDeleteCommands-WKZKQAKM.js → docDeleteCommands-U2GVGQPR.js} +5 -5
- package/{docReadCommands-WMKJCR4Q.js → docReadCommands-CYY3DJXY.js} +5 -5
- package/{docStore-IBPCRTTX.js → docStore-OJXM46BB.js} +1 -1
- package/{docUpdateCommands-KPLM63NK.js → docUpdateCommands-B5UVFLJU.js} +5 -5
- package/{handleSendMessageAction-C7CZNGMB.js → handleSendMessageAction-EWY3J2AV.js} +4 -4
- package/index.js +41 -41
- package/{machineCommands-6BG3AHT5.js → machineCommands-B76BYAJF.js} +14 -14
- package/{machineWsRunDispatch-G2KJ6NQF.js → machineWsRunDispatch-LN6274EL.js} +14 -14
- package/package.json +1 -1
- package/{readlineWorkspace-5LZ3EDIQ.js → readlineWorkspace-UFHEJIDS.js} +77 -18
- package/{runAgentClientLoop-CICP3O2T.js → runAgentClientLoop-MAER6Y5K.js} +11 -11
- package/{spaceCommands-NQOIERT6.js → spaceCommands-2YT7C56D.js} +5 -5
- package/{streamAgentChatTurn-QUD4FY5I.js → streamAgentChatTurn-AKUDQL5W.js} +14 -14
- package/{tools-MAP6O2YZ.js → tools-NM36O7ZG.js} +8 -8
- package/{tuiSummaryLlmCaller-VL5RDGLT.js → tuiSummaryLlmCaller-ZGATEM35.js} +2 -2
- package/{updateDialogTitleAction-L6CCRVUK.js → updateDialogTitleAction-RHH353JB.js} +5 -5
- package/chunk-CLZYOOI3.js +0 -4463
- package/chunk-IF6UQNAK.js +0 -5062
|
@@ -55,7 +55,7 @@ import {
|
|
|
55
55
|
import {
|
|
56
56
|
inlineImageUrlsForCustomProvider,
|
|
57
57
|
prepareTools
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-XHNOCBUU.js";
|
|
59
59
|
import {
|
|
60
60
|
getServerProviderSecret
|
|
61
61
|
} from "./chunk-HS7MLR74.js";
|
|
@@ -72,7 +72,7 @@ import {
|
|
|
72
72
|
rememberMemoryFunctionSchema,
|
|
73
73
|
resolveAgentRequiredPackIds,
|
|
74
74
|
setTodoListFunc
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-K4326DRU.js";
|
|
76
76
|
import {
|
|
77
77
|
fetchWithTransientRetry,
|
|
78
78
|
isTransientFetchError
|
|
@@ -92,17 +92,16 @@ import {
|
|
|
92
92
|
import {
|
|
93
93
|
applyBuiltinAgentRuntimeOverride,
|
|
94
94
|
applyTokenUsageToDayStats,
|
|
95
|
-
normalizeUsage,
|
|
96
95
|
prepareTokenUsageData,
|
|
97
96
|
resolveBuiltinPlatformAgentConfig,
|
|
98
97
|
runKeyed
|
|
99
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-XNO3T6RB.js";
|
|
100
99
|
import {
|
|
101
100
|
BUILTIN_TITLE_LLM_CONFIG
|
|
102
101
|
} from "./chunk-EVBFYPDC.js";
|
|
103
102
|
import {
|
|
104
103
|
fetchServerSyncedCredential
|
|
105
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-RLZ6HZSX.js";
|
|
106
105
|
import {
|
|
107
106
|
require_date_fns
|
|
108
107
|
} from "./chunk-M76ECQRD.js";
|
|
@@ -154,7 +153,7 @@ import {
|
|
|
154
153
|
resolveOpenAiCompatibleProviderConfig,
|
|
155
154
|
shouldUseGeminiNativeToolRoute,
|
|
156
155
|
summarizeToolArguments
|
|
157
|
-
} from "./chunk-
|
|
156
|
+
} from "./chunk-5JTJG4OG.js";
|
|
158
157
|
import {
|
|
159
158
|
PlatformStreamInterruptedError,
|
|
160
159
|
buildPlatformChatCompletionRequest,
|
|
@@ -166,7 +165,7 @@ import {
|
|
|
166
165
|
readSseDataValues,
|
|
167
166
|
resolvePlatformChatProviderConfig,
|
|
168
167
|
shouldUsePlatformChatProvider
|
|
169
|
-
} from "./chunk-
|
|
168
|
+
} from "./chunk-ZCVO2HLZ.js";
|
|
170
169
|
import {
|
|
171
170
|
resolveAgentRuntimeConfigFromRecord,
|
|
172
171
|
resolveHistoricalToolContentCap
|
|
@@ -197,13 +196,16 @@ import {
|
|
|
197
196
|
buildDialogFallbackTitleFromUserInput,
|
|
198
197
|
normalizeDialogTitle
|
|
199
198
|
} from "./chunk-2MBTWINN.js";
|
|
199
|
+
import {
|
|
200
|
+
normalizeUsage
|
|
201
|
+
} from "./chunk-2XENHR3P.js";
|
|
200
202
|
import {
|
|
201
203
|
clipCompactText,
|
|
202
204
|
createProviderCallTimingTracker,
|
|
203
205
|
finalizeProviderCallTiming,
|
|
204
206
|
observeMeaningfulProviderResponseAt,
|
|
205
207
|
withProviderCallTimingFields
|
|
206
|
-
} from "./chunk-
|
|
208
|
+
} from "./chunk-3E67YXGD.js";
|
|
207
209
|
import {
|
|
208
210
|
estimateTokenCount
|
|
209
211
|
} from "./chunk-PSCNXBYA.js";
|
|
@@ -9611,7 +9613,7 @@ async function resolveLocalProvider(ctx) {
|
|
|
9611
9613
|
}
|
|
9612
9614
|
|
|
9613
9615
|
// packages/cli/client/localRuntimeAdapter.ts
|
|
9614
|
-
import { dirname as dirname2, extname, join as
|
|
9616
|
+
import { dirname as dirname2, extname, join as join3 } from "node:path";
|
|
9615
9617
|
import { fileURLToPath } from "node:url";
|
|
9616
9618
|
|
|
9617
9619
|
// packages/cli/client/providerStreamRetry.ts
|
|
@@ -10622,12 +10624,12 @@ var nodeFs = {
|
|
|
10622
10624
|
readFileSync,
|
|
10623
10625
|
existsSync
|
|
10624
10626
|
};
|
|
10625
|
-
function resolveNoloHome(env,
|
|
10627
|
+
function resolveNoloHome(env, homedir2) {
|
|
10626
10628
|
const custom = env?.NOLO_HOME;
|
|
10627
10629
|
if (custom && custom.trim()) return custom.trim();
|
|
10628
10630
|
const ambient = process.env.NOLO_HOME?.trim();
|
|
10629
10631
|
if (ambient) return ambient;
|
|
10630
|
-
return join(
|
|
10632
|
+
return join(homedir2(), ".nolo");
|
|
10631
10633
|
}
|
|
10632
10634
|
function ensureDir(dir, fs) {
|
|
10633
10635
|
fs.mkdirSync(dir, { recursive: true });
|
|
@@ -10646,9 +10648,9 @@ function writeJson(path, data, fs) {
|
|
|
10646
10648
|
}
|
|
10647
10649
|
function createFileSystemTodoStore(opts = {}) {
|
|
10648
10650
|
const env = opts.env ?? process.env;
|
|
10649
|
-
const
|
|
10651
|
+
const homedir2 = opts.homedir ?? nodeHomedir;
|
|
10650
10652
|
const fs = opts.fs ?? nodeFs;
|
|
10651
|
-
const noloHome = resolveNoloHome(env,
|
|
10653
|
+
const noloHome = resolveNoloHome(env, homedir2);
|
|
10652
10654
|
const filePath = opts.filePath ?? join(noloHome, "agent_run_todos.json");
|
|
10653
10655
|
const oldFilePath = join(noloHome, "todos.json");
|
|
10654
10656
|
const loadMap = () => {
|
|
@@ -12230,14 +12232,12 @@ async function loadCliDialogSummary(args) {
|
|
|
12230
12232
|
const summary = typeof record.summary === "string" ? record.summary.trim() : "";
|
|
12231
12233
|
if (!summary) return null;
|
|
12232
12234
|
const summarizedBeforeId = record.summarizedBeforeId;
|
|
12233
|
-
const stubbedBeforeId = record.stubbedBeforeId;
|
|
12234
12235
|
const sourceHash = record.sourceHash;
|
|
12235
12236
|
const sourceCount = record.sourceCount;
|
|
12236
12237
|
const schemaVersion = record.schemaVersion;
|
|
12237
12238
|
return {
|
|
12238
12239
|
summary,
|
|
12239
12240
|
...typeof summarizedBeforeId === "string" && summarizedBeforeId ? { summarizedBeforeId } : {},
|
|
12240
|
-
...typeof stubbedBeforeId === "string" && stubbedBeforeId ? { stubbedBeforeId } : {},
|
|
12241
12241
|
...typeof sourceHash === "string" && sourceHash ? { sourceHash } : {},
|
|
12242
12242
|
...typeof sourceCount === "number" && sourceCount > 0 ? { sourceCount } : {},
|
|
12243
12243
|
..."schemaVersion" in record ? { schemaVersion } : {}
|
|
@@ -12256,14 +12256,10 @@ async function saveCliDialogSummary(args) {
|
|
|
12256
12256
|
userId: args.userId,
|
|
12257
12257
|
summary: args.summary,
|
|
12258
12258
|
...args.summarizedBeforeId !== void 0 ? { summarizedBeforeId: args.summarizedBeforeId } : {},
|
|
12259
|
-
// 始终写入 stubbedBeforeId(包括 undefined → 清空旧 stub),保证
|
|
12260
|
-
// 摘要路径生成新 summary 后旧 stub 边界被正确清除。
|
|
12261
|
-
stubbedBeforeId: args.stubbedBeforeId,
|
|
12262
12259
|
...args.sourceHash !== void 0 ? { sourceHash: args.sourceHash } : {},
|
|
12263
12260
|
...args.sourceCount !== void 0 ? { sourceCount: args.sourceCount } : {},
|
|
12264
12261
|
...args.schemaVersion !== void 0 ? { schemaVersion: args.schemaVersion } : {},
|
|
12265
12262
|
compressionCount,
|
|
12266
|
-
summaryPending: false,
|
|
12267
12263
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
12268
12264
|
});
|
|
12269
12265
|
}
|
|
@@ -12287,119 +12283,12 @@ function parseTitleUpdatedAtMs(existingDialog) {
|
|
|
12287
12283
|
return 0;
|
|
12288
12284
|
}
|
|
12289
12285
|
|
|
12290
|
-
// packages/cli/client/turnBillingAudit.ts
|
|
12291
|
-
import {
|
|
12292
|
-
appendFileSync as appendFileSync2,
|
|
12293
|
-
closeSync,
|
|
12294
|
-
mkdirSync as mkdirSync3,
|
|
12295
|
-
openSync,
|
|
12296
|
-
readSync,
|
|
12297
|
-
statSync
|
|
12298
|
-
} from "node:fs";
|
|
12299
|
-
import { homedir as homedir2 } from "node:os";
|
|
12300
|
-
import { join as join3 } from "node:path";
|
|
12301
|
-
function projectUsageForAudit(usage) {
|
|
12302
|
-
if (!usage || typeof usage !== "object") return null;
|
|
12303
|
-
const normalized = normalizeUsage(usage);
|
|
12304
|
-
const projected = {
|
|
12305
|
-
input_tokens: normalized.input_tokens,
|
|
12306
|
-
output_tokens: normalized.output_tokens,
|
|
12307
|
-
cache_read_input_tokens: normalized.cache_read_input_tokens,
|
|
12308
|
-
cache_creation_input_tokens: normalized.cache_creation_input_tokens
|
|
12309
|
-
};
|
|
12310
|
-
if (typeof usage.cost === "number" && Number.isFinite(usage.cost)) {
|
|
12311
|
-
projected.cost = usage.cost;
|
|
12312
|
-
}
|
|
12313
|
-
if (typeof usage.billing_unit === "string" && usage.billing_unit.trim()) {
|
|
12314
|
-
projected.billing_unit = usage.billing_unit;
|
|
12315
|
-
}
|
|
12316
|
-
if (typeof usage.provider_call_id === "string" && usage.provider_call_id.trim()) {
|
|
12317
|
-
projected.provider_call_id = usage.provider_call_id.trim();
|
|
12318
|
-
}
|
|
12319
|
-
return projected;
|
|
12320
|
-
}
|
|
12321
|
-
function resolveTurnBillingAuditLogPath(env = process.env) {
|
|
12322
|
-
const noloHome = env.NOLO_HOME?.trim() || join3(homedir2(), ".nolo");
|
|
12323
|
-
return join3(noloHome, "logs", "turn-billing.jsonl");
|
|
12324
|
-
}
|
|
12325
|
-
function appendTurnBillingAudit(input) {
|
|
12326
|
-
try {
|
|
12327
|
-
if (process.env.NOLO_TURN_BILLING_AUDIT === "0") return;
|
|
12328
|
-
const calls = (input.usageRecords ?? []).map((record) => {
|
|
12329
|
-
const usage = projectUsageForAudit(record?.usage);
|
|
12330
|
-
if (!usage) return null;
|
|
12331
|
-
return {
|
|
12332
|
-
...record?.callId ? { callId: record.callId } : {},
|
|
12333
|
-
...record?.model ? { model: record.model } : {},
|
|
12334
|
-
...record?.provider ? { provider: record.provider } : {},
|
|
12335
|
-
...usage
|
|
12336
|
-
};
|
|
12337
|
-
}).filter((call) => call !== null);
|
|
12338
|
-
if (calls.length === 0 && (input.turnCredits === void 0 || input.turnCredits === null)) {
|
|
12339
|
-
return;
|
|
12340
|
-
}
|
|
12341
|
-
const row = {
|
|
12342
|
-
ts: Date.now(),
|
|
12343
|
-
...input.dialogId ? { dialogId: input.dialogId } : {},
|
|
12344
|
-
...input.agentKey ? { agentKey: input.agentKey } : {},
|
|
12345
|
-
...input.turnCredits !== void 0 && input.turnCredits !== null ? { turnCredits: input.turnCredits } : {},
|
|
12346
|
-
...input.aborted ? { aborted: true } : {},
|
|
12347
|
-
calls
|
|
12348
|
-
};
|
|
12349
|
-
const logPath = resolveTurnBillingAuditLogPath();
|
|
12350
|
-
mkdirSync3(join3(logPath, ".."), { recursive: true });
|
|
12351
|
-
appendFileSync2(logPath, `${JSON.stringify(row)}
|
|
12352
|
-
`);
|
|
12353
|
-
} catch {
|
|
12354
|
-
}
|
|
12355
|
-
}
|
|
12356
|
-
function readLastTurnBillingInputTokens(dialogId, env = process.env) {
|
|
12357
|
-
if (!dialogId || typeof dialogId !== "string") return void 0;
|
|
12358
|
-
try {
|
|
12359
|
-
const logPath = resolveTurnBillingAuditLogPath(env);
|
|
12360
|
-
const stat = statSync(logPath, { throwIfNoEntry: false });
|
|
12361
|
-
if (!stat || !stat.isFile() || stat.size === 0) return void 0;
|
|
12362
|
-
const maxBytesToRead = 64 * 1024;
|
|
12363
|
-
const bytesToRead = Math.min(stat.size, maxBytesToRead);
|
|
12364
|
-
const buffer = Buffer.alloc(bytesToRead);
|
|
12365
|
-
const fd = openSync(logPath, "r");
|
|
12366
|
-
try {
|
|
12367
|
-
readSync(fd, buffer, 0, bytesToRead, stat.size - bytesToRead);
|
|
12368
|
-
} finally {
|
|
12369
|
-
closeSync(fd);
|
|
12370
|
-
}
|
|
12371
|
-
const text = buffer.toString("utf-8");
|
|
12372
|
-
const lines = text.split("\n");
|
|
12373
|
-
for (let i = lines.length - 1; i >= 0; i--) {
|
|
12374
|
-
const line = lines[i].trim();
|
|
12375
|
-
if (!line) continue;
|
|
12376
|
-
try {
|
|
12377
|
-
const parsed = JSON.parse(line);
|
|
12378
|
-
if (parsed && typeof parsed === "object" && parsed.dialogId === dialogId) {
|
|
12379
|
-
if (Array.isArray(parsed.calls) && parsed.calls.length > 0) {
|
|
12380
|
-
for (let j = parsed.calls.length - 1; j >= 0; j--) {
|
|
12381
|
-
const call = parsed.calls[j];
|
|
12382
|
-
if (call && typeof call.input_tokens === "number" && Number.isFinite(call.input_tokens) && call.input_tokens > 0) {
|
|
12383
|
-
return call.input_tokens;
|
|
12384
|
-
}
|
|
12385
|
-
}
|
|
12386
|
-
}
|
|
12387
|
-
}
|
|
12388
|
-
} catch {
|
|
12389
|
-
}
|
|
12390
|
-
}
|
|
12391
|
-
return void 0;
|
|
12392
|
-
} catch {
|
|
12393
|
-
return void 0;
|
|
12394
|
-
}
|
|
12395
|
-
}
|
|
12396
|
-
|
|
12397
12286
|
// packages/cli/client/localRuntimeAdapter.ts
|
|
12398
12287
|
var currentMetaFile = fileURLToPath(import.meta.url);
|
|
12399
12288
|
var isJsBundle = extname(currentMetaFile) === ".js";
|
|
12400
12289
|
var SOURCE_CLI_DIR = isJsBundle ? dirname2(currentMetaFile) : dirname2(dirname2(currentMetaFile));
|
|
12401
12290
|
var CLI_DIR = isCompiledBinary() ? dirname2(process.execPath) : SOURCE_CLI_DIR;
|
|
12402
|
-
var CLI_ENTRYPOINT = isCompiledBinary() ? process.execPath : isJsBundle ? currentMetaFile :
|
|
12291
|
+
var CLI_ENTRYPOINT = isCompiledBinary() ? process.execPath : isJsBundle ? currentMetaFile : join3(SOURCE_CLI_DIR, "index.ts");
|
|
12403
12292
|
async function recordLocalAvailabilityForAgent(args) {
|
|
12404
12293
|
const now = args.now ?? Date.now;
|
|
12405
12294
|
const { deps, status } = args;
|
|
@@ -12592,7 +12481,6 @@ function createCliLocalRuntimeAdapter(deps) {
|
|
|
12592
12481
|
dialogId: input.dialogId,
|
|
12593
12482
|
summary: input.summary,
|
|
12594
12483
|
summarizedBeforeId: input.summarizedBeforeId,
|
|
12595
|
-
stubbedBeforeId: input.stubbedBeforeId,
|
|
12596
12484
|
sourceHash: input.sourceHash,
|
|
12597
12485
|
sourceCount: input.sourceCount,
|
|
12598
12486
|
schemaVersion: input.schemaVersion
|
|
@@ -12606,10 +12494,6 @@ function createCliLocalRuntimeAdapter(deps) {
|
|
|
12606
12494
|
if (fromDialog?.inputTokens) {
|
|
12607
12495
|
return fromDialog;
|
|
12608
12496
|
}
|
|
12609
|
-
const fromAudit = readLastTurnBillingInputTokens(dialogId, deps.env);
|
|
12610
|
-
if (typeof fromAudit === "number" && fromAudit > 0) {
|
|
12611
|
-
return { inputTokens: fromAudit };
|
|
12612
|
-
}
|
|
12613
12497
|
return null;
|
|
12614
12498
|
},
|
|
12615
12499
|
saveTurn: async (input) => writeDialog({
|
|
@@ -12829,6 +12713,5 @@ export {
|
|
|
12829
12713
|
t,
|
|
12830
12714
|
toolLabel,
|
|
12831
12715
|
agentRunCardLabels,
|
|
12832
|
-
appendTurnBillingAudit,
|
|
12833
12716
|
createCliLocalRuntimeAdapter
|
|
12834
12717
|
};
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
resolveLocalUserId,
|
|
28
28
|
t,
|
|
29
29
|
toolLabel
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-7NG5APVZ.js";
|
|
31
31
|
import {
|
|
32
32
|
createRunActivityTracker,
|
|
33
33
|
popSingleQueueMessage,
|
|
@@ -63,7 +63,7 @@ import {
|
|
|
63
63
|
} from "./chunk-LTRXGFMS.js";
|
|
64
64
|
import {
|
|
65
65
|
formatAgentListCard
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-K4326DRU.js";
|
|
67
67
|
import {
|
|
68
68
|
isTransientFetchError
|
|
69
69
|
} from "./chunk-5XTOKQLW.js";
|
|
@@ -84,12 +84,11 @@ import {
|
|
|
84
84
|
chooseMemoryOwners,
|
|
85
85
|
loadMemoryCandidatesFromDb,
|
|
86
86
|
resolveAgentMemoryPolicy
|
|
87
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-VHADFQCI.js";
|
|
88
88
|
import {
|
|
89
89
|
API_REPORTED_COST_MULTIPLIER,
|
|
90
|
-
normalizeUsage,
|
|
91
90
|
parseUiAskChoiceContent
|
|
92
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-XNO3T6RB.js";
|
|
93
92
|
import {
|
|
94
93
|
isOAuthApiKeyRef
|
|
95
94
|
} from "./chunk-YYLHWIW6.js";
|
|
@@ -112,7 +111,7 @@ import {
|
|
|
112
111
|
LOCAL_AGENT_CONFIG_MISSING_CODE,
|
|
113
112
|
LOCAL_TURN_ABORTED_CODE,
|
|
114
113
|
readActionGate
|
|
115
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-5JTJG4OG.js";
|
|
116
115
|
import {
|
|
117
116
|
resolveAgentRuntimeConfigFromRecord
|
|
118
117
|
} from "./chunk-Y7PULBIA.js";
|
|
@@ -135,11 +134,12 @@ import {
|
|
|
135
134
|
} from "./chunk-CJCJF5XB.js";
|
|
136
135
|
import {
|
|
137
136
|
DEFAULT_CONTEXT_WINDOW,
|
|
138
|
-
getModelContextWindow
|
|
139
|
-
|
|
137
|
+
getModelContextWindow,
|
|
138
|
+
normalizeUsage
|
|
139
|
+
} from "./chunk-2XENHR3P.js";
|
|
140
140
|
import {
|
|
141
141
|
clipCompactText
|
|
142
|
-
} from "./chunk-
|
|
142
|
+
} from "./chunk-3E67YXGD.js";
|
|
143
143
|
import {
|
|
144
144
|
findModelConfig
|
|
145
145
|
} from "./chunk-TQC77XVE.js";
|
|
@@ -4574,11 +4574,12 @@ function appendThinkingPreview(current, chunk, limit = THINKING_PREVIEW_BUFFER_L
|
|
|
4574
4574
|
}
|
|
4575
4575
|
function formatCompactionSummaryLine(event) {
|
|
4576
4576
|
if (!event) return "";
|
|
4577
|
-
|
|
4578
|
-
|
|
4579
|
-
|
|
4580
|
-
|
|
4577
|
+
if (event.failed) {
|
|
4578
|
+
const reason = event.detail ? `\uFF1A${event.detail}` : "";
|
|
4579
|
+
return `${STYLE2.dim}\u81EA\u52A8\u4E0A\u4E0B\u6587\u538B\u7F29\u5931\u8D25${reason}\uFF0C\u672C\u8F6E\u4EE5\u672A\u538B\u7F29\u4E0A\u4E0B\u6587\u7EE7\u7EED\u3002\u82E5\u53CD\u590D\u51FA\u73B0\u53EF\u624B\u52A8 /compact\u3002${STYLE2.reset}
|
|
4580
|
+
`;
|
|
4581
4581
|
}
|
|
4582
|
+
let detail = "\u751F\u6210\u5386\u53F2\u6458\u8981";
|
|
4582
4583
|
const saved = typeof event.savedTokens === "number" ? event.savedTokens : void 0;
|
|
4583
4584
|
let line = `\u5DF2\u538B\u7F29\u4E0A\u4E0B\u6587\uFF1A${detail}`;
|
|
4584
4585
|
if (saved !== void 0) {
|
|
@@ -5176,7 +5177,7 @@ function findCollapsedPasteSpanAt(buffer, pos, opts = {}) {
|
|
|
5176
5177
|
// packages/cli/client/agentRun.ts
|
|
5177
5178
|
import { ulid } from "ulid";
|
|
5178
5179
|
async function loadRunLocalAgentTurn() {
|
|
5179
|
-
const { runLocalAgentTurn } = await import("./agentRuntimeLocal-
|
|
5180
|
+
const { runLocalAgentTurn } = await import("./agentRuntimeLocal-2ENB2B2Z.js");
|
|
5180
5181
|
return runLocalAgentTurn;
|
|
5181
5182
|
}
|
|
5182
5183
|
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();
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCliLocalRuntimeAdapter,
|
|
3
3
|
summarizeEndpoint
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-7NG5APVZ.js";
|
|
5
5
|
import {
|
|
6
6
|
clipMultilineText
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-K4326DRU.js";
|
|
8
8
|
import {
|
|
9
9
|
runLocalAgentTurn
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-5JTJG4OG.js";
|
|
11
11
|
import {
|
|
12
12
|
applyToolSurfaceConstraints
|
|
13
13
|
} from "./chunk-V3ZKNK5D.js";
|