codeam-cli 2.75.21 → 2.75.22

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 (3) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/index.js +276 -265
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -4,6 +4,16 @@ All notable changes to `codeam-cli` are documented here.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [2.75.21] — 2026-09-25
8
+
9
+ ### Fixed
10
+
11
+ - **cli:** Close ACP tool rows whose completion carries no content
12
+
13
+ ### Tests
14
+
15
+ - **cli:** Build opencode config paths with path.join so Windows CI passes
16
+
7
17
  ## [2.75.20] — 2026-09-25
8
18
 
9
19
  ### Fixed
package/dist/index.js CHANGED
@@ -357,7 +357,7 @@ function defaultSpawn(timeoutMs) {
357
357
  });
358
358
  }
359
359
  function resolveConvexBin(cwd) {
360
- const local = path92.join(cwd, "node_modules", ".bin", process.platform === "win32" ? "convex.cmd" : "convex");
360
+ const local = path93.join(cwd, "node_modules", ".bin", process.platform === "win32" ? "convex.cmd" : "convex");
361
361
  if (fs79.existsSync(local)) return { cmd: local, args: [] };
362
362
  return { cmd: "npx", args: ["--yes", "convex"] };
363
363
  }
@@ -489,13 +489,13 @@ async function runConvexAdminMcp(client3, id) {
489
489
  });
490
490
  await server.connect(new StdioServerTransport());
491
491
  }
492
- var import_node_child_process32, fs79, path92, TOOLS;
492
+ var import_node_child_process32, fs79, path93, TOOLS;
493
493
  var init_convex_admin_mcp = __esm({
494
494
  "src/integrations/convex-admin-mcp.ts"() {
495
495
  "use strict";
496
496
  import_node_child_process32 = require("child_process");
497
497
  fs79 = __toESM(require("fs"));
498
- path92 = __toESM(require("path"));
498
+ path93 = __toESM(require("path"));
499
499
  TOOLS = [
500
500
  {
501
501
  name: "tables",
@@ -3525,11 +3525,11 @@ function quiet(fn) {
3525
3525
  log.debug(TAG, "ignored sync error", err);
3526
3526
  }
3527
3527
  }
3528
- function rmIfExistsQuiet(path94) {
3528
+ function rmIfExistsQuiet(path95) {
3529
3529
  try {
3530
- fs2.rmSync(path94, { force: true });
3530
+ fs2.rmSync(path95, { force: true });
3531
3531
  } catch (err) {
3532
- log.debug(TAG, `rmIfExists failed for ${path94}`, err);
3532
+ log.debug(TAG, `rmIfExists failed for ${path95}`, err);
3533
3533
  }
3534
3534
  }
3535
3535
  function killQuiet(target, signal = "SIGTERM") {
@@ -3733,8 +3733,8 @@ function createGetModuleFromFilename(basePath = process.argv[1] ? (0, import_pat
3733
3733
  return decodedFile;
3734
3734
  };
3735
3735
  }
3736
- function normalizeWindowsPath(path94) {
3737
- return path94.replace(/^[A-Z]:/, "").replace(/\\/g, "/");
3736
+ function normalizeWindowsPath(path95) {
3737
+ return path95.replace(/^[A-Z]:/, "").replace(/\\/g, "/");
3738
3738
  }
3739
3739
 
3740
3740
  // ../../node_modules/@posthog/core/dist/error-tracking/index.mjs
@@ -6467,13 +6467,13 @@ var PostHogCoreStateless = class {
6467
6467
  sentFromRoute += batchMessages.length;
6468
6468
  }
6469
6469
  }
6470
- async _sendOtlpBatch({ path: path94, payload }) {
6470
+ async _sendOtlpBatch({ path: path95, payload }) {
6471
6471
  if (this.disabled) return {
6472
6472
  kind: "fatal",
6473
6473
  error: new Error("The client is disabled")
6474
6474
  };
6475
6475
  const serialized = JSON.stringify(payload);
6476
- const url2 = `${this.host}/i/v1/${path94}?token=${encodeURIComponent(this.apiKey)}`;
6476
+ const url2 = `${this.host}/i/v1/${path95}?token=${encodeURIComponent(this.apiKey)}`;
6477
6477
  const gzippedPayload = this.disableCompression ? null : await this.compressPayload(serialized);
6478
6478
  const fetchOptions = {
6479
6479
  method: "POST",
@@ -7713,14 +7713,14 @@ async function addSourceContext(frames, openSourceFile = import_promises.open, l
7713
7713
  LRU_FILE_CONTENTS_CACHE.reduce();
7714
7714
  return frames;
7715
7715
  }
7716
- async function openRegularSourceFile(path94, openSourceFile, logger) {
7716
+ async function openRegularSourceFile(path95, openSourceFile, logger) {
7717
7717
  let fileHandle;
7718
7718
  let isValid = false;
7719
7719
  try {
7720
- fileHandle = await openSourceFile(path94, import_node_fs.constants.O_RDONLY | import_node_fs.constants.O_NONBLOCK);
7720
+ fileHandle = await openSourceFile(path95, import_node_fs.constants.O_RDONLY | import_node_fs.constants.O_NONBLOCK);
7721
7721
  const fileStat = await fileHandle.stat();
7722
7722
  if (!fileStat.isFile()) return;
7723
- if (fileStat.size > MAX_CONTEXTLINES_FILE_SIZE) return void logger?.debug(`Skipping source context for oversized file ${path94}: ${fileStat.size} bytes exceeds ${MAX_CONTEXTLINES_FILE_SIZE}`);
7723
+ if (fileStat.size > MAX_CONTEXTLINES_FILE_SIZE) return void logger?.debug(`Skipping source context for oversized file ${path95}: ${fileStat.size} bytes exceeds ${MAX_CONTEXTLINES_FILE_SIZE}`);
7724
7724
  isValid = true;
7725
7725
  return fileHandle;
7726
7726
  } catch {
@@ -7730,8 +7730,8 @@ async function openRegularSourceFile(path94, openSourceFile, logger) {
7730
7730
  });
7731
7731
  }
7732
7732
  }
7733
- async function getContextLinesFromFile(path94, ranges, output, cacheKey, openSourceFile, logger) {
7734
- const fileHandle = await openRegularSourceFile(path94, openSourceFile, logger);
7733
+ async function getContextLinesFromFile(path95, ranges, output, cacheKey, openSourceFile, logger) {
7734
+ const fileHandle = await openRegularSourceFile(path95, openSourceFile, logger);
7735
7735
  if (void 0 === fileHandle) return void LRU_FILE_CONTENTS_FS_READ_FAILED.set(cacheKey, 1);
7736
7736
  const openedFileHandle = fileHandle;
7737
7737
  return new Promise((resolve12) => {
@@ -7833,22 +7833,22 @@ function clearLineContext(frame) {
7833
7833
  delete frame.context_line;
7834
7834
  delete frame.post_context;
7835
7835
  }
7836
- function shouldSkipContextLinesForFile(path94) {
7837
- return path94.startsWith("node:") || path94.endsWith(".min.js") || path94.endsWith(".min.cjs") || path94.endsWith(".min.mjs") || path94.startsWith("data:");
7836
+ function shouldSkipContextLinesForFile(path95) {
7837
+ return path95.startsWith("node:") || path95.endsWith(".min.js") || path95.endsWith(".min.cjs") || path95.endsWith(".min.mjs") || path95.startsWith("data:");
7838
7838
  }
7839
7839
  function shouldSkipContextLinesForFrame(frame) {
7840
7840
  if (void 0 !== frame.lineno && frame.lineno > MAX_CONTEXTLINES_LINENO) return true;
7841
7841
  if (void 0 !== frame.colno && frame.colno > MAX_CONTEXTLINES_COLNO) return true;
7842
7842
  return false;
7843
7843
  }
7844
- function makeSourceCacheKey(path94, basePath) {
7845
- if ((0, import_node_path.isAbsolute)(path94)) return JSON.stringify([
7844
+ function makeSourceCacheKey(path95, basePath) {
7845
+ if ((0, import_node_path.isAbsolute)(path95)) return JSON.stringify([
7846
7846
  null,
7847
- path94
7847
+ path95
7848
7848
  ]);
7849
7849
  return void 0 === basePath ? void 0 : JSON.stringify([
7850
7850
  basePath,
7851
- path94
7851
+ path95
7852
7852
  ]);
7853
7853
  }
7854
7854
  function rangeExistsInContentCache(cacheKey, range) {
@@ -10509,7 +10509,7 @@ function readAnonId() {
10509
10509
  }
10510
10510
  function superProperties() {
10511
10511
  return {
10512
- cliVersion: true ? "2.75.21" : "0.0.0-dev",
10512
+ cliVersion: true ? "2.75.22" : "0.0.0-dev",
10513
10513
  nodeVersion: process.version,
10514
10514
  platform: process.platform,
10515
10515
  arch: process.arch,
@@ -10751,7 +10751,7 @@ var http = __toESM(require("http"));
10751
10751
  // package.json
10752
10752
  var package_default = {
10753
10753
  name: "codeam-cli",
10754
- version: "2.75.21",
10754
+ version: "2.75.22",
10755
10755
  description: "Workflow-continuity bridge for AI coding agents. Wrap Claude Code or Codex in a PTY and supervise, approve, and redirect the session from any device \u2014 async. The terminal companion for CodeAgent Mobile.",
10756
10756
  type: "commonjs",
10757
10757
  main: "dist/index.js",
@@ -12081,7 +12081,7 @@ var CommandRelayService = class _CommandRelayService {
12081
12081
  // fresh + clear the "CLI update available" banner after a self-update
12082
12082
  // (a codespace that reinstalls @latest reconnects via heartbeat, not
12083
12083
  // pair/reconnect). Older backends ignore the extra field.
12084
- ..."2.75.21" ? { ideVersion: "2.75.21" } : {}
12084
+ ..."2.75.22" ? { ideVersion: "2.75.22" } : {}
12085
12085
  };
12086
12086
  try {
12087
12087
  const res = await _postJson(`${API_BASE2}/api/plugin/heartbeat`, body);
@@ -19601,8 +19601,8 @@ function pickLine(obj) {
19601
19601
  function toHunk(raw, groupSeverity) {
19602
19602
  if (!raw || typeof raw !== "object") return null;
19603
19603
  const o = raw;
19604
- const path94 = asString(pick(o, ["file_path", "filePath", "file", "path", "filename", "fileName"])) ?? asString(pick(o, ["location"])?.path);
19605
- if (!path94) return null;
19604
+ const path95 = asString(pick(o, ["file_path", "filePath", "file", "path", "filename", "fileName"])) ?? asString(pick(o, ["location"])?.path);
19605
+ if (!path95) return null;
19606
19606
  const message = asString(
19607
19607
  pick(o, [
19608
19608
  "comment",
@@ -19619,7 +19619,7 @@ function toHunk(raw, groupSeverity) {
19619
19619
  const severity = normSeverity(pick(o, ["severity", "level", "priority", "impact"])) ?? normSeverity(groupSeverity);
19620
19620
  const locObj = pick(o, ["location"]) ?? o;
19621
19621
  return {
19622
- path: path94.trim(),
19622
+ path: path95.trim(),
19623
19623
  line: pickLine(o) ?? pickLine(locObj),
19624
19624
  severity,
19625
19625
  message: (title && message ? `${title}: ${message}` : title || message).trim() || "(no message)"
@@ -19702,10 +19702,10 @@ function parsePlain(stdout) {
19702
19702
  for (const line of stdout.split(/\r?\n/)) {
19703
19703
  const m = line.match(HUNK_LINE_RE);
19704
19704
  if (!m) continue;
19705
- const [, path94, lineNo, sevToken, message] = m;
19706
- if (!path94 || !lineNo || !message) continue;
19705
+ const [, path95, lineNo, sevToken, message] = m;
19706
+ if (!path95 || !lineNo || !message) continue;
19707
19707
  hunks.push({
19708
- path: path94.trim(),
19708
+ path: path95.trim(),
19709
19709
  line: Number(lineNo),
19710
19710
  severity: sevToken ? SEVERITY_MAP[sevToken.toLowerCase()] : void 0,
19711
19711
  message: message.trim().replace(/^[*-]\s+/, "")
@@ -28266,11 +28266,11 @@ function resolveTokenValue(args2) {
28266
28266
  }
28267
28267
  const fileFlag = args2.find((a) => a.startsWith("--token-file="));
28268
28268
  if (fileFlag) {
28269
- const path94 = fileFlag.slice("--token-file=".length);
28269
+ const path95 = fileFlag.slice("--token-file=".length);
28270
28270
  try {
28271
- const content = fs51.readFileSync(path94, "utf8").trim();
28272
- if (content.length === 0) fail(`--token-file ${path94} is empty`);
28273
- rmIfExistsQuiet(path94);
28271
+ const content = fs51.readFileSync(path95, "utf8").trim();
28272
+ if (content.length === 0) fail(`--token-file ${path95} is empty`);
28273
+ rmIfExistsQuiet(path95);
28274
28274
  return content;
28275
28275
  } catch (err) {
28276
28276
  fail(`Could not read --token-file: ${err.message}`);
@@ -29204,9 +29204,9 @@ async function resolveAcpAdapterWithRetry(agent, opts = {}) {
29204
29204
 
29205
29205
  // src/agents/acp/runner.ts
29206
29206
  var import_node_crypto10 = require("crypto");
29207
- var fs67 = __toESM(require("fs"));
29208
- var os52 = __toESM(require("os"));
29209
- var path77 = __toESM(require("path"));
29207
+ var fs68 = __toESM(require("fs"));
29208
+ var os53 = __toESM(require("os"));
29209
+ var path79 = __toESM(require("path"));
29210
29210
 
29211
29211
  // src/lib/provider-routing.ts
29212
29212
  var fs53 = __toESM(require("fs"));
@@ -35913,6 +35913,116 @@ function provisionAgentCredentials(publicAgentId, auth, homeDir2 = os47.homedir(
35913
35913
  return provisioner.write(auth, homeDir2);
35914
35914
  }
35915
35915
 
35916
+ // src/beads/workflow-hint.ts
35917
+ var fs57 = __toESM(require("fs"));
35918
+ var path68 = __toESM(require("path"));
35919
+
35920
+ // src/agents/claude-memory-file.ts
35921
+ var os48 = __toESM(require("os"));
35922
+ var path67 = __toESM(require("path"));
35923
+ function claudeMemoryFile(homeDir2, env = process.env) {
35924
+ if (homeDir2) return path67.join(homeDir2, ".claude", "CLAUDE.md");
35925
+ const configDir = env.CLAUDE_CONFIG_DIR?.trim();
35926
+ return configDir ? path67.join(configDir, "CLAUDE.md") : path67.join(os48.homedir(), ".claude", "CLAUDE.md");
35927
+ }
35928
+
35929
+ // src/beads/workflow-hint.ts
35930
+ var BEADS_HINT_MARKER = "<!-- codeam:beads-workflow -->";
35931
+ var BEADS_HINT = `${BEADS_HINT_MARKER}
35932
+ # Beads (bd) \u2014 task tracking + persistent memory (ALWAYS use it)
35933
+
35934
+ This environment uses **bd (beads)** for issue/task tracking and persistent memory.
35935
+
35936
+ - Use \`bd\` for ALL task tracking \u2014 do NOT use TodoWrite or markdown TODO lists.
35937
+ - Run \`bd prime\` (via your shell tool, once) when you start working on a task, for
35938
+ the full workflow context + project memories. Not needed to answer a greeting or
35939
+ a quick question. On a fresh session beads may still be provisioning for a few
35940
+ seconds \u2014 if \`bd prime\` comes back empty, retry it shortly; it works once the
35941
+ shared server is up.
35942
+ - \`bd ready\` (available work) \xB7 \`bd show <id>\` \xB7 \`bd update <id> --claim\` \xB7 \`bd close <id>\`.
35943
+ - Use \`bd remember "..."\` for persistent knowledge \u2014 do NOT use MEMORY.md files.
35944
+ - Run \`bd\` commands through your shell tool and summarize the outcome. Never
35945
+ paste \`bd\` commands or their raw output into your reply.
35946
+ - CodeAgent installs, starts and repairs beads \u2014 not you. If a \`bd\` command
35947
+ fails, carry on with the user's task without task tracking and try \`bd\`
35948
+ again later. Never run \`bd init\`, \`bd bootstrap\`, \`bd doctor --fix\` or
35949
+ \`dolt\` commands yourself: they race the provisioning and can wipe the
35950
+ project's issues.
35951
+ ${BEADS_HINT_MARKER}`;
35952
+ function ensureBeadsWorkflowHint(homeDir2, file = claudeMemoryFile(homeDir2)) {
35953
+ try {
35954
+ let existing = "";
35955
+ try {
35956
+ existing = fs57.readFileSync(file, "utf8");
35957
+ } catch {
35958
+ }
35959
+ if (existing.includes(BEADS_HINT)) return;
35960
+ fs57.mkdirSync(path68.dirname(file), { recursive: true });
35961
+ let next;
35962
+ const open = existing.indexOf(BEADS_HINT_MARKER);
35963
+ const close = open === -1 ? -1 : existing.indexOf(BEADS_HINT_MARKER, open + BEADS_HINT_MARKER.length);
35964
+ if (open !== -1 && close !== -1) {
35965
+ next = existing.slice(0, open) + BEADS_HINT + existing.slice(close + BEADS_HINT_MARKER.length);
35966
+ } else {
35967
+ next = existing.trim() ? `${existing.trimEnd()}
35968
+
35969
+ ${BEADS_HINT}
35970
+ ` : `${BEADS_HINT}
35971
+ `;
35972
+ }
35973
+ fs57.writeFileSync(file, next);
35974
+ } catch {
35975
+ }
35976
+ }
35977
+
35978
+ // src/agents/agent-standard.ts
35979
+ var fs58 = __toESM(require("fs"));
35980
+ var path69 = __toESM(require("path"));
35981
+ var os49 = __toESM(require("os"));
35982
+ function ensureAgentStandard(homeDir2, file = claudeMemoryFile(homeDir2)) {
35983
+ try {
35984
+ let existing = "";
35985
+ try {
35986
+ existing = fs58.readFileSync(file, "utf8");
35987
+ } catch {
35988
+ }
35989
+ if (existing.includes(AGENT_STANDARD_MARKER)) return;
35990
+ fs58.mkdirSync(path69.dirname(file), { recursive: true });
35991
+ const next = existing.trim() ? `${existing.trimEnd()}
35992
+
35993
+ ${AGENT_STANDARD_BLOCK}
35994
+ ` : `${AGENT_STANDARD_BLOCK}
35995
+ `;
35996
+ fs58.writeFileSync(file, next);
35997
+ } catch {
35998
+ }
35999
+ }
36000
+ var _agentStandardSeam = {
36001
+ isLocalSession: () => isLocalSession(),
36002
+ markerPath: (sessionId) => path69.join(os49.homedir(), ".codeam", "agent-standard", `${sessionId}.done`),
36003
+ exists: (p2) => fs58.existsSync(p2),
36004
+ write: (p2) => {
36005
+ fs58.mkdirSync(path69.dirname(p2), { recursive: true });
36006
+ fs58.writeFileSync(p2, "");
36007
+ }
36008
+ };
36009
+ function isClaude(agent) {
36010
+ return agent === "claude" || agent === "claude_code";
36011
+ }
36012
+ function maybePrefaceAgentStandard(blocks, agent, sessionId, seam = _agentStandardSeam) {
36013
+ if (seam.isLocalSession()) return;
36014
+ if (isClaude(agent)) return;
36015
+ if (!sessionId) return;
36016
+ const marker = seam.markerPath(sessionId);
36017
+ try {
36018
+ if (seam.exists(marker)) return;
36019
+ seam.write(marker);
36020
+ } catch {
36021
+ return;
36022
+ }
36023
+ blocks.unshift({ type: "text", text: AGENT_STANDARD_TEXT });
36024
+ }
36025
+
35916
36026
  // src/services/streaming/transport.ts
35917
36027
  var http10 = __toESM(require("http"));
35918
36028
  var https7 = __toESM(require("https"));
@@ -36586,15 +36696,15 @@ function withholdTrailingPartialFenceMarker(text) {
36586
36696
 
36587
36697
  // src/agents/acp/onboarding.ts
36588
36698
  var import_child_process28 = require("child_process");
36589
- var fs57 = __toESM(require("fs"));
36590
- var os48 = __toESM(require("os"));
36591
- var path67 = __toESM(require("path"));
36699
+ var fs59 = __toESM(require("fs"));
36700
+ var os50 = __toESM(require("os"));
36701
+ var path70 = __toESM(require("path"));
36592
36702
  var _onboardingSeam = {
36593
- markerPath: (sessionId) => path67.join(os48.homedir(), ".codeam", "welcomed", `${sessionId}.done`),
36594
- exists: (p2) => fs57.existsSync(p2),
36703
+ markerPath: (sessionId) => path70.join(os50.homedir(), ".codeam", "welcomed", `${sessionId}.done`),
36704
+ exists: (p2) => fs59.existsSync(p2),
36595
36705
  write: (p2) => {
36596
- fs57.mkdirSync(path67.dirname(p2), { recursive: true });
36597
- fs57.writeFileSync(p2, "");
36706
+ fs59.mkdirSync(path70.dirname(p2), { recursive: true });
36707
+ fs59.writeFileSync(p2, "");
36598
36708
  },
36599
36709
  disabled: () => {
36600
36710
  const v = process.env.CODEAM_ONBOARDING_DISABLED;
@@ -36631,7 +36741,7 @@ function resolveRepoName(cwd) {
36631
36741
  if (name) return name;
36632
36742
  }
36633
36743
  }
36634
- const base = path67.basename(cwd || "");
36744
+ const base = path70.basename(cwd || "");
36635
36745
  if (base && !isUuid(base)) return base;
36636
36746
  return "this project";
36637
36747
  }
@@ -37023,13 +37133,13 @@ var import_crypto4 = require("crypto");
37023
37133
 
37024
37134
  // src/services/turn-files/git-changeset.ts
37025
37135
  var import_child_process29 = require("child_process");
37026
- var fs59 = __toESM(require("fs/promises"));
37027
- var path69 = __toESM(require("path"));
37136
+ var fs61 = __toESM(require("fs/promises"));
37137
+ var path72 = __toESM(require("path"));
37028
37138
 
37029
37139
  // src/services/turn-files/review-ignore.ts
37030
37140
  var import_ignore2 = __toESM(require("ignore"));
37031
- var fs58 = __toESM(require("fs"));
37032
- var path68 = __toESM(require("path"));
37141
+ var fs60 = __toESM(require("fs"));
37142
+ var path71 = __toESM(require("path"));
37033
37143
  var CURATED_REVIEW_IGNORE = [
37034
37144
  // Google Cloud SDK (the incident) — installs a huge python tree.
37035
37145
  "google-cloud-sdk/",
@@ -37068,7 +37178,7 @@ var CURATED_REVIEW_IGNORE = [
37068
37178
  function makeReviewIgnore(repoRoot) {
37069
37179
  const ig = (0, import_ignore2.default)().add(CURATED_REVIEW_IGNORE);
37070
37180
  try {
37071
- const custom = fs58.readFileSync(path68.join(repoRoot, ".codeam", "reviewignore"), "utf8");
37181
+ const custom = fs60.readFileSync(path71.join(repoRoot, ".codeam", "reviewignore"), "utf8");
37072
37182
  ig.add(custom);
37073
37183
  } catch {
37074
37184
  }
@@ -37113,7 +37223,7 @@ async function collectRepoChangeset(opts) {
37113
37223
  let stats;
37114
37224
  if (!truncated && row.fileStatus === "added" && numstatEntry === void 0) {
37115
37225
  const lineCount = await readUntrackedLineCount(
37116
- path69.join(opts.repoRoot, row.filePath)
37226
+ path72.join(opts.repoRoot, row.filePath)
37117
37227
  );
37118
37228
  stats = { added: lineCount, removed: 0 };
37119
37229
  } else {
@@ -37144,7 +37254,7 @@ function readUntrackedLineCount(absPath) {
37144
37254
  }
37145
37255
  async function defaultReadUntrackedLineCount(absPath) {
37146
37256
  try {
37147
- const content = await fs59.readFile(absPath, "utf8");
37257
+ const content = await fs61.readFile(absPath, "utf8");
37148
37258
  let count = 0;
37149
37259
  let pos = -1;
37150
37260
  while ((pos = content.indexOf("\n", pos + 1)) !== -1) {
@@ -37255,8 +37365,8 @@ async function discoverRepos(workingDir, maxDepth = 4) {
37255
37365
  if (hasGit) {
37256
37366
  out2.push({
37257
37367
  repoRoot: dir,
37258
- repoPath: path69.relative(workingDir, dir),
37259
- repoName: path69.basename(dir)
37368
+ repoPath: path72.relative(workingDir, dir),
37369
+ repoName: path72.basename(dir)
37260
37370
  });
37261
37371
  return;
37262
37372
  }
@@ -37264,14 +37374,14 @@ async function discoverRepos(workingDir, maxDepth = 4) {
37264
37374
  if (!entry.isDirectory) continue;
37265
37375
  if (entry.name === "node_modules") continue;
37266
37376
  if (entry.name === "dist" || entry.name === "build") continue;
37267
- await walk(path69.join(dir, entry.name), depth + 1);
37377
+ await walk(path72.join(dir, entry.name), depth + 1);
37268
37378
  }
37269
37379
  }
37270
37380
  }
37271
37381
 
37272
37382
  // src/services/turn-files/files-outbox.ts
37273
- var fs60 = __toESM(require("fs/promises"));
37274
- var path70 = __toESM(require("path"));
37383
+ var fs62 = __toESM(require("fs/promises"));
37384
+ var path73 = __toESM(require("path"));
37275
37385
  var import_os12 = require("os");
37276
37386
  var HOME_OUTBOX_DIR = ".codeam/outbox";
37277
37387
  var MAX_AGE_MS = 24 * 60 * 60 * 1e3;
@@ -37304,16 +37414,16 @@ var FilesOutbox = class {
37304
37414
  backoffIndex = 0;
37305
37415
  stopped = false;
37306
37416
  constructor(opts) {
37307
- const base = opts.baseDir ?? path70.join(homeDir(), HOME_OUTBOX_DIR);
37308
- this.filePath = path70.join(base, `${opts.sessionId}.jsonl`);
37417
+ const base = opts.baseDir ?? path73.join(homeDir(), HOME_OUTBOX_DIR);
37418
+ this.filePath = path73.join(base, `${opts.sessionId}.jsonl`);
37309
37419
  this.post = opts.post;
37310
37420
  this.autoSchedule = opts.autoSchedule !== false;
37311
37421
  }
37312
37422
  /** Persist the entry to disk and trigger a flush. Returns once the
37313
37423
  * line is durable on disk (not once the POST succeeds). */
37314
37424
  async enqueue(entry) {
37315
- await fs60.mkdir(path70.dirname(this.filePath), { recursive: true });
37316
- await fs60.appendFile(this.filePath, JSON.stringify(entry) + "\n", "utf8");
37425
+ await fs62.mkdir(path73.dirname(this.filePath), { recursive: true });
37426
+ await fs62.appendFile(this.filePath, JSON.stringify(entry) + "\n", "utf8");
37317
37427
  this.backoffIndex = 0;
37318
37428
  if (this.autoSchedule) this.scheduleFlush(0);
37319
37429
  }
@@ -37404,7 +37514,7 @@ var FilesOutbox = class {
37404
37514
  async readAll() {
37405
37515
  let raw = "";
37406
37516
  try {
37407
- raw = await fs60.readFile(this.filePath, "utf8");
37517
+ raw = await fs62.readFile(this.filePath, "utf8");
37408
37518
  } catch {
37409
37519
  return [];
37410
37520
  }
@@ -37428,12 +37538,12 @@ var FilesOutbox = class {
37428
37538
  async rewrite(entries) {
37429
37539
  const tmpPath = `${this.filePath}.${process.pid}.tmp`;
37430
37540
  if (entries.length === 0) {
37431
- await fs60.unlink(this.filePath).catch(() => void 0);
37541
+ await fs62.unlink(this.filePath).catch(() => void 0);
37432
37542
  return;
37433
37543
  }
37434
37544
  const payload = entries.map((e) => JSON.stringify(e)).join("\n") + "\n";
37435
- await fs60.writeFile(tmpPath, payload, "utf8");
37436
- await fs60.rename(tmpPath, this.filePath);
37545
+ await fs62.writeFile(tmpPath, payload, "utf8");
37546
+ await fs62.rename(tmpPath, this.filePath);
37437
37547
  }
37438
37548
  };
37439
37549
  function applyJitter(ms) {
@@ -37981,8 +38091,8 @@ async function postCredentialSync(opts, fetchImpl = fetch) {
37981
38091
 
37982
38092
  // src/packs/gates.ts
37983
38093
  var import_node_child_process22 = require("child_process");
37984
- var fs61 = __toESM(require("fs"));
37985
- var path71 = __toESM(require("path"));
38094
+ var fs63 = __toESM(require("fs"));
38095
+ var path74 = __toESM(require("path"));
37986
38096
  var defaultCommandRunner = (file, args2, cwd, timeoutMs, env) => new Promise((resolve12) => {
37987
38097
  (0, import_node_child_process22.execFile)(
37988
38098
  file,
@@ -38032,7 +38142,7 @@ async function changedFiles(run, cwd, from, to) {
38032
38142
  }
38033
38143
  function readWorkspaceFile(cwd, relPath) {
38034
38144
  try {
38035
- return fs61.readFileSync(path71.join(cwd, relPath), "utf8");
38145
+ return fs63.readFileSync(path74.join(cwd, relPath), "utf8");
38036
38146
  } catch {
38037
38147
  return null;
38038
38148
  }
@@ -38041,14 +38151,14 @@ var NO_TEST_PLACEHOLDER = 'echo "Error: no test specified"';
38041
38151
  var CHECKS_TIMEOUT_MS = 5 * 6e4;
38042
38152
  function detectChecksCommand(cwd) {
38043
38153
  try {
38044
- const cfg = JSON.parse(fs61.readFileSync(path71.join(cwd, ".codeam", "pack.json"), "utf8"));
38154
+ const cfg = JSON.parse(fs63.readFileSync(path74.join(cwd, ".codeam", "pack.json"), "utf8"));
38045
38155
  if (typeof cfg.checksCommand === "string" && cfg.checksCommand.trim().length > 0) {
38046
38156
  return cfg.checksCommand.trim();
38047
38157
  }
38048
38158
  } catch {
38049
38159
  }
38050
38160
  try {
38051
- const pkg = JSON.parse(fs61.readFileSync(path71.join(cwd, "package.json"), "utf8"));
38161
+ const pkg = JSON.parse(fs63.readFileSync(path74.join(cwd, "package.json"), "utf8"));
38052
38162
  const test = pkg.scripts?.test;
38053
38163
  if (typeof test === "string" && test.trim().length > 0 && !test.includes(NO_TEST_PLACEHOLDER)) {
38054
38164
  return "npm test";
@@ -38066,39 +38176,39 @@ ${res.stderr}`.trim();
38066
38176
  }
38067
38177
 
38068
38178
  // src/packs/run-store.ts
38069
- var fs62 = __toESM(require("fs"));
38070
- var path72 = __toESM(require("path"));
38179
+ var fs64 = __toESM(require("fs"));
38180
+ var path75 = __toESM(require("path"));
38071
38181
  var crypto5 = __toESM(require("crypto"));
38072
38182
  function packsDir(cwd) {
38073
- return path72.join(cwd, ".codeam", "packs");
38183
+ return path75.join(cwd, ".codeam", "packs");
38074
38184
  }
38075
38185
  function runDir(cwd, runId) {
38076
- return path72.join(packsDir(cwd), runId);
38186
+ return path75.join(packsDir(cwd), runId);
38077
38187
  }
38078
38188
  function newRunId() {
38079
38189
  return `pk_${Date.now().toString(36)}_${crypto5.randomBytes(4).toString("hex")}`;
38080
38190
  }
38081
38191
  function writeJsonAtomic(file, value) {
38082
- fs62.mkdirSync(path72.dirname(file), { recursive: true });
38192
+ fs64.mkdirSync(path75.dirname(file), { recursive: true });
38083
38193
  const tmp = `${file}.tmp`;
38084
- fs62.writeFileSync(tmp, JSON.stringify(value, null, 2));
38085
- fs62.renameSync(tmp, file);
38194
+ fs64.writeFileSync(tmp, JSON.stringify(value, null, 2));
38195
+ fs64.renameSync(tmp, file);
38086
38196
  }
38087
38197
  function saveRun(cwd, state) {
38088
- writeJsonAtomic(path72.join(runDir(cwd, state.runId), "run.json"), state);
38198
+ writeJsonAtomic(path75.join(runDir(cwd, state.runId), "run.json"), state);
38089
38199
  }
38090
38200
  function saveStageHandoff(cwd, runId, stageIndex, role, handoff) {
38091
38201
  const name = `${String(stageIndex + 1).padStart(2, "0")}-${role}.json`;
38092
- writeJsonAtomic(path72.join(runDir(cwd, runId), name), handoff);
38202
+ writeJsonAtomic(path75.join(runDir(cwd, runId), name), handoff);
38093
38203
  }
38094
38204
  function loadLatestRun(cwd) {
38095
38205
  try {
38096
38206
  const dir = packsDir(cwd);
38097
- const entries = fs62.readdirSync(dir, { withFileTypes: true }).filter((e) => e.isDirectory()).map((e) => e.name).sort();
38207
+ const entries = fs64.readdirSync(dir, { withFileTypes: true }).filter((e) => e.isDirectory()).map((e) => e.name).sort();
38098
38208
  for (let i = entries.length - 1; i >= 0; i--) {
38099
- const file = path72.join(dir, entries[i], "run.json");
38209
+ const file = path75.join(dir, entries[i], "run.json");
38100
38210
  try {
38101
- const parsed = JSON.parse(fs62.readFileSync(file, "utf8"));
38211
+ const parsed = JSON.parse(fs64.readFileSync(file, "utf8"));
38102
38212
  if (parsed && typeof parsed.runId === "string") return parsed;
38103
38213
  } catch {
38104
38214
  }
@@ -38109,17 +38219,17 @@ function loadLatestRun(cwd) {
38109
38219
  }
38110
38220
  function ensureLedgerIgnored(cwd) {
38111
38221
  try {
38112
- const gitDir = path72.join(cwd, ".git");
38113
- if (!fs62.existsSync(gitDir)) return;
38114
- const exclude = path72.join(gitDir, "info", "exclude");
38222
+ const gitDir = path75.join(cwd, ".git");
38223
+ if (!fs64.existsSync(gitDir)) return;
38224
+ const exclude = path75.join(gitDir, "info", "exclude");
38115
38225
  let existing = "";
38116
38226
  try {
38117
- existing = fs62.readFileSync(exclude, "utf8");
38227
+ existing = fs64.readFileSync(exclude, "utf8");
38118
38228
  } catch {
38119
38229
  }
38120
38230
  if (existing.includes(".codeam/packs/")) return;
38121
- fs62.mkdirSync(path72.dirname(exclude), { recursive: true });
38122
- fs62.writeFileSync(exclude, `${existing.trimEnd()}
38231
+ fs64.mkdirSync(path75.dirname(exclude), { recursive: true });
38232
+ fs64.writeFileSync(exclude, `${existing.trimEnd()}
38123
38233
  .codeam/packs/
38124
38234
  `.trimStart());
38125
38235
  } catch {
@@ -39459,55 +39569,6 @@ function buildAcpPromptBlocks(payload) {
39459
39569
  return blocks;
39460
39570
  }
39461
39571
 
39462
- // src/agents/agent-standard.ts
39463
- var fs66 = __toESM(require("fs"));
39464
- var path76 = __toESM(require("path"));
39465
- var os51 = __toESM(require("os"));
39466
- function ensureAgentStandard(homeDir2 = os51.homedir()) {
39467
- try {
39468
- const file = path76.join(homeDir2, ".claude", "CLAUDE.md");
39469
- let existing = "";
39470
- try {
39471
- existing = fs66.readFileSync(file, "utf8");
39472
- } catch {
39473
- }
39474
- if (existing.includes(AGENT_STANDARD_MARKER)) return;
39475
- fs66.mkdirSync(path76.dirname(file), { recursive: true });
39476
- const next = existing.trim() ? `${existing.trimEnd()}
39477
-
39478
- ${AGENT_STANDARD_BLOCK}
39479
- ` : `${AGENT_STANDARD_BLOCK}
39480
- `;
39481
- fs66.writeFileSync(file, next);
39482
- } catch {
39483
- }
39484
- }
39485
- var _agentStandardSeam = {
39486
- isLocalSession: () => isLocalSession(),
39487
- markerPath: (sessionId) => path76.join(os51.homedir(), ".codeam", "agent-standard", `${sessionId}.done`),
39488
- exists: (p2) => fs66.existsSync(p2),
39489
- write: (p2) => {
39490
- fs66.mkdirSync(path76.dirname(p2), { recursive: true });
39491
- fs66.writeFileSync(p2, "");
39492
- }
39493
- };
39494
- function isClaude(agent) {
39495
- return agent === "claude" || agent === "claude_code";
39496
- }
39497
- function maybePrefaceAgentStandard(blocks, agent, sessionId, seam = _agentStandardSeam) {
39498
- if (seam.isLocalSession()) return;
39499
- if (isClaude(agent)) return;
39500
- if (!sessionId) return;
39501
- const marker = seam.markerPath(sessionId);
39502
- try {
39503
- if (seam.exists(marker)) return;
39504
- seam.write(marker);
39505
- } catch {
39506
- return;
39507
- }
39508
- blocks.unshift({ type: "text", text: AGENT_STANDARD_TEXT });
39509
- }
39510
-
39511
39572
  // src/agents/acp/promptEcho.ts
39512
39573
  var MAX_PROMPT_CHARS = 200;
39513
39574
  var MAX_AGENT_REPLY_CHARS = 280;
@@ -41645,16 +41706,19 @@ async function runAcpSession(opts) {
41645
41706
  switchCredentialEnv = provisionAgentCredentials(agentId, auth);
41646
41707
  },
41647
41708
  provisionHouseProxy: ({ baseUrl, token, model, managedAgentId }) => {
41648
- const claudeConfigDir = path77.join(
41649
- os52.homedir(),
41709
+ const claudeConfigDir = path79.join(
41710
+ os53.homedir(),
41650
41711
  ".codeam",
41651
41712
  "house-claude",
41652
41713
  `switch-${opts.pluginId}`
41653
41714
  );
41654
41715
  try {
41655
- fs67.mkdirSync(claudeConfigDir, { recursive: true, mode: 448 });
41716
+ fs68.mkdirSync(claudeConfigDir, { recursive: true, mode: 448 });
41656
41717
  } catch {
41657
41718
  }
41719
+ const memoryFile = path79.join(claudeConfigDir, "CLAUDE.md");
41720
+ ensureBeadsWorkflowHint(void 0, memoryFile);
41721
+ ensureAgentStandard(void 0, memoryFile);
41658
41722
  const cfg = {
41659
41723
  baseUrl,
41660
41724
  token,
@@ -42860,59 +42924,6 @@ function startClaudeCredentialSync(opts) {
42860
42924
  };
42861
42925
  }
42862
42926
 
42863
- // src/beads/workflow-hint.ts
42864
- var fs68 = __toESM(require("fs"));
42865
- var path78 = __toESM(require("path"));
42866
- var os53 = __toESM(require("os"));
42867
- var BEADS_HINT_MARKER = "<!-- codeam:beads-workflow -->";
42868
- var BEADS_HINT = `${BEADS_HINT_MARKER}
42869
- # Beads (bd) \u2014 task tracking + persistent memory (ALWAYS use it)
42870
-
42871
- This environment uses **bd (beads)** for issue/task tracking and persistent memory.
42872
-
42873
- - Use \`bd\` for ALL task tracking \u2014 do NOT use TodoWrite or markdown TODO lists.
42874
- - Run \`bd prime\` (via your shell tool, once) when you start working on a task, for
42875
- the full workflow context + project memories. Not needed to answer a greeting or
42876
- a quick question. On a fresh session beads may still be provisioning for a few
42877
- seconds \u2014 if \`bd prime\` comes back empty, retry it shortly; it works once the
42878
- shared server is up.
42879
- - \`bd ready\` (available work) \xB7 \`bd show <id>\` \xB7 \`bd update <id> --claim\` \xB7 \`bd close <id>\`.
42880
- - Use \`bd remember "..."\` for persistent knowledge \u2014 do NOT use MEMORY.md files.
42881
- - Run \`bd\` commands through your shell tool and summarize the outcome. Never
42882
- paste \`bd\` commands or their raw output into your reply.
42883
- - CodeAgent installs, starts and repairs beads \u2014 not you. If a \`bd\` command
42884
- fails, carry on with the user's task without task tracking and try \`bd\`
42885
- again later. Never run \`bd init\`, \`bd bootstrap\`, \`bd doctor --fix\` or
42886
- \`dolt\` commands yourself: they race the provisioning and can wipe the
42887
- project's issues.
42888
- ${BEADS_HINT_MARKER}`;
42889
- function ensureBeadsWorkflowHint(homeDir2 = os53.homedir()) {
42890
- try {
42891
- const file = path78.join(homeDir2, ".claude", "CLAUDE.md");
42892
- let existing = "";
42893
- try {
42894
- existing = fs68.readFileSync(file, "utf8");
42895
- } catch {
42896
- }
42897
- if (existing.includes(BEADS_HINT)) return;
42898
- fs68.mkdirSync(path78.dirname(file), { recursive: true });
42899
- let next;
42900
- const open = existing.indexOf(BEADS_HINT_MARKER);
42901
- const close = open === -1 ? -1 : existing.indexOf(BEADS_HINT_MARKER, open + BEADS_HINT_MARKER.length);
42902
- if (open !== -1 && close !== -1) {
42903
- next = existing.slice(0, open) + BEADS_HINT + existing.slice(close + BEADS_HINT_MARKER.length);
42904
- } else {
42905
- next = existing.trim() ? `${existing.trimEnd()}
42906
-
42907
- ${BEADS_HINT}
42908
- ` : `${BEADS_HINT}
42909
- `;
42910
- }
42911
- fs68.writeFileSync(file, next);
42912
- } catch {
42913
- }
42914
- }
42915
-
42916
42927
  // src/commands/start/pick-session.ts
42917
42928
  function pickPinnedSession(pinnedId, listSessions2) {
42918
42929
  const id = pinnedId?.trim();
@@ -42929,7 +42940,7 @@ function pickPinnedSession(pinnedId, listSessions2) {
42929
42940
 
42930
42941
  // src/agents/retired-proxy-cleanup.ts
42931
42942
  var fs69 = __toESM(require("fs"));
42932
- var path79 = __toESM(require("path"));
42943
+ var path80 = __toESM(require("path"));
42933
42944
  var os54 = __toESM(require("os"));
42934
42945
  var RETIRED_PROXY_RE = /^https?:\/\/(?:127\.0\.0\.1|localhost|\[::1\]):8787(?:[/?#]|$)/i;
42935
42946
  var HEADROOM_CMD_RE = /(^|[\s/"'])headroom(\s|$)/i;
@@ -42941,7 +42952,7 @@ function isHeadroomHook(group) {
42941
42952
  }
42942
42953
  function sanitizeRetiredProxyConfig(homeDir2 = os54.homedir()) {
42943
42954
  const out2 = { inspected: false, changed: false, removed: [] };
42944
- const file = path79.join(homeDir2, ".claude", "settings.json");
42955
+ const file = path80.join(homeDir2, ".claude", "settings.json");
42945
42956
  let parsed;
42946
42957
  try {
42947
42958
  parsed = JSON.parse(fs69.readFileSync(file, "utf8"));
@@ -43962,11 +43973,11 @@ function keepDeviceAwake(deps = {}) {
43962
43973
  // src/agents/claude/onboarding.ts
43963
43974
  var fs71 = __toESM(require("fs"));
43964
43975
  var os56 = __toESM(require("os"));
43965
- var path80 = __toESM(require("path"));
43976
+ var path81 = __toESM(require("path"));
43966
43977
  var ONBOARDING_VERSION_SENTINEL = "9999.0.0";
43967
43978
  function ensureClaudeOnboarded(cwd) {
43968
43979
  try {
43969
- const file = path80.join(os56.homedir(), ".claude.json");
43980
+ const file = path81.join(os56.homedir(), ".claude.json");
43970
43981
  let config = {};
43971
43982
  try {
43972
43983
  config = JSON.parse(fs71.readFileSync(file, "utf8"));
@@ -43994,7 +44005,7 @@ function ensureClaudeOnboarded(cwd) {
43994
44005
  }
43995
44006
  }
43996
44007
  if (!changed) return;
43997
- fs71.mkdirSync(path80.dirname(file), { recursive: true });
44008
+ fs71.mkdirSync(path81.dirname(file), { recursive: true });
43998
44009
  fs71.writeFileSync(file, JSON.stringify(config, null, 2));
43999
44010
  log.info(
44000
44011
  "claude",
@@ -44764,7 +44775,7 @@ var import_picocolors10 = __toESM(require("picocolors"));
44764
44775
  var import_child_process30 = require("child_process");
44765
44776
  var import_util4 = require("util");
44766
44777
  var import_picocolors8 = __toESM(require("picocolors"));
44767
- var path81 = __toESM(require("path"));
44778
+ var path82 = __toESM(require("path"));
44768
44779
  var execFileP5 = (0, import_util4.promisify)(import_child_process30.execFile);
44769
44780
  var MAX_BUFFER = 8 * 1024 * 1024;
44770
44781
  function resetStdinForChild() {
@@ -45253,7 +45264,7 @@ var GitHubCodespacesProvider = class {
45253
45264
  });
45254
45265
  }
45255
45266
  async uploadFile(workspaceId, remotePath, contents, options = {}) {
45256
- const remoteDir = path81.posix.dirname(remotePath);
45267
+ const remoteDir = path82.posix.dirname(remotePath);
45257
45268
  const parts = [
45258
45269
  `mkdir -p ${shellQuote(remoteDir)}`,
45259
45270
  `cat > ${shellQuote(remotePath)}`
@@ -45323,7 +45334,7 @@ function shellQuote(s) {
45323
45334
  // src/services/providers/gitpod.ts
45324
45335
  var import_child_process31 = require("child_process");
45325
45336
  var import_util5 = require("util");
45326
- var path82 = __toESM(require("path"));
45337
+ var path83 = __toESM(require("path"));
45327
45338
  var import_picocolors9 = __toESM(require("picocolors"));
45328
45339
  var execFileP6 = (0, import_util5.promisify)(import_child_process31.execFile);
45329
45340
  var MAX_BUFFER2 = 8 * 1024 * 1024;
@@ -45563,7 +45574,7 @@ var GitpodProvider = class {
45563
45574
  });
45564
45575
  }
45565
45576
  async uploadFile(workspaceId, remotePath, contents, options = {}) {
45566
- const remoteDir = path82.posix.dirname(remotePath);
45577
+ const remoteDir = path83.posix.dirname(remotePath);
45567
45578
  const parts = [
45568
45579
  `mkdir -p ${shellQuote2(remoteDir)}`,
45569
45580
  `cat > ${shellQuote2(remotePath)}`
@@ -45599,7 +45610,7 @@ function shellQuote2(s) {
45599
45610
  // src/services/providers/gitlab-workspaces.ts
45600
45611
  var import_child_process32 = require("child_process");
45601
45612
  var import_util6 = require("util");
45602
- var path83 = __toESM(require("path"));
45613
+ var path84 = __toESM(require("path"));
45603
45614
  var execFileP7 = (0, import_util6.promisify)(import_child_process32.execFile);
45604
45615
  var MAX_BUFFER3 = 8 * 1024 * 1024;
45605
45616
  var GITLAB_API_BASE = process.env.CODEAM_GITLAB_API_URL ?? "https://gitlab.com/api/v4";
@@ -45859,7 +45870,7 @@ Docs: https://docs.gitlab.com/ee/user/workspace/configuration.html`
45859
45870
  }
45860
45871
  async uploadFile(workspaceId, remotePath, contents, options = {}) {
45861
45872
  const sshHost = process.env.CODEAM_GITLAB_SSH_HOST ?? "workspaces.gitlab.com";
45862
- const remoteDir = path83.posix.dirname(remotePath);
45873
+ const remoteDir = path84.posix.dirname(remotePath);
45863
45874
  const parts = [`mkdir -p ${shellQuote3(remoteDir)}`, `cat > ${shellQuote3(remotePath)}`];
45864
45875
  if (options.mode != null) {
45865
45876
  parts.push(`chmod ${options.mode.toString(8)} ${shellQuote3(remotePath)}`);
@@ -45927,7 +45938,7 @@ function shellQuote3(s) {
45927
45938
  // src/services/providers/railway.ts
45928
45939
  var import_child_process33 = require("child_process");
45929
45940
  var import_util7 = require("util");
45930
- var path84 = __toESM(require("path"));
45941
+ var path85 = __toESM(require("path"));
45931
45942
  var execFileP8 = (0, import_util7.promisify)(import_child_process33.execFile);
45932
45943
  var MAX_BUFFER4 = 8 * 1024 * 1024;
45933
45944
  function resetStdinForChild4() {
@@ -46163,7 +46174,7 @@ var RailwayProvider = class {
46163
46174
  if (!projectId || !serviceId) {
46164
46175
  throw new Error("Invalid Railway workspace id (expected projectId/serviceId).");
46165
46176
  }
46166
- const remoteDir = path84.posix.dirname(remotePath);
46177
+ const remoteDir = path85.posix.dirname(remotePath);
46167
46178
  const parts = [`mkdir -p ${shellQuote4(remoteDir)}`, `cat > ${shellQuote4(remotePath)}`];
46168
46179
  if (options.mode != null) {
46169
46180
  parts.push(`chmod ${options.mode.toString(8)} ${shellQuote4(remotePath)}`);
@@ -46705,7 +46716,7 @@ async function stopWorkspaceFromLocal(target) {
46705
46716
  // src/commands/host/host-client.ts
46706
46717
  var fs72 = __toESM(require("fs"));
46707
46718
  var os57 = __toESM(require("os"));
46708
- var path85 = __toESM(require("path"));
46719
+ var path86 = __toESM(require("path"));
46709
46720
  var import_node_crypto11 = require("crypto");
46710
46721
  function sampleCpuTimes() {
46711
46722
  let idle = 0;
@@ -46753,7 +46764,7 @@ function apiBase() {
46753
46764
  return process.env.CODEAM_API_URL ?? resolveApiBaseUrl();
46754
46765
  }
46755
46766
  function hostIdentityPath() {
46756
- return path85.join(os57.homedir(), ".codeam", "host-agent.json");
46767
+ return path86.join(os57.homedir(), ".codeam", "host-agent.json");
46757
46768
  }
46758
46769
  function collectOsInfo() {
46759
46770
  return {
@@ -46784,7 +46795,7 @@ function loadHostIdentity() {
46784
46795
  }
46785
46796
  function saveHostIdentity(identity) {
46786
46797
  const file = hostIdentityPath();
46787
- fs72.mkdirSync(path85.dirname(file), { recursive: true, mode: 448 });
46798
+ fs72.mkdirSync(path86.dirname(file), { recursive: true, mode: 448 });
46788
46799
  fs72.writeFileSync(file, JSON.stringify(identity, null, 2), {
46789
46800
  encoding: "utf8",
46790
46801
  mode: 384
@@ -47045,7 +47056,7 @@ async function host(args2) {
47045
47056
  var import_node_child_process30 = require("child_process");
47046
47057
  var os62 = __toESM(require("os"));
47047
47058
  var fs77 = __toESM(require("fs"));
47048
- var path90 = __toESM(require("path"));
47059
+ var path91 = __toESM(require("path"));
47049
47060
 
47050
47061
  // src/skills/persist-from-payload.ts
47051
47062
  function persistOrClearSkillsFromPayload(skills) {
@@ -47056,11 +47067,11 @@ function persistOrClearSkillsFromPayload(skills) {
47056
47067
  // src/commands/host/session-state.ts
47057
47068
  var fs73 = __toESM(require("fs"));
47058
47069
  var os58 = __toESM(require("os"));
47059
- var path86 = __toESM(require("path"));
47070
+ var path87 = __toESM(require("path"));
47060
47071
  function hostSessionStatePath(env = process.env) {
47061
47072
  const override = env.CODEAM_HOST_SESSION_STATE_FILE;
47062
47073
  if (override && override.trim()) return override.trim();
47063
- return path86.join(os58.homedir(), ".codeam", "host-agent-sessions.json");
47074
+ return path87.join(os58.homedir(), ".codeam", "host-agent-sessions.json");
47064
47075
  }
47065
47076
  function isRecord5(v) {
47066
47077
  if (typeof v !== "object" || v === null) return false;
@@ -47079,7 +47090,7 @@ function fileSessionChildStore(file = hostSessionStatePath()) {
47079
47090
  },
47080
47091
  save(list) {
47081
47092
  try {
47082
- fs73.mkdirSync(path86.dirname(file), { recursive: true, mode: 448 });
47093
+ fs73.mkdirSync(path87.dirname(file), { recursive: true, mode: 448 });
47083
47094
  const tmp = `${file}.${process.pid}.tmp`;
47084
47095
  fs73.writeFileSync(tmp, JSON.stringify({ version: 1, sessions: list }, null, 2), {
47085
47096
  mode: 384
@@ -47113,9 +47124,9 @@ function planSessionResume(records, max) {
47113
47124
  return { resume: ordered.slice(0, bound), dropped: ordered.slice(bound) };
47114
47125
  }
47115
47126
  function pickSavedSessionForWorkspace(sessions3, cwd) {
47116
- const target = path86.resolve(cwd);
47127
+ const target = path87.resolve(cwd);
47117
47128
  const matches = sessions3.filter(
47118
- (s) => !!s.cwd && path86.resolve(s.cwd) === target && !!s.pluginId && !!s.pollSecret && !!s.agent
47129
+ (s) => !!s.cwd && path87.resolve(s.cwd) === target && !!s.pluginId && !!s.pollSecret && !!s.agent
47119
47130
  );
47120
47131
  if (matches.length === 0) return null;
47121
47132
  matches.sort((a, b) => b.pairedAt - a.pairedAt);
@@ -47125,23 +47136,23 @@ function pickSavedSessionForWorkspace(sessions3, cwd) {
47125
47136
  // src/commands/host/workspace.ts
47126
47137
  var fs74 = __toESM(require("fs"));
47127
47138
  var os59 = __toESM(require("os"));
47128
- var path87 = __toESM(require("path"));
47139
+ var path88 = __toESM(require("path"));
47129
47140
  var import_node_child_process25 = require("child_process");
47130
47141
  var import_node_util5 = require("util");
47131
47142
  var execFileP9 = (0, import_node_util5.promisify)(import_node_child_process25.execFile);
47132
47143
  function isAbsolutePathTarget(target) {
47133
- return path87.isAbsolute(target);
47144
+ return path88.isAbsolute(target);
47134
47145
  }
47135
47146
  function selfHostedWorkspaceRoot() {
47136
- return path87.join(os59.homedir(), ".codeam", "self-hosted");
47147
+ return path88.join(os59.homedir(), ".codeam", "self-hosted");
47137
47148
  }
47138
47149
  function deployIdFromWorkspace(cwd) {
47139
47150
  if (!cwd) return null;
47140
47151
  const root = selfHostedWorkspaceRoot();
47141
- const resolved = path87.resolve(cwd);
47142
- const rel = path87.relative(root, resolved);
47143
- if (!rel || rel.startsWith("..") || path87.isAbsolute(rel)) return null;
47144
- const parts = rel.split(path87.sep).filter(Boolean);
47152
+ const resolved = path88.resolve(cwd);
47153
+ const rel = path88.relative(root, resolved);
47154
+ if (!rel || rel.startsWith("..") || path88.isAbsolute(rel)) return null;
47155
+ const parts = rel.split(path88.sep).filter(Boolean);
47145
47156
  if (parts.length !== 1) return null;
47146
47157
  return parts[0];
47147
47158
  }
@@ -47213,7 +47224,7 @@ async function configureGitCredentials(dest, repoRef, cloneToken, provider = "gi
47213
47224
  const isGitlab = provider === "gitlab";
47214
47225
  if (isGitlab ? !gitlabProjectPath(repoRef.trim()) : !githubOwnerRepo(repoRef.trim())) return;
47215
47226
  if (!cloneToken) return;
47216
- const credFile = path87.join(dest, ".git", "codeam-credentials");
47227
+ const credFile = path88.join(dest, ".git", "codeam-credentials");
47217
47228
  const credLine = isGitlab ? `https://oauth2:${cloneToken}@gitlab.com
47218
47229
  ` : `https://x-access-token:${cloneToken}@github.com
47219
47230
  `;
@@ -47221,7 +47232,7 @@ async function configureGitCredentials(dest, repoRef, cloneToken, provider = "gi
47221
47232
  restrictToOwner(credFile);
47222
47233
  const env = nonInteractiveGitEnv();
47223
47234
  const git2 = (args2) => execFileP9("git", ["-C", dest, ...args2], { timeout: 3e4, env });
47224
- const credFilePosix = credFile.split(path87.sep).join("/");
47235
+ const credFilePosix = credFile.split(path88.sep).join("/");
47225
47236
  await git2(["config", "--local", "--replace-all", "credential.helper", ""]).catch(() => {
47226
47237
  });
47227
47238
  await git2([
@@ -47259,8 +47270,8 @@ async function prepareWorkspace(repoOrPath, deployId, cloneToken, provider = "gi
47259
47270
  }
47260
47271
  return repoOrPath;
47261
47272
  }
47262
- const dest = path87.join(selfHostedWorkspaceRoot(), deployId);
47263
- if (fs74.existsSync(path87.join(dest, ".git"))) {
47273
+ const dest = path88.join(selfHostedWorkspaceRoot(), deployId);
47274
+ if (fs74.existsSync(path88.join(dest, ".git"))) {
47264
47275
  if (cloneToken) await configureGitCredentials(dest, repoOrPath, cloneToken, provider);
47265
47276
  return dest;
47266
47277
  }
@@ -47285,9 +47296,9 @@ async function prepareWorkspace(repoOrPath, deployId, cloneToken, provider = "gi
47285
47296
  var import_node_child_process26 = require("child_process");
47286
47297
  var fs75 = __toESM(require("fs"));
47287
47298
  var os60 = __toESM(require("os"));
47288
- var path88 = __toESM(require("path"));
47299
+ var path89 = __toESM(require("path"));
47289
47300
  function codeamBinDir() {
47290
- return process.env.CODEAM_BIN_DIR ?? path88.join(os60.homedir(), ".codeam", "bin");
47301
+ return process.env.CODEAM_BIN_DIR ?? path89.join(os60.homedir(), ".codeam", "bin");
47291
47302
  }
47292
47303
  var FALLBACK_GH_VERSION = "2.62.0";
47293
47304
  var RELEASE_API = "https://api.github.com/repos/cli/cli/releases/latest";
@@ -47342,8 +47353,8 @@ async function ensureGhCli(runner, token, deps = {}) {
47342
47353
  const version3 = await resolveVersionFn(token);
47343
47354
  const asset = `gh_${version3}_${osToken}_${arch2}`;
47344
47355
  const url2 = `https://github.com/cli/cli/releases/download/v${version3}/${asset}.${ext}`;
47345
- const tmpRoot = fs75.mkdtempSync(path88.join(os60.tmpdir(), "codeam-gh-"));
47346
- const archive = path88.join(tmpRoot, `${asset}.${ext}`);
47356
+ const tmpRoot = fs75.mkdtempSync(path89.join(os60.tmpdir(), "codeam-gh-"));
47357
+ const archive = path89.join(tmpRoot, `${asset}.${ext}`);
47347
47358
  if (!await downloadFn(url2, archive)) {
47348
47359
  log.warn("host-agent", "gh download failed \u2014 skipping (git pull/push still work via the credential helper)");
47349
47360
  return null;
@@ -47353,14 +47364,14 @@ async function ensureGhCli(runner, token, deps = {}) {
47353
47364
  log.warn("host-agent", `gh archive extraction failed (code=${String(extract.code)}) \u2014 skipping`);
47354
47365
  return null;
47355
47366
  }
47356
- const extractedBin = path88.join(tmpRoot, asset, "bin", binaryName);
47367
+ const extractedBin = path89.join(tmpRoot, asset, "bin", binaryName);
47357
47368
  if (!fs75.existsSync(extractedBin)) {
47358
47369
  log.warn("host-agent", "gh binary not found in the extracted archive \u2014 skipping");
47359
47370
  return null;
47360
47371
  }
47361
47372
  const binDir = codeamBinDir();
47362
47373
  fs75.mkdirSync(binDir, { recursive: true });
47363
- const target = path88.join(binDir, binaryName);
47374
+ const target = path89.join(binDir, binaryName);
47364
47375
  fs75.copyFileSync(extractedBin, target);
47365
47376
  fs75.chmodSync(target, 493);
47366
47377
  log.info("host-agent", `gh installed to ${target} (v${version3})`);
@@ -47399,16 +47410,16 @@ async function ensureGhAuth(runner, ghCmd, token) {
47399
47410
  }
47400
47411
  function ghConfigDir() {
47401
47412
  if (process.env.GH_CONFIG_DIR) return process.env.GH_CONFIG_DIR;
47402
- if (process.env.XDG_CONFIG_HOME) return path88.join(process.env.XDG_CONFIG_HOME, "gh");
47413
+ if (process.env.XDG_CONFIG_HOME) return path89.join(process.env.XDG_CONFIG_HOME, "gh");
47403
47414
  if (process.platform === "win32" && process.env.APPDATA) {
47404
- return path88.join(process.env.APPDATA, "GitHub CLI");
47415
+ return path89.join(process.env.APPDATA, "GitHub CLI");
47405
47416
  }
47406
- return path88.join(os60.homedir(), ".config", "gh");
47417
+ return path89.join(os60.homedir(), ".config", "gh");
47407
47418
  }
47408
47419
  function writeGhHostsToken(token) {
47409
47420
  try {
47410
47421
  const dir = ghConfigDir();
47411
- const file = path88.join(dir, "hosts.yml");
47422
+ const file = path89.join(dir, "hosts.yml");
47412
47423
  if (fs75.existsSync(file)) return false;
47413
47424
  fs75.mkdirSync(dir, { recursive: true, mode: 448 });
47414
47425
  fs75.writeFileSync(
@@ -47454,8 +47465,8 @@ async function ensureGlabCli(runner, deps = {}) {
47454
47465
  const version3 = await resolveLatestGlabVersion();
47455
47466
  const asset = `glab_${version3}_${osToken}_${arch2}`;
47456
47467
  const url2 = `https://gitlab.com/gitlab-org/cli/-/releases/v${version3}/downloads/${asset}.${ext}`;
47457
- const tmpRoot = fs75.mkdtempSync(path88.join(os60.tmpdir(), "codeam-glab-"));
47458
- const archive = path88.join(tmpRoot, `${asset}.${ext}`);
47468
+ const tmpRoot = fs75.mkdtempSync(path89.join(os60.tmpdir(), "codeam-glab-"));
47469
+ const archive = path89.join(tmpRoot, `${asset}.${ext}`);
47459
47470
  if (!await downloadFn(url2, archive)) {
47460
47471
  log.warn("host-agent", "glab download failed \u2014 skipping (git push/pull still work)");
47461
47472
  return null;
@@ -47466,9 +47477,9 @@ async function ensureGlabCli(runner, deps = {}) {
47466
47477
  return null;
47467
47478
  }
47468
47479
  const candidates = [
47469
- path88.join(tmpRoot, "bin", binaryName),
47470
- path88.join(tmpRoot, asset, "bin", binaryName),
47471
- path88.join(tmpRoot, binaryName)
47480
+ path89.join(tmpRoot, "bin", binaryName),
47481
+ path89.join(tmpRoot, asset, "bin", binaryName),
47482
+ path89.join(tmpRoot, binaryName)
47472
47483
  ];
47473
47484
  const extractedBin = candidates.find((c2) => fs75.existsSync(c2));
47474
47485
  if (!extractedBin) {
@@ -47477,7 +47488,7 @@ async function ensureGlabCli(runner, deps = {}) {
47477
47488
  }
47478
47489
  const binDir = codeamBinDir();
47479
47490
  fs75.mkdirSync(binDir, { recursive: true });
47480
- const target = path88.join(binDir, binaryName);
47491
+ const target = path89.join(binDir, binaryName);
47481
47492
  fs75.copyFileSync(extractedBin, target);
47482
47493
  fs75.chmodSync(target, 493);
47483
47494
  log.info("host-agent", `glab installed to ${target} (v${version3})`);
@@ -47563,7 +47574,7 @@ var import_node_child_process28 = require("child_process");
47563
47574
  // src/lib/updateNotifier.ts
47564
47575
  var fs76 = __toESM(require("fs"));
47565
47576
  var os61 = __toESM(require("os"));
47566
- var path89 = __toESM(require("path"));
47577
+ var path90 = __toESM(require("path"));
47567
47578
  var https8 = __toESM(require("https"));
47568
47579
  var import_node_child_process27 = require("child_process");
47569
47580
  var import_picocolors12 = __toESM(require("picocolors"));
@@ -47572,8 +47583,8 @@ var REGISTRY_URL = `https://registry.npmjs.org/${PKG_NAME}/latest`;
47572
47583
  var TTL_MS = 24 * 60 * 60 * 1e3;
47573
47584
  var REQUEST_TIMEOUT_MS = 1500;
47574
47585
  function cachePath() {
47575
- const dir = path89.join(os61.homedir(), ".codeam");
47576
- return path89.join(dir, "update-check.json");
47586
+ const dir = path90.join(os61.homedir(), ".codeam");
47587
+ return path90.join(dir, "update-check.json");
47577
47588
  }
47578
47589
  function readCache() {
47579
47590
  try {
@@ -47588,7 +47599,7 @@ function readCache() {
47588
47599
  function writeCache(cache) {
47589
47600
  try {
47590
47601
  const file = cachePath();
47591
- fs76.mkdirSync(path89.dirname(file), { recursive: true });
47602
+ fs76.mkdirSync(path90.dirname(file), { recursive: true });
47592
47603
  const tmp = `${file}.${process.pid}.tmp`;
47593
47604
  fs76.writeFileSync(tmp, JSON.stringify(cache));
47594
47605
  fs76.renameSync(tmp, file);
@@ -47665,7 +47676,7 @@ function isLinkedInstall() {
47665
47676
  timeout: 2e3
47666
47677
  }).trim();
47667
47678
  if (!root) return false;
47668
- const pkgPath = path89.join(root, PKG_NAME);
47679
+ const pkgPath = path90.join(root, PKG_NAME);
47669
47680
  return fs76.lstatSync(pkgPath).isSymbolicLink();
47670
47681
  } catch {
47671
47682
  return false;
@@ -47718,7 +47729,7 @@ async function autoUpgradeBeforeCriticalCommand() {
47718
47729
  if (process.env.NODE_ENV === "test") return;
47719
47730
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
47720
47731
  if (process.env.CI) return;
47721
- const current2 = true ? "2.75.21" : null;
47732
+ const current2 = true ? "2.75.22" : null;
47722
47733
  if (!current2) return;
47723
47734
  const cache = readCache();
47724
47735
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
@@ -47735,7 +47746,7 @@ function checkForUpdates() {
47735
47746
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
47736
47747
  if (process.env.CI) return;
47737
47748
  if (!process.stdout.isTTY) return;
47738
- const current2 = true ? "2.75.21" : null;
47749
+ const current2 = true ? "2.75.22" : null;
47739
47750
  if (!current2) return;
47740
47751
  const cache = readCache();
47741
47752
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
@@ -47758,7 +47769,7 @@ var SELF_UPDATE_INSTALL_TIMEOUT_MS = 18e4;
47758
47769
  var SELF_UPDATE_LS_TIMEOUT_MS = 15e3;
47759
47770
  var SUDO_PREFLIGHT_TIMEOUT_MS = 5e3;
47760
47771
  function currentCliVersion() {
47761
- return true ? "2.75.21" : null;
47772
+ return true ? "2.75.22" : null;
47762
47773
  }
47763
47774
  async function installedVersion(deps) {
47764
47775
  const ls = await deps.run(
@@ -48491,13 +48502,13 @@ var HostAgentSupervisor = class {
48491
48502
  const relay = this.relay;
48492
48503
  if (!relay) return;
48493
48504
  const raw = cmd.payload?.path;
48494
- const target = typeof raw === "string" && raw.trim() ? path90.resolve(raw.trim()) : os62.homedir();
48505
+ const target = typeof raw === "string" && raw.trim() ? path91.resolve(raw.trim()) : os62.homedir();
48495
48506
  try {
48496
48507
  const dirents = await fs77.promises.readdir(target, { withFileTypes: true });
48497
48508
  const entries = dirents.filter((d3) => !d3.name.startsWith(".")).map((d3) => ({ name: d3.name, isDir: d3.isDirectory() })).sort(
48498
48509
  (a, b) => a.isDir === b.isDir ? a.name.localeCompare(b.name) : a.isDir ? -1 : 1
48499
48510
  );
48500
- const parent = path90.dirname(target);
48511
+ const parent = path91.dirname(target);
48501
48512
  await relay.sendResult(cmd.id, "completed", {
48502
48513
  path: target,
48503
48514
  // null at the filesystem root so the UI can hide the ".." affordance.
@@ -48844,7 +48855,7 @@ var HostAgentSupervisor = class {
48844
48855
  ...buildHouseProxyChildEnv({ baseUrl, token, openRouter: openRouter === true }),
48845
48856
  CODEAM_AUTO_TOKEN: payload.autoPairToken
48846
48857
  };
48847
- const houseConfigDir = path90.join(
48858
+ const houseConfigDir = path91.join(
48848
48859
  os62.homedir(),
48849
48860
  ".codeam",
48850
48861
  "house-claude",
@@ -48885,13 +48896,13 @@ var HostAgentSupervisor = class {
48885
48896
  if ((payload.repoProvider ?? "github") === "gitlab") {
48886
48897
  const glabCmd = await ensureGlabCli(defaultGitToolingRunner);
48887
48898
  if (glabCmd) {
48888
- childEnv.PATH = `${codeamBinDir()}${path90.delimiter}${childEnv.PATH}`;
48899
+ childEnv.PATH = `${codeamBinDir()}${path91.delimiter}${childEnv.PATH}`;
48889
48900
  await ensureGlabAuth(defaultGitToolingRunner, glabCmd, payload.cloneToken);
48890
48901
  }
48891
48902
  } else {
48892
48903
  const ghCmd = await ensureGhCli(defaultGitToolingRunner, payload.cloneToken);
48893
48904
  if (ghCmd) {
48894
- childEnv.PATH = `${codeamBinDir()}${path90.delimiter}${childEnv.PATH}`;
48905
+ childEnv.PATH = `${codeamBinDir()}${path91.delimiter}${childEnv.PATH}`;
48895
48906
  await ensureGhAuth(defaultGitToolingRunner, ghCmd, payload.cloneToken);
48896
48907
  }
48897
48908
  }
@@ -48919,8 +48930,8 @@ var HostAgentSupervisor = class {
48919
48930
  );
48920
48931
  if (!payload.suppressOnboardingWelcome) {
48921
48932
  try {
48922
- const cfgDir = childEnv.CLAUDE_CONFIG_DIR || path90.join(os62.homedir(), ".claude");
48923
- const projectDir = path90.join(cfgDir, "projects", encodeCwd(cwd));
48933
+ const cfgDir = childEnv.CLAUDE_CONFIG_DIR || path91.join(os62.homedir(), ".claude");
48934
+ const projectDir = path91.join(cfgDir, "projects", encodeCwd(cwd));
48924
48935
  const hasPriorConversation = fs77.existsSync(projectDir) && fs77.readdirSync(projectDir).some((f) => f.endsWith(".jsonl"));
48925
48936
  if (hasPriorConversation) {
48926
48937
  childEnv.CODEAM_RESUME_LATEST = "1";
@@ -49310,8 +49321,8 @@ var HostAgentSupervisor = class {
49310
49321
  this.untrackChild(deployId);
49311
49322
  }
49312
49323
  const dirs = [
49313
- path90.join(selfHostedWorkspaceRoot(), deployId),
49314
- path90.join(os62.homedir(), ".codeam", "house-claude", deployId)
49324
+ path91.join(selfHostedWorkspaceRoot(), deployId),
49325
+ path91.join(os62.homedir(), ".codeam", "house-claude", deployId)
49315
49326
  ];
49316
49327
  for (const dir of dirs) {
49317
49328
  try {
@@ -49476,7 +49487,7 @@ var import_node_dns = require("dns");
49476
49487
  var import_node_util6 = require("util");
49477
49488
  var import_node_crypto12 = require("crypto");
49478
49489
  var fs78 = __toESM(require("fs"));
49479
- var path91 = __toESM(require("path"));
49490
+ var path92 = __toESM(require("path"));
49480
49491
  var import_picocolors14 = __toESM(require("picocolors"));
49481
49492
  var dnsResolveP = (0, import_node_util6.promisify)(import_node_dns.resolve);
49482
49493
  async function checkDns(apiBase2) {
@@ -49532,10 +49543,10 @@ async function checkHealth(apiBase2) {
49532
49543
  }
49533
49544
  }
49534
49545
  function checkConfigDir() {
49535
- const dir = path91.join(require("os").homedir(), ".codeam");
49546
+ const dir = path92.join(require("os").homedir(), ".codeam");
49536
49547
  try {
49537
49548
  fs78.mkdirSync(dir, { recursive: true, mode: 448 });
49538
- const probe = path91.join(dir, ".doctor-probe");
49549
+ const probe = path92.join(dir, ".doctor-probe");
49539
49550
  fs78.writeFileSync(probe, "ok", { mode: 384 });
49540
49551
  const read = fs78.readFileSync(probe, "utf8");
49541
49552
  fs78.unlinkSync(probe);
@@ -49602,7 +49613,7 @@ function checkNodePty() {
49602
49613
  detail: "not required on this platform"
49603
49614
  };
49604
49615
  }
49605
- const vendoredPath = path91.join(__dirname, "vendor", "node-pty");
49616
+ const vendoredPath = path92.join(__dirname, "vendor", "node-pty");
49606
49617
  for (const target of [vendoredPath, "node-pty"]) {
49607
49618
  try {
49608
49619
  require(target);
@@ -49644,7 +49655,7 @@ function checkChokidar() {
49644
49655
  }
49645
49656
  async function doctor(args2 = []) {
49646
49657
  const json = args2.includes("--json");
49647
- const cliVersion = true ? "2.75.21" : "0.0.0-dev";
49658
+ const cliVersion = true ? "2.75.22" : "0.0.0-dev";
49648
49659
  const apiBase2 = resolveApiBaseUrl();
49649
49660
  const diagnosticId = (0, import_node_crypto12.randomUUID)();
49650
49661
  log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
@@ -50168,7 +50179,7 @@ async function mcpWarm(argv = [], opts = {}) {
50168
50179
  // src/commands/version.ts
50169
50180
  var import_picocolors15 = __toESM(require("picocolors"));
50170
50181
  function version2() {
50171
- const v = true ? "2.75.21" : "unknown";
50182
+ const v = true ? "2.75.22" : "unknown";
50172
50183
  console.log(`${import_picocolors15.default.bold("codeam-cli")} ${import_picocolors15.default.cyan(v)}`);
50173
50184
  }
50174
50185
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeam-cli",
3
- "version": "2.75.21",
3
+ "version": "2.75.22",
4
4
  "description": "Workflow-continuity bridge for AI coding agents. Wrap Claude Code or Codex in a PTY and supervise, approve, and redirect the session from any device — async. The terminal companion for CodeAgent Mobile.",
5
5
  "type": "commonjs",
6
6
  "main": "dist/index.js",