@phnx-labs/agents-cli 1.23.41 → 1.23.42
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
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.23.42
|
|
4
|
+
|
|
5
|
+
- **A session that reconnects after an ssh drop keeps its editor tab.** `agents run --device` exports `AGENT_TERMINAL_ID`, `AGENTS_ORIGIN_TERMINAL_ID` and `AGENTS_ORIGIN_DEVICE` so the remote session's row links back to the tab it was launched from. The automatic reattach after a dropped connection (`agents ps focus --reconnect-reattach`) ran without them, so the reattached session had no tab. The extension then saw a running session with no tab here, resumed it, and started a second Claude on the same conversation (owner video, 2026-10-19). The reattach now runs behind the same `remoteRunShellPrelude` as the launch. Source: `cli/src/lib/hosts/reconnect.ts`, `cli/src/commands/exec.ts`.
|
|
6
|
+
|
|
7
|
+
- **A turn the Stop judge could not read no longer hides the agent's question.** An `unjudged` `turnVerdict` (model error, the account's usage limit, every judge slot busy) also switched off the last-line question read, so a session whose judge failed showed no ask at all. `currentTurnVerdict` now treats `unjudged` as no verdict. Source: `cli/src/lib/feed/attention.ts`.
|
|
8
|
+
|
|
3
9
|
## 1.23.41
|
|
4
10
|
|
|
5
11
|
- **The daemon no longer scans the whole search index after every indexing pass.** The check that decides whether the session search index needs compacting counted every row of FTS5's `_data` table, which is one row per index page, not one per segment. On one Mac that was 809,183 rows in 3 GB against 14 real segments, so the 512-segment threshold was always crossed: each pass ran two full scans of that table (1 to 2 s each with the machine idle, far longer under load) plus a `merge`, all on the daemon's main thread. A `sample` of the daemon showed 71% of its main thread in that count, its event loop was stalled 36 to 56 minutes of every hour, and the watchdog restarted it 57 times in a day. The count now reads the segment total FTS5 keeps in its structure record: 0.03 ms on the same index, and no merge while it is healthy. `agents daemon index optimize` reports the same real segment counts. Source: `cli/src/lib/session/db.ts`
|
package/dist/commands/exec.js
CHANGED
|
@@ -1426,7 +1426,7 @@ ${formatModeSupportTable().split('\n').map((line) => ` ${line}`).join('\n
|
|
|
1426
1426
|
hostName: host.name,
|
|
1427
1427
|
target: reconnectTarget,
|
|
1428
1428
|
initialExit: exitCode,
|
|
1429
|
-
reattach: () => reattachRemoteSession(host, reconnectTarget),
|
|
1429
|
+
reattach: () => reattachRemoteSession(host, reconnectTarget, runAgent),
|
|
1430
1430
|
}));
|
|
1431
1431
|
}
|
|
1432
1432
|
if (next.notice)
|
|
@@ -153,7 +153,7 @@ function attentionFromBlock(block, session, nowMs) {
|
|
|
153
153
|
}
|
|
154
154
|
export function currentTurnVerdict(session) {
|
|
155
155
|
const v = session.turnVerdict;
|
|
156
|
-
if (!v || session.activity === 'working')
|
|
156
|
+
if (!v || v.kind === 'unjudged' || session.activity === 'working')
|
|
157
157
|
return undefined;
|
|
158
158
|
if (session.lastEventMs != null && session.lastEventMs > v.atMs)
|
|
159
159
|
return undefined;
|
|
@@ -66,8 +66,8 @@ interface ReconnectTargetInputs {
|
|
|
66
66
|
launchId?: string;
|
|
67
67
|
}
|
|
68
68
|
export declare function pickReconnectTarget(inputs: ReconnectTargetInputs): ReconnectTarget | undefined;
|
|
69
|
-
export declare function reattachRemoteCommand(target: ReconnectTarget): string;
|
|
70
|
-
export declare function reattachRemoteSession(host: Host, target: ReconnectTarget): ReconnectOutcome;
|
|
69
|
+
export declare function reattachRemoteCommand(target: ReconnectTarget, agent: string): string;
|
|
70
|
+
export declare function reattachRemoteSession(host: Host, target: ReconnectTarget, agent: string): ReconnectOutcome;
|
|
71
71
|
interface ReconnectLoopOpts {
|
|
72
72
|
hostName: string;
|
|
73
73
|
target: ReconnectTarget;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { sshExec, sshStream, shellQuote, SSH_CONN_FAILURE_CODE } from '../ssh-exec.js';
|
|
2
2
|
import { hostIdentityArgs, sshTargetFor } from './types.js';
|
|
3
3
|
import { RUN_AUTO_KEYWORD } from '../types.js';
|
|
4
|
+
import { remoteRunShellPrelude } from './dispatch.js';
|
|
4
5
|
export const SSH_CONN_FAILURE = SSH_CONN_FAILURE_CODE;
|
|
5
6
|
export const REMOTE_EXIT_255_REMAPPED = 254;
|
|
6
7
|
export const RECONNECT_WINDOW_MS = 15 * 60_000;
|
|
@@ -108,23 +109,23 @@ export function pickReconnectTarget(inputs) {
|
|
|
108
109
|
return { kind: 'session', id };
|
|
109
110
|
return launchId ? { kind: 'launch', id: launchId } : undefined;
|
|
110
111
|
}
|
|
111
|
-
export function reattachRemoteCommand(target) {
|
|
112
|
+
export function reattachRemoteCommand(target, agent) {
|
|
112
113
|
const selector = target.kind === 'launch'
|
|
113
114
|
? ['--launch-id', target.id]
|
|
114
115
|
: [target.id];
|
|
115
116
|
const inner = ['agents', 'ps', 'focus', ...selector, '--local', '--reconnect-reattach']
|
|
116
117
|
.map(shellQuote)
|
|
117
118
|
.join(' ');
|
|
118
|
-
return wrapRemoteExitCode(inner);
|
|
119
|
+
return wrapRemoteExitCode(`${remoteRunShellPrelude(agent)}${inner}`);
|
|
119
120
|
}
|
|
120
|
-
export function reattachRemoteSession(host, target) {
|
|
121
|
+
export function reattachRemoteSession(host, target, agent) {
|
|
121
122
|
const sshTarget = sshTargetFor(host);
|
|
122
123
|
const extraSshArgs = hostIdentityArgs(host);
|
|
123
124
|
const probe = sshExec(sshTarget, 'true', { multiplex: false, extraSshArgs });
|
|
124
125
|
if (probe.code !== 0)
|
|
125
126
|
return { code: SSH_CONN_FAILURE, connected: false, heldMs: 0 };
|
|
126
127
|
const startedAt = Date.now();
|
|
127
|
-
const code = sshStream(sshTarget, reattachRemoteCommand(target), { tty: true, extraSshArgs });
|
|
128
|
+
const code = sshStream(sshTarget, reattachRemoteCommand(target, agent), { tty: true, extraSshArgs });
|
|
128
129
|
return { code, connected: true, heldMs: Date.now() - startedAt };
|
|
129
130
|
}
|
|
130
131
|
async function waitOrInterrupt(ms) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phnx-labs/agents-cli",
|
|
3
|
-
"version": "1.23.
|
|
3
|
+
"version": "1.23.42",
|
|
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",
|