nolo-cli 0.16.0-alpha.2 → 0.16.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-QAUS6B7J.js → _executeModel-GRCQXT5R.js} +51 -45
- package/{action-GUOZYYGN.js → action-LT7BRFLK.js} +10 -9
- package/{addContentAction-QDGHGUBH.js → addContentAction-PL3KKBDH.js} +9 -8
- package/{addDialogAgentAction-Z4YCYZIV.js → addDialogAgentAction-FCMSKYAF.js} +8 -7
- package/{agentDeleteCommand-365DMKHW.js → agentDeleteCommand-WNL3CNQX.js} +32 -29
- package/{agentEmailCommands-TQMXL36I.js → agentEmailCommands-MPEUMRAS.js} +63 -57
- package/{agentListCommands-6B5X4RC6.js → agentListCommands-YO4AOQMS.js} +31 -28
- package/{agentMachineCommands-LOEARB6V.js → agentMachineCommands-WYM6YRYJ.js} +30 -27
- package/{agentPullCommand-6HWUT3SW.js → agentPullCommand-ZZGU5KOY.js} +4 -4
- package/agentRecordCommands-BVWSHMIY.js +105 -0
- package/{agentRunCommand-SGMH67WT.js → agentRunCommand-E3ZI6RSF.js} +64 -55
- package/{agentRunControl-6ADXVYMR.js → agentRunControl-Y5AFH5PQ.js} +24 -1
- package/{agentRuntimeLocal-YSYZ33ER.js → agentRuntimeLocal-P4VGX6H6.js} +26 -25
- package/{agentSlice-IVE735EV.js → agentSlice-D33GU3JL.js} +9 -8
- package/{appDeleteCommands-6QYOO3JB.js → appDeleteCommands-VA4R2SWX.js} +29 -26
- package/{appDeployCommands-WTCT6XO6.js → appDeployCommands-JWMWQNG6.js} +29 -26
- package/{appDeployStatusCommands-CGWGZJKB.js → appDeployStatusCommands-KYXGLZSQ.js} +29 -26
- package/{appGetCommands-O4OCAMRW.js → appGetCommands-ELOO3JG6.js} +29 -26
- package/{appListCommands-UENFP4XY.js → appListCommands-SJUW4RLW.js} +29 -26
- package/{authCommand-YFTR3347.js → authCommand-WJZPOLSS.js} +16 -9
- package/{authCommands-YXGOXNBZ.js → authCommands-XTBV7OFZ.js} +6 -5
- package/{chunk-RKM3K52F.js → chunk-34WPV75U.js} +23 -2
- package/{chunk-VPTJB4HM.js → chunk-3ND52WIL.js} +2 -5
- package/{chunk-SOTZ6RDN.js → chunk-3Q7WHGCB.js} +1 -1
- package/{chunk-KKY4B2Q2.js → chunk-4PWB7JRR.js} +4 -1
- package/{chunk-U7LEGLEB.js → chunk-4T5F7YZQ.js} +1 -1
- package/{chunk-OQMPU2ML.js → chunk-5PGGCJGV.js} +6 -6
- package/chunk-7BUYEZ6U.js +671 -0
- package/{chunk-AS3ZQ3O2.js → chunk-7OBMZCRD.js} +1 -1
- package/{chunk-WA6KZL5V.js → chunk-AAODAAUQ.js} +23 -20
- package/{chunk-GRTFNYLR.js → chunk-AKVLLMOU.js} +3 -3
- package/{chunk-QLUFR47U.js → chunk-AL2V7U3E.js} +1 -1
- package/{chunk-MTU75CZ2.js → chunk-B5TOXZAK.js} +1 -1
- package/{chunk-QZVGMD5F.js → chunk-BE2GNT5E.js} +2 -8
- package/{chunk-JKWWVF2I.js → chunk-D3HVJJIA.js} +1 -1
- package/{chunk-B4KT7RN2.js → chunk-DKZFOK24.js} +18 -89
- package/chunk-DL6EPNIK.js +50 -0
- package/{chunk-YYIRR6QC.js → chunk-E5KQTMMJ.js} +212 -250
- package/{chunk-4QQFLN5C.js → chunk-EGPCU42M.js} +58 -8
- package/{chunk-XVP3C2KY.js → chunk-ELT65PZW.js} +2 -2
- package/{chunk-EMXI3N3Z.js → chunk-ENP2ELIL.js} +5 -5
- package/{chunk-6565R2TI.js → chunk-EXAEHRLI.js} +112 -191
- package/chunk-FQZZLA3C.js +223 -0
- package/{chunk-WPN6RMDF.js → chunk-GMZZ5EKJ.js} +3 -3
- package/{chunk-RSYUDGGZ.js → chunk-HQNPCMWL.js} +3 -3
- package/{chunk-OGGHETUE.js → chunk-HQPG2PIV.js} +62 -19
- package/{chunk-4NLUNENX.js → chunk-IQZ6TGVW.js} +10 -3
- package/{chunk-VE6XMVKG.js → chunk-J67FKTTY.js} +330 -213
- package/{chunk-G2MKOQCB.js → chunk-JFE7XW4D.js} +1 -1
- package/{setDialogExtraReferencesAction-2VLGWQKG.js → chunk-JLA4FXYC.js} +2 -17
- package/{chunk-OOIN7HSO.js → chunk-JP7REMYP.js} +19 -1
- package/chunk-KFEVY3ST.js +255 -0
- package/{chunk-I66RU7P7.js → chunk-KKWJ5VPZ.js} +1 -1
- package/{chunk-WRN5EQT7.js → chunk-L2RRMXNJ.js} +13 -4
- package/{chunk-ISYE6GZB.js → chunk-L6NVTGI7.js} +1 -1
- package/{chunk-HRQCKQA5.js → chunk-MUCU6ATG.js} +8 -257
- package/{chunk-BFRVXJJJ.js → chunk-MUIT5AAM.js} +112 -27
- package/{chunk-WNLPAOIT.js → chunk-MVQ4TBSD.js} +1 -1
- package/{chunk-O53CP2QR.js → chunk-N2HYIBLH.js} +6 -6
- package/{chunk-524BDL33.js → chunk-O6W2O2DA.js} +1 -15
- package/{chunk-YC3DJILJ.js → chunk-PUSK7HXJ.js} +64 -22
- package/{chunk-OOSFSFMA.js → chunk-R5V5G73M.js} +2 -0
- package/{chunk-4IJYA27C.js → chunk-RG2U2MTJ.js} +1 -1
- package/{chunk-Z24FGIU2.js → chunk-RIDWN7AP.js} +34 -15
- package/{chunk-IKXL2HZ3.js → chunk-RK5NYQEL.js} +1 -1
- package/{chunk-QLFCNUVQ.js → chunk-RUTSBLDM.js} +1629 -261
- package/{chunk-TTGAVETO.js → chunk-RVOUXDFU.js} +5 -5
- package/{chunk-JTINRTBT.js → chunk-SKDNBYZK.js} +2 -2
- package/{chunk-KMQPSTMJ.js → chunk-TRT4I4UD.js} +2 -2
- package/{chunk-EHLHSX7R.js → chunk-UB4RYYNQ.js} +9 -2
- package/{chunk-N5424GSW.js → chunk-UGUW3FHG.js} +4 -4
- package/{chunk-YNHQIXX5.js → chunk-UIOYWBU7.js} +395 -326
- package/chunk-V5R4NZP2.js +78 -0
- package/{chunk-MYMMNKYL.js → chunk-VNAEBGDK.js} +156 -6
- package/{chunk-J55UHASN.js → chunk-VST53WEL.js} +1 -1
- package/{chunk-6MHDWKOT.js → chunk-VVKQFITN.js} +25 -12
- package/{chunk-W4NVOSFF.js → chunk-WFHXMLHZ.js} +1 -1
- package/{chunk-H33743XH.js → chunk-WJRJDX2W.js} +1 -1
- package/chunk-X4Q4UZEY.js +26 -0
- package/{chunk-E237VE6U.js → chunk-XFYDGBXL.js} +4 -4
- package/{chunk-JS33TCQ3.js → chunk-XHG22OEX.js} +4 -4
- package/{chunk-DVRHHFEA.js → chunk-XMLRJUU5.js} +1 -1
- package/{chunk-V2J635L5.js → chunk-XOIF2TNF.js} +2 -2
- package/{chunk-SFXYKGK2.js → chunk-XRZJGPFI.js} +7 -7
- package/chunk-ZHXJ6M7T.js +27 -0
- package/chunk-ZZ2MH7LE.js +84 -0
- package/{cliExecutor-K3F7DMRO.js → cliExecutor-DNE7TCC4.js} +2 -2
- package/codingSkills-36KN5NQT.js +48 -0
- package/{createAgentAutomationAction-TS6NNZ4X.js → createAgentAutomationAction-ONKZ46XE.js} +22 -21
- package/{createDialogAction-5HVQ33EX.js → createDialogAction-7QWJEBKU.js} +24 -23
- package/{createPageAction-4F3ZGQJD.js → createPageAction-PB3KXZIA.js} +28 -27
- package/{dbSlice-OP6UPXKA.js → dbSlice-CGSRFJN3.js} +8 -7
- package/{deleteFile-WPWVZE4B.js → deleteFile-WDZ3VM7B.js} +3 -3
- package/{dialogCommands-ZL6L24BS.js → dialogCommands-YZFU4Q26.js} +30 -27
- package/{dialogSlice-FAWUQDJW.js → dialogSlice-53B5ISGQ.js} +22 -21
- package/{docCreateCommands-LYROQTFH.js → docCreateCommands-LOUC5PFB.js} +28 -25
- package/{docDeleteCommands-6TWGTZNR.js → docDeleteCommands-HHPGT4BR.js} +29 -26
- package/{docReadCommands-PRULNF26.js → docReadCommands-YPSN4HEF.js} +28 -25
- package/{docStore-2UHVWLTV.js → docStore-LJXXRB5W.js} +23 -22
- package/{docUpdateCommands-NNYYWJBI.js → docUpdateCommands-CJCZO54M.js} +28 -25
- package/{fetchMessages-KTNM7QAR.js → fetchMessages-BMGVZVSE.js} +4 -3
- package/{getPricing-UGDJHI7M.js → getPricing-RYY6OBA4.js} +4 -4
- package/handleSendMessageAction-ICGX4QCM.js +402 -0
- package/index.js +68 -68
- package/{localDialogRead-2VRI24F4.js → localDialogRead-HQZPVIE3.js} +1 -1
- package/{localRuntimeDb-LGDF6FQP.js → localRuntimeDb-THJZGAOJ.js} +1 -1
- package/{machineCommands-JQPEQFSE.js → machineCommands-YLDZXK4D.js} +64 -58
- package/{machineWsRunDispatch-FFFNWVEW.js → machineWsRunDispatch-LTQL3DRE.js} +56 -50
- package/{models-LSCRJJ6P.js → models-5K5G2CZI.js} +2 -2
- package/package.json +1 -1
- package/queryRunOverlay-O4LOMMPO.js +161 -0
- package/{read-HXHAZBKH.js → read-3FMPZPER.js} +3 -3
- package/{readDocTool-VPBDTO4G.js → readDocTool-VSYHKK3V.js} +1 -1
- package/{readlineWorkspace-QSXHSBHA.js → readlineWorkspace-OSPVWNAT.js} +699 -168
- package/{removeDialogAgentAction-HUFVN35S.js → removeDialogAgentAction-OAGA2G3U.js} +11 -10
- package/{runAgentClientLoop-A75BUU6D.js → runAgentClientLoop-76SUKKPX.js} +46 -40
- package/runOverlayPresentation-ZO4VCWEU.js +11 -0
- package/{runtimeDoctorCommands-THIHX2SY.js → runtimeDoctorCommands-E2OUORHK.js} +6 -6
- package/setDialogExtraReferencesAction-JZEXA5SL.js +27 -0
- package/{setPrimaryDialogAgentAction-VB4UV2CC.js → setPrimaryDialogAgentAction-4ZUQQKDG.js} +27 -18
- package/{settingSlice-7JYPQNAC.js → settingSlice-7MNKHZ6R.js} +9 -8
- package/{skillDiscovery-6M2BZUFN.js → skillDiscovery-KJWT7JBU.js} +3 -3
- package/{spaceCommands-4LE45GB7.js → spaceCommands-GIF7MKVD.js} +31 -28
- package/{spaceSlice-444MFUP6.js → spaceSlice-M4PVN5PO.js} +22 -21
- package/{streamAgentChatTurn-DJAE7USZ.js → streamAgentChatTurn-GCKTFSHQ.js} +96 -55
- package/{tableCommands-3P7MJ3PF.js → tableCommands-BEQAGE4I.js} +1 -1
- package/{tools-YB6LXSVN.js → tools-RJVFXOLR.js} +35 -30
- package/{tuiSummaryLlmCaller-QQL3JA5I.js → tuiSummaryLlmCaller-VUNVBRX3.js} +7 -6
- package/types-ZSTJ7MPR.js +7 -0
- package/{updateDialogTitleAction-6HGFBM64.js → updateDialogTitleAction-PSR67DLV.js} +25 -24
- package/agentRecordCommands-DCH2WBL2.js +0 -99
- package/chunk-BYXBJQAS.js +0 -0
- package/handleSendMessageAction-LJPUYNOH.js +0 -215
- package/{chunk-O4BU24WZ.js → chunk-6Y7A3OQQ.js} +3 -3
- package/{chunk-CMKUBIGW.js → chunk-X7W4TNB4.js} +3 -3
- package/{localRuntimeAuthority-TEGCOWX4.js → localRuntimeAuthority-4IXJCHZ7.js} +3 -3
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
// packages/ai/tools/agent/agentRunDisplayHelpers.ts
|
|
2
|
+
function getAgentRunStatusIcon(status) {
|
|
3
|
+
switch (status) {
|
|
4
|
+
case "running":
|
|
5
|
+
case "pending":
|
|
6
|
+
return "\u23F3";
|
|
7
|
+
case "done":
|
|
8
|
+
return "\u2713";
|
|
9
|
+
case "failed":
|
|
10
|
+
case "timeout":
|
|
11
|
+
return "\u2717";
|
|
12
|
+
case "killed":
|
|
13
|
+
case "cancelled":
|
|
14
|
+
case "cancelling":
|
|
15
|
+
return "\u{1F6D1}";
|
|
16
|
+
case "orphaned":
|
|
17
|
+
return "\u{1F47B}";
|
|
18
|
+
case "not_found":
|
|
19
|
+
default:
|
|
20
|
+
return "?";
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
var DEFAULT_LABELS = {
|
|
24
|
+
runStatus: "Run status",
|
|
25
|
+
runStarted: "Run started",
|
|
26
|
+
runStopped: "Run stopped",
|
|
27
|
+
runFinished: "Run finished",
|
|
28
|
+
logTail: "Log tail:",
|
|
29
|
+
runs: (count) => `Runs (${count})`
|
|
30
|
+
};
|
|
31
|
+
function resolveLabels(labels) {
|
|
32
|
+
return {
|
|
33
|
+
runStatus: labels?.runStatus ?? DEFAULT_LABELS.runStatus,
|
|
34
|
+
runStarted: labels?.runStarted ?? DEFAULT_LABELS.runStarted,
|
|
35
|
+
runStopped: labels?.runStopped ?? DEFAULT_LABELS.runStopped,
|
|
36
|
+
runFinished: labels?.runFinished ?? DEFAULT_LABELS.runFinished,
|
|
37
|
+
logTail: labels?.logTail ?? DEFAULT_LABELS.logTail,
|
|
38
|
+
runs: labels?.runs ?? DEFAULT_LABELS.runs
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function shortRunId(runId) {
|
|
42
|
+
const trimmed = typeof runId === "string" ? runId.trim() : "";
|
|
43
|
+
if (!trimmed) return "";
|
|
44
|
+
const segments = trimmed.split("-").filter(Boolean);
|
|
45
|
+
let pick = segments[segments.length - 1] ?? trimmed;
|
|
46
|
+
if (pick.length < 4 && segments.length >= 2) pick = segments.slice(-2).join("-");
|
|
47
|
+
if (!pick) pick = trimmed;
|
|
48
|
+
return pick.length > 8 ? pick.slice(-8) : pick;
|
|
49
|
+
}
|
|
50
|
+
function clipText(text, max) {
|
|
51
|
+
const collapsed = text.replace(/\s+/g, " ").trim();
|
|
52
|
+
return collapsed.length > max ? `${collapsed.slice(0, max - 1)}\u2026` : collapsed;
|
|
53
|
+
}
|
|
54
|
+
function formatDuration(ms) {
|
|
55
|
+
const totalSec = Math.max(0, Math.floor(ms / 1e3));
|
|
56
|
+
if (totalSec < 60) return `${totalSec}s`;
|
|
57
|
+
const totalMin = Math.floor(totalSec / 60);
|
|
58
|
+
if (totalMin < 60) return `${totalMin}m${String(totalSec % 60).padStart(2, "0")}s`;
|
|
59
|
+
return `${Math.floor(totalMin / 60)}h${String(totalMin % 60).padStart(2, "0")}m`;
|
|
60
|
+
}
|
|
61
|
+
function formatRunAge(timing, now = Date.now()) {
|
|
62
|
+
const startedAt = timing?.startedAt;
|
|
63
|
+
if (typeof startedAt !== "number" || !Number.isFinite(startedAt) || startedAt <= 0) {
|
|
64
|
+
return "";
|
|
65
|
+
}
|
|
66
|
+
const end = typeof timing?.finishedAt === "number" && Number.isFinite(timing.finishedAt) && timing.finishedAt > 0 ? timing.finishedAt : now;
|
|
67
|
+
return formatDuration(end - startedAt);
|
|
68
|
+
}
|
|
69
|
+
function formatIdentityRow(agentName, runId) {
|
|
70
|
+
const parts = [];
|
|
71
|
+
if (!isAgentNameFallback(agentName)) parts.push(agentName);
|
|
72
|
+
const short = shortRunId(runId);
|
|
73
|
+
if (short) parts.push(`#${short}`);
|
|
74
|
+
return parts.join(" ");
|
|
75
|
+
}
|
|
76
|
+
function isAgentNameFallback(agentName) {
|
|
77
|
+
const trimmed = typeof agentName === "string" ? agentName.trim() : "";
|
|
78
|
+
return !trimmed || trimmed === "agent";
|
|
79
|
+
}
|
|
80
|
+
function resolveRunLabel(run) {
|
|
81
|
+
for (const candidate of [run.agentName, run.name, run.agentKey, run.runId]) {
|
|
82
|
+
if (typeof candidate === "string" && !isAgentNameFallback(candidate)) {
|
|
83
|
+
return candidate.trim();
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return "agent";
|
|
87
|
+
}
|
|
88
|
+
function formatStartRunCard(agentName, status = "running", opts) {
|
|
89
|
+
const L = resolveLabels(opts?.labels);
|
|
90
|
+
const icon = getAgentRunStatusIcon(status);
|
|
91
|
+
const lines = [L.runStarted];
|
|
92
|
+
const identity = formatIdentityRow(agentName, opts?.runId);
|
|
93
|
+
if (identity) {
|
|
94
|
+
lines.push(` agent ${identity}`);
|
|
95
|
+
}
|
|
96
|
+
lines.push(` status ${icon} ${status}`);
|
|
97
|
+
const task = opts?.task?.trim();
|
|
98
|
+
if (task) {
|
|
99
|
+
lines.push(` task ${clipText(task, TASK_PREVIEW_MAX)}`);
|
|
100
|
+
}
|
|
101
|
+
return lines.join("\n");
|
|
102
|
+
}
|
|
103
|
+
var TASK_PREVIEW_MAX = 72;
|
|
104
|
+
var NOTE_PREVIEW_MAX = 72;
|
|
105
|
+
function formatProgressRow(toolCallCount, lastToolNames) {
|
|
106
|
+
const parts = [];
|
|
107
|
+
if (typeof toolCallCount === "number" && Number.isFinite(toolCallCount)) {
|
|
108
|
+
parts.push(`${toolCallCount} tools`);
|
|
109
|
+
}
|
|
110
|
+
if (lastToolNames && lastToolNames.length > 0) {
|
|
111
|
+
parts.push(lastToolNames.join(", "));
|
|
112
|
+
}
|
|
113
|
+
return parts.join(" \xB7 ");
|
|
114
|
+
}
|
|
115
|
+
function formatStatusRunCard(agentName, status = "running", opts) {
|
|
116
|
+
const L = resolveLabels(opts?.labels);
|
|
117
|
+
const icon = getAgentRunStatusIcon(status);
|
|
118
|
+
const age = formatRunAge(opts?.timing, opts?.now);
|
|
119
|
+
const lines = [L.runStatus, ` ${icon} ${status}${age ? ` ${age}` : ""}`];
|
|
120
|
+
const identity = formatIdentityRow(agentName, opts?.runId);
|
|
121
|
+
if (identity) {
|
|
122
|
+
lines.push(` agent ${identity}`);
|
|
123
|
+
}
|
|
124
|
+
const progress = formatProgressRow(opts?.toolCallCount, opts?.lastToolNames);
|
|
125
|
+
if (progress) {
|
|
126
|
+
lines.push(` tools ${progress}`);
|
|
127
|
+
}
|
|
128
|
+
const note = opts?.lastAssistantText?.trim();
|
|
129
|
+
if (note) {
|
|
130
|
+
lines.push(` note ${clipText(note, NOTE_PREVIEW_MAX)}`);
|
|
131
|
+
}
|
|
132
|
+
if (opts?.errorMessage?.trim()) {
|
|
133
|
+
lines.push(` error ${opts.errorMessage.trim()}`);
|
|
134
|
+
}
|
|
135
|
+
if (shouldShowLogTail(status, opts?.includeLogTail, opts?.logLines)) {
|
|
136
|
+
lines.push("", L.logTail, ...opts.logLines.map((l) => ` ${l}`));
|
|
137
|
+
}
|
|
138
|
+
return lines.join("\n");
|
|
139
|
+
}
|
|
140
|
+
function runShowsLogTail(status) {
|
|
141
|
+
return status === "failed" || status === "timeout";
|
|
142
|
+
}
|
|
143
|
+
function shouldShowLogTail(status, includeLogTail, logLines) {
|
|
144
|
+
if (includeLogTail === false) return false;
|
|
145
|
+
if (!logLines || logLines.length === 0) return false;
|
|
146
|
+
return runShowsLogTail(status);
|
|
147
|
+
}
|
|
148
|
+
function formatFinishedRunCard(agentName, status, opts) {
|
|
149
|
+
const L = resolveLabels(opts?.labels);
|
|
150
|
+
const icon = getAgentRunStatusIcon(status);
|
|
151
|
+
const age = formatRunAge(opts?.timing, opts?.now);
|
|
152
|
+
const summary = [status, age, formatProgressRow(opts?.toolCallCount, opts?.lastToolNames)].filter(Boolean).join(" \xB7 ");
|
|
153
|
+
const lines = [L.runFinished, ` ${icon} ${summary}`];
|
|
154
|
+
const identity = formatIdentityRow(agentName, opts?.runId);
|
|
155
|
+
if (identity) {
|
|
156
|
+
lines.push(` agent ${identity}`);
|
|
157
|
+
}
|
|
158
|
+
const note = opts?.lastAssistantText?.trim();
|
|
159
|
+
if (note) {
|
|
160
|
+
lines.push(` note ${clipText(note, NOTE_PREVIEW_MAX)}`);
|
|
161
|
+
}
|
|
162
|
+
if (opts?.errorMessage?.trim()) {
|
|
163
|
+
lines.push(` error ${opts.errorMessage.trim()}`);
|
|
164
|
+
}
|
|
165
|
+
if (shouldShowLogTail(status, opts?.includeLogTail, opts?.logLines)) {
|
|
166
|
+
lines.push("", L.logTail, ...opts.logLines.map((l) => ` ${l}`));
|
|
167
|
+
}
|
|
168
|
+
return lines.join("\n");
|
|
169
|
+
}
|
|
170
|
+
function formatStopRunCard(status = "killed", labels) {
|
|
171
|
+
const L = resolveLabels(labels);
|
|
172
|
+
const icon = getAgentRunStatusIcon(status);
|
|
173
|
+
return `${L.runStopped}
|
|
174
|
+
${icon} ${status}`;
|
|
175
|
+
}
|
|
176
|
+
function formatListRunsCard(runs, labels) {
|
|
177
|
+
const L = resolveLabels(labels);
|
|
178
|
+
const lines = [L.runs(runs.length)];
|
|
179
|
+
for (const run of runs) {
|
|
180
|
+
const status = run.status ?? "\u2014";
|
|
181
|
+
const icon = getAgentRunStatusIcon(status);
|
|
182
|
+
lines.push(` ${icon} ${resolveRunLabel(run)}`);
|
|
183
|
+
}
|
|
184
|
+
return lines.join("\n");
|
|
185
|
+
}
|
|
186
|
+
function formatNotFoundRunCard(labels) {
|
|
187
|
+
const L = resolveLabels(labels);
|
|
188
|
+
return `${L.runStatus}
|
|
189
|
+
? not_found`;
|
|
190
|
+
}
|
|
191
|
+
var AGENT_RUN_TERMINAL_STATUSES = /* @__PURE__ */ new Set([
|
|
192
|
+
"done",
|
|
193
|
+
"failed",
|
|
194
|
+
"timeout",
|
|
195
|
+
"killed",
|
|
196
|
+
"cancelled",
|
|
197
|
+
// orphaned: pid gone but the run record was still "running" — the process
|
|
198
|
+
// died (killed/OOM/crashed) before writing its own terminal status. Treated
|
|
199
|
+
// as terminal by all display/filter/GC consumers.
|
|
200
|
+
"orphaned"
|
|
201
|
+
]);
|
|
202
|
+
function isAgentRunTerminalStatus(status) {
|
|
203
|
+
return typeof status === "string" && AGENT_RUN_TERMINAL_STATUSES.has(status);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export {
|
|
207
|
+
getAgentRunStatusIcon,
|
|
208
|
+
shortRunId,
|
|
209
|
+
clipText,
|
|
210
|
+
formatDuration,
|
|
211
|
+
formatRunAge,
|
|
212
|
+
isAgentNameFallback,
|
|
213
|
+
resolveRunLabel,
|
|
214
|
+
formatStartRunCard,
|
|
215
|
+
TASK_PREVIEW_MAX,
|
|
216
|
+
formatStatusRunCard,
|
|
217
|
+
runShowsLogTail,
|
|
218
|
+
formatFinishedRunCard,
|
|
219
|
+
formatStopRunCard,
|
|
220
|
+
formatListRunsCard,
|
|
221
|
+
formatNotFoundRunCard,
|
|
222
|
+
isAgentRunTerminalStatus
|
|
223
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCliLocalRuntimeAdapter,
|
|
3
3
|
summarizeEndpoint
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-RUTSBLDM.js";
|
|
5
5
|
import {
|
|
6
6
|
clipMultilineText
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-J67FKTTY.js";
|
|
8
8
|
import {
|
|
9
9
|
runLocalAgentTurn
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-VVKQFITN.js";
|
|
11
11
|
import {
|
|
12
12
|
resolveLocalRuntimeEnvFromPolicy
|
|
13
13
|
} from "./chunk-5CS33IBL.js";
|
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
listUserRecordsFromServers,
|
|
8
8
|
readDbRecordFromServers,
|
|
9
9
|
readLiveDbRecordAfterTombstoneMerge
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-VST53WEL.js";
|
|
11
11
|
import {
|
|
12
12
|
buildDialogAttachmentPlan,
|
|
13
13
|
extractFileContentIds
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-B5TOXZAK.js";
|
|
15
15
|
import {
|
|
16
16
|
toErrorMessage
|
|
17
17
|
} from "./chunk-HNMXYYJR.js";
|
|
@@ -625,7 +625,7 @@ async function tryHttpDialogCandidates(args) {
|
|
|
625
625
|
throw Object.assign(new Error("All HTTP dialog reads failed"), { attempts });
|
|
626
626
|
}
|
|
627
627
|
async function readDialogFromLocalDb(dialogKey, dialogId, limit) {
|
|
628
|
-
const { readDialogFromLocalDb: readLocalDialog } = await import("./localDialogRead-
|
|
628
|
+
const { readDialogFromLocalDb: readLocalDialog } = await import("./localDialogRead-HQZPVIE3.js");
|
|
629
629
|
const result = await readLocalDialog({ dialogKey, dialogId, limit });
|
|
630
630
|
return {
|
|
631
631
|
...result,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
platformHostedModels,
|
|
16
16
|
xaiModels,
|
|
17
17
|
zaiModels
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-O6W2O2DA.js";
|
|
19
19
|
import {
|
|
20
20
|
__export
|
|
21
21
|
} from "./chunk-4VNS5WPM.js";
|
|
@@ -78,6 +78,45 @@ var anthropicModels = [
|
|
|
78
78
|
}
|
|
79
79
|
];
|
|
80
80
|
|
|
81
|
+
// packages/integrations/anthropic/anthropicOAuthModels.ts
|
|
82
|
+
var oauthModel = ({ name, displayName, contextWindow, thinkingMode, maxOutputTokens }) => ({
|
|
83
|
+
name,
|
|
84
|
+
displayName,
|
|
85
|
+
hasVision: true,
|
|
86
|
+
description: `OAuth \u8BA2\u9605\u6A21\u578B\uFF08${displayName}\uFF0C${thinkingMode === "adaptive" ? "Adaptive thinking" : "Extended thinking"}\uFF09`,
|
|
87
|
+
contextWindow,
|
|
88
|
+
...maxOutputTokens ? { maxOutputTokens } : {},
|
|
89
|
+
supportsReasoningEffort: true,
|
|
90
|
+
price: { input: 0, output: 0 }
|
|
91
|
+
});
|
|
92
|
+
var anthropicOAuthModels = [
|
|
93
|
+
// 5 代(1M + Adaptive thinking always-on;官方 max output 128k)
|
|
94
|
+
oauthModel({ name: "claude-fable-5", displayName: "Claude Fable 5", contextWindow: 1e6, thinkingMode: "adaptive", maxOutputTokens: 128e3 }),
|
|
95
|
+
oauthModel({ name: "claude-opus-5", displayName: "Claude Opus 5", contextWindow: 1e6, thinkingMode: "adaptive", maxOutputTokens: 128e3 }),
|
|
96
|
+
oauthModel({ name: "claude-sonnet-5", displayName: "Claude Sonnet 5", contextWindow: 1e6, thinkingMode: "adaptive", maxOutputTokens: 128e3 }),
|
|
97
|
+
// 4.6/4.7/4.8 系(Adaptive thinking;context 官方未单列,参照 fuzzy claude-4.6→1M)
|
|
98
|
+
oauthModel({ name: "claude-opus-4-8", displayName: "Claude Opus 4.8", contextWindow: 1e6, thinkingMode: "adaptive" }),
|
|
99
|
+
oauthModel({ name: "claude-opus-4-7", displayName: "Claude Opus 4.7", contextWindow: 1e6, thinkingMode: "adaptive" }),
|
|
100
|
+
oauthModel({ name: "claude-sonnet-4-6", displayName: "Claude Sonnet 4.6", contextWindow: 1e6, thinkingMode: "adaptive" }),
|
|
101
|
+
oauthModel({ name: "claude-opus-4-6", displayName: "Claude Opus 4.6", contextWindow: 1e6, thinkingMode: "adaptive" }),
|
|
102
|
+
// 4.5 系(Extended thinking;官方发布规格 1M)
|
|
103
|
+
oauthModel({ name: "claude-opus-4-5-20251101", displayName: "Claude Opus 4.5", contextWindow: 1e6, thinkingMode: "extended" }),
|
|
104
|
+
oauthModel({ name: "claude-sonnet-4-5-20250929", displayName: "Claude Sonnet 4.5", contextWindow: 1e6, thinkingMode: "extended" }),
|
|
105
|
+
// haiku-4-5(官方明确 context=200k + Extended thinking)
|
|
106
|
+
oauthModel({ name: "claude-haiku-4-5-20251001", displayName: "Claude Haiku 4.5", contextWindow: 2e5, thinkingMode: "extended" })
|
|
107
|
+
];
|
|
108
|
+
var OAUTH_MODEL_THINKING_MODE = new Map(
|
|
109
|
+
anthropicOAuthModels.map((m) => [m.name, m.thinkingMode])
|
|
110
|
+
);
|
|
111
|
+
function isAdaptiveThinkingModelId(model) {
|
|
112
|
+
if (!model) return false;
|
|
113
|
+
const tableMode = OAUTH_MODEL_THINKING_MODE.get(model);
|
|
114
|
+
if (tableMode === "adaptive") return true;
|
|
115
|
+
if (tableMode === "extended") return false;
|
|
116
|
+
const n = model.toLowerCase();
|
|
117
|
+
return n.includes("fable-5") || n.includes("opus-5") || n.includes("sonnet-5") || n.includes("opus-4-8") || n.includes("opus-4-7") || n.includes("sonnet-4-6") || n.includes("opus-4-6");
|
|
118
|
+
}
|
|
119
|
+
|
|
81
120
|
// packages/integrations/qwen/models.ts
|
|
82
121
|
var qwenModels = [
|
|
83
122
|
// ── Qwen3 旗舰 ──
|
|
@@ -402,21 +441,6 @@ var moonshotModels = [
|
|
|
402
441
|
price: { input: 0.6 * 7, output: 2.4 * 7 },
|
|
403
442
|
provider: "moonshot",
|
|
404
443
|
description: "Moonshot \u9AD8\u6027\u80FD\u901A\u7528\u6A21\u578B\u3002"
|
|
405
|
-
},
|
|
406
|
-
// ── 编程 ──
|
|
407
|
-
{
|
|
408
|
-
name: "kimi-k2.7-code",
|
|
409
|
-
displayName: "Kimi K2.7 Code",
|
|
410
|
-
hasVision: false,
|
|
411
|
-
contextWindow: 262144,
|
|
412
|
-
maxOutputTokens: 262144,
|
|
413
|
-
jsonOutput: true,
|
|
414
|
-
fnCall: true,
|
|
415
|
-
supportsTool: true,
|
|
416
|
-
supportsReasoningEffort: true,
|
|
417
|
-
price: { input: 1.2 * 7, output: 4.8 * 7 },
|
|
418
|
-
provider: "moonshot",
|
|
419
|
-
description: "Moonshot \u7F16\u7A0B\u4F18\u5316\u6A21\u578B\uFF0C\u9002\u5408\u4EE3\u7801\u751F\u6210\u4E0E Agent \u7F16\u7A0B\u3002"
|
|
420
444
|
}
|
|
421
445
|
];
|
|
422
446
|
var kimiCodeModels = [
|
|
@@ -4545,6 +4569,9 @@ var NEVER = INVALID;
|
|
|
4545
4569
|
var PROVIDER_REASONING_EFFORT_VALUES = {
|
|
4546
4570
|
openai: ["none", "minimal", "low", "medium", "high", "xhigh", "max"],
|
|
4547
4571
|
deepseek: ["low", "high", "max"],
|
|
4572
|
+
// nolo (Ollama Cloud) 支持 DeepSeek/Kimi/GLM 等 thinking 模型,
|
|
4573
|
+
// reasoning_effort 通过 OpenAI 兼容端点透传到 Ollama Cloud。
|
|
4574
|
+
nolo: ["low", "high", "max"],
|
|
4548
4575
|
xai: ["low", "medium", "high"],
|
|
4549
4576
|
grok: ["low", "medium", "high"],
|
|
4550
4577
|
// none:关闭思考;必须保留,否则上游 clamp 会把 none 抬成 low,
|
|
@@ -4695,7 +4722,7 @@ var MODEL_MAP = {
|
|
|
4695
4722
|
moonshot: moonshotAllModels
|
|
4696
4723
|
};
|
|
4697
4724
|
var MODEL_LOOKUP_MAP = {
|
|
4698
|
-
anthropic: anthropicModels,
|
|
4725
|
+
anthropic: [...anthropicModels, ...anthropicOAuthModels],
|
|
4699
4726
|
xai: xaiModels,
|
|
4700
4727
|
...MODEL_MAP
|
|
4701
4728
|
};
|
|
@@ -4789,8 +4816,9 @@ var API_ENDPOINTS = {
|
|
|
4789
4816
|
default: "https://api.x.ai/v1/chat/completions"
|
|
4790
4817
|
},
|
|
4791
4818
|
deepseek: {
|
|
4792
|
-
|
|
4793
|
-
|
|
4819
|
+
// No `responses` entry: the official DeepSeek provider was retired and no
|
|
4820
|
+
// deepseek model declares endpointKey "responses", so it was unreachable.
|
|
4821
|
+
default: "https://api.deepseek.com/chat/completions"
|
|
4794
4822
|
},
|
|
4795
4823
|
deepinfra: {
|
|
4796
4824
|
default: "https://api.deepinfra.com/v1/openai/chat/completions"
|
|
@@ -4861,10 +4889,24 @@ function getApiEndpoint(agent) {
|
|
|
4861
4889
|
}
|
|
4862
4890
|
return url;
|
|
4863
4891
|
}
|
|
4892
|
+
const OAUTH_API_KEY_REFS = /* @__PURE__ */ new Set([
|
|
4893
|
+
"chatgpt",
|
|
4894
|
+
"xai",
|
|
4895
|
+
"antigravity",
|
|
4896
|
+
"claude",
|
|
4897
|
+
"cursor"
|
|
4898
|
+
]);
|
|
4864
4899
|
if (!effectiveProvider || effectiveProvider.toLowerCase() === "custom" || agent.apiSource === "custom") {
|
|
4865
4900
|
if (agent.useServerProxy) {
|
|
4866
4901
|
return "";
|
|
4867
4902
|
}
|
|
4903
|
+
const apiKeyRef = agent.apiKeyRef;
|
|
4904
|
+
if (apiKeyRef && OAUTH_API_KEY_REFS.has(apiKeyRef)) {
|
|
4905
|
+
return "";
|
|
4906
|
+
}
|
|
4907
|
+
if (effectiveProvider && API_ENDPOINTS[effectiveProvider]) {
|
|
4908
|
+
return "";
|
|
4909
|
+
}
|
|
4868
4910
|
throw new Error(
|
|
4869
4911
|
"Custom provider URL is required when apiSource is 'custom'."
|
|
4870
4912
|
);
|
|
@@ -4889,6 +4931,7 @@ function getApiEndpoint(agent) {
|
|
|
4889
4931
|
}
|
|
4890
4932
|
|
|
4891
4933
|
export {
|
|
4934
|
+
isAdaptiveThinkingModelId,
|
|
4892
4935
|
isModelSupportReasoningEffort,
|
|
4893
4936
|
clampReasoningEffort,
|
|
4894
4937
|
MODEL_LOOKUP_MAP,
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildLocalAgentLookupKeys,
|
|
3
|
-
normalizeAgentHandle,
|
|
4
3
|
shouldReadAgentKeyRemotely
|
|
5
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BE2GNT5E.js";
|
|
6
5
|
import {
|
|
7
6
|
resolveCliAgentKeyInput
|
|
8
7
|
} from "./chunk-VHBWHNVT.js";
|
|
@@ -22,10 +21,17 @@ import {
|
|
|
22
21
|
} from "./chunk-A7GB5UGH.js";
|
|
23
22
|
import {
|
|
24
23
|
createAgentKey
|
|
25
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-6Y7A3OQQ.js";
|
|
26
25
|
|
|
27
26
|
// packages/cli/agentRecordHelpers.ts
|
|
28
27
|
import { readFileSync } from "node:fs";
|
|
28
|
+
|
|
29
|
+
// packages/core/agentHandle.ts
|
|
30
|
+
function normalizeAgentHandle(value) {
|
|
31
|
+
return typeof value === "string" && value.trim() ? value.trim().toLowerCase().replace(/\s+/g, " ") : void 0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// packages/cli/agentRecordHelpers.ts
|
|
29
35
|
var PROVIDER_COPY_FIELDS = [
|
|
30
36
|
"apiSource",
|
|
31
37
|
"provider",
|
|
@@ -612,6 +618,7 @@ async function buildUpdatedAgentRecord(args) {
|
|
|
612
618
|
}
|
|
613
619
|
|
|
614
620
|
export {
|
|
621
|
+
normalizeAgentHandle,
|
|
615
622
|
fetchWithTransportFallback,
|
|
616
623
|
readAgentRecord,
|
|
617
624
|
readDbRecord,
|