@integrity-labs/agt-cli 0.27.133 → 0.27.135

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-HC7B2OVZ.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-KZGU4X3A.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.135" : "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.135" : "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) => {
@@ -9,7 +9,7 @@ import {
9
9
  parseDeliveryTarget,
10
10
  registerFramework,
11
11
  wrapScheduledTaskPrompt
12
- } from "./chunk-TRGX4NVZ.js";
12
+ } from "./chunk-KZGU4X3A.js";
13
13
 
14
14
  // ../../packages/core/dist/integrations/registry.js
15
15
  var INTEGRATION_REGISTRY = [
@@ -7725,4 +7725,4 @@ export {
7725
7725
  managerInstallSystemUnitCommand,
7726
7726
  managerUninstallSystemUnitCommand
7727
7727
  };
7728
- //# sourceMappingURL=chunk-I2GFFKMO.js.map
7728
+ //# sourceMappingURL=chunk-HC7B2OVZ.js.map
@@ -381,6 +381,8 @@ function claudeModelAlias(primaryModel) {
381
381
  const name = (primaryModel.split("/").pop() ?? "").trim().toLowerCase();
382
382
  if (!name)
383
383
  return null;
384
+ if (name.includes("fable"))
385
+ return "fable";
384
386
  if (name.includes("opus"))
385
387
  return "opus";
386
388
  if (name.includes("sonnet"))
@@ -1451,21 +1453,37 @@ var ACCOUNT_RESOLUTION_ERROR_PATTERNS = [
1451
1453
  "auth config",
1452
1454
  "no connection found"
1453
1455
  ];
1456
+ function isReadonlyToolDescriptor(t) {
1457
+ if (!t?.name)
1458
+ return false;
1459
+ const tokens = t.name.toUpperCase().split(/[^A-Z0-9]+/).filter(Boolean);
1460
+ const hasReadVerb = tokens.some((tok) => READONLY_VERB_TOKENS.includes(tok));
1461
+ if (!hasReadVerb)
1462
+ return false;
1463
+ const required = t.inputSchema?.required ?? [];
1464
+ return !(Array.isArray(required) && required.length > 0);
1465
+ }
1454
1466
  function pickSafeReadonlyTool(tools) {
1455
1467
  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;
1468
+ if (isReadonlyToolDescriptor(t))
1469
+ return t.name;
1466
1470
  }
1467
1471
  return null;
1468
1472
  }
1473
+ function resolveProbeTool(tools, override) {
1474
+ const requested = override?.tool?.trim();
1475
+ if (!requested) {
1476
+ return { toolName: pickSafeReadonlyTool(tools), args: {} };
1477
+ }
1478
+ const match = tools.find((t) => t?.name === requested);
1479
+ if (!match) {
1480
+ return { toolName: pickSafeReadonlyTool(tools), args: {}, fallback: "seed-drift", requestedTool: requested };
1481
+ }
1482
+ if (!isReadonlyToolDescriptor(match)) {
1483
+ return { toolName: pickSafeReadonlyTool(tools), args: {}, fallback: "seed-invalid", requestedTool: requested };
1484
+ }
1485
+ return { toolName: requested, args: override?.args ?? {}, requestedTool: requested };
1486
+ }
1469
1487
  function isAccountResolutionError(message) {
1470
1488
  const m = message.toLowerCase();
1471
1489
  return ACCOUNT_RESOLUTION_ERROR_PATTERNS.some((p) => m.includes(p));
@@ -1544,9 +1562,14 @@ async function probeComposioMcpToolCall(config, fetchImpl = fetch) {
1544
1562
  }
1545
1563
  const listRpc = await parseRpc(listRes, 2);
1546
1564
  const tools = listRpc?.["result"]?.tools ?? [];
1547
- const toolName = pickSafeReadonlyTool(tools);
1565
+ const resolved = resolveProbeTool(tools, { tool: config.toolName, args: config.toolArgs });
1566
+ const toolName = resolved.toolName;
1548
1567
  if (!toolName)
1549
1568
  return null;
1569
+ const baseDetails = {
1570
+ tool: toolName,
1571
+ ...resolved.fallback ? { override_fallback: resolved.fallback, requested_tool: resolved.requestedTool } : {}
1572
+ };
1550
1573
  const callRes = await fetchImpl(config.url, {
1551
1574
  method: "POST",
1552
1575
  headers: sessionHeaders,
@@ -1554,7 +1577,7 @@ async function probeComposioMcpToolCall(config, fetchImpl = fetch) {
1554
1577
  jsonrpc: "2.0",
1555
1578
  id: 3,
1556
1579
  method: "tools/call",
1557
- params: { name: toolName, arguments: {} }
1580
+ params: { name: toolName, arguments: resolved.args }
1558
1581
  }),
1559
1582
  signal: AbortSignal.timeout(timeoutMs)
1560
1583
  });
@@ -1562,16 +1585,23 @@ async function probeComposioMcpToolCall(config, fetchImpl = fetch) {
1562
1585
  return callRes.status >= 500 ? { status: "transient_error", message: `MCP tools/call returned ${callRes.status}` } : null;
1563
1586
  }
1564
1587
  const callRpc = await parseRpc(callRes, 3);
1588
+ {
1589
+ const errText = callRpc?.["error"]?.message;
1590
+ const resContent = callRpc?.["result"]?.content;
1591
+ const raw = errText ?? (resContent ?? []).map((c) => c.text ?? "").join(" ").trim();
1592
+ if (raw)
1593
+ baseDetails.response = raw.length > 600 ? `${raw.slice(0, 600)}\u2026` : raw;
1594
+ }
1565
1595
  if (callRpc && "error" in callRpc) {
1566
1596
  const errMsg = callRpc["error"]?.message ?? "";
1567
1597
  if (isAccountResolutionError(errMsg)) {
1568
1598
  return {
1569
1599
  status: "down",
1570
1600
  message: `Live tool call '${toolName}' failed to resolve the connected account: ${errMsg}`,
1571
- details: { tool: toolName }
1601
+ details: baseDetails
1572
1602
  };
1573
1603
  }
1574
- return { status: "ok", message: `Live tool call '${toolName}' resolved the account (tool error: ${errMsg})`, details: { tool: toolName } };
1604
+ return { status: "ok", message: `Live tool call '${toolName}' resolved the account (tool error: ${errMsg})`, details: baseDetails };
1575
1605
  }
1576
1606
  const result = callRpc?.["result"];
1577
1607
  if (result?.isError) {
@@ -1580,12 +1610,12 @@ async function probeComposioMcpToolCall(config, fetchImpl = fetch) {
1580
1610
  return {
1581
1611
  status: "down",
1582
1612
  message: `Live tool call '${toolName}' failed to resolve the connected account: ${text}`,
1583
- details: { tool: toolName }
1613
+ details: baseDetails
1584
1614
  };
1585
1615
  }
1586
- return { status: "ok", message: `Live tool call '${toolName}' resolved the account (tool error)`, details: { tool: toolName } };
1616
+ return { status: "ok", message: `Live tool call '${toolName}' resolved the account (tool error)`, details: baseDetails };
1587
1617
  }
1588
- return { status: "ok", message: `Live tool call '${toolName}' resolved the connected account`, details: { tool: toolName } };
1618
+ return { status: "ok", message: `Live tool call '${toolName}' resolved the connected account`, details: baseDetails };
1589
1619
  } catch (err) {
1590
1620
  const isAbort = err?.name === "TimeoutError" || err?.name === "AbortError";
1591
1621
  return {
@@ -1908,9 +1938,19 @@ var CLI_PROBE_ARGS = {
1908
1938
  github: ["auth", "status"]
1909
1939
  // most CLIs respond to --version; override here only when they don't.
1910
1940
  };
1911
- function cliArgsFor(definitionId) {
1941
+ function cliArgsFor(definitionId, ct) {
1942
+ if (Array.isArray(ct?.args) && ct.args.length > 0 && ct.args.every((a) => typeof a === "string")) {
1943
+ return ct.args;
1944
+ }
1912
1945
  return CLI_PROBE_ARGS[definitionId] ?? ["--version"];
1913
1946
  }
1947
+ function mcpOverrideFrom(ct) {
1948
+ const tool = typeof ct?.tool === "string" && ct.tool.trim().length > 0 ? ct.tool.trim() : void 0;
1949
+ if (!tool)
1950
+ return {};
1951
+ const args = ct?.args && typeof ct.args === "object" && !Array.isArray(ct.args) ? ct.args : void 0;
1952
+ return { probeTool: tool, ...args ? { probeArgs: args } : {} };
1953
+ }
1914
1954
  function resolveConnectivityProbe(input) {
1915
1955
  const { definitionId, sourceType, authType } = input;
1916
1956
  if (authType === "managed" || sourceType === "managed") {
@@ -1919,7 +1959,10 @@ function resolveConnectivityProbe(input) {
1919
1959
  sourceType: "managed",
1920
1960
  readOnly: true,
1921
1961
  label: `${definitionId}: MCP tools/list + account binding (managed)`,
1922
- centralReachable: false
1962
+ centralReachable: false,
1963
+ // ENG-6212: carry the operator-stored override tool (if any) so both the
1964
+ // host executor and the central Test path call the same specific tool.
1965
+ ...mcpOverrideFrom(input.connectivityTest)
1923
1966
  };
1924
1967
  }
1925
1968
  if (HTTP_PROBE_PROVIDERS.has(definitionId)) {
@@ -1957,7 +2000,7 @@ function resolveConnectivityProbe(input) {
1957
2000
  readOnly: true,
1958
2001
  label: `${definitionId}: CLI reachability`,
1959
2002
  centralReachable: false,
1960
- cliArgs: cliArgsFor(definitionId)
2003
+ cliArgs: cliArgsFor(definitionId, input.connectivityTest)
1961
2004
  };
1962
2005
  case "native":
1963
2006
  return {
@@ -2947,7 +2990,7 @@ var integration_metadata_v1_default = {
2947
2990
  auth_mode: {
2948
2991
  type: "string",
2949
2992
  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)."
2993
+ 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
2994
  }
2952
2995
  }
2953
2996
  }
@@ -3401,21 +3444,21 @@ function runCrossFileRules(charter, tools) {
3401
3444
  if (charter.environment === "prod" || charter.risk_tier === "High") {
3402
3445
  for (let i = 0; i < tools.tools.length; i++) {
3403
3446
  const tool = tools.tools[i];
3404
- if (isHereNowAccountPublishTool(tool.id)) {
3447
+ if (isAgtLivePublishTool(tool.id)) {
3405
3448
  diagnostics.push({
3406
3449
  file: "CHARTER.md + TOOLS.md",
3407
3450
  code: "TOOLS.PUBLISH.PUBLIC_EXPOSURE",
3408
3451
  path: `tools[${i}].id`,
3409
3452
  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.`
3453
+ 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
3454
  });
3412
3455
  }
3413
3456
  }
3414
3457
  }
3415
3458
  return diagnostics;
3416
3459
  }
3417
- function isHereNowAccountPublishTool(id) {
3418
- return /^here-now-(publish-account|account-publish)$/.test(id);
3460
+ function isAgtLivePublishTool(id) {
3461
+ return /^agt-live-publish(-account)?$/.test(id);
3419
3462
  }
3420
3463
 
3421
3464
  // ../../packages/core/dist/lint/rules/multi-agent.js
@@ -4684,4 +4727,4 @@ export {
4684
4727
  attributeTranscriptUsageByRun,
4685
4728
  KANBAN_CHECK_COMMAND
4686
4729
  };
4687
- //# sourceMappingURL=chunk-TRGX4NVZ.js.map
4730
+ //# sourceMappingURL=chunk-KZGU4X3A.js.map