nolo-cli 0.24.0-alpha.6 → 0.24.0-alpha.8
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/{agentEmailCommands-QTGQ3ZAD.js → agentEmailCommands-2TGEUNEG.js} +2 -2
- package/{agentMachineCommands-4PXIT4BP.js → agentMachineCommands-UYPSQ5LU.js} +1 -1
- package/{agentRecordCommands-ZZPTYTYR.js → agentRecordCommands-LKE5HYO5.js} +2 -2
- package/{agentRunCommand-7ZTPZNUX.js → agentRunCommand-BI53VGZX.js} +2 -2
- package/{chunk-ROYOKSX4.js → chunk-3MXMWN6W.js} +1 -1
- package/{chunk-OJFYT3ZQ.js → chunk-KI4HAIHQ.js} +4 -0
- package/{chunk-TN4YHAI3.js → chunk-MYSH5YAA.js} +1 -1
- package/{chunk-35RYGII3.js → chunk-SWMCYK4O.js} +66 -0
- package/{chunk-H6ODMJR3.js → chunk-YINXZURV.js} +1 -1
- package/index.js +21 -21
- package/{machineCommands-NI76PVHK.js → machineCommands-B3CAYTSB.js} +2 -2
- package/{machineWsRunDispatch-W3G6NJVQ.js → machineWsRunDispatch-B72PNO7F.js} +2 -2
- package/package.json +1 -1
- package/{readlineWorkspace-BDH4G477.js → readlineWorkspace-2Z6XIXPW.js} +53 -5
- package/{updateCommands-HTCOBXCA.js → updateCommands-FEGVYDMO.js} +7 -1
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
} from "./chunk-DZ3XJVET.js";
|
|
9
9
|
import {
|
|
10
10
|
runAgentCreateCommand
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-MYSH5YAA.js";
|
|
12
|
+
import "./chunk-KI4HAIHQ.js";
|
|
13
13
|
import "./chunk-IICW77GI.js";
|
|
14
14
|
import {
|
|
15
15
|
getReadableCliDb
|
|
@@ -80,7 +80,7 @@ async function defaultExecuteCli(provider, prompt, options) {
|
|
|
80
80
|
return executeCli(provider, prompt, options);
|
|
81
81
|
}
|
|
82
82
|
async function forwardConnectorRunMessage(machine, message, pushMessage, executeCli, env, fetchImpl) {
|
|
83
|
-
const { handleConnectorRunMessage } = await import("./machineWsRunDispatch-
|
|
83
|
+
const { handleConnectorRunMessage } = await import("./machineWsRunDispatch-B72PNO7F.js");
|
|
84
84
|
return handleConnectorRunMessage(message, pushMessage, executeCli, env, fetchImpl);
|
|
85
85
|
}
|
|
86
86
|
async function detectLaunchableMachineInfo() {
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
runAgentCreateCommand,
|
|
3
3
|
runAgentReadCommand,
|
|
4
4
|
runAgentUpdateCommand
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-MYSH5YAA.js";
|
|
6
|
+
import "./chunk-KI4HAIHQ.js";
|
|
7
7
|
import "./chunk-IICW77GI.js";
|
|
8
8
|
import "./chunk-WFHXMLHZ.js";
|
|
9
9
|
import "./chunk-JBLY6HQP.js";
|
|
@@ -7,12 +7,12 @@ import {
|
|
|
7
7
|
prependSubjectDialogMarker,
|
|
8
8
|
resolveWorkflowReference,
|
|
9
9
|
runAgentRunCommand
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-3MXMWN6W.js";
|
|
11
11
|
import {
|
|
12
12
|
parseAgentRunArgs
|
|
13
13
|
} from "./chunk-DZ3XJVET.js";
|
|
14
14
|
import "./chunk-6HYVJV7B.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-KI4HAIHQ.js";
|
|
16
16
|
import "./chunk-IICW77GI.js";
|
|
17
17
|
import "./chunk-WFHXMLHZ.js";
|
|
18
18
|
import "./chunk-JBLY6HQP.js";
|
|
@@ -862,6 +862,10 @@ Use /switch, /switch list, /switch minimax-m3, or a full agent key.`,
|
|
|
862
862
|
zh: "nolo {0}\n\u7528 nolo update \u66F4\u65B0\u5F53\u524D\u5B89\u88C5\u3002\n\u5982\u679C\u672C\u5730\u4ED3\u5E93\u8F93\u51FA\u7684\u7248\u672C\u4E0D\u540C\uFF0C\u8BF7\u5148\u53D1\u5E03/\u5B89\u88C5\u6700\u65B0\u7684 npm \u5305\u3002"
|
|
863
863
|
},
|
|
864
864
|
versionUnknown: { en: "unknown version", zh: "\u672A\u77E5\u7248\u672C" },
|
|
865
|
+
updateAvailable: {
|
|
866
|
+
en: "New nolo {0} available (you have {1}) \u2014 run /update to upgrade",
|
|
867
|
+
zh: "\u65B0\u7248\u672C nolo {0} \u53EF\u7528\uFF08\u5F53\u524D {1}\uFF09\u2014 \u8FD0\u884C /update \u5347\u7EA7"
|
|
868
|
+
},
|
|
865
869
|
// --- Dialog list / timestamps -----------------------------------------
|
|
866
870
|
recentDialogs: { en: "Recent dialogs:", zh: "\u6700\u8FD1\u5BF9\u8BDD\uFF1A" },
|
|
867
871
|
dialogListTip: {
|
|
@@ -270,6 +270,69 @@ Nolo Agent CLI Installer & Updater
|
|
|
270
270
|
}
|
|
271
271
|
return exitCode;
|
|
272
272
|
}
|
|
273
|
+
var NOLO_UPDATE_CHECK_KILL_SWITCH = "NOLO_CLI_NO_UPDATE_CHECK";
|
|
274
|
+
function parseCliVersion(raw) {
|
|
275
|
+
const match = /^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/.exec(raw.trim());
|
|
276
|
+
if (!match) return null;
|
|
277
|
+
return {
|
|
278
|
+
main: [Number(match[1]), Number(match[2]), Number(match[3])],
|
|
279
|
+
pre: match[4] ? match[4].split(".") : []
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
function compareCliVersions(a, b) {
|
|
283
|
+
const pa = parseCliVersion(a);
|
|
284
|
+
const pb = parseCliVersion(b);
|
|
285
|
+
if (!pa || !pb) return a.localeCompare(b);
|
|
286
|
+
for (let i = 0; i < 3; i++) {
|
|
287
|
+
if (pa.main[i] !== pb.main[i]) return pa.main[i] < pb.main[i] ? -1 : 1;
|
|
288
|
+
}
|
|
289
|
+
if (pa.pre.length === 0 && pb.pre.length === 0) return 0;
|
|
290
|
+
if (pa.pre.length === 0) return 1;
|
|
291
|
+
if (pb.pre.length === 0) return -1;
|
|
292
|
+
const len = Math.max(pa.pre.length, pb.pre.length);
|
|
293
|
+
for (let i = 0; i < len; i++) {
|
|
294
|
+
const x = pa.pre[i];
|
|
295
|
+
const y = pb.pre[i];
|
|
296
|
+
if (x === void 0) return -1;
|
|
297
|
+
if (y === void 0) return 1;
|
|
298
|
+
if (x === y) continue;
|
|
299
|
+
const xn = /^\d+$/.test(x) ? Number(x) : NaN;
|
|
300
|
+
const yn = /^\d+$/.test(y) ? Number(y) : NaN;
|
|
301
|
+
if (!Number.isNaN(xn) && !Number.isNaN(yn)) return xn < yn ? -1 : 1;
|
|
302
|
+
if (!Number.isNaN(xn)) return -1;
|
|
303
|
+
if (!Number.isNaN(yn)) return 1;
|
|
304
|
+
return x < y ? -1 : 1;
|
|
305
|
+
}
|
|
306
|
+
return 0;
|
|
307
|
+
}
|
|
308
|
+
async function checkForCliUpdate(currentVersion, serverUrl, options = {}) {
|
|
309
|
+
const env = options.env ?? process.env;
|
|
310
|
+
if ((env[NOLO_UPDATE_CHECK_KILL_SWITCH] ?? process.env[NOLO_UPDATE_CHECK_KILL_SWITCH]) === "1") {
|
|
311
|
+
return null;
|
|
312
|
+
}
|
|
313
|
+
if (!currentVersion || !parseCliVersion(currentVersion)) return null;
|
|
314
|
+
const channel = getCliInstallChannel(serverUrl);
|
|
315
|
+
const fetchImpl = options.fetchImpl ?? fetch;
|
|
316
|
+
const timeoutMs = options.timeoutMs ?? 2e3;
|
|
317
|
+
try {
|
|
318
|
+
const res = await fetchImpl(
|
|
319
|
+
`https://registry.npmjs.org/nolo-cli/${channel}`,
|
|
320
|
+
{
|
|
321
|
+
signal: AbortSignal.timeout(timeoutMs),
|
|
322
|
+
headers: { accept: "application/json" }
|
|
323
|
+
}
|
|
324
|
+
);
|
|
325
|
+
if (!res.ok) return null;
|
|
326
|
+
const data = await res.json();
|
|
327
|
+
const latestVersion = data.version;
|
|
328
|
+
if (!latestVersion || !parseCliVersion(latestVersion) || compareCliVersions(latestVersion, currentVersion) <= 0) {
|
|
329
|
+
return null;
|
|
330
|
+
}
|
|
331
|
+
return { latestVersion, channel };
|
|
332
|
+
} catch {
|
|
333
|
+
return null;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
273
336
|
async function runSelfUpdate(outputOrOptions) {
|
|
274
337
|
const options = outputOrOptions === void 0 ? {} : isRunSelfUpdateOptions(outputOrOptions) ? outputOrOptions : { output: outputOrOptions };
|
|
275
338
|
if (isCompiledBinary()) {
|
|
@@ -337,5 +400,8 @@ export {
|
|
|
337
400
|
resolveSelfUpdateServerUrl,
|
|
338
401
|
buildCliDoctorText,
|
|
339
402
|
runStandaloneBundleUpdate,
|
|
403
|
+
NOLO_UPDATE_CHECK_KILL_SWITCH,
|
|
404
|
+
compareCliVersions,
|
|
405
|
+
checkForCliUpdate,
|
|
340
406
|
runSelfUpdate
|
|
341
407
|
};
|
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
readPackageInfo
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-SWMCYK4O.js";
|
|
5
5
|
import {
|
|
6
6
|
buildCliRuntimeEnv,
|
|
7
7
|
loadProfileConfig
|
|
@@ -126,7 +126,7 @@ function createDaemonShortcutCommand(path, description, command2) {
|
|
|
126
126
|
// packages/cli/agentInternalCommandEntries.ts
|
|
127
127
|
function getAgentInternalCommandEntries() {
|
|
128
128
|
const createAgentRunCommand = (path, description) => createContextCommand(path, description, async (args2, ctx) => {
|
|
129
|
-
const { runAgentRunCommand } = await import("./agentRunCommand-
|
|
129
|
+
const { runAgentRunCommand } = await import("./agentRunCommand-BI53VGZX.js");
|
|
130
130
|
return runAgentRunCommand(args2, {
|
|
131
131
|
env: ctx.env,
|
|
132
132
|
scriptDir: ctx.scriptDir,
|
|
@@ -142,7 +142,7 @@ function getAgentInternalCommandEntries() {
|
|
|
142
142
|
return runAgentListCommand(args2, deps);
|
|
143
143
|
}),
|
|
144
144
|
createEnvCommand(["agent", "create"], "Create a new agent", async (args2, deps) => {
|
|
145
|
-
const { runAgentCreateCommand } = await import("./agentRecordCommands-
|
|
145
|
+
const { runAgentCreateCommand } = await import("./agentRecordCommands-LKE5HYO5.js");
|
|
146
146
|
return runAgentCreateCommand(args2, deps);
|
|
147
147
|
}),
|
|
148
148
|
createEnvCommand(["agent", "pull"], "Cache an agent for local runs", async (args2, deps) => {
|
|
@@ -150,7 +150,7 @@ function getAgentInternalCommandEntries() {
|
|
|
150
150
|
return runAgentPullCommand(args2, deps);
|
|
151
151
|
}),
|
|
152
152
|
createEnvCommand(["agent", "read"], "Read a single agent", async (args2, deps) => {
|
|
153
|
-
const { runAgentReadCommand } = await import("./agentRecordCommands-
|
|
153
|
+
const { runAgentReadCommand } = await import("./agentRecordCommands-LKE5HYO5.js");
|
|
154
154
|
return runAgentReadCommand(args2, deps);
|
|
155
155
|
}),
|
|
156
156
|
createAgentRunCommand(["agent", "run"], "Run an agent"),
|
|
@@ -179,26 +179,26 @@ function getAgentInternalCommandEntries() {
|
|
|
179
179
|
return runSetupOfflineMarxistsAgentCommand(args2, deps);
|
|
180
180
|
}),
|
|
181
181
|
createEnvCommand(["agent", "update"], "Update agent fields", async (args2, deps) => {
|
|
182
|
-
const { runAgentUpdateCommand } = await import("./agentRecordCommands-
|
|
182
|
+
const { runAgentUpdateCommand } = await import("./agentRecordCommands-LKE5HYO5.js");
|
|
183
183
|
return runAgentUpdateCommand(args2, deps);
|
|
184
184
|
}),
|
|
185
185
|
createEnvCommand(["agent", "email", "provision"], "Provision a controlled inbox for an agent", async (args2, deps) => {
|
|
186
|
-
const { runAgentEmailProvisionCommand } = await import("./agentEmailCommands-
|
|
186
|
+
const { runAgentEmailProvisionCommand } = await import("./agentEmailCommands-2TGEUNEG.js");
|
|
187
187
|
return runAgentEmailProvisionCommand(args2, deps);
|
|
188
188
|
}),
|
|
189
189
|
createEnvCommand(["agent", "email", "bind"], "Bind an existing email address to an agent", async (args2, deps) => {
|
|
190
|
-
const { runAgentEmailBindCommand } = await import("./agentEmailCommands-
|
|
190
|
+
const { runAgentEmailBindCommand } = await import("./agentEmailCommands-2TGEUNEG.js");
|
|
191
191
|
return runAgentEmailBindCommand(args2, deps);
|
|
192
192
|
}),
|
|
193
193
|
createEnvCommand(["agent", "email", "transfer"], "Transfer an email identity from one agent to another (cross-account)", async (args2, deps) => {
|
|
194
|
-
const { runAgentEmailTransferCommand } = await import("./agentEmailCommands-
|
|
194
|
+
const { runAgentEmailTransferCommand } = await import("./agentEmailCommands-2TGEUNEG.js");
|
|
195
195
|
return runAgentEmailTransferCommand(args2, deps);
|
|
196
196
|
}),
|
|
197
197
|
createEnvCommand(
|
|
198
198
|
["agent", "email", "create-and-provision"],
|
|
199
199
|
"Create an agent and provision its controlled inbox",
|
|
200
200
|
async (args2, deps) => {
|
|
201
|
-
const { runAgentEmailCreateAndProvisionCommand } = await import("./agentEmailCommands-
|
|
201
|
+
const { runAgentEmailCreateAndProvisionCommand } = await import("./agentEmailCommands-2TGEUNEG.js");
|
|
202
202
|
return runAgentEmailCreateAndProvisionCommand(args2, deps);
|
|
203
203
|
}
|
|
204
204
|
),
|
|
@@ -219,15 +219,15 @@ function getAgentInternalCommandEntries() {
|
|
|
219
219
|
return runAgentRevokeGrantCommand(args2, deps);
|
|
220
220
|
}),
|
|
221
221
|
createEnvCommand(["agent", "bind-current"], "Bind an agent to this machine", async (args2, deps) => {
|
|
222
|
-
const { runAgentBindCurrentCommand } = await import("./agentMachineCommands-
|
|
222
|
+
const { runAgentBindCurrentCommand } = await import("./agentMachineCommands-UYPSQ5LU.js");
|
|
223
223
|
return runAgentBindCurrentCommand(args2, deps);
|
|
224
224
|
}),
|
|
225
225
|
createEnvCommand(["agent", "smoke-current"], "Smoke test a bound agent through this machine", async (args2, deps) => {
|
|
226
|
-
const { runAgentSmokeCurrentCommand } = await import("./agentMachineCommands-
|
|
226
|
+
const { runAgentSmokeCurrentCommand } = await import("./agentMachineCommands-UYPSQ5LU.js");
|
|
227
227
|
return runAgentSmokeCurrentCommand(args2, deps);
|
|
228
228
|
}),
|
|
229
229
|
createEnvCommand(["agent", "runtime-doctor"], "Diagnose current machine runtime compatibility", async (args2, deps) => {
|
|
230
|
-
const { runAgentRuntimeDoctorCommand } = await import("./agentMachineCommands-
|
|
230
|
+
const { runAgentRuntimeDoctorCommand } = await import("./agentMachineCommands-UYPSQ5LU.js");
|
|
231
231
|
return runAgentRuntimeDoctorCommand(args2, deps);
|
|
232
232
|
}),
|
|
233
233
|
createAgentRunCommand(["agent", "chat"], "Chat with an agent")
|
|
@@ -408,15 +408,15 @@ function getSystemInternalCommandEntries(renderHelpText2) {
|
|
|
408
408
|
return runWhoamiCommand({ args: args2, env: ctx.env });
|
|
409
409
|
}),
|
|
410
410
|
createEntrypointEnvCommand(["connect"], "Send machine heartbeats or hold a connector websocket", async (args2, deps) => {
|
|
411
|
-
const { runMachineConnectCommand } = await import("./machineCommands-
|
|
411
|
+
const { runMachineConnectCommand } = await import("./machineCommands-B3CAYTSB.js");
|
|
412
412
|
return runMachineConnectCommand(args2, deps);
|
|
413
413
|
}),
|
|
414
414
|
createDaemonShortcutCommand(["daemon"], "Run the connector daemon shortcut", async (args2, deps) => {
|
|
415
|
-
const { runMachineConnectCommand } = await import("./machineCommands-
|
|
415
|
+
const { runMachineConnectCommand } = await import("./machineCommands-B3CAYTSB.js");
|
|
416
416
|
return runMachineConnectCommand(args2, deps);
|
|
417
417
|
}),
|
|
418
418
|
createEnvCommand(["machine", "status"], "List machines registered to the current profile", async (args2, deps) => {
|
|
419
|
-
const { runMachineStatusCommand } = await import("./machineCommands-
|
|
419
|
+
const { runMachineStatusCommand } = await import("./machineCommands-B3CAYTSB.js");
|
|
420
420
|
return runMachineStatusCommand(args2, deps);
|
|
421
421
|
}),
|
|
422
422
|
createEnvCommand(["doctor", "runtime"], "Diagnose local-first agent runtime selection", async (args2, deps) => {
|
|
@@ -424,7 +424,7 @@ function getSystemInternalCommandEntries(renderHelpText2) {
|
|
|
424
424
|
return runDoctorRuntimeCommand(args2, deps);
|
|
425
425
|
}),
|
|
426
426
|
createContextCommand(["doctor"], "Show CLI doctor information", async (_args, ctx) => {
|
|
427
|
-
const { buildCliDoctorText, getCliInstallChannel, resolveSelfUpdateServerUrl } = await import("./updateCommands-
|
|
427
|
+
const { buildCliDoctorText, getCliInstallChannel, resolveSelfUpdateServerUrl } = await import("./updateCommands-FEGVYDMO.js");
|
|
428
428
|
const { isCompiledBinary: isCompiledBinary2 } = await import("./cliEnvHelpers-ZXNMX7VV.js");
|
|
429
429
|
const serverUrl = resolveSelfUpdateServerUrl(ctx.env);
|
|
430
430
|
console.log(
|
|
@@ -441,7 +441,7 @@ function getSystemInternalCommandEntries(renderHelpText2) {
|
|
|
441
441
|
return 0;
|
|
442
442
|
}),
|
|
443
443
|
createContextCommand(["update"], "Update the CLI", async (_args, ctx) => {
|
|
444
|
-
const { resolveSelfUpdateServerUrl, runSelfUpdate } = await import("./updateCommands-
|
|
444
|
+
const { resolveSelfUpdateServerUrl, runSelfUpdate } = await import("./updateCommands-FEGVYDMO.js");
|
|
445
445
|
return runSelfUpdate({
|
|
446
446
|
entrypointPath: ctx.entrypointPath,
|
|
447
447
|
serverUrl: resolveSelfUpdateServerUrl(ctx.env),
|
|
@@ -449,17 +449,17 @@ function getSystemInternalCommandEntries(renderHelpText2) {
|
|
|
449
449
|
});
|
|
450
450
|
}),
|
|
451
451
|
createContextCommand(["version"], "Show CLI version", async (_args, ctx) => {
|
|
452
|
-
const { buildCliVersionText } = await import("./updateCommands-
|
|
452
|
+
const { buildCliVersionText } = await import("./updateCommands-FEGVYDMO.js");
|
|
453
453
|
console.log(buildCliVersionText(ctx.packageInfo));
|
|
454
454
|
return 0;
|
|
455
455
|
}),
|
|
456
456
|
createContextCommand(["--version"], "Show CLI version", async (_args, ctx) => {
|
|
457
|
-
const { buildCliVersionText } = await import("./updateCommands-
|
|
457
|
+
const { buildCliVersionText } = await import("./updateCommands-FEGVYDMO.js");
|
|
458
458
|
console.log(buildCliVersionText(ctx.packageInfo));
|
|
459
459
|
return 0;
|
|
460
460
|
}),
|
|
461
461
|
createContextCommand(["-v"], "Show CLI version", async (_args, ctx) => {
|
|
462
|
-
const { buildCliVersionText } = await import("./updateCommands-
|
|
462
|
+
const { buildCliVersionText } = await import("./updateCommands-FEGVYDMO.js");
|
|
463
463
|
console.log(buildCliVersionText(ctx.packageInfo));
|
|
464
464
|
return 0;
|
|
465
465
|
}),
|
|
@@ -796,7 +796,7 @@ async function runScript(script, forwardedArgs, env) {
|
|
|
796
796
|
return proc.exited;
|
|
797
797
|
}
|
|
798
798
|
async function launchTuiWorkspace(args2) {
|
|
799
|
-
const { startTuiWorkspace } = await import("./readlineWorkspace-
|
|
799
|
+
const { startTuiWorkspace } = await import("./readlineWorkspace-2Z6XIXPW.js");
|
|
800
800
|
const { createTuiSummaryLlmCaller } = await import("./tuiSummaryLlmCaller-3DYOLTVN.js");
|
|
801
801
|
return startTuiWorkspace({
|
|
802
802
|
...args2,
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
buildMachinePermissionPromptBlock,
|
|
3
3
|
handleConnectorRunMessage,
|
|
4
4
|
resolveMachineRunPermissionPolicy
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-YINXZURV.js";
|
|
6
6
|
import {
|
|
7
7
|
isConnectorWebSocketAuthError,
|
|
8
8
|
isConnectorWebSocketRetryableError,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
detectMachineInfo
|
|
13
13
|
} from "./chunk-6HYVJV7B.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-KI4HAIHQ.js";
|
|
15
15
|
import "./chunk-IICW77GI.js";
|
|
16
16
|
import "./chunk-ZGVW7MSZ.js";
|
|
17
17
|
import "./chunk-VHBWHNVT.js";
|
|
@@ -11,8 +11,8 @@ import {
|
|
|
11
11
|
runtimeWorkspacePermissionPolicy,
|
|
12
12
|
scopePermissionPolicyToRuntimeWorkspace,
|
|
13
13
|
summarizeAgentConfigForLogs
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-YINXZURV.js";
|
|
15
|
+
import "./chunk-KI4HAIHQ.js";
|
|
16
16
|
import "./chunk-IICW77GI.js";
|
|
17
17
|
import "./chunk-ZGVW7MSZ.js";
|
|
18
18
|
import "./chunk-VHBWHNVT.js";
|
package/package.json
CHANGED
|
@@ -59,7 +59,7 @@ import {
|
|
|
59
59
|
visibleWidth,
|
|
60
60
|
wrapTextToLines,
|
|
61
61
|
wrapTranscriptLine
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-3MXMWN6W.js";
|
|
63
63
|
import "./chunk-DZ3XJVET.js";
|
|
64
64
|
import "./chunk-6HYVJV7B.js";
|
|
65
65
|
import {
|
|
@@ -81,7 +81,7 @@ import {
|
|
|
81
81
|
readTimestamp,
|
|
82
82
|
setCliLocale,
|
|
83
83
|
t
|
|
84
|
-
} from "./chunk-
|
|
84
|
+
} from "./chunk-KI4HAIHQ.js";
|
|
85
85
|
import "./chunk-IICW77GI.js";
|
|
86
86
|
import {
|
|
87
87
|
getReadableCliDb
|
|
@@ -211,8 +211,9 @@ import {
|
|
|
211
211
|
toErrorMessage
|
|
212
212
|
} from "./chunk-HNMXYYJR.js";
|
|
213
213
|
import {
|
|
214
|
+
checkForCliUpdate,
|
|
214
215
|
runSelfUpdate
|
|
215
|
-
} from "./chunk-
|
|
216
|
+
} from "./chunk-SWMCYK4O.js";
|
|
216
217
|
import {
|
|
217
218
|
saveProfileAgentSelection,
|
|
218
219
|
saveProfileLocale
|
|
@@ -3299,7 +3300,16 @@ function renderWelcome(state, frame = 0, maxFrames = 0, columns) {
|
|
|
3299
3300
|
if (columns < widestSceneCol) sceneArt = "";
|
|
3300
3301
|
}
|
|
3301
3302
|
const versionLine = colorEnabled ? `${themeColorSequence("accent")}nolo\x1B[0m ${state.cliVersion ?? ""} | server ${state.serverUrl}`.replace(" |", " |") : `nolo ${state.cliVersion ?? ""} | server ${state.serverUrl}`.replace(" |", " |");
|
|
3302
|
-
const
|
|
3303
|
+
const updateLine = state.updateAvailable ? themeText(
|
|
3304
|
+
t(
|
|
3305
|
+
"updateAvailable",
|
|
3306
|
+
state.updateAvailable.latestVersion,
|
|
3307
|
+
state.cliVersion ?? t("versionUnknown")
|
|
3308
|
+
),
|
|
3309
|
+
"accent",
|
|
3310
|
+
colorEnabled
|
|
3311
|
+
) : null;
|
|
3312
|
+
const body = sceneArt ? [sceneArt, versionLine, ...updateLine ? [updateLine] : [], t("welcomeHint"), ""] : [versionLine, ...updateLine ? [updateLine] : [], t("welcomeHint"), ""];
|
|
3303
3313
|
return body.join("\n");
|
|
3304
3314
|
}
|
|
3305
3315
|
function renderPrompt(_state) {
|
|
@@ -6075,7 +6085,9 @@ async function startTuiWorkspace(options) {
|
|
|
6075
6085
|
setActiveTerminalBaseHex(detected.hex);
|
|
6076
6086
|
}
|
|
6077
6087
|
const bannerColumns = output.columns;
|
|
6078
|
-
|
|
6088
|
+
const initialWelcome = renderWelcome(state, 0, 0, bannerColumns);
|
|
6089
|
+
output.write(initialWelcome);
|
|
6090
|
+
const initialBannerLineCount = initialWelcome.split("\n").length;
|
|
6079
6091
|
let lastSentTitle = null;
|
|
6080
6092
|
const syncWindowTitle = () => {
|
|
6081
6093
|
if (!output.isTTY) return;
|
|
@@ -6187,6 +6199,41 @@ async function startTuiWorkspace(options) {
|
|
|
6187
6199
|
scheduleRender();
|
|
6188
6200
|
});
|
|
6189
6201
|
};
|
|
6202
|
+
const repaintBanner = () => {
|
|
6203
|
+
if (!output.isTTY) return;
|
|
6204
|
+
if (fixedInput.isPaused()) return;
|
|
6205
|
+
if (modalOwnsKeyboard) return;
|
|
6206
|
+
const currentColumns = output.columns ?? 80;
|
|
6207
|
+
const welcome = renderWelcome(state, 0, 0, currentColumns);
|
|
6208
|
+
const lines = welcome.split("\n");
|
|
6209
|
+
const safeWidth = Math.max(1, currentColumns);
|
|
6210
|
+
const safeLines = lines.map((line) => padOrTruncateToWidth(line, safeWidth));
|
|
6211
|
+
const clearLines = Math.max(initialBannerLineCount, safeLines.length);
|
|
6212
|
+
output.write("\x1B[?2026h\x1B[?25l");
|
|
6213
|
+
try {
|
|
6214
|
+
let frame = "";
|
|
6215
|
+
for (let i = 0; i < clearLines; i++) frame += `\x1B[${i + 1};1H\x1B[2K`;
|
|
6216
|
+
safeLines.forEach((line, i) => {
|
|
6217
|
+
frame += `\x1B[${i + 1};1H${line}`;
|
|
6218
|
+
});
|
|
6219
|
+
output.write(frame);
|
|
6220
|
+
if (fixedInput.active) fixedInput.repaint(buffer, cursorPos);
|
|
6221
|
+
} finally {
|
|
6222
|
+
output.write("\x1B[?25h\x1B[?2026l");
|
|
6223
|
+
}
|
|
6224
|
+
};
|
|
6225
|
+
void checkForCliUpdate(state.cliVersion, state.serverUrl, {
|
|
6226
|
+
fetchImpl,
|
|
6227
|
+
env: options.env ?? process.env
|
|
6228
|
+
}).then((updateAvailable) => {
|
|
6229
|
+
if (sessionEnded || !updateAvailable) return;
|
|
6230
|
+
state = { ...state, updateAvailable };
|
|
6231
|
+
if (history.turns.length === 0 && history.currentRole === null) {
|
|
6232
|
+
repaintBanner();
|
|
6233
|
+
} else {
|
|
6234
|
+
scheduleRender();
|
|
6235
|
+
}
|
|
6236
|
+
});
|
|
6190
6237
|
let syncingLayout = false;
|
|
6191
6238
|
const renderHistoryToOutput = () => {
|
|
6192
6239
|
if (fixedInput.isPaused()) return;
|
|
@@ -7318,6 +7365,7 @@ ${renderStatusLine(state)}
|
|
|
7318
7365
|
output.write(`[nolo] ${t("persistentProcessesLeft", String(persistentCount))}
|
|
7319
7366
|
`);
|
|
7320
7367
|
}
|
|
7368
|
+
sessionEnded = true;
|
|
7321
7369
|
rl.close();
|
|
7322
7370
|
}
|
|
7323
7371
|
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
|
+
NOLO_UPDATE_CHECK_KILL_SWITCH,
|
|
2
3
|
buildCliDoctorText,
|
|
3
4
|
buildCliVersionText,
|
|
4
5
|
buildNpmSelfUpdateCommand,
|
|
5
6
|
buildSelfUpdateCommand,
|
|
6
7
|
buildStandaloneManualUpdateHint,
|
|
8
|
+
checkForCliUpdate,
|
|
9
|
+
compareCliVersions,
|
|
7
10
|
getCliInstallChannel,
|
|
8
11
|
readPackageInfo,
|
|
9
12
|
renderProgressBar,
|
|
@@ -12,7 +15,7 @@ import {
|
|
|
12
15
|
resolveStandaloneBundleRepoBase,
|
|
13
16
|
runSelfUpdate,
|
|
14
17
|
runStandaloneBundleUpdate
|
|
15
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-SWMCYK4O.js";
|
|
16
19
|
import "./chunk-DXJS7VSG.js";
|
|
17
20
|
import "./chunk-IDZTNRP2.js";
|
|
18
21
|
import "./chunk-A7GB5UGH.js";
|
|
@@ -23,11 +26,14 @@ import "./chunk-CF7PE763.js";
|
|
|
23
26
|
import "./chunk-G3SUCT4W.js";
|
|
24
27
|
import "./chunk-4VNS5WPM.js";
|
|
25
28
|
export {
|
|
29
|
+
NOLO_UPDATE_CHECK_KILL_SWITCH,
|
|
26
30
|
buildCliDoctorText,
|
|
27
31
|
buildCliVersionText,
|
|
28
32
|
buildNpmSelfUpdateCommand,
|
|
29
33
|
buildSelfUpdateCommand,
|
|
30
34
|
buildStandaloneManualUpdateHint,
|
|
35
|
+
checkForCliUpdate,
|
|
36
|
+
compareCliVersions,
|
|
31
37
|
getCliInstallChannel,
|
|
32
38
|
readPackageInfo,
|
|
33
39
|
renderProgressBar,
|