@integrity-labs/agt-cli 0.28.1112 → 0.28.1114

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.
Files changed (26) hide show
  1. package/dist/bin/agt.js +5 -5
  2. package/dist/{chunk-5EYINOIW.js → chunk-2XQPQOJX.js} +2 -2
  3. package/dist/chunk-2XQPQOJX.js.map +1 -0
  4. package/dist/{chunk-TJUDOE53.js → chunk-J3L66T65.js} +194 -22
  5. package/dist/{chunk-TJUDOE53.js.map → chunk-J3L66T65.js.map} +1 -1
  6. package/dist/{chunk-NO57I56V.js → chunk-OBZB6MUE.js} +74 -1
  7. package/dist/chunk-OBZB6MUE.js.map +1 -0
  8. package/dist/{claude-pair-runtime-CKWLQMAC.js → claude-pair-runtime-2LVLURUE.js} +2 -2
  9. package/dist/lib/manager-worker.js +17 -16
  10. package/dist/lib/manager-worker.js.map +1 -1
  11. package/dist/mcp/direct-chat-channel.js +107 -4
  12. package/dist/mcp/index.js +106 -3
  13. package/dist/mcp/origami.js +73 -0
  14. package/dist/mcp/slack-channel.js +110 -7
  15. package/dist/mcp/teams-channel.js +34 -4
  16. package/dist/mcp/telegram-channel.js +108 -5
  17. package/dist/{persistent-session-SDYY75X7.js → persistent-session-TDPGTHTG.js} +3 -3
  18. package/dist/{responsiveness-probe-NEBHDSMI.js → responsiveness-probe-6P7TB4QA.js} +3 -3
  19. package/dist/{session-auth-dead-CNV4O7RF.js → session-auth-dead-LMCPZJ4K.js} +2 -2
  20. package/package.json +1 -1
  21. package/dist/chunk-5EYINOIW.js.map +0 -1
  22. package/dist/chunk-NO57I56V.js.map +0 -1
  23. /package/dist/{claude-pair-runtime-CKWLQMAC.js.map → claude-pair-runtime-2LVLURUE.js.map} +0 -0
  24. /package/dist/{persistent-session-SDYY75X7.js.map → persistent-session-TDPGTHTG.js.map} +0 -0
  25. /package/dist/{responsiveness-probe-NEBHDSMI.js.map → responsiveness-probe-6P7TB4QA.js.map} +0 -0
  26. /package/dist/{session-auth-dead-CNV4O7RF.js.map → session-auth-dead-LMCPZJ4K.js.map} +0 -0
@@ -16,7 +16,7 @@ import {
16
16
  parseEnvFileEntries,
17
17
  parseEnvIntegrations,
18
18
  shellQuote
19
- } from "./chunk-5EYINOIW.js";
19
+ } from "./chunk-2XQPQOJX.js";
20
20
  import {
21
21
  BIND_FAILURE_QUARANTINE_THRESHOLD,
22
22
  INTEGRATIONS_SECTION_END,
@@ -79,7 +79,7 @@ import {
79
79
  sessionTranscriptDir,
80
80
  worseConnectivityOutcome,
81
81
  wrapScheduledTaskPrompt
82
- } from "./chunk-NO57I56V.js";
82
+ } from "./chunk-OBZB6MUE.js";
83
83
  import {
84
84
  classifyUnanswerablePane,
85
85
  isConsumerTermsDialogVisible,
@@ -7518,7 +7518,7 @@ function exchangeFailureKind(err) {
7518
7518
  }
7519
7519
 
7520
7520
  // src/lib/api-client.ts
7521
- var agtCliVersion = true ? "0.28.1112" : "dev";
7521
+ var agtCliVersion = true ? "0.28.1114" : "dev";
7522
7522
  var lastConfigHash = null;
7523
7523
  function setConfigHash(hash) {
7524
7524
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -7818,7 +7818,8 @@ function atomicWriteFileSync(path, data) {
7818
7818
  }
7819
7819
 
7820
7820
  // src/lib/feature-flags-host.ts
7821
- import { existsSync as existsSync6, readFileSync as readFileSync6, statSync as statSync2 } from "fs";
7821
+ import { existsSync as existsSync6, readFileSync as readFileSync6, rmSync as rmSync3, statSync as statSync2 } from "fs";
7822
+ import { homedir as homedir5 } from "os";
7822
7823
  import { join as join6 } from "path";
7823
7824
  function defaultFlagsCachePath(configDir) {
7824
7825
  return join6(configDir, "flags-cache.json");
@@ -7896,9 +7897,14 @@ var HostFlagStore = class {
7896
7897
  * `getBooleanForAgent` reads so a boolean gate (today only
7897
7898
  * `id-keyed-layout-migration`) can be armed one agent at a time. Held in
7898
7899
  * memory only and re-sent every heartbeat - deliberately NOT persisted to the
7899
- * flags cache (which is a host-wide map), so a restart cleanly falls back to
7900
- * the host-wide value until the next heartbeat rather than pinning a stale
7901
- * per-agent opt-in. Empty until the API sends `feature_flags_by_agent` (the
7900
+ * HOST-WIDE flags cache, so a restart cleanly falls back to the host-wide
7901
+ * value until the next heartbeat rather than pinning a stale per-agent opt-in.
7902
+ *
7903
+ * ENG-11436: it IS folded into each agent's own mirror (see
7904
+ * {@link mirrorAgentIds}), because that file is this agent's resolved view and
7905
+ * an override absent from it would resolve to the host-wide value inside the
7906
+ * container - which is the bug, not the design. A mirror is rewritten from
7907
+ * memory on every heartbeat, so it pins nothing across a restart either. Empty until the API sends `feature_flags_by_agent` (the
7902
7908
  * flag ships dark, so it stays empty and every agent resolves host-wide).
7903
7909
  */
7904
7910
  booleanFlagsByAgent = {};
@@ -7909,7 +7915,58 @@ var HostFlagStore = class {
7909
7915
  * clobbering it to empty. Hydrated from the cache on init().
7910
7916
  */
7911
7917
  lastSchemaVersion = "";
7918
+ /**
7919
+ * ENG-11436: the `updated_at` to stamp, meaning WHEN THE FLAG DATA LAST
7920
+ * CHANGED — not when a file was last written.
7921
+ *
7922
+ * `setMirrorAgentIds` persists on a roster change, and a roster change is not
7923
+ * a flag refresh. Stamping `new Date()` there restamped a possibly-days-old
7924
+ * map as current: on boot `init()` hydrates the last-known-good cache, the
7925
+ * first poll moves the roster from [] to N agents, and the stale map is
7926
+ * written out as fresh. `flagsCacheAgeSeconds` is built on `updated_at`, so
7927
+ * `agt flags` then reported a stale cache as current — and the runbook's new
7928
+ * "confirm `updated_at` is recent" check became a false trust signal exactly
7929
+ * when heartbeats were failing. Obi Wan `c9d73bded1eb` on #6918.
7930
+ *
7931
+ * Hydrated from the cache on init and advanced only when the flag data
7932
+ * ACTUALLY CHANGES (see `noteFlagDataChange`), so neither a roster-only write
7933
+ * nor the every-heartbeat no-op clear of an already-empty per-agent map
7934
+ * restamps a stale map as current.
7935
+ */
7936
+ lastFlagsUpdatedAt = "";
7912
7937
  cachePath;
7938
+ /**
7939
+ * ENG-11436: agent ids to MIRROR the resolved flag map to, as
7940
+ * `~/.augmented/<agentId>/flags-cache.json` — the HOME-based root, which is
7941
+ * where the MCP reader looks and what Docker mounts, and which is therefore
7942
+ * NOT derived from `cachePath` (those diverge under `--config-dir`).
7943
+ *
7944
+ * WHY A SECOND COPY EXISTS AT ALL. The host-wide cache this class writes is
7945
+ * `~/.augmented/flags-cache.json`, and a Docker-isolated agent's container
7946
+ * does NOT mount it — the file is host-global, so bind-mounting it would hand
7947
+ * one agent every other agent's per-agent overrides (the ADR-0014 cross-agent
7948
+ * boundary). The consequence was silent and total: every flag read through
7949
+ * `packages/mcp`'s flags-cache reader pinned to its COMPILED DEFAULT for every
7950
+ * isolated agent, so a central flip appeared to work in the admin UI and
7951
+ * reached none of the isolated fleet. Measured 2026-10-10 on a
7952
+ * `platform-maintenance-mode=tools-offline` flip: the agent kept every write
7953
+ * tool and filed a kanban task mid-window.
7954
+ *
7955
+ * `~/.augmented/<agentId>/` IS mounted (and is created by us before `docker
7956
+ * run`, ENG-8854), so a copy there is visible inside the container.
7957
+ *
7958
+ * WHY NOT MATERIALISE THE VALUE INTO THE SPAWN ENV, like `notify-dispatch` and
7959
+ * `wedge-transient-notice` do. Env is the HIGHEST precedence layer (ADR-0022)
7960
+ * and is fixed at spawn, so a materialised mode would mask a later central
7961
+ * flip until the agent respawned — including a DISARM. That is acceptable for
7962
+ * a notice; it is not acceptable for a control an operator arms during an
7963
+ * incident and may need to revoke in seconds. A file keeps the per-call
7964
+ * re-read, so arming AND disarming both land on the next tool call.
7965
+ *
7966
+ * Each file carries ONLY that agent's resolved values, so it is not a copy of
7967
+ * the host-wide map and crosses no boundary.
7968
+ */
7969
+ mirrorAgentIds = [];
7913
7970
  log;
7914
7971
  env;
7915
7972
  initialised = false;
@@ -7944,6 +8001,7 @@ var HostFlagStore = class {
7944
8001
  this.heartbeatFlags = { ...cached.flags };
7945
8002
  this.notifyDispatchByAgent = { ...cached.notify_dispatch_by_agent ?? {} };
7946
8003
  this.lastSchemaVersion = cached.schema_version || "";
8004
+ this.lastFlagsUpdatedAt = cached.updated_at || "";
7947
8005
  const ageSeconds = flagsCacheAgeSeconds(cached, this.cachePath, now);
7948
8006
  const age = ageSeconds === null ? "unknown" : `${Math.round(ageSeconds)}s`;
7949
8007
  const schema = cached.schema_version || "unknown";
@@ -7985,6 +8043,7 @@ var HostFlagStore = class {
7985
8043
  }
7986
8044
  this.heartbeatFlags = { ...map };
7987
8045
  this.lastSchemaVersion = schemaVersion ?? "";
8046
+ this.lastFlagsUpdatedAt = (/* @__PURE__ */ new Date()).toISOString();
7988
8047
  this.persistCache();
7989
8048
  }
7990
8049
  /**
@@ -7994,17 +8053,120 @@ var HostFlagStore = class {
7994
8053
  * changes either map. A write failure is logged and swallowed: the in-memory
7995
8054
  * state stays authoritative and the next successful heartbeat re-persists.
7996
8055
  */
8056
+ /**
8057
+ * Advance the data-age stamp ONLY if the map actually moved.
8058
+ *
8059
+ * Both per-agent mutators are called on EVERY heartbeat — unconditionally,
8060
+ * unlike `applyHeartbeat`, which `manager-worker.ts` calls only
8061
+ * `if (hbResp?.feature_flags)`. The API legitimately omits `feature_flags`
8062
+ * (when `getEvaluatedFlags` throws, and on every heartbeat while
8063
+ * `hostIdentityProven` is false), so an unconditional stamp here restamped a
8064
+ * STALE flag map as current on exactly those cycles — the defect the stamp was
8065
+ * introduced to remove. Found independently by CodeRabbit and Obi Wan
8066
+ * (`MAJOR · claim`) on #6918, against a commit of mine claiming it fixed.
8067
+ *
8068
+ * Clearing a map that was ALREADY empty is the common no-op case and must not
8069
+ * count; clearing a populated one is a real change and must.
8070
+ */
8071
+ noteFlagDataChange(before, after) {
8072
+ if (JSON.stringify(before) === JSON.stringify(after)) return;
8073
+ this.lastFlagsUpdatedAt = (/* @__PURE__ */ new Date()).toISOString();
8074
+ }
7997
8075
  persistCache() {
8076
+ const updatedAt = this.lastFlagsUpdatedAt || (/* @__PURE__ */ new Date()).toISOString();
7998
8077
  try {
7999
8078
  writeFlagsCache(this.cachePath, {
8000
8079
  schema_version: this.lastSchemaVersion,
8001
- updated_at: (/* @__PURE__ */ new Date()).toISOString(),
8080
+ updated_at: updatedAt,
8002
8081
  flags: this.heartbeatFlags,
8003
8082
  notify_dispatch_by_agent: this.notifyDispatchByAgent
8004
8083
  });
8005
8084
  } catch (err) {
8006
8085
  this.log(`[flags] cache write failed: ${err.message}`);
8007
8086
  }
8087
+ this.persistPerAgentCaches(updatedAt);
8088
+ }
8089
+ /**
8090
+ * Mirror the resolved map into each agent's own id-keyed dir — the copy an
8091
+ * isolated agent's container can actually see. See {@link mirrorAgentIds}.
8092
+ *
8093
+ * Deliberately per-agent-isolated in its failure handling: one unwritable dir
8094
+ * (a half-provisioned agent, a stale roster entry) must not cost every OTHER
8095
+ * agent its flags, and must not cost the host-wide write either — which is
8096
+ * why this runs AFTER that write and swallows per-agent errors individually.
8097
+ * The in-memory state stays authoritative and the next heartbeat retries.
8098
+ */
8099
+ persistPerAgentCaches(updatedAt) {
8100
+ const root = join6(homedir5(), ".augmented");
8101
+ for (const agentId of this.mirrorAgentIds) {
8102
+ try {
8103
+ const dir = join6(root, agentId);
8104
+ if (!existsSync6(dir)) continue;
8105
+ writeFlagsCache(join6(dir, "flags-cache.json"), {
8106
+ schema_version: this.lastSchemaVersion,
8107
+ updated_at: updatedAt,
8108
+ flags: this.flagsForAgent(agentId),
8109
+ // EMPTY, not `this.notifyDispatchByAgent`. That map is keyed by
8110
+ // agent_id across every agent on the host, so copying it here would
8111
+ // put other agents' values inside this agent's container — the exact
8112
+ // boundary that stops the host-wide cache being mounted. This agent's
8113
+ // own notify-dispatch value is already folded into `flags` below.
8114
+ notify_dispatch_by_agent: {}
8115
+ });
8116
+ } catch (err) {
8117
+ let removed = "left in place";
8118
+ try {
8119
+ rmSync3(join6(root, agentId, "flags-cache.json"), { force: true, recursive: true });
8120
+ removed = "stale mirror removed";
8121
+ } catch (rmErr) {
8122
+ removed = `stale mirror could NOT be removed: ${rmErr.message}`;
8123
+ }
8124
+ this.log(
8125
+ `[flags] per-agent cache write failed for ${agentId}: ${err.message} (${removed})`
8126
+ );
8127
+ }
8128
+ }
8129
+ }
8130
+ /**
8131
+ * The flag map as THIS agent resolves it: the host-wide heartbeat map with the
8132
+ * agent's own per-agent overrides folded in.
8133
+ *
8134
+ * Env overrides are deliberately NOT applied. They are a property of the
8135
+ * process that reads the flag, and the reader applies its own env layer for
8136
+ * the flags that declare one — baking this manager's env into the file would
8137
+ * make an operator's host-level pin follow the value into the container, where
8138
+ * it was never set.
8139
+ */
8140
+ flagsForAgent(agentId) {
8141
+ const flags = { ...this.heartbeatFlags };
8142
+ const booleans = this.booleanFlagsByAgent[agentId];
8143
+ if (booleans) for (const [key, value] of Object.entries(booleans)) flags[key] = value;
8144
+ const notify = this.notifyDispatchByAgent[agentId];
8145
+ if (notify !== void 0) flags["notify-dispatch"] = notify;
8146
+ return flags;
8147
+ }
8148
+ /**
8149
+ * Declare which agents this host runs, so their mirrors are written and kept
8150
+ * current. Called from the manager's poll cycle with the roster the control
8151
+ * plane returned.
8152
+ *
8153
+ * Re-persists whenever the roster CHANGES, so a newly assigned agent does not
8154
+ * wait for the next flag CHANGE — and an unchanged roster writes nothing, which
8155
+ * is why this is cheap to call every cycle.
8156
+ *
8157
+ * It does NOT mean the new agent has a mirror immediately. If it is isolated,
8158
+ * its id-keyed directory does not exist until spawn, later in this same cycle,
8159
+ * and `persistPerAgentCaches` skips an agent whose directory is absent — see
8160
+ * the gap recorded there. A removed agent's file is left where it is; it is inert once the
8161
+ * agent is gone, and deleting another agent's state from here would be a
8162
+ * worse failure than a stale file nothing reads.
8163
+ */
8164
+ setMirrorAgentIds(agentIds) {
8165
+ const next = [...new Set(agentIds.filter((id) => typeof id === "string" && id.length > 0))].sort();
8166
+ const same = next.length === this.mirrorAgentIds.length && next.every((id, i) => id === this.mirrorAgentIds[i]);
8167
+ if (same) return;
8168
+ this.mirrorAgentIds = next;
8169
+ this.persistCache();
8008
8170
  }
8009
8171
  /** Resolve one flag, or `undefined` if the key isn't registered. */
8010
8172
  resolve(key) {
@@ -8070,7 +8232,9 @@ var HostFlagStore = class {
8070
8232
  applyNotifyDispatchByAgent(map) {
8071
8233
  const definition = getFlagDefinition("notify-dispatch");
8072
8234
  if (!map || typeof map !== "object" || !definition) {
8235
+ const before = this.notifyDispatchByAgent;
8073
8236
  this.notifyDispatchByAgent = {};
8237
+ this.noteFlagDataChange(before, this.notifyDispatchByAgent);
8074
8238
  this.persistCache();
8075
8239
  return;
8076
8240
  }
@@ -8079,7 +8243,9 @@ var HostFlagStore = class {
8079
8243
  const value = normalizeFlagValue(definition, raw);
8080
8244
  if (value !== void 0) next[agentId] = value;
8081
8245
  }
8246
+ const beforeNotify = this.notifyDispatchByAgent;
8082
8247
  this.notifyDispatchByAgent = next;
8248
+ this.noteFlagDataChange(beforeNotify, next);
8083
8249
  this.persistCache();
8084
8250
  }
8085
8251
  /**
@@ -8095,7 +8261,10 @@ var HostFlagStore = class {
8095
8261
  */
8096
8262
  applyBooleanFlagsByAgent(map) {
8097
8263
  if (!map || typeof map !== "object") {
8264
+ const before = this.booleanFlagsByAgent;
8098
8265
  this.booleanFlagsByAgent = {};
8266
+ this.noteFlagDataChange(before, this.booleanFlagsByAgent);
8267
+ this.persistCache();
8099
8268
  return;
8100
8269
  }
8101
8270
  const next = {};
@@ -8108,7 +8277,10 @@ var HostFlagStore = class {
8108
8277
  (next[agentId] ??= {})[key] = raw;
8109
8278
  }
8110
8279
  }
8280
+ const beforeBooleans = this.booleanFlagsByAgent;
8111
8281
  this.booleanFlagsByAgent = next;
8282
+ this.noteFlagDataChange(beforeBooleans, next);
8283
+ this.persistCache();
8112
8284
  }
8113
8285
  /**
8114
8286
  * ENG-7682 follow-up: resolve an enum flag FOR A SPECIFIC AGENT. Precedence:
@@ -9842,7 +10014,7 @@ function verdictForUnavailableMcpConfig(cause, ctx) {
9842
10014
  // src/lib/connectivity-probe-context.ts
9843
10015
  import { delimiter as pathDelimiter, join as join7 } from "path";
9844
10016
  import { existsSync as existsSync7, readFileSync as readFileSync7 } from "fs";
9845
- import { homedir as homedir5 } from "os";
10017
+ import { homedir as homedir6 } from "os";
9846
10018
 
9847
10019
  // src/lib/mcp-stdio-probe.ts
9848
10020
  import { spawn } from "child_process";
@@ -10664,7 +10836,7 @@ function deriveMcpServerKey(input) {
10664
10836
  }
10665
10837
  var SYSTEM_PATH_FLOOR = PROBE_SYSTEM_PATH_FLOOR;
10666
10838
  function toolkitPathDirs() {
10667
- const home = process.env.HOME?.trim() || homedir5();
10839
+ const home = process.env.HOME?.trim() || homedir6();
10668
10840
  return [
10669
10841
  ...PROBE_TOOLKIT_PATH_DIRS,
10670
10842
  ...PROBE_HOME_RELATIVE_PATH_SEGMENTS.map((seg) => join7(home, seg))
@@ -11282,7 +11454,7 @@ function describeWorkerModuleFailure(err) {
11282
11454
 
11283
11455
  // src/lib/drain-transcript-flush.ts
11284
11456
  import { existsSync as existsSync8, readdirSync as readdirSync2 } from "fs";
11285
- import { homedir as homedir6 } from "os";
11457
+ import { homedir as homedir7 } from "os";
11286
11458
  import { dirname as dirname6, join as join9, relative as relative2, sep } from "path";
11287
11459
  import { spawn as spawn2 } from "child_process";
11288
11460
 
@@ -11327,7 +11499,7 @@ function readHostArchiveAddress(path) {
11327
11499
 
11328
11500
  // src/lib/drain-transcript-flush.ts
11329
11501
  function sessionsBaseDir() {
11330
- return join9(homedir6(), ".claude", "projects");
11502
+ return join9(homedir7(), ".claude", "projects");
11331
11503
  }
11332
11504
  var PER_FILE_UPLOAD_TIMEOUT_MS = 3e4;
11333
11505
  var UPLOAD_CONCURRENCY = 4;
@@ -11507,7 +11679,7 @@ function drainTranscriptFlushDeps(log2) {
11507
11679
  // tree — the thing host-archive-address.ts's header warns about.
11508
11680
  readSourceLayout: (codeName) => {
11509
11681
  const agentDir = dirname6(getProjectDir(codeName));
11510
- const codeNameDir = join9(homedir6(), ".augmented", codeName);
11682
+ const codeNameDir = join9(homedir7(), ".augmented", codeName);
11511
11683
  return { layout: agentDir === codeNameDir ? "codename-keyed" : "id-keyed", agentDir };
11512
11684
  },
11513
11685
  readSessionPin: (codeName) => readDailySessionPin(codeName),
@@ -11596,7 +11768,7 @@ function decidePin(opts) {
11596
11768
  import chalk3 from "chalk";
11597
11769
  import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
11598
11770
  import { join as join11 } from "path";
11599
- import { homedir as homedir7, userInfo } from "os";
11771
+ import { homedir as homedir8, userInfo } from "os";
11600
11772
  import { spawn as spawn4 } from "child_process";
11601
11773
 
11602
11774
  // src/lib/watchdog.ts
@@ -11830,7 +12002,7 @@ function normalizePinInEnv(env) {
11830
12002
  function managerStartCommand(opts) {
11831
12003
  const json = isJsonMode();
11832
12004
  if (!process.env.HOME || !process.env.HOME.trim()) {
11833
- const fallback = homedir7();
12005
+ const fallback = homedir8();
11834
12006
  process.env.HOME = fallback;
11835
12007
  if (!json) {
11836
12008
  info(`HOME was not set in the manager env \u2014 defaulting to ${fallback}.`);
@@ -11864,7 +12036,7 @@ function managerStartCommand(opts) {
11864
12036
  process.exitCode = 1;
11865
12037
  return;
11866
12038
  }
11867
- const configDir = opts.configDir ?? join11(homedir7(), ".augmented");
12039
+ const configDir = opts.configDir ?? join11(homedir8(), ".augmented");
11868
12040
  if (opts.supervise) {
11869
12041
  if (json) {
11870
12042
  jsonOutput({ ok: false, error: "--supervise is not supported with --json" });
@@ -11960,7 +12132,7 @@ function runSupervisorLoop(intervalSec, configDir) {
11960
12132
  }
11961
12133
  async function managerStopCommand(opts = {}) {
11962
12134
  const json = isJsonMode();
11963
- const configDir = opts.configDir ?? join11(homedir7(), ".augmented");
12135
+ const configDir = opts.configDir ?? join11(homedir8(), ".augmented");
11964
12136
  try {
11965
12137
  const result = await stopWatchdog(configDir);
11966
12138
  if (!result.stopped && !result.pid) {
@@ -11988,7 +12160,7 @@ async function managerStopCommand(opts = {}) {
11988
12160
  }
11989
12161
  function managerStatusCommand(opts = {}) {
11990
12162
  const json = isJsonMode();
11991
- const configDir = opts.configDir ?? join11(homedir7(), ".augmented");
12163
+ const configDir = opts.configDir ?? join11(homedir8(), ".augmented");
11992
12164
  const status = getManagerStatus(configDir);
11993
12165
  if (!status) {
11994
12166
  if (json) {
@@ -12098,7 +12270,7 @@ async function managerInstallCommand(opts = {}) {
12098
12270
  process.exitCode = 1;
12099
12271
  return;
12100
12272
  }
12101
- const configDir = opts.configDir ?? join11(homedir7(), ".augmented");
12273
+ const configDir = opts.configDir ?? join11(homedir8(), ".augmented");
12102
12274
  const rawAgtBin = process.argv[1];
12103
12275
  if (!rawAgtBin) {
12104
12276
  const msg = "Could not resolve the agt binary path from argv. Re-run via the installed `agt` command.";
@@ -12109,7 +12281,7 @@ async function managerInstallCommand(opts = {}) {
12109
12281
  }
12110
12282
  const agtBin = resolveStableAgtBin(rawAgtBin);
12111
12283
  if (process.platform === "darwin") {
12112
- const home = homedir7();
12284
+ const home = homedir8();
12113
12285
  const protectedRoots = ["Documents", "Downloads", "Desktop", "Movies", "Music", "Pictures"];
12114
12286
  const offending = protectedRoots.map((r) => join11(home, r)).find((p) => agtBin === p || agtBin.startsWith(`${p}/`));
12115
12287
  if (offending) {
@@ -12124,7 +12296,7 @@ async function managerInstallCommand(opts = {}) {
12124
12296
  AGT_HOST: getHost(),
12125
12297
  // ?? alone wouldn't catch `HOME=""` from a stripped systemd env.
12126
12298
  // Treat empty / whitespace-only as missing.
12127
- HOME: process.env.HOME?.trim() || homedir7(),
12299
+ HOME: process.env.HOME?.trim() || homedir8(),
12128
12300
  USER: process.env.USER?.trim() || userInfo().username
12129
12301
  };
12130
12302
  const apiKey = getApiKey();
@@ -12492,4 +12664,4 @@ export {
12492
12664
  managerInstallSystemUnitCommand,
12493
12665
  managerUninstallSystemUnitCommand
12494
12666
  };
12495
- //# sourceMappingURL=chunk-TJUDOE53.js.map
12667
+ //# sourceMappingURL=chunk-J3L66T65.js.map