@integrity-labs/agt-cli 0.28.668 → 0.28.670
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-52V5BMBC.js → chunk-5GDKWIB3.js} +39 -26
- package/dist/chunk-5GDKWIB3.js.map +1 -0
- package/dist/{chunk-4GA4K2BF.js → chunk-HGVJVYKW.js} +33 -22
- package/dist/chunk-HGVJVYKW.js.map +1 -0
- package/dist/{chunk-EQK5Q7ZL.js → chunk-Z4O42VGJ.js} +9 -4
- package/dist/chunk-Z4O42VGJ.js.map +1 -0
- package/dist/{claude-pair-runtime-SXEBKHYM.js → claude-pair-runtime-W6KBVHK4.js} +2 -2
- package/dist/lib/manager-worker.js +13 -13
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/direct-chat-channel.js +31 -20
- package/dist/mcp/index.js +31 -20
- package/dist/mcp/origami.js +31 -20
- package/dist/mcp/slack-channel.js +31 -20
- package/dist/mcp/telegram-channel.js +31 -20
- package/dist/{persistent-session-3OCFA42T.js → persistent-session-RZH67PNC.js} +3 -3
- package/dist/{responsiveness-probe-ZEKOULXD.js → responsiveness-probe-NPNMNOFF.js} +3 -3
- package/dist/{session-auth-dead-3QN24ELV.js → session-auth-dead-CFAYSZ43.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-4GA4K2BF.js.map +0 -1
- package/dist/chunk-52V5BMBC.js.map +0 -1
- package/dist/chunk-EQK5Q7ZL.js.map +0 -1
- /package/dist/{claude-pair-runtime-SXEBKHYM.js.map → claude-pair-runtime-W6KBVHK4.js.map} +0 -0
- /package/dist/{persistent-session-3OCFA42T.js.map → persistent-session-RZH67PNC.js.map} +0 -0
- /package/dist/{responsiveness-probe-ZEKOULXD.js.map → responsiveness-probe-NPNMNOFF.js.map} +0 -0
- /package/dist/{session-auth-dead-3QN24ELV.js.map → session-auth-dead-CFAYSZ43.js.map} +0 -0
package/dist/bin/agt.js
CHANGED
|
@@ -40,10 +40,10 @@ import {
|
|
|
40
40
|
success,
|
|
41
41
|
table,
|
|
42
42
|
warn
|
|
43
|
-
} from "../chunk-
|
|
43
|
+
} from "../chunk-Z4O42VGJ.js";
|
|
44
44
|
import {
|
|
45
45
|
readDirectChatSessionState
|
|
46
|
-
} from "../chunk-
|
|
46
|
+
} from "../chunk-5GDKWIB3.js";
|
|
47
47
|
import {
|
|
48
48
|
AnchorSessionClient,
|
|
49
49
|
CHANNEL_REGISTRY,
|
|
@@ -73,7 +73,7 @@ import {
|
|
|
73
73
|
requiredMcpWildcard,
|
|
74
74
|
resolveChannels,
|
|
75
75
|
serializeManifestForSlackCli
|
|
76
|
-
} from "../chunk-
|
|
76
|
+
} from "../chunk-HGVJVYKW.js";
|
|
77
77
|
import "../chunk-XWVM4KPK.js";
|
|
78
78
|
|
|
79
79
|
// src/bin/agt.ts
|
|
@@ -4909,7 +4909,7 @@ import { execFileSync, execSync } from "child_process";
|
|
|
4909
4909
|
import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
|
|
4910
4910
|
import chalk18 from "chalk";
|
|
4911
4911
|
import ora16 from "ora";
|
|
4912
|
-
var cliVersion = true ? "0.28.
|
|
4912
|
+
var cliVersion = true ? "0.28.670" : "dev";
|
|
4913
4913
|
async function fetchLatestVersion() {
|
|
4914
4914
|
const host2 = getHost();
|
|
4915
4915
|
if (!host2) return null;
|
|
@@ -6089,7 +6089,7 @@ function handleError(err) {
|
|
|
6089
6089
|
}
|
|
6090
6090
|
|
|
6091
6091
|
// src/bin/agt.ts
|
|
6092
|
-
var cliVersion2 = true ? "0.28.
|
|
6092
|
+
var cliVersion2 = true ? "0.28.670" : "dev";
|
|
6093
6093
|
var program = new Command();
|
|
6094
6094
|
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");
|
|
6095
6095
|
program.hook("preAction", async (thisCommand, actionCommand) => {
|
|
@@ -16,14 +16,14 @@ import {
|
|
|
16
16
|
rotateDailySession,
|
|
17
17
|
sessionFileExists,
|
|
18
18
|
todayLocalIso
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-HGVJVYKW.js";
|
|
20
20
|
import {
|
|
21
21
|
reapOrphanChannelMcps
|
|
22
22
|
} from "./chunk-XWVM4KPK.js";
|
|
23
23
|
|
|
24
24
|
// src/lib/persistent-session.ts
|
|
25
25
|
import { spawn as spawn2, execSync as execSync2, execFileSync as execFileSync3 } from "child_process";
|
|
26
|
-
import { join as
|
|
26
|
+
import { join as join6, dirname as dirname4 } from "path";
|
|
27
27
|
import { homedir as homedir5, platform, userInfo as userInfo2 } from "os";
|
|
28
28
|
import { existsSync as existsSync5, readFileSync as readFileSync6, readdirSync as readdirSync2, writeFileSync as writeFileSync4, appendFileSync as appendFileSync2, mkdirSync as mkdirSync4, chmodSync as chmodSync3, copyFileSync, rmSync as rmSync3, lstatSync as lstatSync2, realpathSync as realpathSync2, renameSync, statSync } from "fs";
|
|
29
29
|
|
|
@@ -2388,6 +2388,13 @@ function probeClaudeProcessInTmux(tmuxSession) {
|
|
|
2388
2388
|
}
|
|
2389
2389
|
}
|
|
2390
2390
|
|
|
2391
|
+
// ../../packages/core/dist/provisioning/frameworks/claudecode/agent-tmpdir.js
|
|
2392
|
+
import { join as join5 } from "path";
|
|
2393
|
+
function agentTmpDirFor(agentDir2) {
|
|
2394
|
+
return join5(agentDir2, "scratch", "tmp");
|
|
2395
|
+
}
|
|
2396
|
+
var CLAUDE_CODE_TMPDIR_ENV = "CLAUDE_CODE_TMPDIR";
|
|
2397
|
+
|
|
2391
2398
|
// src/lib/claude-dialogs.ts
|
|
2392
2399
|
import { execFileSync as execFileSync2 } from "child_process";
|
|
2393
2400
|
function isLoginPickerVisible(screen) {
|
|
@@ -2872,7 +2879,7 @@ function syncClaudeCredsToRoot() {
|
|
|
2872
2879
|
if (platform() !== "linux") return true;
|
|
2873
2880
|
if (typeof process.getuid !== "function" || process.getuid() !== 0) return true;
|
|
2874
2881
|
for (const filename of [".credentials.json", "credentials.json"]) {
|
|
2875
|
-
if (existsSync5(
|
|
2882
|
+
if (existsSync5(join6("/root/.claude", filename))) return true;
|
|
2876
2883
|
}
|
|
2877
2884
|
let sourcePath = null;
|
|
2878
2885
|
try {
|
|
@@ -2880,7 +2887,7 @@ function syncClaudeCredsToRoot() {
|
|
|
2880
2887
|
outer: for (const entry of entries) {
|
|
2881
2888
|
if (!entry.isDirectory()) continue;
|
|
2882
2889
|
for (const filename of [".credentials.json", "credentials.json"]) {
|
|
2883
|
-
const candidate =
|
|
2890
|
+
const candidate = join6("/home", entry.name, ".claude", filename);
|
|
2884
2891
|
if (existsSync5(candidate)) {
|
|
2885
2892
|
sourcePath = candidate;
|
|
2886
2893
|
break outer;
|
|
@@ -2892,7 +2899,7 @@ function syncClaudeCredsToRoot() {
|
|
|
2892
2899
|
if (!sourcePath) return false;
|
|
2893
2900
|
const targetDir = "/root/.claude";
|
|
2894
2901
|
const sourceFilename = sourcePath.endsWith("credentials.json") && !sourcePath.endsWith(".credentials.json") ? "credentials.json" : ".credentials.json";
|
|
2895
|
-
const targetPath =
|
|
2902
|
+
const targetPath = join6(targetDir, sourceFilename);
|
|
2896
2903
|
try {
|
|
2897
2904
|
if (!existsSync5(targetDir)) mkdirSync4(targetDir, { recursive: true, mode: 448 });
|
|
2898
2905
|
copyFileSync(sourcePath, targetPath);
|
|
@@ -2972,7 +2979,7 @@ function buildEgressAllowlist(toolsFrontmatter) {
|
|
|
2972
2979
|
}
|
|
2973
2980
|
function egressAllowlistHostPath(codeName, homeDir) {
|
|
2974
2981
|
const home = homeDir ?? (process.env.HOME?.trim() || homedir5());
|
|
2975
|
-
return
|
|
2982
|
+
return join6(home, ".augmented", "_egress", `${agentRuntimeKey(codeName, home)}.txt`);
|
|
2976
2983
|
}
|
|
2977
2984
|
function writeEgressAllowlist(codeName, domains, homeDir) {
|
|
2978
2985
|
const p = egressAllowlistHostPath(codeName, homeDir);
|
|
@@ -3013,11 +3020,11 @@ function restartEgressSidecar(codeName) {
|
|
|
3013
3020
|
function buildDockerRunCommand(args) {
|
|
3014
3021
|
const { codeName, agentId, wrapperPath, projectDir, homeDir, runId, passApiKey, passOpenRouter, egress, forwardSlackReplyBinding, forwardBlockTurnEndAllMarkers, forwardKanbanWaiting, forwardNotifyDispatch, forwardTurnFailureNotice } = args;
|
|
3015
3022
|
const q = (s) => `'${s.replace(/'/g, `'\\''`)}'`;
|
|
3016
|
-
const agentDir2 =
|
|
3017
|
-
const agentIdDir =
|
|
3018
|
-
const mcpDir =
|
|
3019
|
-
const claudeHome =
|
|
3020
|
-
const claudeJson =
|
|
3023
|
+
const agentDir2 = join6(homeDir, ".augmented", codeName);
|
|
3024
|
+
const agentIdDir = join6(homeDir, ".augmented", agentId);
|
|
3025
|
+
const mcpDir = join6(homeDir, ".augmented", "_mcp");
|
|
3026
|
+
const claudeHome = join6(homeDir, ".claude");
|
|
3027
|
+
const claudeJson = join6(homeDir, ".claude.json");
|
|
3021
3028
|
const mounts = [
|
|
3022
3029
|
`-v ${q(`${agentDir2}:${agentDir2}`)}`,
|
|
3023
3030
|
`-v ${q(`${agentIdDir}:${agentIdDir}`)}`,
|
|
@@ -3030,7 +3037,8 @@ function buildDockerRunCommand(args) {
|
|
|
3030
3037
|
const cpus = process.env.AGT_ISOLATION_CPUS || "1.0";
|
|
3031
3038
|
const pids = process.env.AGT_ISOLATION_PIDS || "512";
|
|
3032
3039
|
const envArgs = [`-e ${q(`HOME=${homeDir}`)}`];
|
|
3033
|
-
envArgs.push(`-e ${q(`npm_config_cache=${
|
|
3040
|
+
envArgs.push(`-e ${q(`npm_config_cache=${join6(agentDir2, ".npm-cache")}`)}`);
|
|
3041
|
+
envArgs.push(`-e ${q(`${CLAUDE_CODE_TMPDIR_ENV}=${agentTmpDirFor(agentDir2)}`)}`);
|
|
3034
3042
|
if (passApiKey) envArgs.push("-e ANTHROPIC_API_KEY");
|
|
3035
3043
|
if (passOpenRouter) {
|
|
3036
3044
|
envArgs.push("-e ANTHROPIC_BASE_URL");
|
|
@@ -3124,8 +3132,8 @@ function buildDockerRunCommand(args) {
|
|
|
3124
3132
|
}
|
|
3125
3133
|
function writePersistentClaudeWrapper(args) {
|
|
3126
3134
|
const { projectDir, claudeBin, initPrompt, claudeArgsJoined } = args;
|
|
3127
|
-
const envIntegrationsPath =
|
|
3128
|
-
const wrapperPath =
|
|
3135
|
+
const envIntegrationsPath = join6(projectDir, ".env.integrations");
|
|
3136
|
+
const wrapperPath = join6(projectDir, ".claude", "persistent-claude.sh");
|
|
3129
3137
|
const wrapperLines = [
|
|
3130
3138
|
"#!/usr/bin/env bash",
|
|
3131
3139
|
"set -e",
|
|
@@ -3140,7 +3148,7 @@ function writePersistentClaudeWrapper(args) {
|
|
|
3140
3148
|
"set +a"
|
|
3141
3149
|
);
|
|
3142
3150
|
}
|
|
3143
|
-
const brokerBinDir =
|
|
3151
|
+
const brokerBinDir = join6(projectDir, ".claude", "agt-bin");
|
|
3144
3152
|
if (existsSync5(brokerBinDir)) {
|
|
3145
3153
|
wrapperLines.push(`export PATH=${JSON.stringify(brokerBinDir)}:"$PATH"`);
|
|
3146
3154
|
}
|
|
@@ -3148,7 +3156,7 @@ function writePersistentClaudeWrapper(args) {
|
|
|
3148
3156
|
wrapperLines.push(
|
|
3149
3157
|
`exec ${JSON.stringify(claudeBin)} ${initPromptArg}${claudeArgsJoined}`
|
|
3150
3158
|
);
|
|
3151
|
-
mkdirSync4(
|
|
3159
|
+
mkdirSync4(join6(projectDir, ".claude"), { recursive: true });
|
|
3152
3160
|
writeFileSync4(wrapperPath, wrapperLines.join("\n") + "\n", { mode: 448 });
|
|
3153
3161
|
chmodSync3(wrapperPath, 448);
|
|
3154
3162
|
return wrapperPath;
|
|
@@ -3208,10 +3216,10 @@ function findForeignAgentIdsInMcpConfig(args) {
|
|
|
3208
3216
|
return out;
|
|
3209
3217
|
}
|
|
3210
3218
|
var sessions2 = /* @__PURE__ */ new Map();
|
|
3211
|
-
var PANE_LOG_DIR =
|
|
3219
|
+
var PANE_LOG_DIR = join6(homedir5(), ".augmented");
|
|
3212
3220
|
var PANE_TAIL_LINES = 20;
|
|
3213
3221
|
function paneLogPath(codeName) {
|
|
3214
|
-
return
|
|
3222
|
+
return join6(PANE_LOG_DIR, codeName, "pane.log");
|
|
3215
3223
|
}
|
|
3216
3224
|
function setupPaneLog2(tmuxSession, codeName, log2) {
|
|
3217
3225
|
const logPath = paneLogPath(codeName);
|
|
@@ -3239,10 +3247,10 @@ function rotatePaneLogForDayRollover(codeName, log2, agentTimezone, now = /* @__
|
|
|
3239
3247
|
if (statSync(logPath).size === 0) return null;
|
|
3240
3248
|
const stamp = todayLocalIso(now, agentTimezone ?? void 0).replace(/-/g, "");
|
|
3241
3249
|
const dir = dirname4(logPath);
|
|
3242
|
-
let target =
|
|
3250
|
+
let target = join6(dir, `pane.log-${stamp}`);
|
|
3243
3251
|
if (existsSync5(target)) {
|
|
3244
3252
|
const hhmmss = now.toISOString().slice(11, 19).replace(/:/g, "");
|
|
3245
|
-
target =
|
|
3253
|
+
target = join6(dir, `pane.log-${stamp}-${hhmmss}`);
|
|
3246
3254
|
}
|
|
3247
3255
|
renameSync(logPath, target);
|
|
3248
3256
|
writeFileSync4(logPath, "", "utf-8");
|
|
@@ -3329,7 +3337,7 @@ function resolveSessionSpawnDecision(args) {
|
|
|
3329
3337
|
};
|
|
3330
3338
|
}
|
|
3331
3339
|
function directChatSessionStatePath(agentId) {
|
|
3332
|
-
return
|
|
3340
|
+
return join6(homedir5(), ".augmented", agentId, "direct-chat-session.json");
|
|
3333
3341
|
}
|
|
3334
3342
|
function readDirectChatSessionState(agentId) {
|
|
3335
3343
|
try {
|
|
@@ -3401,9 +3409,9 @@ function spawnSession(config, session) {
|
|
|
3401
3409
|
log2(`[persistent-session] No Claude Code credentials found under /root/.claude or /home/*. Pair via browser from the host page, or run 'claude /login' on the host.`);
|
|
3402
3410
|
}
|
|
3403
3411
|
} else {
|
|
3404
|
-
const claudeDir =
|
|
3412
|
+
const claudeDir = join6(homedir5(), ".claude");
|
|
3405
3413
|
for (const filename of [".credentials.json", "credentials.json"]) {
|
|
3406
|
-
const p =
|
|
3414
|
+
const p = join6(claudeDir, filename);
|
|
3407
3415
|
if (existsSync5(p)) {
|
|
3408
3416
|
try {
|
|
3409
3417
|
rmSync3(p, { force: true });
|
|
@@ -3476,6 +3484,10 @@ function spawnSession(config, session) {
|
|
|
3476
3484
|
});
|
|
3477
3485
|
const tmuxSessionEnvArgs = [];
|
|
3478
3486
|
tmuxSessionEnvArgs.push("-e", `AGT_AGENT_ID=${config.agentId}`);
|
|
3487
|
+
tmuxSessionEnvArgs.push(
|
|
3488
|
+
"-e",
|
|
3489
|
+
`${CLAUDE_CODE_TMPDIR_ENV}=${agentTmpDirFor(dirname4(config.projectDir))}`
|
|
3490
|
+
);
|
|
3479
3491
|
if (config.perAgentApiKey) {
|
|
3480
3492
|
tmuxSessionEnvArgs.push("-e", `AGT_API_KEY=${config.perAgentApiKey}`);
|
|
3481
3493
|
}
|
|
@@ -3569,7 +3581,7 @@ function spawnSession(config, session) {
|
|
|
3569
3581
|
} : { ...tmuxEnv, ...apiKeyEnv, ...openRouterEnv };
|
|
3570
3582
|
for (const f of probeMcpEnvSubstitution({
|
|
3571
3583
|
mcpConfigPath,
|
|
3572
|
-
envIntegrationsPath:
|
|
3584
|
+
envIntegrationsPath: join6(projectDir, ".env.integrations"),
|
|
3573
3585
|
baseEnv: probeBaseEnv
|
|
3574
3586
|
})) {
|
|
3575
3587
|
log2(`[persistent-session] ${formatMissingVar(f)} agent=${codeName}`);
|
|
@@ -4244,10 +4256,11 @@ function resolveRealAgentPath(codeNamePath) {
|
|
|
4244
4256
|
return codeNamePath;
|
|
4245
4257
|
}
|
|
4246
4258
|
function getProjectDir(codeName) {
|
|
4247
|
-
return
|
|
4259
|
+
return join6(resolveRealAgentPath(join6(homedir5(), ".augmented", codeName)), "project");
|
|
4248
4260
|
}
|
|
4249
4261
|
|
|
4250
4262
|
export {
|
|
4263
|
+
agentTmpDirFor,
|
|
4251
4264
|
buildRemoteMcpEntry,
|
|
4252
4265
|
buildLiveHeaderRemoteMcpProxyEntry,
|
|
4253
4266
|
buildOAuthRemoteMcpProxyEntry,
|
|
@@ -4322,4 +4335,4 @@ export {
|
|
|
4322
4335
|
stopAllSessionsAndWait,
|
|
4323
4336
|
getProjectDir
|
|
4324
4337
|
};
|
|
4325
|
-
//# sourceMappingURL=chunk-
|
|
4338
|
+
//# sourceMappingURL=chunk-5GDKWIB3.js.map
|