@integrity-labs/agt-cli 0.27.117 → 0.27.118

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
@@ -28,7 +28,7 @@ import {
28
28
  success,
29
29
  table,
30
30
  warn
31
- } from "../chunk-SDRBYSRO.js";
31
+ } from "../chunk-WQV2432Z.js";
32
32
  import {
33
33
  CHANNEL_REGISTRY,
34
34
  DEPLOYMENT_TEMPLATES,
@@ -4934,7 +4934,7 @@ import { execFileSync, execSync } from "child_process";
4934
4934
  import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
4935
4935
  import chalk18 from "chalk";
4936
4936
  import ora16 from "ora";
4937
- var cliVersion = true ? "0.27.117" : "dev";
4937
+ var cliVersion = true ? "0.27.118" : "dev";
4938
4938
  async function fetchLatestVersion() {
4939
4939
  const host2 = getHost();
4940
4940
  if (!host2) return null;
@@ -5857,7 +5857,7 @@ function handleError(err) {
5857
5857
  }
5858
5858
 
5859
5859
  // src/bin/agt.ts
5860
- var cliVersion2 = true ? "0.27.117" : "dev";
5860
+ var cliVersion2 = true ? "0.27.118" : "dev";
5861
5861
  var program = new Command();
5862
5862
  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");
5863
5863
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -7603,4 +7603,4 @@ export {
7603
7603
  managerInstallSystemUnitCommand,
7604
7604
  managerUninstallSystemUnitCommand
7605
7605
  };
7606
- //# sourceMappingURL=chunk-SDRBYSRO.js.map
7606
+ //# sourceMappingURL=chunk-WQV2432Z.js.map
@@ -17,7 +17,7 @@ import {
17
17
  provisionStopHook,
18
18
  requireHost,
19
19
  safeWriteJsonAtomic
20
- } from "../chunk-SDRBYSRO.js";
20
+ } from "../chunk-WQV2432Z.js";
21
21
  import {
22
22
  getProjectDir as getProjectDir2,
23
23
  getReadyTasks,
@@ -4345,7 +4345,7 @@ var cachedMaintenanceWindow = null;
4345
4345
  var lastVersionCheckAt = 0;
4346
4346
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
4347
4347
  var lastResponsivenessProbeAt = 0;
4348
- var agtCliVersion = true ? "0.27.117" : "dev";
4348
+ var agtCliVersion = true ? "0.27.118" : "dev";
4349
4349
  function resolveBrewPath(execFileSync4) {
4350
4350
  try {
4351
4351
  const out = execFileSync4("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -5625,7 +5625,7 @@ async function pollCycle() {
5625
5625
  const {
5626
5626
  collectResponsivenessProbes,
5627
5627
  getResponsivenessIntervalMs
5628
- } = await import("../responsiveness-probe-FLQZ7E5H.js");
5628
+ } = await import("../responsiveness-probe-EQG6WWSN.js");
5629
5629
  const probeIntervalMs = getResponsivenessIntervalMs();
5630
5630
  if (now - lastResponsivenessProbeAt > probeIntervalMs) {
5631
5631
  const probeCodeNames = [...agentState.persistentSessionAgents];
@@ -5660,7 +5660,12 @@ async function pollCycle() {
5660
5660
  try {
5661
5661
  const wedgeConfig = resolveWedgeConfig();
5662
5662
  if (wedgeConfig.mode !== "off") {
5663
- const { collectResponsivenessProbes } = await import("../responsiveness-probe-FLQZ7E5H.js");
5663
+ const {
5664
+ collectResponsivenessProbes,
5665
+ livePendingInboundOldestAgeSeconds,
5666
+ deadLetterPendingInbound
5667
+ } = await import("../responsiveness-probe-EQG6WWSN.js");
5668
+ const wedgeNow = /* @__PURE__ */ new Date();
5664
5669
  const liveAgents = agentState.persistentSessionAgents;
5665
5670
  for (const tracked of consecutiveWedgeCycles.keys()) {
5666
5671
  if (!liveAgents.has(tracked)) consecutiveWedgeCycles.delete(tracked);
@@ -5671,9 +5676,14 @@ async function pollCycle() {
5671
5676
  consecutiveWedgeCycles.delete(codeName);
5672
5677
  continue;
5673
5678
  }
5679
+ const sessionStartMs = getSessionState(codeName)?.startedAt ?? null;
5674
5680
  const signals = {
5675
5681
  paneActivityAgeSeconds: probe.pane_activity_age_seconds,
5676
- pendingInboundOldestAgeSeconds: probe.pending_inbound_oldest_age_seconds ?? null
5682
+ pendingInboundOldestAgeSeconds: livePendingInboundOldestAgeSeconds(
5683
+ codeName,
5684
+ sessionStartMs,
5685
+ wedgeNow
5686
+ )
5677
5687
  };
5678
5688
  if (!isWedgeCandidateCycle(signals, wedgeConfig)) {
5679
5689
  consecutiveWedgeCycles.delete(codeName);
@@ -5700,7 +5710,11 @@ async function pollCycle() {
5700
5710
  }
5701
5711
  stopPersistentSessionAndForgetMcpBaseline(codeName);
5702
5712
  consecutiveWedgeCycles.delete(codeName);
5703
- log(`[wedge] forced fresh respawn ${detail} \u2192 new session ${newId} (transcript preserved)`);
5713
+ const deadLettered = deadLetterPendingInbound(codeName, wedgeNow);
5714
+ const deadNote = deadLettered > 0 ? `, ${deadLettered} stale inbound dead-lettered` : "";
5715
+ log(
5716
+ `[wedge] forced fresh respawn ${detail} \u2192 new session ${newId} (transcript preserved${deadNote})`
5717
+ );
5704
5718
  } catch (err) {
5705
5719
  log(`[wedge] force-fresh respawn failed for ${codeName}: ${err.message}`);
5706
5720
  }