@phnx-labs/agents-cli 1.22.123 → 1.22.125
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 +40 -0
- package/dist/commands/focus.js +6 -1
- package/dist/commands/go.d.ts +5 -0
- package/dist/commands/go.js +42 -1
- package/dist/lib/helper-versions.js +1 -1
- package/dist/lib/installations/migrate.js +6 -4
- package/dist/lib/session/active.d.ts +1 -0
- package/dist/lib/session/active.js +1 -0
- package/dist/lib/terminal/backends/vscodium-agent.d.ts +4 -1
- package/dist/lib/terminal/backends/vscodium-agent.js +14 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,45 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.22.125
|
|
4
|
+
|
|
5
|
+
- **`agents ps focus <id>` jumps to the VSCodium tab that holds the session.** It used to
|
|
6
|
+
stop at "no attach rail (not tmux/Ghostty)" for a session in an editor tab, or, without
|
|
7
|
+
`--attach-only`, start a duplicate copy of a running session in a new terminal. A session
|
|
8
|
+
running on another device through a local tab tried a tmux pane on that device instead.
|
|
9
|
+
Focus now finds the tab on this machine (by session id, or by the tab a `--device` run
|
|
10
|
+
was launched from), brings its window to the front and selects it. The same applies to
|
|
11
|
+
`agents://session/<id>` links, which focus a local tab before sweeping the fleet when the
|
|
12
|
+
id (at least the 8-character short id) names exactly one live tab here, even if the link
|
|
13
|
+
names another host. `agents sessions --active --json` rows from an editor tab carry
|
|
14
|
+
`workspaceDir`, the window's folder.
|
|
15
|
+
|
|
16
|
+
## 1.22.124
|
|
17
|
+
|
|
18
|
+
- **The one-time `humans.yaml` upload now carries your channels and quiet hours (PHNX-4267).**
|
|
19
|
+
1.22.123 read each channel's `transport` as the channel, but in a real `humans.yaml` that
|
|
20
|
+
field names the delivery provider (`rush`, `openclaw-telegram`) and the `id` names the
|
|
21
|
+
channel, so every channel was dropped: the iMessage handle and the per-severity routing
|
|
22
|
+
never reached your account. It also read `quiet_hours` where the file says `quietHours`.
|
|
23
|
+
The upload now maps channels by `id` and reads `quietHours`. If 1.22.123 already moved
|
|
24
|
+
your file to trash with only the timezone uploaded, put it back at `~/.agents/humans.yaml`
|
|
25
|
+
and the next run uploads the rest. Source: `cli/src/lib/installations/migrate.ts`.
|
|
26
|
+
|
|
27
|
+
- **AGI Menu floor 1.15.9: Home shows the latest artifacts and who made them (PHNX-4269).**
|
|
28
|
+
Installed CLIs now pull AGI Menu 1.15.9. Under Needs you, Home lists what agents on this
|
|
29
|
+
Mac made in the last day, one line per session: the page's title, its kind and age, the
|
|
30
|
+
agent, its status, the session's title and where its terminal is. It reads each live feed
|
|
31
|
+
row's `artifacts`. Source: `cli/src/lib/helper-versions.ts`.
|
|
32
|
+
|
|
33
|
+
- **Session rows report a rendered artifact as its page (PHNX-4269).** `@phnx-labs/sessions-cli`
|
|
34
|
+
0.7.0: when a session writes `plan.md` and `artifacts render` writes `plan.html` beside it,
|
|
35
|
+
the row's `artifacts` list `plan.html` with its `<title>`, last changed when either file was;
|
|
36
|
+
any listed page carries its title. Rule and memory files an agent edits or names
|
|
37
|
+
(`AGENTS.md`, `CLAUDE.md`, `CLAUDE.local.md`, `GEMINI.md`, `MEMORY.md`) are no longer listed.
|
|
38
|
+
The release also stops harness envelopes (`<task-notification>`, `<system-reminder>`) from
|
|
39
|
+
reading as user turns, so a session's title and preview no longer become "Another Claude
|
|
40
|
+
session sent a message", and brings `@phnx-labs/secrets-cli` 0.3.0 in as a sessions-cli
|
|
41
|
+
dependency (session backup). Source: `cli/package.json`.
|
|
42
|
+
|
|
3
43
|
## 1.22.123
|
|
4
44
|
|
|
5
45
|
- **Feed and session watch rows carry a PR's head SHA, title and per-check items,
|
package/dist/commands/focus.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fs from 'node:fs';
|
|
2
2
|
import chalk from 'chalk';
|
|
3
3
|
import { confirm } from '@inquirer/prompts';
|
|
4
|
-
import { gatherLiveTargets, pickLiveTarget, pickLiveTargets, jumpTo, probeAttachRail, refuseFallback } from './go.js';
|
|
4
|
+
import { gatherLiveTargets, pickLiveTarget, pickLiveTargets, jumpTo, focusEditorTabOf, focusLocalEditorTab, probeAttachRail, refuseFallback } from './go.js';
|
|
5
5
|
import { sessionProcessIsLocal, sessionProcessHost, shortIdFromName } from '../lib/session/active.js';
|
|
6
6
|
import { isAgentTmuxAlias } from '@phnx-labs/sessions-cli/reader';
|
|
7
7
|
import { attachLocalLiveSelector } from '../lib/session/local-tmux-attach.js';
|
|
@@ -179,6 +179,9 @@ export async function focusAction(id, opts) {
|
|
|
179
179
|
if (await attachLocalLiveSelector(textSelector, hosts)) {
|
|
180
180
|
return;
|
|
181
181
|
}
|
|
182
|
+
if (textSelector && looksLikeIdSelector(textSelector) && await focusLocalEditorTab(textSelector)) {
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
182
185
|
if (idLookup && hosts.length === 0 && looksLikeIdSelector(textSelector)) {
|
|
183
186
|
const self = machineId();
|
|
184
187
|
const localMatch = dedupeSessionsByLogicalId(await resolveIndexedSessionById(textSelector), self);
|
|
@@ -382,6 +385,8 @@ export async function focusResolvedSession(meta, liveById, self, fallback, attac
|
|
|
382
385
|
await jumpTo(active, self, fallback, meta.id);
|
|
383
386
|
return;
|
|
384
387
|
}
|
|
388
|
+
if (active && await focusEditorTabOf(active, self))
|
|
389
|
+
return;
|
|
385
390
|
if (attachOnly) {
|
|
386
391
|
console.log(chalk.yellow(`${meta.shortId} has no living process or pane to attach.`));
|
|
387
392
|
process.exitCode = 1;
|
package/dist/commands/go.d.ts
CHANGED
|
@@ -37,4 +37,9 @@ export type AttachRailLiveness = {
|
|
|
37
37
|
};
|
|
38
38
|
export declare function probeAttachRail(s: ActiveSession, self: string): Promise<AttachRailLiveness>;
|
|
39
39
|
export declare function refuseFallback(s: ActiveSession, remote: string | undefined, fallbackId?: string): Promise<void>;
|
|
40
|
+
export declare const EDITOR_TAB_SELECTOR_MIN = 8;
|
|
41
|
+
export declare function matchEditorTab(s: ActiveSession, self: string, tabs: ActiveSession[], nowMs?: number): ActiveSession | undefined;
|
|
42
|
+
export declare function editorTabsForSelector(selector: string, tabs: ActiveSession[], nowMs?: number): ActiveSession[];
|
|
43
|
+
export declare function focusEditorTabOf(s: ActiveSession, self: string): Promise<boolean>;
|
|
44
|
+
export declare function focusLocalEditorTab(selector: string): Promise<boolean>;
|
|
40
45
|
export declare function jumpTo(s: ActiveSession, self: string, fallback?: UnreachableFallback, fallbackId?: string): Promise<void>;
|
package/dist/commands/go.js
CHANGED
|
@@ -2,7 +2,7 @@ import chalk from 'chalk';
|
|
|
2
2
|
import path from 'path';
|
|
3
3
|
import { execFile } from 'child_process';
|
|
4
4
|
import { promisify } from 'util';
|
|
5
|
-
import { getActiveSessions, findSessionFileForKind, sessionProcessIsLocal, sessionProcessHost } from '../lib/session/active.js';
|
|
5
|
+
import { getActiveSessions, findSessionFileForKind, listTerminalsActive, sessionProcessIsLocal, sessionProcessHost } from '../lib/session/active.js';
|
|
6
6
|
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';
|
|
@@ -20,6 +20,10 @@ import { sshExec, sshStream, assertValidSshTarget, shellQuote, SSH_CONN_FAILURE_
|
|
|
20
20
|
import { connectionEndedNotice } from '../lib/hosts/reconnect.js';
|
|
21
21
|
import { enumerateGhosttyTabs, assignGhosttyTabs } from '../lib/session/ghostty-tabs.js';
|
|
22
22
|
import { addressabilityRecoveryHint } from '../lib/terminal/resolve.js';
|
|
23
|
+
import { editorVariantForHost, focusTabSpecs } from '../lib/terminal/backends/vscodium-agent.js';
|
|
24
|
+
import { runLocal } from '../lib/terminal/transport.js';
|
|
25
|
+
import { sessionHeadline } from '../lib/session/title.js';
|
|
26
|
+
import { HOST_HEARTBEAT_STALE_MS } from '../lib/session/host-link.js';
|
|
23
27
|
const execFileAsync = promisify(execFile);
|
|
24
28
|
export function filterLivePool(sessions, opts = {}) {
|
|
25
29
|
let out = sessions;
|
|
@@ -220,7 +224,44 @@ export async function refuseFallback(s, remote, fallbackId) {
|
|
|
220
224
|
chalk.gray(`\n${addressabilityRecoveryHint(s, fallbackId)}`));
|
|
221
225
|
process.exitCode = 1;
|
|
222
226
|
}
|
|
227
|
+
export const EDITOR_TAB_SELECTOR_MIN = 8;
|
|
228
|
+
function isFocusableEditorTab(t, nowMs) {
|
|
229
|
+
const windowLive = t.windowHeartbeatMs !== undefined && nowMs - t.windowHeartbeatMs < HOST_HEARTBEAT_STALE_MS;
|
|
230
|
+
return !!(editorVariantForHost(t.host) && t.terminalId && t.workspaceDir && t.pidAlive && windowLive);
|
|
231
|
+
}
|
|
232
|
+
export function matchEditorTab(s, self, tabs, nowMs = Date.now()) {
|
|
233
|
+
const originTab = s.originTerminal?.device === self ? s.originTerminal.terminalId : undefined;
|
|
234
|
+
return tabs.find((t) => isFocusableEditorTab(t, nowMs) &&
|
|
235
|
+
((s.sessionId && t.sessionId === s.sessionId) || (originTab && t.terminalId === originTab)));
|
|
236
|
+
}
|
|
237
|
+
export function editorTabsForSelector(selector, tabs, nowMs = Date.now()) {
|
|
238
|
+
if (selector.length < EDITOR_TAB_SELECTOR_MIN)
|
|
239
|
+
return [];
|
|
240
|
+
return tabs.filter((t) => isFocusableEditorTab(t, nowMs) && t.sessionId?.startsWith(selector));
|
|
241
|
+
}
|
|
242
|
+
async function focusEditorTab(tab) {
|
|
243
|
+
const variant = editorVariantForHost(tab.host);
|
|
244
|
+
for (const spec of focusTabSpecs(variant, tab.workspaceDir, tab.terminalId)) {
|
|
245
|
+
const result = await runLocal(spec, 10_000);
|
|
246
|
+
if (!result.ok) {
|
|
247
|
+
console.error(chalk.yellow(`Could not focus ${variant.label} tab ${tab.terminalId}: ${result.error}. Trying the other rails.`));
|
|
248
|
+
return false;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
console.log(chalk.gray(`Sent ${shortId(tab)} → ${sessionHeadline(tab) || tab.terminalId} (${path.basename(tab.workspaceDir)}) to ${variant.label}.`));
|
|
252
|
+
return true;
|
|
253
|
+
}
|
|
254
|
+
export async function focusEditorTabOf(s, self) {
|
|
255
|
+
const tab = matchEditorTab(s, self, await listTerminalsActive());
|
|
256
|
+
return tab ? focusEditorTab(tab) : false;
|
|
257
|
+
}
|
|
258
|
+
export async function focusLocalEditorTab(selector) {
|
|
259
|
+
const matches = editorTabsForSelector(selector, await listTerminalsActive());
|
|
260
|
+
return matches.length === 1 ? focusEditorTab(matches[0]) : false;
|
|
261
|
+
}
|
|
223
262
|
export async function jumpTo(s, self, fallback = refuseFallback, fallbackId) {
|
|
263
|
+
if (await focusEditorTabOf(s, self))
|
|
264
|
+
return;
|
|
224
265
|
const remote = sessionProcessHost(s, self);
|
|
225
266
|
const mux = s.provenance?.mux;
|
|
226
267
|
if (remote) {
|
|
@@ -1631,7 +1631,7 @@ export function humansToPreferencesPatch(doc) {
|
|
|
1631
1631
|
if (typeof entry.id !== 'string')
|
|
1632
1632
|
continue;
|
|
1633
1633
|
const transport = typeof entry.transport === 'string' ? entry.transport : entry.id;
|
|
1634
|
-
const channel = accountChannelFor(
|
|
1634
|
+
const channel = accountChannelFor(entry.id);
|
|
1635
1635
|
if (!channel) {
|
|
1636
1636
|
dropped.push(`${entry.id} (${transport})`);
|
|
1637
1637
|
continue;
|
|
@@ -1662,14 +1662,16 @@ export function humansToPreferencesPatch(doc) {
|
|
|
1662
1662
|
const settings = {};
|
|
1663
1663
|
if (typeof owner?.timezone === 'string' && owner.timezone.trim())
|
|
1664
1664
|
settings.timezone = owner.timezone.trim();
|
|
1665
|
-
const quiet = typeof owner?.
|
|
1665
|
+
const quiet = typeof owner?.quietHours === 'string' ? owner.quietHours.match(/^\s*(\d{1,2}:\d{2})\s*-\s*(\d{1,2}:\d{2})\s*$/) : null;
|
|
1666
1666
|
if (quiet) {
|
|
1667
1667
|
settings.quietStart = quiet[1].padStart(5, '0');
|
|
1668
1668
|
settings.quietEnd = quiet[2].padStart(5, '0');
|
|
1669
1669
|
}
|
|
1670
|
-
else if (typeof owner?.
|
|
1671
|
-
dropped.push(`
|
|
1670
|
+
else if (typeof owner?.quietHours === 'string' && owner.quietHours.trim()) {
|
|
1671
|
+
dropped.push(`quietHours '${owner.quietHours}' (expected HH:MM-HH:MM)`);
|
|
1672
1672
|
}
|
|
1673
|
+
if (owner?.quiet_hours !== undefined)
|
|
1674
|
+
dropped.push(`quiet_hours (older key; set quietHours or use console Settings)`);
|
|
1673
1675
|
if (Object.keys(settings).length > 0)
|
|
1674
1676
|
patch.settings = settings;
|
|
1675
1677
|
if (imessageAddress)
|
|
@@ -715,6 +715,7 @@ export async function listTerminalsActive() {
|
|
|
715
715
|
startedAtMs: pidEntry?.startedAtMs ?? t.startedAtMs,
|
|
716
716
|
lastActivityMs: sessionFileTimes(sessionFile).mtimeMs,
|
|
717
717
|
windowId: t.windowId,
|
|
718
|
+
workspaceDir: t.cwd ?? undefined,
|
|
718
719
|
windowHeartbeatMs: t.windowHeartbeatMs,
|
|
719
720
|
owner: resolveOwner(pidEntry?.actor, resolvedId),
|
|
720
721
|
}, state, sessionFile, pidAlive)];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TerminalBackend, SplitDirection } from '../types.js';
|
|
1
|
+
import type { TerminalBackend, LaunchSpec, SplitDirection } from '../types.js';
|
|
2
2
|
export interface EditorVariant {
|
|
3
3
|
cli: string;
|
|
4
4
|
scheme: string;
|
|
@@ -11,5 +11,8 @@ export declare function spawnUri(scheme: string, cwd: string, command: string[],
|
|
|
11
11
|
sessionId?: string;
|
|
12
12
|
title?: string;
|
|
13
13
|
}): string;
|
|
14
|
+
export declare function editorVariantForHost(host: string | undefined): EditorVariant | undefined;
|
|
15
|
+
export declare function focusUri(scheme: string, terminalId: string): string;
|
|
16
|
+
export declare function focusTabSpecs(variant: EditorVariant, folder: string, terminalId: string): LaunchSpec[];
|
|
14
17
|
export declare function makeVscodiumAgentBackend(variant: EditorVariant): TerminalBackend;
|
|
15
18
|
export declare const vscodiumAgentBackend: TerminalBackend;
|
|
@@ -29,6 +29,20 @@ export function spawnUri(scheme, cwd, command, direction, meta) {
|
|
|
29
29
|
const p = Buffer.from(JSON.stringify(payload), 'utf8').toString('base64url');
|
|
30
30
|
return `${scheme}://${EXTENSION_AUTHORITY}/spawn?p=${p}`;
|
|
31
31
|
}
|
|
32
|
+
export function editorVariantForHost(host) {
|
|
33
|
+
return host ? EDITOR_VARIANTS.find((v) => v.cli === host) : undefined;
|
|
34
|
+
}
|
|
35
|
+
export function focusUri(scheme, terminalId) {
|
|
36
|
+
return `${scheme}://${EXTENSION_AUTHORITY}/focus?terminalId=${encodeURIComponent(terminalId)}`;
|
|
37
|
+
}
|
|
38
|
+
export function focusTabSpecs(variant, folder, terminalId) {
|
|
39
|
+
const bundled = `${variant.app}/Contents/Resources/app/bin/${variant.cli}`;
|
|
40
|
+
const cli = appExists(bundled) ? bundled : variant.cli;
|
|
41
|
+
return [
|
|
42
|
+
{ argv: [cli, folder] },
|
|
43
|
+
{ argv: [cli, '--open-url', focusUri(variant.scheme, terminalId)] },
|
|
44
|
+
];
|
|
45
|
+
}
|
|
32
46
|
export function makeVscodiumAgentBackend(variant) {
|
|
33
47
|
return {
|
|
34
48
|
id: 'vscodium-agent',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phnx-labs/agents-cli",
|
|
3
|
-
"version": "1.22.
|
|
3
|
+
"version": "1.22.125",
|
|
4
4
|
"description": "One CLI for all your AI coding agents - versions, config, cloud dispatch, sessions, and teams (now with first-class Grok Build CLI support)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"@fontsource/inter": "^5.3.0",
|
|
88
88
|
"@fontsource/jetbrains-mono": "^5.3.0",
|
|
89
89
|
"@inquirer/prompts": "8.5.2",
|
|
90
|
-
"@phnx-labs/sessions-cli": "0.
|
|
90
|
+
"@phnx-labs/sessions-cli": "0.7.0",
|
|
91
91
|
"@resvg/resvg-wasm": "^2.6.2",
|
|
92
92
|
"@types/proper-lockfile": "4.1.4",
|
|
93
93
|
"@zed-industries/agent-client-protocol": "0.4.5",
|