nolo-cli 0.256.0-alpha.1 → 0.258.0-alpha.1
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/{appDeleteCommands-IIOP3CZU.js → appDeleteCommands-FEPN62UR.js} +1 -1
- package/{appDeployCommands-S5ZNB7MA.js → appDeployCommands-DPFEWFYZ.js} +1 -1
- package/{appDeployStatusCommands-MQIGLK3T.js → appDeployStatusCommands-LQ5X5KVX.js} +1 -1
- package/{appGetCommands-XFX4E3KR.js → appGetCommands-W3JBBIF7.js} +1 -1
- package/{appListCommands-QR7LT4AK.js → appListCommands-LUHZS7JU.js} +1 -1
- package/{chunk-7JMBQ7YU.js → chunk-U2H426FE.js} +6 -4
- package/{commandRegistry-RNYUOKUE.js → commandRegistry-QKOJ5FIC.js} +8 -8
- package/index.js +1 -1
- package/{machineCommands-ECFQMLHA.js → machineCommands-4WKJ3TLO.js} +12 -1
- package/package.json +1 -1
|
@@ -33,9 +33,10 @@ async function cliApiRequest(args) {
|
|
|
33
33
|
if (args.body !== void 0 && args.body !== null && method !== "GET") {
|
|
34
34
|
init.body = JSON.stringify(args.body);
|
|
35
35
|
}
|
|
36
|
+
const fetchFn = args.fetchImpl ?? fetch;
|
|
36
37
|
let response;
|
|
37
38
|
try {
|
|
38
|
-
response = await
|
|
39
|
+
response = await fetchFn(url, init);
|
|
39
40
|
} catch (error) {
|
|
40
41
|
throw new CliApiError(t("api.requestFailed", error.message), "NETWORK_ERROR", 0);
|
|
41
42
|
}
|
|
@@ -49,9 +50,10 @@ async function cliApiRequest(args) {
|
|
|
49
50
|
response.status
|
|
50
51
|
);
|
|
51
52
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
const
|
|
53
|
+
const isSuccessEnvelope = data.success === true || data.ok === true;
|
|
54
|
+
if (!response.ok || !isSuccessEnvelope) {
|
|
55
|
+
const errorObj = typeof data.error === "object" && data.error !== null ? data.error : {};
|
|
56
|
+
const message = errorObj.message || (typeof data.error === "string" ? data.error : "") || data.message || t("api.requestFailedHttp", String(response.status));
|
|
55
57
|
const code = errorObj.code || `HTTP_${response.status}`;
|
|
56
58
|
throw new CliApiError(message, code, response.status);
|
|
57
59
|
}
|
|
@@ -236,23 +236,23 @@ function getAgentInternalCommandEntries() {
|
|
|
236
236
|
function getAppInternalCommandEntries() {
|
|
237
237
|
return [
|
|
238
238
|
createEnvCommand(["app", "list"], "List your apps", async (args, deps) => {
|
|
239
|
-
const { runAppListCommand } = await import("./appListCommands-
|
|
239
|
+
const { runAppListCommand } = await import("./appListCommands-LUHZS7JU.js");
|
|
240
240
|
return runAppListCommand(args, deps);
|
|
241
241
|
}),
|
|
242
242
|
createEnvCommand(["app", "get"], "Get app details", async (args, deps) => {
|
|
243
|
-
const { runAppGetCommand } = await import("./appGetCommands-
|
|
243
|
+
const { runAppGetCommand } = await import("./appGetCommands-W3JBBIF7.js");
|
|
244
244
|
return runAppGetCommand(args, deps);
|
|
245
245
|
}),
|
|
246
246
|
createEnvCommand(["app", "deploy"], "Deploy an app", async (args, deps) => {
|
|
247
|
-
const { runAppDeployCommand } = await import("./appDeployCommands-
|
|
247
|
+
const { runAppDeployCommand } = await import("./appDeployCommands-DPFEWFYZ.js");
|
|
248
248
|
return runAppDeployCommand(args, deps);
|
|
249
249
|
}),
|
|
250
250
|
createEnvCommand(["app", "deploy", "status"], "Check app deploy status", async (args, deps) => {
|
|
251
|
-
const { runAppDeployStatusCommand } = await import("./appDeployStatusCommands-
|
|
251
|
+
const { runAppDeployStatusCommand } = await import("./appDeployStatusCommands-LQ5X5KVX.js");
|
|
252
252
|
return runAppDeployStatusCommand(args, deps);
|
|
253
253
|
}),
|
|
254
254
|
createEnvCommand(["app", "delete"], "Delete an app", async (args, deps) => {
|
|
255
|
-
const { runAppDeleteCommand } = await import("./appDeleteCommands-
|
|
255
|
+
const { runAppDeleteCommand } = await import("./appDeleteCommands-FEPN62UR.js");
|
|
256
256
|
return runAppDeleteCommand(args, deps);
|
|
257
257
|
})
|
|
258
258
|
];
|
|
@@ -527,15 +527,15 @@ function getSystemInternalCommandEntries(renderHelpText2) {
|
|
|
527
527
|
return runWhoamiCommand({ args, env: ctx.env });
|
|
528
528
|
}),
|
|
529
529
|
createEntrypointEnvCommand(["connect"], "Hold a connector websocket for this machine", async (args, deps) => {
|
|
530
|
-
const { runMachineConnectCommand } = await import("./machineCommands-
|
|
530
|
+
const { runMachineConnectCommand } = await import("./machineCommands-4WKJ3TLO.js");
|
|
531
531
|
return runMachineConnectCommand(args, deps);
|
|
532
532
|
}),
|
|
533
533
|
createDaemonShortcutCommand(["daemon"], "Run the connector daemon shortcut", async (args, deps) => {
|
|
534
|
-
const { runMachineConnectCommand } = await import("./machineCommands-
|
|
534
|
+
const { runMachineConnectCommand } = await import("./machineCommands-4WKJ3TLO.js");
|
|
535
535
|
return runMachineConnectCommand(args, deps);
|
|
536
536
|
}),
|
|
537
537
|
createEnvCommand(["machine", "status"], "List machines registered to the current profile", async (args, deps) => {
|
|
538
|
-
const { runMachineStatusCommand } = await import("./machineCommands-
|
|
538
|
+
const { runMachineStatusCommand } = await import("./machineCommands-4WKJ3TLO.js");
|
|
539
539
|
return runMachineStatusCommand(args, deps);
|
|
540
540
|
}),
|
|
541
541
|
createEnvCommand(["doctor", "runtime"], "Diagnose local-first agent runtime selection", async (args, deps) => {
|
package/index.js
CHANGED
|
@@ -169,7 +169,7 @@ async function main() {
|
|
|
169
169
|
await superviseCliAuthorityBrokerProcess(args.slice(1));
|
|
170
170
|
return;
|
|
171
171
|
}
|
|
172
|
-
const { createCliRuntimeContext, looksLikeDaemonShortcut, renderHelpText, resolveCommand, runResolvedCommand } = await import("./commandRegistry-
|
|
172
|
+
const { createCliRuntimeContext, looksLikeDaemonShortcut, renderHelpText, resolveCommand, runResolvedCommand } = await import("./commandRegistry-QKOJ5FIC.js");
|
|
173
173
|
const { buildCliRuntimeEnv, loadProfileConfig } = await import("./profileConfig-KOWK4HOG.js");
|
|
174
174
|
const { resolveTuiLaunchMode } = await import("./runtimeModeArgs-X7DL7PUN.js");
|
|
175
175
|
const runtimeEnv = {
|
|
@@ -1231,6 +1231,13 @@ ${text}
|
|
|
1231
1231
|
|
|
1232
1232
|
// packages/cli/machineCommands.ts
|
|
1233
1233
|
async function handleMachineWsMessageDemux(message, send, handlers, runConnectorMessage) {
|
|
1234
|
+
if (handlers.attachedExecution) {
|
|
1235
|
+
try {
|
|
1236
|
+
const handled = await handlers.attachedExecution.handleWsMessage(message, send);
|
|
1237
|
+
if (handled) return;
|
|
1238
|
+
} catch {
|
|
1239
|
+
}
|
|
1240
|
+
}
|
|
1234
1241
|
try {
|
|
1235
1242
|
const toolResult = await handlers.toolInvoke.handleToolInvokeMessage(message, send);
|
|
1236
1243
|
if (toolResult !== null) return;
|
|
@@ -1496,7 +1503,10 @@ async function runMachineConnectCommand(args, deps = {}) {
|
|
|
1496
1503
|
onMessage: (message, send) => handleMachineWsMessageDemux(
|
|
1497
1504
|
message,
|
|
1498
1505
|
send,
|
|
1499
|
-
{
|
|
1506
|
+
{
|
|
1507
|
+
toolInvoke: toolInvokeHandlers,
|
|
1508
|
+
...deps.attachedExecution ? { attachedExecution: deps.attachedExecution } : {}
|
|
1509
|
+
},
|
|
1500
1510
|
() => handleConnectorRunMessage(
|
|
1501
1511
|
message,
|
|
1502
1512
|
send,
|
|
@@ -1546,6 +1556,7 @@ async function runMachineConnectCommand(args, deps = {}) {
|
|
|
1546
1556
|
export {
|
|
1547
1557
|
__resetMalformedMachineToolGrantsWarningsForTests,
|
|
1548
1558
|
formatMachineStatus,
|
|
1559
|
+
handleMachineWsMessageDemux,
|
|
1549
1560
|
postMachineHeartbeat,
|
|
1550
1561
|
readMachineToolGrants,
|
|
1551
1562
|
resolveConnectorHeartbeatTimeoutMs,
|