@integrity-labs/agt-cli 0.28.670 → 0.28.671

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
@@ -40,10 +40,10 @@ import {
40
40
  success,
41
41
  table,
42
42
  warn
43
- } from "../chunk-Z4O42VGJ.js";
43
+ } from "../chunk-ZU2BHLUS.js";
44
44
  import {
45
45
  readDirectChatSessionState
46
- } from "../chunk-5GDKWIB3.js";
46
+ } from "../chunk-57XP5OG6.js";
47
47
  import {
48
48
  AnchorSessionClient,
49
49
  CHANNEL_REGISTRY,
@@ -73,7 +73,7 @@ import {
73
73
  requiredMcpWildcard,
74
74
  resolveChannels,
75
75
  serializeManifestForSlackCli
76
- } from "../chunk-HGVJVYKW.js";
76
+ } from "../chunk-DWFN5PMF.js";
77
77
  import "../chunk-XWVM4KPK.js";
78
78
 
79
79
  // src/bin/agt.ts
@@ -4909,7 +4909,7 @@ import { execFileSync, execSync } from "child_process";
4909
4909
  import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
4910
4910
  import chalk18 from "chalk";
4911
4911
  import ora16 from "ora";
4912
- var cliVersion = true ? "0.28.670" : "dev";
4912
+ var cliVersion = true ? "0.28.671" : "dev";
4913
4913
  async function fetchLatestVersion() {
4914
4914
  const host2 = getHost();
4915
4915
  if (!host2) return null;
@@ -6089,7 +6089,7 @@ function handleError(err) {
6089
6089
  }
6090
6090
 
6091
6091
  // src/bin/agt.ts
6092
- var cliVersion2 = true ? "0.28.670" : "dev";
6092
+ var cliVersion2 = true ? "0.28.671" : "dev";
6093
6093
  var program = new Command();
6094
6094
  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");
6095
6095
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -16,7 +16,7 @@ import {
16
16
  rotateDailySession,
17
17
  sessionFileExists,
18
18
  todayLocalIso
19
- } from "./chunk-HGVJVYKW.js";
19
+ } from "./chunk-DWFN5PMF.js";
20
20
  import {
21
21
  reapOrphanChannelMcps
22
22
  } from "./chunk-XWVM4KPK.js";
@@ -3871,6 +3871,20 @@ var defaultHygieneKeySender = async (tmuxSession, keys, interKeyDelayMs) => {
3871
3871
  }
3872
3872
  };
3873
3873
  var hygieneKeySender = defaultHygieneKeySender;
3874
+ var SESSION_CREATED_TIMEOUT_MS = 3e3;
3875
+ function defaultSessionCreatedProbe(tmuxSession) {
3876
+ try {
3877
+ const created = execFileSync3("tmux", ["display", "-p", "-t", tmuxSession, "#{session_created}"], {
3878
+ encoding: "utf-8",
3879
+ timeout: SESSION_CREATED_TIMEOUT_MS
3880
+ }).trim();
3881
+ const secs = Number(created);
3882
+ return Number.isFinite(secs) && secs > 0 ? secs * 1e3 : null;
3883
+ } catch {
3884
+ return null;
3885
+ }
3886
+ }
3887
+ var sessionCreatedProbe = defaultSessionCreatedProbe;
3874
3888
  async function preSendPaneHygiene(tmuxSession, codeName, log2) {
3875
3889
  try {
3876
3890
  let screen = paneCapture(tmuxSession);
@@ -3939,6 +3953,13 @@ var _internals = {
3939
3953
  __setHygieneKeySender(fn) {
3940
3954
  hygieneKeySender = fn ?? defaultHygieneKeySender;
3941
3955
  },
3956
+ // ENG-9321 test seam: swap the tmux `#{session_created}` probe so the
3957
+ // reattach-startedAt contract can be asserted exactly, without a real tmux
3958
+ // server whose latency under load would otherwise decide the result.
3959
+ // null restores the real probe.
3960
+ __setSessionCreatedProbe(fn) {
3961
+ sessionCreatedProbe = fn ?? defaultSessionCreatedProbe;
3962
+ },
3942
3963
  // Test-only resets so each test starts from a clean slate.
3943
3964
  __resetZombieState() {
3944
3965
  zombieProbeCache.clear();
@@ -4044,16 +4065,7 @@ function isSessionHealthy(codeName) {
4044
4065
  return false;
4045
4066
  }
4046
4067
  if (!sessions2.has(codeName)) {
4047
- let startedAt2 = Date.now();
4048
- try {
4049
- const created = execFileSync3("tmux", ["display", "-p", "-t", tmuxSession, "#{session_created}"], {
4050
- encoding: "utf-8",
4051
- timeout: 3e3
4052
- }).trim();
4053
- const secs = Number(created);
4054
- if (Number.isFinite(secs) && secs > 0) startedAt2 = secs * 1e3;
4055
- } catch {
4056
- }
4068
+ const startedAt2 = sessionCreatedProbe(tmuxSession) ?? Date.now();
4057
4069
  sessions2.set(codeName, {
4058
4070
  codeName,
4059
4071
  startedAt: startedAt2,
@@ -4335,4 +4347,4 @@ export {
4335
4347
  stopAllSessionsAndWait,
4336
4348
  getProjectDir
4337
4349
  };
4338
- //# sourceMappingURL=chunk-5GDKWIB3.js.map
4350
+ //# sourceMappingURL=chunk-57XP5OG6.js.map