@phnx-labs/agents-cli 1.22.126 → 1.22.128
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 +66 -0
- package/README.md +6 -15
- package/dist/commands/browser.js +4 -19
- package/dist/commands/computer.d.ts +2 -6
- package/dist/commands/computer.js +12 -18
- package/dist/commands/logs.js +2 -6
- package/dist/commands/sessions.d.ts +0 -11
- package/dist/commands/sessions.js +31 -364
- package/dist/index.js +12 -12
- package/dist/lib/accounting/usage-ingest.js +2 -1
- 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/daemon/runner.js +3 -2
- package/dist/lib/device-config.d.ts +1 -1
- package/dist/lib/device-config.js +7 -7
- package/dist/lib/feed/tool-activity.d.ts +22 -10
- package/dist/lib/feed/tool-activity.js +161 -32
- package/dist/lib/feed/tools.d.ts +55 -2
- package/dist/lib/feed/tools.js +22 -28
- package/dist/lib/feed/watch.js +4 -3
- 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/remote/remote-list.d.ts +2 -36
- package/dist/lib/session/remote/remote-list.js +3 -320
- 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/stdout.d.ts +1 -0
- package/dist/lib/stdout.js +5 -0
- 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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,71 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.22.128
|
|
4
|
+
|
|
5
|
+
### Removed
|
|
6
|
+
|
|
7
|
+
- `agents sessions tail` is gone; use `sessions tail <id>` from the standalone
|
|
8
|
+
sessions CLI. `agents logs -f <id>` runs it for a session.
|
|
9
|
+
- Tool-call search moved to the standalone CLI: `sessions --include tools
|
|
10
|
+
--query <clause> [--count] [--host <target>] --json`. It reads the same index
|
|
11
|
+
agents writes (`agents sessions backfill tools` still fills it).
|
|
12
|
+
A tool search through `agents sessions --include tools` (no session id, or a
|
|
13
|
+
`--query` clause) now exits 2 and names that command; reading one session's
|
|
14
|
+
tool calls, `agents sessions <id> --include tools [--json|--markdown]`, is
|
|
15
|
+
unchanged. `--fleet` / `--count` are no longer `agents sessions` flags. `--query` is a
|
|
16
|
+
single search-text flag.
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- A read query (`agents sessions <query> [--json]`) no longer falls back to an
|
|
21
|
+
in-process read when the `sessions` bin cannot be resolved. It exits 1 with an
|
|
22
|
+
error naming the install.
|
|
23
|
+
|
|
24
|
+
- **Browser and computer history come from the standalone tools (PHNX-4227).**
|
|
25
|
+
`agents sessions --browser` and `agents sessions --computer` are removed: run
|
|
26
|
+
`browser sessions` / `computer sessions` (or `agents browser sessions` /
|
|
27
|
+
`agents computer sessions`) instead. `agents browser sessions` and
|
|
28
|
+
`agents computer sessions` now run the standalone tool's own picker, so their
|
|
29
|
+
flags are the engine's (`--since`, `--until`, `--search`, `--tasks`, `--open`, …).
|
|
30
|
+
The fleet-wide `--device` listing of computer runs went with the alias; run
|
|
31
|
+
`computer sessions` on that box (`agents ssh <box> computer sessions`). The
|
|
32
|
+
browser and computer rows on `agents feed watch --json` are read from
|
|
33
|
+
`browser sessions --tasks --json` and `computer sessions --json`; agents-cli adds
|
|
34
|
+
only the agent-session link, and a missing tool, a failed run, or unreadable
|
|
35
|
+
output keeps the rows already on the stream instead of removing them. The
|
|
36
|
+
`computer` floor in `agents setup tools` is now 0.1.7, the first release whose
|
|
37
|
+
`computer sessions --json` honors `--limit`. A computer row's `agent` now comes
|
|
38
|
+
from the linked session only, since the engine records no harness name.
|
|
39
|
+
agents-cli no longer writes `browser_sessions` / `computer_sessions` rows (the
|
|
40
|
+
engines keep their own history and adopted those tables once) and no longer
|
|
41
|
+
opens the browser events pipe; the tables and migrations stay. `agents computer
|
|
42
|
+
sessions` also runs off macOS, since listing history drives nothing. Source:
|
|
43
|
+
`cli/src/lib/feed/tool-activity.ts`, `cli/src/lib/feed/tools.ts`,
|
|
44
|
+
`cli/src/commands/browser.ts`, `cli/src/commands/computer.ts`,
|
|
45
|
+
`cli/src/commands/sessions.ts`, `cli/src/lib/standalone-tools.ts`,
|
|
46
|
+
`cli/src/lib/browser-client.ts`, `cli/src/lib/computer/record.ts`, `cli/src/lib/session/db.ts`.
|
|
47
|
+
|
|
48
|
+
- **`menubar.menu.tabOrder` and `menubar.menu.hiddenTabs` know AGI Menu's Secrets tab (PHNX-4269).**
|
|
49
|
+
AGI Menu 1.15.13 adds a Secrets tab that lists this Mac's secrets bundles with their lock
|
|
50
|
+
state and unlocks or locks them with Touch ID. The menu only offers the tab once the CLI
|
|
51
|
+
accepts its id, so `secrets` joins the tab list. It starts hidden (`hiddenTabs` defaults to
|
|
52
|
+
`secrets`), and an order saved before it existed reads back with `secrets` appended.
|
|
53
|
+
Source: `cli/src/lib/device-config.ts`.
|
|
54
|
+
|
|
55
|
+
- **Claude routines run on worker devices again.** Before launching, a routine checked
|
|
56
|
+
each candidate account with `claude auth status` in an environment that left out the
|
|
57
|
+
setup-token a worker launch injects. Every account on a worker read as signed out, so
|
|
58
|
+
every Claude routine there failed with "found no authenticated Claude account". The
|
|
59
|
+
check now uses the same environment as the launch. Source: `cli/src/lib/daemon/runner.ts`.
|
|
60
|
+
|
|
61
|
+
## 1.22.127
|
|
62
|
+
|
|
63
|
+
- **A peer's fleet-state reply now arrives whole over ssh.** `agents __usage-ingest --reply`
|
|
64
|
+
and `agents __usage-export` exited before stdout drained, so a reply larger than one pipe
|
|
65
|
+
buffer was cut at 65,536 bytes and the dialing box logged "malformed JSON payload" for every
|
|
66
|
+
peer. That left peer state stale, which blocked worker owner-notify tokens from minting. Both
|
|
67
|
+
verbs now wait for stdout to flush before exiting. Source: `cli/src/lib/stdout.ts`.
|
|
68
|
+
|
|
3
69
|
## 1.22.126
|
|
4
70
|
|
|
5
71
|
- **Liveness checks no longer spawn one `ps` per session (PHNX-4225).** Every PID-reuse check
|
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
|
|
|
@@ -1622,12 +1614,11 @@ Conversations with Claude, Codex, legacy Gemini, and other agents scatter across
|
|
|
1622
1614
|
```bash
|
|
1623
1615
|
agents sessions "auth middleware" # Full-text search across all agents
|
|
1624
1616
|
agents sessions --agent claude --since 7d
|
|
1625
|
-
|
|
1626
|
-
agents sessions --include tools --query 'program:git' --count --fleet --json
|
|
1617
|
+
sessions --include tools --query 'program:git' --json # standalone sessions CLI
|
|
1627
1618
|
agents sessions backfill tools --fleet
|
|
1628
1619
|
```
|
|
1629
1620
|
|
|
1630
|
-
The index lives at `~/.agents/.history/sessions/sessions.db` (SQLite + FTS5).
|
|
1621
|
+
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
1622
|
|
|
1632
1623
|
### Secrets
|
|
1633
1624
|
|
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
|
}
|
|
@@ -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/logs.js
CHANGED
|
@@ -2,7 +2,7 @@ import chalk from 'chalk';
|
|
|
2
2
|
import { discoverSessions, resolveSessionById } from '../lib/session/discover.js';
|
|
3
3
|
import { parseAgentFilter } from './sessions.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');
|
|
@@ -5,13 +5,10 @@ import { type ActiveSession } from '../lib/session/active.js';
|
|
|
5
5
|
export { activeSessionProjectKey, backfillActiveRowsFromIndex, backfillActiveRowsFromMeta, isRunningLiveSession, serializeActiveSessionsForJson, serializeSessionsJson, type BackfillMeta } from '../lib/session/active.js';
|
|
6
6
|
import { loadLocalActiveSessions } from '../lib/session/session-cache.js';
|
|
7
7
|
import { gatherRemoteList, runOnPeer } from '../lib/session/remote-list.js';
|
|
8
|
-
import { type RemoteAgentsJsonParseResult } from '../lib/remote-agents-json.js';
|
|
9
8
|
import { type RunMeta } from '../lib/scheduling/routines.js';
|
|
10
9
|
import { type PickedSession, type SessionPreviewDigest } from './sessions-picker.js';
|
|
11
10
|
import { type TranscriptRenderOptions } from '../lib/session/presentation.js';
|
|
12
11
|
export { buildFilterOptions, renderSession, renderSessionLog, renderSessionLogJson, resolveViewMode, type TranscriptRenderOptions, } from '../lib/session/presentation.js';
|
|
13
|
-
import { type ComputerRunRow } from '../lib/computer/sessions-list.js';
|
|
14
|
-
import { type ToolSearchEnvelope, type ToolProgramCountEnvelope } from '../lib/session/tool-index.js';
|
|
15
12
|
interface SessionFilterOptions {
|
|
16
13
|
agent?: string;
|
|
17
14
|
version?: string;
|
|
@@ -55,8 +52,6 @@ interface SessionsOptions extends SessionFilterOptions, TranscriptRenderOptions
|
|
|
55
52
|
local?: boolean;
|
|
56
53
|
device?: string[];
|
|
57
54
|
devices?: string[];
|
|
58
|
-
fleet?: boolean;
|
|
59
|
-
count?: boolean;
|
|
60
55
|
claude?: boolean;
|
|
61
56
|
codex?: boolean;
|
|
62
57
|
kimi?: boolean;
|
|
@@ -91,7 +86,6 @@ interface SessionPickerJsonRow extends SessionMeta {
|
|
|
91
86
|
export declare function serializeSessionPickerRows(sessions: SessionMeta[], liveSessions: ActiveSession[], self?: string): SessionPickerJsonRow[];
|
|
92
87
|
export declare function mergeLocalFirst(sessions: SessionMeta[], localMachine: string): SessionMeta[];
|
|
93
88
|
export declare function serializeResolvedSessionsJson(sessions: SessionMeta[]): string;
|
|
94
|
-
export declare function parseRemoteComputerSessionRows(stdout: string, machine: string): RemoteAgentsJsonParseResult<ComputerRunRow>;
|
|
95
89
|
export declare function hasNoBrowserDisqualifyingFlags(options: SessionsOptions, query: string | undefined): boolean;
|
|
96
90
|
export interface RoutineRunGroup {
|
|
97
91
|
runId: string;
|
|
@@ -152,10 +146,6 @@ export declare function renderSessionPreview(query: string, scope: {
|
|
|
152
146
|
revision?: string;
|
|
153
147
|
}): Promise<void>;
|
|
154
148
|
export declare function formatLiveStatusHeadline(live: ActiveSession | undefined, bookmarked?: boolean): string;
|
|
155
|
-
export declare function mergeToolSearchEnvelopes(local: ToolSearchEnvelope, remotes: ToolSearchEnvelope[]): ToolSearchEnvelope;
|
|
156
|
-
export declare function mergeToolProgramCountEnvelopes(local: ToolProgramCountEnvelope, remotes: ToolProgramCountEnvelope[]): ToolProgramCountEnvelope;
|
|
157
|
-
export declare function toolOriginSessions(sessions: SessionMeta[], machine: string, originOnly: boolean): SessionMeta[];
|
|
158
|
-
export declare function toolSearchFleetSortError(sort: string | undefined, spansDevices: boolean): string | undefined;
|
|
159
149
|
export declare function matchesTeam(session: SessionMeta, team: string): boolean;
|
|
160
150
|
export declare function teamBadge(session: SessionMeta): {
|
|
161
151
|
plain: string;
|
|
@@ -259,7 +249,6 @@ export declare function isDefinitiveMatch(session: SessionMeta, selector: string
|
|
|
259
249
|
export declare function selectorAllowsEarlyExit(selector: string): boolean;
|
|
260
250
|
export declare function fleetCandidatesByQuery(rows: SessionMeta[], query: string, trustResolvedRows?: boolean): FleetSessionCandidate[];
|
|
261
251
|
export declare function metadataResolveForwardedArgs(selector: string, scope: Pick<SessionFilterOptions, 'agent' | 'project'>): string[];
|
|
262
|
-
export declare function toolSearchForwardedArgs(argv: string[], hosts: string[]): string[];
|
|
263
252
|
export declare function isUniqueEnoughSelector(selector: string): boolean;
|
|
264
253
|
export declare function metadataResolveOutcome(localMatches: SessionMeta[], remote: {
|
|
265
254
|
sessions: SessionMeta[];
|