@integrity-labs/agt-cli 0.28.247 → 0.28.248

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-6UPAGHRR.js";
41
+ } from "../chunk-TW7Q3VOL.js";
42
42
  import {
43
43
  CHANNEL_REGISTRY,
44
44
  DEFAULT_FRAMEWORK,
@@ -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.247" : "dev";
4829
+ var cliVersion = true ? "0.28.248" : "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.247" : "dev";
5843
+ var cliVersion2 = true ? "0.28.248" : "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) => {
@@ -5832,7 +5832,7 @@ function requireHost() {
5832
5832
  }
5833
5833
 
5834
5834
  // src/lib/api-client.ts
5835
- var agtCliVersion = true ? "0.28.247" : "dev";
5835
+ var agtCliVersion = true ? "0.28.248" : "dev";
5836
5836
  var lastConfigHash = null;
5837
5837
  function setConfigHash(hash) {
5838
5838
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -8102,4 +8102,4 @@ export {
8102
8102
  managerInstallSystemUnitCommand,
8103
8103
  managerUninstallSystemUnitCommand
8104
8104
  };
8105
- //# sourceMappingURL=chunk-6UPAGHRR.js.map
8105
+ //# sourceMappingURL=chunk-TW7Q3VOL.js.map
@@ -37,7 +37,7 @@ import {
37
37
  requireHost,
38
38
  safeWriteJsonAtomic,
39
39
  setConfigHash
40
- } from "../chunk-6UPAGHRR.js";
40
+ } from "../chunk-TW7Q3VOL.js";
41
41
  import {
42
42
  getProjectDir as getProjectDir2,
43
43
  getReadyTasks,
@@ -6097,6 +6097,9 @@ function verifyPendingRestarts(now) {
6097
6097
  pendingRestartVerifications.delete(codeName);
6098
6098
  log(`[restart-verify] '${codeName}' respawned healthy after MCP change \u2014 tools bound (ENG-6174)`);
6099
6099
  finishRestartTiming(codeName, "tools-bound", void 0, log, now);
6100
+ if (hostFlagStore().getBoolean("session-tool-probe")) {
6101
+ promptBindProbeAgents.add(codeName);
6102
+ }
6100
6103
  break;
6101
6104
  case "waiting":
6102
6105
  break;
@@ -6275,15 +6278,21 @@ var SESSION_TOOL_REBIND_COOLDOWN_MS = 10 * 60 * 1e3;
6275
6278
  function sessionToolRebindKey(codeName, serverKey) {
6276
6279
  return `${codeName}\0${serverKey}`;
6277
6280
  }
6278
- async function runAgentSessionToolBindProbes(agent, integrations, projectDir) {
6279
- if (integrations.length === 0) return;
6281
+ var promptBindProbeAgents = /* @__PURE__ */ new Set();
6282
+ async function runAgentSessionToolBindProbes(agent, integrations, projectDir, opts) {
6283
+ if (integrations.length === 0) return true;
6280
6284
  const intervalSec = Number(process.env.AGT_CONNECTIVITY_PROBE_INTERVAL_SECONDS) || 3600;
6285
+ const intervalMs = opts?.forceDue ? 0 : intervalSec * 1e3;
6281
6286
  const sessionLoadedServerKeys = new Set(
6282
6287
  readDirectChatSessionState(agent.agent_id)?.mcpServerKeys ?? []
6283
6288
  );
6284
6289
  const result = await gatherSessionToolBindProbe(agent, integrations, projectDir, {
6285
6290
  sessionLoadedServerKeys,
6286
- intervalMs: intervalSec * 1e3
6291
+ intervalMs,
6292
+ // ENG-7429 (CodeRabbit on #3063): a prompt probe must cover the WHOLE set, not
6293
+ // the rolling batch cap (25), so the just-added integration can't be crowded out
6294
+ // on a busy agent. Rolling probes keep the default cap.
6295
+ ...opts?.forceDue ? { maxPerRun: integrations.length } : {}
6287
6296
  });
6288
6297
  if (result && result.reports.length > 0) {
6289
6298
  await api.post("/host/session-tool-bind", {
@@ -6291,7 +6300,7 @@ async function runAgentSessionToolBindProbes(agent, integrations, projectDir) {
6291
6300
  results: result.reports
6292
6301
  });
6293
6302
  log(
6294
- `Session-tool-bind probe for '${agent.code_name}': probed=${result.probed} reported=${result.reports.length} due=${result.due}`
6303
+ `Session-tool-bind probe${opts?.forceDue ? " (prompt, ENG-7429)" : ""} for '${agent.code_name}': probed=${result.probed} reported=${result.reports.length} due=${result.due}`
6295
6304
  );
6296
6305
  }
6297
6306
  if (result && result.rebindCandidates.length > 0 && hostFlagStore().getBoolean("session-tool-rebind")) {
@@ -6324,6 +6333,7 @@ async function runAgentSessionToolBindProbes(agent, integrations, projectDir) {
6324
6333
  );
6325
6334
  }
6326
6335
  }
6336
+ return result != null;
6327
6337
  }
6328
6338
  function stopPersistentSessionAndForgetMcpBaseline(codeName, breakerReason, gateReason = breakerReason) {
6329
6339
  const gate = restartGateFor(codeName, gateReason);
@@ -6509,7 +6519,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
6509
6519
  var lastVersionCheckAt = 0;
6510
6520
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
6511
6521
  var lastResponsivenessProbeAt = 0;
6512
- var agtCliVersion = true ? "0.28.247" : "dev";
6522
+ var agtCliVersion = true ? "0.28.248" : "dev";
6513
6523
  function resolveBrewPath(execFileSync2) {
6514
6524
  try {
6515
6525
  const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -9079,12 +9089,15 @@ async function processAgent(agent, agentStates) {
9079
9089
  }
9080
9090
  }
9081
9091
  if (hostFlagStore().getBoolean("session-tool-probe")) {
9092
+ const forceDue = promptBindProbeAgents.delete(agent.code_name);
9093
+ let probeRan = false;
9082
9094
  try {
9083
9095
  const probeProjectDir = join16(homedir9(), ".augmented", agent.code_name, "project");
9084
- await runAgentSessionToolBindProbes(agent, integrations, probeProjectDir);
9096
+ probeRan = await runAgentSessionToolBindProbes(agent, integrations, probeProjectDir, { forceDue });
9085
9097
  } catch (err) {
9086
9098
  log(`Session-tool-bind probe failed for '${agent.code_name}': ${err.message}`);
9087
9099
  }
9100
+ if (forceDue && !probeRan) promptBindProbeAgents.add(agent.code_name);
9088
9101
  }
9089
9102
  if (frameworkAdapter.removeMcpServer && frameworkAdapter.getMcpPath) {
9090
9103
  const mcpPath = frameworkAdapter.getMcpPath(agent.code_name);