@integrity-labs/agt-cli 0.28.456 → 0.28.458

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.
@@ -4,6 +4,7 @@ import {
4
4
  INTEGRATION_REGISTRY,
5
5
  LATE_BOUND_VARS,
6
6
  OAUTH_PROVIDERS,
7
+ bestConnectivityEvidence,
7
8
  buildHostBrokeredRemoteMcpEntry,
8
9
  buildIntegrationsSection,
9
10
  buildLiveHeaderRemoteMcpProxyEntry,
@@ -29,7 +30,7 @@ import {
29
30
  resolveConnectivityProbe,
30
31
  worseConnectivityOutcome,
31
32
  wrapScheduledTaskPrompt
32
- } from "./chunk-UIUYOGPK.js";
33
+ } from "./chunk-KAIH24HZ.js";
33
34
  import {
34
35
  parsePsRows
35
36
  } from "./chunk-XWVM4KPK.js";
@@ -4910,7 +4911,7 @@ function requireHost() {
4910
4911
  }
4911
4912
 
4912
4913
  // src/lib/api-client.ts
4913
- var agtCliVersion = true ? "0.28.456" : "dev";
4914
+ var agtCliVersion = true ? "0.28.458" : "dev";
4914
4915
  var lastConfigHash = null;
4915
4916
  function setConfigHash(hash) {
4916
4917
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -7275,24 +7276,43 @@ async function executeConnectivityProbe(target, deps = {}) {
7275
7276
  throw new Error(`Refusing non-read-only probe for ${target.definitionId}`);
7276
7277
  }
7277
7278
  switch (descriptor.kind) {
7278
- case "http_provider":
7279
- return probeHttpProvider(target.definitionId, target.credentials, deps.fetchImpl ?? fetch);
7280
- case "composio_account":
7279
+ case "http_provider": {
7280
+ const outcome = await probeHttpProvider(target.definitionId, target.credentials, deps.fetchImpl ?? fetch);
7281
+ return outcome ? withEvidence(outcome, "live_call") : outcome;
7282
+ }
7283
+ case "composio_account": {
7281
7284
  if (!deps.composioProbe) return null;
7282
- return deps.composioProbe(target.mcpServerKey ?? target.definitionId, target.credentials, target.inlineServerEntry);
7285
+ const outcome = await deps.composioProbe(
7286
+ target.mcpServerKey ?? target.definitionId,
7287
+ target.credentials,
7288
+ target.inlineServerEntry
7289
+ );
7290
+ return outcome ? withEvidence(outcome, "record_only") : outcome;
7291
+ }
7283
7292
  case "managed_composite": {
7284
7293
  const outcomes = [];
7285
7294
  if (deps.mcpProbe) {
7286
7295
  outcomes.push(
7287
- await deps.mcpProbe({
7288
- serverKey: target.mcpServerKey ?? target.definitionId,
7289
- definitionId: target.definitionId,
7290
- inlineServerEntry: target.inlineServerEntry
7291
- })
7296
+ withEvidence(
7297
+ await deps.mcpProbe({
7298
+ serverKey: target.mcpServerKey ?? target.definitionId,
7299
+ definitionId: target.definitionId,
7300
+ inlineServerEntry: target.inlineServerEntry
7301
+ }),
7302
+ // ENG-8226: initialize + tools/list. The transport answered; no
7303
+ // authenticated operation ran. The dwight `needs_reauth` rows all
7304
+ // had healthy handshakes — this is why it is not enough for green.
7305
+ "handshake"
7306
+ )
7292
7307
  );
7293
7308
  }
7294
7309
  if (deps.composioProbe) {
7295
- outcomes.push(await deps.composioProbe(target.mcpServerKey ?? target.definitionId, target.credentials, target.inlineServerEntry));
7310
+ outcomes.push(
7311
+ withEvidence(
7312
+ await deps.composioProbe(target.mcpServerKey ?? target.definitionId, target.credentials, target.inlineServerEntry),
7313
+ "record_only"
7314
+ )
7315
+ );
7296
7316
  }
7297
7317
  if (deps.composioToolCallProbe) {
7298
7318
  const toolCall = await deps.composioToolCallProbe({
@@ -7306,37 +7326,55 @@ async function executeConnectivityProbe(target, deps = {}) {
7306
7326
  toolName: descriptor.probeTool ?? null,
7307
7327
  toolArgs: descriptor.probeArgs ?? null
7308
7328
  });
7309
- if (toolCall) outcomes.push(toolCall);
7329
+ if (toolCall) outcomes.push(withEvidence(toolCall, "live_call"));
7310
7330
  }
7311
7331
  if (outcomes.length === 0) return null;
7312
- return outcomes.reduce((acc, o) => worseConnectivityOutcome(acc, o));
7332
+ const worst = outcomes.reduce((acc, o) => worseConnectivityOutcome(acc, o));
7333
+ const evidence = outcomes.reduce(
7334
+ (acc, o) => bestConnectivityEvidence(acc, o.evidence ?? "none"),
7335
+ "none"
7336
+ );
7337
+ return { ...worst, evidence };
7313
7338
  }
7314
- case "mcp_tools_list":
7339
+ case "mcp_tools_list": {
7315
7340
  if (!deps.mcpProbe) return null;
7316
- return deps.mcpProbe({
7341
+ const outcome = await deps.mcpProbe({
7317
7342
  serverKey: target.mcpServerKey ?? target.definitionId,
7318
7343
  definitionId: target.definitionId,
7319
7344
  inlineServerEntry: target.inlineServerEntry
7320
7345
  });
7321
- case "mcp_stdio":
7346
+ return withEvidence(outcome, "handshake");
7347
+ }
7348
+ case "mcp_stdio": {
7322
7349
  if (!deps.mcpStdioProbe) return null;
7323
- return deps.mcpStdioProbe({
7350
+ const outcome = await deps.mcpStdioProbe({
7324
7351
  serverKey: target.mcpServerKey ?? target.definitionId,
7325
7352
  definitionId: target.definitionId,
7326
7353
  inlineServerEntry: target.inlineServerEntry,
7327
7354
  toolName: descriptor.probeTool ?? null,
7328
7355
  toolArgs: descriptor.probeArgs ?? null
7329
7356
  });
7330
- case "cli_command":
7357
+ return withEvidence(outcome, descriptor.probeTool ? "live_call" : "handshake");
7358
+ }
7359
+ case "cli_command": {
7331
7360
  if (!deps.runCli) return null;
7332
- return deps.runCli(target.cliBinary ?? target.definitionId, descriptor.cliArgs ?? ["--version"]);
7361
+ const outcome = await deps.runCli(target.cliBinary ?? target.definitionId, descriptor.cliArgs ?? ["--version"]);
7362
+ return withEvidence(outcome, descriptor.cliArgs ? "live_call" : "handshake");
7363
+ }
7333
7364
  case "builtin":
7334
- return { status: "ok", message: `${target.definitionId}: built-in` };
7365
+ return {
7366
+ status: "unverified",
7367
+ message: `${target.definitionId}: built-in module \u2014 no live check available, not verified`,
7368
+ evidence: "none"
7369
+ };
7335
7370
  case "unsupported":
7336
7371
  default:
7337
7372
  return null;
7338
7373
  }
7339
7374
  }
7375
+ function withEvidence(outcome, evidence) {
7376
+ return outcome.evidence ? outcome : { ...outcome, evidence };
7377
+ }
7340
7378
 
7341
7379
  export {
7342
7380
  LITERAL_SECRET_PATTERNS,
@@ -7411,4 +7449,4 @@ export {
7411
7449
  managerInstallSystemUnitCommand,
7412
7450
  managerUninstallSystemUnitCommand
7413
7451
  };
7414
- //# sourceMappingURL=chunk-FNEUIWJJ.js.map
7452
+ //# sourceMappingURL=chunk-QIQQ46NH.js.map