@integrity-labs/agt-cli 0.28.989 → 0.28.991

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.
Files changed (26) hide show
  1. package/dist/bin/agt.js +5 -5
  2. package/dist/{chunk-TGCA3LTI.js → chunk-C72SNMP6.js} +26 -5
  3. package/dist/chunk-C72SNMP6.js.map +1 -0
  4. package/dist/{chunk-6KYXH6ZZ.js → chunk-DN3KNGP4.js} +68 -6
  5. package/dist/{chunk-6KYXH6ZZ.js.map → chunk-DN3KNGP4.js.map} +1 -1
  6. package/dist/{chunk-DP443ICC.js → chunk-RQ3I7GMD.js} +30 -10
  7. package/dist/chunk-RQ3I7GMD.js.map +1 -0
  8. package/dist/{claude-pair-runtime-GQM26I3M.js → claude-pair-runtime-6IA4RPMQ.js} +2 -2
  9. package/dist/lib/manager-worker.js +32 -15
  10. package/dist/lib/manager-worker.js.map +1 -1
  11. package/dist/mcp/direct-chat-channel.js +15 -1
  12. package/dist/mcp/index.js +15 -1
  13. package/dist/mcp/origami.js +15 -1
  14. package/dist/mcp/remote-oauth-proxy.js +120 -29
  15. package/dist/mcp/slack-channel.js +15 -1
  16. package/dist/mcp/telegram-channel.js +15 -1
  17. package/dist/{persistent-session-PYYD53GZ.js → persistent-session-5EDOQC2H.js} +3 -3
  18. package/dist/{responsiveness-probe-JENZOOKG.js → responsiveness-probe-SKX77FST.js} +3 -3
  19. package/dist/{session-auth-dead-BGXRQB27.js → session-auth-dead-XTMVOHUX.js} +2 -2
  20. package/package.json +1 -1
  21. package/dist/chunk-DP443ICC.js.map +0 -1
  22. package/dist/chunk-TGCA3LTI.js.map +0 -1
  23. /package/dist/{claude-pair-runtime-GQM26I3M.js.map → claude-pair-runtime-6IA4RPMQ.js.map} +0 -0
  24. /package/dist/{persistent-session-PYYD53GZ.js.map → persistent-session-5EDOQC2H.js.map} +0 -0
  25. /package/dist/{responsiveness-probe-JENZOOKG.js.map → responsiveness-probe-SKX77FST.js.map} +0 -0
  26. /package/dist/{session-auth-dead-BGXRQB27.js.map → session-auth-dead-XTMVOHUX.js.map} +0 -0
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  LATE_BOUND_VARS,
3
3
  agentTmpDirFor,
4
+ buildApiKeyRemoteMcpProxyEntry,
4
5
  buildLiveHeaderRemoteMcpProxyEntry,
5
6
  buildNativeMcpEntry,
6
7
  buildOAuthRemoteMcpProxyEntry,
@@ -14,7 +15,7 @@ import {
14
15
  parseEnvFileEntries,
15
16
  parseEnvIntegrations,
16
17
  shellQuote
17
- } from "./chunk-6KYXH6ZZ.js";
18
+ } from "./chunk-DN3KNGP4.js";
18
19
  import {
19
20
  BIND_FAILURE_QUARANTINE_THRESHOLD,
20
21
  INTEGRATIONS_SECTION_END,
@@ -74,7 +75,7 @@ import {
74
75
  sessionTranscriptDir,
75
76
  worseConnectivityOutcome,
76
77
  wrapScheduledTaskPrompt
77
- } from "./chunk-TGCA3LTI.js";
78
+ } from "./chunk-C72SNMP6.js";
78
79
  import {
79
80
  classifyUnanswerablePane,
80
81
  summarizeUnanswerablePane
@@ -4961,16 +4962,21 @@ function buildMcpJson(input) {
4961
4962
  for (const integration of input.integrations ?? []) {
4962
4963
  const connectionKey = integration.connection_key;
4963
4964
  const serverKey = remoteMcpServerKey(integration.definition_id, connectionKey);
4964
- const liveEntry = buildLiveHeaderRemoteMcpProxyEntry(integration.definition_id, integration.remoteMcp, remoteOAuthProxyPaths, connectionKey);
4965
+ const liveEntry = buildLiveHeaderRemoteMcpProxyEntry(integration.definition_id, integration.remoteMcp, remoteOAuthProxyPaths, connectionKey, integration.toolTiers);
4965
4966
  if (liveEntry) {
4966
4967
  mcpServers[serverKey] = liveEntry;
4967
4968
  continue;
4968
4969
  }
4969
- const proxyEntry = buildOAuthRemoteMcpProxyEntry(integration.definition_id, remoteOAuthProxyPaths, connectionKey);
4970
+ const proxyEntry = buildOAuthRemoteMcpProxyEntry(integration.definition_id, remoteOAuthProxyPaths, connectionKey, integration.toolTiers);
4970
4971
  if (proxyEntry) {
4971
4972
  mcpServers[serverKey] = proxyEntry;
4972
4973
  continue;
4973
4974
  }
4975
+ const tierGatedEntry = buildApiKeyRemoteMcpProxyEntry(integration.definition_id, integration.remoteMcp, remoteOAuthProxyPaths, connectionKey, integration.toolTiers);
4976
+ if (tierGatedEntry) {
4977
+ mcpServers[serverKey] = tierGatedEntry;
4978
+ continue;
4979
+ }
4974
4980
  const entry = buildRemoteMcpEntry(integration.definition_id, integration.remoteMcp, connectionKey);
4975
4981
  if (entry) {
4976
4982
  mcpServers[serverKey] = entry;
@@ -6249,16 +6255,21 @@ ${sections}`
6249
6255
  for (const integration of integrations) {
6250
6256
  const connectionKey = integration.connection_key;
6251
6257
  const serverKey = remoteMcpServerKey(integration.definition_id, connectionKey);
6252
- const liveEntry = buildLiveHeaderRemoteMcpProxyEntry(integration.definition_id, integration.remoteMcp, remoteOAuthProxyPaths, connectionKey);
6258
+ const liveEntry = buildLiveHeaderRemoteMcpProxyEntry(integration.definition_id, integration.remoteMcp, remoteOAuthProxyPaths, connectionKey, integration.toolTiers);
6253
6259
  if (liveEntry) {
6254
6260
  this.writeMcpServer(codeName, serverKey, liveEntry);
6255
6261
  continue;
6256
6262
  }
6257
- const proxyEntry = buildOAuthRemoteMcpProxyEntry(integration.definition_id, remoteOAuthProxyPaths, connectionKey);
6263
+ const proxyEntry = buildOAuthRemoteMcpProxyEntry(integration.definition_id, remoteOAuthProxyPaths, connectionKey, integration.toolTiers);
6258
6264
  if (proxyEntry) {
6259
6265
  this.writeMcpServer(codeName, serverKey, proxyEntry);
6260
6266
  continue;
6261
6267
  }
6268
+ const tierGatedEntry = buildApiKeyRemoteMcpProxyEntry(integration.definition_id, integration.remoteMcp, remoteOAuthProxyPaths, connectionKey, integration.toolTiers);
6269
+ if (tierGatedEntry) {
6270
+ this.writeMcpServer(codeName, serverKey, tierGatedEntry);
6271
+ continue;
6272
+ }
6262
6273
  const entry = buildRemoteMcpEntry(integration.definition_id, integration.remoteMcp, connectionKey);
6263
6274
  if (entry) {
6264
6275
  this.writeMcpServer(codeName, serverKey, entry);
@@ -6963,7 +6974,7 @@ function exchangeFailureKind(err) {
6963
6974
  }
6964
6975
 
6965
6976
  // src/lib/api-client.ts
6966
- var agtCliVersion = true ? "0.28.989" : "dev";
6977
+ var agtCliVersion = true ? "0.28.991" : "dev";
6967
6978
  var lastConfigHash = null;
6968
6979
  function setConfigHash(hash) {
6969
6980
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -9609,12 +9620,13 @@ function computeSessionToolBindStatus(input) {
9609
9620
  httpReachable,
9610
9621
  sessionLoadedServerKeys,
9611
9622
  coldStartActive = false,
9623
+ anyStdioServerLive = true,
9612
9624
  transportDownKeys
9613
9625
  } = input;
9614
9626
  if (stdioServerKeys.length === 0 && httpServerKeys.length === 0 && proxyServerKeys.length === 0)
9615
9627
  return "unknown";
9616
9628
  if (stdioServerKeys.some((k) => missingStdioKeys.has(k)) || proxyServerKeys.some((k) => missingStdioKeys.has(k))) {
9617
- return coldStartActive ? "unknown" : "missing";
9629
+ return coldStartActive || !anyStdioServerLive ? "unknown" : "missing";
9618
9630
  }
9619
9631
  if (transportDownKeys && transportDownKeys.size > 0) {
9620
9632
  if (stdioServerKeys.some((k) => transportDownKeys.has(k)) || httpServerKeys.some((k) => transportDownKeys.has(k)) || proxyServerKeys.some((k) => transportDownKeys.has(k))) {
@@ -9743,11 +9755,16 @@ async function runSessionToolBindProbes(integrations, options) {
9743
9755
  httpReachable,
9744
9756
  sessionLoadedServerKeys: options.sessionLoadedServerKeys ?? /* @__PURE__ */ new Set(),
9745
9757
  coldStartActive,
9758
+ ...options.anyStdioServerLive !== void 0 ? { anyStdioServerLive: options.anyStdioServerLive } : {},
9746
9759
  ...transportDown ? { transportDownKeys: transportDown } : {}
9747
9760
  });
9748
9761
  if (status === "unknown") {
9749
9762
  skipped += 1;
9750
- skippedDetail.push({ definition_id: integ.definition_id, reason: "inconclusive" });
9763
+ const missingOwnChild = stdio.some((k) => options.missingStdioKeys.has(k)) || proxy.some((k) => options.missingStdioKeys.has(k));
9764
+ skippedDetail.push({
9765
+ definition_id: integ.definition_id,
9766
+ reason: !coldStartActive && options.anyStdioServerLive === false && missingOwnChild ? "session-not-live" : "inconclusive"
9767
+ });
9751
9768
  continue;
9752
9769
  }
9753
9770
  reports.push({ integration_id: integ.id, scope: integ.scope, status });
@@ -10368,6 +10385,8 @@ async function gatherSessionToolBindProbe(agent, integrations, projectDir, opts)
10368
10385
  if (hasDeclaredStdio) return null;
10369
10386
  }
10370
10387
  }
10388
+ const declaredCommandKeys = Object.entries(mcpJson.mcpServers).filter(([, entry]) => typeof entry?.command === "string").map(([key]) => key);
10389
+ const anyStdioServerLive = declaredCommandKeys.length === 0 || declaredCommandKeys.some((key) => !missingStdioKeys.has(key));
10371
10390
  const probeEnv = buildProbeEnv(projectDir, agent.agent_id);
10372
10391
  const probeDeps = buildConnectivityProbeDeps(projectDir, probeEnv);
10373
10392
  const probeHttp = async (serverKey) => {
@@ -10406,6 +10425,7 @@ async function gatherSessionToolBindProbe(agent, integrations, projectDir, opts)
10406
10425
  {
10407
10426
  mcpJson,
10408
10427
  missingStdioKeys,
10428
+ anyStdioServerLive,
10409
10429
  transportDownKeys: () => readSlackTransportDownKeys(projectDir),
10410
10430
  probeHttp,
10411
10431
  sessionLoadedServerKeys: opts.sessionLoadedServerKeys,
@@ -11705,4 +11725,4 @@ export {
11705
11725
  managerInstallSystemUnitCommand,
11706
11726
  managerUninstallSystemUnitCommand
11707
11727
  };
11708
- //# sourceMappingURL=chunk-DP443ICC.js.map
11728
+ //# sourceMappingURL=chunk-RQ3I7GMD.js.map