@integrity-labs/agt-cli 0.28.1265 → 0.28.1266
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/{api-client-LPV5RUCO.js → api-client-5CNPCJKS.js} +2 -2
- package/dist/bin/agt.js +6 -6
- package/dist/{chunk-DRP3J4CV.js → chunk-7Z3N4G2Y.js} +4 -4
- package/dist/{chunk-ZIAXGM6I.js → chunk-SGYCPC5K.js} +2 -2
- package/dist/{chunk-6ENTMJ5T.js → chunk-WJUGK4R5.js} +46 -30
- package/dist/chunk-WJUGK4R5.js.map +1 -0
- package/dist/{chunk-HYQ7VOC3.js → chunk-XL2HPM67.js} +19 -3
- package/dist/chunk-XL2HPM67.js.map +1 -0
- package/dist/{claude-pair-runtime-2EOLNZEY.js → claude-pair-runtime-2XKML4U6.js} +15 -13
- package/dist/claude-pair-runtime-2XKML4U6.js.map +1 -0
- package/dist/lib/manager-worker.js +37 -35
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/direct-chat-channel.js +7 -1
- package/dist/mcp/slack-channel.js +7 -1
- package/dist/mcp/telegram-channel.js +7 -1
- package/dist/{persistent-session-C7UKT4EE.js → persistent-session-YBCMFF7T.js} +5 -3
- package/dist/{responsiveness-probe-NV3LXAWL.js → responsiveness-probe-ZOCD6UYO.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-6ENTMJ5T.js.map +0 -1
- package/dist/chunk-HYQ7VOC3.js.map +0 -1
- package/dist/claude-pair-runtime-2EOLNZEY.js.map +0 -1
- /package/dist/{api-client-LPV5RUCO.js.map → api-client-5CNPCJKS.js.map} +0 -0
- /package/dist/{chunk-DRP3J4CV.js.map → chunk-7Z3N4G2Y.js.map} +0 -0
- /package/dist/{chunk-ZIAXGM6I.js.map → chunk-SGYCPC5K.js.map} +0 -0
- /package/dist/{persistent-session-C7UKT4EE.js.map → persistent-session-YBCMFF7T.js.map} +0 -0
- /package/dist/{responsiveness-probe-NV3LXAWL.js.map → responsiveness-probe-ZOCD6UYO.js.map} +0 -0
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
mintRotatedHostKey,
|
|
16
16
|
probeHostKey,
|
|
17
17
|
setConfigHash
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-SGYCPC5K.js";
|
|
19
19
|
import "./chunk-W2GHPRPZ.js";
|
|
20
20
|
import "./chunk-DGUM43GV.js";
|
|
21
21
|
export {
|
|
@@ -36,4 +36,4 @@ export {
|
|
|
36
36
|
probeHostKey,
|
|
37
37
|
setConfigHash
|
|
38
38
|
};
|
|
39
|
-
//# sourceMappingURL=api-client-
|
|
39
|
+
//# sourceMappingURL=api-client-5CNPCJKS.js.map
|
package/dist/bin/agt.js
CHANGED
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
success,
|
|
32
32
|
table,
|
|
33
33
|
warn
|
|
34
|
-
} from "../chunk-
|
|
34
|
+
} from "../chunk-7Z3N4G2Y.js";
|
|
35
35
|
import {
|
|
36
36
|
ApiError,
|
|
37
37
|
PROD_AGT_HOST,
|
|
@@ -42,18 +42,18 @@ import {
|
|
|
42
42
|
getHost,
|
|
43
43
|
getHostId,
|
|
44
44
|
setActiveTeam
|
|
45
|
-
} from "../chunk-
|
|
45
|
+
} from "../chunk-SGYCPC5K.js";
|
|
46
46
|
import {
|
|
47
47
|
getProjectDir,
|
|
48
48
|
isSessionResumeDisabled,
|
|
49
49
|
readDirectChatSessionState
|
|
50
|
-
} from "../chunk-
|
|
50
|
+
} from "../chunk-WJUGK4R5.js";
|
|
51
51
|
import {
|
|
52
52
|
markDailySessionSpawn,
|
|
53
53
|
sessionFileExists,
|
|
54
54
|
sessionTranscriptDir
|
|
55
55
|
} from "../chunk-X2FBQPNR.js";
|
|
56
|
-
import "../chunk-
|
|
56
|
+
import "../chunk-XL2HPM67.js";
|
|
57
57
|
import "../chunk-6HBXEJHO.js";
|
|
58
58
|
import "../chunk-XWVM4KPK.js";
|
|
59
59
|
import {
|
|
@@ -5207,7 +5207,7 @@ import { execFileSync, execSync } from "child_process";
|
|
|
5207
5207
|
import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
|
|
5208
5208
|
import chalk17 from "chalk";
|
|
5209
5209
|
import ora15 from "ora";
|
|
5210
|
-
var cliVersion = true ? "0.28.
|
|
5210
|
+
var cliVersion = true ? "0.28.1266" : "dev";
|
|
5211
5211
|
async function fetchLatestVersion() {
|
|
5212
5212
|
const host2 = getHost();
|
|
5213
5213
|
if (!host2) return null;
|
|
@@ -6467,7 +6467,7 @@ function handleError(err) {
|
|
|
6467
6467
|
}
|
|
6468
6468
|
|
|
6469
6469
|
// src/bin/agt.ts
|
|
6470
|
-
var cliVersion2 = true ? "0.28.
|
|
6470
|
+
var cliVersion2 = true ? "0.28.1266" : "dev";
|
|
6471
6471
|
var program = new Command();
|
|
6472
6472
|
program.name("agt").description("Augmented CLI \u2014 agent provisioning and management").version(cliVersion2).option("--json", "Emit machine-readable JSON output (suppress spinners and colors)").option("--skip-update-check", "Skip the automatic update check on startup");
|
|
6473
6473
|
program.hook("preAction", async (thisCommand, actionCommand) => {
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
exchangeApiKey,
|
|
3
3
|
getApiKey,
|
|
4
4
|
getHost
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-SGYCPC5K.js";
|
|
6
6
|
import {
|
|
7
7
|
LATE_BOUND_VARS,
|
|
8
8
|
PLATFORM_DENY_PERMISSIONS,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
shellQuote,
|
|
26
26
|
withheldRemoteMcpMessage,
|
|
27
27
|
withheldRemoteMcpReasonFor
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-WJUGK4R5.js";
|
|
29
29
|
import {
|
|
30
30
|
readDailySessionPin,
|
|
31
31
|
sessionTranscriptDir
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
isConsumerTermsDialogVisible,
|
|
36
36
|
paneRemedy,
|
|
37
37
|
summarizeUnanswerablePane
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-XL2HPM67.js";
|
|
39
39
|
import {
|
|
40
40
|
parsePsRows
|
|
41
41
|
} from "./chunk-XWVM4KPK.js";
|
|
@@ -13808,4 +13808,4 @@ export {
|
|
|
13808
13808
|
managerInstallSystemUnitCommand,
|
|
13809
13809
|
managerUninstallSystemUnitCommand
|
|
13810
13810
|
};
|
|
13811
|
-
//# sourceMappingURL=chunk-
|
|
13811
|
+
//# sourceMappingURL=chunk-7Z3N4G2Y.js.map
|
|
@@ -103,7 +103,7 @@ function exchangeFailureKind(err) {
|
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
// src/lib/api-client.ts
|
|
106
|
-
var agtCliVersion = true ? "0.28.
|
|
106
|
+
var agtCliVersion = true ? "0.28.1266" : "dev";
|
|
107
107
|
var lastConfigHash = null;
|
|
108
108
|
function setConfigHash(hash) {
|
|
109
109
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -468,4 +468,4 @@ export {
|
|
|
468
468
|
api,
|
|
469
469
|
getHostId
|
|
470
470
|
};
|
|
471
|
-
//# sourceMappingURL=chunk-
|
|
471
|
+
//# sourceMappingURL=chunk-SGYCPC5K.js.map
|
|
@@ -22,8 +22,10 @@ import {
|
|
|
22
22
|
parkedModalKind,
|
|
23
23
|
sendDialogKeys,
|
|
24
24
|
simpleTextHash,
|
|
25
|
-
sweepDialogs
|
|
26
|
-
|
|
25
|
+
sweepDialogs,
|
|
26
|
+
tmuxPaneTarget,
|
|
27
|
+
tmuxSessionTarget
|
|
28
|
+
} from "./chunk-XL2HPM67.js";
|
|
27
29
|
import {
|
|
28
30
|
signinResetInForce
|
|
29
31
|
} from "./chunk-6HBXEJHO.js";
|
|
@@ -2726,7 +2728,7 @@ async function spawnServe(config, session) {
|
|
|
2726
2728
|
const port = await findFreePort();
|
|
2727
2729
|
const password = randomBytes(24).toString("base64url");
|
|
2728
2730
|
try {
|
|
2729
|
-
execSync(`tmux kill-session -t ${tmuxSession} 2>/dev/null`, { stdio: "ignore" });
|
|
2731
|
+
execSync(`tmux kill-session -t ${tmuxSessionTarget(tmuxSession)} 2>/dev/null`, { stdio: "ignore" });
|
|
2730
2732
|
} catch {
|
|
2731
2733
|
}
|
|
2732
2734
|
mkdirSync3(join4(homedir4(), ".augmented", codeName), { recursive: true });
|
|
@@ -2785,7 +2787,7 @@ async function spawnServe(config, session) {
|
|
|
2785
2787
|
function setupPaneLog(tmuxSession, codeName, log2) {
|
|
2786
2788
|
const logPath = opencodePaneLogPath(codeName);
|
|
2787
2789
|
try {
|
|
2788
|
-
execSync(`tmux pipe-pane -t ${tmuxSession} -o 'cat >> ${logPath}'`, { stdio: "ignore" });
|
|
2790
|
+
execSync(`tmux pipe-pane -t ${tmuxPaneTarget(tmuxSession)} -o 'cat >> ${logPath}'`, { stdio: "ignore" });
|
|
2789
2791
|
} catch (err) {
|
|
2790
2792
|
log2(`[opencode-session] could not attach pane log for '${codeName}': ${err.message}`);
|
|
2791
2793
|
}
|
|
@@ -2803,7 +2805,7 @@ function readOpencodePaneLogTail(codeName, lines = 40) {
|
|
|
2803
2805
|
function isOpencodeSessionHealthy(codeName) {
|
|
2804
2806
|
const tmuxSession = opencodeTmuxSession(codeName);
|
|
2805
2807
|
try {
|
|
2806
|
-
execSync(`tmux has-session -t ${tmuxSession} 2>/dev/null`, { stdio: "ignore" });
|
|
2808
|
+
execSync(`tmux has-session -t ${tmuxSessionTarget(tmuxSession)} 2>/dev/null`, { stdio: "ignore" });
|
|
2807
2809
|
return true;
|
|
2808
2810
|
} catch {
|
|
2809
2811
|
return false;
|
|
@@ -2871,7 +2873,7 @@ function getBridge(codeName, port, password) {
|
|
|
2871
2873
|
function stopOpencodeSession(codeName, log2) {
|
|
2872
2874
|
const tmuxSession = opencodeTmuxSession(codeName);
|
|
2873
2875
|
try {
|
|
2874
|
-
execSync(`tmux kill-session -t ${tmuxSession} 2>/dev/null`, { stdio: "ignore" });
|
|
2876
|
+
execSync(`tmux kill-session -t ${tmuxSessionTarget(tmuxSession)} 2>/dev/null`, { stdio: "ignore" });
|
|
2875
2877
|
log2(`[opencode-session] stopped '${tmuxSession}' for '${codeName}'`);
|
|
2876
2878
|
} catch {
|
|
2877
2879
|
}
|
|
@@ -2987,9 +2989,17 @@ function probeClaudeProcessInTmux(tmuxSession) {
|
|
|
2987
2989
|
return e?.status === 1 ? "dead" : "unknown";
|
|
2988
2990
|
}
|
|
2989
2991
|
}
|
|
2992
|
+
function tmuxSessionTarget2(session) {
|
|
2993
|
+
let n = session;
|
|
2994
|
+
if (n.startsWith("="))
|
|
2995
|
+
n = n.slice(1);
|
|
2996
|
+
if (n.endsWith(":"))
|
|
2997
|
+
n = n.slice(0, -1);
|
|
2998
|
+
return `=${n}`;
|
|
2999
|
+
}
|
|
2990
3000
|
function probeTmuxSession(tmuxSession) {
|
|
2991
3001
|
try {
|
|
2992
|
-
execFileSync2("tmux", ["has-session", "-t", tmuxSession], {
|
|
3002
|
+
execFileSync2("tmux", ["has-session", "-t", tmuxSessionTarget2(tmuxSession)], {
|
|
2993
3003
|
stdio: "ignore",
|
|
2994
3004
|
timeout: 3e3
|
|
2995
3005
|
});
|
|
@@ -3202,7 +3212,7 @@ var BLOCKED_PROMPT_VERDICT_TTL_MS = 15e3;
|
|
|
3202
3212
|
var BLOCKED_ON_PROMPT_DECISION = "blocked-on-prompt";
|
|
3203
3213
|
var suspects = /* @__PURE__ */ new Map();
|
|
3204
3214
|
var readAgentPane = (codeName) => new Promise((resolve) => {
|
|
3205
|
-
execFile("tmux", ["capture-pane", "-t", `agt-${codeName}
|
|
3215
|
+
execFile("tmux", ["capture-pane", "-t", tmuxPaneTarget(`agt-${codeName}`), "-p"], { timeout: 2e3 }, (err, stdout) => {
|
|
3206
3216
|
resolve(err ? null : String(stdout));
|
|
3207
3217
|
});
|
|
3208
3218
|
});
|
|
@@ -4698,7 +4708,7 @@ function applyPaneAgentIdVerdict(args) {
|
|
|
4698
4708
|
} else {
|
|
4699
4709
|
const reason = result && !result.ok ? result.reason : "no result from the kill";
|
|
4700
4710
|
log2(
|
|
4701
|
-
`[persistent-session] FAILED TO KILL session '${tmuxSession}' for '${codeName}': ${reason}. It is marked crashed, but its pane may still be running under another agent's identity. Kill it by hand: tmux kill-session -t ${tmuxSession} (ENG-8800)`
|
|
4711
|
+
`[persistent-session] FAILED TO KILL session '${tmuxSession}' for '${codeName}': ${reason}. It is marked crashed, but its pane may still be running under another agent's identity. Kill it by hand: tmux kill-session -t '${tmuxSessionTarget(tmuxSession)}' (ENG-8800)`
|
|
4702
4712
|
);
|
|
4703
4713
|
}
|
|
4704
4714
|
args.onTeardownSettled?.(result ?? { ok: false, reason: "no result from the kill" });
|
|
@@ -4719,7 +4729,7 @@ function killTmuxSessionBounded(tmuxSession, deps = {}) {
|
|
|
4719
4729
|
};
|
|
4720
4730
|
let killer;
|
|
4721
4731
|
try {
|
|
4722
|
-
killer = spawnFn("tmux", ["kill-session", "-t", tmuxSession], { stdio: "ignore" });
|
|
4732
|
+
killer = spawnFn("tmux", ["kill-session", "-t", tmuxSessionTarget(tmuxSession)], { stdio: "ignore" });
|
|
4723
4733
|
} catch (err) {
|
|
4724
4734
|
settle({ ok: false, reason: `could not spawn tmux: ${err instanceof Error ? err.message : String(err)}` });
|
|
4725
4735
|
return;
|
|
@@ -4866,7 +4876,7 @@ function setupPaneLog2(tmuxSession, codeName, log2) {
|
|
|
4866
4876
|
"utf-8"
|
|
4867
4877
|
);
|
|
4868
4878
|
execSync2(
|
|
4869
|
-
`tmux pipe-pane -o -t '${tmuxSession.replace(/'/g, `'\\''`)}' '${paneSinkCommand(logPath, log2).replace(/'/g, `'\\''`)}'`,
|
|
4879
|
+
`tmux pipe-pane -o -t '${tmuxPaneTarget(tmuxSession).replace(/'/g, `'\\''`)}' '${paneSinkCommand(logPath, log2).replace(/'/g, `'\\''`)}'`,
|
|
4870
4880
|
{ stdio: "ignore" }
|
|
4871
4881
|
);
|
|
4872
4882
|
} catch (err) {
|
|
@@ -5043,7 +5053,7 @@ function buildTmuxSpawnPlan(args) {
|
|
|
5043
5053
|
args.claudeCmd
|
|
5044
5054
|
]
|
|
5045
5055
|
},
|
|
5046
|
-
cleanup: { argv: ["kill-session", "-t", bootstrapSession] }
|
|
5056
|
+
cleanup: { argv: ["kill-session", "-t", tmuxSessionTarget(bootstrapSession)] }
|
|
5047
5057
|
};
|
|
5048
5058
|
}
|
|
5049
5059
|
function runTmuxSpawnPlan(opts) {
|
|
@@ -5156,7 +5166,7 @@ function spawnSession(config, session) {
|
|
|
5156
5166
|
try {
|
|
5157
5167
|
sanitizeMcpJson(mcpConfigPath, apiHost);
|
|
5158
5168
|
try {
|
|
5159
|
-
execSync2(`tmux kill-session -t ${tmuxSession} 2>/dev/null`, { stdio: "ignore" });
|
|
5169
|
+
execSync2(`tmux kill-session -t ${tmuxSessionTarget(tmuxSession)} 2>/dev/null`, { stdio: "ignore" });
|
|
5160
5170
|
} catch {
|
|
5161
5171
|
}
|
|
5162
5172
|
if (resolveOAuthCredAction(
|
|
@@ -5520,7 +5530,7 @@ function spawnSession(config, session) {
|
|
|
5520
5530
|
}
|
|
5521
5531
|
log2(`[persistent-session] tmux session '${tmuxSession}' created for '${codeName}'`);
|
|
5522
5532
|
try {
|
|
5523
|
-
const probe = spawn2("tmux", ["show-environment", "-t", tmuxSession, "AGT_AGENT_ID"], {
|
|
5533
|
+
const probe = spawn2("tmux", ["show-environment", "-t", tmuxSessionTarget(tmuxSession), "AGT_AGENT_ID"], {
|
|
5524
5534
|
stdio: ["ignore", "pipe", "pipe"]
|
|
5525
5535
|
});
|
|
5526
5536
|
let out = "";
|
|
@@ -5670,7 +5680,7 @@ async function acceptDialogs(tmuxSession, codeName, log2, primaryModel = null, s
|
|
|
5670
5680
|
while (dialogIterations < MAX_DIALOG_ITERATIONS && loginPickerIterations < MAX_LOGIN_PICKER_ITERATIONS) {
|
|
5671
5681
|
await new Promise((r) => setTimeout(r, 2e3));
|
|
5672
5682
|
try {
|
|
5673
|
-
const screen = execSync2(`tmux capture-pane -t ${tmuxSession} -p 2>/dev/null`, { encoding: "utf-8" });
|
|
5683
|
+
const screen = execSync2(`tmux capture-pane -t ${tmuxPaneTarget(tmuxSession)} -p 2>/dev/null`, { encoding: "utf-8" });
|
|
5674
5684
|
if (isLoginPickerVisible(screen)) {
|
|
5675
5685
|
noteSessionBlockedOnPrompt(codeName, "login-picker", "spawn-dialogs");
|
|
5676
5686
|
if (!loginPickerReported) {
|
|
@@ -5766,7 +5776,7 @@ async function waitForPromptReady(tmuxSession) {
|
|
|
5766
5776
|
try {
|
|
5767
5777
|
const screen = execFileSync3(
|
|
5768
5778
|
"tmux",
|
|
5769
|
-
["capture-pane", "-t", tmuxSession, "-p"],
|
|
5779
|
+
["capture-pane", "-t", tmuxPaneTarget(tmuxSession), "-p"],
|
|
5770
5780
|
{ encoding: "utf-8", stdio: ["ignore", "pipe", "ignore"] }
|
|
5771
5781
|
);
|
|
5772
5782
|
if (screen.includes("\u276F ")) return true;
|
|
@@ -5783,11 +5793,11 @@ function sleepBlockingMs(ms) {
|
|
|
5783
5793
|
}
|
|
5784
5794
|
function defaultArmSender(tmuxSession, command) {
|
|
5785
5795
|
try {
|
|
5786
|
-
execFileSync3("tmux", ["send-keys", "-t", tmuxSession, "-l", command], {
|
|
5796
|
+
execFileSync3("tmux", ["send-keys", "-t", tmuxPaneTarget(tmuxSession), "-l", command], {
|
|
5787
5797
|
stdio: ["ignore", "ignore", "pipe"]
|
|
5788
5798
|
});
|
|
5789
5799
|
sleepBlockingMs(SEND_KEYS_ENTER_DELAY_MS);
|
|
5790
|
-
execFileSync3("tmux", ["send-keys", "-t", tmuxSession, "Enter"], {
|
|
5800
|
+
execFileSync3("tmux", ["send-keys", "-t", tmuxPaneTarget(tmuxSession), "Enter"], {
|
|
5791
5801
|
stdio: ["ignore", "ignore", "pipe"]
|
|
5792
5802
|
});
|
|
5793
5803
|
return true;
|
|
@@ -5798,7 +5808,7 @@ function defaultArmSender(tmuxSession, command) {
|
|
|
5798
5808
|
var armSender = defaultArmSender;
|
|
5799
5809
|
function defaultPaneCapture(tmuxSession) {
|
|
5800
5810
|
try {
|
|
5801
|
-
return execFileSync3("tmux", ["capture-pane", "-t", tmuxSession, "-p"], {
|
|
5811
|
+
return execFileSync3("tmux", ["capture-pane", "-t", tmuxPaneTarget(tmuxSession), "-p"], {
|
|
5802
5812
|
encoding: "utf-8",
|
|
5803
5813
|
stdio: ["ignore", "pipe", "ignore"],
|
|
5804
5814
|
timeout: 2e3
|
|
@@ -5813,21 +5823,26 @@ var defaultHygieneKeySender = async (tmuxSession, keys, interKeyDelayMs) => {
|
|
|
5813
5823
|
if (i > 0 && interKeyDelayMs > 0) {
|
|
5814
5824
|
await new Promise((r) => setTimeout(r, interKeyDelayMs));
|
|
5815
5825
|
}
|
|
5816
|
-
execFileSync3("tmux", ["send-keys", "-t", tmuxSession, keys[i]], {
|
|
5826
|
+
execFileSync3("tmux", ["send-keys", "-t", tmuxPaneTarget(tmuxSession), keys[i]], {
|
|
5817
5827
|
stdio: "ignore"
|
|
5818
5828
|
});
|
|
5819
5829
|
}
|
|
5820
5830
|
};
|
|
5821
5831
|
var hygieneKeySender = defaultHygieneKeySender;
|
|
5822
5832
|
var SESSION_CREATED_TIMEOUT_MS = 3e3;
|
|
5833
|
+
function parseSessionCreatedOutput(out, tmuxSession) {
|
|
5834
|
+
const [name, created] = out.trim().split(" ");
|
|
5835
|
+
if (name !== tmuxSession) return null;
|
|
5836
|
+
const secs = Number(created);
|
|
5837
|
+
return Number.isFinite(secs) && secs > 0 ? secs * 1e3 : null;
|
|
5838
|
+
}
|
|
5823
5839
|
function defaultSessionCreatedProbe(tmuxSession) {
|
|
5824
5840
|
try {
|
|
5825
|
-
const
|
|
5841
|
+
const out = execFileSync3("tmux", ["display", "-p", "-t", tmuxPaneTarget(tmuxSession), "#{session_name} #{session_created}"], {
|
|
5826
5842
|
encoding: "utf-8",
|
|
5827
5843
|
timeout: SESSION_CREATED_TIMEOUT_MS
|
|
5828
|
-
})
|
|
5829
|
-
|
|
5830
|
-
return Number.isFinite(secs) && secs > 0 ? secs * 1e3 : null;
|
|
5844
|
+
});
|
|
5845
|
+
return parseSessionCreatedOutput(out, tmuxSession);
|
|
5831
5846
|
} catch {
|
|
5832
5847
|
return null;
|
|
5833
5848
|
}
|
|
@@ -5949,7 +5964,7 @@ function stopPersistentSession(codeName, log2) {
|
|
|
5949
5964
|
log2(`[persistent-session] Stopping session for '${codeName}'`);
|
|
5950
5965
|
session.status = "stopped";
|
|
5951
5966
|
try {
|
|
5952
|
-
execFileSync3("tmux", ["kill-session", "-t", `agt-${codeName}`], { stdio: ["ignore", "ignore", "pipe"] });
|
|
5967
|
+
execFileSync3("tmux", ["kill-session", "-t", tmuxSessionTarget(`agt-${codeName}`)], { stdio: ["ignore", "ignore", "pipe"] });
|
|
5953
5968
|
} catch (err) {
|
|
5954
5969
|
const stderr = (err.stderr ?? "").toString().trim();
|
|
5955
5970
|
const alreadyGone = /can't find session|no server running/i.test(stderr);
|
|
@@ -6003,7 +6018,7 @@ function takeZombieDetection(codeName) {
|
|
|
6003
6018
|
function isSessionHealthy(codeName) {
|
|
6004
6019
|
const tmuxSession = `agt-${codeName}`;
|
|
6005
6020
|
try {
|
|
6006
|
-
execSync2(`tmux has-session -t ${tmuxSession} 2>/dev/null`, { stdio: "ignore" });
|
|
6021
|
+
execSync2(`tmux has-session -t ${tmuxSessionTarget(tmuxSession)} 2>/dev/null`, { stdio: "ignore" });
|
|
6007
6022
|
} catch {
|
|
6008
6023
|
const session2 = sessions2.get(codeName);
|
|
6009
6024
|
if (session2 && session2.status === "running") {
|
|
@@ -6052,7 +6067,7 @@ function isSessionHealthy(codeName) {
|
|
|
6052
6067
|
if (!claudeAlive) {
|
|
6053
6068
|
const paneTail = readPaneLogTail(codeName);
|
|
6054
6069
|
try {
|
|
6055
|
-
execFileSync3("tmux", ["kill-session", "-t", tmuxSession], { stdio: "ignore" });
|
|
6070
|
+
execFileSync3("tmux", ["kill-session", "-t", tmuxSessionTarget(tmuxSession)], { stdio: "ignore" });
|
|
6056
6071
|
} catch {
|
|
6057
6072
|
}
|
|
6058
6073
|
session.status = "crashed";
|
|
@@ -6152,13 +6167,13 @@ function collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor, sp
|
|
|
6152
6167
|
let launchArgs = null;
|
|
6153
6168
|
let channelStatus = null;
|
|
6154
6169
|
try {
|
|
6155
|
-
execFileSync3("tmux", ["has-session", "-t", tmuxSession], { stdio: "ignore" });
|
|
6170
|
+
execFileSync3("tmux", ["has-session", "-t", tmuxSessionTarget(tmuxSession)], { stdio: "ignore" });
|
|
6156
6171
|
tmuxAlive = true;
|
|
6157
6172
|
} catch {
|
|
6158
6173
|
}
|
|
6159
6174
|
if (tmuxAlive) {
|
|
6160
6175
|
try {
|
|
6161
|
-
screenCapture = execFileSync3("tmux", ["capture-pane", "-t", tmuxSession, "-p", "-S", "-30"], {
|
|
6176
|
+
screenCapture = execFileSync3("tmux", ["capture-pane", "-t", tmuxPaneTarget(tmuxSession), "-p", "-S", "-30"], {
|
|
6162
6177
|
encoding: "utf-8",
|
|
6163
6178
|
timeout: 3e3
|
|
6164
6179
|
}).trim();
|
|
@@ -6382,6 +6397,7 @@ export {
|
|
|
6382
6397
|
buildTmuxSpawnPlan,
|
|
6383
6398
|
runTmuxSpawnPlan,
|
|
6384
6399
|
SEND_KEYS_ENTER_DELAY_MS,
|
|
6400
|
+
parseSessionCreatedOutput,
|
|
6385
6401
|
sendToAgent,
|
|
6386
6402
|
isAgentPromptReady,
|
|
6387
6403
|
_internals,
|
|
@@ -6397,4 +6413,4 @@ export {
|
|
|
6397
6413
|
stopAllSessionsAndWait,
|
|
6398
6414
|
getProjectDir
|
|
6399
6415
|
};
|
|
6400
|
-
//# sourceMappingURL=chunk-
|
|
6416
|
+
//# sourceMappingURL=chunk-WJUGK4R5.js.map
|