@floh-solutions/pharos-cli 0.30.0 → 0.31.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.
@@ -1,11 +1,11 @@
1
1
  import { execFile } from "node:child_process";
2
2
  import { stat } from "node:fs/promises";
3
- import { isAbsolute, join } from "node:path";
3
+ import { basename, isAbsolute, join } from "node:path";
4
4
  import { promisify } from "node:util";
5
5
  import { findApp, HOSTS, HOST_IDS, AGENT_IDS, MODES, isAgentId, isHostId, isMode, } from "../delegate/hosts.js";
6
6
  import { asTypedInput, LAUNCH_SCRIPT, launchCommand, SEND_TO_TAB_SCRIPT } from "../delegate/quote.js";
7
- import { chooseSession, findSessions, systemProbes, } from "../delegate/sessions.js";
8
- import { BRIDGE_EXTENSION_ID, CLAUDE_EXTENSION_ID, extensionsDirectory, installedExtensions, } from "../delegate/vsix.js";
7
+ import { findSessions, rankSessions, systemProbes, } from "../delegate/sessions.js";
8
+ import { BRIDGE_EXTENSION_ID, bridgeAtLeast, CLAUDE_EXTENSION_ID, extensionsDirectory, installedExtensions, SESSION_BRIDGE_VERSION, } from "../delegate/vsix.js";
9
9
  import { CliError, EXIT_FAILED, EXIT_USAGE, emit, emitText, usageError } from "../output.js";
10
10
  import { resolveOnPath } from "./doctor.js";
11
11
  const run = promisify(execFile);
@@ -20,6 +20,8 @@ export const REASONS = [
20
20
  "automation-denied",
21
21
  "folder-missing",
22
22
  "unsupported",
23
+ /** `--session <id>` named a session that is no longer a target on this folder. */
24
+ "session-gone",
23
25
  ];
24
26
  export const SYSTEM_DEPS = {
25
27
  findApp,
@@ -72,6 +74,33 @@ export function childEnv(env) {
72
74
  }
73
75
  return clean;
74
76
  }
77
+ /** The reserved id. `--list` never prints it, so it can never shadow a real session. */
78
+ export const NEW_SESSION = "new";
79
+ /**
80
+ * `--session <id>` → a pick, or a usage error.
81
+ *
82
+ * A malformed id is a **usage error rather than a refusal**: `session-gone` is
83
+ * a fact about the machine ("that session is not there any more"), and the app
84
+ * renders it as one. An id the verb could never have printed is the caller
85
+ * getting the call wrong, and saying `session-gone` about it would teach the
86
+ * person their session had died when it never existed.
87
+ */
88
+ export function sessionPick(value, host) {
89
+ if (value === undefined)
90
+ return undefined;
91
+ const given = value.trim();
92
+ if (given === "") {
93
+ throw usageError(`--session needs an id from \`pharos delegate --list\`, or ${NEW_SESSION} for a fresh session.`);
94
+ }
95
+ if (given === NEW_SESSION)
96
+ return { kind: "new" };
97
+ if (!/^[0-9]+$/.test(given) || !Number.isSafeInteger(Number(given)) || Number(given) <= 0) {
98
+ throw usageError(`--session takes the \`id\` \`pharos delegate --list\` printed, which in ${HOSTS[host].name} is a process `
99
+ + `id, or the reserved ${NEW_SESSION} — not ${JSON.stringify(given)}. (Navarch's ids are worker UUIDs, and `
100
+ + "that route is not available yet.)", { session: given, host });
101
+ }
102
+ return { kind: "pid", pid: Number(given) };
103
+ }
75
104
  export async function runDelegate(io, env, options, deps = SYSTEM_DEPS) {
76
105
  const host = oneOf(options.host, "--host", HOST_IDS, isHostId);
77
106
  const agent = oneOf(options.agent, "--agent", AGENT_IDS, isAgentId);
@@ -80,8 +109,15 @@ export async function runDelegate(io, env, options, deps = SYSTEM_DEPS) {
80
109
  throw usageError(`--mode extension applies to the VS Code hosts only; ${HOSTS[host].name} has no extension to `
81
110
  + "open the prompt in. Leave --mode off, or pass --host vscode / vscode-insiders.", { host, mode });
82
111
  }
112
+ if (options.list && options.session !== undefined) {
113
+ throw usageError("--list and --session are different questions: --list reports what is running and sends nothing, "
114
+ + "--session sends to one of the ids it printed. Pass one.");
115
+ }
116
+ const pick = sessionPick(options.session, host);
117
+ // **`--list` needs no prompt**, and demanding one would make the app build a
118
+ // message it is only going to throw away to refresh a menu.
83
119
  const text = (options.text ?? "").replace(/\r\n/g, "\n").trim();
84
- if (text === "") {
120
+ if (text === "" && !options.list) {
85
121
  throw usageError("Nothing to send. Pass the prompt with --text, --file or --stdin.");
86
122
  }
87
123
  const folder = (options.folder ?? "").trim();
@@ -114,23 +150,150 @@ export async function runDelegate(io, env, options, deps = SYSTEM_DEPS) {
114
150
  // Navarch is refused before the agent is even resolved: it cannot take a
115
151
  // delegation at all yet, so an `agent-not-installed` about it would name the
116
152
  // wrong problem.
153
+ //
154
+ // **`--list` is refused here too, rather than answering with rows.** The
155
+ // contract gives a Navarch row the worker's UUID as its `id` and the worker's
156
+ // name as its `name`, and both come from `fleet_status` over the Argus socket
157
+ // — which is #1393's half of this. Listing the pids instead would hand the
158
+ // app ids that `--session` can never accept, so the whole route is one honest
159
+ // refusal until #1393 lifts it in one place.
117
160
  if (host === "navarch") {
118
- return refuse("unsupported", "Navarch cannot take a delegation yet. Every operator action on the Argus board needs an "
119
- + "open todo, and a delegation from Pharos has none the work item is the todo. Todo #1378 "
120
- + "on the ask-agent board adds a `delegate` op to the argus repo (find-or-create a worker on "
121
- + "a folder and type into it); until it lands, choose Terminal or VS Code.");
161
+ return refuse("unsupported", "Navarch cannot take a delegation yet, and cannot list its sessions either. The Argus side of "
162
+ + "it exists #1378 added a `delegate` op that finds-or-creates a worker on a folder without "
163
+ + "a board todo, which every other operator action there still needs but this verb does not "
164
+ + "speak that socket yet. #1393 on the ask-agent board is the todo that teaches it, and it is "
165
+ + "also what supplies the worker ids `--session` would take; until it lands, choose Terminal "
166
+ + "or VS Code.");
122
167
  }
123
168
  // **May be null, and that is not always a refusal.** The Terminal route runs
124
169
  // the agent by this path, so it must exist there; the VS Code extension route
125
170
  // runs the agent's OWN bundled binary through the extension, so an agent off
126
171
  // PATH is fine there. Each route decides — see {@link delegateToVsCode}.
127
172
  const agentPath = await deps.resolveOnPath(agent, env);
173
+ if (options.list) {
174
+ return listSessions(io, host, agent, mode, folder, agentPath, env, deps, options.pretty, refuse);
175
+ }
128
176
  if (host === "vscode" || host === "vscode-insiders") {
129
- return delegateToVsCode(host, agent, mode, folder, text, agentPath, env, deps, options.dryRun, refuse, succeed);
177
+ return delegateToVsCode(host, agent, mode, folder, text, agentPath, env, deps, options.dryRun, pick, refuse, succeed);
130
178
  }
131
179
  if (agentPath === null)
132
180
  return refuse("agent-not-installed", agentNotInstalled(agent, env));
133
- return delegateToTerminal(agent, folder, text, agentPath, env, deps, options.dryRun, refuse, succeed);
181
+ return delegateToTerminal(agent, folder, text, agentPath, env, deps, options.dryRun, pick, refuse, succeed);
182
+ }
183
+ /**
184
+ * `--list` — the inventory, and nothing else.
185
+ *
186
+ * **The bridge is deliberately NOT required here.** Listing is
187
+ * `claude agents --json` plus `ps`; it reads the same on a VS Code with no
188
+ * extensions at all. Refusing `bridge-not-installed` for a question the bridge
189
+ * plays no part in would hide the answer behind an unrelated fix, so only the
190
+ * three facts that make the question unanswerable refuse: the host, the agent
191
+ * and the folder.
192
+ *
193
+ * The agent still has to be findable, because that is what runs the inventory —
194
+ * and for Codex, where detection is `ps` and needs no binary, it is refused all
195
+ * the same: a list is offered so it can be picked from, and `delegate` with
196
+ * these flags would refuse on the next call anyway.
197
+ */
198
+ async function listSessions(io, host, agent, mode, folder, agentPath, env, deps, pretty, refuse) {
199
+ // The Claude Code extension bundles its own `claude`, and it can list the
200
+ // machine's sessions as well as the one on PATH — so a VS Code host with the
201
+ // extension installed still answers when PATH has none.
202
+ let probePath = agent === "claude" ? agentPath : null;
203
+ if (agent === "claude" && probePath === null && HOSTS[host].vscode !== undefined) {
204
+ const extensions = await deps.installedExtensions(host, env);
205
+ probePath = bundledClaude(extensions?.find((extension) => extension.id === CLAUDE_EXTENSION_ID));
206
+ }
207
+ if (agent === "claude" ? probePath === null : agentPath === null) {
208
+ return refuse("agent-not-installed", agentNotInstalled(agent, env));
209
+ }
210
+ const { sessions, incomplete, detail: probeDetail } = await findSessions(agent, folder, deps.probes(env, probePath));
211
+ const ranked = rankSessions(sessions, host);
212
+ const rows = ranked.map((session, index) => toRow(session, index === 0));
213
+ const agentName = nameOf(agent);
214
+ const where = `${HOSTS[host].name} on ${folder}`;
215
+ const core = rows.length === 0
216
+ ? `No ${agentName} session is running in ${where}.`
217
+ : `${rows.length} ${agentName} session${rows.length === 1 ? "" : "s"} in ${where}. A plain delegate `
218
+ + `would use ${rows[0].name} (${rows[0].status}).`;
219
+ const detail = incomplete
220
+ ? `${core} Detection was incomplete (${probeDetail ?? "a probe failed"}), so this list may be short.`
221
+ : core;
222
+ const listing = { ok: true, host, agent, mode, folder, sessions: rows, incomplete, detail };
223
+ if (!pretty)
224
+ return emit(io, listing);
225
+ return emitText(io, [
226
+ detail,
227
+ ...rows.map((row) => `${row.recommended ? "*" : " "} ${row.id} ${row.name} — ${row.status}, ${row.detail}`),
228
+ ].join("\n"));
229
+ }
230
+ /** The `claude` the Claude Code extension carries, at the path measured on 2.1.228. */
231
+ function bundledClaude(claudeExt) {
232
+ return claudeExt === undefined ? null : join(claudeExt.path, "resources", "native-binary", "claude");
233
+ }
234
+ /** One listed row. `recommended` is passed in, because the ranking decides it, not this. */
235
+ function toRow(session, recommended) {
236
+ // `rankSessions` filtered on the host, so it is never null here.
237
+ const host = session.host;
238
+ return {
239
+ id: String(session.pid),
240
+ name: displayName(session),
241
+ agent: session.agent,
242
+ host,
243
+ status: session.status ?? "unknown",
244
+ detail: host === "terminal"
245
+ ? session.tty === null ? "Terminal" : `Terminal tab ${basename(session.tty)}`
246
+ : HOSTS[host].name,
247
+ recommended,
248
+ };
249
+ }
250
+ /**
251
+ * What to call a session in a menu.
252
+ *
253
+ * Claude names its own (`team-sync-6c`) and that is what the person sees in the
254
+ * session itself, so it wins. Codex names nothing, so the pid is the identity —
255
+ * and a Claude session too old or too new to carry a name falls back to the
256
+ * same shape rather than to an empty row.
257
+ */
258
+ function displayName(session) {
259
+ if (session.agent === "codex")
260
+ return `Codex · pid ${session.pid}`;
261
+ return session.name ?? `Claude · pid ${session.pid}`;
262
+ }
263
+ function nameOf(agent) {
264
+ return agent === "claude" ? "Claude" : "Codex";
265
+ }
266
+ /**
267
+ * The `session-gone` detail: what was asked for, what is actually there, and
268
+ * why nothing was started instead.
269
+ *
270
+ * **`all` is every session on the folder, not the ranked ones**, because the
271
+ * most useful thing this can say is often that the pid is alive somewhere
272
+ * else. "It is gone" and "it is running in Navarch, not in Terminal" lead to
273
+ * completely different next moves, and the ranked list — filtered to the
274
+ * requested host — cannot tell them apart.
275
+ */
276
+ function sessionGone(pid, agent, host, ranked, all, incomplete, probeDetail) {
277
+ const agentName = nameOf(agent);
278
+ const found = all.find((session) => session.pid === pid);
279
+ const what = found === undefined
280
+ ? `Session ${pid} is no longer a ${agentName} session on this folder — it exited, moved, or the list `
281
+ + "it came from is stale."
282
+ : found.host !== host
283
+ ? `Session ${pid} is running on this folder, but in `
284
+ + `${found.host === null ? "an application this cannot delegate to" : HOSTS[found.host].name}, not in `
285
+ + `${HOSTS[host].name} — ask for that host instead.`
286
+ : `Session ${pid} is running on this folder in ${HOSTS[host].name}, but it holds no controlling tty, `
287
+ + "so there is nothing to type into.";
288
+ const now = ranked.length === 0
289
+ ? `No ${agentName} session can be delivered to in ${HOSTS[host].name} on this folder`
290
+ : `What is there now: ${ranked.map((session) => `${displayName(session)} (pid ${session.pid})`).join(", ")}`;
291
+ return (`${what} ${now}. Nothing was sent and nothing was launched: a chosen session is a choice, so this refuses `
292
+ + "rather than quietly starting a second one. Re-read the inventory with `pharos delegate --list`, or pass "
293
+ + "`--session new` to start a fresh session on purpose."
294
+ + (incomplete
295
+ ? ` Detection was also incomplete (${probeDetail ?? "a probe failed"}), so the session may be running and unseeable.`
296
+ : ""));
134
297
  }
135
298
  /** The `agent-not-installed` detail — one place, because two routes reach it. */
136
299
  function agentNotInstalled(agent, env) {
@@ -150,13 +313,19 @@ function agentNotInstalled(agent, env) {
150
313
  * `=`, `+` or `%`: `text=a%26b` would arrive as `text=a&b` and split. The
151
314
  * bridge refuses a query with unknown keys, so that failure would be loud
152
315
  * rather than a silently truncated prompt — but loud is still failed.
316
+ *
317
+ * `session` is added only when one was asked for, and it is `agent`/`mode`
318
+ * shaped rather than `text` shaped: digits or the literal `new`, so there is
319
+ * nothing in it for either decode to change. Its absence is what says "the
320
+ * ordinary rule", which is why it is omitted rather than sent empty.
153
321
  */
154
322
  export function delegateUri(scheme, job) {
155
323
  const twice = (value) => encodeURIComponent(encodeURIComponent(value));
324
+ const session = job.session === undefined ? "" : `&session=${job.session.kind === "new" ? NEW_SESSION : job.session.pid}`;
156
325
  return `${scheme}://${BRIDGE_EXTENSION_ID}/delegate?folder=${twice(job.folder)}&agent=${job.agent}`
157
- + `&mode=${job.mode}&text=${twice(job.text)}`;
326
+ + `&mode=${job.mode}&text=${twice(job.text)}${session}`;
158
327
  }
159
- async function delegateToVsCode(host, agent, mode, folder, text, agentPath, env, deps, dryRun, refuse, succeed) {
328
+ async function delegateToVsCode(host, agent, mode, folder, text, agentPath, env, deps, dryRun, pick, refuse, succeed) {
160
329
  const spec = HOSTS[host];
161
330
  const name = spec.name;
162
331
  if (mode === "extension" && agent === "codex") {
@@ -172,6 +341,25 @@ async function delegateToVsCode(host, agent, mode, folder, text, agentPath, env,
172
341
  + (extensions === null ? ", which does not exist: that VS Code has never run" : "")
173
342
  + ". `pharos setup --install vscode-bridge` installs the one this pharos ships.");
174
343
  }
344
+ // **A bridge older than `--session` does not ignore it — it refuses the whole
345
+ // URI.** It rejects any query key it does not know (the guard that makes a
346
+ // single-encoded `&` in a prompt loud instead of silently truncating one), so
347
+ // an unexpected `session` trips it and the prompt never reaches the editor.
348
+ // Nothing comes back from VS Code to say so — `open` succeeds either way — so
349
+ // without this check the verb answers `sent` about a message that was thrown
350
+ // away, and the app tells the person it was delivered. Every machine that
351
+ // installed the bridge before this release carries one of these.
352
+ //
353
+ // `bridge-not-installed` rather than a new reason id: the fix the app already
354
+ // renders for it — `pharos setup --install vscode-bridge` — is exactly the
355
+ // fix for this, and a reason id is a contract the app decodes.
356
+ if (pick !== undefined && !bridgeAtLeast(bridge.version, SESSION_BRIDGE_VERSION)) {
357
+ return refuse("bridge-not-installed", `The Pharos bridge installed in ${name} is ${bridge.version}, which predates \`--session\` — that `
358
+ + `arrived in ${SESSION_BRIDGE_VERSION}. It would not ignore the session in the URI: it refuses `
359
+ + "any query key it does not know, so the prompt would never reach the editor and this would have "
360
+ + "reported it as sent. `pharos setup --install vscode-bridge` replaces it with the one this pharos "
361
+ + "ships. Delegating WITHOUT --session works with the bridge you have.");
362
+ }
175
363
  const claudeExt = extensions?.find((extension) => extension.id === CLAUDE_EXTENSION_ID);
176
364
  const usesExtensionBinary = mode === "extension" && agent === "claude" && claudeExt !== undefined;
177
365
  // **The extension route needs no agent on PATH.** The Claude Code extension
@@ -184,18 +372,42 @@ async function delegateToVsCode(host, agent, mode, folder, text, agentPath, env,
184
372
  }
185
373
  // Detect against the bundled binary when that is the only `claude` there, so
186
374
  // the prediction still holds; the bridge does its own detection regardless.
187
- const probePath = agent === "claude"
188
- ? agentPath ?? (claudeExt === undefined ? null : join(claudeExt.path, "resources", "native-binary", "claude"))
189
- : null;
375
+ const probePath = agent === "claude" ? agentPath ?? bundledClaude(claudeExt) : null;
190
376
  const { sessions, incomplete, detail: probeDetail } = await findSessions(agent, folder, deps.probes(env, probePath));
191
- const session = chooseSession(sessions, host);
192
- const uri = delegateUri(spec.vscode.scheme, { folder, agent, mode, text });
193
- const agentName = agent === "claude" ? "Claude" : "Codex";
377
+ const ranked = rankSessions(sessions, host);
378
+ // **`--session <pid>` is pre-checked here AND honoured again by the bridge,
379
+ // and the two are independent on purpose.** The URI is one-way: nothing comes
380
+ // back, so the CLI can never report the bridge's verdict. This check catches a
381
+ // stale pick before an editor is disturbed at all; the bridge's own check is
382
+ // the strict one, because it knows which terminals are ITS window's and this
383
+ // process only knows which VS Code flavour a pid hangs off. A pid that passes
384
+ // here can still be `session-gone` there, and the bridge says so in its
385
+ // notification — that is not a disagreement, it is the narrower question.
386
+ let session;
387
+ if (pick === undefined) {
388
+ session = ranked[0] ?? null;
389
+ }
390
+ else if (pick.kind === "new") {
391
+ session = null;
392
+ }
393
+ else {
394
+ session = ranked.find((found) => found.pid === pick.pid) ?? null;
395
+ if (session === null) {
396
+ return refuse("session-gone", sessionGone(pick.pid, agent, host, ranked, sessions, incomplete, probeDetail));
397
+ }
398
+ }
399
+ const uri = delegateUri(spec.vscode.scheme, { folder, agent, mode, text, session: pick });
400
+ const agentName = nameOf(agent);
194
401
  const claudeExtInstalled = mode === "extension" && agent === "claude" ? claudeExt !== undefined : true;
195
402
  // The bridge decides; this is the same detection it runs, so the prediction
196
403
  // is honest and the wording says whose call it is. One tense throughout —
197
404
  // `would` in a dry run, plain past/present otherwise.
198
405
  const hand = dryRun ? "Would hand this to" : "Handed to";
406
+ const asked = pick?.kind !== "new"
407
+ ? ""
408
+ : ranked.length === 0
409
+ ? " A fresh session was asked for; none was running there anyway."
410
+ : " A fresh session was asked for, so the running one is not reused.";
199
411
  const core = session !== null
200
412
  ? `${hand} the Pharos bridge in ${name}, which ${dryRun ? "would send" : "sends"} it to the `
201
413
  + `${agentName} session there${describeStatus(session)}.`
@@ -205,9 +417,13 @@ async function delegateToVsCode(host, agent, mode, folder, text, agentPath, env,
205
417
  + (claudeExtInstalled ? "" : " That extension is not installed there, so the bridge falls back to an integrated terminal.")
206
418
  : `${hand} the Pharos bridge in ${name}, which ${dryRun ? "would start" : "starts"} ${agentName} `
207
419
  + `in an integrated terminal in ${folder}.`;
208
- const detail = session === null && incomplete
209
- ? `${core} Detection was incomplete (${probeDetail ?? "a probe failed"}); a running session may exist that could not be found.`
210
- : core;
420
+ // A deliberate new session makes "a session may exist that was not seen"
421
+ // beside the point: one was not wanted. So the two notes are exclusive.
422
+ const detail = pick?.kind === "new"
423
+ ? `${core}${asked}`
424
+ : session === null && incomplete
425
+ ? `${core} Detection was incomplete (${probeDetail ?? "a probe failed"}); a running session may exist that could not be found.`
426
+ : core;
211
427
  if (!dryRun) {
212
428
  try {
213
429
  await deps.open(uri);
@@ -221,6 +437,7 @@ async function delegateToVsCode(host, agent, mode, folder, text, agentPath, env,
221
437
  session: report(session),
222
438
  detail,
223
439
  uri,
440
+ ...(dryRun ? { sessions: ranked.map((found, index) => toRow(found, index === 0)) } : {}),
224
441
  });
225
442
  }
226
443
  /**
@@ -237,29 +454,52 @@ async function delegateToVsCode(host, agent, mode, folder, text, agentPath, env,
237
454
  * may control Terminal; a refusal comes back as `-1743` and is reported as
238
455
  * `automation-denied` with the Settings pane named.
239
456
  */
240
- async function delegateToTerminal(agent, folder, text, agentPath, env, deps, dryRun, refuse, succeed) {
457
+ async function delegateToTerminal(agent, folder, text, agentPath, env, deps, dryRun, pick, refuse, succeed) {
241
458
  const { sessions, incomplete, detail: probeDetail } = await findSessions(agent, folder, deps.probes(env, agent === "claude" ? agentPath : null));
242
- const session = chooseSession(sessions, "terminal");
243
- const agentName = agent === "claude" ? "Claude" : "Codex";
244
- // `chooseSession` already dropped tty-less sessions, so `session` is a real
459
+ const ranked = rankSessions(sessions, "terminal");
460
+ const rows = () => ranked.map((found, index) => toRow(found, index === 0));
461
+ let session;
462
+ if (pick === undefined) {
463
+ session = ranked[0] ?? null;
464
+ }
465
+ else if (pick.kind === "new") {
466
+ session = null;
467
+ }
468
+ else {
469
+ session = ranked.find((found) => found.pid === pick.pid) ?? null;
470
+ if (session === null) {
471
+ return refuse("session-gone", sessionGone(pick.pid, agent, "terminal", ranked, sessions, incomplete, probeDetail));
472
+ }
473
+ }
474
+ const agentName = nameOf(agent);
475
+ // `rankSessions` already dropped tty-less sessions, so `session` is a real
245
476
  // send target. A found session tells us where it is; `[...new Set(…)]` so two
246
477
  // sessions in one app do not read as "Navarch and Navarch".
247
478
  const elsewhere = sessions.filter((found) => found.host !== "terminal");
248
479
  const elsewhereApps = [
249
480
  ...new Set(elsewhere.map((found) => (found.host === null ? "another app" : HOSTS[found.host].name))),
250
481
  ];
251
- const elsewhereNote = elsewhereApps.length === 0
482
+ const elsewhereNote = elsewhereApps.length === 0 || pick?.kind === "new"
252
483
  ? ""
253
484
  : ` A ${agentName} session on this folder is running in ${elsewhereApps.join(" and ")}, not in Terminal.`;
254
- const incompleteNote = session === null && incomplete
485
+ // Both of these answer "why did you not use a running session", which is not
486
+ // a question when a fresh one was asked for.
487
+ const incompleteNote = session === null && incomplete && pick?.kind !== "new"
255
488
  ? ` Detection was incomplete (${probeDetail ?? "a probe failed"}); a running session may exist that could not be found.`
256
489
  : "";
490
+ const askedNote = pick?.kind !== "new"
491
+ ? ""
492
+ : ranked.length === 0
493
+ ? " A fresh session was asked for; none was running in Terminal anyway."
494
+ : ` A fresh session was asked for, so the ${ranked.length === 1 ? "one" : String(ranked.length)} already `
495
+ + `running in Terminal ${ranked.length === 1 ? "was" : "were"} left alone.`;
257
496
  if (session !== null && session.tty !== null) {
258
497
  if (dryRun) {
259
498
  return succeed({
260
499
  action: "sent",
261
500
  session: report(session),
262
501
  detail: `Would type the prompt into the ${agentName} session in Terminal${describeStatus(session)}.`,
502
+ sessions: rows(),
263
503
  });
264
504
  }
265
505
  const result = await appleEvent(deps, SEND_TO_TAB_SCRIPT, [session.tty, asTypedInput(text)], refuse);
@@ -274,8 +514,19 @@ async function delegateToTerminal(agent, folder, text, agentPath, env, deps, dry
274
514
  }
275
515
  // The process tree says Terminal, but no window of this Terminal has a tab
276
516
  // on that tty — a session in a tab that was closed, or a Terminal this
277
- // instance cannot see. Falling through to a new window is the honest
278
- // outcome, and the detail says why.
517
+ // instance cannot see.
518
+ //
519
+ // **Which way that falls depends on whether a session was NAMED.** Without
520
+ // `--session` a new window is the honest outcome and the detail says why;
521
+ // with it, opening a window would be exactly the silent substitution
522
+ // `--session` exists to prevent, so it refuses instead — and this is the
523
+ // case the pre-check cannot catch, because only Terminal knows its tabs.
524
+ if (pick?.kind === "pid") {
525
+ return refuse("session-gone", `${agentName} session ${session.pid} is still attributed to Terminal, but no Terminal tab holds its `
526
+ + `tty ${session.tty} — the tab was closed, or it belongs to a Terminal this process cannot see. `
527
+ + "Nothing was sent and no window was opened, because a chosen session is a choice. Re-read the "
528
+ + "inventory with `pharos delegate --list`, or pass `--session new` to start a fresh session.");
529
+ }
279
530
  const launched = await launch(deps, folder, agentPath, text, refuse);
280
531
  if (typeof launched !== "string")
281
532
  return launched;
@@ -288,9 +539,10 @@ async function delegateToTerminal(agent, folder, text, agentPath, env, deps, dry
288
539
  });
289
540
  }
290
541
  const opened = dryRun ? "Would open" : "Opened";
291
- const detail = `${opened} a new Terminal window in ${folder} running ${agentName} with the prompt.${elsewhereNote}${incompleteNote}`;
542
+ const detail = `${opened} a new Terminal window in ${folder} running ${agentName} with the prompt.`
543
+ + `${askedNote}${elsewhereNote}${incompleteNote}`;
292
544
  if (dryRun) {
293
- return succeed({ action: "launched", session: null, detail });
545
+ return succeed({ action: "launched", session: null, detail, sessions: rows() });
294
546
  }
295
547
  const launched = await launch(deps, folder, agentPath, text, refuse);
296
548
  if (typeof launched !== "string")
@@ -1 +1 @@
1
- {"version":3,"file":"delegate.js","sourceRoot":"","sources":["../../src/commands/delegate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EACL,OAAO,EACP,KAAK,EACL,QAAQ,EACR,SAAS,EACT,KAAK,EACL,SAAS,EACT,QAAQ,EACR,MAAM,GAKP,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACtG,OAAO,EACL,aAAa,EACb,YAAY,EACZ,YAAY,GAGb,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,GAEpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAA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EACX,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,OAAO,EACrB,IAAI,GAAE,SAAS,SAAS,EAAO,GAC9B,IAAI,CAqCN;AAED,iFAAiF;AACjF,wBAAgB,SAAS,CACvB,IAAI,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,GAAG,SAAS,CAAC,EACnC,QAAQ,EAAE,SAAS,SAAS,EAAE,EAC9B,cAAc,EAAE,SAAS,aAAa,EAAE,EACxC,WAAW,EAAE,MAAM,GAAG,SAAS,GAC9B,KAAK,CAuHP;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,YAAY,EACpB,QAAQ,EAAE,SAAS,WAAW,EAAE,EAChC,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,KAAK,CAAC,CA6FhB;AA8MD;;;;;;GAMG;AACH,wBAAsB,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,UAAU,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAQtG;AAWD;;;;;;;;;;;GAWG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,GAAG,SAAS,CAAC,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAGlF"}
@@ -5,7 +5,7 @@ import { delimiter, join } from "node:path";
5
5
  import { promisify } from "node:util";
6
6
  import { CONVERT_RELEASE } from "../convert.js";
7
7
  import { findApp, HOSTS } from "../delegate/hosts.js";
8
- import { BRIDGE_EXTENSION_ID, bundledBridge, bundledVsixPath, CLAUDE_EXTENSION_ID, CODEX_EXTENSION_ID, extensionsDirectory, installedExtensions, } from "../delegate/vsix.js";
8
+ import { BRIDGE_EXTENSION_ID, bridgeAtLeast, bundledBridge, bundledVsixPath, CLAUDE_EXTENSION_ID, CODEX_EXTENSION_ID, extensionsDirectory, installedExtensions, SESSION_BRIDGE_VERSION, } from "../delegate/vsix.js";
9
9
  import { emit, emitText } from "../output.js";
10
10
  const run = promisify(execFile);
11
11
  /** Where LibreOffice puts itself when installed from the .dmg rather than brew. */
@@ -1015,7 +1015,7 @@ function hostCheck(id, app) {
1015
1015
  terminal: "`pharos delegate --host terminal` — typed into the Terminal tab that already runs the agent, or a new window.",
1016
1016
  vscode: "`pharos delegate --host vscode` — through the Pharos bridge, into the session in VS Code.",
1017
1017
  "vscode-insiders": "`pharos delegate --host vscode-insiders` — the same, in VS Code Insiders.",
1018
- navarch: "`pharos delegate --host navarch` — a worker in the Argus app, once #1378 lands.",
1018
+ navarch: "`pharos delegate --host navarch` — a worker in the Argus app, once #1393 lands.",
1019
1019
  };
1020
1020
  // Only the VS Code flavours have an install line. Terminal ships with macOS
1021
1021
  // and Navarch is distributed by hand, so a command would be a guess.
@@ -1036,7 +1036,7 @@ function hostCheck(id, app) {
1036
1036
  ? `Not found by bundle id ${spec.bundleId} — asked Spotlight, then looked at ${spec.candidates.join(" and ")}.`
1037
1037
  : `Found by ${app.via === "spotlight" ? "Spotlight" : "its well-known path"} (bundle id ${spec.bundleId}).`
1038
1038
  + (id === "navarch"
1039
- ? " Delegating to it waits on the argus-side `delegate` op (#1378); until then `pharos delegate --host navarch` answers unsupported."
1039
+ ? " The argus-side `delegate` op it needs exists (#1378); this CLI does not speak that socket yet (#1393), so `pharos delegate --host navarch` still answers unsupported — for `--list` too."
1040
1040
  : ""),
1041
1041
  };
1042
1042
  }
@@ -1051,15 +1051,34 @@ async function extensionChecks(host, env, shippedBridge) {
1051
1051
  const claude = find(CLAUDE_EXTENSION_ID);
1052
1052
  const codex = find(CODEX_EXTENSION_ID);
1053
1053
  const bridge = find(BRIDGE_EXTENSION_ID);
1054
+ /**
1055
+ * **A bridge older than {@link SESSION_BRIDGE_VERSION} is reported `ok:false`,
1056
+ * not as a newer-one-exists footnote.** It cannot serve `pharos delegate
1057
+ * --session` at all — it refuses the whole URI rather than ignoring the
1058
+ * parameter — and the row's `ok` is what the app's wizard offers the install
1059
+ * from. Saying "it still works" here is what let a machine sit on 0.1.0 with
1060
+ * nothing reporting it.
1061
+ *
1062
+ * Only that threshold makes the row false. A bridge that is merely older than
1063
+ * the one this pharos ships stays `ok:true` with a note, because `ok:false`
1064
+ * should mean "something you asked for does not work" rather than "there is a
1065
+ * newer one" — otherwise every future bump nags on every machine.
1066
+ */
1067
+ const bridgeStale = bridge !== undefined && !bridgeAtLeast(bridge.version, SESSION_BRIDGE_VERSION);
1054
1068
  const bridgeNote = bridge === undefined
1055
1069
  ? shippedBridge === null
1056
1070
  ? `${where} This pharos ships no bridge either (${bundledVsixPath(env)} is absent) — the ship todo packs it; until then \`--install vscode-bridge\` refuses by name.`
1057
1071
  : `${where} This pharos ships ${shippedBridge}.`
1058
- : shippedBridge === null
1059
- ? `${where} Installed ${bridge.version}; this pharos ships no bridge to compare it with.`
1060
- : bridge.version === shippedBridge
1061
- ? `${where} Installed ${bridge.version}, which is the one this pharos ships.`
1062
- : `${where} Installed ${bridge.version}, but this pharos ships ${shippedBridge}. It still works; the URI contract may have moved. \`pharos setup --install vscode-bridge\` replaces it.`;
1072
+ : bridgeStale
1073
+ ? `${where} Installed ${bridge.version}, which predates \`pharos delegate --session\` (${SESSION_BRIDGE_VERSION}). `
1074
+ + "It does not ignore the session — it refuses the whole URI, because it rejects any query key it does "
1075
+ + `not know — so picking a session in ${flavour} sends nothing. Delegating without --session still works. `
1076
+ + `\`pharos setup --install vscode-bridge\` replaces it${shippedBridge === null ? "" : ` with ${shippedBridge}`}.`
1077
+ : shippedBridge === null
1078
+ ? `${where} Installed ${bridge.version}; this pharos ships no bridge to compare it with.`
1079
+ : bridge.version === shippedBridge
1080
+ ? `${where} Installed ${bridge.version}, which is the one this pharos ships.`
1081
+ : `${where} Installed ${bridge.version}, but this pharos ships ${shippedBridge}. It serves every verb this pharos has; the URI contract may still have moved. \`pharos setup --install vscode-bridge\` replaces it.`;
1063
1082
  return [
1064
1083
  {
1065
1084
  id: `${host}-claude-ext`,
@@ -1089,9 +1108,9 @@ async function extensionChecks(host, env, shippedBridge) {
1089
1108
  id: `${host}-bridge`,
1090
1109
  name: `Pharos bridge in ${flavour}`,
1091
1110
  tier: 2,
1092
- unlocks: `\`pharos delegate --host ${host}\` at all: the bridge is what puts the prompt into a session inside ${flavour}. Nothing else can.`,
1093
- without: `Delegating to ${flavour} is refused by name (bridge-not-installed).`,
1094
- ok: bridge !== undefined,
1111
+ unlocks: `\`pharos delegate --host ${host}\` at all: the bridge is what puts the prompt into a session inside ${flavour}. Nothing else can. From ${SESSION_BRIDGE_VERSION} it also honours \`--session\`, which is how a person picks between two sessions on one folder.`,
1112
+ without: `Delegating to ${flavour} is refused by name (bridge-not-installed) — and so is \`--session\` against a bridge older than ${SESSION_BRIDGE_VERSION}, which would otherwise report a prompt as sent while refusing the URI.`,
1113
+ ok: bridge !== undefined && !bridgeStale,
1095
1114
  version: bridge?.version ?? null,
1096
1115
  path: bridge?.path ?? null,
1097
1116
  install: "pharos setup --install vscode-bridge",