@hwip/cli 0.1.6 → 0.1.7
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/dist/listener.js +5 -1
- package/package.json +1 -1
package/dist/listener.js
CHANGED
|
@@ -36,6 +36,7 @@ const os_1 = require("os");
|
|
|
36
36
|
const path_1 = require("path");
|
|
37
37
|
const ws_1 = __importDefault(require("ws"));
|
|
38
38
|
const config_js_1 = require("./config.js");
|
|
39
|
+
const agent_dirs_js_1 = require("./agent-dirs.js");
|
|
39
40
|
const api_js_1 = require("./api.js");
|
|
40
41
|
const shell_audit_js_1 = require("./shell-audit.js");
|
|
41
42
|
const insecure_url_js_1 = require("./insecure-url.js");
|
|
@@ -1493,7 +1494,10 @@ const handleSessionResumeRequest = (req, send) => {
|
|
|
1493
1494
|
? [';', 'set-option', config_js_1.SESSION_PROJECT_OPTION, known.project, ';', 'set-option', config_js_1.SESSION_LABEL_OPTION, known.label]
|
|
1494
1495
|
: [];
|
|
1495
1496
|
const conversation = resumableConversation(agent, known);
|
|
1496
|
-
|
|
1497
|
+
// tmux gives the new pane this client's PATH. A login service's PATH has none
|
|
1498
|
+
// of the agent directories, so they go on as schedule launches add them —
|
|
1499
|
+
// otherwise the agent is not found and the session ends as it starts.
|
|
1500
|
+
const started = (0, child_process_1.spawnSync)('tmux', (0, tmux_socket_js_1.tmuxArgs)(['new-session', '-d', '-s', target, '-c', known.cwd, agent.binary, ...(conversation?.args ?? []), ...sidecar]), { encoding: 'utf-8', stdio: ['ignore', 'pipe', 'pipe'], env: { ...process.env, PATH: (0, agent_dirs_js_1.withAgentDirs)(process.env.PATH) } });
|
|
1497
1501
|
if (started.status !== 0) {
|
|
1498
1502
|
(0, listener_log_js_1.log)(`✗ resume ${sessionName}: tmux refused (${(started.stderr ?? '').trim() || 'no detail'})`);
|
|
1499
1503
|
return reply({ error: 'start_failed' });
|