@integrity-labs/agt-cli 0.28.753 → 0.28.755

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.
@@ -32,6 +32,7 @@ import {
32
32
  isIntegrationBucketedReason,
33
33
  isProvisioningReloadReason,
34
34
  isTransientAuthFailure,
35
+ isWithinReconnectQuiesceWindow,
35
36
  liveProxyExtraHeaderVars,
36
37
  liveProxyTokenVars,
37
38
  markQuarantinedForProbe,
@@ -57,7 +58,7 @@ import {
57
58
  safeWriteJsonAtomic,
58
59
  setConfigHash,
59
60
  tripClass
60
- } from "../chunk-6HFHZR3Z.js";
61
+ } from "../chunk-3PIEDU3Z.js";
61
62
  import {
62
63
  getProjectDir as getProjectDir2,
63
64
  getReadyTasks,
@@ -439,6 +440,7 @@ function computeFirstConnectUnsettled(integrations, now, windowMs) {
439
440
  if (i.last_connectivity_status !== "transient_error" && i.last_connectivity_status !== "unverified") {
440
441
  return false;
441
442
  }
443
+ if (isWithinReconnectQuiesceWindow(i.reconnect_quiesced_until, now)) return true;
442
444
  if (!i.created_at) return false;
443
445
  const addedAt = Date.parse(i.created_at);
444
446
  if (!Number.isFinite(addedAt)) return false;
@@ -660,13 +662,6 @@ function resolveChannelLaunchFlags(channelConfigs, quarantinedChannels) {
660
662
  }
661
663
 
662
664
  // src/lib/channel-sync-precondition.ts
663
- var CHANNEL_BACKING_INTEGRATION = Object.freeze({
664
- slack: "slack",
665
- telegram: "telegram",
666
- msteams: "msteams",
667
- whatsapp: "whatsapp",
668
- discord: "discord"
669
- });
670
665
  function createEffectiveIntegrationObservations() {
671
666
  return /* @__PURE__ */ new Map();
672
667
  }
@@ -676,17 +671,6 @@ function recordEffectiveIntegrationIds(observations, agentId, definitionIds) {
676
671
  function forgetEffectiveIntegrations(observations, agentId) {
677
672
  observations.delete(agentId);
678
673
  }
679
- function checkChannelIntegrationPrecondition(observations, agentId, channelId) {
680
- const definitionId = Object.prototype.hasOwnProperty.call(CHANNEL_BACKING_INTEGRATION, channelId) ? CHANNEL_BACKING_INTEGRATION[channelId] : void 0;
681
- if (!definitionId) return { status: "unknown" };
682
- const observed = observations.get(agentId);
683
- if (!observed) return { status: "unknown" };
684
- if (observed.has(definitionId)) return { status: "ok" };
685
- return { status: "integration-missing", definitionId };
686
- }
687
- function channelIntegrationMissingReason(channelId, definitionId) {
688
- return `the '${definitionId}' integration is not installed on this agent in any scope, so ${channelId} credentials cannot converge \u2014 not retrying until it is installed (ENG-9652)`;
689
- }
690
674
 
691
675
  // src/lib/sender-policy-restart-decision.ts
692
676
  function decideSenderPolicyRestart(input) {
@@ -1671,6 +1655,9 @@ async function runConnectivityProbes(integrations, options = {}) {
1671
1655
  // ENG-8363: row age + quarantine status decide whether a missing
1672
1656
  // `.mcp.json` key is "not written yet" (transient) or "not wired" (down).
1673
1657
  createdAt: integ.created_at ?? null,
1658
+ // ENG-9718: the second settling anchor — see the comment above; a row
1659
+ // reconnected seconds ago is as unsettled as one created seconds ago.
1660
+ reconnectQuiescedUntil: integ.reconnect_quiesced_until ?? null,
1674
1661
  expectedAbsent: integ.quarantined ?? false
1675
1662
  };
1676
1663
  let outcome;
@@ -13076,6 +13063,13 @@ async function runAgentConnectivityProbes(agent, integrations, projectDir) {
13076
13063
  // escalation to `down` reachable at all — an omitted `created_at` reads
13077
13064
  // as "still settling" and never escalates (fail-open by design).
13078
13065
  created_at: i.created_at ?? null,
13066
+ // ENG-9718: the SECOND settling anchor, and it must be forwarded HERE.
13067
+ // This mapper is why declaring the field on the parameter type above is
13068
+ // not enough — the object handed to `runConnectivityProbes` is rebuilt
13069
+ // field by field, so anything not named here arrives as `undefined` and
13070
+ // the anchor silently never fires. Same failure shape as the `cli_binary`
13071
+ // note a few lines up: read by the runner, set by nobody, wrong forever.
13072
+ reconnect_quiesced_until: i.reconnect_quiesced_until ?? null,
13079
13073
  quarantined: i.quarantined ?? false,
13080
13074
  // ENG-7077: the catalog remote-MCP spec, so the executor's resolver can
13081
13075
  // tell an ADR-0033 static-token remote MCP from a built-in native module.
@@ -13391,7 +13385,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
13391
13385
  var lastVersionCheckAt = 0;
13392
13386
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
13393
13387
  var lastResponsivenessProbeAt = 0;
13394
- var agtCliVersion = true ? "0.28.753" : "dev";
13388
+ var agtCliVersion = true ? "0.28.755" : "dev";
13395
13389
  function resolveBrewPath(execFileSync3) {
13396
13390
  try {
13397
13391
  const out = execFileSync3("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -16795,19 +16789,6 @@ async function processAgent(agent, agentStates, managedToolkits) {
16795
16789
  );
16796
16790
  }
16797
16791
  }
16798
- const precondition = checkChannelIntegrationPrecondition(
16799
- effectiveIntegrationObservations,
16800
- agent.agent_id,
16801
- channelId
16802
- );
16803
- if (precondition.status === "integration-missing") {
16804
- channelConfigConverged = false;
16805
- channelConfigFailureReason = channelIntegrationMissingReason(
16806
- channelId,
16807
- precondition.definitionId
16808
- );
16809
- continue;
16810
- }
16811
16792
  frameworkAdapter.writeChannelCredentials(
16812
16793
  agent.code_name,
16813
16794
  channelId,