@integrity-labs/agt-cli 0.28.40 → 0.28.41
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 +104 -12
- package/dist/bin/agt.js.map +1 -1
- package/dist/{chunk-57MHPANB.js → chunk-2BRF2FDJ.js} +24 -116
- package/dist/chunk-2BRF2FDJ.js.map +1 -0
- package/dist/{chunk-DA776TZO.js → chunk-GBST6UWT.js} +253 -24
- package/dist/chunk-GBST6UWT.js.map +1 -0
- package/dist/{chunk-X5E2Q3W2.js → chunk-SJUD2BWU.js} +3030 -2936
- package/dist/chunk-SJUD2BWU.js.map +1 -0
- package/dist/{claude-pair-runtime-LOL5YGXP.js → claude-pair-runtime-YPTMIWJF.js} +2 -2
- package/dist/lib/manager-worker.js +19 -227
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/augmented-admin.js +59 -3
- package/dist/{persistent-session-CFELQZI7.js → persistent-session-PNY26VBX.js} +3 -3
- package/dist/{responsiveness-probe-YOT3EKKN.js → responsiveness-probe-4YMZ6LXO.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-57MHPANB.js.map +0 -1
- package/dist/chunk-DA776TZO.js.map +0 -1
- package/dist/chunk-X5E2Q3W2.js.map +0 -1
- /package/dist/{claude-pair-runtime-LOL5YGXP.js.map → claude-pair-runtime-YPTMIWJF.js.map} +0 -0
- /package/dist/{persistent-session-CFELQZI7.js.map → persistent-session-PNY26VBX.js.map} +0 -0
- /package/dist/{responsiveness-probe-YOT3EKKN.js.map → responsiveness-probe-4YMZ6LXO.js.map} +0 -0
package/dist/bin/agt.js
CHANGED
|
@@ -4,9 +4,13 @@ import {
|
|
|
4
4
|
LITERAL_SECRET_PATTERNS,
|
|
5
5
|
PROD_AGT_HOST,
|
|
6
6
|
api,
|
|
7
|
+
buildConnectivityProbeDeps,
|
|
8
|
+
buildProbeEnv,
|
|
7
9
|
defaultFlagsCachePath,
|
|
10
|
+
deriveMcpServerKey,
|
|
8
11
|
error,
|
|
9
12
|
exchangeApiKey,
|
|
13
|
+
executeConnectivityProbe,
|
|
10
14
|
flagsCacheAgeSeconds,
|
|
11
15
|
getActiveTeam,
|
|
12
16
|
getApiKey,
|
|
@@ -33,7 +37,7 @@ import {
|
|
|
33
37
|
success,
|
|
34
38
|
table,
|
|
35
39
|
warn
|
|
36
|
-
} from "../chunk-
|
|
40
|
+
} from "../chunk-GBST6UWT.js";
|
|
37
41
|
import {
|
|
38
42
|
CHANNEL_REGISTRY,
|
|
39
43
|
DEPLOYMENT_TEMPLATES,
|
|
@@ -60,11 +64,11 @@ import {
|
|
|
60
64
|
renderTemplate,
|
|
61
65
|
resolveChannels,
|
|
62
66
|
serializeManifestForSlackCli
|
|
63
|
-
} from "../chunk-
|
|
67
|
+
} from "../chunk-SJUD2BWU.js";
|
|
64
68
|
|
|
65
69
|
// src/bin/agt.ts
|
|
66
|
-
import { join as
|
|
67
|
-
import { homedir as
|
|
70
|
+
import { join as join22 } from "path";
|
|
71
|
+
import { homedir as homedir11 } from "os";
|
|
68
72
|
import { Command } from "commander";
|
|
69
73
|
|
|
70
74
|
// src/commands/whoami.ts
|
|
@@ -4773,7 +4777,7 @@ import { execFileSync, execSync } from "child_process";
|
|
|
4773
4777
|
import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
|
|
4774
4778
|
import chalk18 from "chalk";
|
|
4775
4779
|
import ora16 from "ora";
|
|
4776
|
-
var cliVersion = true ? "0.28.
|
|
4780
|
+
var cliVersion = true ? "0.28.41" : "dev";
|
|
4777
4781
|
async function fetchLatestVersion() {
|
|
4778
4782
|
const host2 = getHost();
|
|
4779
4783
|
if (!host2) return null;
|
|
@@ -5396,6 +5400,8 @@ async function auditSecretsCommand(options = {}) {
|
|
|
5396
5400
|
}
|
|
5397
5401
|
|
|
5398
5402
|
// src/commands/integration.ts
|
|
5403
|
+
import { homedir as homedir10 } from "os";
|
|
5404
|
+
import { join as join21 } from "path";
|
|
5399
5405
|
import chalk19 from "chalk";
|
|
5400
5406
|
import ora17 from "ora";
|
|
5401
5407
|
async function integrationListCommand() {
|
|
@@ -5467,6 +5473,91 @@ ${integration2.name}`), chalk19.dim(`(${integration2.slug})`));
|
|
|
5467
5473
|
handleError(err);
|
|
5468
5474
|
}
|
|
5469
5475
|
}
|
|
5476
|
+
async function integrationProbeCommand(agentCodeName, slug) {
|
|
5477
|
+
const json = isJsonMode();
|
|
5478
|
+
const spinner = ora17({ text: `Probing ${slug} on ${agentCodeName}\u2026`, isSilent: json }).start();
|
|
5479
|
+
try {
|
|
5480
|
+
const agents = await api.get("/agents");
|
|
5481
|
+
const agent2 = agents.find((a) => a.code_name === agentCodeName);
|
|
5482
|
+
if (!agent2) {
|
|
5483
|
+
spinner.stop();
|
|
5484
|
+
error(`Agent "${agentCodeName}" not found.`);
|
|
5485
|
+
process.exitCode = 1;
|
|
5486
|
+
return;
|
|
5487
|
+
}
|
|
5488
|
+
const data = await api.post(
|
|
5489
|
+
"/host/agent-integrations",
|
|
5490
|
+
{ agent_id: agent2.agent_id }
|
|
5491
|
+
);
|
|
5492
|
+
const integrations = data.integrations ?? [];
|
|
5493
|
+
const integ = integrations.find(
|
|
5494
|
+
(i) => i.definition_id.toLowerCase() === slug.toLowerCase()
|
|
5495
|
+
);
|
|
5496
|
+
if (!integ) {
|
|
5497
|
+
spinner.stop();
|
|
5498
|
+
const available = integrations.map((i) => i.definition_id).join(", ") || "none";
|
|
5499
|
+
error(`Integration "${slug}" is not installed on ${agentCodeName}. Installed: ${available}`);
|
|
5500
|
+
process.exitCode = 1;
|
|
5501
|
+
return;
|
|
5502
|
+
}
|
|
5503
|
+
const projectDir = join21(homedir10(), ".augmented", agentCodeName, "project");
|
|
5504
|
+
const probeEnv = buildProbeEnv(projectDir);
|
|
5505
|
+
const probeDeps = buildConnectivityProbeDeps(projectDir, probeEnv);
|
|
5506
|
+
const sourceType = integ.source_type ?? null;
|
|
5507
|
+
const authType = integ.auth_type;
|
|
5508
|
+
const connectivityTest = integ.connectivity_test ?? null;
|
|
5509
|
+
const target = {
|
|
5510
|
+
definitionId: integ.definition_id,
|
|
5511
|
+
sourceType,
|
|
5512
|
+
authType,
|
|
5513
|
+
credentials: integ.credentials ?? {},
|
|
5514
|
+
mcpServerKey: deriveMcpServerKey({
|
|
5515
|
+
definitionId: integ.definition_id,
|
|
5516
|
+
sourceType,
|
|
5517
|
+
authType,
|
|
5518
|
+
connectivityTest
|
|
5519
|
+
}),
|
|
5520
|
+
connectivityTest
|
|
5521
|
+
};
|
|
5522
|
+
const outcome = await executeConnectivityProbe(target, probeDeps);
|
|
5523
|
+
spinner.stop();
|
|
5524
|
+
const probedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
5525
|
+
if (outcome === null) {
|
|
5526
|
+
const result2 = {
|
|
5527
|
+
agent: agentCodeName,
|
|
5528
|
+
slug: integ.definition_id,
|
|
5529
|
+
status: "not_probeable",
|
|
5530
|
+
message: "no connectivity probe is available for this integration kind",
|
|
5531
|
+
probed_at: probedAt
|
|
5532
|
+
};
|
|
5533
|
+
if (json) {
|
|
5534
|
+
jsonOutput(result2);
|
|
5535
|
+
return;
|
|
5536
|
+
}
|
|
5537
|
+
info(`${integ.definition_id}: not probeable (no probe wired for this integration kind)`);
|
|
5538
|
+
return;
|
|
5539
|
+
}
|
|
5540
|
+
const result = {
|
|
5541
|
+
agent: agentCodeName,
|
|
5542
|
+
slug: integ.definition_id,
|
|
5543
|
+
status: outcome.status,
|
|
5544
|
+
message: outcome.message ?? null,
|
|
5545
|
+
probed_at: probedAt
|
|
5546
|
+
};
|
|
5547
|
+
if (json) {
|
|
5548
|
+
jsonOutput(result);
|
|
5549
|
+
return;
|
|
5550
|
+
}
|
|
5551
|
+
const color = outcome.status === "ok" ? chalk19.green : outcome.status === "down" ? chalk19.red : chalk19.yellow;
|
|
5552
|
+
console.log(
|
|
5553
|
+
`${chalk19.bold(integ.definition_id)} on ${chalk19.bold(agentCodeName)}: ${color(outcome.status)}`
|
|
5554
|
+
);
|
|
5555
|
+
if (outcome.message) console.log(chalk19.dim(` ${outcome.message}`));
|
|
5556
|
+
} catch (err) {
|
|
5557
|
+
spinner.stop();
|
|
5558
|
+
handleError(err);
|
|
5559
|
+
}
|
|
5560
|
+
}
|
|
5470
5561
|
async function integrationInstallCommand(slug, options) {
|
|
5471
5562
|
const json = isJsonMode();
|
|
5472
5563
|
const spinner = ora17({ text: "Installing integration\u2026", isSilent: json }).start();
|
|
@@ -5696,7 +5787,7 @@ function handleError(err) {
|
|
|
5696
5787
|
}
|
|
5697
5788
|
|
|
5698
5789
|
// src/bin/agt.ts
|
|
5699
|
-
var cliVersion2 = true ? "0.28.
|
|
5790
|
+
var cliVersion2 = true ? "0.28.41" : "dev";
|
|
5700
5791
|
var program = new Command();
|
|
5701
5792
|
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");
|
|
5702
5793
|
program.hook("preAction", async (thisCommand, actionCommand) => {
|
|
@@ -5793,16 +5884,16 @@ host.command("pair <host-name>").description("Start an SSM port-forward + shell
|
|
|
5793
5884
|
})
|
|
5794
5885
|
);
|
|
5795
5886
|
var manager = program.command("manager").description("Host config sync daemon \u2014 keeps local agent files in sync with API");
|
|
5796
|
-
manager.command("start").description("Start the manager daemon (polls API for config changes and detects local drift)").option("--interval <seconds>", "Poll interval in seconds (min 5)", "10").option("--config-dir <dir>", "Config directory for agent files",
|
|
5797
|
-
manager.command("stop").description("Stop the running manager daemon").option("--config-dir <dir>", "Config directory for agent files",
|
|
5798
|
-
manager.command("status").description("Show the current manager daemon status and discovered agents").option("--config-dir <dir>", "Config directory for agent files",
|
|
5799
|
-
manager.command("watch").description("Live TUI dashboard \u2014 per-agent boxes, drill-in, log tail. Read-only (ENG-4555).").option("--config-dir <dir>", "Config directory for agent files",
|
|
5800
|
-
manager.command("install").description("Install OS-level supervisor (launchd LaunchAgent on macOS) so the manager auto-restarts after crash, reboot, or self-update (ENG-4593)").option("--interval <seconds>", "Poll interval in seconds (min 5)", "10").option("--config-dir <dir>", "Config directory for agent files",
|
|
5887
|
+
manager.command("start").description("Start the manager daemon (polls API for config changes and detects local drift)").option("--interval <seconds>", "Poll interval in seconds (min 5)", "10").option("--config-dir <dir>", "Config directory for agent files", join22(homedir11(), ".augmented")).option("--supervise", "Wrap the manager in a respawn-on-clean-exit loop so auto-upgrades can restart it transparently (ENG-4488)", false).action(managerStartCommand);
|
|
5888
|
+
manager.command("stop").description("Stop the running manager daemon").option("--config-dir <dir>", "Config directory for agent files", join22(homedir11(), ".augmented")).action(managerStopCommand);
|
|
5889
|
+
manager.command("status").description("Show the current manager daemon status and discovered agents").option("--config-dir <dir>", "Config directory for agent files", join22(homedir11(), ".augmented")).action(managerStatusCommand);
|
|
5890
|
+
manager.command("watch").description("Live TUI dashboard \u2014 per-agent boxes, drill-in, log tail. Read-only (ENG-4555).").option("--config-dir <dir>", "Config directory for agent files", join22(homedir11(), ".augmented")).option("--no-tui", "Skip the TUI and stream the manager log to stdout instead (CI / scripts)").action(managerWatchCommand);
|
|
5891
|
+
manager.command("install").description("Install OS-level supervisor (launchd LaunchAgent on macOS) so the manager auto-restarts after crash, reboot, or self-update (ENG-4593)").option("--interval <seconds>", "Poll interval in seconds (min 5)", "10").option("--config-dir <dir>", "Config directory for agent files", join22(homedir11(), ".augmented")).action(managerInstallCommand);
|
|
5801
5892
|
manager.command("uninstall").description("Remove the OS-level supervisor (launchctl unload + delete plist on macOS). Idempotent.").action(managerUninstallCommand);
|
|
5802
5893
|
manager.command("install-system-unit").description("Install a system-level systemd unit (Linux, root) so the manager auto-starts on every boot. For headless EC2 hosts \u2014 survives reboot without `loginctl enable-linger`. (ENG-4706)").option("--interval <seconds>", "Poll interval in seconds (min 5)", "10").option("--config-dir <dir>", "Config directory for agent files (defaults to /root/.augmented or /home/<user>/.augmented)").option("--user <name>", "Unix user the manager runs as", "root").action(managerInstallSystemUnitCommand);
|
|
5803
5894
|
manager.command("uninstall-system-unit").description("Remove the system-level systemd unit (Linux, root). Idempotent. (ENG-4706)").action(managerUninstallSystemUnitCommand);
|
|
5804
5895
|
var agent = program.command("agent").description("Inspect and manage agents");
|
|
5805
|
-
agent.command("show <code-name>").description("Display an agent's provisioned OpenClaw configuration").option("--config-dir <dir>", "Config directory",
|
|
5896
|
+
agent.command("show <code-name>").description("Display an agent's provisioned OpenClaw configuration").option("--config-dir <dir>", "Config directory", join22(homedir11(), ".augmented")).option("--all-channels", "Show all channels (including disabled)").action(agentShowCommand);
|
|
5806
5897
|
var kanban = program.command("kanban").description("Manage agent kanban boards");
|
|
5807
5898
|
kanban.command("list").description("List kanban board items for an agent").requiredOption("--agent <code-name>", "Agent code name").action(kanbanListCommand);
|
|
5808
5899
|
kanban.command("add <title>").description("Add a new item to an agent kanban board").requiredOption("--agent <code-name>", "Agent code name").option("--priority <1|2|3>", "Priority: 1=high, 2=medium, 3=low", "2").option("--status <status>", "Initial status: backlog | todo | in_progress", "todo").option("--description <text>", "Item description").option("--estimate <minutes>", "Estimated time in minutes").option("--deliverable <text>", "Expected output/deliverable").action(kanbanAddCommand);
|
|
@@ -5816,6 +5907,7 @@ recurring.command("disable <title-or-id>").description("Disable a recurring kanb
|
|
|
5816
5907
|
var integration = program.command("integration").description("Manage integrations \u2014 install, configure, and control permission scopes");
|
|
5817
5908
|
integration.command("list").description("List available integrations for the active team").action(integrationListCommand);
|
|
5818
5909
|
integration.command("show <slug>").description("Show integration details including permission scopes").action(integrationShowCommand);
|
|
5910
|
+
integration.command("probe <agent> <slug>").description("Run a FRESH host-side connectivity probe for an agent's integration (live verdict, not the cached status)").action(integrationProbeCommand);
|
|
5819
5911
|
integration.command("install <slug>").description("Install an integration on an agent").requiredOption("--agent <code-name>", "Agent code name").option("--scopes <scopes>", "Comma-separated scope IDs to grant").action(integrationInstallCommand);
|
|
5820
5912
|
integration.command("uninstall <slug>").description("Remove an integration from an agent").requiredOption("--agent <code-name>", "Agent code name").action(integrationUninstallCommand);
|
|
5821
5913
|
integration.command("requests").description("List pending scope approval requests for the team").action(integrationRequestsCommand);
|