@integrity-labs/agt-cli 0.28.1263 → 0.28.1265
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-SJR7V5JU.js → api-client-LPV5RUCO.js} +3 -3
- package/dist/bin/agt.js +7 -7
- package/dist/{chunk-CEJNJ6NF.js → chunk-6ENTMJ5T.js} +78 -24
- package/dist/chunk-6ENTMJ5T.js.map +1 -0
- package/dist/{chunk-5BXIXSSH.js → chunk-BMO6GCK2.js} +2 -2
- package/dist/{chunk-M6EWNC4M.js → chunk-DRP3J4CV.js} +5 -5
- package/dist/{chunk-KJ5OCCSJ.js → chunk-W2GHPRPZ.js} +2 -2
- package/dist/{chunk-KJ5OCCSJ.js.map → chunk-W2GHPRPZ.js.map} +1 -1
- package/dist/{chunk-HJWOXFJM.js → chunk-X2FBQPNR.js} +2 -2
- package/dist/{chunk-I4ZCWVZZ.js → chunk-ZIAXGM6I.js} +3 -3
- package/dist/{claude-code-updater-JQLNRK25.js → claude-code-updater-XISTQTZX.js} +3 -3
- package/dist/{claude-pair-runtime-BJ3EAWEJ.js → claude-pair-runtime-2EOLNZEY.js} +3 -3
- package/dist/lib/manager-worker.js +111 -24
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/direct-chat-channel.js +1 -1
- package/dist/mcp/index.js +1 -1
- package/dist/mcp/origami.js +1 -1
- package/dist/mcp/slack-channel.js +1 -1
- package/dist/mcp/telegram-channel.js +1 -1
- package/dist/mcp/xero.js +727 -169
- package/dist/{persistent-session-YNHYNCNA.js → persistent-session-C7UKT4EE.js} +14 -4
- package/dist/{responsiveness-probe-57RV3U2H.js → responsiveness-probe-NV3LXAWL.js} +4 -4
- package/dist/{session-auth-dead-A3TO2N63.js → session-auth-dead-U62KZ342.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-CEJNJ6NF.js.map +0 -1
- /package/dist/{api-client-SJR7V5JU.js.map → api-client-LPV5RUCO.js.map} +0 -0
- /package/dist/{chunk-5BXIXSSH.js.map → chunk-BMO6GCK2.js.map} +0 -0
- /package/dist/{chunk-M6EWNC4M.js.map → chunk-DRP3J4CV.js.map} +0 -0
- /package/dist/{chunk-HJWOXFJM.js.map → chunk-X2FBQPNR.js.map} +0 -0
- /package/dist/{chunk-I4ZCWVZZ.js.map → chunk-ZIAXGM6I.js.map} +0 -0
- /package/dist/{claude-code-updater-JQLNRK25.js.map → claude-code-updater-XISTQTZX.js.map} +0 -0
- /package/dist/{claude-pair-runtime-BJ3EAWEJ.js.map → claude-pair-runtime-2EOLNZEY.js.map} +0 -0
- /package/dist/{persistent-session-YNHYNCNA.js.map → persistent-session-C7UKT4EE.js.map} +0 -0
- /package/dist/{responsiveness-probe-57RV3U2H.js.map → responsiveness-probe-NV3LXAWL.js.map} +0 -0
- /package/dist/{session-auth-dead-A3TO2N63.js.map → session-auth-dead-U62KZ342.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-ZIAXGM6I.js";
|
|
19
|
+
import "./chunk-W2GHPRPZ.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-LPV5RUCO.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-DRP3J4CV.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-ZIAXGM6I.js";
|
|
46
46
|
import {
|
|
47
47
|
getProjectDir,
|
|
48
48
|
isSessionResumeDisabled,
|
|
49
49
|
readDirectChatSessionState
|
|
50
|
-
} from "../chunk-
|
|
50
|
+
} from "../chunk-6ENTMJ5T.js";
|
|
51
51
|
import {
|
|
52
52
|
markDailySessionSpawn,
|
|
53
53
|
sessionFileExists,
|
|
54
54
|
sessionTranscriptDir
|
|
55
|
-
} from "../chunk-
|
|
55
|
+
} from "../chunk-X2FBQPNR.js";
|
|
56
56
|
import "../chunk-HYQ7VOC3.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-W2GHPRPZ.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.1265" : "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.1265" : "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) => {
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
rotateDailySession,
|
|
5
5
|
sessionFileExists,
|
|
6
6
|
todayLocalIso
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-X2FBQPNR.js";
|
|
8
8
|
import {
|
|
9
9
|
classifyUnanswerablePane,
|
|
10
10
|
customApiKeyDialogKeys,
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
remoteMcpConnectionEnvInfix,
|
|
53
53
|
remoteMcpConnectionLabel,
|
|
54
54
|
remoteMcpConnectionScopedEnvVar
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-W2GHPRPZ.js";
|
|
56
56
|
import {
|
|
57
57
|
CLAUDE_CONFIG_DIR_ENV,
|
|
58
58
|
approveApiKeyInClaudeConfig,
|
|
@@ -4784,6 +4784,33 @@ function findForeignAgentIdsInMcpConfig(args) {
|
|
|
4784
4784
|
return out;
|
|
4785
4785
|
}
|
|
4786
4786
|
var sessions2 = /* @__PURE__ */ new Map();
|
|
4787
|
+
var SPAWN_SUPERSEDED = "superseded";
|
|
4788
|
+
var spawnGenerationCounter = 0;
|
|
4789
|
+
function beginSpawnPending(record) {
|
|
4790
|
+
record.spawnPending = true;
|
|
4791
|
+
return () => {
|
|
4792
|
+
record.spawnPending = false;
|
|
4793
|
+
};
|
|
4794
|
+
}
|
|
4795
|
+
function nextSpawnGeneration(record) {
|
|
4796
|
+
const generation = ++spawnGenerationCounter;
|
|
4797
|
+
record.spawnGeneration = generation;
|
|
4798
|
+
return generation;
|
|
4799
|
+
}
|
|
4800
|
+
function spawnStillCurrent(current, record, generation) {
|
|
4801
|
+
return current === record && record.spawnGeneration === generation;
|
|
4802
|
+
}
|
|
4803
|
+
function supersedePendingSpawn(codeName, log2) {
|
|
4804
|
+
const record = sessions2.get(codeName);
|
|
4805
|
+
if (!record || record.spawnPending !== true) return false;
|
|
4806
|
+
const was = record.spawnGeneration;
|
|
4807
|
+
const now = nextSpawnGeneration(record);
|
|
4808
|
+
record.spawnPending = false;
|
|
4809
|
+
log2(
|
|
4810
|
+
`[persistent-session] spawn for '${codeName}' superseded at the landing cap (generation ${was ?? "none"} -> ${now}): if it settles late it will not start [ENG-12126]`
|
|
4811
|
+
);
|
|
4812
|
+
return true;
|
|
4813
|
+
}
|
|
4787
4814
|
var PANE_LOG_DIR = join7(homedir5(), ".augmented");
|
|
4788
4815
|
var PANE_TAIL_LINES = 20;
|
|
4789
4816
|
function paneLogPath(codeName) {
|
|
@@ -5058,6 +5085,11 @@ function runTmuxSpawnPlan(opts) {
|
|
|
5058
5085
|
if (settled) return;
|
|
5059
5086
|
settled = true;
|
|
5060
5087
|
if (deadline) clearTimeout(deadline);
|
|
5088
|
+
if (failure === null && opts.stillCurrent && !opts.stillCurrent()) {
|
|
5089
|
+
runCleanup();
|
|
5090
|
+
opts.onSpawnFailed(SPAWN_SUPERSEDED);
|
|
5091
|
+
return;
|
|
5092
|
+
}
|
|
5061
5093
|
if (failure === null) spawnRealSession();
|
|
5062
5094
|
else opts.onSpawnFailed(failure);
|
|
5063
5095
|
};
|
|
@@ -5550,27 +5582,44 @@ function spawnSession(config, session) {
|
|
|
5550
5582
|
session.restartCount++;
|
|
5551
5583
|
};
|
|
5552
5584
|
let spawnFailed = false;
|
|
5553
|
-
|
|
5554
|
-
|
|
5555
|
-
|
|
5556
|
-
|
|
5557
|
-
|
|
5558
|
-
|
|
5559
|
-
|
|
5560
|
-
|
|
5561
|
-
|
|
5562
|
-
|
|
5563
|
-
|
|
5564
|
-
|
|
5565
|
-
|
|
5566
|
-
|
|
5567
|
-
|
|
5568
|
-
|
|
5569
|
-
|
|
5570
|
-
|
|
5571
|
-
|
|
5572
|
-
|
|
5573
|
-
|
|
5585
|
+
const spawnSettledNow = beginSpawnPending(session);
|
|
5586
|
+
const generation = nextSpawnGeneration(session);
|
|
5587
|
+
try {
|
|
5588
|
+
runTmuxSpawnPlan({
|
|
5589
|
+
plan: spawnPlan,
|
|
5590
|
+
spawnOptions: {
|
|
5591
|
+
cwd: projectDir,
|
|
5592
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
5593
|
+
env: tmuxEnv
|
|
5594
|
+
},
|
|
5595
|
+
stillCurrent: () => spawnStillCurrent(sessions2.get(codeName), session, generation),
|
|
5596
|
+
onSessionSpawned: (child) => {
|
|
5597
|
+
child.on("close", onTmuxSessionClose);
|
|
5598
|
+
child.on("error", onTmuxSessionError);
|
|
5599
|
+
child.on("close", spawnSettledNow);
|
|
5600
|
+
child.on("error", spawnSettledNow);
|
|
5601
|
+
},
|
|
5602
|
+
onSpawnFailed: (reason) => {
|
|
5603
|
+
spawnFailed = true;
|
|
5604
|
+
spawnSettledNow();
|
|
5605
|
+
if (reason === SPAWN_SUPERSEDED) {
|
|
5606
|
+
log2(
|
|
5607
|
+
`[persistent-session] spawn for '${codeName}' superseded (generation ${generation}, current ${sessions2.get(codeName)?.spawnGeneration ?? "none"}): not starting it; its key was never handed to a process [ENG-12126]`
|
|
5608
|
+
);
|
|
5609
|
+
return;
|
|
5610
|
+
}
|
|
5611
|
+
log2(
|
|
5612
|
+
`[persistent-session] tmux bootstrap failed for '${codeName}': ${reason} \u2014 refusing to spawn rather than put this session's -e secrets on the tmux server argv for its lifetime (ENG-10092)`
|
|
5613
|
+
);
|
|
5614
|
+
session.status = "crashed";
|
|
5615
|
+
session.startedAt = Date.now();
|
|
5616
|
+
session.restartCount++;
|
|
5617
|
+
}
|
|
5618
|
+
});
|
|
5619
|
+
} catch (err) {
|
|
5620
|
+
spawnSettledNow();
|
|
5621
|
+
throw err;
|
|
5622
|
+
}
|
|
5574
5623
|
if (!spawnFailed) {
|
|
5575
5624
|
session.startedAt = Date.now();
|
|
5576
5625
|
session.status = "running";
|
|
@@ -6308,6 +6357,11 @@ export {
|
|
|
6308
6357
|
findMissingSpawnEnv,
|
|
6309
6358
|
describePaneAgentIdMismatch,
|
|
6310
6359
|
findForeignAgentIdsInMcpConfig,
|
|
6360
|
+
SPAWN_SUPERSEDED,
|
|
6361
|
+
beginSpawnPending,
|
|
6362
|
+
nextSpawnGeneration,
|
|
6363
|
+
spawnStillCurrent,
|
|
6364
|
+
supersedePendingSpawn,
|
|
6311
6365
|
paneLogPath,
|
|
6312
6366
|
rotatePaneLogForDayRollover,
|
|
6313
6367
|
readPaneLogTail,
|
|
@@ -6343,4 +6397,4 @@ export {
|
|
|
6343
6397
|
stopAllSessionsAndWait,
|
|
6344
6398
|
getProjectDir
|
|
6345
6399
|
};
|
|
6346
|
-
//# sourceMappingURL=chunk-
|
|
6400
|
+
//# sourceMappingURL=chunk-6ENTMJ5T.js.map
|