@integrity-labs/agt-cli 0.28.318 → 0.28.320
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 +96 -4
- package/dist/bin/agt.js.map +1 -1
- package/dist/{chunk-2DIWTRTU.js → chunk-CJSATK6B.js} +1024 -200
- package/dist/chunk-CJSATK6B.js.map +1 -0
- package/dist/{chunk-4DHYHNCV.js → chunk-NAS4DZNG.js} +184 -2
- package/dist/chunk-NAS4DZNG.js.map +1 -0
- package/dist/{claude-pair-runtime-PWVOBBX4.js → claude-pair-runtime-DO6OWWGD.js} +2 -2
- package/dist/lib/manager-worker.js +1505 -200
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/direct-chat-channel.js +1 -1
- package/dist/mcp/origami.js +6 -1
- package/dist/mcp/remote-oauth-proxy.js +36 -10
- package/dist/mcp/slack-channel.js +105 -58
- package/dist/mcp/teams-channel.js +21 -12
- package/dist/mcp/telegram-channel.js +18 -13
- package/dist/{persistent-session-VSSEZTY7.js → persistent-session-ZQSAZIVM.js} +2 -2
- package/dist/{responsiveness-probe-I6YFUKYD.js → responsiveness-probe-NARLJJGH.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-2DIWTRTU.js.map +0 -1
- package/dist/chunk-4DHYHNCV.js.map +0 -1
- /package/dist/{claude-pair-runtime-PWVOBBX4.js.map → claude-pair-runtime-DO6OWWGD.js.map} +0 -0
- /package/dist/{persistent-session-VSSEZTY7.js.map → persistent-session-ZQSAZIVM.js.map} +0 -0
- /package/dist/{responsiveness-probe-I6YFUKYD.js.map → responsiveness-probe-NARLJJGH.js.map} +0 -0
package/dist/bin/agt.js
CHANGED
|
@@ -38,8 +38,9 @@ import {
|
|
|
38
38
|
success,
|
|
39
39
|
table,
|
|
40
40
|
warn
|
|
41
|
-
} from "../chunk-
|
|
41
|
+
} from "../chunk-CJSATK6B.js";
|
|
42
42
|
import {
|
|
43
|
+
AnchorSessionClient,
|
|
43
44
|
CHANNEL_REGISTRY,
|
|
44
45
|
DEFAULT_FRAMEWORK,
|
|
45
46
|
DEPLOYMENT_TEMPLATES,
|
|
@@ -67,7 +68,7 @@ import {
|
|
|
67
68
|
renderTemplate,
|
|
68
69
|
resolveChannels,
|
|
69
70
|
serializeManifestForSlackCli
|
|
70
|
-
} from "../chunk-
|
|
71
|
+
} from "../chunk-NAS4DZNG.js";
|
|
71
72
|
import "../chunk-XWVM4KPK.js";
|
|
72
73
|
|
|
73
74
|
// src/bin/agt.ts
|
|
@@ -4826,7 +4827,7 @@ import { execFileSync, execSync } from "child_process";
|
|
|
4826
4827
|
import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
|
|
4827
4828
|
import chalk18 from "chalk";
|
|
4828
4829
|
import ora16 from "ora";
|
|
4829
|
-
var cliVersion = true ? "0.28.
|
|
4830
|
+
var cliVersion = true ? "0.28.320" : "dev";
|
|
4830
4831
|
async function fetchLatestVersion() {
|
|
4831
4832
|
const host2 = getHost();
|
|
4832
4833
|
if (!host2) return null;
|
|
@@ -5448,6 +5449,93 @@ async function auditSecretsCommand(options = {}) {
|
|
|
5448
5449
|
}
|
|
5449
5450
|
}
|
|
5450
5451
|
|
|
5452
|
+
// src/commands/anchor.ts
|
|
5453
|
+
import { confirm as confirm4 } from "@inquirer/prompts";
|
|
5454
|
+
function describeShape(raw) {
|
|
5455
|
+
if (!raw || typeof raw !== "object") return typeof raw;
|
|
5456
|
+
const keys = Object.keys(raw);
|
|
5457
|
+
return keys.length > 0 ? keys.join(", ") : "(no keys)";
|
|
5458
|
+
}
|
|
5459
|
+
async function runAnchorOnboard(profileArg, opts, deps) {
|
|
5460
|
+
const { out } = deps;
|
|
5461
|
+
const profile = (profileArg ?? "").trim();
|
|
5462
|
+
const apiKey = (opts.apiKey ?? process.env["ANCHOR_API_KEY"] ?? process.env["ANCHOR_BROWSER_API_KEY"] ?? "").trim();
|
|
5463
|
+
if (!profile) {
|
|
5464
|
+
out.error("A profile name is required: agt anchor onboard <profile>");
|
|
5465
|
+
return { ok: false, reason: "missing-profile" };
|
|
5466
|
+
}
|
|
5467
|
+
if (!apiKey) {
|
|
5468
|
+
out.error("No Anchor API key. Set ANCHOR_API_KEY (a CLI flag would leak the secret via shell history / process list).");
|
|
5469
|
+
return { ok: false, reason: "missing-api-key" };
|
|
5470
|
+
}
|
|
5471
|
+
const client = deps.createClient(apiKey, opts.apiBase);
|
|
5472
|
+
let session;
|
|
5473
|
+
try {
|
|
5474
|
+
session = await client.createSession({ dedicatedStickyIp: opts.stickyIp !== false });
|
|
5475
|
+
} catch (err) {
|
|
5476
|
+
out.error(`Failed to start an Anchor session: ${err.message}`);
|
|
5477
|
+
return { ok: false, reason: "mint-failed" };
|
|
5478
|
+
}
|
|
5479
|
+
if (!session.liveViewUrl) {
|
|
5480
|
+
out.error("Anchor did not return a live-view URL for this session; cannot drive the login by hand.");
|
|
5481
|
+
out.info(`Response shape (keys): ${describeShape(session.raw)}`);
|
|
5482
|
+
await endBestEffort(client, session.sessionId);
|
|
5483
|
+
return { ok: false, reason: "no-live-view" };
|
|
5484
|
+
}
|
|
5485
|
+
out.info(`Onboarding Anchor profile "${profile}".`);
|
|
5486
|
+
out.info("1. Open this live-view URL and log into the target site (LinkedIn, etc.) by hand:");
|
|
5487
|
+
out.url(session.liveViewUrl);
|
|
5488
|
+
out.info(" Your password is typed into Anchor's browser only - it never reaches the agent or Augmented Team.");
|
|
5489
|
+
out.info("2. Once you are fully logged in, confirm below to save the authenticated profile.");
|
|
5490
|
+
let approved = false;
|
|
5491
|
+
try {
|
|
5492
|
+
approved = await deps.confirmSave(profile);
|
|
5493
|
+
} catch {
|
|
5494
|
+
approved = false;
|
|
5495
|
+
}
|
|
5496
|
+
if (!approved) {
|
|
5497
|
+
out.info("Aborted - ending the session without saving the profile.");
|
|
5498
|
+
await endBestEffort(client, session.sessionId);
|
|
5499
|
+
return { ok: false, reason: "aborted" };
|
|
5500
|
+
}
|
|
5501
|
+
try {
|
|
5502
|
+
await client.saveProfileFromSession(profile, session.sessionId, {
|
|
5503
|
+
dedicatedStickyIp: opts.stickyIp !== false
|
|
5504
|
+
});
|
|
5505
|
+
} catch (err) {
|
|
5506
|
+
out.error(`Failed to save the profile: ${err.message}`);
|
|
5507
|
+
await endBestEffort(client, session.sessionId);
|
|
5508
|
+
return { ok: false, reason: "save-failed" };
|
|
5509
|
+
}
|
|
5510
|
+
await endBestEffort(client, session.sessionId);
|
|
5511
|
+
out.success(`Saved Anchor profile "${profile}".`);
|
|
5512
|
+
out.info(`Set it on the agent's anchor-browser integration config as profile_name: "${profile}".`);
|
|
5513
|
+
out.info("The agent will resume this login on its next session - no re-auth needed.");
|
|
5514
|
+
return { ok: true, reason: "saved", profile };
|
|
5515
|
+
}
|
|
5516
|
+
async function endBestEffort(client, sessionId) {
|
|
5517
|
+
try {
|
|
5518
|
+
await client.endSession(sessionId);
|
|
5519
|
+
} catch {
|
|
5520
|
+
}
|
|
5521
|
+
}
|
|
5522
|
+
async function anchorOnboardCommand(profile, options) {
|
|
5523
|
+
const result = await runAnchorOnboard(profile, options, {
|
|
5524
|
+
createClient: (apiKey, baseUrl) => new AnchorSessionClient({ apiKey, ...baseUrl ? { baseUrl } : {} }),
|
|
5525
|
+
confirmSave: (p) => confirm4({ message: `Finished logging in as "${p}"? Save the profile now?`, default: true }),
|
|
5526
|
+
out: {
|
|
5527
|
+
info,
|
|
5528
|
+
success,
|
|
5529
|
+
error,
|
|
5530
|
+
// The URL is data the operator must copy, so print it plainly on its own line.
|
|
5531
|
+
url: (u) => console.log(`
|
|
5532
|
+
${u}
|
|
5533
|
+
`)
|
|
5534
|
+
}
|
|
5535
|
+
});
|
|
5536
|
+
if (!result.ok) process.exitCode = 1;
|
|
5537
|
+
}
|
|
5538
|
+
|
|
5451
5539
|
// src/commands/integration.ts
|
|
5452
5540
|
import { homedir as homedir11 } from "os";
|
|
5453
5541
|
import { join as join22 } from "path";
|
|
@@ -5843,7 +5931,7 @@ function handleError(err) {
|
|
|
5843
5931
|
}
|
|
5844
5932
|
|
|
5845
5933
|
// src/bin/agt.ts
|
|
5846
|
-
var cliVersion2 = true ? "0.28.
|
|
5934
|
+
var cliVersion2 = true ? "0.28.320" : "dev";
|
|
5847
5935
|
var program = new Command();
|
|
5848
5936
|
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");
|
|
5849
5937
|
program.hook("preAction", async (thisCommand, actionCommand) => {
|
|
@@ -5963,6 +6051,10 @@ var recurring = kanban.command("recurring").description("Manage recurring kanban
|
|
|
5963
6051
|
recurring.command("add <title>").description("Create a recurring kanban task").requiredOption("--agent <code-name>", "Agent code name").requiredOption("--every <schedule>", 'Schedule: "every Monday at 9am", "daily at 8:30am", "every 2 hours", or cron').option("--priority <1|2|3>", "Priority: 1=high, 2=medium, 3=low", "2").option("--description <text>", "Task description").option("--estimate <minutes>", "Estimated time in minutes").option("--deliverable <text>", "Expected output/deliverable").option("--timezone <tz>", "Timezone (default: UTC)").action(kanbanRecurringAddCommand);
|
|
5964
6052
|
recurring.command("list").description("List recurring kanban templates for an agent").requiredOption("--agent <code-name>", "Agent code name").action(kanbanRecurringListCommand);
|
|
5965
6053
|
recurring.command("disable <title-or-id>").description("Disable a recurring kanban template").requiredOption("--agent <code-name>", "Agent code name").action(kanbanRecurringDisableCommand);
|
|
6054
|
+
var anchor = program.command("anchor").description("Anchor Browser persistent-profile tools");
|
|
6055
|
+
anchor.command("onboard <profile>").description("One-time live-view login to save an authenticated Anchor profile (agent then resumes it with no re-auth)").option("--api-base <url>", "Override the Anchor API base URL").option("--no-sticky-ip", "Do not request a dedicated sticky IP for the session").action(
|
|
6056
|
+
(profile, opts) => anchorOnboardCommand(profile, { apiBase: opts.apiBase, stickyIp: opts.stickyIp })
|
|
6057
|
+
);
|
|
5966
6058
|
var integration = program.command("integration").description("Manage integrations \u2014 install, configure, and control permission scopes");
|
|
5967
6059
|
integration.command("list").description("List available integrations for the active team").action(integrationListCommand);
|
|
5968
6060
|
integration.command("show <slug>").description("Show integration details including permission scopes").action(integrationShowCommand);
|