@integrity-labs/agt-cli 0.28.1306 → 0.28.1308
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-W53BBB2B.js → api-client-QHGAABOL.js} +3 -3
- package/dist/bin/agt.js +7 -7
- package/dist/{chunk-K5SXTDKK.js → chunk-GZT7DHPV.js} +3 -3
- package/dist/{chunk-7V53KRPM.js → chunk-HMH4EOV5.js} +5 -5
- package/dist/{chunk-I6HGFJNX.js → chunk-JZOA4A3J.js} +2 -2
- package/dist/{chunk-GLX5CD6S.js → chunk-NXTNYNNV.js} +2 -2
- package/dist/{chunk-PT3QK5ZP.js → chunk-VSJUMNQ5.js} +115 -13
- package/dist/chunk-VSJUMNQ5.js.map +1 -0
- package/dist/{chunk-4KSUIAI4.js → chunk-WW2CTOEO.js} +9 -73
- package/dist/chunk-WW2CTOEO.js.map +1 -0
- package/dist/{claude-code-updater-KA4VMUWK.js → claude-code-updater-OU4AEM5Y.js} +3 -3
- package/dist/{claude-pair-runtime-MC3K2BXU.js → claude-pair-runtime-H7A7ZOEW.js} +3 -3
- package/dist/lib/manager-worker.js +674 -223
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/direct-chat-channel.js +8 -72
- package/dist/mcp/index.js +18 -73
- package/dist/mcp/origami.js +8 -72
- package/dist/mcp/slack-channel.js +111 -180
- package/dist/mcp/telegram-channel.js +8 -72
- package/dist/{persistent-session-ZC4XAUTS.js → persistent-session-OUCTECWP.js} +20 -4
- package/dist/{responsiveness-probe-TA47HG3A.js → responsiveness-probe-SC72APRB.js} +4 -4
- package/dist/{session-auth-dead-MDZWPSED.js → session-auth-dead-MQR2SLW5.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-4KSUIAI4.js.map +0 -1
- package/dist/chunk-PT3QK5ZP.js.map +0 -1
- /package/dist/{api-client-W53BBB2B.js.map → api-client-QHGAABOL.js.map} +0 -0
- /package/dist/{chunk-K5SXTDKK.js.map → chunk-GZT7DHPV.js.map} +0 -0
- /package/dist/{chunk-7V53KRPM.js.map → chunk-HMH4EOV5.js.map} +0 -0
- /package/dist/{chunk-I6HGFJNX.js.map → chunk-JZOA4A3J.js.map} +0 -0
- /package/dist/{chunk-GLX5CD6S.js.map → chunk-NXTNYNNV.js.map} +0 -0
- /package/dist/{claude-code-updater-KA4VMUWK.js.map → claude-code-updater-OU4AEM5Y.js.map} +0 -0
- /package/dist/{claude-pair-runtime-MC3K2BXU.js.map → claude-pair-runtime-H7A7ZOEW.js.map} +0 -0
- /package/dist/{persistent-session-ZC4XAUTS.js.map → persistent-session-OUCTECWP.js.map} +0 -0
- /package/dist/{responsiveness-probe-TA47HG3A.js.map → responsiveness-probe-SC72APRB.js.map} +0 -0
- /package/dist/{session-auth-dead-MDZWPSED.js.map → session-auth-dead-MQR2SLW5.js.map} +0 -0
|
@@ -15,8 +15,8 @@ import {
|
|
|
15
15
|
mintRotatedHostKey,
|
|
16
16
|
probeHostKey,
|
|
17
17
|
setConfigHash
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-GZT7DHPV.js";
|
|
19
|
+
import "./chunk-WW2CTOEO.js";
|
|
20
20
|
import "./chunk-DGUM43GV.js";
|
|
21
21
|
export {
|
|
22
22
|
ApiError,
|
|
@@ -36,4 +36,4 @@ export {
|
|
|
36
36
|
probeHostKey,
|
|
37
37
|
setConfigHash
|
|
38
38
|
};
|
|
39
|
-
//# sourceMappingURL=api-client-
|
|
39
|
+
//# sourceMappingURL=api-client-QHGAABOL.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-HMH4EOV5.js";
|
|
35
35
|
import {
|
|
36
36
|
ApiError,
|
|
37
37
|
PROD_AGT_HOST,
|
|
@@ -42,17 +42,17 @@ import {
|
|
|
42
42
|
getHost,
|
|
43
43
|
getHostId,
|
|
44
44
|
setActiveTeam
|
|
45
|
-
} from "../chunk-
|
|
45
|
+
} from "../chunk-GZT7DHPV.js";
|
|
46
46
|
import {
|
|
47
47
|
getProjectDir,
|
|
48
48
|
isSessionResumeDisabled,
|
|
49
49
|
readDirectChatSessionState
|
|
50
|
-
} from "../chunk-
|
|
50
|
+
} from "../chunk-VSJUMNQ5.js";
|
|
51
51
|
import {
|
|
52
52
|
markDailySessionSpawn,
|
|
53
53
|
sessionFileExists,
|
|
54
54
|
sessionTranscriptDir
|
|
55
|
-
} from "../chunk-
|
|
55
|
+
} from "../chunk-NXTNYNNV.js";
|
|
56
56
|
import "../chunk-XL2HPM67.js";
|
|
57
57
|
import "../chunk-6HBXEJHO.js";
|
|
58
58
|
import "../chunk-XWVM4KPK.js";
|
|
@@ -85,7 +85,7 @@ import {
|
|
|
85
85
|
requiredMcpWildcard,
|
|
86
86
|
resolveChannels,
|
|
87
87
|
serializeManifestForSlackCli
|
|
88
|
-
} from "../chunk-
|
|
88
|
+
} from "../chunk-WW2CTOEO.js";
|
|
89
89
|
import "../chunk-AIUIMEUS.js";
|
|
90
90
|
import "../chunk-DGUM43GV.js";
|
|
91
91
|
|
|
@@ -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.1308" : "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.1308" : "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) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
HOST_ROTATE_KEY_CONFLICT
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WW2CTOEO.js";
|
|
4
4
|
|
|
5
5
|
// src/lib/config.ts
|
|
6
6
|
import { readFileSync, writeFileSync, mkdirSync, existsSync } from "fs";
|
|
@@ -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.1308" : "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-GZT7DHPV.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
exchangeApiKey,
|
|
3
3
|
getApiKey,
|
|
4
4
|
getHost
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-GZT7DHPV.js";
|
|
6
6
|
import {
|
|
7
7
|
LATE_BOUND_VARS,
|
|
8
8
|
PLATFORM_DENY_PERMISSIONS,
|
|
@@ -26,11 +26,11 @@ import {
|
|
|
26
26
|
warnIgnoredIsolationAllowlist,
|
|
27
27
|
withheldRemoteMcpMessage,
|
|
28
28
|
withheldRemoteMcpReasonFor
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-VSJUMNQ5.js";
|
|
30
30
|
import {
|
|
31
31
|
readDailySessionPin,
|
|
32
32
|
sessionTranscriptDir
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-NXTNYNNV.js";
|
|
34
34
|
import {
|
|
35
35
|
classifyUnanswerablePane,
|
|
36
36
|
isConsumerTermsDialogVisible,
|
|
@@ -102,7 +102,7 @@ import {
|
|
|
102
102
|
scanConfigForLiteralSecrets,
|
|
103
103
|
worseConnectivityOutcome,
|
|
104
104
|
wrapScheduledTaskPrompt
|
|
105
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-WW2CTOEO.js";
|
|
106
106
|
import {
|
|
107
107
|
claudeJsonPathFor,
|
|
108
108
|
effectiveClaudeJsonPath,
|
|
@@ -13876,4 +13876,4 @@ export {
|
|
|
13876
13876
|
managerInstallSystemUnitCommand,
|
|
13877
13877
|
managerUninstallSystemUnitCommand
|
|
13878
13878
|
};
|
|
13879
|
-
//# sourceMappingURL=chunk-
|
|
13879
|
+
//# sourceMappingURL=chunk-HMH4EOV5.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-XWVM4KPK.js";
|
|
5
5
|
import {
|
|
6
6
|
FORCED_UPDATE_HARD_DEADLINE_MS
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WW2CTOEO.js";
|
|
8
8
|
import {
|
|
9
9
|
effectiveClaudeJsonPath
|
|
10
10
|
} from "./chunk-AIUIMEUS.js";
|
|
@@ -722,4 +722,4 @@ export {
|
|
|
722
722
|
probeClaudeInstalls,
|
|
723
723
|
maybeUpdateClaudeCode
|
|
724
724
|
};
|
|
725
|
-
//# sourceMappingURL=chunk-
|
|
725
|
+
//# sourceMappingURL=chunk-JZOA4A3J.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
encodeClaudeProjectPath
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WW2CTOEO.js";
|
|
4
4
|
|
|
5
5
|
// src/lib/daily-session.ts
|
|
6
6
|
import { randomUUID } from "crypto";
|
|
@@ -245,4 +245,4 @@ export {
|
|
|
245
245
|
peekPreviousSession,
|
|
246
246
|
readDailySessionPin
|
|
247
247
|
};
|
|
248
|
-
//# sourceMappingURL=chunk-
|
|
248
|
+
//# sourceMappingURL=chunk-NXTNYNNV.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
rotateDailySession,
|
|
5
5
|
sessionFileExists,
|
|
6
6
|
todayLocalIso
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-NXTNYNNV.js";
|
|
8
8
|
import {
|
|
9
9
|
classifyUnanswerablePane,
|
|
10
10
|
customApiKeyDialogKeys,
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
remoteMcpConnectionEnvInfix,
|
|
55
55
|
remoteMcpConnectionLabel,
|
|
56
56
|
remoteMcpConnectionScopedEnvVar
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-WW2CTOEO.js";
|
|
58
58
|
import {
|
|
59
59
|
CLAUDE_CONFIG_DIR_ENV,
|
|
60
60
|
approveApiKeyInClaudeConfig,
|
|
@@ -71,7 +71,7 @@ import {
|
|
|
71
71
|
} from "./chunk-DGUM43GV.js";
|
|
72
72
|
|
|
73
73
|
// src/lib/persistent-session.ts
|
|
74
|
-
import { spawn as spawn2, execSync as execSync2, execFileSync as execFileSync3 } from "child_process";
|
|
74
|
+
import { spawn as spawn2, execSync as execSync2, execFile as execFile2, execFileSync as execFileSync3 } from "child_process";
|
|
75
75
|
|
|
76
76
|
// src/lib/bounded-exec.ts
|
|
77
77
|
import { execFileSync } from "child_process";
|
|
@@ -133,11 +133,11 @@ function hardBoundedExecFile(file, args, opts) {
|
|
|
133
133
|
);
|
|
134
134
|
}
|
|
135
135
|
const nodeTimeoutMs = available ? opts.timeoutMs + killAfterMs + 5e3 : opts.timeoutMs;
|
|
136
|
-
const { execFile:
|
|
136
|
+
const { execFile: execFile3, execArgs } = boundedArgv(file, args, opts.timeoutMs, killAfterMs, available);
|
|
137
137
|
const now = opts.now ?? (() => performance.now());
|
|
138
138
|
const startedAt = now();
|
|
139
139
|
try {
|
|
140
|
-
const stdout = exec(
|
|
140
|
+
const stdout = exec(execFile3, execArgs, {
|
|
141
141
|
encoding: "utf-8",
|
|
142
142
|
timeout: nodeTimeoutMs,
|
|
143
143
|
maxBuffer: opts.maxBuffer,
|
|
@@ -4145,7 +4145,9 @@ function isolationMode(_codeName) {
|
|
|
4145
4145
|
return process.env.AGT_ISOLATION === "docker" ? "docker" : "none";
|
|
4146
4146
|
}
|
|
4147
4147
|
var dockerReadinessCache = null;
|
|
4148
|
+
var dockerReadinessFailedAt = 0;
|
|
4148
4149
|
var isolationDegradationLogged = false;
|
|
4150
|
+
var DOCKER_READINESS_RETRY_MS = 6e4;
|
|
4149
4151
|
function probeDockerRuntime(image) {
|
|
4150
4152
|
const info = hardBoundedExecFile("docker", ["info"], { timeoutMs: 15e3 });
|
|
4151
4153
|
if (info.kind !== "ok") {
|
|
@@ -4163,16 +4165,87 @@ function probeDockerRuntime(image) {
|
|
|
4163
4165
|
if (img.kind !== "ok") return { ok: false, reason: `image-missing:${image}` };
|
|
4164
4166
|
return { ok: true };
|
|
4165
4167
|
}
|
|
4166
|
-
function
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4168
|
+
function probeDockerRuntimeAsync(image) {
|
|
4169
|
+
const run = (args) => new Promise((resolve) => {
|
|
4170
|
+
execFile2("docker", args, { timeout: 15e3, killSignal: "SIGKILL" }, (err) => {
|
|
4171
|
+
const code = err?.code;
|
|
4172
|
+
resolve({ ok: !err, notFound: code === "ENOENT" });
|
|
4173
|
+
});
|
|
4174
|
+
});
|
|
4175
|
+
return run(["info"]).then(async (info) => {
|
|
4176
|
+
if (!info.ok) return { ok: false, reason: info.notFound ? "docker-not-installed" : "docker-daemon-unavailable" };
|
|
4177
|
+
const img = await run(["image", "inspect", image]);
|
|
4178
|
+
return img.ok ? { ok: true } : { ok: false, reason: `image-missing:${image}` };
|
|
4179
|
+
});
|
|
4180
|
+
}
|
|
4181
|
+
var readinessRefresh = null;
|
|
4182
|
+
function dockerRuntimeReadiness(now = Date.now()) {
|
|
4183
|
+
if (!dockerReadinessCache) {
|
|
4184
|
+
dockerReadinessCache = probeDockerRuntimeImpl(process.env.AGT_ISOLATION_IMAGE || "agt-runtime:latest");
|
|
4185
|
+
if (!dockerReadinessCache.ok) dockerReadinessFailedAt = now;
|
|
4186
|
+
return dockerReadinessCache;
|
|
4187
|
+
}
|
|
4188
|
+
if (!dockerReadinessCache.ok && now - dockerReadinessFailedAt >= DOCKER_READINESS_RETRY_MS && !readinessRefresh) {
|
|
4189
|
+
dockerReadinessFailedAt = now;
|
|
4190
|
+
readinessRefresh = probeDockerRuntimeAsyncImpl(process.env.AGT_ISOLATION_IMAGE || "agt-runtime:latest").then((r) => {
|
|
4191
|
+
if (!dockerReadinessCache?.ok) {
|
|
4192
|
+
dockerReadinessCache = r;
|
|
4193
|
+
if (!r.ok) dockerReadinessFailedAt = Date.now();
|
|
4194
|
+
}
|
|
4195
|
+
}).catch(() => {
|
|
4196
|
+
}).finally(() => {
|
|
4197
|
+
readinessRefresh = null;
|
|
4198
|
+
});
|
|
4199
|
+
}
|
|
4171
4200
|
return dockerReadinessCache;
|
|
4172
4201
|
}
|
|
4173
|
-
|
|
4202
|
+
var startProbeInFlight = null;
|
|
4203
|
+
var startProbeQueued = null;
|
|
4204
|
+
function runStartProbe() {
|
|
4205
|
+
const p = probeDockerRuntimeAsyncImpl(process.env.AGT_ISOLATION_IMAGE || "agt-runtime:latest").catch(
|
|
4206
|
+
() => ({ ok: false, reason: "docker-daemon-unavailable" })
|
|
4207
|
+
);
|
|
4208
|
+
startProbeInFlight = p;
|
|
4209
|
+
void p.finally(() => {
|
|
4210
|
+
if (startProbeInFlight === p) startProbeInFlight = null;
|
|
4211
|
+
});
|
|
4212
|
+
return p;
|
|
4213
|
+
}
|
|
4214
|
+
function dockerStartReadinessAsync(now = Date.now()) {
|
|
4215
|
+
const base = dockerRuntimeReadiness(now);
|
|
4216
|
+
if (!base.ok) return Promise.resolve(base);
|
|
4217
|
+
if (!startProbeInFlight) return runStartProbe();
|
|
4218
|
+
if (!startProbeQueued) {
|
|
4219
|
+
startProbeQueued = startProbeInFlight.then(() => {
|
|
4220
|
+
startProbeQueued = null;
|
|
4221
|
+
return runStartProbe();
|
|
4222
|
+
});
|
|
4223
|
+
}
|
|
4224
|
+
return startProbeQueued;
|
|
4225
|
+
}
|
|
4226
|
+
function dockerStartReadiness(now = Date.now()) {
|
|
4227
|
+
const base = dockerRuntimeReadiness(now);
|
|
4228
|
+
if (!base.ok) return base;
|
|
4229
|
+
return probeDockerRuntimeImpl(process.env.AGT_ISOLATION_IMAGE || "agt-runtime:latest");
|
|
4230
|
+
}
|
|
4231
|
+
var probeDockerRuntimeImpl = probeDockerRuntime;
|
|
4232
|
+
function setDockerProbeForTests(probe) {
|
|
4233
|
+
probeDockerRuntimeImpl = probe ?? probeDockerRuntime;
|
|
4234
|
+
}
|
|
4235
|
+
var probeDockerRuntimeAsyncImpl = probeDockerRuntimeAsync;
|
|
4236
|
+
function setDockerAsyncProbeForTests(probe) {
|
|
4237
|
+
probeDockerRuntimeAsyncImpl = probe ?? probeDockerRuntimeAsync;
|
|
4238
|
+
}
|
|
4239
|
+
function readinessRefreshForTests() {
|
|
4240
|
+
return readinessRefresh ?? Promise.resolve();
|
|
4241
|
+
}
|
|
4242
|
+
function resetDockerRuntimeReadinessForTests(pinned = null, failedAt = Date.now()) {
|
|
4174
4243
|
dockerReadinessCache = pinned;
|
|
4244
|
+
dockerReadinessFailedAt = pinned && !pinned.ok ? failedAt : 0;
|
|
4175
4245
|
isolationDegradationLogged = false;
|
|
4246
|
+
readinessRefresh = null;
|
|
4247
|
+
startProbeInFlight = null;
|
|
4248
|
+
startProbeQueued = null;
|
|
4176
4249
|
}
|
|
4177
4250
|
function effectiveIsolationMode(codeName, log2) {
|
|
4178
4251
|
if (isolationMode(codeName) !== "docker") return "none";
|
|
@@ -4181,7 +4254,7 @@ function effectiveIsolationMode(codeName, log2) {
|
|
|
4181
4254
|
if (!isolationDegradationLogged) {
|
|
4182
4255
|
isolationDegradationLogged = true;
|
|
4183
4256
|
(log2 ?? ((m) => console.warn(m)))(
|
|
4184
|
-
`[isolation] AGT_ISOLATION=docker but the Docker runtime is unusable (reason=${readiness.reason}) - agents on this host
|
|
4257
|
+
`[isolation] AGT_ISOLATION=docker but the Docker runtime is unusable (reason=${readiness.reason}) - agents on this host will NOT be started (ENG-12183: an isolated host never runs agents unisolated). Install Docker and the agt-runtime image; the manager re-checks every minute and starts agents once it is usable.`
|
|
4185
4258
|
);
|
|
4186
4259
|
}
|
|
4187
4260
|
return "none";
|
|
@@ -5022,6 +5095,14 @@ function writeDirectChatSessionState(agentId, state) {
|
|
|
5022
5095
|
function spawnBackoffMs(restartCount) {
|
|
5023
5096
|
return Math.min(5e3 * Math.pow(2, restartCount), 6e4);
|
|
5024
5097
|
}
|
|
5098
|
+
var IsolationUnavailableError = class extends Error {
|
|
5099
|
+
constructor(codeName, reason) {
|
|
5100
|
+
super(`refusing to start '${codeName}' unisolated: AGT_ISOLATION=docker but the Docker runtime is unusable (reason=${reason})`);
|
|
5101
|
+
this.codeName = codeName;
|
|
5102
|
+
this.reason = reason;
|
|
5103
|
+
this.name = "IsolationUnavailableError";
|
|
5104
|
+
}
|
|
5105
|
+
};
|
|
5025
5106
|
function crashRespawnDeferred(existing, nowMs) {
|
|
5026
5107
|
if (existing.status !== "crashed") return false;
|
|
5027
5108
|
const anchor = Math.max(existing.startedAt ?? 0, existing.teardownRequestedAt ?? 0);
|
|
@@ -5033,6 +5114,10 @@ function startPersistentSession(config) {
|
|
|
5033
5114
|
if (existing && existing.status === "running") {
|
|
5034
5115
|
return existing;
|
|
5035
5116
|
}
|
|
5117
|
+
if (isolationMode(config.codeName) === "docker") {
|
|
5118
|
+
const readiness = config.isolationReadiness ?? dockerStartReadiness();
|
|
5119
|
+
if (!readiness.ok) throw new IsolationUnavailableError(config.codeName, readiness.reason);
|
|
5120
|
+
}
|
|
5036
5121
|
const restartCount = existing?.restartCount ?? 0;
|
|
5037
5122
|
if (existing && crashRespawnDeferred(existing, Date.now())) {
|
|
5038
5123
|
return existing;
|
|
@@ -6060,6 +6145,9 @@ function probeSessionLiveness(tmuxSession) {
|
|
|
6060
6145
|
}
|
|
6061
6146
|
return "alive";
|
|
6062
6147
|
}
|
|
6148
|
+
if (isolationMode(codeName) === "docker" && classifyNoContainerSession(tmuxSession) === "host_path") {
|
|
6149
|
+
return "host_path";
|
|
6150
|
+
}
|
|
6063
6151
|
return probeClaudeProcessInTmux(tmuxSession) === "alive" ? "alive" : "dead";
|
|
6064
6152
|
}
|
|
6065
6153
|
function dockerPgrepVerdict(stdout) {
|
|
@@ -6146,6 +6234,11 @@ function takeZombieDetection(codeName) {
|
|
|
6146
6234
|
if (record) pendingZombieDetections.delete(codeName);
|
|
6147
6235
|
return record ?? null;
|
|
6148
6236
|
}
|
|
6237
|
+
var neverDefer = () => false;
|
|
6238
|
+
var hostPathMigrationDeferred = neverDefer;
|
|
6239
|
+
function setHostPathMigrationDeferral(fn) {
|
|
6240
|
+
hostPathMigrationDeferred = fn ?? neverDefer;
|
|
6241
|
+
}
|
|
6149
6242
|
function isSessionHealthy(codeName) {
|
|
6150
6243
|
const tmuxSession = `agt-${codeName}`;
|
|
6151
6244
|
try {
|
|
@@ -6197,6 +6290,7 @@ function isSessionHealthy(codeName) {
|
|
|
6197
6290
|
zombieProbeCache.set(codeName, { at: Date.now(), liveness });
|
|
6198
6291
|
}
|
|
6199
6292
|
if (liveness === "host_path") {
|
|
6293
|
+
if (hostPathMigrationDeferred()) return true;
|
|
6200
6294
|
try {
|
|
6201
6295
|
execFileSync3("tmux", ["kill-session", "-t", tmuxSessionTarget(tmuxSession)], { stdio: "ignore" });
|
|
6202
6296
|
} catch {
|
|
@@ -6502,7 +6596,13 @@ export {
|
|
|
6502
6596
|
resolveOAuthCredAction,
|
|
6503
6597
|
resolveClaudeBinary,
|
|
6504
6598
|
isolationMode,
|
|
6599
|
+
DOCKER_READINESS_RETRY_MS,
|
|
6505
6600
|
dockerRuntimeReadiness,
|
|
6601
|
+
dockerStartReadinessAsync,
|
|
6602
|
+
dockerStartReadiness,
|
|
6603
|
+
setDockerProbeForTests,
|
|
6604
|
+
setDockerAsyncProbeForTests,
|
|
6605
|
+
readinessRefreshForTests,
|
|
6506
6606
|
resetDockerRuntimeReadinessForTests,
|
|
6507
6607
|
effectiveIsolationMode,
|
|
6508
6608
|
EGRESS_BASELINE_DOMAINS,
|
|
@@ -6551,6 +6651,7 @@ export {
|
|
|
6551
6651
|
readDirectChatSessionState,
|
|
6552
6652
|
writeDirectChatSessionState,
|
|
6553
6653
|
spawnBackoffMs,
|
|
6654
|
+
IsolationUnavailableError,
|
|
6554
6655
|
crashRespawnDeferred,
|
|
6555
6656
|
startPersistentSession,
|
|
6556
6657
|
TMUX_BOOTSTRAP_HOLD_CMD,
|
|
@@ -6578,6 +6679,7 @@ export {
|
|
|
6578
6679
|
launchStartMs,
|
|
6579
6680
|
takeUnexpectedExit,
|
|
6580
6681
|
takeZombieDetection,
|
|
6682
|
+
setHostPathMigrationDeferral,
|
|
6581
6683
|
isSessionHealthy,
|
|
6582
6684
|
resetRestartCount,
|
|
6583
6685
|
nextObservation,
|
|
@@ -6586,4 +6688,4 @@ export {
|
|
|
6586
6688
|
stopAllSessionsAndWait,
|
|
6587
6689
|
getProjectDir
|
|
6588
6690
|
};
|
|
6589
|
-
//# sourceMappingURL=chunk-
|
|
6691
|
+
//# sourceMappingURL=chunk-VSJUMNQ5.js.map
|