@integrity-labs/agt-cli 0.28.336 → 0.28.338
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 +145 -75
- package/dist/bin/agt.js.map +1 -1
- package/dist/{chunk-J2WYEOBH.js → chunk-O4V3TMUI.js} +2 -1
- package/dist/{chunk-VIYSMPXD.js → chunk-S2JJ532Q.js} +59 -11
- package/dist/chunk-S2JJ532Q.js.map +1 -0
- package/dist/{claude-pair-runtime-T7EFAWS5.js → claude-pair-runtime-XPWI2M2Z.js} +2 -2
- package/dist/lib/manager-worker.js +71 -10
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/{manager-supervisor-RMC62QES.js → manager-supervisor-P5G44DPX.js} +4 -4
- package/dist/{manager-supervisor-RMC62QES.js.map → manager-supervisor-P5G44DPX.js.map} +1 -1
- package/dist/{persistent-session-ENQXJNBJ.js → persistent-session-G7WNWWJZ.js} +2 -2
- package/dist/{responsiveness-probe-46XFHCPY.js → responsiveness-probe-X735BG2Q.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-VIYSMPXD.js.map +0 -1
- /package/dist/{chunk-J2WYEOBH.js.map → chunk-O4V3TMUI.js.map} +0 -0
- /package/dist/{claude-pair-runtime-T7EFAWS5.js.map → claude-pair-runtime-XPWI2M2Z.js.map} +0 -0
- /package/dist/{persistent-session-ENQXJNBJ.js.map → persistent-session-G7WNWWJZ.js.map} +0 -0
- /package/dist/{responsiveness-probe-46XFHCPY.js.map → responsiveness-probe-X735BG2Q.js.map} +0 -0
|
@@ -100,7 +100,7 @@ async function spawnPairSession(session) {
|
|
|
100
100
|
return { ok: true };
|
|
101
101
|
} catch {
|
|
102
102
|
}
|
|
103
|
-
const { resolveClaudeBinary } = await import("./persistent-session-
|
|
103
|
+
const { resolveClaudeBinary } = await import("./persistent-session-G7WNWWJZ.js");
|
|
104
104
|
const claudeBin = resolveClaudeBinary();
|
|
105
105
|
const pairEnv = {
|
|
106
106
|
...process.env,
|
|
@@ -373,4 +373,4 @@ export {
|
|
|
373
373
|
startClaudePair,
|
|
374
374
|
submitClaudePairCode
|
|
375
375
|
};
|
|
376
|
-
//# sourceMappingURL=claude-pair-runtime-
|
|
376
|
+
//# sourceMappingURL=claude-pair-runtime-XPWI2M2Z.js.map
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
classifyEnvIntegrationsDiff,
|
|
15
15
|
clearPresenceReaperState,
|
|
16
16
|
clearPresenceReaperStateForKeys,
|
|
17
|
+
decidePin,
|
|
17
18
|
defaultFlagsCachePath,
|
|
18
19
|
deriveMcpServerKey,
|
|
19
20
|
diffEnvIntegrations,
|
|
@@ -29,6 +30,7 @@ import {
|
|
|
29
30
|
getHostId,
|
|
30
31
|
givenUpMcpServerKeys,
|
|
31
32
|
liveProxyExtraHeaderVars,
|
|
33
|
+
pinAllowsUrgent,
|
|
32
34
|
provision,
|
|
33
35
|
provisionAutoKanbanProgressHook,
|
|
34
36
|
provisionChannelProgressHook,
|
|
@@ -43,7 +45,7 @@ import {
|
|
|
43
45
|
requireHost,
|
|
44
46
|
safeWriteJsonAtomic,
|
|
45
47
|
setConfigHash
|
|
46
|
-
} from "../chunk-
|
|
48
|
+
} from "../chunk-S2JJ532Q.js";
|
|
47
49
|
import {
|
|
48
50
|
getProjectDir as getProjectDir2,
|
|
49
51
|
getReadyTasks,
|
|
@@ -132,7 +134,7 @@ import {
|
|
|
132
134
|
takeZombieDetection,
|
|
133
135
|
transcriptActivityAgeSeconds,
|
|
134
136
|
writeEgressAllowlist
|
|
135
|
-
} from "../chunk-
|
|
137
|
+
} from "../chunk-O4V3TMUI.js";
|
|
136
138
|
import {
|
|
137
139
|
reapOrphanChannelMcps
|
|
138
140
|
} from "../chunk-XWVM4KPK.js";
|
|
@@ -8386,7 +8388,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
8386
8388
|
var lastVersionCheckAt = 0;
|
|
8387
8389
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
8388
8390
|
var lastResponsivenessProbeAt = 0;
|
|
8389
|
-
var agtCliVersion = true ? "0.28.
|
|
8391
|
+
var agtCliVersion = true ? "0.28.338" : "dev";
|
|
8390
8392
|
function resolveBrewPath(execFileSync2) {
|
|
8391
8393
|
try {
|
|
8392
8394
|
const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -8686,6 +8688,8 @@ function selfUpdateAppliedMarkerPath() {
|
|
|
8686
8688
|
return join21(homedir11(), ".augmented", ".last-self-update-applied");
|
|
8687
8689
|
}
|
|
8688
8690
|
var selfUpdateUpToDateLogged = false;
|
|
8691
|
+
var selfUpdatePinnedLogged = false;
|
|
8692
|
+
var selfUpdatePinInvalidLogged = false;
|
|
8689
8693
|
var restartAfterUpgrade = false;
|
|
8690
8694
|
var pendingUpgradeVersion = null;
|
|
8691
8695
|
var selfUpdateInFlight = false;
|
|
@@ -8733,6 +8737,25 @@ async function checkAndUpdateCliViaBrew(force = false) {
|
|
|
8733
8737
|
const { execFileSync: execFileSync2 } = await import("child_process");
|
|
8734
8738
|
const brewPath = resolveBrewPath(execFileSync2);
|
|
8735
8739
|
if (!brewPath) return "noop";
|
|
8740
|
+
{
|
|
8741
|
+
const brewPin = decidePin({ installed: agtCliVersion, pinRaw: process.env.AGT_CLI_PIN_VERSION });
|
|
8742
|
+
if (brewPin.kind === "satisfied") {
|
|
8743
|
+
if (!selfUpdatePinnedLogged) {
|
|
8744
|
+
log(`[self-update] agt CLI pinned to ${brewPin.version} (AGT_CLI_PIN_VERSION); already satisfied on this brew install.`);
|
|
8745
|
+
selfUpdatePinnedLogged = true;
|
|
8746
|
+
}
|
|
8747
|
+
return "noop";
|
|
8748
|
+
}
|
|
8749
|
+
if (brewPin.kind === "install") {
|
|
8750
|
+
if (!selfUpdatePinnedLogged) {
|
|
8751
|
+
log(
|
|
8752
|
+
`[self-update] agt CLI is pinned to ${brewPin.version} (AGT_CLI_PIN_VERSION) but this is a Homebrew install (currently ${agtCliVersion}); brew can't install an exact version, so the pin CANNOT be satisfied here. Not upgrading. Switch to the npm-global install (or hold the formula) to pin exactly.`
|
|
8753
|
+
);
|
|
8754
|
+
selfUpdatePinnedLogged = true;
|
|
8755
|
+
}
|
|
8756
|
+
return "noop";
|
|
8757
|
+
}
|
|
8758
|
+
}
|
|
8736
8759
|
let metadataFresh = true;
|
|
8737
8760
|
try {
|
|
8738
8761
|
execFileSync2(brewPath, ["update", "--quiet"], { timeout: 6e4, stdio: "pipe" });
|
|
@@ -8800,6 +8823,44 @@ async function checkAndUpdateCliViaBrew(force = false) {
|
|
|
8800
8823
|
async function checkAndUpdateCliViaNpm(force = false) {
|
|
8801
8824
|
if (agtCliVersion === "dev") return "noop";
|
|
8802
8825
|
const channel = process.env.AGT_CLI_RELEASE_CHANNEL || "latest";
|
|
8826
|
+
const pinRaw = process.env.AGT_CLI_PIN_VERSION;
|
|
8827
|
+
const pinDecision = decidePin({ installed: agtCliVersion, pinRaw });
|
|
8828
|
+
if (pinDecision.kind === "invalid") {
|
|
8829
|
+
if (!selfUpdatePinInvalidLogged) {
|
|
8830
|
+
log(
|
|
8831
|
+
`[self-update] AGT_CLI_PIN_VERSION="${pinDecision.raw}" is not a valid version; ignoring the pin and tracking channel=${channel} as usual.`
|
|
8832
|
+
);
|
|
8833
|
+
selfUpdatePinInvalidLogged = true;
|
|
8834
|
+
}
|
|
8835
|
+
} else if (pinDecision.kind !== "unpinned") {
|
|
8836
|
+
if (pinAllowsUrgent(process.env.AGT_CLI_PIN_ALLOW_URGENT)) {
|
|
8837
|
+
const urgentTarget2 = await fetchUrgentDistTagVersion();
|
|
8838
|
+
if (urgentTarget2 && urgentTarget2 === agtCliVersion) {
|
|
8839
|
+
return "noop";
|
|
8840
|
+
}
|
|
8841
|
+
if (isUrgentUpgrade({
|
|
8842
|
+
urgentTarget: urgentTarget2,
|
|
8843
|
+
installed: agtCliVersion,
|
|
8844
|
+
isNewer: (installed, candidate) => candidate !== installed && !isOlderSemverTuple(installed, candidate)
|
|
8845
|
+
})) {
|
|
8846
|
+
log(
|
|
8847
|
+
`[self-update] URGENT agt CLI hotfix ${agtCliVersion} \u2192 ${urgentTarget2} overrides pin=${pinDecision.version} (AGT_CLI_PIN_ALLOW_URGENT). Upgrading via npm...`
|
|
8848
|
+
);
|
|
8849
|
+
return await installAgtCliViaNpm(urgentTarget2, "urgent(pin-allow-urgent)");
|
|
8850
|
+
}
|
|
8851
|
+
}
|
|
8852
|
+
if (pinDecision.kind === "satisfied") {
|
|
8853
|
+
if (!selfUpdatePinnedLogged) {
|
|
8854
|
+
log(`[self-update] agt CLI pinned to ${pinDecision.version} (AGT_CLI_PIN_VERSION); up to date.`);
|
|
8855
|
+
selfUpdatePinnedLogged = true;
|
|
8856
|
+
}
|
|
8857
|
+
return "noop";
|
|
8858
|
+
}
|
|
8859
|
+
log(
|
|
8860
|
+
`[self-update] agt CLI pinned to ${pinDecision.version} (AGT_CLI_PIN_VERSION); installing exact version (${agtCliVersion} \u2192 ${pinDecision.version})...`
|
|
8861
|
+
);
|
|
8862
|
+
return await installAgtCliViaNpm(pinDecision.version, `pin=${pinDecision.version}`);
|
|
8863
|
+
}
|
|
8803
8864
|
let latest;
|
|
8804
8865
|
try {
|
|
8805
8866
|
const res = await fetch(
|
|
@@ -9282,7 +9343,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
|
|
|
9282
9343
|
if (codeNames.length === 0) return;
|
|
9283
9344
|
void (async () => {
|
|
9284
9345
|
try {
|
|
9285
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
9346
|
+
const { collectDiagnostics } = await import("../persistent-session-G7WNWWJZ.js");
|
|
9286
9347
|
await api.post("/host/heartbeat", {
|
|
9287
9348
|
host_id: hostId,
|
|
9288
9349
|
agent_diagnostics: collectDiagnostics(codeNames)
|
|
@@ -9381,7 +9442,7 @@ async function pollCycle() {
|
|
|
9381
9442
|
}
|
|
9382
9443
|
try {
|
|
9383
9444
|
const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
|
|
9384
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
9445
|
+
const { collectDiagnostics } = await import("../persistent-session-G7WNWWJZ.js");
|
|
9385
9446
|
const diagCodeNames = [...agentState.persistentSessionAgents];
|
|
9386
9447
|
const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames) : void 0;
|
|
9387
9448
|
let tailscaleHostname;
|
|
@@ -9530,7 +9591,7 @@ async function pollCycle() {
|
|
|
9530
9591
|
const {
|
|
9531
9592
|
collectResponsivenessProbes,
|
|
9532
9593
|
getResponsivenessIntervalMs
|
|
9533
|
-
} = await import("../responsiveness-probe-
|
|
9594
|
+
} = await import("../responsiveness-probe-X735BG2Q.js");
|
|
9534
9595
|
const probeIntervalMs = getResponsivenessIntervalMs();
|
|
9535
9596
|
if (now - lastResponsivenessProbeAt > probeIntervalMs) {
|
|
9536
9597
|
const probeCodeNames = [...agentState.persistentSessionAgents];
|
|
@@ -9562,7 +9623,7 @@ async function pollCycle() {
|
|
|
9562
9623
|
collectResponsivenessProbes,
|
|
9563
9624
|
livePendingInboundOldestAgeSeconds,
|
|
9564
9625
|
parkPendingInbound
|
|
9565
|
-
} = await import("../responsiveness-probe-
|
|
9626
|
+
} = await import("../responsiveness-probe-X735BG2Q.js");
|
|
9566
9627
|
const { getProjectDir: wedgeProjectDir } = await import("../claude-scheduler-FATCLHDM.js");
|
|
9567
9628
|
const wedgeNow = /* @__PURE__ */ new Date();
|
|
9568
9629
|
const liveAgents = agentState.persistentSessionAgents;
|
|
@@ -12660,7 +12721,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
|
|
|
12660
12721
|
void api.post("/host/restart-ack", { host_id: hostId, agent_id: agentId, restart_requested_at: requestedAt }).catch((err) => log(`[restart-lane] ack failed for '${codeName}': ${err.message}`));
|
|
12661
12722
|
void (async () => {
|
|
12662
12723
|
try {
|
|
12663
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
12724
|
+
const { collectDiagnostics } = await import("../persistent-session-G7WNWWJZ.js");
|
|
12664
12725
|
await api.post("/host/heartbeat", {
|
|
12665
12726
|
host_id: hostId,
|
|
12666
12727
|
agent_diagnostics: collectDiagnostics([codeName])
|
|
@@ -12710,7 +12771,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
|
|
|
12710
12771
|
}
|
|
12711
12772
|
try {
|
|
12712
12773
|
const hostId = await getHostId();
|
|
12713
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
12774
|
+
const { collectDiagnostics } = await import("../persistent-session-G7WNWWJZ.js");
|
|
12714
12775
|
await api.post("/host/heartbeat", {
|
|
12715
12776
|
host_id: hostId,
|
|
12716
12777
|
agent_diagnostics: collectDiagnostics([codeName])
|
|
@@ -13208,7 +13269,7 @@ async function processClaudePairSessions(agents) {
|
|
|
13208
13269
|
killPairSession,
|
|
13209
13270
|
pairTmuxSession,
|
|
13210
13271
|
finalizeClaudePairOnboarding
|
|
13211
|
-
} = await import("../claude-pair-runtime-
|
|
13272
|
+
} = await import("../claude-pair-runtime-XPWI2M2Z.js");
|
|
13212
13273
|
for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
|
|
13213
13274
|
log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
|
|
13214
13275
|
const killed = await killPairSession(pairTmuxSession(pairId));
|