@zeph-to/cli 2.10.0 → 2.11.0
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/README.md +13 -5
- package/dist/cli.js +5 -4
- package/dist/inventory-offload.d.ts +15 -1
- package/dist/inventory-offload.d.ts.map +1 -1
- package/dist/inventory-offload.js +68 -16
- package/dist/listener.d.ts +1 -0
- package/dist/listener.d.ts.map +1 -1
- package/dist/listener.js +61 -1
- package/dist/wrapper.d.ts +18 -8
- package/dist/wrapper.d.ts.map +1 -1
- package/dist/wrapper.js +57 -27
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -265,10 +265,18 @@ block here.
|
|
|
265
265
|
same folder, run `zeph cc` again, and the wrapper auto-suffixes:
|
|
266
266
|
first session is `zeph-encl`, the next attached one becomes
|
|
267
267
|
`zeph-encl-2`, then `zeph-encl-3`, etc. The phone picker shows them
|
|
268
|
-
as `encl · Claude`, `encl · Claude #2`, `encl · Claude #3`.
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
268
|
+
as `encl · Claude`, `encl · Claude #2`, `encl · Claude #3`.
|
|
269
|
+
|
|
270
|
+
**Reattaching wins over spawning.** If any session of that project is
|
|
271
|
+
**detached** (no one attached), the wrapper reattaches instead of
|
|
272
|
+
spawning a new one — close the terminal, come back later, pick up
|
|
273
|
+
where you left off. When several are detached it takes the
|
|
274
|
+
highest-numbered one first, then works down on later runs, so no
|
|
275
|
+
session can end up out of reach. That matters because a session you
|
|
276
|
+
cannot reach still holds a live agent: an agent CLI plus its MCP
|
|
277
|
+
servers is a few hundred MB you can neither see nor reclaim. A
|
|
278
|
+
detached session is never killed for you — nothing here can tell
|
|
279
|
+
"done with this" from "closed the laptop".
|
|
272
280
|
|
|
273
281
|
If you're already inside a tmux session (`$TMUX` set) the wrapper
|
|
274
282
|
skips the outer tmux and runs the agent in the current pane — the
|
|
@@ -514,7 +522,7 @@ zeph notify --title "Hello" --json
|
|
|
514
522
|
| `dismiss <id>` | Dismiss a push (or `--all`) |
|
|
515
523
|
| `rename <name>` | Set the current agent session's display name in the app — run inside a `zeph cc` session (`--clear` resets). Auto-detects the tmux session + this machine's listener device id, so the alias lands on the right device |
|
|
516
524
|
| `test` | Verify connection and API key |
|
|
517
|
-
| `cc` · `codex` · `gemini` | Run the agent in a `zeph-<project>` tmux session (auto-
|
|
525
|
+
| `cc` · `codex` · `gemini` | Run the agent in a `zeph-<project>` tmux session — reattaches a detached session of that project (newest suffix first) when there is one, else auto-suffixes `-2`, `-3`, …. Auto-spawns the background listener on first invocation so the phone picker just works. Trailing args pass through to the agent (`zeph cc --resume "..."`) |
|
|
518
526
|
| `listener` | (Usually unnecessary — `zeph cc` autospawns it.) Resident daemon: subscribes via WebSocket, reports tmux session inventory every 5 s, injects `agent.command` pushes into the matching session. Run in the foreground for SDK development; otherwise let `zeph cc` manage it |
|
|
519
527
|
|
|
520
528
|
### Notify Options
|
package/dist/cli.js
CHANGED
|
@@ -79,10 +79,11 @@ Commands:
|
|
|
79
79
|
(run inside a zeph cc session; --clear resets it)
|
|
80
80
|
test Send a test notification to verify setup
|
|
81
81
|
${usageAgentLines()}
|
|
82
|
-
(
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
(reattaches a detached session of that project when
|
|
83
|
+
there is one, newest suffix first; auto-suffixes
|
|
84
|
+
-2/-3/… only when every existing one has a client
|
|
85
|
+
attached. Any args after the subcommand are forwarded
|
|
86
|
+
verbatim, e.g. 'zeph cc --resume')
|
|
86
87
|
listener Resident daemon — receives 'agent.command' pushes from
|
|
87
88
|
the phone picker and injects them into the matching
|
|
88
89
|
tmux session.
|
|
@@ -14,5 +14,19 @@ export interface InventoryOffload {
|
|
|
14
14
|
* run of cycles a stuck worker would otherwise cost: the caller gates sweeps
|
|
15
15
|
* one-at-a-time, so this bounds how long a hang can hold the inventory. */
|
|
16
16
|
export declare const COLLECT_TIMEOUT_MS = 20000;
|
|
17
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Consecutive timed-out sweeps before the offload gives up on workers.
|
|
19
|
+
*
|
|
20
|
+
* A sweep that overruns is terminated, and the next one starts a fresh worker
|
|
21
|
+
* from nothing — so on a host where a cold sweep cannot finish inside the
|
|
22
|
+
* timeout, retrying forever means the daemon never reports at all. Reporting
|
|
23
|
+
* slowly beats not reporting, and in-thread is exactly "slowly". Three in a row
|
|
24
|
+
* rather than one, so a single slow moment (a load spike, a machine waking) does
|
|
25
|
+
* not cost the offload for the rest of the daemon's life; the streak resets on
|
|
26
|
+
* any answered sweep.
|
|
27
|
+
*/
|
|
28
|
+
export declare const MAX_CONSECUTIVE_TIMEOUTS = 3;
|
|
29
|
+
export declare const startInventoryOffload: (inThread: () => CollectResult, log: (msg: string) => void, workerPath?: string,
|
|
30
|
+
/** Overridable so a test can exercise the timeout path without waiting 20s. */
|
|
31
|
+
timeoutMs?: number) => InventoryOffload;
|
|
18
32
|
//# sourceMappingURL=inventory-offload.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inventory-offload.d.ts","sourceRoot":"","sources":["../src/inventory-offload.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"inventory-offload.d.ts","sourceRoot":"","sources":["../src/inventory-offload.ts"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,MAAM,WAAW,cAAc;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,gBAAgB;IAC7B,kFAAkF;IAClF,OAAO,EAAE,MAAM,OAAO,CAAC,aAAa,CAAC,CAAC;IACtC,oDAAoD;IACpD,KAAK,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;4EAE4E;AAC5E,eAAO,MAAM,kBAAkB,QAAS,CAAC;AAEzC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAoB1C,eAAO,MAAM,qBAAqB,GAC9B,UAAU,MAAM,aAAa,EAC7B,KAAK,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,EAC1B,aAAY,MAA+C;AAC3D,+EAA+E;AAC/E,YAAW,MAA2B,KACvC,gBAoHF,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.startInventoryOffload = exports.COLLECT_TIMEOUT_MS = void 0;
|
|
3
|
+
exports.startInventoryOffload = exports.MAX_CONSECUTIVE_TIMEOUTS = exports.COLLECT_TIMEOUT_MS = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Runs the tmux session inventory on a worker thread so the daemon's event
|
|
6
6
|
* loop stays free while `tmux` child processes are waited on.
|
|
@@ -21,6 +21,14 @@ exports.startInventoryOffload = exports.COLLECT_TIMEOUT_MS = void 0;
|
|
|
21
21
|
* behaviour instead of an empty session list. A worker that dies after having
|
|
22
22
|
* worked is treated as transient — that sweep fails (the caller skips the
|
|
23
23
|
* cycle) and the next `collect()` starts a fresh one.
|
|
24
|
+
*
|
|
25
|
+
* A worker we killed ourselves is neither. `terminate()` (on timeout, on close)
|
|
26
|
+
* exits with code 1, indistinguishable from a crash, so the exit code cannot be
|
|
27
|
+
* read — what separates the two is whether that worker still owed an answer,
|
|
28
|
+
* which is why `Live` carries its own `owed` ids rather than sharing `pending`.
|
|
29
|
+
* Getting this wrong is expensive in one direction only: a timeout misread as
|
|
30
|
+
* "died before ever answering" is permanent, and it fires exactly when the host
|
|
31
|
+
* is slow enough for a sweep to overrun, which is when the offload matters most.
|
|
24
32
|
*/
|
|
25
33
|
const path_1 = require("path");
|
|
26
34
|
const worker_threads_1 = require("worker_threads");
|
|
@@ -28,7 +36,21 @@ const worker_threads_1 = require("worker_threads");
|
|
|
28
36
|
* run of cycles a stuck worker would otherwise cost: the caller gates sweeps
|
|
29
37
|
* one-at-a-time, so this bounds how long a hang can hold the inventory. */
|
|
30
38
|
exports.COLLECT_TIMEOUT_MS = 20_000;
|
|
31
|
-
|
|
39
|
+
/**
|
|
40
|
+
* Consecutive timed-out sweeps before the offload gives up on workers.
|
|
41
|
+
*
|
|
42
|
+
* A sweep that overruns is terminated, and the next one starts a fresh worker
|
|
43
|
+
* from nothing — so on a host where a cold sweep cannot finish inside the
|
|
44
|
+
* timeout, retrying forever means the daemon never reports at all. Reporting
|
|
45
|
+
* slowly beats not reporting, and in-thread is exactly "slowly". Three in a row
|
|
46
|
+
* rather than one, so a single slow moment (a load spike, a machine waking) does
|
|
47
|
+
* not cost the offload for the rest of the daemon's life; the streak resets on
|
|
48
|
+
* any answered sweep.
|
|
49
|
+
*/
|
|
50
|
+
exports.MAX_CONSECUTIVE_TIMEOUTS = 3;
|
|
51
|
+
const startInventoryOffload = (inThread, log, workerPath = (0, path_1.join)(__dirname, 'inventory-worker.js'),
|
|
52
|
+
/** Overridable so a test can exercise the timeout path without waiting 20s. */
|
|
53
|
+
timeoutMs = exports.COLLECT_TIMEOUT_MS) => {
|
|
32
54
|
let worker = null;
|
|
33
55
|
let closed = false;
|
|
34
56
|
/** Set once a worker has answered; a failure before that is not transient. */
|
|
@@ -36,6 +58,8 @@ const startInventoryOffload = (inThread, log, workerPath = (0, path_1.join)(__di
|
|
|
36
58
|
/** Set when the worker is given up on — sweeps run in-thread from then on. */
|
|
37
59
|
let inThreadOnly = false;
|
|
38
60
|
let nextId = 0;
|
|
61
|
+
/** Timed-out sweeps since the last answered one. */
|
|
62
|
+
let consecutiveTimeouts = 0;
|
|
39
63
|
const pending = new Map();
|
|
40
64
|
const settleAll = (outcome) => {
|
|
41
65
|
for (const [id, p] of pending) {
|
|
@@ -65,59 +89,87 @@ const startInventoryOffload = (inThread, log, workerPath = (0, path_1.join)(__di
|
|
|
65
89
|
// Never keep the process alive on the worker's account: the daemon's
|
|
66
90
|
// own socket and timers decide when it exits.
|
|
67
91
|
w.unref();
|
|
92
|
+
const live = { w, owed: new Set() };
|
|
68
93
|
w.on('message', (msg) => {
|
|
94
|
+
live.owed.delete(msg.id);
|
|
69
95
|
const p = pending.get(msg.id);
|
|
70
96
|
if (!p)
|
|
71
97
|
return;
|
|
72
98
|
pending.delete(msg.id);
|
|
73
99
|
clearTimeout(p.timer);
|
|
74
100
|
everReplied = true;
|
|
101
|
+
consecutiveTimeouts = 0;
|
|
75
102
|
if (msg.error !== undefined)
|
|
76
103
|
p.reject(new Error(msg.error));
|
|
77
104
|
else
|
|
78
105
|
p.resolve(msg.result);
|
|
79
106
|
});
|
|
80
107
|
w.on('error', (err) => {
|
|
81
|
-
if (worker ===
|
|
108
|
+
if (worker === live)
|
|
82
109
|
worker = null;
|
|
110
|
+
// Reported here, so the exit that follows is this same death and not
|
|
111
|
+
// a second one. An id leaves `owed` the moment its sweep is settled,
|
|
112
|
+
// whatever settled it — that is the invariant the exit handler reads.
|
|
113
|
+
live.owed.clear();
|
|
83
114
|
onFailure(`inventory worker error (${err instanceof Error ? err.message : String(err)})`);
|
|
84
115
|
});
|
|
85
116
|
w.on('exit', (code) => {
|
|
86
|
-
if (worker ===
|
|
117
|
+
if (worker === live)
|
|
87
118
|
worker = null;
|
|
88
|
-
//
|
|
89
|
-
|
|
119
|
+
// Did THIS worker still owe an answer? `terminate()` exits with code
|
|
120
|
+
// 1 exactly like a crash, so the code says nothing; what separates a
|
|
121
|
+
// death we caused from one we did not is whether the sweep it was
|
|
122
|
+
// holding had already been settled. Asking the shared `pending` map
|
|
123
|
+
// instead judged a terminated worker against the NEXT worker's sweep
|
|
124
|
+
// — the timeout path nulls `worker`, so the following poll spawns a
|
|
125
|
+
// replacement and registers its id a second before this event lands.
|
|
126
|
+
// A routine timeout then read as "died before ever answering", which
|
|
127
|
+
// is permanent: `everReplied` is false, so the offload never
|
|
128
|
+
// recovers for the life of the daemon.
|
|
129
|
+
if (live.owed.size > 0)
|
|
90
130
|
onFailure(`inventory worker exited (${code})`);
|
|
91
131
|
});
|
|
92
|
-
return
|
|
132
|
+
return live;
|
|
93
133
|
};
|
|
94
134
|
const collect = () => {
|
|
95
135
|
if (closed || inThreadOnly)
|
|
96
136
|
return Promise.resolve(inThread());
|
|
97
137
|
worker ??= spawn();
|
|
98
|
-
const
|
|
138
|
+
const live = worker;
|
|
99
139
|
const id = ++nextId;
|
|
100
140
|
return new Promise((resolve, reject) => {
|
|
101
141
|
const timer = setTimeout(() => {
|
|
102
142
|
pending.delete(id);
|
|
103
|
-
|
|
143
|
+
// Settled here, so the terminate below is a death we caused and
|
|
144
|
+
// this worker's exit must not be reported as a failure.
|
|
145
|
+
live.owed.delete(id);
|
|
146
|
+
consecutiveTimeouts += 1;
|
|
147
|
+
if (consecutiveTimeouts >= exports.MAX_CONSECUTIVE_TIMEOUTS && !inThreadOnly) {
|
|
148
|
+
inThreadOnly = true;
|
|
149
|
+
log(`! inventory sweep timed out ${consecutiveTimeouts}× in a row — running the inventory in-thread from now on`);
|
|
150
|
+
}
|
|
151
|
+
reject(new Error(`inventory sweep exceeded ${timeoutMs / 1000}s`));
|
|
104
152
|
// A stuck worker is not coming back; the next call spawns a fresh one.
|
|
105
|
-
if (worker ===
|
|
153
|
+
if (worker === live)
|
|
106
154
|
worker = null;
|
|
107
|
-
void w.terminate();
|
|
108
|
-
},
|
|
155
|
+
void live.w.terminate();
|
|
156
|
+
}, timeoutMs);
|
|
109
157
|
timer.unref();
|
|
110
158
|
pending.set(id, { resolve, reject, timer });
|
|
111
|
-
|
|
159
|
+
live.owed.add(id);
|
|
160
|
+
live.w.postMessage(id);
|
|
112
161
|
});
|
|
113
162
|
};
|
|
114
163
|
const close = () => {
|
|
115
164
|
closed = true;
|
|
116
165
|
settleAll((p) => p.reject(new Error('inventory offload closed')));
|
|
117
|
-
const
|
|
166
|
+
const live = worker;
|
|
118
167
|
worker = null;
|
|
119
|
-
if (
|
|
120
|
-
|
|
168
|
+
if (!live)
|
|
169
|
+
return;
|
|
170
|
+
// Settled above; clear what it owed for the same reason the timeout does.
|
|
171
|
+
live.owed.clear();
|
|
172
|
+
void live.w.terminate();
|
|
121
173
|
};
|
|
122
174
|
return { collect, close };
|
|
123
175
|
};
|
package/dist/listener.d.ts
CHANGED
|
@@ -694,6 +694,7 @@ export declare const collectSessionsVerbose: () => CollectResult;
|
|
|
694
694
|
export declare const recordInventory: (sessions: ReadonlyArray<{
|
|
695
695
|
name: string;
|
|
696
696
|
}> | null) => void;
|
|
697
|
+
export declare const syncTmuxAgentNames: (sessions: ReadonlyArray<AgentSession>) => void;
|
|
697
698
|
/**
|
|
698
699
|
* Is this session in the inventory? Answered from the last sweep when it can
|
|
699
700
|
* be: a full sweep is two tmux spawns per session on this thread, and it used
|
package/dist/listener.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listener.d.ts","sourceRoot":"","sources":["../src/listener.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AA4BH,OAAO,EAA0C,KAAK,SAAS,EAAE,KAAK,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAUxH,OAAO,EAAiD,KAAK,UAAU,EAA4C,MAAM,kBAAkB,CAAC;AAG5I,OAAO,EAA4E,KAAK,yBAAyB,EAAE,MAAM,aAAa,CAAC;AACvI,OAAO,EAA6C,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAmCtG,eAAO,MAAM,2BAA2B,QAAS,CAAC;AAElD,UAAU,YAAY;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,SAAS,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB;;;;;;;;;;;;OAYG;IACH,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,SAAS,CAAC,EAA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,oBAAoB,GAAI,KAAK;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,KAAG,IAE/E,CAAC;AA2FF;;;;GAIG;AACH,eAAO,MAAM,aAAa,GACtB,MAAK,MAAmB,EACxB,MAAK,MAAwB,EAC7B,MAAK,MAA0B,KAChC,MAaF,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,GACnB,MAAM,QAAQ,EACd,OAAM,cAAmB,KAC1B,OAAO,CAAC,OAAO,CAgDjB,CAAC;AAcF,eAAO,MAAM,cAAc,GAAI,SAAS,MAAM,KAAG,MAIhD,CAAC;AA4DF,eAAO,MAAM,uBAAuB,GAAI,OAAO,MAAM,KAAG,MA2BvD,CAAC;AA+RF;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,GACrB,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,EACtC,QAAQ;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,EAC1B,SAAS,MAAM,KAChB,MAAM,GAAG,IAIX,CAAC;AA6HF,eAAO,MAAM,cAAc,GAAU,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,KAAG,OAAO,CAAC,MAAM,CA2J3F,CAAC"}
|
package/dist/listener.js
CHANGED
|
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
};
|
|
27
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
28
|
exports.MAX_INPUT_BODY_CHARS = exports.MAX_INPUT_KEYS = exports.handleStreamControl = exports.buildStreamFrame = exports.isStreamCapReached = exports.stopAllStreams = exports.stopStream = exports.MAX_CONCURRENT_STREAMS = exports.STREAM_RENEW_FRESH_MS = exports.STREAM_LEASE_MS = exports.claimFrameSend = exports.hasFrameBudget = exports.streamCadence = exports.MAX_FRAMES_PER_SEC = exports.BURST_WINDOW_MS = exports.BURST_INTERVAL_MS = exports.STREAM_INTERVAL_MS = exports.STREAM_CAPTURE_LINES = exports.scheduleInjectSnapshots = exports.historyLinesIn = exports.cursorLineFor = exports.parsePaneGeometry = exports.handleScreenHistoryRequest = exports.SCREEN_HISTORY_MAX_LINES = exports.handleSessionForgetRequest = exports.handleSessionExitRequest = exports.SESSION_EXIT_STEP_MS = exports.handleSessionResumeRequest = exports.handleDiffFileRequest = exports.handleDiffFilesRequest = exports.DIFF_PAGE_MAX_BYTES = exports.handleScreenRequest = exports.collectWatchHits = exports.resetPatternWatches = exports.setPatternWatches = exports.deriveSessionState = exports.resetSessionStates = exports.detectRemoteAgent = exports.parseSessionName = exports.invalidateTmuxSocketCache = exports.resolveKeys = exports.paneCurrentCommand = exports.checkRateLimit = exports.AUTH_FAILURE_CODES = exports.sessionsReportDue = exports.sessionsFingerprint = exports.knownSessionsFingerprint = exports.knownSessionsToReport = exports.KNOWN_SESSIONS_REPORTED = exports.SESSION_REPORT_HEARTBEAT_MS = void 0;
|
|
29
|
-
exports.handleListener = exports.resolveWsUrl = exports.computeListenerDeviceId = exports.computeBackoff = exports.handlePush = exports.gcAttachments = exports.setAttachmentContext = exports.writeRemoteMarker = exports.isInventoried = exports.recordInventory = exports.collectSessionsVerbose = exports.handleCommandInput = exports.pendingInputDecrypts = exports.MAX_PENDING_DECRYPTS = exports.MAX_INPUT_LANES = exports.validateInputMessage = void 0;
|
|
29
|
+
exports.handleListener = exports.resolveWsUrl = exports.computeListenerDeviceId = exports.computeBackoff = exports.handlePush = exports.gcAttachments = exports.setAttachmentContext = exports.writeRemoteMarker = exports.isInventoried = exports.syncTmuxAgentNames = exports.recordInventory = exports.collectSessionsVerbose = exports.handleCommandInput = exports.pendingInputDecrypts = exports.MAX_PENDING_DECRYPTS = exports.MAX_INPUT_LANES = exports.validateInputMessage = void 0;
|
|
30
30
|
const child_process_1 = require("child_process");
|
|
31
31
|
const crypto_1 = require("crypto");
|
|
32
32
|
const fs_1 = require("fs");
|
|
@@ -2495,6 +2495,63 @@ exports.recordInventory = recordInventory;
|
|
|
2495
2495
|
/** The daemon's sweep runner, set for the lifetime of `handleListener`. Null
|
|
2496
2496
|
* outside the daemon (tests, one-shot commands) — sweeps then run in-thread. */
|
|
2497
2497
|
let inventoryOffload = null;
|
|
2498
|
+
/**
|
|
2499
|
+
* Mirror each session's provider name onto the tmux session itself, as the
|
|
2500
|
+
* user option `@zeph_agent_name`.
|
|
2501
|
+
*
|
|
2502
|
+
* Why: the phone shows what the agent calls this session (`zeph-to-d0`) while
|
|
2503
|
+
* the user's own status bar shows the tmux name (`zeph-zeph-to-3`), and the
|
|
2504
|
+
* two never agree. The phone's render precedence is already decided
|
|
2505
|
+
* (`alias ?? "<providerSessionName> · <Agent>" ?? computed label`, see the
|
|
2506
|
+
* `agentSessionAliases` comment in zeph `libs/shared/src/types/device.ts`);
|
|
2507
|
+
* this puts the same middle tier where a tmux config can read it:
|
|
2508
|
+
*
|
|
2509
|
+
* #{?@zeph_agent_name,#{@zeph_agent_name},#S}
|
|
2510
|
+
*
|
|
2511
|
+
* A tmux option rather than a `#()` in the status line on purpose. The status
|
|
2512
|
+
* line re-renders per attached client on every status-interval, so a shell
|
|
2513
|
+
* there would walk a process tree several times a second across every session;
|
|
2514
|
+
* an option is written only when the name actually changes and costs the
|
|
2515
|
+
* renderer nothing.
|
|
2516
|
+
*
|
|
2517
|
+
* The tmux name is NOT renamed and must not be: it is the addressing key the
|
|
2518
|
+
* phone injects against, it has to exist before the agent it names does, and
|
|
2519
|
+
* the agent's own name rotates on resume. Display and address stay separate —
|
|
2520
|
+
* this only makes the display agree with the phone.
|
|
2521
|
+
*
|
|
2522
|
+
* Keyed by name AND `createdAt`, mirroring the alias anchor in zeph
|
|
2523
|
+
* `apps/server/src/lib/agent-session-alias.ts`: a tmux name is a slot, so the
|
|
2524
|
+
* cache must not let a new occupant inherit the previous one's write. tmux
|
|
2525
|
+
* drops session options with the session, so this is the belt to that braces —
|
|
2526
|
+
* what it actually prevents is the *skip*, where an unchanged key would leave
|
|
2527
|
+
* the new session with no write at all.
|
|
2528
|
+
*/
|
|
2529
|
+
const publishedTmuxNames = new Map();
|
|
2530
|
+
const syncTmuxAgentNames = (sessions) => {
|
|
2531
|
+
const liveKeys = new Set();
|
|
2532
|
+
for (const s of sessions) {
|
|
2533
|
+
const key = `${s.name}\u241f${s.createdAt ?? ''}`;
|
|
2534
|
+
liveKeys.add(key);
|
|
2535
|
+
const value = s.providerSessionName ?? '';
|
|
2536
|
+
if (publishedTmuxNames.get(key) === value)
|
|
2537
|
+
continue;
|
|
2538
|
+
// No name to show → unset, so the format falls through to `#S` and no
|
|
2539
|
+
// stale value is left on a session whose agent stopped reporting one.
|
|
2540
|
+
const args = value
|
|
2541
|
+
? ['set-option', '-t', s.name, '@zeph_agent_name', value]
|
|
2542
|
+
: ['set-option', '-u', '-t', s.name, '@zeph_agent_name'];
|
|
2543
|
+
const r = (0, child_process_1.spawnSync)('tmux', tmuxArgs(args), { stdio: ['ignore', 'ignore', 'ignore'] });
|
|
2544
|
+
// Only remember a write that landed; a failed one must be retried next
|
|
2545
|
+
// sweep rather than cached as done.
|
|
2546
|
+
if (r.status === 0)
|
|
2547
|
+
publishedTmuxNames.set(key, value);
|
|
2548
|
+
}
|
|
2549
|
+
for (const key of [...publishedTmuxNames.keys()]) {
|
|
2550
|
+
if (!liveKeys.has(key))
|
|
2551
|
+
publishedTmuxNames.delete(key);
|
|
2552
|
+
}
|
|
2553
|
+
};
|
|
2554
|
+
exports.syncTmuxAgentNames = syncTmuxAgentNames;
|
|
2498
2555
|
/**
|
|
2499
2556
|
* Is this session in the inventory? Answered from the last sweep when it can
|
|
2500
2557
|
* be: a full sweep is two tmux spawns per session on this thread, and it used
|
|
@@ -2971,6 +3028,9 @@ const streamSession = (wsUrl, apiKey) => {
|
|
|
2971
3028
|
};
|
|
2972
3029
|
const publishSessions = ({ sessions, rejected }) => {
|
|
2973
3030
|
(0, exports.recordInventory)(sessions);
|
|
3031
|
+
// Let the user's own status bar say what the phone says. Change-gated
|
|
3032
|
+
// internally, so an unchanged sweep spawns nothing.
|
|
3033
|
+
(0, exports.syncTmuxAgentNames)(sessions);
|
|
2974
3034
|
// Watch hits are one-shot events — they go out on every poll,
|
|
2975
3035
|
// independent of the sessions-report gate below.
|
|
2976
3036
|
// (§S5 v2): probe watched panes and report hits; the server
|
package/dist/wrapper.d.ts
CHANGED
|
@@ -6,15 +6,25 @@ export declare const tmuxSessionName: (project: string) => string;
|
|
|
6
6
|
/**
|
|
7
7
|
* Pick a tmux session name that won't steal focus from another live
|
|
8
8
|
* `zeph cc`. Strategy:
|
|
9
|
-
* -
|
|
10
|
-
* -
|
|
11
|
-
*
|
|
12
|
-
* `<base>-3`, … so the new `zeph cc` gets an independent session
|
|
13
|
-
* instead of joining the existing one.
|
|
14
|
-
* Falls back to `<base>` after 20 attempts (shouldn't realistically hit).
|
|
9
|
+
* - Reuse the **highest-numbered detached** session in the family.
|
|
10
|
+
* - Otherwise take the lowest name that doesn't exist yet (create new),
|
|
11
|
+
* so an all-attached family gets an independent `<base>-N`.
|
|
15
12
|
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
13
|
+
* Highest-detached rather than lowest is what keeps the family reachable.
|
|
14
|
+
* The old scan walked the family in order and returned the first session that
|
|
15
|
+
* was missing *or* detached, which meant a detached `<base>` ended the scan
|
|
16
|
+
* every time: `<base>-2` could not be reached by any later `zeph cc`, not even
|
|
17
|
+
* after `<base>` was used and exited (a missing `<base>` is taken fresh). A
|
|
18
|
+
* session nobody can reach still holds a live agent — a Claude Code CLI plus
|
|
19
|
+
* its MCP fleet, 250-550MB measured — so stranding one leaks memory the user
|
|
20
|
+
* can neither see nor reclaim. Draining from the tail makes every suffix
|
|
21
|
+
* reachable again: the tail goes first, and `<base>` is picked on the run
|
|
22
|
+
* after that. Reuse also wins over a gap in the numbering, for the same
|
|
23
|
+
* reason — a free `<base>-2` must not hide a detached `<base>-3`.
|
|
24
|
+
*
|
|
25
|
+
* Reclaiming is deliberately all this does. Killing a detached session would
|
|
26
|
+
* take a live agent with it, and nothing here can tell "the user is done with
|
|
27
|
+
* this" from "the user closed the terminal and will come back".
|
|
18
28
|
*/
|
|
19
29
|
export declare const findAvailableSession: (base: string) => string;
|
|
20
30
|
/**
|
package/dist/wrapper.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wrapper.d.ts","sourceRoot":"","sources":["../src/wrapper.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAOtD,kFAAkF;AAClF,eAAO,MAAM,iBAAiB,QAAO,MAapC,CAAC;AAEF,+DAA+D;AAC/D,eAAO,MAAM,eAAe,GAAI,SAAS,MAAM,KAAG,MAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"wrapper.d.ts","sourceRoot":"","sources":["../src/wrapper.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAOtD,kFAAkF;AAClF,eAAO,MAAM,iBAAiB,QAAO,MAapC,CAAC;AAEF,+DAA+D;AAC/D,eAAO,MAAM,eAAe,GAAI,SAAS,MAAM,KAAG,MAA2B,CAAC;AAkC9E;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,oBAAoB,GAAI,MAAM,MAAM,KAAG,MAOnD,CAAC;AAmCF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,sBAAsB,GAAI,SAAS,MAAM,GAAG,IAAI,EAAE,WAAW,MAAM,KAAG,OAChC,CAAC;AAEpD;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,QAAa,OAAO,CAAC,IAAI,CAgC1D,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAAU,OAAO,WAAW,EAAE,QAAO,MAAM,EAAO,KAAG,OAAO,CAAC,MAAM,CAmCjG,CAAC"}
|
package/dist/wrapper.js
CHANGED
|
@@ -43,37 +43,67 @@ exports.detectProjectName = detectProjectName;
|
|
|
43
43
|
/** `zeph-<project>` — the canonical tmux session base name. */
|
|
44
44
|
const tmuxSessionName = (project) => `zeph-${project}`;
|
|
45
45
|
exports.tmuxSessionName = tmuxSessionName;
|
|
46
|
+
/**
|
|
47
|
+
* Every live tmux session as `name → attached`, in one spawn.
|
|
48
|
+
*
|
|
49
|
+
* `tmux list-sessions` exits non-zero when no server is running; that is the
|
|
50
|
+
* ordinary "first `zeph cc` after a reboot" case, not an error, and it means
|
|
51
|
+
* an empty family.
|
|
52
|
+
*
|
|
53
|
+
* The format puts the 0/1 flag first so the name — which carries whatever the
|
|
54
|
+
* project directory was called, spaces included — is everything after the
|
|
55
|
+
* first space and needs no quoting.
|
|
56
|
+
*/
|
|
57
|
+
const liveSessions = () => {
|
|
58
|
+
const r = (0, child_process_1.spawnSync)('tmux', ['list-sessions', '-F', '#{session_attached} #{session_name}'], {
|
|
59
|
+
encoding: 'utf-8',
|
|
60
|
+
stdio: ['ignore', 'pipe', 'ignore'],
|
|
61
|
+
});
|
|
62
|
+
const out = new Map();
|
|
63
|
+
if (r.status !== 0)
|
|
64
|
+
return out;
|
|
65
|
+
for (const line of (r.stdout ?? '').split('\n')) {
|
|
66
|
+
const sep = line.indexOf(' ');
|
|
67
|
+
if (sep < 0)
|
|
68
|
+
continue;
|
|
69
|
+
out.set(line.slice(sep + 1), line.slice(0, sep) === '1');
|
|
70
|
+
}
|
|
71
|
+
return out;
|
|
72
|
+
};
|
|
46
73
|
const MAX_SUFFIX_ATTEMPTS = 20;
|
|
74
|
+
/** `<base>`, `<base>-2`, `<base>-3`, … — the session family for one project. */
|
|
75
|
+
const familyNames = (base) => Array.from({ length: MAX_SUFFIX_ATTEMPTS }, (_, i) => (i === 0 ? base : `${base}-${i + 1}`));
|
|
47
76
|
/**
|
|
48
77
|
* Pick a tmux session name that won't steal focus from another live
|
|
49
78
|
* `zeph cc`. Strategy:
|
|
50
|
-
* -
|
|
51
|
-
* -
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
79
|
+
* - Reuse the **highest-numbered detached** session in the family.
|
|
80
|
+
* - Otherwise take the lowest name that doesn't exist yet (create new),
|
|
81
|
+
* so an all-attached family gets an independent `<base>-N`.
|
|
82
|
+
*
|
|
83
|
+
* Highest-detached rather than lowest is what keeps the family reachable.
|
|
84
|
+
* The old scan walked the family in order and returned the first session that
|
|
85
|
+
* was missing *or* detached, which meant a detached `<base>` ended the scan
|
|
86
|
+
* every time: `<base>-2` could not be reached by any later `zeph cc`, not even
|
|
87
|
+
* after `<base>` was used and exited (a missing `<base>` is taken fresh). A
|
|
88
|
+
* session nobody can reach still holds a live agent — a Claude Code CLI plus
|
|
89
|
+
* its MCP fleet, 250-550MB measured — so stranding one leaks memory the user
|
|
90
|
+
* can neither see nor reclaim. Draining from the tail makes every suffix
|
|
91
|
+
* reachable again: the tail goes first, and `<base>` is picked on the run
|
|
92
|
+
* after that. Reuse also wins over a gap in the numbering, for the same
|
|
93
|
+
* reason — a free `<base>-2` must not hide a detached `<base>-3`.
|
|
56
94
|
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
95
|
+
* Reclaiming is deliberately all this does. Killing a detached session would
|
|
96
|
+
* take a live agent with it, and nothing here can tell "the user is done with
|
|
97
|
+
* this" from "the user closed the terminal and will come back".
|
|
59
98
|
*/
|
|
60
99
|
const findAvailableSession = (base) => {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
if (has.status !== 0)
|
|
67
|
-
return name; // doesn't exist — fresh session
|
|
68
|
-
const clients = (0, child_process_1.spawnSync)('tmux', ['list-clients', '-t', name, '-F', '#{client_tty}'], {
|
|
69
|
-
encoding: 'utf-8',
|
|
70
|
-
stdio: ['ignore', 'pipe', 'ignore'],
|
|
71
|
-
});
|
|
72
|
-
const attached = (clients.stdout ?? '').trim().length > 0;
|
|
73
|
-
if (!attached)
|
|
74
|
-
return name; // exists but detached — reattach
|
|
100
|
+
const live = liveSessions();
|
|
101
|
+
const family = familyNames(base);
|
|
102
|
+
for (let i = family.length - 1; i >= 0; i--) {
|
|
103
|
+
if (live.get(family[i]) === false)
|
|
104
|
+
return family[i];
|
|
75
105
|
}
|
|
76
|
-
return base;
|
|
106
|
+
return family.find((name) => !live.has(name)) ?? base;
|
|
77
107
|
};
|
|
78
108
|
exports.findAvailableSession = findAvailableSession;
|
|
79
109
|
/** POSIX shell-quote so passthrough args survive being joined into a tmux shell-command string. */
|
|
@@ -87,10 +117,10 @@ const targetForAgent = (agent, extra) => {
|
|
|
87
117
|
return { cmd: agent, args: extra };
|
|
88
118
|
}
|
|
89
119
|
const base = (0, exports.tmuxSessionName)((0, exports.detectProjectName)());
|
|
90
|
-
//
|
|
91
|
-
//
|
|
92
|
-
// get independent sessions when opening multiple terminals in
|
|
93
|
-
// same project.
|
|
120
|
+
// Reattach a detached session of this project when there is one,
|
|
121
|
+
// else auto-suffix — lets the user keep `zeph cc` workflow simple and
|
|
122
|
+
// still get independent sessions when opening multiple terminals in
|
|
123
|
+
// the same project.
|
|
94
124
|
const session = (0, exports.findAvailableSession)(base);
|
|
95
125
|
// `tmux new -A`: attach if the named session exists, else create it.
|
|
96
126
|
// tmux joins trailing argv into a single shell-command, so flags like
|