@integrity-labs/agt-cli 0.28.364 → 0.28.366
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 +4 -4
- package/dist/{chunk-JRML25UU.js → chunk-EFIXTBUQ.js} +71 -12
- package/dist/{chunk-JRML25UU.js.map → chunk-EFIXTBUQ.js.map} +1 -1
- package/dist/{chunk-KZZGAL4S.js → chunk-YUQIJ2KO.js} +3 -3
- package/dist/{claude-pair-runtime-BRYGVIXA.js → claude-pair-runtime-Y6CE4MNP.js} +2 -2
- package/dist/lib/manager-worker.js +10 -10
- package/dist/mcp/direct-chat-channel.js +19 -0
- package/dist/mcp/origami.js +19 -0
- package/dist/mcp/slack-channel.js +19 -0
- package/dist/mcp/telegram-channel.js +19 -0
- package/dist/{persistent-session-7ZSQWMJS.js → persistent-session-YMOHCLWV.js} +2 -2
- package/dist/{responsiveness-probe-UTKN3UYC.js → responsiveness-probe-WATZJVZU.js} +2 -2
- package/package.json +1 -1
- /package/dist/{chunk-KZZGAL4S.js.map → chunk-YUQIJ2KO.js.map} +0 -0
- /package/dist/{claude-pair-runtime-BRYGVIXA.js.map → claude-pair-runtime-Y6CE4MNP.js.map} +0 -0
- /package/dist/{persistent-session-7ZSQWMJS.js.map → persistent-session-YMOHCLWV.js.map} +0 -0
- /package/dist/{responsiveness-probe-UTKN3UYC.js.map → responsiveness-probe-WATZJVZU.js.map} +0 -0
package/dist/bin/agt.js
CHANGED
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
success,
|
|
41
41
|
table,
|
|
42
42
|
warn
|
|
43
|
-
} from "../chunk-
|
|
43
|
+
} from "../chunk-YUQIJ2KO.js";
|
|
44
44
|
import {
|
|
45
45
|
AnchorSessionClient,
|
|
46
46
|
CHANNEL_REGISTRY,
|
|
@@ -70,7 +70,7 @@ import {
|
|
|
70
70
|
renderTemplate,
|
|
71
71
|
resolveChannels,
|
|
72
72
|
serializeManifestForSlackCli
|
|
73
|
-
} from "../chunk-
|
|
73
|
+
} from "../chunk-EFIXTBUQ.js";
|
|
74
74
|
import "../chunk-XWVM4KPK.js";
|
|
75
75
|
|
|
76
76
|
// src/bin/agt.ts
|
|
@@ -4829,7 +4829,7 @@ import { execFileSync, execSync } from "child_process";
|
|
|
4829
4829
|
import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
|
|
4830
4830
|
import chalk18 from "chalk";
|
|
4831
4831
|
import ora16 from "ora";
|
|
4832
|
-
var cliVersion = true ? "0.28.
|
|
4832
|
+
var cliVersion = true ? "0.28.366" : "dev";
|
|
4833
4833
|
async function fetchLatestVersion() {
|
|
4834
4834
|
const host2 = getHost();
|
|
4835
4835
|
if (!host2) return null;
|
|
@@ -6001,7 +6001,7 @@ function handleError(err) {
|
|
|
6001
6001
|
}
|
|
6002
6002
|
|
|
6003
6003
|
// src/bin/agt.ts
|
|
6004
|
-
var cliVersion2 = true ? "0.28.
|
|
6004
|
+
var cliVersion2 = true ? "0.28.366" : "dev";
|
|
6005
6005
|
var program = new Command();
|
|
6006
6006
|
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");
|
|
6007
6007
|
program.hook("preAction", async (thisCommand, actionCommand) => {
|
|
@@ -5198,6 +5198,25 @@ var INTEGRATION_REGISTRY = [
|
|
|
5198
5198
|
{ event_type: "proxy_mb", unit: "MB", label: "Proxy data" },
|
|
5199
5199
|
{ event_type: "session_minute", unit: "minute", label: "Session time" }
|
|
5200
5200
|
]
|
|
5201
|
+
},
|
|
5202
|
+
// ENG-7961: the broker returns a session `connect_url`; the AGENT drives the
|
|
5203
|
+
// session with the `browse` CDP CLI over Bash (`browse open <url> --cdp
|
|
5204
|
+
// <connect_url>`). So the host needs the `browse` binary. The manager's
|
|
5205
|
+
// ensureToolkitCli installs it (npm) when a browserbase integration is
|
|
5206
|
+
// present for the agent - and it is ALSO baked into the agt-runtime image
|
|
5207
|
+
// (Docker-isolated agents don't get host installs mounted in), exactly like
|
|
5208
|
+
// the `gh` precedent (ENG-7662).
|
|
5209
|
+
//
|
|
5210
|
+
// browse needs NO host credential: the agent drives the broker-provisioned
|
|
5211
|
+
// session over `connect_url`, and the Browserbase account key stays
|
|
5212
|
+
// server-side (never materialized to the agent). `env_key` is a required
|
|
5213
|
+
// field but INERT here - auth_type 'none' means no token is ever published
|
|
5214
|
+
// under it (the claudecode provisioner guards on `env_key && token`).
|
|
5215
|
+
cli_tool: {
|
|
5216
|
+
package: "browse",
|
|
5217
|
+
binary: "browse",
|
|
5218
|
+
env_key: "BROWSERBASE_UNUSED",
|
|
5219
|
+
installer: "npm"
|
|
5201
5220
|
}
|
|
5202
5221
|
},
|
|
5203
5222
|
{
|
|
@@ -9641,29 +9660,69 @@ function materializeEnvPlaceholders(raw, env2) {
|
|
|
9641
9660
|
});
|
|
9642
9661
|
}
|
|
9643
9662
|
var MATERIALIZED_CONFIG_BASENAME = "opencode.jsonc";
|
|
9644
|
-
function
|
|
9645
|
-
const
|
|
9646
|
-
|
|
9663
|
+
function opencodeGlobalConfigPath(serveEnv) {
|
|
9664
|
+
const xdg = serveEnv["XDG_CONFIG_HOME"]?.trim();
|
|
9665
|
+
const base = xdg && xdg.length > 0 ? xdg : join3(serveEnv["HOME"]?.trim() || homedir3(), ".config");
|
|
9666
|
+
return join3(base, "opencode", "opencode.json");
|
|
9667
|
+
}
|
|
9668
|
+
function buildGlobalMcpConfig(materializedConfig) {
|
|
9669
|
+
let parsed;
|
|
9647
9670
|
try {
|
|
9648
|
-
|
|
9671
|
+
parsed = JSON.parse(materializedConfig);
|
|
9649
9672
|
} catch {
|
|
9673
|
+
return null;
|
|
9674
|
+
}
|
|
9675
|
+
if (typeof parsed !== "object" || parsed === null) return null;
|
|
9676
|
+
const cfg = parsed;
|
|
9677
|
+
if (!cfg.mcp || Object.keys(cfg.mcp).length === 0) return null;
|
|
9678
|
+
return JSON.stringify(
|
|
9679
|
+
{ $schema: cfg.$schema ?? "https://opencode.ai/config.json", mcp: cfg.mcp },
|
|
9680
|
+
null,
|
|
9681
|
+
2
|
|
9682
|
+
);
|
|
9683
|
+
}
|
|
9684
|
+
function writeConfigFile600(target, content, codeName, log2) {
|
|
9685
|
+
try {
|
|
9686
|
+
mkdirSync3(dirname2(target), { recursive: true });
|
|
9687
|
+
writeFileSync3(target, content, { mode: 384 });
|
|
9650
9688
|
try {
|
|
9651
|
-
|
|
9689
|
+
chmodSync2(target, 384);
|
|
9652
9690
|
} catch {
|
|
9653
9691
|
}
|
|
9654
9692
|
return true;
|
|
9655
|
-
}
|
|
9656
|
-
try {
|
|
9657
|
-
writeFileSync3(target, materializeEnvPlaceholders(raw, serveEnv), { mode: 384 });
|
|
9658
9693
|
} catch (err) {
|
|
9659
|
-
log2(`[opencode-session] failed to write
|
|
9694
|
+
log2(`[opencode-session] failed to write ${target} for '${codeName}': ${err.message}`);
|
|
9660
9695
|
return false;
|
|
9661
9696
|
}
|
|
9697
|
+
}
|
|
9698
|
+
function writeMaterializedOpencodeConfig(codeName, projectDir2, serveEnv, log2) {
|
|
9699
|
+
const projectTarget = join3(projectDir2, MATERIALIZED_CONFIG_BASENAME);
|
|
9700
|
+
const globalTarget = opencodeGlobalConfigPath(serveEnv);
|
|
9701
|
+
let raw;
|
|
9662
9702
|
try {
|
|
9663
|
-
|
|
9703
|
+
raw = readFileSync5(join3(projectDir2, "opencode.json"), "utf-8");
|
|
9664
9704
|
} catch {
|
|
9705
|
+
for (const t of [projectTarget, globalTarget]) {
|
|
9706
|
+
try {
|
|
9707
|
+
if (existsSync4(t)) rmSync2(t);
|
|
9708
|
+
} catch {
|
|
9709
|
+
}
|
|
9710
|
+
}
|
|
9711
|
+
return true;
|
|
9665
9712
|
}
|
|
9666
|
-
|
|
9713
|
+
const materialized = materializeEnvPlaceholders(raw, serveEnv);
|
|
9714
|
+
const projectOk = writeConfigFile600(projectTarget, materialized, codeName, log2);
|
|
9715
|
+
const globalMcp = buildGlobalMcpConfig(materialized);
|
|
9716
|
+
let globalOk = true;
|
|
9717
|
+
if (globalMcp) {
|
|
9718
|
+
globalOk = writeConfigFile600(globalTarget, globalMcp, codeName, log2);
|
|
9719
|
+
} else {
|
|
9720
|
+
try {
|
|
9721
|
+
if (existsSync4(globalTarget)) rmSync2(globalTarget);
|
|
9722
|
+
} catch {
|
|
9723
|
+
}
|
|
9724
|
+
}
|
|
9725
|
+
return projectOk && globalOk;
|
|
9667
9726
|
}
|
|
9668
9727
|
function baseUrlFor(port) {
|
|
9669
9728
|
return `http://127.0.0.1:${port}`;
|
|
@@ -11647,4 +11706,4 @@ export {
|
|
|
11647
11706
|
stopAllSessionsAndWait,
|
|
11648
11707
|
getProjectDir
|
|
11649
11708
|
};
|
|
11650
|
-
//# sourceMappingURL=chunk-
|
|
11709
|
+
//# sourceMappingURL=chunk-EFIXTBUQ.js.map
|