@phnx-labs/agents-cli 1.22.115 → 1.22.116

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.
Files changed (88) hide show
  1. package/CHANGELOG.md +149 -14
  2. package/README.md +1 -1
  3. package/dist/commands/browser.js +11 -0
  4. package/dist/commands/exec.js +212 -141
  5. package/dist/commands/feed.js +65 -14
  6. package/dist/commands/sessions-picker.d.ts +11 -0
  7. package/dist/commands/sessions-picker.js +88 -7
  8. package/dist/commands/sessions.d.ts +21 -2
  9. package/dist/commands/sessions.js +157 -3
  10. package/dist/commands/setup-secrets.d.ts +2 -2
  11. package/dist/commands/setup-term.d.ts +24 -0
  12. package/dist/commands/setup-term.js +70 -0
  13. package/dist/commands/setup.d.ts +1 -1
  14. package/dist/commands/setup.js +12 -4
  15. package/dist/commands/ssh.js +1 -69
  16. package/dist/lib/accounting/rotate.d.ts +63 -1
  17. package/dist/lib/accounting/rotate.js +56 -0
  18. package/dist/lib/accounts/add.js +2 -2
  19. package/dist/lib/accounts/slots.js +32 -2
  20. package/dist/lib/answer-router.d.ts +11 -2
  21. package/dist/lib/answer-router.js +26 -2
  22. package/dist/lib/auth-mint.d.ts +5 -4
  23. package/dist/lib/auth-mint.js +4 -3
  24. package/dist/lib/browser/drivers/arc.d.ts +1 -1
  25. package/dist/lib/browser/service.d.ts +10 -0
  26. package/dist/lib/browser/service.js +208 -36
  27. package/dist/lib/browser/types.d.ts +18 -0
  28. package/dist/lib/config-keys.d.ts +1 -1
  29. package/dist/lib/config-keys.js +5 -0
  30. package/dist/lib/device-config.js +61 -0
  31. package/dist/lib/devices/doctor-findings.js +2 -6
  32. package/dist/lib/feed/answer.d.ts +153 -4
  33. package/dist/lib/feed/answer.js +716 -105
  34. package/dist/lib/feed/feed.d.ts +61 -1
  35. package/dist/lib/feed/feed.js +226 -14
  36. package/dist/lib/feed/hub-server.d.ts +58 -3
  37. package/dist/lib/feed/hub-server.js +306 -54
  38. package/dist/lib/feed/pr-status.d.ts +8 -0
  39. package/dist/lib/feed/pr-status.js +9 -1
  40. package/dist/lib/feed-outcome.d.ts +1 -1
  41. package/dist/lib/feed-outcome.js +9 -2
  42. package/dist/lib/feed-policy.js +9 -3
  43. package/dist/lib/fleet/auth-sync.d.ts +2 -55
  44. package/dist/lib/fleet/auth-sync.js +2 -89
  45. package/dist/lib/harness-auth-capabilities.js +7 -2
  46. package/dist/lib/hosts/dispatch.d.ts +20 -1
  47. package/dist/lib/hosts/dispatch.js +52 -30
  48. package/dist/lib/hosts/remote-cmd.d.ts +21 -0
  49. package/dist/lib/hosts/remote-cmd.js +26 -2
  50. package/dist/lib/mailbox.d.ts +12 -0
  51. package/dist/lib/mailbox.js +16 -2
  52. package/dist/lib/menubar/snapshot.d.ts +51 -0
  53. package/dist/lib/menubar/snapshot.js +42 -3
  54. package/dist/lib/open-url.js +2 -2
  55. package/dist/lib/projects.d.ts +23 -0
  56. package/dist/lib/projects.js +78 -0
  57. package/dist/lib/secrets-cli.d.ts +3 -3
  58. package/dist/lib/secrets-cli.js +1 -1
  59. package/dist/lib/session/active.d.ts +1 -0
  60. package/dist/lib/session/active.js +8 -0
  61. package/dist/lib/session/db.d.ts +67 -3
  62. package/dist/lib/session/db.js +381 -126
  63. package/dist/lib/session/prompt.d.ts +23 -7
  64. package/dist/lib/session/prompt.js +46 -8
  65. package/dist/lib/session/remote/remote-list.d.ts +20 -0
  66. package/dist/lib/session/remote/remote-list.js +22 -6
  67. package/dist/lib/session/remote/watch.d.ts +12 -0
  68. package/dist/lib/session/remote/watch.js +9 -0
  69. package/dist/lib/session/remote-preview-cache.d.ts +29 -0
  70. package/dist/lib/session/remote-preview-cache.js +373 -0
  71. package/dist/lib/session/tail.d.ts +50 -0
  72. package/dist/lib/session/tail.js +219 -0
  73. package/dist/lib/setup-tool-install.js +2 -1
  74. package/dist/lib/setup-tool-status.d.ts +1 -1
  75. package/dist/lib/setup-tool-status.js +6 -1
  76. package/dist/lib/signin-badge.d.ts +19 -4
  77. package/dist/lib/signin-badge.js +29 -11
  78. package/dist/lib/term-driver.d.ts +24 -0
  79. package/dist/lib/term-driver.js +36 -0
  80. package/dist/lib/terminal/index.d.ts +1 -1
  81. package/dist/lib/terminal/index.js +1 -1
  82. package/dist/lib/terminal/inject.d.ts +38 -0
  83. package/dist/lib/terminal/inject.js +55 -9
  84. package/dist/lib/terminal/transport.d.ts +15 -5
  85. package/dist/lib/terminal/transport.js +61 -11
  86. package/package.json +1 -1
  87. package/dist/lib/fleet/remote-login.d.ts +0 -170
  88. package/dist/lib/fleet/remote-login.js +0 -568
package/CHANGELOG.md CHANGED
@@ -1,5 +1,142 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.22.116
4
+
5
+ - **`agents feed answer` is bounded, exactly-once, and truthful about delivery
6
+ (PHNX-3999).** The AGI Menu abandons a reply at 30s; this path used to blow
7
+ that budget and then report a fabricated receipt.
8
+ - **Bounded.** The requested attention key names its session, so only that
9
+ session is reconciled and the optional `gh pr view` enrichment runs only for
10
+ a key whose generation is a PR review. Previously every active session was
11
+ enriched — one 15s-bounded `gh` call each — *before* the key was compared.
12
+ The whole operation now runs under one deadline, and a forwarded answer is
13
+ raced against it directly rather than trusting the transport's own timer.
14
+ - **Exact tokens across the hop.** A forwarded answer is POSIX-quoted with the
15
+ canonical `shellQuote` and run through the canonical `sshExecAsync`, so a
16
+ multiline answer or one carrying `$`, backticks, quotes or `;` arrives
17
+ byte-identical instead of being re-parsed by the remote shell.
18
+ - **Multiline free text.** A multiline answer is delivered into a tmux rail as
19
+ one bracketed paste (`injectIntoTerminal`'s new `paste` option), so a TUI
20
+ inserts it verbatim instead of submitting one line at a time. A rail that
21
+ cannot carry the framing refuses *before* the claim is taken.
22
+ - **A claim is no longer a resolution.** `recordAnswer` gains a two-phase
23
+ `pending` mode: the claim locks the item but leaves the block `open` and
24
+ writes no resolution tombstone, so an unconfirmed delivery can no longer make
25
+ the request silently vanish from the feed. Only the AGENT's own
26
+ acknowledgement resolves it — a `consumed`/`continued` receipt promotes the
27
+ claim through `confirmAnswerResolution`, bound to the generation and attempt
28
+ it was taken for, so a slow delivery cannot resolve the question the agent
29
+ has since moved on to. A `queued` receipt never does.
30
+ - **Truthful, typed outcomes for the operator UI.** `--json` now emits
31
+ `status` (`delivered` / `already_answered` / `unknown` / `failed`),
32
+ `delivery` (`receipt` / `unconfirmed` / `failed`), `resolved`, `host`,
33
+ `attempt`, and the block's **real** `MessageReceipt` — never a synthesized
34
+ one. `queued` is delivery, never resolution; `dropped`/`expired` read as
35
+ failures rather than as the furthest-along success. A timeout, a truncated
36
+ remote reply, or a partly-written keystroke sequence is `unknown` (the claim
37
+ is kept, so a retry cannot double-send); only a provable non-delivery is
38
+ `failed`.
39
+ - **`agents feed answer <key> --check [--attempt <at>]`** is a new read-only
40
+ reconciliation — the "check delivery" path for an unconfirmed answer. It
41
+ never claims, routes or resends, and it is bound to the requested generation
42
+ and attempt, so a stale card can never be resolved by the next question's
43
+ receipt.
44
+ - **Stranded claims reconcile.** A claim a kill left with no receipt is adopted
45
+ and completed only on the mailbox rail, where the whole spool (inbox,
46
+ processing and consumed) is scanned by block id so the answer is never
47
+ enqueued twice, and only through a compare-and-swap so two retries cannot
48
+ both adopt it.
49
+
50
+ - **AGI Menu: synchronized Headless-runs defaults, Home and device preferences.**
51
+ Five new `agents config` keys, validated at write time and synced fleet-wide like
52
+ the existing `menubar.menu.*` set: `menubar.menu.headlessAgent` and
53
+ `menubar.menu.headlessFallbackAgent` (each a registered agent id — a typo is
54
+ refused, not stored), `menubar.menu.headlessPlacement`
55
+ (`auto` | `local` | `interactive` | a device name),
56
+ `menubar.menu.sessionUpdates`, and `menubar.menu.deviceSort`
57
+ (`name` | `role` | `load` | `memory` | `disk`).
58
+ - **`agents run --fallback <agent>` now reaches the alternate harness when the
59
+ primary's accounts are exhausted before the run starts.** Previously that case
60
+ printed "no healthy account" and exited 1, so a configured alternate never fired
61
+ for the one situation it exists for; the mid-run handoff also no longer stops at
62
+ three accounts when an explicit alternate is configured, so every healthy account
63
+ of the primary is tried before another harness. A signed-out primary still fails
64
+ loud with the login hint — logging in is the fix there, not a different harness.
65
+ - **`agents menubar snapshot --json` reports each device's role and specs.** Every
66
+ `devices[]` row gains `role`, `autoEligible` (whether `--device auto` may pick it)
67
+ and `stats` — cores, total/free memory and disk, load, reachability, and when each
68
+ was observed. Read from the existing fleet-stats cache, so no fleet probe; `null`
69
+ for a device never measured, and every unobserved number is `null` rather than `0`.
70
+ - **Session rows carry `confirmedProject`.** The registered project whose root
71
+ contains the session's working directory, or `null` when the association is not
72
+ confirmed, on `agents feed watch --json`, `agents sessions watch --json`, and
73
+ `agents sessions --active --json`. A directory no project definition names — even
74
+ one that happens to be a git repository — is no longer filed under a project
75
+ invented from its folder name. The existing `project` field is unchanged.
76
+ - **Session titles exclude shell and control scaffolding.** A harness-generated
77
+ title that is a `<bash-input>`/`<command-name>`/`<system-reminder>` wrapper, or a
78
+ bare control command such as `/clear` or `/compact`, is rejected so the row shows
79
+ the generated title or the user's own first prompt instead. A `/rename` title is
80
+ still kept verbatim, and the original prompt stays on the row. Existing indexed
81
+ sessions are re-derived on their next scan.
82
+
83
+ - **Session previews retain details across devices (PHNX-3999).** An exact session
84
+ ID and owning device use one bounded request, with a durable local copy for
85
+ offline reading. Reopening unchanged sessions avoids network requests; activity
86
+ changes invalidate the copy, and failed requests back off without hiding prior
87
+ content. Concurrent requests coalesce, including failed manual refreshes.
88
+ SQLite contention, lock waiting, and transport share a 10-second budget.
89
+ - **Large local transcripts show bounded recent details.** Previews reuse the
90
+ canonical transcript parsers and timeline projection, mark partial history,
91
+ and report missing transcripts explicitly. Cached timeline data is accepted
92
+ only for the exact file modification time and size that produced it.
93
+
94
+ - `agents setup secrets` / `agents clis install secrets` now install Secrets CLI 0.1.5, which accepts the shared Phoenix `--host` address grammar (`ssh://[user@]host`, bare `user@host`/alias; other schemes fail loud) on `secrets` and `secrets hosts pin` (PHNX-4090) — matching the `--host` grammar computer-cli 0.1.5 already ships. Existing installs are unaffected; the canonical pin lives in `cli/src/lib/secrets-cli.ts`.
95
+
96
+ - **`agents setup` now installs the standalone `term` CLI as a first-class onboarding phase (PHNX-4092).** The PTY engine `agents fleet login` and `agents auth mint` spawn on demand lives in `@phnx-labs/term-cli` (extracted PHNX-4091); a fleet device with it missing failed those flows loud. The onboarding hub gains a `term` phase and an `agents setup term` wizard (with `--install-only` / `--terminal`) that installs the pinned `@phnx-labs/term-cli@0.1.0` — via the system `clis/term.yaml` manifest, else a pinned `npm i -g` — the same way `browser`/`computer`/`secrets` install. `agents setup status` and `--tool term` report its readiness: unlike the other tools `term` has no `status --json` health surface, so presence on PATH is the whole readiness signal (no probe, no configure step). Source: `cli/src/commands/setup-term.ts`, `cli/src/commands/setup.ts`, `cli/src/lib/setup-tool-status.ts`, `cli/src/lib/setup-tool-install.ts`.
97
+
98
+ - **`browser status` no longer goes blank when one Arc task is stale (PHNX-3999).** A
99
+ single Arc tab that had been moved to another window or Space — or closed — made
100
+ `agents browser status` throw, and **every** profile vanished from the listing,
101
+ including healthy ones with nothing to do with Arc. The refusal to adopt a moved
102
+ tab is correct and is unchanged: an action still will not drive a tab its task no
103
+ longer owns. What changed is that read-only `status` no longer inherits the blast
104
+ radius. An unreadable task is reported with the tab count it owns on disk plus the
105
+ reason its live tabs could not be read, an unreadable profile is listed with an
106
+ `unavailable` reason instead of disappearing, and the other profiles are reported
107
+ normally. `tabs` is absent rather than empty for such a task, so nothing claims a
108
+ stale tab is live. Source: `cli/src/lib/browser/service.ts`.
109
+ - **`browser status` reads Arc once per pass instead of once per tab (PHNX-3999).** A
110
+ profile with 28 tasks paid one AppleScript round trip per owned tab, plus one
111
+ liveness probe per saved Arc runtime while reconnecting, so a cold `status` spent
112
+ dozens of serialized round trips before printing anything. It now takes a single
113
+ snapshot and a single liveness probe for the entire pass, shared across every Arc
114
+ profile, and never contacts Arc at all when no Arc profile is present. Actions are
115
+ unchanged and still read Arc live per tab. Source: `cli/src/lib/browser/service.ts`.
116
+
117
+ - **grok signs in through its device-code flow.** `agents accounts add grok`, `agents accounts login grok#<name>`, and the logged-out hint all run `grok login --device-auth`. Bare `grok login` defaults to `--oauth`, the loopback browser flow, which opens whatever browser profile the OS defaults to. The device-code screen prints the URL and code instead, so the human finishes the sign-in in the browser profile they choose — which is what makes it usable over an SSH shell on a worker. Source: `cli/src/lib/harness-auth-capabilities.ts`, `cli/src/lib/signin-badge.ts`.
118
+
119
+ - **A feed snapshot larger than the reader budget now reaches the reader whole (PHNX-3999).**
120
+ The daemon's shared feed socket wrote each envelope in one `socket.write` and dropped the
121
+ reader the moment its unflushed bytes passed 4 MiB — so a healthy Menu or `agents feed
122
+ watch --json` client attaching to a fleet whose reset exceeded that got 8 KiB of it, no
123
+ newline, then EOF, and the CLI exited 0 as if the fleet were empty. Each connection now has
124
+ one ordered writer that streams the snapshot before any live event in 64 KiB chunks paced
125
+ by the socket's own `'drain'`. A reader is dropped only when it stays more than 4 MiB of
126
+ live events behind for 2 s, or leaves a chunk unaccepted for 30 s — a burst of peer resets
127
+ to a healthy reader is never a drop. The client rejects any close it did not ask for,
128
+ naming a mid-frame truncation, and a throwing consumer fails that same promise instead of
129
+ escaping as an uncaught exception. Source: `cli/src/lib/feed/hub-server.ts`.
130
+
131
+ - **Browser setup installs Browser CLI 0.1.5 (PHNX-3999).** New installations
132
+ include the status fix that reports unavailable Arc tasks without hiding healthy
133
+ profiles and reads visible Arc tabs once per status request. Existing browser
134
+ installations are preserved; upgrade them explicitly with
135
+ `npm install -g @phnx-labs/browser-cli@0.1.5`. (0.1.5 is a clean re-cut of the
136
+ partially-published 0.1.4; same behavior.)
137
+
138
+ - **Removed `agents devices login` (a.k.a. "fleet login").** The remote device-code login orchestration could not work in the account-slot model — a box may hold several accounts per harness, and a per-box native login has no way to say which account it is signing in. It is gone entirely (not deprecated-and-hidden). Accounts are provisioned from durable worker credentials (`agents accounts add/login <harness>#<name>`); a token-less harness (kimi/antigravity) logs in per box — run the harness on that device and complete its native login. Logged-out hints for per-device harnesses now point at that path instead. Source: `cli/src/commands/ssh.ts`, `cli/src/lib/fleet/auth-sync.ts`, `cli/src/lib/signin-badge.ts`, `cli/src/lib/accounts/add.ts`, `cli/src/lib/auth-mint.ts`.
139
+
3
140
  ## 1.22.115
4
141
 
5
142
  - **Artifact sharing moved out to the standalone `artifacts` CLI (breaking).**
@@ -93,20 +230,18 @@
93
230
 
94
231
  - **AGI Menu 1.5.0 adds tool sessions and Setup.** The menu separates Agents, Browser and Computer activity, shows browser controls and recorded computer captures, and reports installation and readiness for Browser, Computer and Secrets CLI. It consumes the shared daemon feed without periodic tool subprocesses. The helper floor selects the signed and notarized `menubar/v1.5.0` release.
95
232
 
96
- - **Replacing the browser daemon no longer kills a live browser (PHNX-3999).** The
97
- daemon's startup reaper read "the daemon that launched this has exited" as "everything
98
- it recorded is garbage" and SIGTERMed the browser — so activating the menu bar,
99
- upgrading, or a daemon crash-restart closed a browser you were looking at, and the
100
- runtime record was wiped so the survivor could not even be re-attached. But a live
101
- browser outliving its daemon is the normal case: shutdown deliberately closes only
102
- CDP, and on macOS the browser is spawned detached. A live local browser is now
103
- preserved untouched, a dead record is cleared without signalling anything, and a
104
- stale `ssh -L` tunnel — which genuinely cannot outlive its owner — is still reaped,
105
- decided separately from the browser instead of sharing one kill path. Ownership of a
106
- preserved browser transfers only after an identity-checked attach succeeds — including
107
- the restart path that restores your open browser tasks — and that rewrites the
108
- owning-daemon pid alone, keeping the original launch's metadata. Source:
109
- `cli/src/lib/browser/runtime-state.ts`.
233
+ - **Daemon startup preserves surviving local browsers (PHNX-3999).** The startup
234
+ reaper keeps a live local browser's runtime and task records when its previous
235
+ daemon has exited. Dead process records and stale SSH tunnels are handled
236
+ separately. Ownership changes only after an identity-checked reattach succeeds,
237
+ preserving the original launch metadata. Reconnection requires an existing
238
+ debugging port: `--remote-debugging-pipe` handles belong to the original service
239
+ process and cannot transfer to a replacement daemon. Coordinate release of an
240
+ active pipe-connected browser before restarting its daemon.
241
+ - **Browser setup selects standalone Browser CLI 0.1.3.** The default package for
242
+ `agents setup browser --install-only` now includes the browser preservation and
243
+ task-restoration fixes. Existing installations and configured CLI manifests
244
+ retain their current behavior.
110
245
 
111
246
  - **BREAKING — deprecated command shims are deleted; every surface has one spelling.** The hidden and warned aliases that kept "still works this release" paths alive are gone, not tombstoned: a script that still calls one now gets commander's `unknown command` / `unknown option` and exits non-zero. Removed → replacement: `agents notify` → `agents send --to owner` (or `agents feed post --level important` for a milestone that should reach the owner; a `feed.broadcast` sink that spawned `agents notify "{message}"` becomes `channel: owner`); `agents doctor --fix` → `agents sync <agent>@all` (doctor is diagnose-only); `agents accounts connect|name|label|attach|detach|switch|set-default` and the hidden `agents accounts mint` / `agents auth mint` → `agents accounts add <harness> [name]`, `agents accounts login <harness>#<name>`, `agents accounts default <harness> [name]`, `agents accounts rename`, and `agents run <harness>#<name>` (accounts select by name; installation bindings are gone); `agents sessions go` → `agents sessions resume --attach-only`; `agents sessions attach` and `agents reconnect` / `agents sessions reconnect` → `agents sessions resume [id]`; `agents repo refresh` → `agents sync`; `agents mcp register` → `agents sync --mcp`; `agents memory sync` → `agents sync --memory`; `agents plugins sync <name>` → `agents sync --plugin <name>`; `agents skills info` → `agents skills view`; `agents run --smart` → `agents run --device auto`; `agents events --audit` → `agents events audit` or `--include ops`; `agents devices prefer|unprefer <name>` → `agents devices config <name> auto-launch.preferred on|--unset`; `agents devices set-interactive [name]` → `agents config set interactive.host <name>` (or `agents devices config <name> interactive.host <name>`); `agents devices configure|note|set <name>` → `agents devices config <name> <key> <value>`. `agents devices enable|disable <name>` stay as first-class, visible sugar over `auto-launch.enabled` (no deprecation notice). Folding `mcp register` into `agents sync` also closed a gap in the replacement: sync's reconcile stage skipped every HTTP MCP server declared in `agents.yaml` (`refresh.ts` `continue`d on `transport: http`) while the removed command registered it — it now registers HTTP servers through the same `registerMcpToTargets` path (`codex mcp add <name> --url <url>`), and the yaml-resource writer's Codex arm no longer silently no-ops on HTTP either (`installMcpViaCodex`). Source: `cli/src/commands/send.ts`, `doctor.ts`, `accounts.ts`, `auth.ts`, `go.ts`, `sessions.ts`, `repo.ts`, `mcp.ts`, `memory.ts`, `plugins.ts`, `skills.ts`, `exec.ts`, `events.ts`, `ssh.ts`, `cli/src/lib/smart-launch.ts`.
112
247
 
package/README.md CHANGED
@@ -53,7 +53,7 @@ agents setup status # readiness for browser, computer, fleet,
53
53
  agents run claude "explain this repo" # run any agent on your existing subscription
54
54
  ```
55
55
 
56
- Everything here — and every other command in this README — is free and needs no account; the optional `agents auth login` unlocks the hosted surfaces — [team spaces](#sign-in) and managed trace sync (`agents traces sync` with no Cloudflare setup). `agents setup` is interactive and idempotent -- safe to re-run on any machine. Once core setup exists, it opens a status-aware menu for browser, computer, secrets, fleet, watchdog, and device preferences; each choice delegates to the same wizard available under `agents setup <capability>`. In CI or another non-TTY, bare setup prints the checklist without prompting. The `agi-cli.sh` one-liner installs this same canonical `@phnx-labs/agents-cli` package. Prefer bun? `bun install -g @phnx-labs/agents-cli` works too.
56
+ Everything here — and every other command in this README — is free and needs no account; the optional `agents auth login` unlocks the hosted surfaces — [team spaces](#sign-in) and managed trace sync (`agents traces sync` with no Cloudflare setup). `agents setup` is interactive and idempotent -- safe to re-run on any machine. Once core setup exists, it opens a status-aware menu for browser, computer, secrets, term, fleet, watchdog, and device preferences; each choice delegates to the same wizard available under `agents setup <capability>`. In CI or another non-TTY, bare setup prints the checklist without prompting. The `agi-cli.sh` one-liner installs this same canonical `@phnx-labs/agents-cli` package. Prefer bun? `bun install -g @phnx-labs/agents-cli` works too.
57
57
 
58
58
  The command surface teaches setup through `agents setup` and group-level `--help`.
59
59
  The durable system model starts at [`cli/docs/README.md`](cli/docs/README.md).
@@ -2762,6 +2762,11 @@ function registerTaskCommands(browser) {
2762
2762
  // instead of the raw `comet-local@endpoint-0` key (RUSH-2709).
2763
2763
  const endpointLabel = profile.endpoint ? `endpoint: ${profile.endpoint}, ` : '';
2764
2764
  console.log(`\n${profile.name} (${endpointLabel}${portLabel}, ${pidLabel})`);
2765
+ // A profile whose live state could not be read is still listed, and
2766
+ // says so — it is not silently dropped and not shown as healthy.
2767
+ if (profile.unavailable) {
2768
+ console.log(` Unavailable: ${profile.unavailable}`);
2769
+ }
2765
2770
  if (profile.tasks.length === 0) {
2766
2771
  console.log(' No active tasks');
2767
2772
  }
@@ -2783,6 +2788,12 @@ function registerTaskCommands(browser) {
2783
2788
  String(task.tabCount).padEnd(6) +
2784
2789
  domains.slice(0, 20).padEnd(22) +
2785
2790
  age);
2791
+ // The recorded tab count above is what the task owns on disk; this
2792
+ // says the live tabs behind it could not be read, so the count is
2793
+ // not mistaken for verified-live tabs.
2794
+ if (task.unavailable) {
2795
+ console.log(' '.padEnd(14) + `↳ tabs unreadable: ${task.unavailable}`);
2796
+ }
2786
2797
  }
2787
2798
  }
2788
2799
  }