@getpaseo/cli 0.1.90 → 0.1.91-beta.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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
2
|
import { getOrCreateServerId, findExecutable, execCommand } from "@getpaseo/server";
|
|
3
|
-
import {
|
|
3
|
+
import { connectToDaemon } from "../../utils/client.js";
|
|
4
4
|
import { resolveLocalDaemonState, resolveTcpHostFromListen } from "./local-daemon.js";
|
|
5
5
|
import { resolveNodePathFromPid } from "./runtime-toolchain.js";
|
|
6
6
|
const require = createRequire(import.meta.url);
|
|
@@ -55,7 +55,7 @@ function createStatusSchema(status) {
|
|
|
55
55
|
if (item.key === "Connected Daemon") {
|
|
56
56
|
if (item.value === "reachable")
|
|
57
57
|
return "green";
|
|
58
|
-
if (item.value === "not_probed")
|
|
58
|
+
if (item.value === "not_probed" || item.value === "auth_required")
|
|
59
59
|
return "yellow";
|
|
60
60
|
return "red";
|
|
61
61
|
}
|
|
@@ -100,7 +100,7 @@ function toStatusRows(status) {
|
|
|
100
100
|
else {
|
|
101
101
|
rows.push({
|
|
102
102
|
key: "Agents",
|
|
103
|
-
value:
|
|
103
|
+
value: `Unavailable (${status.agentsUnavailableReason ?? "daemon API not reachable"})`,
|
|
104
104
|
});
|
|
105
105
|
}
|
|
106
106
|
if (status.note) {
|
|
@@ -164,10 +164,41 @@ function resolveOwnerLabel(uid, hostname) {
|
|
|
164
164
|
const hostPart = hostname ?? "unknown-host";
|
|
165
165
|
return `${uidPart}@${hostPart}`;
|
|
166
166
|
}
|
|
167
|
+
function classifyDaemonAuthProbeFailure(error) {
|
|
168
|
+
if (!(error instanceof Error))
|
|
169
|
+
return null;
|
|
170
|
+
if (error.message === "Password required")
|
|
171
|
+
return "auth_required";
|
|
172
|
+
if (error.message === "Incorrect password")
|
|
173
|
+
return "auth_failed";
|
|
174
|
+
return null;
|
|
175
|
+
}
|
|
176
|
+
function describeDaemonAuthProbeFailure(host, failure) {
|
|
177
|
+
if (failure === "auth_required") {
|
|
178
|
+
return `Daemon is reachable at ${host} but requires a password. Set PASEO_PASSWORD and retry.`;
|
|
179
|
+
}
|
|
180
|
+
return `Daemon is reachable at ${host} but the supplied password was rejected. Check PASEO_PASSWORD and retry.`;
|
|
181
|
+
}
|
|
182
|
+
function describeAgentsUnavailableReason(failure) {
|
|
183
|
+
if (failure === "auth_required")
|
|
184
|
+
return "password required";
|
|
185
|
+
return "incorrect password";
|
|
186
|
+
}
|
|
167
187
|
async function probeDaemonOverWebsocket(args) {
|
|
168
188
|
const { host, state } = args;
|
|
169
|
-
|
|
170
|
-
|
|
189
|
+
let client;
|
|
190
|
+
try {
|
|
191
|
+
client = await connectToDaemon({ host, timeout: 1500 });
|
|
192
|
+
}
|
|
193
|
+
catch (error) {
|
|
194
|
+
const authFailure = classifyDaemonAuthProbeFailure(error);
|
|
195
|
+
if (authFailure) {
|
|
196
|
+
return {
|
|
197
|
+
connectedDaemon: authFailure,
|
|
198
|
+
agentsUnavailableReason: describeAgentsUnavailableReason(authFailure),
|
|
199
|
+
note: describeDaemonAuthProbeFailure(host, authFailure),
|
|
200
|
+
};
|
|
201
|
+
}
|
|
171
202
|
if (state.running) {
|
|
172
203
|
return {
|
|
173
204
|
connectedDaemon: "unreachable",
|
|
@@ -247,6 +278,7 @@ function applyProbeToStatus(input) {
|
|
|
247
278
|
runningAgents: probe.runningAgents !== undefined ? probe.runningAgents : input.runningAgents,
|
|
248
279
|
idleAgents: probe.idleAgents !== undefined ? probe.idleAgents : input.idleAgents,
|
|
249
280
|
daemonProviders: probe.daemonProviders ?? input.daemonProviders,
|
|
281
|
+
agentsUnavailableReason: probe.agentsUnavailableReason ?? input.agentsUnavailableReason,
|
|
250
282
|
note: probe.note ? appendNote(input.note, probe.note) : input.note,
|
|
251
283
|
};
|
|
252
284
|
}
|
|
@@ -288,6 +320,7 @@ export async function runStatusCommand(options, _command) {
|
|
|
288
320
|
let idleAgents = null;
|
|
289
321
|
let daemonVersion = null;
|
|
290
322
|
let daemonProviders;
|
|
323
|
+
let agentsUnavailableReason;
|
|
291
324
|
let note;
|
|
292
325
|
if (!state.running && state.stalePidFile && state.pidInfo) {
|
|
293
326
|
localDaemon = "stale_pid";
|
|
@@ -303,6 +336,7 @@ export async function runStatusCommand(options, _command) {
|
|
|
303
336
|
runningAgents,
|
|
304
337
|
idleAgents,
|
|
305
338
|
daemonProviders,
|
|
339
|
+
agentsUnavailableReason,
|
|
306
340
|
note,
|
|
307
341
|
} = applyProbeToStatus({
|
|
308
342
|
probe,
|
|
@@ -313,6 +347,7 @@ export async function runStatusCommand(options, _command) {
|
|
|
313
347
|
runningAgents,
|
|
314
348
|
idleAgents,
|
|
315
349
|
daemonProviders,
|
|
350
|
+
agentsUnavailableReason,
|
|
316
351
|
note,
|
|
317
352
|
}));
|
|
318
353
|
}
|
|
@@ -346,6 +381,7 @@ export async function runStatusCommand(options, _command) {
|
|
|
346
381
|
daemonVersion,
|
|
347
382
|
desktopManaged: state.pidInfo?.desktopManaged === true,
|
|
348
383
|
providers,
|
|
384
|
+
agentsUnavailableReason,
|
|
349
385
|
note,
|
|
350
386
|
};
|
|
351
387
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getpaseo/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.91-beta.2",
|
|
4
4
|
"description": "Paseo CLI - control your AI coding agents from the command line",
|
|
5
5
|
"bin": {
|
|
6
6
|
"paseo": "bin/paseo"
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@clack/prompts": "^1.0.0",
|
|
30
|
-
"@getpaseo/client": "0.1.
|
|
31
|
-
"@getpaseo/protocol": "0.1.
|
|
32
|
-
"@getpaseo/server": "0.1.
|
|
30
|
+
"@getpaseo/client": "0.1.91-beta.2",
|
|
31
|
+
"@getpaseo/protocol": "0.1.91-beta.2",
|
|
32
|
+
"@getpaseo/server": "0.1.91-beta.2",
|
|
33
33
|
"chalk": "^5.3.0",
|
|
34
34
|
"commander": "^12.0.0",
|
|
35
35
|
"mime-types": "^2.1.35",
|