@phnx-labs/agents-cli 1.22.127 → 1.23.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/CHANGELOG.md +108 -0
- package/README.md +15 -16
- package/dist/bootstrap.js +4 -3
- package/dist/commands/browser.js +4 -19
- package/dist/commands/cloud-transcripts.js +1 -2
- package/dist/commands/computer.d.ts +2 -6
- package/dist/commands/computer.js +12 -18
- package/dist/commands/daemon.js +70 -11
- package/dist/commands/exec.js +1 -1
- package/dist/commands/feed.js +1 -2
- package/dist/commands/focus.js +4 -1
- package/dist/commands/go.js +3 -2
- package/dist/commands/logs.js +3 -7
- package/dist/commands/menubar.js +55 -3
- package/dist/commands/projects.js +103 -40
- package/dist/commands/ps-roster.d.ts +0 -11
- package/dist/commands/ps-roster.js +3 -116
- package/dist/commands/ps.d.ts +10 -0
- package/dist/commands/ps.js +182 -1
- package/dist/commands/resume.js +1 -1
- package/dist/commands/sessions-browser.d.ts +0 -1
- package/dist/commands/sessions-browser.js +6 -23
- package/dist/commands/sessions-export.js +1 -1
- package/dist/commands/sessions-migrate.js +1 -1
- package/dist/commands/sessions-picker.d.ts +6 -32
- package/dist/commands/sessions-picker.js +81 -8
- package/dist/commands/sessions-render.js +1 -1
- package/dist/commands/sessions-resume.js +2 -2
- package/dist/commands/sessions-share.js +1 -1
- package/dist/commands/sessions-trace.js +1 -1
- package/dist/commands/sessions.d.ts +2 -176
- package/dist/commands/sessions.js +44 -1577
- package/dist/index.js +10 -11
- package/dist/lib/browser-client.d.ts +0 -21
- package/dist/lib/browser-client.js +1 -44
- package/dist/lib/computer/record.d.ts +1 -0
- package/dist/lib/computer/record.js +2 -16
- package/dist/lib/config-keys.d.ts +2 -2
- package/dist/lib/config-keys.js +8 -2
- package/dist/lib/daemon/account-state-daemon-service.d.ts +2 -2
- package/dist/lib/daemon/account-state-daemon-service.js +2 -2
- package/dist/lib/daemon/attention-notify-service.js +8 -4
- package/dist/lib/daemon/daemon.d.ts +5 -1
- package/dist/lib/daemon/daemon.js +54 -14
- package/dist/lib/daemon/diagnostics.d.ts +70 -0
- package/dist/lib/daemon/diagnostics.js +185 -0
- package/dist/lib/daemon/runner.js +3 -2
- package/dist/lib/daemon/service.d.ts +1 -1
- package/dist/lib/daemon/session-state-service.d.ts +1 -1
- package/dist/lib/daemon/session-state-service.js +2 -2
- package/dist/lib/daemon/supervisor.d.ts +8 -0
- package/dist/lib/daemon/supervisor.js +47 -6
- package/dist/lib/daemon-services.d.ts +4 -1
- package/dist/lib/daemon-services.js +36 -5
- package/dist/lib/daemon-ticks.d.ts +3 -1
- package/dist/lib/daemon-ticks.js +18 -12
- package/dist/lib/device-config.d.ts +1 -1
- package/dist/lib/device-config.js +48 -7
- package/dist/lib/feed/tool-activity.d.ts +22 -10
- package/dist/lib/feed/tool-activity.js +168 -32
- package/dist/lib/feed/tools.d.ts +55 -2
- package/dist/lib/feed/tools.js +22 -28
- package/dist/lib/feed/watch.js +12 -8
- package/dist/lib/github/open-prs.d.ts +41 -0
- package/dist/lib/github/open-prs.js +157 -0
- package/dist/lib/github/project-prs.d.ts +20 -1
- package/dist/lib/github/project-prs.js +8 -7
- package/dist/lib/helper-versions.js +1 -1
- package/dist/lib/menubar/install-menubar.d.ts +23 -7
- package/dist/lib/menubar/install-menubar.js +179 -30
- package/dist/lib/menubar/resolve-version.d.ts +1 -0
- package/dist/lib/menubar/resolve-version.js +4 -2
- package/dist/lib/menubar/snapshot.d.ts +2 -0
- package/dist/lib/menubar/snapshot.js +2 -0
- package/dist/lib/menubar/update-state.d.ts +15 -0
- package/dist/lib/menubar/update-state.js +36 -0
- package/dist/lib/owner-notify.d.ts +0 -12
- package/dist/lib/owner-notify.js +1 -10
- package/dist/lib/self-heal/checks/menubar-helper.js +1 -0
- package/dist/lib/session/active.js +18 -14
- package/dist/lib/session/cloud.d.ts +0 -1
- package/dist/lib/session/cloud.js +0 -5
- package/dist/lib/session/db.d.ts +0 -64
- package/dist/lib/session/db.js +0 -116
- package/dist/lib/session/pid-registry.js +9 -6
- package/dist/lib/session/presentation.d.ts +107 -1
- package/dist/lib/session/presentation.js +543 -4
- package/dist/lib/session/remote/remote-list.d.ts +5 -36
- package/dist/lib/session/remote/remote-list.js +16 -320
- package/dist/lib/session/resume-command.d.ts +9 -0
- package/dist/lib/session/resume-command.js +107 -0
- package/dist/lib/session/selection.d.ts +102 -0
- package/dist/lib/session/selection.js +443 -0
- package/dist/lib/session/tool-index.d.ts +0 -62
- package/dist/lib/session/tool-index.js +1 -537
- package/dist/lib/sessions-client.d.ts +1 -0
- package/dist/lib/sessions-client.js +17 -1
- package/dist/lib/standalone-tools.js +2 -2
- package/dist/lib/testdata/owner-notify-api.d.ts +0 -13
- package/dist/lib/testdata/owner-notify-api.js +3 -23
- package/package.json +1 -1
- package/dist/commands/browser-sessions-picker.d.ts +0 -9
- package/dist/commands/browser-sessions-picker.js +0 -136
- package/dist/commands/computer-sessions-picker.d.ts +0 -11
- package/dist/commands/computer-sessions-picker.js +0 -90
- package/dist/commands/sessions-tail.d.ts +0 -13
- package/dist/commands/sessions-tail.js +0 -222
- package/dist/lib/browser/native-history.test-fixture.d.ts +0 -12
- package/dist/lib/browser/native-history.test-fixture.js +0 -43
- package/dist/lib/browser/paths.d.ts +0 -9
- package/dist/lib/browser/paths.js +0 -31
- package/dist/lib/browser/record.d.ts +0 -4
- package/dist/lib/browser/record.js +0 -19
- package/dist/lib/browser/sessions-list.d.ts +0 -79
- package/dist/lib/browser/sessions-list.js +0 -415
- package/dist/lib/computer/sessions-list.d.ts +0 -78
- package/dist/lib/computer/sessions-list.js +0 -372
- package/dist/lib/daemon/owner-device-delivery-service.d.ts +0 -10
- package/dist/lib/daemon/owner-device-delivery-service.js +0 -28
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,113 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.23.1
|
|
4
|
+
|
|
5
|
+
- **`agents ps preview <id>` shows the rich session card (PHNX-4227).** It is the
|
|
6
|
+
same command as `agents sessions preview` with the same flags, JSON envelope,
|
|
7
|
+
durable remote-preview cache and exit codes; `sessions preview` and
|
|
8
|
+
`sessions --preview` keep working unchanged, and peers are still asked with the
|
|
9
|
+
old `sessions preview` argv so a not-yet-upgraded device answers. Source:
|
|
10
|
+
`cli/src/commands/ps.ts`, `cli/src/lib/session/presentation.ts`.
|
|
11
|
+
|
|
12
|
+
- **AGI Menu 1.15.20: the GitHub tab gets a Mine chip and a folded Other repos (PHNX-4269).** Mine lists only the pull requests you opened. Other repos (repositories no project links) folds under its header while Needs me or a project group leads. Titles no longer stay slid sideways after the pointer leaves a row. Source: `cli/src/lib/helper-versions.ts`.
|
|
13
|
+
|
|
14
|
+
- **`agents menubar restart [--json]` restarts the running AGI Menu (PHNX-4325).** It runs
|
|
15
|
+
`launchctl kickstart -k` on the AGI Menu login item in its own session, so the restart
|
|
16
|
+
finishes even when AGI Menu itself asked for it, then waits up to 15 seconds for exactly
|
|
17
|
+
one new process. JSON reports `outcome` (`restarted` or `failed`), `previousPids`, `pids`
|
|
18
|
+
and `detail`; a turned-off AGI Menu, a failed kickstart, or no new process exits 1 with
|
|
19
|
+
the reason. AGI Menu's Settings and right-click menu call it. Source:
|
|
20
|
+
`cli/src/lib/menubar/install-menubar.ts`, `cli/src/commands/menubar.ts`.
|
|
21
|
+
- **Quitting AGI Menu now lasts until the next login (PHNX-4325).** The login item's
|
|
22
|
+
`KeepAlive` is `{SuccessfulExit: false}`: launchd relaunches AGI Menu after a crash but
|
|
23
|
+
not after a clean Quit, which previously came back within 30 seconds. The startup repair
|
|
24
|
+
rewrites an older plist once. Source: `cli/src/lib/menubar/install-menubar.ts`.
|
|
25
|
+
|
|
26
|
+
- **The daemon log says why it restarted (PHNX-4225).** `agents daemon logs` now
|
|
27
|
+
carries levels (`debug`, `info`, `warn`, `error`) and structured `data` on each
|
|
28
|
+
line. Every supervised tick is timed: a tick over half its deadline logs
|
|
29
|
+
`tick.slow`, and a deadline breach logs `tick.breach` with every in-flight tick,
|
|
30
|
+
the synchronous sections that ran during it, and the daemon's CPU, memory,
|
|
31
|
+
event-loop delay and load. A once-a-minute `vitals` line and `loop.stall` /
|
|
32
|
+
`span.slow` warnings attribute event-loop blocking to named sections, including
|
|
33
|
+
the feed hub and active-session discovery, which run outside the supervisor.
|
|
34
|
+
`agents daemon logs level debug` traces every tick and section and applies live;
|
|
35
|
+
`agents daemon logs level info` turns it back off. The usage-refresh and
|
|
36
|
+
active-sessions summaries are now structured log lines instead of raw stdout.
|
|
37
|
+
Source: `cli/src/lib/daemon/diagnostics.ts`, `cli/src/lib/daemon/supervisor.ts`.
|
|
38
|
+
|
|
39
|
+
## 1.23.0
|
|
40
|
+
|
|
41
|
+
### Removed
|
|
42
|
+
|
|
43
|
+
- `agents sessions tail` is gone; use `sessions tail <id>` from the standalone
|
|
44
|
+
sessions CLI. `agents logs -f <id>` runs it for a session.
|
|
45
|
+
- Tool-call search moved to the standalone CLI: `sessions --include tools
|
|
46
|
+
--query <clause> [--count] [--host <target>] --json`. It reads the same index
|
|
47
|
+
agents writes (`agents sessions backfill tools` still fills it).
|
|
48
|
+
A tool search through `agents sessions --include tools` (no session id, or a
|
|
49
|
+
`--query` clause) now exits 2 and names that command; reading one session's
|
|
50
|
+
tool calls, `agents sessions <id> --include tools [--json|--markdown]`, is
|
|
51
|
+
unchanged. `--fleet` / `--count` are no longer `agents sessions` flags. `--query` is a
|
|
52
|
+
single search-text flag.
|
|
53
|
+
|
|
54
|
+
### Changed
|
|
55
|
+
|
|
56
|
+
- A read query (`agents sessions <query> [--json]`) no longer falls back to an
|
|
57
|
+
in-process read when the `sessions` bin cannot be resolved. It exits 1 with an
|
|
58
|
+
error naming the install.
|
|
59
|
+
|
|
60
|
+
- **Browser and computer history come from the standalone tools (PHNX-4227).**
|
|
61
|
+
`agents sessions --browser` and `agents sessions --computer` are removed: run
|
|
62
|
+
`browser sessions` / `computer sessions` (or `agents browser sessions` /
|
|
63
|
+
`agents computer sessions`) instead. `agents browser sessions` and
|
|
64
|
+
`agents computer sessions` now run the standalone tool's own picker, so their
|
|
65
|
+
flags are the engine's (`--since`, `--until`, `--search`, `--tasks`, `--open`, …).
|
|
66
|
+
The fleet-wide `--device` listing of computer runs went with the alias; run
|
|
67
|
+
`computer sessions` on that box (`agents ssh <box> computer sessions`). The
|
|
68
|
+
browser and computer rows on `agents feed watch --json` are read from
|
|
69
|
+
`browser sessions --tasks --json` and `computer sessions --json`; agents-cli adds
|
|
70
|
+
only the agent-session link, and a missing tool, a failed run, or unreadable
|
|
71
|
+
output keeps the rows already on the stream instead of removing them. The
|
|
72
|
+
`computer` floor in `agents setup tools` is now 0.1.7, the first release whose
|
|
73
|
+
`computer sessions --json` honors `--limit`. A computer row's `agent` now comes
|
|
74
|
+
from the linked session only, since the engine records no harness name.
|
|
75
|
+
agents-cli no longer writes `browser_sessions` / `computer_sessions` rows (the
|
|
76
|
+
engines keep their own history and adopted those tables once) and no longer
|
|
77
|
+
opens the browser events pipe; the tables and migrations stay. `agents computer
|
|
78
|
+
sessions` also runs off macOS, since listing history drives nothing. Source:
|
|
79
|
+
`cli/src/lib/feed/tool-activity.ts`, `cli/src/lib/feed/tools.ts`,
|
|
80
|
+
`cli/src/commands/browser.ts`, `cli/src/commands/computer.ts`,
|
|
81
|
+
`cli/src/commands/sessions.ts`, `cli/src/lib/standalone-tools.ts`,
|
|
82
|
+
`cli/src/lib/browser-client.ts`, `cli/src/lib/computer/record.ts`, `cli/src/lib/session/db.ts`.
|
|
83
|
+
|
|
84
|
+
- **`agents projects prs` with no project lists every open PR across your GitHub account and orgs, needs-me first (PHNX-4269).** One REST search per owner (you plus every org you belong to; `--org` narrows it) and one for review requests from you, then each PR's REST detail and checks, cached like the project read; never GraphQL. Each PR carries `needsMe`: `review` (a review is requested from you), `failing` (your PR, CI red) or `conflicts` (your PR, conflicts with its base), and each repository names the projects that attach it. Every `prs` verb (`comment`, `review`, `merge` including `--admin`, `ready`, `automerge`, `failure`, `rerun`) now takes the project name optionally, so they act on any repo. This is the read behind AGI Menu's new GitHub tab, which joins `menubar.menu.tabOrder`/`hiddenTabs` as `github` (shown by default) and scopes itself with `menubar.menu.githubHidden`, `githubDrafts` and `githubBots`. Repositories are ordered by their most urgent PR. A free-plan private repo's branch-protection read (HTTP 403 "Upgrade to GitHub Pro") now reads as unprotected instead of failing the repo's `merge` facts. Source: `cli/src/lib/github/open-prs.ts`, `cli/src/commands/projects.ts`, `cli/src/lib/device-config.ts`.
|
|
85
|
+
|
|
86
|
+
- **Ship AGI Menu update settings (PHNX-4323).** Raise the signed menu helper floor to 1.15.19, which shows the app version and update status, manual check/update controls, and the synced automatic-update switch. Source: `cli/src/lib/helper-versions.ts`; helper release: `menubar/v1.15.19`.
|
|
87
|
+
|
|
88
|
+
- **Control AGI Menu updates separately (PHNX-4323).** Add `agents menubar update --check --json` and `agents menubar update --json`, an app-specific snapshot status, and the synced `menubar.autoUpdate` preference. Automatic updates default on and check about every 12 hours; turning them off suppresses all automatic update paths while preserving manual installation. Checks expose network errors, and self-updates finish their response before restarting the menu. Source: `cli/src/lib/menubar/install-menubar.ts`.
|
|
89
|
+
|
|
90
|
+
- **`menubar.menu.tabOrder` and `menubar.menu.hiddenTabs` know AGI Menu's Secrets tab (PHNX-4269).**
|
|
91
|
+
AGI Menu 1.15.13 adds a Secrets tab that lists this Mac's secrets bundles with their lock
|
|
92
|
+
state and unlocks or locks them with Touch ID. The menu only offers the tab once the CLI
|
|
93
|
+
accepts its id, so `secrets` joins the tab list. It starts hidden (`hiddenTabs` defaults to
|
|
94
|
+
`secrets`), and an order saved before it existed reads back with `secrets` appended.
|
|
95
|
+
Source: `cli/src/lib/device-config.ts`.
|
|
96
|
+
|
|
97
|
+
- **Owner iMessages come from Rush's number, with no Mac required (PHNX-4267).** rush/api now
|
|
98
|
+
sends owner iMessages itself from Rush's SendBlue number to the phone number you confirm in the
|
|
99
|
+
console Settings page, so the macOS-only `owner-device-delivery` daemon service and its
|
|
100
|
+
`/me/device-deliveries` client are gone. A notification that reaches your account now reads
|
|
101
|
+
"Rush is sending slack, imessage" instead of "delivered ... / queued imessage". A leftover
|
|
102
|
+
`owner-device-delivery` key in `services.yaml` is ignored. `agents send --channel imessage --to
|
|
103
|
+
<number>` still sends from this Mac's Messages app. Source: `cli/src/lib/owner-notify.ts`.
|
|
104
|
+
|
|
105
|
+
- **Claude routines run on worker devices again.** Before launching, a routine checked
|
|
106
|
+
each candidate account with `claude auth status` in an environment that left out the
|
|
107
|
+
setup-token a worker launch injects. Every account on a worker read as signed out, so
|
|
108
|
+
every Claude routine there failed with "found no authenticated Claude account". The
|
|
109
|
+
check now uses the same environment as the launch. Source: `cli/src/lib/daemon/runner.ts`.
|
|
110
|
+
|
|
3
111
|
## 1.22.127
|
|
4
112
|
|
|
5
113
|
- **A peer's fleet-state reply now arrives whole over ssh.** `agents __usage-ingest --reply`
|
package/README.md
CHANGED
|
@@ -327,17 +327,9 @@ agents sessions trace a1b2c3d4 --json # the versioned sessions-trace envelope
|
|
|
327
327
|
# Just the last 3 turns, user messages only
|
|
328
328
|
agents sessions a1b2c3d4 --last 3 --include user
|
|
329
329
|
|
|
330
|
-
#
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
# One session where two different calls match; query every online device
|
|
334
|
-
agents sessions --include tools \
|
|
335
|
-
--query 'program:git input:merge' \
|
|
336
|
-
--query 'program:gh output:CONFLICT' \
|
|
337
|
-
--fleet --json
|
|
338
|
-
|
|
339
|
-
# Count pre-indexed static git sites, containing calls, and sessions
|
|
340
|
-
agents sessions --include tools --query 'program:git' --count --fleet --json
|
|
330
|
+
# Search indexed tool calls with the standalone sessions CLI (same index)
|
|
331
|
+
sessions --include tools --query 'program:git input:merge' --query 'program:gh output:CONFLICT' --json
|
|
332
|
+
sessions --include tools --query 'program:git' --count --host box1,box2 --json
|
|
341
333
|
|
|
342
334
|
# Populate historical tool rows once on each device (same as `agents daemon index backfill tools --fleet`)
|
|
343
335
|
agents sessions backfill tools --fleet
|
|
@@ -358,7 +350,7 @@ agents insights --since 7d
|
|
|
358
350
|
|
|
359
351
|
Interactive picker when you're in a terminal. Structured output (`--json`, `--markdown`, filtered by role or turn count) when piped.
|
|
360
352
|
|
|
361
|
-
Backed by a SQLite + FTS5 index at `~/.agents/.history/sessions/sessions.db` with incremental scanning -- warm reads in ~100ms. Tool-call evidence is redacted and bounded before it is cached
|
|
353
|
+
Backed by a SQLite + FTS5 index at `~/.agents/.history/sessions/sessions.db` with incremental scanning -- warm reads in ~100ms. Tool-call evidence is redacted and bounded before it is cached. agents writes the tool index (`agents sessions backfill tools` performs the one-time historical parse, while normal incremental scans index new and changed sessions); the standalone `sessions --include tools` reads it, including `--count` over the ordered static Bash program sites. This uses relational SQLite rows and literal FTS5 only, with no embeddings, vector database, or model calls. External tools can consume `--json` output as a programmatic observability layer; see [docs/sessions.md](cli/docs/sessions.md) for the schemas and [docs/observability.md](cli/docs/observability.md) for the consumption patterns.
|
|
362
354
|
|
|
363
355
|
### Live state, and catching up fast
|
|
364
356
|
|
|
@@ -557,7 +549,8 @@ Important posts, blocks and `agents send --to owner` reach you through your
|
|
|
557
549
|
account once you run `agents auth login`: email, Slack and iMessage per the
|
|
558
550
|
preferences in the console Settings page, with quiet hours and dedup applied
|
|
559
551
|
there. Workers get a scoped device token from your signed-in laptop
|
|
560
|
-
automatically
|
|
552
|
+
automatically. rush/api sends the iMessages from Rush's own number to the phone
|
|
553
|
+
number you confirmed in Settings, so no Mac is involved. Ordinary milestone posts
|
|
561
554
|
remain record-only unless configured.
|
|
562
555
|
|
|
563
556
|
An optional **per-session summarizer** (off by default) adds a daemon-computed
|
|
@@ -1423,6 +1416,8 @@ agents daemon services disable browser-ipc # stop hosting browser IPC without s
|
|
|
1423
1416
|
agents browser stop --service # browser-scoped alias; next browser action requiring IPC re-enables it
|
|
1424
1417
|
agents routines stop # disable/reload only the scheduler service
|
|
1425
1418
|
agents daemon logs -f --level warn --since 1h
|
|
1419
|
+
agents daemon logs --level error --since 1h # each restart, with what was running when it happened
|
|
1420
|
+
agents daemon logs level debug # trace every tick and slow section, live; `level info` turns it off
|
|
1426
1421
|
agents daemon doctor # one-shot health check; non-zero exit on problems
|
|
1427
1422
|
|
|
1428
1423
|
agents daemon index roots # transcript directories the indexer scans (JSON)
|
|
@@ -1544,6 +1539,11 @@ duplicate icon. `agents menubar setup` is the recovery command when a machine is
|
|
|
1544
1539
|
already wrong -- it ends any duplicate, installs the bundle, wires the login
|
|
1545
1540
|
item, and verifies exactly one helper came back up.
|
|
1546
1541
|
|
|
1542
|
+
AGI Menu has its own update controls: `agents menubar update --check` checks the
|
|
1543
|
+
app release, `agents menubar update` installs it, and
|
|
1544
|
+
`agents config set menubar.autoUpdate false` disables the default twice-daily
|
|
1545
|
+
automatic checks. See [AGI Menu updates](cli/docs/menubar.md#app-updates).
|
|
1546
|
+
|
|
1547
1547
|
The helper itself is AGI Menu, developed in
|
|
1548
1548
|
[phnx-labs/agi-menu](https://github.com/phnx-labs/agi-menu) and published as a
|
|
1549
1549
|
signed, notarized build on this repo's `menubar/v<x.y.z>` releases; the CLI
|
|
@@ -1622,12 +1622,11 @@ Conversations with Claude, Codex, legacy Gemini, and other agents scatter across
|
|
|
1622
1622
|
```bash
|
|
1623
1623
|
agents sessions "auth middleware" # Full-text search across all agents
|
|
1624
1624
|
agents sessions --agent claude --since 7d
|
|
1625
|
-
|
|
1626
|
-
agents sessions --include tools --query 'program:git' --count --fleet --json
|
|
1625
|
+
sessions --include tools --query 'program:git' --json # standalone sessions CLI
|
|
1627
1626
|
agents sessions backfill tools --fleet
|
|
1628
1627
|
```
|
|
1629
1628
|
|
|
1630
|
-
The index lives at `~/.agents/.history/sessions/sessions.db` (SQLite + FTS5).
|
|
1629
|
+
The index lives at `~/.agents/.history/sessions/sessions.db` (SQLite + FTS5). Tool-call evidence is stored redacted and bounded; the standalone `sessions --include tools` searches it, reading another box over SSH with `--host`. Historical tool parsing is explicit via `agents sessions backfill tools`; searches never parse transcripts. See [Sessions](#sessions-across-agents) for full usage.
|
|
1631
1630
|
|
|
1632
1631
|
### Secrets
|
|
1633
1632
|
|
package/dist/bootstrap.js
CHANGED
|
@@ -263,7 +263,7 @@ async function installResolvedPackage(metadata) {
|
|
|
263
263
|
if (process.platform === 'darwin') {
|
|
264
264
|
try {
|
|
265
265
|
const { updateMenubarHelperIfNewer } = await import('./lib/menubar/install-menubar.js');
|
|
266
|
-
await updateMenubarHelperIfNewer(
|
|
266
|
+
await updateMenubarHelperIfNewer();
|
|
267
267
|
}
|
|
268
268
|
catch {
|
|
269
269
|
}
|
|
@@ -717,8 +717,9 @@ if (helpAllRequested) {
|
|
|
717
717
|
process.exit(0);
|
|
718
718
|
}
|
|
719
719
|
const isReadOnlyUpdatePreview = !isDocumentationRequest &&
|
|
720
|
-
passedArgs.find((arg) => !arg.startsWith('-')) === 'update' &&
|
|
721
|
-
|
|
720
|
+
((passedArgs.find((arg) => !arg.startsWith('-')) === 'update' && passedArgs.includes('--check')) ||
|
|
721
|
+
passedArgs.find((arg) => !arg.startsWith('-')) === 'menubar' ||
|
|
722
|
+
(passedArgs[0] === 'config' && passedArgs.includes('menubar.autoUpdate')));
|
|
722
723
|
if (!isDocumentationRequest) {
|
|
723
724
|
bootMark('bootstrap:evaluated');
|
|
724
725
|
if (!isReadOnlyUpdatePreview) {
|
package/dist/commands/browser.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { forwardsHelp, registerCommandGroups, setHelpSections } from '../lib/help.js';
|
|
2
2
|
import { buildBrowserContext } from '../lib/browser/context.js';
|
|
3
|
-
import { recordBrowserAction } from '../lib/browser/record.js';
|
|
4
3
|
import { isBrowserClientError, resolveBrowserBin, runBrowser, } from '../lib/browser-client.js';
|
|
5
|
-
import { runBrowserSessionsCommand } from './browser-sessions-picker.js';
|
|
6
4
|
const BROWSER_HELP_GROUPS = [
|
|
7
5
|
{ title: 'Session lifecycle', names: ['use', 'start', 'done', 'status', 'prune'] },
|
|
8
6
|
{ title: 'Fast action loop', names: ['stream'] },
|
|
@@ -33,6 +31,7 @@ export const BROWSER_PASSTHROUGH_VERBS = [
|
|
|
33
31
|
{ name: 'record', description: 'Record a video of the page (record start / record stop)' },
|
|
34
32
|
{ name: 'pdf', description: 'Export the current tab as PDF via CDP — auto-saved under sessions/<task>/ when omitted' },
|
|
35
33
|
{ name: 'logs', description: 'Read merged rush-app + rush-cli logs for a task' },
|
|
34
|
+
{ name: 'sessions', description: 'Browse captured screenshots, PDFs, recordings and downloads, grouped by task' },
|
|
36
35
|
{ name: 'history', description: 'Show recent browser task history' },
|
|
37
36
|
{ name: 'refs', description: 'Get DOM refs for interactive elements' },
|
|
38
37
|
{ name: 'profiles', description: 'Manage browser profiles (create / list / edit / rename / show / remove / use / …)' },
|
|
@@ -76,7 +75,6 @@ async function forwardToBrowser(opts) {
|
|
|
76
75
|
argv: opts.argv,
|
|
77
76
|
context,
|
|
78
77
|
capture: opts.capture,
|
|
79
|
-
onEvent: (event) => recordBrowserAction(event, { device: opts.device }),
|
|
80
78
|
});
|
|
81
79
|
}
|
|
82
80
|
async function forwardAndExit(opts) {
|
|
@@ -98,24 +96,11 @@ function registerPassthroughVerbs(program) {
|
|
|
98
96
|
}));
|
|
99
97
|
}
|
|
100
98
|
}
|
|
101
|
-
function registerSessionsCommand(program) {
|
|
102
|
-
program
|
|
103
|
-
.command('sessions')
|
|
104
|
-
.description('Browse a profile\'s captured screenshots, PDFs, recordings, and downloads, grouped by task')
|
|
105
|
-
.option('--profile <name>', 'Only this profile (default: all profiles with captures)')
|
|
106
|
-
.option('--open [selector]', "Open a capture in the OS default app: 'latest' or a filename")
|
|
107
|
-
.option('--json', 'Emit machine-readable JSON')
|
|
108
|
-
.option('--no-interactive', 'Print the flat listing instead of opening the interactive task browser')
|
|
109
|
-
.action(async (opts) => {
|
|
110
|
-
await runBrowserSessionsCommand({ profile: opts.profile, open: opts.open, json: opts.json, interactive: opts.interactive });
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
99
|
export function registerBrowserCommand(program) {
|
|
114
100
|
const browser = program
|
|
115
101
|
.command('browser')
|
|
116
102
|
.description('Drive a real browser (Chrome/Brave/Edge/Firefox/Arc) over CDP/BiDi — navigate, screenshot, click, capture; --device to drive a remote box');
|
|
117
103
|
registerPassthroughVerbs(browser);
|
|
118
|
-
registerSessionsCommand(browser);
|
|
119
104
|
registerCommandGroups(browser, BROWSER_HELP_GROUPS);
|
|
120
105
|
setHelpSections(browser, {
|
|
121
106
|
examples: `
|
|
@@ -138,7 +123,7 @@ export function registerBrowserCommand(program) {
|
|
|
138
123
|
notes: `
|
|
139
124
|
The engine is the standalone \`browser\` CLI (npm i -g @phnx-labs/browser-cli);
|
|
140
125
|
agents-cli supplies --device fleet resolution, remote-control consent, and the
|
|
141
|
-
session
|
|
126
|
+
agent-session link on the feed. Per-verb flags are the engine's — \`agents browser
|
|
142
127
|
screenshot --help\` asks it directly.
|
|
143
128
|
|
|
144
129
|
\`--device\` is bound once at \`start\`; page verbs run against the task's bound
|
|
@@ -147,8 +132,8 @@ export function registerBrowserCommand(program) {
|
|
|
147
132
|
Another fleet machine may drive this browser only after \`agents browser
|
|
148
133
|
remote-control on\` here (device-local, never synced; default off).
|
|
149
134
|
|
|
150
|
-
\`agents browser sessions\`
|
|
151
|
-
|
|
135
|
+
\`agents browser sessions\` is the engine's own task and capture history
|
|
136
|
+
(\`browser sessions --help\`); the feed stream reads the same rows.
|
|
152
137
|
`,
|
|
153
138
|
});
|
|
154
139
|
}
|
|
@@ -4,8 +4,7 @@ import { interruptibleSpinner } from '../lib/spinner.js';
|
|
|
4
4
|
const DEFAULT_LIMIT = '50';
|
|
5
5
|
export async function runCloudTranscripts(query, options) {
|
|
6
6
|
const { discoverCloudSessions, ensureCloudSessionCached } = await import('../lib/session/cloud.js');
|
|
7
|
-
const { buildFilterOptions, resolveViewMode, renderSession } = await import('../lib/session/presentation.js');
|
|
8
|
-
const { printSessionTable } = await import('./sessions.js');
|
|
7
|
+
const { buildFilterOptions, printSessionTable, resolveViewMode, renderSession } = await import('../lib/session/presentation.js');
|
|
9
8
|
let filterOpts;
|
|
10
9
|
try {
|
|
11
10
|
filterOpts = buildFilterOptions(options);
|
|
@@ -11,9 +11,8 @@
|
|
|
11
11
|
* 2. the peer allow list, and `--device <name>` resolved against the fleet —
|
|
12
12
|
* both carried in the fd-3 context (`lib/computer/context.ts`);
|
|
13
13
|
* 3. the acting actor and agent session, likewise on fd 3;
|
|
14
|
-
* 4. a recorder for the action events the engine streams back on fd 4
|
|
15
|
-
* `
|
|
16
|
-
* history (`lib/computer/record.ts`).
|
|
14
|
+
* 4. a recorder for the action events the engine streams back on fd 4
|
|
15
|
+
* (`lib/computer/record.ts`).
|
|
17
16
|
*
|
|
18
17
|
* The remote path is the ENGINE's. `--device <name>` is resolved against the
|
|
19
18
|
* fleet here — that is what the registry, ssh identity and platform check are
|
|
@@ -34,9 +33,6 @@
|
|
|
34
33
|
* verb CATALOG — names, one-line descriptions, help groups — because that is
|
|
35
34
|
* what makes the surface discoverable from `agents computer --help`, and a
|
|
36
35
|
* verb the engine drops should fail loud here rather than silently vanish.
|
|
37
|
-
*
|
|
38
|
-
* `sessions` is the one verb that never reaches the engine: it reads agents-cli's
|
|
39
|
-
* own event ledger.
|
|
40
36
|
*/
|
|
41
37
|
import { Command } from 'commander';
|
|
42
38
|
export declare const COMPUTER_PASSTHROUGH_VERBS: ReadonlyArray<{
|
|
@@ -11,9 +11,8 @@
|
|
|
11
11
|
* 2. the peer allow list, and `--device <name>` resolved against the fleet —
|
|
12
12
|
* both carried in the fd-3 context (`lib/computer/context.ts`);
|
|
13
13
|
* 3. the acting actor and agent session, likewise on fd 3;
|
|
14
|
-
* 4. a recorder for the action events the engine streams back on fd 4
|
|
15
|
-
* `
|
|
16
|
-
* history (`lib/computer/record.ts`).
|
|
14
|
+
* 4. a recorder for the action events the engine streams back on fd 4
|
|
15
|
+
* (`lib/computer/record.ts`).
|
|
17
16
|
*
|
|
18
17
|
* The remote path is the ENGINE's. `--device <name>` is resolved against the
|
|
19
18
|
* fleet here — that is what the registry, ssh identity and platform check are
|
|
@@ -34,14 +33,10 @@
|
|
|
34
33
|
* verb CATALOG — names, one-line descriptions, help groups — because that is
|
|
35
34
|
* what makes the surface discoverable from `agents computer --help`, and a
|
|
36
35
|
* verb the engine drops should fail loud here rather than silently vanish.
|
|
37
|
-
*
|
|
38
|
-
* `sessions` is the one verb that never reaches the engine: it reads agents-cli's
|
|
39
|
-
* own event ledger.
|
|
40
36
|
*/
|
|
41
37
|
import { forwardsHelp, registerCommandGroups, setHelpSections } from '../lib/help.js';
|
|
42
38
|
import { loadComputerAllowList, loadDefaultPeers, resolveTcpEndpoint, resolveVncEndpoint, } from '../lib/computer/policy.js';
|
|
43
39
|
import { forwardToComputer } from '../lib/computer-client.js';
|
|
44
|
-
import { runComputerSessionsCommand } from './computer-sessions-picker.js';
|
|
45
40
|
const COMPUTER_HELP_GROUPS = [
|
|
46
41
|
{ title: 'Installation', names: ['setup'] },
|
|
47
42
|
{ title: 'Daemon lifecycle', names: ['start', 'stop', 'reload', 'status'] },
|
|
@@ -99,7 +94,7 @@ export function registerComputerCommand(program) {
|
|
|
99
94
|
process.env.COMPUTER_HELPER_VNC_PASSWORD = globals.vncPassword;
|
|
100
95
|
}
|
|
101
96
|
const device = globals.device;
|
|
102
|
-
if (shouldBlockOffPlatform({
|
|
97
|
+
if (actionCommand.name() !== 'sessions' && shouldBlockOffPlatform({
|
|
103
98
|
platform: process.platform,
|
|
104
99
|
tcpConfigured: resolveTcpEndpoint() != null,
|
|
105
100
|
vncConfigured: resolveVncEndpoint() != null,
|
|
@@ -137,15 +132,15 @@ export function registerComputerCommand(program) {
|
|
|
137
132
|
notes: `
|
|
138
133
|
The engine is the standalone \`computer\` CLI (npm i -g @phnx-labs/computer-cli);
|
|
139
134
|
agents-cli supplies the permission allow list, --device fleet resolution, and
|
|
140
|
-
the session
|
|
135
|
+
the agent-session link on the feed. Per-verb flags are the engine's — \`agents computer
|
|
141
136
|
click --help\` asks it directly.
|
|
142
137
|
|
|
143
138
|
Apps are deny-by-default: a verb only reaches an app named by a
|
|
144
139
|
Computer(<bundle-id>) rule in ~/.agents/permissions/groups/. Edit a group,
|
|
145
140
|
then \`agents computer reload\`.
|
|
146
141
|
|
|
147
|
-
\`agents computer sessions\`
|
|
148
|
-
|
|
142
|
+
\`agents computer sessions\` is the engine's own run history
|
|
143
|
+
(\`computer sessions --help\`); the feed stream reads the same rows.
|
|
149
144
|
`,
|
|
150
145
|
});
|
|
151
146
|
}
|
|
@@ -239,12 +234,11 @@ function registerStatusCommand(program) {
|
|
|
239
234
|
function registerSessionsCommand(program) {
|
|
240
235
|
program
|
|
241
236
|
.command('sessions')
|
|
242
|
-
.description('Browse computer-driving history, grouped by run —
|
|
243
|
-
.
|
|
244
|
-
.
|
|
245
|
-
.
|
|
246
|
-
.
|
|
247
|
-
|
|
248
|
-
await runComputerSessionsCommand({ machine: opts.machine, limit: opts.limit, json: opts.json, interactive: opts.interactive });
|
|
237
|
+
.description('Browse computer-driving history, grouped by run — the engine\'s own picker')
|
|
238
|
+
.allowUnknownOption(true)
|
|
239
|
+
.allowExcessArguments(true)
|
|
240
|
+
.helpOption(false)
|
|
241
|
+
.action(async (_opts, cmd) => {
|
|
242
|
+
await forwardAndExit({ argv: ['sessions', ...cmd.args], record: false });
|
|
249
243
|
});
|
|
250
244
|
}
|
package/dist/commands/daemon.js
CHANGED
|
@@ -7,7 +7,8 @@ import { getDaemonStatus, isDaemonRunning, readDaemonLog, startDaemon, stopDaemo
|
|
|
7
7
|
import { listDaemonRunProcesses } from '../lib/daemon/leaked-daemons.js';
|
|
8
8
|
import { getConfigValue, setConfigValue, isDaemonEnabled } from '../lib/device-config.js';
|
|
9
9
|
import { readSubsystemHealth, readAllSubsystemHealth, SUBSYSTEM_DAEMON_START, } from '../lib/daemon-health.js';
|
|
10
|
-
import { DAEMON_SERVICE_IDS, listDaemonServiceStates, setDaemonServiceEnabled, getDaemonServicesConfigPath, queueDaemonServiceRestart, } from '../lib/daemon-services.js';
|
|
10
|
+
import { DAEMON_SERVICE_IDS, listDaemonServiceStates, setDaemonServiceEnabled, getDaemonServicesConfigPath, queueDaemonServiceRestart, readDaemonLogLevel, writeDaemonLogLevel, } from '../lib/daemon-services.js';
|
|
11
|
+
import { LOG_LEVELS, levelRank, parseLogLevel } from '../lib/daemon/diagnostics.js';
|
|
11
12
|
import { listJobs, getLatestRun } from '../lib/scheduling/routines.js';
|
|
12
13
|
import { JobScheduler } from '../lib/scheduler.js';
|
|
13
14
|
import { followFile } from '../lib/log-follow.js';
|
|
@@ -376,14 +377,9 @@ function parseLogLines(raw) {
|
|
|
376
377
|
}
|
|
377
378
|
return out;
|
|
378
379
|
}
|
|
379
|
-
const LEVEL_RANK = { INFO: 0, WARN: 1, ERROR: 2 };
|
|
380
380
|
function passesFilters(entry, minLevel, sinceMs) {
|
|
381
|
-
if (minLevel)
|
|
382
|
-
|
|
383
|
-
const level = LEVEL_RANK[entry.level.toUpperCase()] ?? 0;
|
|
384
|
-
if (level < min)
|
|
385
|
-
return false;
|
|
386
|
-
}
|
|
381
|
+
if (minLevel && levelRank(entry.level) < levelRank(minLevel))
|
|
382
|
+
return false;
|
|
387
383
|
if (sinceMs !== undefined && Date.parse(entry.ts) < sinceMs)
|
|
388
384
|
return false;
|
|
389
385
|
return true;
|
|
@@ -391,8 +387,38 @@ function passesFilters(entry, minLevel, sinceMs) {
|
|
|
391
387
|
function printLogEntry(entry) {
|
|
392
388
|
const color = entry.level === 'ERROR' ? chalk.red : entry.level === 'WARN' ? chalk.yellow : chalk.gray;
|
|
393
389
|
console.log(`${chalk.gray(entry.ts)} ${color(entry.level.padEnd(5))} ${entry.message}`);
|
|
390
|
+
if (entry.data && (entry.level === 'ERROR' || entry.level === 'WARN'))
|
|
391
|
+
console.log(chalk.gray(` ${JSON.stringify(entry.data)}`));
|
|
392
|
+
}
|
|
393
|
+
function assertLogLevelOption(level) {
|
|
394
|
+
if (level !== undefined && !parseLogLevel(level)) {
|
|
395
|
+
throw new Error(`--level must be one of ${LOG_LEVELS.join(', ').toLowerCase()} (got '${level}')`);
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
function runLogLevel(level, opts) {
|
|
399
|
+
if (level === undefined) {
|
|
400
|
+
const current = readDaemonLogLevel().toLowerCase();
|
|
401
|
+
if (opts.json)
|
|
402
|
+
console.log(JSON.stringify({ level: current }));
|
|
403
|
+
else
|
|
404
|
+
console.log(current);
|
|
405
|
+
return;
|
|
406
|
+
}
|
|
407
|
+
const parsed = parseLogLevel(level);
|
|
408
|
+
if (!parsed)
|
|
409
|
+
throw new Error(`log level must be one of ${LOG_LEVELS.join(', ').toLowerCase()} (got '${level}')`);
|
|
410
|
+
writeDaemonLogLevel(parsed);
|
|
411
|
+
const applied = signalDaemonReload();
|
|
412
|
+
if (opts.json) {
|
|
413
|
+
console.log(JSON.stringify({ level: parsed.toLowerCase(), applied }));
|
|
414
|
+
return;
|
|
415
|
+
}
|
|
416
|
+
console.log(applied
|
|
417
|
+
? chalk.green(`Daemon log level set to ${parsed.toLowerCase()}.`) + chalk.gray(' Applied live. Follow it: agents daemon logs -f')
|
|
418
|
+
: chalk.yellow(`Daemon log level set to ${parsed.toLowerCase()} in ${getDaemonServicesConfigPath()}, but the reload signal was not delivered; it applies on the next daemon start.`));
|
|
394
419
|
}
|
|
395
420
|
async function runLogs(opts) {
|
|
421
|
+
assertLogLevelOption(opts.level);
|
|
396
422
|
const sinceMs = opts.since ? Date.now() - (parseDuration(opts.since) ?? 0) * 1000 : undefined;
|
|
397
423
|
const lineCount = opts.lines ? parseInt(opts.lines, 10) : 50;
|
|
398
424
|
if (opts.follow) {
|
|
@@ -655,6 +681,9 @@ export function registerDaemonCommand(program) {
|
|
|
655
681
|
# Tail the daemon's own log, warnings and up, from the last hour
|
|
656
682
|
agents daemon logs -f --level warn --since 1h
|
|
657
683
|
|
|
684
|
+
# Trace every service tick and slow section while diagnosing (applies live)
|
|
685
|
+
agents daemon logs level debug
|
|
686
|
+
|
|
658
687
|
# One-shot health check for scripts (non-zero exit on problems)
|
|
659
688
|
agents daemon doctor
|
|
660
689
|
|
|
@@ -892,17 +921,47 @@ export function registerDaemonCommand(program) {
|
|
|
892
921
|
registerWebhooksSubcommand(cmd);
|
|
893
922
|
registerFunnelCommand(cmd);
|
|
894
923
|
registerDaemonIndexCommand(cmd);
|
|
895
|
-
cmd.command('logs')
|
|
896
|
-
.description('Read the daemon\'s own log
|
|
924
|
+
const logsCmd = cmd.command('logs')
|
|
925
|
+
.description('Read the daemon\'s own log: lifecycle, every service tick, slow sections, event-loop stalls, and per-minute vitals (not routine run output).')
|
|
897
926
|
.option('-n, --lines <number>', 'Show this many recent lines', '50')
|
|
898
927
|
.option('-f, --follow', 'Stream new lines as they are written (like tail -f)')
|
|
899
|
-
.option('--level <level>', 'Minimum level to show: info | warn | error')
|
|
928
|
+
.option('--level <level>', 'Minimum level to show: debug | info | warn | error')
|
|
900
929
|
.option('--since <dur>', 'Only lines newer than this (e.g. 1h, 30m)')
|
|
901
930
|
.option('--json', 'Emit each line as JSON')
|
|
902
931
|
.action(async (opts, command) => {
|
|
903
932
|
const merged = command.optsWithGlobals();
|
|
904
933
|
await runLogs({ lines: opts.lines, follow: opts.follow, level: opts.level, since: opts.since, json: merged.json === true || opts.json === true });
|
|
905
934
|
});
|
|
935
|
+
logsCmd.command('level [level]')
|
|
936
|
+
.description('Show or set what the daemon writes: debug (every tick and span) | info (default) | warn | error. Applies live.')
|
|
937
|
+
.option('--json', 'Emit as JSON')
|
|
938
|
+
.action((level, opts, command) => {
|
|
939
|
+
runLogLevel(level, { json: command.optsWithGlobals().json === true || opts.json === true });
|
|
940
|
+
});
|
|
941
|
+
setHelpSections(logsCmd, {
|
|
942
|
+
examples: `
|
|
943
|
+
# Why did it restart? Errors carry a snapshot: in-flight ticks, slow sections, vitals
|
|
944
|
+
agents daemon logs --level error --since 1h
|
|
945
|
+
|
|
946
|
+
# Event-loop stalls and slow synchronous sections, as they happen
|
|
947
|
+
agents daemon logs -f --level warn
|
|
948
|
+
|
|
949
|
+
# Turn on per-tick and per-span tracing while you diagnose, then turn it back off
|
|
950
|
+
agents daemon logs level debug
|
|
951
|
+
agents daemon logs -f --level debug
|
|
952
|
+
agents daemon logs level info
|
|
953
|
+
|
|
954
|
+
# Machine-readable, with each line's structured data
|
|
955
|
+
agents daemon logs --since 10m --json
|
|
956
|
+
`,
|
|
957
|
+
notes: `
|
|
958
|
+
Every line is JSON in the daemon log file (agents daemon status shows the path), with
|
|
959
|
+
an optional data object. Event names: tick.slow, tick.failed, tick.breach, loop.stall,
|
|
960
|
+
span.slow, vitals (once a minute), and at debug tick.start, tick.ok, span.
|
|
961
|
+
The level is stored as logLevel in the daemon's services.yaml. Debug writes a line per
|
|
962
|
+
tick and per section synchronously, so leave it on only while diagnosing.
|
|
963
|
+
`,
|
|
964
|
+
});
|
|
906
965
|
cmd.command('doctor')
|
|
907
966
|
.description('One-shot health check: identity, duplicates, hosted services, scheduler. Non-zero exit on problems.')
|
|
908
967
|
.option('--json', 'Emit as JSON')
|
package/dist/commands/exec.js
CHANGED
|
@@ -846,7 +846,7 @@ ${formatModeSupportTable().split('\n').map((line) => ` ${line}`).join('\n
|
|
|
846
846
|
delete process.env.AGENTS_RESUME_SOURCE_JSON;
|
|
847
847
|
const outcome = injectedSource
|
|
848
848
|
? { kind: 'resolved', session: injectedSource }
|
|
849
|
-
: await (await import('
|
|
849
|
+
: await (await import('../lib/session/selection.js')).resolveSessionMetadataValue(selector, { agent: runBaseAgentId ?? undefined });
|
|
850
850
|
if (outcome.kind === 'partial') {
|
|
851
851
|
const offline = outcome.failedPeers;
|
|
852
852
|
console.error(chalk.yellow(`Warning: ${offline.length} device(s) unreachable, not checked: ${offline.join(', ')}`));
|
package/dist/commands/feed.js
CHANGED
|
@@ -19,8 +19,7 @@ import { registerFeedWatchCommand } from './feed-watch.js';
|
|
|
19
19
|
import { AnswerError, answerOwnerIsLocal, checkAnswerDelivery, claimAndRouteAttentionAnswer, forwardFeedAnswer, parseAttentionKey, } from '../lib/feed/answer.js';
|
|
20
20
|
import { gcMailbox } from '../lib/mailbox-gc.js';
|
|
21
21
|
import { isValidMailboxId } from '../lib/mailbox.js';
|
|
22
|
-
import { getActiveSessions } from '../lib/session/active.js';
|
|
23
|
-
import { backfillActiveRowsFromMeta } from './sessions.js';
|
|
22
|
+
import { backfillActiveRowsFromMeta, getActiveSessions } from '../lib/session/active.js';
|
|
24
23
|
import { mailboxIdForActiveSession } from '../lib/mailbox-target.js';
|
|
25
24
|
import { GLYPH, masthead } from '../lib/comms-render.js';
|
|
26
25
|
import { discoverSessions } from '../lib/session/discover.js';
|
package/dist/commands/focus.js
CHANGED
|
@@ -6,7 +6,10 @@ import { sessionProcessIsLocal, sessionProcessHost, shortIdFromName } from '../l
|
|
|
6
6
|
import { isAgentTmuxAlias } from '@phnx-labs/sessions-cli/reader';
|
|
7
7
|
import { attachLocalLiveSelector } from '../lib/session/local-tmux-attach.js';
|
|
8
8
|
export { looksLikeTmuxAlias, resolveTmuxAliasState, shouldAttachLocalTmuxAliasBeforeFleet } from '../lib/session/local-tmux-attach.js';
|
|
9
|
-
import {
|
|
9
|
+
import { isRunningLiveSession } from '../lib/session/active.js';
|
|
10
|
+
import { formatLiveStatusHeadline, formatPickerLabel, pickerColumnsFor } from '../lib/session/presentation.js';
|
|
11
|
+
import { buildSessionRecoveryCommand, resumeSessionInPlace } from '../lib/session/resume-command.js';
|
|
12
|
+
import { filterSessionsByQuery, resolveSessionMetadataValue, resolveSessionAgentName } from '../lib/session/selection.js';
|
|
10
13
|
import { requestedLiveStatuses } from './ps-roster.js';
|
|
11
14
|
import { resolveBackend, CONFIRM_THRESHOLD } from './sessions-resume.js';
|
|
12
15
|
import { runOnPeer } from '../lib/session/remote-list.js';
|
package/dist/commands/go.js
CHANGED
|
@@ -7,9 +7,10 @@ import { isSessionIdShape } from '../lib/session/pid-registry.js';
|
|
|
7
7
|
import { gatherRemoteActive } from '../lib/session/remote-active.js';
|
|
8
8
|
import { discoverSessions } from '../lib/session/discover.js';
|
|
9
9
|
import { deriveShortId } from '../lib/session/short-id.js';
|
|
10
|
-
import {
|
|
10
|
+
import { formatPickerLabel, pickerColumnsFor } from '../lib/session/presentation.js';
|
|
11
|
+
import { mergeLocalFirst, filterSessionsByQuery, isUniqueEnoughSelector } from '../lib/session/selection.js';
|
|
11
12
|
import { dedupeByMachineSession, matchesLiveStatus } from './ps-roster.js';
|
|
12
|
-
import { buildPreview } from './sessions-picker.js';
|
|
13
|
+
import { buildPreview, pickSessionInteractive } from './sessions-picker.js';
|
|
13
14
|
import { multiItemPicker } from '../lib/picker.js';
|
|
14
15
|
import { isPromptCancelled } from './utils.js';
|
|
15
16
|
import { machineId } from '../lib/session/sync/config.js';
|
package/dist/commands/logs.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
2
|
import { discoverSessions, resolveSessionById } from '../lib/session/discover.js';
|
|
3
|
-
import { parseAgentFilter } from '
|
|
3
|
+
import { parseAgentFilter } from '../lib/session/selection.js';
|
|
4
4
|
import { renderSessionLog, renderSessionLogJson } from '../lib/session/presentation.js';
|
|
5
|
-
import {
|
|
5
|
+
import { runSessions } from '../lib/sessions-client.js';
|
|
6
6
|
import { showHostTaskLog, hostTaskLogJson } from '../lib/hosts/logs.js';
|
|
7
7
|
import { listTasks } from '../lib/hosts/tasks.js';
|
|
8
8
|
import { itemPicker } from '../lib/picker.js';
|
|
@@ -35,11 +35,7 @@ async function showSession(session, follow, full, json = false) {
|
|
|
35
35
|
return;
|
|
36
36
|
}
|
|
37
37
|
if (follow) {
|
|
38
|
-
|
|
39
|
-
console.error(chalk.red(`Tailing is supported for claude and codex sessions only (got ${session.agent}).`));
|
|
40
|
-
process.exit(2);
|
|
41
|
-
}
|
|
42
|
-
await streamSessionTail(session, { raw: full });
|
|
38
|
+
process.exitCode = await runSessions(['tail', session.id, ...(full ? ['--json'] : [])]);
|
|
43
39
|
return;
|
|
44
40
|
}
|
|
45
41
|
await renderSessionLog(session, full ? 'markdown' : 'summary');
|