@integrity-labs/agt-cli 0.27.169 → 0.27.170
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 -257
- package/dist/bin/agt.js.map +1 -1
- package/dist/{chunk-4ULNASXC.js → chunk-BMQQ63W2.js} +2 -177
- package/dist/chunk-BMQQ63W2.js.map +1 -0
- package/dist/{chunk-4DWE64OJ.js → chunk-U6LHLWWG.js} +2 -2
- package/dist/{chunk-L2UTBXZS.js → chunk-YX35EONG.js} +13 -1
- package/dist/{chunk-L2UTBXZS.js.map → chunk-YX35EONG.js.map} +1 -1
- package/dist/{claude-pair-runtime-MO75D7NS.js → claude-pair-runtime-IDCPU7YT.js} +2 -2
- package/dist/lib/manager-worker.js +10 -17
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/{persistent-session-V7ZLGIRQ.js → persistent-session-YQTDRXSB.js} +3 -7
- package/dist/{responsiveness-probe-3QYT7HXT.js → responsiveness-probe-IGQQFMSC.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-4ULNASXC.js.map +0 -1
- /package/dist/{chunk-4DWE64OJ.js.map → chunk-U6LHLWWG.js.map} +0 -0
- /package/dist/{claude-pair-runtime-MO75D7NS.js.map → claude-pair-runtime-IDCPU7YT.js.map} +0 -0
- /package/dist/{persistent-session-V7ZLGIRQ.js.map → persistent-session-YQTDRXSB.js.map} +0 -0
- /package/dist/{responsiveness-probe-3QYT7HXT.js.map → responsiveness-probe-IGQQFMSC.js.map} +0 -0
package/dist/bin/agt.js
CHANGED
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
success,
|
|
34
34
|
table,
|
|
35
35
|
warn
|
|
36
|
-
} from "../chunk-
|
|
36
|
+
} from "../chunk-U6LHLWWG.js";
|
|
37
37
|
import {
|
|
38
38
|
CHANNEL_REGISTRY,
|
|
39
39
|
DEPLOYMENT_TEMPLATES,
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
renderTemplate,
|
|
61
61
|
resolveChannels,
|
|
62
62
|
serializeManifestForSlackCli
|
|
63
|
-
} from "../chunk-
|
|
63
|
+
} from "../chunk-YX35EONG.js";
|
|
64
64
|
|
|
65
65
|
// src/bin/agt.ts
|
|
66
66
|
import { join as join21 } from "path";
|
|
@@ -4768,258 +4768,12 @@ async function kanbanDoneCommand(titleOrId, opts) {
|
|
|
4768
4768
|
}
|
|
4769
4769
|
}
|
|
4770
4770
|
|
|
4771
|
-
// ../../packages/core/dist/acp/agent-registry.js
|
|
4772
|
-
var ACP_AGENT_REGISTRY = [
|
|
4773
|
-
{
|
|
4774
|
-
name: "claude",
|
|
4775
|
-
label: "Claude Code",
|
|
4776
|
-
adapter_package: "claude-agent-acp",
|
|
4777
|
-
command: "npx",
|
|
4778
|
-
args: ["-y", "claude-agent-acp"],
|
|
4779
|
-
type: "npx-wrapper"
|
|
4780
|
-
},
|
|
4781
|
-
{
|
|
4782
|
-
name: "openclaw",
|
|
4783
|
-
label: "OpenClaw",
|
|
4784
|
-
command: "openclaw",
|
|
4785
|
-
args: ["acp"],
|
|
4786
|
-
type: "native"
|
|
4787
|
-
},
|
|
4788
|
-
{
|
|
4789
|
-
name: "codex",
|
|
4790
|
-
label: "Codex",
|
|
4791
|
-
adapter_package: "codex-acp",
|
|
4792
|
-
command: "npx",
|
|
4793
|
-
args: ["-y", "codex-acp"],
|
|
4794
|
-
type: "npx-wrapper"
|
|
4795
|
-
}
|
|
4796
|
-
];
|
|
4797
|
-
var agentMap = new Map(ACP_AGENT_REGISTRY.map((a) => [a.name, a]));
|
|
4798
|
-
function getAcpAgent(name) {
|
|
4799
|
-
return agentMap.get(name);
|
|
4800
|
-
}
|
|
4801
|
-
|
|
4802
|
-
// ../../packages/core/dist/acp/client.js
|
|
4803
|
-
import { spawn as spawn3 } from "child_process";
|
|
4804
|
-
function resolveAgentCommand(agentName) {
|
|
4805
|
-
const adapter = getAcpAgent(agentName);
|
|
4806
|
-
if (adapter) {
|
|
4807
|
-
return {
|
|
4808
|
-
command: "acpx",
|
|
4809
|
-
args: [adapter.name]
|
|
4810
|
-
};
|
|
4811
|
-
}
|
|
4812
|
-
return {
|
|
4813
|
-
command: "acpx",
|
|
4814
|
-
args: ["--agent", agentName]
|
|
4815
|
-
};
|
|
4816
|
-
}
|
|
4817
|
-
async function runAcpx(args, options = {}) {
|
|
4818
|
-
return new Promise((resolve2) => {
|
|
4819
|
-
const child = spawn3("acpx", args, {
|
|
4820
|
-
cwd: options.cwd,
|
|
4821
|
-
stdio: ["pipe", "pipe", "pipe"],
|
|
4822
|
-
env: { ...process.env }
|
|
4823
|
-
});
|
|
4824
|
-
let stdout = "";
|
|
4825
|
-
let stderr = "";
|
|
4826
|
-
const events = [];
|
|
4827
|
-
child.stdout?.on("data", (data) => {
|
|
4828
|
-
const chunk = data.toString();
|
|
4829
|
-
stdout += chunk;
|
|
4830
|
-
for (const line of chunk.split("\n").filter(Boolean)) {
|
|
4831
|
-
try {
|
|
4832
|
-
const parsed = JSON.parse(line);
|
|
4833
|
-
if (parsed.eventVersion === 1) {
|
|
4834
|
-
events.push(parsed);
|
|
4835
|
-
}
|
|
4836
|
-
} catch {
|
|
4837
|
-
}
|
|
4838
|
-
}
|
|
4839
|
-
});
|
|
4840
|
-
child.stderr?.on("data", (data) => {
|
|
4841
|
-
stderr += data.toString();
|
|
4842
|
-
});
|
|
4843
|
-
const timer = options.timeout ? setTimeout(() => child.kill("SIGTERM"), options.timeout * 1e3) : void 0;
|
|
4844
|
-
child.on("close", (code) => {
|
|
4845
|
-
if (timer)
|
|
4846
|
-
clearTimeout(timer);
|
|
4847
|
-
resolve2({ exitCode: code ?? 1, stdout, stderr, events });
|
|
4848
|
-
});
|
|
4849
|
-
});
|
|
4850
|
-
}
|
|
4851
|
-
async function acpSpawnSession(opts) {
|
|
4852
|
-
const { command: _cmd, args: agentArgs } = resolveAgentCommand(opts.agent);
|
|
4853
|
-
const args = [...agentArgs, "sessions", "ensure"];
|
|
4854
|
-
if (opts.sessionName)
|
|
4855
|
-
args.push("-s", opts.sessionName);
|
|
4856
|
-
if (opts.approveAll)
|
|
4857
|
-
args.unshift("--approve-all");
|
|
4858
|
-
if (opts.ttl !== void 0)
|
|
4859
|
-
args.unshift("--ttl", String(opts.ttl));
|
|
4860
|
-
args.unshift("--format", "json");
|
|
4861
|
-
return runAcpx(args, { cwd: opts.cwd });
|
|
4862
|
-
}
|
|
4863
|
-
async function acpPrompt(opts) {
|
|
4864
|
-
const { command: _cmd, args: agentArgs } = resolveAgentCommand(opts.agent);
|
|
4865
|
-
const args = [...agentArgs, "prompt", opts.prompt];
|
|
4866
|
-
if (opts.sessionName)
|
|
4867
|
-
args.push("-s", opts.sessionName);
|
|
4868
|
-
if (opts.noWait)
|
|
4869
|
-
args.push("--no-wait");
|
|
4870
|
-
if (opts.format)
|
|
4871
|
-
args.unshift("--format", opts.format);
|
|
4872
|
-
if (opts.timeout)
|
|
4873
|
-
args.unshift("--timeout", String(opts.timeout));
|
|
4874
|
-
return runAcpx(args, { cwd: opts.cwd, timeout: opts.timeout });
|
|
4875
|
-
}
|
|
4876
|
-
async function acpExec(agent2, prompt, options = {}) {
|
|
4877
|
-
const { command: _cmd, args: agentArgs } = resolveAgentCommand(agent2);
|
|
4878
|
-
const args = [...agentArgs, "exec", prompt];
|
|
4879
|
-
if (options.format)
|
|
4880
|
-
args.unshift("--format", options.format);
|
|
4881
|
-
if (options.timeout)
|
|
4882
|
-
args.unshift("--timeout", String(options.timeout));
|
|
4883
|
-
return runAcpx(args, { cwd: options.cwd, timeout: options.timeout });
|
|
4884
|
-
}
|
|
4885
|
-
async function acpListSessions(agent2, options = {}) {
|
|
4886
|
-
const { command: _cmd, args: agentArgs } = resolveAgentCommand(agent2);
|
|
4887
|
-
const args = [...agentArgs, "sessions", "list", "--format", "json"];
|
|
4888
|
-
return runAcpx(args, { cwd: options.cwd });
|
|
4889
|
-
}
|
|
4890
|
-
async function acpCancel(agent2, options = {}) {
|
|
4891
|
-
const { command: _cmd, args: agentArgs } = resolveAgentCommand(agent2);
|
|
4892
|
-
const args = [...agentArgs, "cancel"];
|
|
4893
|
-
if (options.sessionName)
|
|
4894
|
-
args.push("-s", options.sessionName);
|
|
4895
|
-
return runAcpx(args, { cwd: options.cwd });
|
|
4896
|
-
}
|
|
4897
|
-
async function acpCloseSession(agent2, options = {}) {
|
|
4898
|
-
const { command: _cmd, args: agentArgs } = resolveAgentCommand(agent2);
|
|
4899
|
-
const args = [...agentArgs, "sessions", "close"];
|
|
4900
|
-
if (options.sessionName)
|
|
4901
|
-
args.push(options.sessionName);
|
|
4902
|
-
return runAcpx(args, { cwd: options.cwd });
|
|
4903
|
-
}
|
|
4904
|
-
|
|
4905
|
-
// src/commands/acpx.ts
|
|
4906
|
-
async function acpxSpawnCommand(agent2, _opts, cmd) {
|
|
4907
|
-
const parentOpts = cmd.parent.opts();
|
|
4908
|
-
const cwd = parentOpts.cwd ?? process.cwd();
|
|
4909
|
-
const sessionName = parentOpts.name;
|
|
4910
|
-
const approveAll = Boolean(parentOpts.approveAll);
|
|
4911
|
-
const ttl = parentOpts.ttl !== void 0 ? Number(parentOpts.ttl) : void 0;
|
|
4912
|
-
info(`Spawning ACP session for "${agent2}"...`);
|
|
4913
|
-
const result = await acpSpawnSession({
|
|
4914
|
-
agent: agent2,
|
|
4915
|
-
cwd,
|
|
4916
|
-
sessionName,
|
|
4917
|
-
approveAll,
|
|
4918
|
-
ttl
|
|
4919
|
-
});
|
|
4920
|
-
if (result.exitCode !== 0) {
|
|
4921
|
-
error(`Failed to spawn session: ${result.stderr || "unknown error"}`);
|
|
4922
|
-
process.exitCode = 1;
|
|
4923
|
-
return;
|
|
4924
|
-
}
|
|
4925
|
-
if (isJsonMode()) {
|
|
4926
|
-
process.stdout.write(result.stdout);
|
|
4927
|
-
} else {
|
|
4928
|
-
success(`ACP session spawned for "${agent2}"`);
|
|
4929
|
-
if (sessionName) info(`Session name: ${sessionName}`);
|
|
4930
|
-
info(`Working directory: ${cwd}`);
|
|
4931
|
-
}
|
|
4932
|
-
}
|
|
4933
|
-
async function acpxPromptCommand(agent2, prompt, _opts, cmd) {
|
|
4934
|
-
const parentOpts = cmd.parent.opts();
|
|
4935
|
-
const cwd = parentOpts.cwd ?? process.cwd();
|
|
4936
|
-
const sessionName = parentOpts.name;
|
|
4937
|
-
const format = parentOpts.format ?? "text";
|
|
4938
|
-
const noWait = Boolean(parentOpts.noWait);
|
|
4939
|
-
const timeout = parentOpts.timeout !== void 0 ? Number(parentOpts.timeout) : void 0;
|
|
4940
|
-
if (!isJsonMode()) info(`Sending prompt to "${agent2}"...`);
|
|
4941
|
-
const result = await acpPrompt({
|
|
4942
|
-
agent: agent2,
|
|
4943
|
-
prompt,
|
|
4944
|
-
cwd,
|
|
4945
|
-
sessionName,
|
|
4946
|
-
format,
|
|
4947
|
-
noWait,
|
|
4948
|
-
timeout
|
|
4949
|
-
});
|
|
4950
|
-
process.stdout.write(result.stdout);
|
|
4951
|
-
if (result.stderr) process.stderr.write(result.stderr);
|
|
4952
|
-
process.exitCode = result.exitCode;
|
|
4953
|
-
}
|
|
4954
|
-
async function acpxExecCommand(agent2, prompt, _opts, cmd) {
|
|
4955
|
-
const parentOpts = cmd.parent.opts();
|
|
4956
|
-
const cwd = parentOpts.cwd ?? process.cwd();
|
|
4957
|
-
const format = parentOpts.format ?? "text";
|
|
4958
|
-
const timeout = parentOpts.timeout !== void 0 ? Number(parentOpts.timeout) : void 0;
|
|
4959
|
-
if (!isJsonMode()) info(`Running one-shot exec with "${agent2}"...`);
|
|
4960
|
-
const result = await acpExec(agent2, prompt, { cwd, format, timeout });
|
|
4961
|
-
process.stdout.write(result.stdout);
|
|
4962
|
-
if (result.stderr) process.stderr.write(result.stderr);
|
|
4963
|
-
process.exitCode = result.exitCode;
|
|
4964
|
-
}
|
|
4965
|
-
async function acpxListSessionsCommand(agent2, _opts, cmd) {
|
|
4966
|
-
const parentOpts = cmd.parent.opts();
|
|
4967
|
-
const cwd = parentOpts.cwd ?? process.cwd();
|
|
4968
|
-
const result = await acpListSessions(agent2, { cwd });
|
|
4969
|
-
if (isJsonMode()) {
|
|
4970
|
-
process.stdout.write(result.stdout);
|
|
4971
|
-
} else {
|
|
4972
|
-
if (result.exitCode !== 0) {
|
|
4973
|
-
error(`Failed to list sessions: ${result.stderr || "unknown error"}`);
|
|
4974
|
-
process.exitCode = 1;
|
|
4975
|
-
return;
|
|
4976
|
-
}
|
|
4977
|
-
try {
|
|
4978
|
-
const sessions = JSON.parse(result.stdout);
|
|
4979
|
-
if (Array.isArray(sessions) && sessions.length > 0) {
|
|
4980
|
-
info(`Active sessions for "${agent2}":`);
|
|
4981
|
-
process.stdout.write(result.stdout);
|
|
4982
|
-
} else {
|
|
4983
|
-
info(`No active sessions for "${agent2}".`);
|
|
4984
|
-
}
|
|
4985
|
-
} catch {
|
|
4986
|
-
process.stdout.write(result.stdout);
|
|
4987
|
-
}
|
|
4988
|
-
}
|
|
4989
|
-
}
|
|
4990
|
-
async function acpxCancelCommand(agent2, _opts, cmd) {
|
|
4991
|
-
const parentOpts = cmd.parent.opts();
|
|
4992
|
-
const cwd = parentOpts.cwd ?? process.cwd();
|
|
4993
|
-
const sessionName = parentOpts.name;
|
|
4994
|
-
info(`Sending cancel to "${agent2}"...`);
|
|
4995
|
-
const result = await acpCancel(agent2, { cwd, sessionName });
|
|
4996
|
-
if (result.exitCode !== 0) {
|
|
4997
|
-
error(`Cancel failed: ${result.stderr || "unknown error"}`);
|
|
4998
|
-
process.exitCode = 1;
|
|
4999
|
-
return;
|
|
5000
|
-
}
|
|
5001
|
-
success("Cancel sent (cooperative).");
|
|
5002
|
-
}
|
|
5003
|
-
async function acpxCloseCommand(agent2, _opts, cmd) {
|
|
5004
|
-
const parentOpts = cmd.parent.opts();
|
|
5005
|
-
const cwd = parentOpts.cwd ?? process.cwd();
|
|
5006
|
-
const sessionName = parentOpts.name;
|
|
5007
|
-
info(`Closing ACP session for "${agent2}"...`);
|
|
5008
|
-
const result = await acpCloseSession(agent2, { cwd, sessionName });
|
|
5009
|
-
if (result.exitCode !== 0) {
|
|
5010
|
-
error(`Close failed: ${result.stderr || "unknown error"}`);
|
|
5011
|
-
process.exitCode = 1;
|
|
5012
|
-
return;
|
|
5013
|
-
}
|
|
5014
|
-
success("Session closed (soft-close \u2014 history retained).");
|
|
5015
|
-
}
|
|
5016
|
-
|
|
5017
4771
|
// src/commands/update.ts
|
|
5018
4772
|
import { execFileSync, execSync } from "child_process";
|
|
5019
4773
|
import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
|
|
5020
4774
|
import chalk18 from "chalk";
|
|
5021
4775
|
import ora16 from "ora";
|
|
5022
|
-
var cliVersion = true ? "0.27.
|
|
4776
|
+
var cliVersion = true ? "0.27.170" : "dev";
|
|
5023
4777
|
async function fetchLatestVersion() {
|
|
5024
4778
|
const host2 = getHost();
|
|
5025
4779
|
if (!host2) return null;
|
|
@@ -5942,7 +5696,7 @@ function handleError(err) {
|
|
|
5942
5696
|
}
|
|
5943
5697
|
|
|
5944
5698
|
// src/bin/agt.ts
|
|
5945
|
-
var cliVersion2 = true ? "0.27.
|
|
5699
|
+
var cliVersion2 = true ? "0.27.170" : "dev";
|
|
5946
5700
|
var program = new Command();
|
|
5947
5701
|
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");
|
|
5948
5702
|
program.hook("preAction", async (thisCommand, actionCommand) => {
|
|
@@ -6059,13 +5813,6 @@ var recurring = kanban.command("recurring").description("Manage recurring kanban
|
|
|
6059
5813
|
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);
|
|
6060
5814
|
recurring.command("list").description("List recurring kanban templates for an agent").requiredOption("--agent <code-name>", "Agent code name").action(kanbanRecurringListCommand);
|
|
6061
5815
|
recurring.command("disable <title-or-id>").description("Disable a recurring kanban template").requiredOption("--agent <code-name>", "Agent code name").action(kanbanRecurringDisableCommand);
|
|
6062
|
-
var acpx = program.command("acpx").description("Agent Client Protocol (ACP) session management via acpx").option("--cwd <path>", "Working directory for session routing").option("-s, --name <name>", "Named session for parallel workstreams").option("--approve-all", "Auto-approve all agent tool permissions").option("--format <type>", "Output format: text | json | json-strict | quiet", "text").option("--ttl <seconds>", "Queue owner idle TTL in seconds (0 = indefinite)").option("--timeout <seconds>", "Prompt execution timeout").option("--no-wait", "Submit prompt without waiting for completion");
|
|
6063
|
-
acpx.command("spawn <agent>").description("Spawn or ensure an ACP session for an agent (claude, codex, openclaw)").action(acpxSpawnCommand);
|
|
6064
|
-
acpx.command("prompt <agent> <prompt>").description("Send a prompt to an ACP session").action(acpxPromptCommand);
|
|
6065
|
-
acpx.command("exec <agent> <prompt>").description("One-shot execution (no session reuse)").action(acpxExecCommand);
|
|
6066
|
-
acpx.command("list-sessions <agent>").description("List active ACP sessions for an agent").action(acpxListSessionsCommand);
|
|
6067
|
-
acpx.command("cancel <agent>").description("Send cooperative cancel to the running ACP session").action(acpxCancelCommand);
|
|
6068
|
-
acpx.command("close <agent>").description("Soft-close an ACP session (preserves history)").action(acpxCloseCommand);
|
|
6069
5816
|
var integration = program.command("integration").description("Manage integrations \u2014 install, configure, and control permission scopes");
|
|
6070
5817
|
integration.command("list").description("List available integrations for the active team").action(integrationListCommand);
|
|
6071
5818
|
integration.command("show <slug>").description("Show integration details including permission scopes").action(integrationShowCommand);
|