@integrity-labs/agt-cli 0.6.9 → 0.7.1
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.
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
provision,
|
|
9
9
|
requireHost,
|
|
10
10
|
resolveChannels
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-3S5KUXZ7.js";
|
|
12
12
|
import {
|
|
13
13
|
findTaskByTemplate,
|
|
14
14
|
getProjectDir,
|
|
@@ -811,10 +811,47 @@ function clearAgentCaches(agentId, codeName) {
|
|
|
811
811
|
var cachedFrameworkVersion = null;
|
|
812
812
|
var lastVersionCheckAt = 0;
|
|
813
813
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
814
|
+
async function ensureBrewDependency(binary, formula) {
|
|
815
|
+
if (frameworkBinaryChecked.has(`dep:${binary}`)) return true;
|
|
816
|
+
const { execFileSync } = await import("child_process");
|
|
817
|
+
try {
|
|
818
|
+
execFileSync("which", [binary], { timeout: 5e3 });
|
|
819
|
+
frameworkBinaryChecked.add(`dep:${binary}`);
|
|
820
|
+
return true;
|
|
821
|
+
} catch {
|
|
822
|
+
}
|
|
823
|
+
let brewPath;
|
|
824
|
+
try {
|
|
825
|
+
brewPath = execFileSync("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
826
|
+
} catch {
|
|
827
|
+
log(`${binary} not found and Homebrew not available \u2014 install manually: brew install ${formula}`);
|
|
828
|
+
frameworkBinaryChecked.add(`dep:${binary}`);
|
|
829
|
+
return false;
|
|
830
|
+
}
|
|
831
|
+
log(`${binary} not found \u2014 installing via Homebrew...`);
|
|
832
|
+
try {
|
|
833
|
+
execFileSync(brewPath, ["install", formula], { timeout: 12e4, stdio: "pipe" });
|
|
834
|
+
} catch (err) {
|
|
835
|
+
log(`Failed to install ${formula}: ${err.message}`);
|
|
836
|
+
frameworkBinaryChecked.add(`dep:${binary}`);
|
|
837
|
+
return false;
|
|
838
|
+
}
|
|
839
|
+
try {
|
|
840
|
+
execFileSync("which", [binary], { timeout: 5e3 });
|
|
841
|
+
log(`${binary} installed successfully`);
|
|
842
|
+
frameworkBinaryChecked.add(`dep:${binary}`);
|
|
843
|
+
return true;
|
|
844
|
+
} catch {
|
|
845
|
+
log(`${formula} install completed but ${binary} not found on PATH`);
|
|
846
|
+
frameworkBinaryChecked.add(`dep:${binary}`);
|
|
847
|
+
return false;
|
|
848
|
+
}
|
|
849
|
+
}
|
|
814
850
|
async function ensureFrameworkBinary(frameworkId) {
|
|
815
851
|
if (frameworkId !== "claude-code") return;
|
|
816
852
|
if (frameworkBinaryChecked.has(frameworkId)) return;
|
|
817
853
|
frameworkBinaryChecked.add(frameworkId);
|
|
854
|
+
await ensureBrewDependency("tmux", "tmux");
|
|
818
855
|
const { execFileSync } = await import("child_process");
|
|
819
856
|
let brewPath;
|
|
820
857
|
try {
|