@integrity-labs/agt-cli 0.28.782 → 0.28.784

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,12 +40,12 @@ import {
40
40
  success,
41
41
  table,
42
42
  warn
43
- } from "../chunk-WP2NPGER.js";
43
+ } from "../chunk-VY6C5UIH.js";
44
44
  import {
45
45
  getProjectDir,
46
46
  isSessionResumeDisabled,
47
47
  readDirectChatSessionState
48
- } from "../chunk-YA5PGNN2.js";
48
+ } from "../chunk-P4HONWYQ.js";
49
49
  import {
50
50
  AnchorSessionClient,
51
51
  CHANNEL_REGISTRY,
@@ -79,7 +79,7 @@ import {
79
79
  serializeManifestForSlackCli,
80
80
  sessionFileExists,
81
81
  sessionTranscriptDir
82
- } from "../chunk-TNETRPYC.js";
82
+ } from "../chunk-WAE44B3T.js";
83
83
  import "../chunk-XWVM4KPK.js";
84
84
 
85
85
  // src/bin/agt.ts
@@ -5467,7 +5467,7 @@ import { execFileSync, execSync } from "child_process";
5467
5467
  import { existsSync as existsSync11, realpathSync as realpathSync2 } from "fs";
5468
5468
  import chalk18 from "chalk";
5469
5469
  import ora16 from "ora";
5470
- var cliVersion = true ? "0.28.782" : "dev";
5470
+ var cliVersion = true ? "0.28.784" : "dev";
5471
5471
  async function fetchLatestVersion() {
5472
5472
  const host2 = getHost();
5473
5473
  if (!host2) return null;
@@ -6658,7 +6658,7 @@ function handleError(err) {
6658
6658
  }
6659
6659
 
6660
6660
  // src/bin/agt.ts
6661
- var cliVersion2 = true ? "0.28.782" : "dev";
6661
+ var cliVersion2 = true ? "0.28.784" : "dev";
6662
6662
  var program = new Command();
6663
6663
  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");
6664
6664
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -18,7 +18,7 @@ import {
18
18
  rotateDailySession,
19
19
  sessionFileExists,
20
20
  todayLocalIso
21
- } from "./chunk-TNETRPYC.js";
21
+ } from "./chunk-WAE44B3T.js";
22
22
  import {
23
23
  reapOrphanChannelMcps
24
24
  } from "./chunk-XWVM4KPK.js";
@@ -5141,4 +5141,4 @@ export {
5141
5141
  stopAllSessionsAndWait,
5142
5142
  getProjectDir
5143
5143
  };
5144
- //# sourceMappingURL=chunk-YA5PGNN2.js.map
5144
+ //# sourceMappingURL=chunk-P4HONWYQ.js.map
@@ -14,7 +14,7 @@ import {
14
14
  parseEnvFileEntries,
15
15
  parseEnvIntegrations,
16
16
  shellQuote
17
- } from "./chunk-YA5PGNN2.js";
17
+ } from "./chunk-P4HONWYQ.js";
18
18
  import {
19
19
  BIND_FAILURE_QUARANTINE_THRESHOLD,
20
20
  INTEGRATIONS_SECTION_END,
@@ -66,7 +66,7 @@ import {
66
66
  sessionTranscriptDir,
67
67
  worseConnectivityOutcome,
68
68
  wrapScheduledTaskPrompt
69
- } from "./chunk-TNETRPYC.js";
69
+ } from "./chunk-WAE44B3T.js";
70
70
  import {
71
71
  parsePsRows
72
72
  } from "./chunk-XWVM4KPK.js";
@@ -3820,17 +3820,43 @@ function provisionOrientHook(codeName) {
3820
3820
  " # false alarm on a fresh clone would be the fastest way to teach the",
3821
3821
  " # reader to skip this section.",
3822
3822
  ' fetch_head="$repo/.git/FETCH_HEAD"',
3823
+ " # mtime in epoch seconds, portably. `stat -c %Y` is GNU coreutils;",
3824
+ " # macOS ships BSD stat, which spells it `-f %m`. Prints NOTHING when",
3825
+ " # neither works or the file is unreadable \u2014 the caller must be able to",
3826
+ ' # tell "could not read" from "zero seconds old". (ENG-9887.)',
3827
+ " mtime_epoch() {",
3828
+ ' stat -c %Y "$1" 2>/dev/null && return 0',
3829
+ ' stat -f %m "$1" 2>/dev/null && return 0',
3830
+ " return 1",
3831
+ " }",
3832
+ " # THE UNREADABLE CASE MUST NOT READ AS FRESH. The original was",
3833
+ ' # $(stat -c %Y "$f" 2>/dev/null || date +%s)',
3834
+ " # so a failed stat substituted NOW, the numerator became now-now, and",
3835
+ " # the age was 0 \u2014 indistinguishable from a just-fetched repo. On macOS",
3836
+ " # `stat -c` always fails, so every checkout reported 0h and this hook",
3837
+ " # never once fired, silently, in the exact direction ENG-9863 exists to",
3838
+ " # prevent. -1 is the unknown sentinel and it FLAGS rather than clears.",
3839
+ " fetch_age_h=-1",
3823
3840
  ' if [ -f "$fetch_head" ]; then',
3824
- ' fetch_age_h=$(( ( $(date +%s) - $(stat -c %Y "$fetch_head" 2>/dev/null || date +%s) ) / 3600 ))',
3825
- ' fetch_note="refs fetched ${fetch_age_h}h ago"',
3841
+ ' if m=$(mtime_epoch "$fetch_head"); then',
3842
+ " fetch_age_h=$(( ( $(date +%s) - m ) / 3600 ))",
3843
+ ' fetch_note="refs fetched ${fetch_age_h}h ago"',
3844
+ " else",
3845
+ ' fetch_note="refs fetched at an UNKNOWN time (could not read FETCH_HEAD mtime)"',
3846
+ " fi",
3826
3847
  " else",
3827
- ' fetch_age_h=$(( ( $(date +%s) - $(stat -c %Y "$repo/.git/config" 2>/dev/null || date +%s) ) / 3600 ))',
3828
- ' fetch_note="NEVER fetched since it was cloned ${fetch_age_h}h ago"',
3848
+ ' if m=$(mtime_epoch "$repo/.git/config"); then',
3849
+ " fetch_age_h=$(( ( $(date +%s) - m ) / 3600 ))",
3850
+ ' fetch_note="NEVER fetched since it was cloned ${fetch_age_h}h ago"',
3851
+ " else",
3852
+ ' fetch_note="NEVER fetched since it was cloned, and its age is UNKNOWN"',
3853
+ " fi",
3829
3854
  " fi",
3830
3855
  " # One line only when something is actually off. A current checkout",
3831
3856
  " # printing every session is noise, and noise is how a real warning",
3832
- " # stops being read.",
3833
- ' if [ "$behind" -gt 0 ] || [ "$fetch_age_h" -ge 24 ]; then',
3857
+ " # stops being read. An UNKNOWN age (-1) is reported, not cleared: a",
3858
+ " # measurement that failed is not evidence the checkout is current.",
3859
+ ' if [ "$behind" -gt 0 ] || [ "$fetch_age_h" -ge 24 ] || [ "$fetch_age_h" -lt 0 ]; then',
3834
3860
  " stale_repos=$((stale_repos + 1))",
3835
3861
  ' echo "- ${name}: ${behind} commit(s) behind ${upstream}, ${fetch_note}"',
3836
3862
  " fi",
@@ -6492,7 +6518,7 @@ function exchangeFailureKind(err) {
6492
6518
  }
6493
6519
 
6494
6520
  // src/lib/api-client.ts
6495
- var agtCliVersion = true ? "0.28.782" : "dev";
6521
+ var agtCliVersion = true ? "0.28.784" : "dev";
6496
6522
  var lastConfigHash = null;
6497
6523
  function setConfigHash(hash) {
6498
6524
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -10729,4 +10755,4 @@ export {
10729
10755
  managerInstallSystemUnitCommand,
10730
10756
  managerUninstallSystemUnitCommand
10731
10757
  };
10732
- //# sourceMappingURL=chunk-WP2NPGER.js.map
10758
+ //# sourceMappingURL=chunk-VY6C5UIH.js.map