@integrity-labs/agt-cli 0.28.1068 → 0.28.1070
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/bin/agt.js +5 -5
- package/dist/{chunk-65F44JJJ.js → chunk-3KVS22KX.js} +101 -11
- package/dist/chunk-3KVS22KX.js.map +1 -0
- package/dist/{chunk-CFJONCHN.js → chunk-64DXAOQQ.js} +33 -1
- package/dist/{chunk-CFJONCHN.js.map → chunk-64DXAOQQ.js.map} +1 -1
- package/dist/{chunk-WLB2E3PO.js → chunk-XCGOVUGI.js} +8 -5
- package/dist/{chunk-WLB2E3PO.js.map → chunk-XCGOVUGI.js.map} +1 -1
- package/dist/{claude-pair-runtime-4BISLPPZ.js → claude-pair-runtime-B6DFCLT3.js} +2 -2
- package/dist/lib/manager-worker.js +243 -56
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/direct-chat-channel.js +32 -0
- package/dist/mcp/index.js +32 -0
- package/dist/mcp/origami.js +32 -0
- package/dist/mcp/slack-channel.js +32 -0
- package/dist/mcp/telegram-channel.js +32 -0
- package/dist/{pane-fatal-error-EL336LRO.js → pane-fatal-error-JORQ5OPV.js} +58 -16
- package/dist/pane-fatal-error-JORQ5OPV.js.map +1 -0
- package/dist/{persistent-session-VRAVB743.js → persistent-session-75DOT6JV.js} +9 -3
- package/dist/{responsiveness-probe-QTYKXBH7.js → responsiveness-probe-YFUIBZZV.js} +3 -3
- package/dist/{session-auth-dead-JJPNV3YQ.js → session-auth-dead-JN4EBUCN.js} +2 -2
- package/dist/transcript-mount-health-OHE6IVJV.js +79 -0
- package/dist/transcript-mount-health-OHE6IVJV.js.map +1 -0
- package/package.json +1 -1
- package/dist/chunk-65F44JJJ.js.map +0 -1
- package/dist/pane-fatal-error-EL336LRO.js.map +0 -1
- /package/dist/{claude-pair-runtime-4BISLPPZ.js.map → claude-pair-runtime-B6DFCLT3.js.map} +0 -0
- /package/dist/{persistent-session-VRAVB743.js.map → persistent-session-75DOT6JV.js.map} +0 -0
- /package/dist/{responsiveness-probe-QTYKXBH7.js.map → responsiveness-probe-YFUIBZZV.js.map} +0 -0
- /package/dist/{session-auth-dead-JJPNV3YQ.js.map → session-auth-dead-JN4EBUCN.js.map} +0 -0
package/dist/bin/agt.js
CHANGED
|
@@ -40,12 +40,12 @@ import {
|
|
|
40
40
|
success,
|
|
41
41
|
table,
|
|
42
42
|
warn
|
|
43
|
-
} from "../chunk-
|
|
43
|
+
} from "../chunk-XCGOVUGI.js";
|
|
44
44
|
import {
|
|
45
45
|
getProjectDir,
|
|
46
46
|
isSessionResumeDisabled,
|
|
47
47
|
readDirectChatSessionState
|
|
48
|
-
} from "../chunk-
|
|
48
|
+
} from "../chunk-3KVS22KX.js";
|
|
49
49
|
import {
|
|
50
50
|
AnchorSessionClient,
|
|
51
51
|
CHANNEL_REGISTRY,
|
|
@@ -79,7 +79,7 @@ import {
|
|
|
79
79
|
serializeManifestForSlackCli,
|
|
80
80
|
sessionFileExists,
|
|
81
81
|
sessionTranscriptDir
|
|
82
|
-
} from "../chunk-
|
|
82
|
+
} from "../chunk-64DXAOQQ.js";
|
|
83
83
|
import "../chunk-OCMJ5E6J.js";
|
|
84
84
|
import "../chunk-XWVM4KPK.js";
|
|
85
85
|
import "../chunk-EL5MWGGH.js";
|
|
@@ -5474,7 +5474,7 @@ import { execFileSync, execSync } from "child_process";
|
|
|
5474
5474
|
import { existsSync as existsSync11, realpathSync as realpathSync2 } from "fs";
|
|
5475
5475
|
import chalk18 from "chalk";
|
|
5476
5476
|
import ora16 from "ora";
|
|
5477
|
-
var cliVersion = true ? "0.28.
|
|
5477
|
+
var cliVersion = true ? "0.28.1070" : "dev";
|
|
5478
5478
|
async function fetchLatestVersion() {
|
|
5479
5479
|
const host2 = getHost();
|
|
5480
5480
|
if (!host2) return null;
|
|
@@ -6734,7 +6734,7 @@ function handleError(err) {
|
|
|
6734
6734
|
}
|
|
6735
6735
|
|
|
6736
6736
|
// src/bin/agt.ts
|
|
6737
|
-
var cliVersion2 = true ? "0.28.
|
|
6737
|
+
var cliVersion2 = true ? "0.28.1070" : "dev";
|
|
6738
6738
|
var program = new Command();
|
|
6739
6739
|
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");
|
|
6740
6740
|
program.hook("preAction", async (thisCommand, actionCommand) => {
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
rotateDailySession,
|
|
25
25
|
sessionFileExists,
|
|
26
26
|
todayLocalIso
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-64DXAOQQ.js";
|
|
28
28
|
import {
|
|
29
29
|
classifyUnanswerablePane,
|
|
30
30
|
findUsageLimitResetHint,
|
|
@@ -287,9 +287,9 @@ function formatBytes(bytes) {
|
|
|
287
287
|
}
|
|
288
288
|
|
|
289
289
|
// src/lib/persistent-session.ts
|
|
290
|
-
import { join as join7, dirname as dirname5 } from "path";
|
|
290
|
+
import { join as join7, dirname as dirname5, basename as basename2 } from "path";
|
|
291
291
|
import { homedir as homedir5, platform, userInfo as userInfo2 } from "os";
|
|
292
|
-
import { existsSync as existsSync6, readFileSync as readFileSync7, readdirSync as readdirSync2, writeFileSync as writeFileSync5, appendFileSync as appendFileSync2, mkdirSync as mkdirSync6, chmodSync as chmodSync3, copyFileSync, rmSync as rmSync3, lstatSync as lstatSync3, realpathSync as realpathSync2, renameSync as renameSync3, statSync } from "fs";
|
|
292
|
+
import { existsSync as existsSync6, readFileSync as readFileSync7, readdirSync as readdirSync2, writeFileSync as writeFileSync5, appendFileSync as appendFileSync2, mkdirSync as mkdirSync6, chmodSync as chmodSync3, copyFileSync, rmSync as rmSync3, lstatSync as lstatSync3, realpathSync as realpathSync2, renameSync as renameSync3, statSync, openSync as openSync2, closeSync as closeSync2, fstatSync, futimesSync, constants as fsConstants } from "fs";
|
|
293
293
|
|
|
294
294
|
// src/lib/mcp-sanitize.ts
|
|
295
295
|
import { readFileSync, writeFileSync } from "fs";
|
|
@@ -4185,12 +4185,97 @@ var CLAUDE_HOST_WIDE = [
|
|
|
4185
4185
|
function claudeStateDirFor(homeDir, agentId) {
|
|
4186
4186
|
return join7(homeDir, ".augmented", agentId, ".claude-state");
|
|
4187
4187
|
}
|
|
4188
|
-
function ensureClaudeStateLayout(args) {
|
|
4188
|
+
function ensureClaudeStateLayout(args, log2) {
|
|
4189
4189
|
const stateDir = claudeStateDirFor(args.homeDir, args.agentId);
|
|
4190
4190
|
for (const dir of CLAUDE_PER_AGENT_DIRS) mkdirSync6(join7(stateDir, dir), { recursive: true });
|
|
4191
|
+
const result = ensureTranscriptBindSources(args);
|
|
4192
|
+
for (const r of result.refused) {
|
|
4193
|
+
(log2 ?? ((m) => console.warn(m)))(
|
|
4194
|
+
`[transcript-mount] REFUSED ${r.path}: ${r.reason}${r.detail ? ` (${r.detail})` : ""} - sentinel not written; a transcript bind source the agent can write must not be followed (ENG-11277)`
|
|
4195
|
+
);
|
|
4196
|
+
}
|
|
4197
|
+
return result;
|
|
4198
|
+
}
|
|
4199
|
+
function ensureTranscriptBindSources(args) {
|
|
4200
|
+
const { projects, mask, own } = transcriptBindSourcesFor(args);
|
|
4201
|
+
const refused = [];
|
|
4202
|
+
try {
|
|
4203
|
+
mkdirSync6(projects, { recursive: true });
|
|
4204
|
+
} catch (err) {
|
|
4205
|
+
return { refused: [{ path: projects, reason: "error", detail: err.code ?? "mkdir failed" }] };
|
|
4206
|
+
}
|
|
4207
|
+
const maskName = basename2(mask);
|
|
4208
|
+
const slug = basename2(own);
|
|
4209
|
+
for (const chain of [[maskName], [maskName, slug], [slug]]) {
|
|
4210
|
+
const dir = ensureDirChainNoFollow(projects, chain);
|
|
4211
|
+
if ("reason" in dir) {
|
|
4212
|
+
if (!refused.some((r) => r.path === dir.path)) refused.push(dir);
|
|
4213
|
+
continue;
|
|
4214
|
+
}
|
|
4215
|
+
const sentinel = touchSentinel(join7(dir.path, TRANSCRIPT_BIND_SENTINEL));
|
|
4216
|
+
if (sentinel) refused.push(sentinel);
|
|
4217
|
+
}
|
|
4218
|
+
return { refused };
|
|
4219
|
+
}
|
|
4220
|
+
function ensureDirChainNoFollow(root, components) {
|
|
4221
|
+
let path = root;
|
|
4222
|
+
for (const component of components) {
|
|
4223
|
+
path = join7(path, component);
|
|
4224
|
+
let st = lstatOrNull(path);
|
|
4225
|
+
if (st === null) {
|
|
4226
|
+
try {
|
|
4227
|
+
mkdirSync6(path);
|
|
4228
|
+
} catch (err) {
|
|
4229
|
+
if (err.code !== "EEXIST") {
|
|
4230
|
+
return { path, reason: "error", detail: err.code ?? "mkdir failed" };
|
|
4231
|
+
}
|
|
4232
|
+
}
|
|
4233
|
+
st = lstatOrNull(path);
|
|
4234
|
+
if (st === null) return { path, reason: "error", detail: "vanished after mkdir" };
|
|
4235
|
+
}
|
|
4236
|
+
if (st.isSymbolicLink()) return { path, reason: "symlink" };
|
|
4237
|
+
if (!st.isDirectory()) return { path, reason: "not-a-directory" };
|
|
4238
|
+
}
|
|
4239
|
+
return { path };
|
|
4240
|
+
}
|
|
4241
|
+
function lstatOrNull(path) {
|
|
4242
|
+
try {
|
|
4243
|
+
return lstatSync3(path);
|
|
4244
|
+
} catch {
|
|
4245
|
+
return null;
|
|
4246
|
+
}
|
|
4247
|
+
}
|
|
4248
|
+
var TRANSCRIPT_BIND_SENTINEL = ".agt-bind-source";
|
|
4249
|
+
function transcriptBindSourcesFor(args) {
|
|
4191
4250
|
const projects = join7(args.homeDir, ".claude", "projects");
|
|
4192
|
-
|
|
4193
|
-
|
|
4251
|
+
const slug = encodeClaudeProjectPath(args.projectDir);
|
|
4252
|
+
const mask = join7(projects, `${TRANSCRIPT_MASK_DIR_PREFIX}${args.agentId}`);
|
|
4253
|
+
return { projects, mask, mountpoint: join7(mask, slug), own: join7(projects, slug) };
|
|
4254
|
+
}
|
|
4255
|
+
function touchSentinel(path) {
|
|
4256
|
+
let fd;
|
|
4257
|
+
try {
|
|
4258
|
+
fd = openSync2(
|
|
4259
|
+
path,
|
|
4260
|
+
fsConstants.O_WRONLY | fsConstants.O_CREAT | fsConstants.O_NOFOLLOW | fsConstants.O_NONBLOCK,
|
|
4261
|
+
420
|
|
4262
|
+
);
|
|
4263
|
+
} catch (err) {
|
|
4264
|
+
const code = err.code;
|
|
4265
|
+
if (code === "ELOOP") return { path, reason: "symlink" };
|
|
4266
|
+
if (code === "EISDIR" || code === "ENXIO") return { path, reason: "not-a-regular-file", detail: code };
|
|
4267
|
+
return { path, reason: "error", detail: code ?? "open failed" };
|
|
4268
|
+
}
|
|
4269
|
+
try {
|
|
4270
|
+
if (!fstatSync(fd).isFile()) return { path, reason: "not-a-regular-file" };
|
|
4271
|
+
const now = /* @__PURE__ */ new Date();
|
|
4272
|
+
futimesSync(fd, now, now);
|
|
4273
|
+
return null;
|
|
4274
|
+
} catch (err) {
|
|
4275
|
+
return { path, reason: "error", detail: err.code ?? "futimes failed" };
|
|
4276
|
+
} finally {
|
|
4277
|
+
closeSync2(fd);
|
|
4278
|
+
}
|
|
4194
4279
|
}
|
|
4195
4280
|
function legacyClaudeJsonIsFile(path) {
|
|
4196
4281
|
try {
|
|
@@ -4217,9 +4302,11 @@ function buildDockerRunCommand(args) {
|
|
|
4217
4302
|
const configDirIsolationSafe = configDirIsIsolationSafe(homeDir);
|
|
4218
4303
|
const useConfigDir = (args.claudeConfigDirReady ?? claudeConfigDirIsReady(homeDir)) && configDirIsolationSafe;
|
|
4219
4304
|
const legacyExists = args.legacyClaudeJsonExists ?? legacyClaudeJsonIsFile(legacyClaudeJson);
|
|
4220
|
-
const
|
|
4221
|
-
|
|
4222
|
-
|
|
4305
|
+
const {
|
|
4306
|
+
projects: claudeProjects,
|
|
4307
|
+
mask: transcriptMask,
|
|
4308
|
+
own: ownTranscripts
|
|
4309
|
+
} = transcriptBindSourcesFor({ homeDir, agentId, projectDir });
|
|
4223
4310
|
const managedSettingsDir = CLAUDE_MANAGED_SETTINGS_DIR;
|
|
4224
4311
|
const mounts = [
|
|
4225
4312
|
`-v ${q(`${agentDir2}:${agentDir2}`)}`,
|
|
@@ -5020,7 +5107,7 @@ function spawnSession(config, session) {
|
|
|
5020
5107
|
log2(`[persistent-session] egress allowlist for '${codeName}': ${allowlist.length} domains (deny-by-default)`);
|
|
5021
5108
|
}
|
|
5022
5109
|
if (effectiveMode === "docker") {
|
|
5023
|
-
ensureClaudeStateLayout({ homeDir: sessionHomeDir, agentId: config.agentId, projectDir });
|
|
5110
|
+
ensureClaudeStateLayout({ homeDir: sessionHomeDir, agentId: config.agentId, projectDir }, log2);
|
|
5024
5111
|
}
|
|
5025
5112
|
const claudeCmd = effectiveMode === "docker" ? buildDockerRunCommand({
|
|
5026
5113
|
// ENG-10869: seed-then-decide, in that order and in one place. A
|
|
@@ -5977,6 +6064,9 @@ export {
|
|
|
5977
6064
|
CLAUDE_HOST_WIDE,
|
|
5978
6065
|
claudeStateDirFor,
|
|
5979
6066
|
ensureClaudeStateLayout,
|
|
6067
|
+
ensureTranscriptBindSources,
|
|
6068
|
+
TRANSCRIPT_BIND_SENTINEL,
|
|
6069
|
+
transcriptBindSourcesFor,
|
|
5980
6070
|
configDirIsIsolationSafe,
|
|
5981
6071
|
buildDockerRunCommand,
|
|
5982
6072
|
writePersistentClaudeWrapper,
|
|
@@ -6023,4 +6113,4 @@ export {
|
|
|
6023
6113
|
stopAllSessionsAndWait,
|
|
6024
6114
|
getProjectDir
|
|
6025
6115
|
};
|
|
6026
|
-
//# sourceMappingURL=chunk-
|
|
6116
|
+
//# sourceMappingURL=chunk-3KVS22KX.js.map
|