@integrity-labs/agt-cli 0.27.133 → 0.27.134

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 CHANGED
@@ -28,7 +28,7 @@ import {
28
28
  success,
29
29
  table,
30
30
  warn
31
- } from "../chunk-I2GFFKMO.js";
31
+ } from "../chunk-4Y7APKV7.js";
32
32
  import {
33
33
  CHANNEL_REGISTRY,
34
34
  DEPLOYMENT_TEMPLATES,
@@ -54,7 +54,7 @@ import {
54
54
  renderTemplate,
55
55
  resolveChannels,
56
56
  serializeManifestForSlackCli
57
- } from "../chunk-TRGX4NVZ.js";
57
+ } from "../chunk-4I2QOVP5.js";
58
58
 
59
59
  // src/bin/agt.ts
60
60
  import { join as join20 } from "path";
@@ -4934,7 +4934,7 @@ import { execFileSync, execSync } from "child_process";
4934
4934
  import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
4935
4935
  import chalk18 from "chalk";
4936
4936
  import ora16 from "ora";
4937
- var cliVersion = true ? "0.27.133" : "dev";
4937
+ var cliVersion = true ? "0.27.134" : "dev";
4938
4938
  async function fetchLatestVersion() {
4939
4939
  const host2 = getHost();
4940
4940
  if (!host2) return null;
@@ -5857,7 +5857,7 @@ function handleError(err) {
5857
5857
  }
5858
5858
 
5859
5859
  // src/bin/agt.ts
5860
- var cliVersion2 = true ? "0.27.133" : "dev";
5860
+ var cliVersion2 = true ? "0.27.134" : "dev";
5861
5861
  var program = new Command();
5862
5862
  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");
5863
5863
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  claudeModelAlias,
3
3
  isClaudeFastMode
4
- } from "./chunk-TRGX4NVZ.js";
4
+ } from "./chunk-4I2QOVP5.js";
5
5
  import {
6
6
  reapOrphanChannelMcps
7
7
  } from "./chunk-XWVM4KPK.js";
@@ -1596,4 +1596,4 @@ export {
1596
1596
  stopAllSessionsAndWait,
1597
1597
  getProjectDir
1598
1598
  };
1599
- //# sourceMappingURL=chunk-DBJWD2LU.js.map
1599
+ //# sourceMappingURL=chunk-2MXDQBEH.js.map
@@ -1451,21 +1451,37 @@ var ACCOUNT_RESOLUTION_ERROR_PATTERNS = [
1451
1451
  "auth config",
1452
1452
  "no connection found"
1453
1453
  ];
1454
+ function isReadonlyToolDescriptor(t) {
1455
+ if (!t?.name)
1456
+ return false;
1457
+ const tokens = t.name.toUpperCase().split(/[^A-Z0-9]+/).filter(Boolean);
1458
+ const hasReadVerb = tokens.some((tok) => READONLY_VERB_TOKENS.includes(tok));
1459
+ if (!hasReadVerb)
1460
+ return false;
1461
+ const required = t.inputSchema?.required ?? [];
1462
+ return !(Array.isArray(required) && required.length > 0);
1463
+ }
1454
1464
  function pickSafeReadonlyTool(tools) {
1455
1465
  for (const t of tools) {
1456
- if (!t?.name)
1457
- continue;
1458
- const upper = t.name.toUpperCase();
1459
- const hasReadVerb = READONLY_VERB_TOKENS.some((v) => upper.includes(v));
1460
- if (!hasReadVerb)
1461
- continue;
1462
- const required = t.inputSchema?.required ?? [];
1463
- if (Array.isArray(required) && required.length > 0)
1464
- continue;
1465
- return t.name;
1466
+ if (isReadonlyToolDescriptor(t))
1467
+ return t.name;
1466
1468
  }
1467
1469
  return null;
1468
1470
  }
1471
+ function resolveProbeTool(tools, override) {
1472
+ const requested = override?.tool?.trim();
1473
+ if (!requested) {
1474
+ return { toolName: pickSafeReadonlyTool(tools), args: {} };
1475
+ }
1476
+ const match = tools.find((t) => t?.name === requested);
1477
+ if (!match) {
1478
+ return { toolName: pickSafeReadonlyTool(tools), args: {}, fallback: "seed-drift", requestedTool: requested };
1479
+ }
1480
+ if (!isReadonlyToolDescriptor(match)) {
1481
+ return { toolName: pickSafeReadonlyTool(tools), args: {}, fallback: "seed-invalid", requestedTool: requested };
1482
+ }
1483
+ return { toolName: requested, args: override?.args ?? {}, requestedTool: requested };
1484
+ }
1469
1485
  function isAccountResolutionError(message) {
1470
1486
  const m = message.toLowerCase();
1471
1487
  return ACCOUNT_RESOLUTION_ERROR_PATTERNS.some((p) => m.includes(p));
@@ -1544,9 +1560,14 @@ async function probeComposioMcpToolCall(config, fetchImpl = fetch) {
1544
1560
  }
1545
1561
  const listRpc = await parseRpc(listRes, 2);
1546
1562
  const tools = listRpc?.["result"]?.tools ?? [];
1547
- const toolName = pickSafeReadonlyTool(tools);
1563
+ const resolved = resolveProbeTool(tools, { tool: config.toolName, args: config.toolArgs });
1564
+ const toolName = resolved.toolName;
1548
1565
  if (!toolName)
1549
1566
  return null;
1567
+ const baseDetails = {
1568
+ tool: toolName,
1569
+ ...resolved.fallback ? { override_fallback: resolved.fallback, requested_tool: resolved.requestedTool } : {}
1570
+ };
1550
1571
  const callRes = await fetchImpl(config.url, {
1551
1572
  method: "POST",
1552
1573
  headers: sessionHeaders,
@@ -1554,7 +1575,7 @@ async function probeComposioMcpToolCall(config, fetchImpl = fetch) {
1554
1575
  jsonrpc: "2.0",
1555
1576
  id: 3,
1556
1577
  method: "tools/call",
1557
- params: { name: toolName, arguments: {} }
1578
+ params: { name: toolName, arguments: resolved.args }
1558
1579
  }),
1559
1580
  signal: AbortSignal.timeout(timeoutMs)
1560
1581
  });
@@ -1562,16 +1583,23 @@ async function probeComposioMcpToolCall(config, fetchImpl = fetch) {
1562
1583
  return callRes.status >= 500 ? { status: "transient_error", message: `MCP tools/call returned ${callRes.status}` } : null;
1563
1584
  }
1564
1585
  const callRpc = await parseRpc(callRes, 3);
1586
+ {
1587
+ const errText = callRpc?.["error"]?.message;
1588
+ const resContent = callRpc?.["result"]?.content;
1589
+ const raw = errText ?? (resContent ?? []).map((c) => c.text ?? "").join(" ").trim();
1590
+ if (raw)
1591
+ baseDetails.response = raw.length > 600 ? `${raw.slice(0, 600)}\u2026` : raw;
1592
+ }
1565
1593
  if (callRpc && "error" in callRpc) {
1566
1594
  const errMsg = callRpc["error"]?.message ?? "";
1567
1595
  if (isAccountResolutionError(errMsg)) {
1568
1596
  return {
1569
1597
  status: "down",
1570
1598
  message: `Live tool call '${toolName}' failed to resolve the connected account: ${errMsg}`,
1571
- details: { tool: toolName }
1599
+ details: baseDetails
1572
1600
  };
1573
1601
  }
1574
- return { status: "ok", message: `Live tool call '${toolName}' resolved the account (tool error: ${errMsg})`, details: { tool: toolName } };
1602
+ return { status: "ok", message: `Live tool call '${toolName}' resolved the account (tool error: ${errMsg})`, details: baseDetails };
1575
1603
  }
1576
1604
  const result = callRpc?.["result"];
1577
1605
  if (result?.isError) {
@@ -1580,12 +1608,12 @@ async function probeComposioMcpToolCall(config, fetchImpl = fetch) {
1580
1608
  return {
1581
1609
  status: "down",
1582
1610
  message: `Live tool call '${toolName}' failed to resolve the connected account: ${text}`,
1583
- details: { tool: toolName }
1611
+ details: baseDetails
1584
1612
  };
1585
1613
  }
1586
- return { status: "ok", message: `Live tool call '${toolName}' resolved the account (tool error)`, details: { tool: toolName } };
1614
+ return { status: "ok", message: `Live tool call '${toolName}' resolved the account (tool error)`, details: baseDetails };
1587
1615
  }
1588
- return { status: "ok", message: `Live tool call '${toolName}' resolved the connected account`, details: { tool: toolName } };
1616
+ return { status: "ok", message: `Live tool call '${toolName}' resolved the connected account`, details: baseDetails };
1589
1617
  } catch (err) {
1590
1618
  const isAbort = err?.name === "TimeoutError" || err?.name === "AbortError";
1591
1619
  return {
@@ -1908,9 +1936,19 @@ var CLI_PROBE_ARGS = {
1908
1936
  github: ["auth", "status"]
1909
1937
  // most CLIs respond to --version; override here only when they don't.
1910
1938
  };
1911
- function cliArgsFor(definitionId) {
1939
+ function cliArgsFor(definitionId, ct) {
1940
+ if (Array.isArray(ct?.args) && ct.args.length > 0 && ct.args.every((a) => typeof a === "string")) {
1941
+ return ct.args;
1942
+ }
1912
1943
  return CLI_PROBE_ARGS[definitionId] ?? ["--version"];
1913
1944
  }
1945
+ function mcpOverrideFrom(ct) {
1946
+ const tool = typeof ct?.tool === "string" && ct.tool.trim().length > 0 ? ct.tool.trim() : void 0;
1947
+ if (!tool)
1948
+ return {};
1949
+ const args = ct?.args && typeof ct.args === "object" && !Array.isArray(ct.args) ? ct.args : void 0;
1950
+ return { probeTool: tool, ...args ? { probeArgs: args } : {} };
1951
+ }
1914
1952
  function resolveConnectivityProbe(input) {
1915
1953
  const { definitionId, sourceType, authType } = input;
1916
1954
  if (authType === "managed" || sourceType === "managed") {
@@ -1919,7 +1957,10 @@ function resolveConnectivityProbe(input) {
1919
1957
  sourceType: "managed",
1920
1958
  readOnly: true,
1921
1959
  label: `${definitionId}: MCP tools/list + account binding (managed)`,
1922
- centralReachable: false
1960
+ centralReachable: false,
1961
+ // ENG-6212: carry the operator-stored override tool (if any) so both the
1962
+ // host executor and the central Test path call the same specific tool.
1963
+ ...mcpOverrideFrom(input.connectivityTest)
1923
1964
  };
1924
1965
  }
1925
1966
  if (HTTP_PROBE_PROVIDERS.has(definitionId)) {
@@ -1957,7 +1998,7 @@ function resolveConnectivityProbe(input) {
1957
1998
  readOnly: true,
1958
1999
  label: `${definitionId}: CLI reachability`,
1959
2000
  centralReachable: false,
1960
- cliArgs: cliArgsFor(definitionId)
2001
+ cliArgs: cliArgsFor(definitionId, input.connectivityTest)
1961
2002
  };
1962
2003
  case "native":
1963
2004
  return {
@@ -2947,7 +2988,7 @@ var integration_metadata_v1_default = {
2947
2988
  auth_mode: {
2948
2989
  type: "string",
2949
2990
  enum: ["required", "optional"],
2950
- description: "ADR 0010 \u2014 per-tool credential expectation. `required` (default) makes the broker fail closed when no install credential is attached; `optional` lets the broker call the vendor without an `Authorization` header (used by here-now anonymous publish)."
2991
+ description: "ADR 0010 \u2014 per-tool credential expectation. `required` (default) makes the broker fail closed when no install credential is attached; `optional` lets the broker call the vendor without an `Authorization` header (used by keyless integrations such as Augmented Live)."
2951
2992
  }
2952
2993
  }
2953
2994
  }
@@ -3401,21 +3442,21 @@ function runCrossFileRules(charter, tools) {
3401
3442
  if (charter.environment === "prod" || charter.risk_tier === "High") {
3402
3443
  for (let i = 0; i < tools.tools.length; i++) {
3403
3444
  const tool = tools.tools[i];
3404
- if (isHereNowAccountPublishTool(tool.id)) {
3445
+ if (isAgtLivePublishTool(tool.id)) {
3405
3446
  diagnostics.push({
3406
3447
  file: "CHARTER.md + TOOLS.md",
3407
3448
  code: "TOOLS.PUBLISH.PUBLIC_EXPOSURE",
3408
3449
  path: `tools[${i}].id`,
3409
3450
  severity: "warning",
3410
- message: `Tool "${tool.id}" grants here.now account publishing (permanent, public) to a ${charter.environment === "prod" ? "production" : "High-risk-tier"} agent. Confirm the public-exposure surface is intended; consider the publish:anonymous scope (24h TTL) for non-permanent output.`
3451
+ message: `Tool "${tool.id}" grants Augmented Live publishing (permanent, public) to a ${charter.environment === "prod" ? "production" : "High-risk-tier"} agent. Confirm the public-exposure surface is intended before granting it.`
3411
3452
  });
3412
3453
  }
3413
3454
  }
3414
3455
  }
3415
3456
  return diagnostics;
3416
3457
  }
3417
- function isHereNowAccountPublishTool(id) {
3418
- return /^here-now-(publish-account|account-publish)$/.test(id);
3458
+ function isAgtLivePublishTool(id) {
3459
+ return /^agt-live-publish(-account)?$/.test(id);
3419
3460
  }
3420
3461
 
3421
3462
  // ../../packages/core/dist/lint/rules/multi-agent.js
@@ -4684,4 +4725,4 @@ export {
4684
4725
  attributeTranscriptUsageByRun,
4685
4726
  KANBAN_CHECK_COMMAND
4686
4727
  };
4687
- //# sourceMappingURL=chunk-TRGX4NVZ.js.map
4728
+ //# sourceMappingURL=chunk-4I2QOVP5.js.map