@integrity-labs/agt-cli 0.28.226 → 0.28.227

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
@@ -38,7 +38,7 @@ import {
38
38
  success,
39
39
  table,
40
40
  warn
41
- } from "../chunk-IRMBTIZO.js";
41
+ } from "../chunk-VUPYJ4WU.js";
42
42
  import {
43
43
  CHANNEL_REGISTRY,
44
44
  DEFAULT_FRAMEWORK,
@@ -67,7 +67,7 @@ import {
67
67
  renderTemplate,
68
68
  resolveChannels,
69
69
  serializeManifestForSlackCli
70
- } from "../chunk-C2EXC6LY.js";
70
+ } from "../chunk-VV5IXUN6.js";
71
71
  import "../chunk-XWVM4KPK.js";
72
72
 
73
73
  // src/bin/agt.ts
@@ -4826,7 +4826,7 @@ import { execFileSync, execSync } from "child_process";
4826
4826
  import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
4827
4827
  import chalk18 from "chalk";
4828
4828
  import ora16 from "ora";
4829
- var cliVersion = true ? "0.28.226" : "dev";
4829
+ var cliVersion = true ? "0.28.227" : "dev";
4830
4830
  async function fetchLatestVersion() {
4831
4831
  const host2 = getHost();
4832
4832
  if (!host2) return null;
@@ -5840,7 +5840,7 @@ function handleError(err) {
5840
5840
  }
5841
5841
 
5842
5842
  // src/bin/agt.ts
5843
- var cliVersion2 = true ? "0.28.226" : "dev";
5843
+ var cliVersion2 = true ? "0.28.227" : "dev";
5844
5844
  var program = new Command();
5845
5845
  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");
5846
5846
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -18,7 +18,7 @@ import {
18
18
  resolveConnectivityProbe,
19
19
  worseConnectivityOutcome,
20
20
  wrapScheduledTaskPrompt
21
- } from "./chunk-C2EXC6LY.js";
21
+ } from "./chunk-VV5IXUN6.js";
22
22
  import {
23
23
  parsePsRows
24
24
  } from "./chunk-XWVM4KPK.js";
@@ -5667,7 +5667,7 @@ function requireHost() {
5667
5667
  }
5668
5668
 
5669
5669
  // src/lib/api-client.ts
5670
- var agtCliVersion = true ? "0.28.226" : "dev";
5670
+ var agtCliVersion = true ? "0.28.227" : "dev";
5671
5671
  var lastConfigHash = null;
5672
5672
  function setConfigHash(hash) {
5673
5673
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -6784,7 +6784,13 @@ import { join as join6 } from "path";
6784
6784
  function classifyMcpServer(entry) {
6785
6785
  if (!entry || typeof entry !== "object") return "unknown";
6786
6786
  const e = entry;
6787
- if (typeof e.command === "string") return "stdio";
6787
+ if (typeof e.command === "string") {
6788
+ const env = e.env;
6789
+ if (env && typeof env === "object" && typeof env["AGT_REMOTE_MCP_URL"] === "string" && typeof env["AGT_REMOTE_MCP_TOKEN_VAR"] === "string") {
6790
+ return "oauth-proxy";
6791
+ }
6792
+ return "stdio";
6793
+ }
6788
6794
  if (typeof e.url === "string") return "http";
6789
6795
  return "unknown";
6790
6796
  }
@@ -6792,17 +6798,31 @@ function splitServerKeysByKind(mcpJson, serverKeys) {
6792
6798
  const servers = mcpJson?.mcpServers ?? {};
6793
6799
  const stdio = [];
6794
6800
  const http = [];
6801
+ const proxy = [];
6795
6802
  for (const key of serverKeys) {
6796
6803
  const kind = classifyMcpServer(servers[key]);
6797
6804
  if (kind === "stdio") stdio.push(key);
6798
6805
  else if (kind === "http") http.push(key);
6806
+ else if (kind === "oauth-proxy") proxy.push(key);
6799
6807
  }
6800
- return { stdio, http };
6808
+ return { stdio, http, proxy };
6801
6809
  }
6802
6810
  function computeSessionToolBindStatus(input) {
6803
- const { stdioServerKeys, httpServerKeys, missingStdioKeys, httpReachable, sessionLoadedServerKeys } = input;
6804
- if (stdioServerKeys.length === 0 && httpServerKeys.length === 0) return "unknown";
6811
+ const {
6812
+ stdioServerKeys,
6813
+ httpServerKeys,
6814
+ proxyServerKeys,
6815
+ missingStdioKeys,
6816
+ httpReachable,
6817
+ sessionLoadedServerKeys
6818
+ } = input;
6819
+ if (stdioServerKeys.length === 0 && httpServerKeys.length === 0 && proxyServerKeys.length === 0)
6820
+ return "unknown";
6805
6821
  if (stdioServerKeys.some((k) => missingStdioKeys.has(k))) return "missing";
6822
+ if (proxyServerKeys.some((k) => missingStdioKeys.has(k))) return "missing";
6823
+ for (const k of proxyServerKeys) {
6824
+ if (httpReachable.get(k) === false) return "unreachable";
6825
+ }
6806
6826
  let anyHttpUnconfirmed = false;
6807
6827
  for (const k of httpServerKeys) {
6808
6828
  if (!sessionLoadedServerKeys.has(k)) {
@@ -6813,7 +6833,8 @@ function computeSessionToolBindStatus(input) {
6813
6833
  if (reachable === false) return "unreachable";
6814
6834
  if (reachable === void 0) anyHttpUnconfirmed = true;
6815
6835
  }
6816
- if (anyHttpUnconfirmed && stdioServerKeys.length === 0) return "unknown";
6836
+ if (anyHttpUnconfirmed && stdioServerKeys.length === 0 && proxyServerKeys.length === 0)
6837
+ return "unknown";
6817
6838
  return "bound";
6818
6839
  }
6819
6840
 
@@ -6850,6 +6871,7 @@ async function runSessionToolBindProbes(integrations, options) {
6850
6871
  const batch = due.slice(0, maxPerRun);
6851
6872
  const declaredKeys = Object.keys(options.mcpJson?.mcpServers ?? {});
6852
6873
  const reports = [];
6874
+ const rebindCandidates = [];
6853
6875
  let skipped = 0;
6854
6876
  let probed = 0;
6855
6877
  for (const integ of batch) {
@@ -6863,9 +6885,9 @@ async function runSessionToolBindProbes(integrations, options) {
6863
6885
  continue;
6864
6886
  }
6865
6887
  probed += 1;
6866
- const { stdio, http } = splitServerKeysByKind(options.mcpJson, keys);
6888
+ const { stdio, http, proxy } = splitServerKeysByKind(options.mcpJson, keys);
6867
6889
  const httpReachable = /* @__PURE__ */ new Map();
6868
- for (const key of http) {
6890
+ for (const key of [...http, ...proxy]) {
6869
6891
  let reachable;
6870
6892
  try {
6871
6893
  reachable = await options.probeHttp(key);
@@ -6877,6 +6899,7 @@ async function runSessionToolBindProbes(integrations, options) {
6877
6899
  const status = computeSessionToolBindStatus({
6878
6900
  stdioServerKeys: stdio,
6879
6901
  httpServerKeys: http,
6902
+ proxyServerKeys: proxy,
6880
6903
  missingStdioKeys: options.missingStdioKeys,
6881
6904
  httpReachable,
6882
6905
  sessionLoadedServerKeys: options.sessionLoadedServerKeys ?? /* @__PURE__ */ new Set()
@@ -6886,8 +6909,25 @@ async function runSessionToolBindProbes(integrations, options) {
6886
6909
  continue;
6887
6910
  }
6888
6911
  reports.push({ integration_id: integ.id, scope: integ.scope, status });
6912
+ if (status === "missing" || status === "unreachable") {
6913
+ const failingKeys = /* @__PURE__ */ new Set();
6914
+ for (const k of [...stdio, ...proxy]) {
6915
+ if (options.missingStdioKeys.has(k)) failingKeys.add(k);
6916
+ }
6917
+ for (const k of proxy) {
6918
+ if (httpReachable.get(k) === false) failingKeys.add(k);
6919
+ }
6920
+ if (failingKeys.size > 0) {
6921
+ rebindCandidates.push({
6922
+ integration_id: integ.id,
6923
+ scope: integ.scope,
6924
+ status,
6925
+ serverKeys: [...failingKeys]
6926
+ });
6927
+ }
6928
+ }
6889
6929
  }
6890
- return { reports, due: due.length, probed, skipped };
6930
+ return { reports, rebindCandidates, due: due.length, probed, skipped };
6891
6931
  }
6892
6932
 
6893
6933
  // src/lib/session-tool-bind-probe-host.ts
@@ -7720,4 +7760,4 @@ export {
7720
7760
  managerInstallSystemUnitCommand,
7721
7761
  managerUninstallSystemUnitCommand
7722
7762
  };
7723
- //# sourceMappingURL=chunk-IRMBTIZO.js.map
7763
+ //# sourceMappingURL=chunk-VUPYJ4WU.js.map