codeam-cli 2.60.26 → 2.60.27

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 +16 -0
  2. package/dist/index.js +187 -178
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -4,6 +4,22 @@ 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.60.26] — 2026-07-09
8
+
9
+ ### Added
10
+
11
+ - **shared:** CodeRabbit links via oauth_token (loopback) — vault gate
12
+
13
+ ### Fixed
14
+
15
+ - **cli:** Kimi — provision config.toml on self-hosted (Windows-safe), fixing "Model: not set"
16
+
17
+ ## [2.60.25] — 2026-07-09
18
+
19
+ ### Fixed
20
+
21
+ - **cli:** Kimi — provision config.toml on self-hosted (Windows-safe), fixing "Model: not set"
22
+
7
23
  ## [2.60.24] — 2026-07-09
8
24
 
9
25
  ### Added
package/dist/index.js CHANGED
@@ -782,11 +782,11 @@ function quiet(fn) {
782
782
  log.debug(TAG, "ignored sync error", err);
783
783
  }
784
784
  }
785
- function rmIfExistsQuiet(path71) {
785
+ function rmIfExistsQuiet(path72) {
786
786
  try {
787
- fs2.rmSync(path71, { force: true });
787
+ fs2.rmSync(path72, { force: true });
788
788
  } catch (err) {
789
- log.debug(TAG, `rmIfExists failed for ${path71}`, err);
789
+ log.debug(TAG, `rmIfExists failed for ${path72}`, err);
790
790
  }
791
791
  }
792
792
  function killQuiet(target, signal = "SIGTERM") {
@@ -934,7 +934,7 @@ var { getConfig, ensurePluginId, addSession, removeSession, setActiveSession, ge
934
934
  // src/commands/pair-auto.ts
935
935
  var fs54 = __toESM(require("fs"));
936
936
  var os43 = __toESM(require("os"));
937
- var path57 = __toESM(require("path"));
937
+ var path58 = __toESM(require("path"));
938
938
  var import_crypto4 = require("crypto");
939
939
 
940
940
  // src/services/telemetry.service.ts
@@ -970,8 +970,8 @@ function createGetModuleFromFilename(basePath = process.argv[1] ? (0, import_pat
970
970
  return decodedFile;
971
971
  };
972
972
  }
973
- function normalizeWindowsPath(path71) {
974
- return path71.replace(/^[A-Z]:/, "").replace(/\\/g, "/");
973
+ function normalizeWindowsPath(path72) {
974
+ return path72.replace(/^[A-Z]:/, "").replace(/\\/g, "/");
975
975
  }
976
976
 
977
977
  // ../../node_modules/@posthog/core/dist/featureFlagUtils.mjs
@@ -3451,9 +3451,9 @@ async function addSourceContext(frames) {
3451
3451
  LRU_FILE_CONTENTS_CACHE.reduce();
3452
3452
  return frames;
3453
3453
  }
3454
- function getContextLinesFromFile(path71, ranges, output) {
3454
+ function getContextLinesFromFile(path72, ranges, output) {
3455
3455
  return new Promise((resolve7) => {
3456
- const stream = (0, import_node_fs.createReadStream)(path71);
3456
+ const stream = (0, import_node_fs.createReadStream)(path72);
3457
3457
  const lineReaded = (0, import_node_readline.createInterface)({
3458
3458
  input: stream
3459
3459
  });
@@ -3468,7 +3468,7 @@ function getContextLinesFromFile(path71, ranges, output) {
3468
3468
  let rangeStart = range[0];
3469
3469
  let rangeEnd = range[1];
3470
3470
  function onStreamError() {
3471
- LRU_FILE_CONTENTS_FS_READ_FAILED.set(path71, 1);
3471
+ LRU_FILE_CONTENTS_FS_READ_FAILED.set(path72, 1);
3472
3472
  lineReaded.close();
3473
3473
  lineReaded.removeAllListeners();
3474
3474
  destroyStreamAndResolve();
@@ -3529,8 +3529,8 @@ function clearLineContext(frame) {
3529
3529
  delete frame.context_line;
3530
3530
  delete frame.post_context;
3531
3531
  }
3532
- function shouldSkipContextLinesForFile(path71) {
3533
- return path71.startsWith("node:") || path71.endsWith(".min.js") || path71.endsWith(".min.cjs") || path71.endsWith(".min.mjs") || path71.startsWith("data:");
3532
+ function shouldSkipContextLinesForFile(path72) {
3533
+ return path72.startsWith("node:") || path72.endsWith(".min.js") || path72.endsWith(".min.cjs") || path72.endsWith(".min.mjs") || path72.startsWith("data:");
3534
3534
  }
3535
3535
  function shouldSkipContextLinesForFrame(frame) {
3536
3536
  if (void 0 !== frame.lineno && frame.lineno > MAX_CONTEXTLINES_LINENO) return true;
@@ -5684,7 +5684,7 @@ function readAnonId() {
5684
5684
  }
5685
5685
  function superProperties() {
5686
5686
  return {
5687
- cliVersion: true ? "2.60.26" : "0.0.0-dev",
5687
+ cliVersion: true ? "2.60.27" : "0.0.0-dev",
5688
5688
  nodeVersion: process.version,
5689
5689
  platform: process.platform,
5690
5690
  arch: process.arch,
@@ -5865,7 +5865,7 @@ var os4 = __toESM(require("os"));
5865
5865
  // package.json
5866
5866
  var package_default = {
5867
5867
  name: "codeam-cli",
5868
- version: "2.60.26",
5868
+ version: "2.60.27",
5869
5869
  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.",
5870
5870
  type: "commonjs",
5871
5871
  main: "dist/index.js",
@@ -6958,7 +6958,7 @@ var CommandRelayService = class {
6958
6958
  // fresh + clear the "CLI update available" banner after a self-update
6959
6959
  // (a codespace that reinstalls @latest reconnects via heartbeat, not
6960
6960
  // pair/reconnect). Older backends ignore the extra field.
6961
- ..."2.60.26" ? { ideVersion: "2.60.26" } : {}
6961
+ ..."2.60.27" ? { ideVersion: "2.60.27" } : {}
6962
6962
  }).then(() => log.trace("relay", `heartbeat ok online=${online}`)).catch((err) => log.trace("relay", `heartbeat failed online=${online}`, err));
6963
6963
  }
6964
6964
  /**
@@ -8334,7 +8334,7 @@ function closeAllTerminals() {
8334
8334
  // src/commands/start/handlers.ts
8335
8335
  var fs53 = __toESM(require("fs"));
8336
8336
  var os42 = __toESM(require("os"));
8337
- var path56 = __toESM(require("path"));
8337
+ var path57 = __toESM(require("path"));
8338
8338
  var import_crypto3 = require("crypto");
8339
8339
  var import_child_process23 = require("child_process");
8340
8340
 
@@ -13516,14 +13516,14 @@ function pickLine(obj) {
13516
13516
  function toHunk(raw, groupSeverity) {
13517
13517
  if (!raw || typeof raw !== "object") return null;
13518
13518
  const o = raw;
13519
- const path71 = asString(pick(o, ["file_path", "filePath", "file", "path", "filename"])) ?? asString(pick(o, ["location"])?.path);
13520
- if (!path71) return null;
13519
+ const path72 = asString(pick(o, ["file_path", "filePath", "file", "path", "filename"])) ?? asString(pick(o, ["location"])?.path);
13520
+ if (!path72) return null;
13521
13521
  const message = asString(pick(o, ["comment", "message", "body", "description", "summary", "markdown", "text"])) ?? "";
13522
13522
  const title = asString(pick(o, ["title", "rule", "category", "check"]));
13523
13523
  const severity = normSeverity(pick(o, ["severity", "level", "priority", "impact"])) ?? normSeverity(groupSeverity);
13524
13524
  const locObj = pick(o, ["location"]) ?? o;
13525
13525
  return {
13526
- path: path71.trim(),
13526
+ path: path72.trim(),
13527
13527
  line: pickLine(o) ?? pickLine(locObj),
13528
13528
  severity,
13529
13529
  message: (title && message ? `${title}: ${message}` : title || message).trim() || "(no message)"
@@ -13601,10 +13601,10 @@ function parsePlain(stdout) {
13601
13601
  for (const line of stdout.split(/\r?\n/)) {
13602
13602
  const m = line.match(HUNK_LINE_RE);
13603
13603
  if (!m) continue;
13604
- const [, path71, lineNo, sevToken, message] = m;
13605
- if (!path71 || !lineNo || !message) continue;
13604
+ const [, path72, lineNo, sevToken, message] = m;
13605
+ if (!path72 || !lineNo || !message) continue;
13606
13606
  hunks.push({
13607
- path: path71.trim(),
13607
+ path: path72.trim(),
13608
13608
  line: Number(lineNo),
13609
13609
  severity: sevToken ? SEVERITY_MAP[sevToken.toLowerCase()] : void 0,
13610
13610
  message: message.trim().replace(/^[*-]\s+/, "")
@@ -15402,6 +15402,7 @@ async function linkDryRunPreflight(ctx) {
15402
15402
 
15403
15403
  // src/agents/coderabbit/configure.ts
15404
15404
  var import_node_child_process14 = require("child_process");
15405
+ var path36 = __toESM(require("path"));
15405
15406
 
15406
15407
  // src/agents/coderabbit/oauth.ts
15407
15408
  var fs31 = __toESM(require("fs"));
@@ -15563,6 +15564,14 @@ async function configureCoderabbit(input, deps = {}) {
15563
15564
  const runOAuth = deps.runOAuthLogin ?? runCoderabbitOAuthLogin;
15564
15565
  const snapshot = deps.snapshotDir ?? (() => snapshotCredentialDir());
15565
15566
  const capture2 = deps.captureCredential ?? ((b) => diffCapturedCredential(b));
15567
+ const home = os50.homeDir();
15568
+ os50.augmentPath(
15569
+ os50.id === "win32" ? [
15570
+ path36.join(home, ".local", "bin"),
15571
+ path36.join(process.env.APPDATA ?? path36.join(home, "AppData", "Roaming"), "npm"),
15572
+ path36.join(home, "scoop", "shims")
15573
+ ] : [path36.join(home, ".local", "bin"), "/opt/homebrew/bin", "/usr/local/bin"]
15574
+ );
15566
15575
  const installed = os50.findInPath("coderabbit") !== null;
15567
15576
  const base = () => ({
15568
15577
  action: input.action,
@@ -15644,12 +15653,12 @@ async function configureCoderabbit(input, deps = {}) {
15644
15653
  var import_node_child_process23 = require("child_process");
15645
15654
  var os35 = __toESM(require("os"));
15646
15655
  var fs41 = __toESM(require("fs"));
15647
- var path43 = __toESM(require("path"));
15656
+ var path44 = __toESM(require("path"));
15648
15657
 
15649
15658
  // src/commands/host/host-client.ts
15650
15659
  var fs33 = __toESM(require("fs"));
15651
15660
  var os29 = __toESM(require("os"));
15652
- var path36 = __toESM(require("path"));
15661
+ var path37 = __toESM(require("path"));
15653
15662
 
15654
15663
  // src/lib/restrict-to-owner.ts
15655
15664
  var import_node_fs5 = __toESM(require("fs"));
@@ -15731,7 +15740,7 @@ function apiBase() {
15731
15740
  return process.env.CODEAM_API_URL ?? resolveApiBaseUrl();
15732
15741
  }
15733
15742
  function hostIdentityPath() {
15734
- return path36.join(os29.homedir(), ".codeam", "host-agent.json");
15743
+ return path37.join(os29.homedir(), ".codeam", "host-agent.json");
15735
15744
  }
15736
15745
  function collectOsInfo() {
15737
15746
  return {
@@ -15756,7 +15765,7 @@ function loadHostIdentity() {
15756
15765
  }
15757
15766
  function saveHostIdentity(identity) {
15758
15767
  const file = hostIdentityPath();
15759
- fs33.mkdirSync(path36.dirname(file), { recursive: true, mode: 448 });
15768
+ fs33.mkdirSync(path37.dirname(file), { recursive: true, mode: 448 });
15760
15769
  fs33.writeFileSync(file, JSON.stringify(identity, null, 2), {
15761
15770
  encoding: "utf8",
15762
15771
  mode: 384
@@ -15927,15 +15936,15 @@ async function reportDeployProgress(auth, deployId, step, message, sessionId) {
15927
15936
  // src/commands/host/workspace.ts
15928
15937
  var fs34 = __toESM(require("fs"));
15929
15938
  var os30 = __toESM(require("os"));
15930
- var path37 = __toESM(require("path"));
15939
+ var path38 = __toESM(require("path"));
15931
15940
  var import_node_child_process16 = require("child_process");
15932
15941
  var import_node_util4 = require("util");
15933
15942
  var execFileP4 = (0, import_node_util4.promisify)(import_node_child_process16.execFile);
15934
15943
  function isAbsolutePathTarget(target) {
15935
- return path37.isAbsolute(target);
15944
+ return path38.isAbsolute(target);
15936
15945
  }
15937
15946
  function selfHostedWorkspaceRoot() {
15938
- return path37.join(os30.homedir(), ".codeam", "self-hosted");
15947
+ return path38.join(os30.homedir(), ".codeam", "self-hosted");
15939
15948
  }
15940
15949
  function nonInteractiveGitEnv() {
15941
15950
  return {
@@ -15988,13 +15997,13 @@ async function fetchGithubIdentity(token) {
15988
15997
  async function configureGitCredentials(dest, repoRef, cloneToken) {
15989
15998
  const gh = githubOwnerRepo(repoRef.trim());
15990
15999
  if (!gh || !cloneToken) return;
15991
- const credFile = path37.join(dest, ".git", "codeam-credentials");
16000
+ const credFile = path38.join(dest, ".git", "codeam-credentials");
15992
16001
  fs34.writeFileSync(credFile, `https://x-access-token:${cloneToken}@github.com
15993
16002
  `, { mode: 384 });
15994
16003
  restrictToOwner(credFile);
15995
16004
  const env = nonInteractiveGitEnv();
15996
16005
  const git2 = (args2) => execFileP4("git", ["-C", dest, ...args2], { timeout: 3e4, env });
15997
- const credFilePosix = credFile.split(path37.sep).join("/");
16006
+ const credFilePosix = credFile.split(path38.sep).join("/");
15998
16007
  await git2(["config", "--local", "--replace-all", "credential.helper", ""]).catch(() => {
15999
16008
  });
16000
16009
  await git2([
@@ -16035,8 +16044,8 @@ async function prepareWorkspace(repoOrPath, deployId, cloneToken) {
16035
16044
  }
16036
16045
  return repoOrPath;
16037
16046
  }
16038
- const dest = path37.join(selfHostedWorkspaceRoot(), deployId);
16039
- if (fs34.existsSync(path37.join(dest, ".git"))) {
16047
+ const dest = path38.join(selfHostedWorkspaceRoot(), deployId);
16048
+ if (fs34.existsSync(path38.join(dest, ".git"))) {
16040
16049
  if (cloneToken) await configureGitCredentials(dest, repoOrPath, cloneToken);
16041
16050
  return dest;
16042
16051
  }
@@ -16059,7 +16068,7 @@ async function prepareWorkspace(repoOrPath, deployId, cloneToken) {
16059
16068
  // src/commands/host/agent-provisioning.ts
16060
16069
  var fs35 = __toESM(require("fs"));
16061
16070
  var os31 = __toESM(require("os"));
16062
- var path38 = __toESM(require("path"));
16071
+ var path39 = __toESM(require("path"));
16063
16072
  var import_node_child_process17 = require("child_process");
16064
16073
  var PUBLIC_TO_INTERNAL_AGENT = {
16065
16074
  claude_code: "claude",
@@ -16079,7 +16088,7 @@ function ensureDir(dir) {
16079
16088
  fs35.mkdirSync(dir, { recursive: true, mode: 448 });
16080
16089
  }
16081
16090
  function writeFile0600(filePath, contents) {
16082
- ensureDir(path38.dirname(filePath));
16091
+ ensureDir(path39.dirname(filePath));
16083
16092
  fs35.writeFileSync(filePath, contents, { encoding: "utf8", mode: 384 });
16084
16093
  restrictToOwner(filePath);
16085
16094
  }
@@ -16091,7 +16100,7 @@ function rmIfExists(filePath) {
16091
16100
  }
16092
16101
  var claudeProvisioner = {
16093
16102
  write(auth, home) {
16094
- const credentialsJson = path38.join(home, ".claude", ".credentials.json");
16103
+ const credentialsJson = path39.join(home, ".claude", ".credentials.json");
16095
16104
  if (auth.kind === "api_key") {
16096
16105
  rmIfExists(credentialsJson);
16097
16106
  return { ANTHROPIC_API_KEY: auth.value };
@@ -16103,7 +16112,7 @@ var claudeProvisioner = {
16103
16112
  } else {
16104
16113
  rmIfExists(credentialsJson);
16105
16114
  }
16106
- const claudeJson = path38.join(home, ".claude.json");
16115
+ const claudeJson = path39.join(home, ".claude.json");
16107
16116
  if (!fs35.existsSync(claudeJson)) {
16108
16117
  writeFile0600(
16109
16118
  claudeJson,
@@ -16115,7 +16124,7 @@ var claudeProvisioner = {
16115
16124
  };
16116
16125
  var codexProvisioner = {
16117
16126
  write(auth, home) {
16118
- const authJson = path38.join(home, ".codex", "auth.json");
16127
+ const authJson = path39.join(home, ".codex", "auth.json");
16119
16128
  if (auth.kind === "api_key") {
16120
16129
  rmIfExists(authJson);
16121
16130
  return { OPENAI_API_KEY: auth.value };
@@ -16126,8 +16135,8 @@ var codexProvisioner = {
16126
16135
  };
16127
16136
  var geminiProvisioner = {
16128
16137
  write(auth, home) {
16129
- const settingsJson = path38.join(home, ".gemini", "settings.json");
16130
- const oauthCreds = path38.join(home, ".gemini", "oauth_creds.json");
16138
+ const settingsJson = path39.join(home, ".gemini", "settings.json");
16139
+ const oauthCreds = path39.join(home, ".gemini", "oauth_creds.json");
16131
16140
  if (auth.kind === "api_key") {
16132
16141
  rmIfExists(oauthCreds);
16133
16142
  writeFile0600(settingsJson, '{"security":{"auth":{"selectedType":"gemini-api-key"}}}');
@@ -16140,7 +16149,7 @@ var geminiProvisioner = {
16140
16149
  };
16141
16150
  var cursorProvisioner = {
16142
16151
  write(auth, home) {
16143
- const authJson = path38.join(home, ".config", "cursor", "auth.json");
16152
+ const authJson = path39.join(home, ".config", "cursor", "auth.json");
16144
16153
  if (auth.kind === "api_key") {
16145
16154
  rmIfExists(authJson);
16146
16155
  return { CURSOR_API_KEY: auth.value };
@@ -16166,8 +16175,8 @@ var cursorProvisioner = {
16166
16175
  var kimiProvisioner = {
16167
16176
  write(auth, home) {
16168
16177
  const credentialsFiles = [
16169
- path38.join(home, ".kimi", "credentials", "kimi-code.json"),
16170
- path38.join(home, ".kimi-code", "credentials", "kimi-code.json")
16178
+ path39.join(home, ".kimi", "credentials", "kimi-code.json"),
16179
+ path39.join(home, ".kimi-code", "credentials", "kimi-code.json")
16171
16180
  ];
16172
16181
  if (auth.kind === "api_key") {
16173
16182
  credentialsFiles.forEach(rmIfExists);
@@ -16194,8 +16203,8 @@ function provisionKimiConfig(home) {
16194
16203
  }
16195
16204
  var coderabbitProvisioner = {
16196
16205
  write(auth, home) {
16197
- const dir = path38.join(home, ".coderabbit");
16198
- const authJson = path38.join(dir, "auth.json");
16206
+ const dir = path39.join(home, ".coderabbit");
16207
+ const authJson = path39.join(dir, "auth.json");
16199
16208
  if (auth.kind === "api_key") {
16200
16209
  rmIfExists(authJson);
16201
16210
  return { CODERABBIT_API_KEY: auth.value };
@@ -16207,13 +16216,13 @@ var coderabbitProvisioner = {
16207
16216
  try {
16208
16217
  const parsed = JSON.parse(value);
16209
16218
  if (typeof parsed.file === "string" && typeof parsed.contents === "string") {
16210
- file = path38.basename(parsed.file);
16219
+ file = path39.basename(parsed.file);
16211
16220
  contents = parsed.contents;
16212
16221
  }
16213
16222
  } catch {
16214
16223
  }
16215
16224
  }
16216
- writeFile0600(path38.join(dir, file), contents);
16225
+ writeFile0600(path39.join(dir, file), contents);
16217
16226
  return {};
16218
16227
  }
16219
16228
  };
@@ -16245,9 +16254,9 @@ function provisionAgentCredentials(publicAgentId, auth, homeDir2 = os31.homedir(
16245
16254
  var import_node_child_process18 = require("child_process");
16246
16255
  var fs36 = __toESM(require("fs"));
16247
16256
  var os32 = __toESM(require("os"));
16248
- var path39 = __toESM(require("path"));
16257
+ var path40 = __toESM(require("path"));
16249
16258
  function codeamBinDir() {
16250
- return process.env.CODEAM_BIN_DIR ?? path39.join(os32.homedir(), ".codeam", "bin");
16259
+ return process.env.CODEAM_BIN_DIR ?? path40.join(os32.homedir(), ".codeam", "bin");
16251
16260
  }
16252
16261
  var FALLBACK_GH_VERSION = "2.62.0";
16253
16262
  var RELEASE_API = "https://api.github.com/repos/cli/cli/releases/latest";
@@ -16302,8 +16311,8 @@ async function ensureGhCli(runner, token, deps = {}) {
16302
16311
  const version3 = await resolveVersionFn(token);
16303
16312
  const asset = `gh_${version3}_${osToken}_${arch2}`;
16304
16313
  const url = `https://github.com/cli/cli/releases/download/v${version3}/${asset}.${ext}`;
16305
- const tmpRoot = fs36.mkdtempSync(path39.join(os32.tmpdir(), "codeam-gh-"));
16306
- const archive = path39.join(tmpRoot, `${asset}.${ext}`);
16314
+ const tmpRoot = fs36.mkdtempSync(path40.join(os32.tmpdir(), "codeam-gh-"));
16315
+ const archive = path40.join(tmpRoot, `${asset}.${ext}`);
16307
16316
  if (!await downloadFn(url, archive)) {
16308
16317
  log.warn("host-agent", "gh download failed \u2014 skipping (git pull/push still work via the credential helper)");
16309
16318
  return null;
@@ -16313,14 +16322,14 @@ async function ensureGhCli(runner, token, deps = {}) {
16313
16322
  log.warn("host-agent", `gh archive extraction failed (code=${String(extract.code)}) \u2014 skipping`);
16314
16323
  return null;
16315
16324
  }
16316
- const extractedBin = path39.join(tmpRoot, asset, "bin", binaryName);
16325
+ const extractedBin = path40.join(tmpRoot, asset, "bin", binaryName);
16317
16326
  if (!fs36.existsSync(extractedBin)) {
16318
16327
  log.warn("host-agent", "gh binary not found in the extracted archive \u2014 skipping");
16319
16328
  return null;
16320
16329
  }
16321
16330
  const binDir = codeamBinDir();
16322
16331
  fs36.mkdirSync(binDir, { recursive: true });
16323
- const target = path39.join(binDir, binaryName);
16332
+ const target = path40.join(binDir, binaryName);
16324
16333
  fs36.copyFileSync(extractedBin, target);
16325
16334
  fs36.chmodSync(target, 493);
16326
16335
  log.info("host-agent", `gh installed to ${target} (v${version3})`);
@@ -16810,19 +16819,19 @@ async function ensureModernPython(runner) {
16810
16819
 
16811
16820
  // src/commands/host/headroom-bootstrap.ts
16812
16821
  var fs38 = __toESM(require("fs"));
16813
- var path41 = __toESM(require("path"));
16822
+ var path42 = __toESM(require("path"));
16814
16823
 
16815
16824
  // src/commands/host/headroom-config.ts
16816
16825
  var fs37 = __toESM(require("fs"));
16817
16826
  var os33 = __toESM(require("os"));
16818
- var path40 = __toESM(require("path"));
16827
+ var path41 = __toESM(require("path"));
16819
16828
  function headroomConfigPath() {
16820
- return path40.join(os33.homedir(), ".codeam", "headroom-config.json");
16829
+ return path41.join(os33.homedir(), ".codeam", "headroom-config.json");
16821
16830
  }
16822
16831
  function persistHeadroomConfig(config) {
16823
16832
  try {
16824
16833
  const file = headroomConfigPath();
16825
- fs37.mkdirSync(path40.dirname(file), { recursive: true, mode: 448 });
16834
+ fs37.mkdirSync(path41.dirname(file), { recursive: true, mode: 448 });
16826
16835
  const tmp = `${file}.tmp-${process.pid}`;
16827
16836
  fs37.writeFileSync(tmp, JSON.stringify(config, null, 2), { encoding: "utf8", mode: 384 });
16828
16837
  fs37.renameSync(tmp, file);
@@ -16836,9 +16845,9 @@ function persistHeadroomConfig(config) {
16836
16845
  }
16837
16846
  function agentSettingsPath(kind) {
16838
16847
  const home = os33.homedir();
16839
- if (kind === "claude") return path40.join(home, ".claude", "settings.json");
16840
- if (kind === "codex") return path40.join(home, ".codex", "auth.json");
16841
- if (kind === "copilot") return path40.join(home, ".config", "github-copilot", "hosts.json");
16848
+ if (kind === "claude") return path41.join(home, ".claude", "settings.json");
16849
+ if (kind === "codex") return path41.join(home, ".codex", "auth.json");
16850
+ if (kind === "copilot") return path41.join(home, ".config", "github-copilot", "hosts.json");
16842
16851
  return null;
16843
16852
  }
16844
16853
  function backupAgentHeadroomConfig(kind) {
@@ -16846,8 +16855,8 @@ function backupAgentHeadroomConfig(kind) {
16846
16855
  if (!src) return;
16847
16856
  try {
16848
16857
  if (!fs37.existsSync(src)) return;
16849
- const dest = path40.join(os33.homedir(), ".codeam", `headroom-backup-${kind}.json`);
16850
- fs37.mkdirSync(path40.dirname(dest), { recursive: true, mode: 448 });
16858
+ const dest = path41.join(os33.homedir(), ".codeam", `headroom-backup-${kind}.json`);
16859
+ fs37.mkdirSync(path41.dirname(dest), { recursive: true, mode: 448 });
16851
16860
  fs37.copyFileSync(src, dest);
16852
16861
  fs37.chmodSync(dest, 384);
16853
16862
  log.info("host-agent", `headroom config backup: ${src} \u2192 ${dest}`);
@@ -16861,10 +16870,10 @@ function backupAgentHeadroomConfig(kind) {
16861
16870
  function restoreAgentHeadroomConfig(kind) {
16862
16871
  const dest = agentSettingsPath(kind);
16863
16872
  if (!dest) return false;
16864
- const src = path40.join(os33.homedir(), ".codeam", `headroom-backup-${kind}.json`);
16873
+ const src = path41.join(os33.homedir(), ".codeam", `headroom-backup-${kind}.json`);
16865
16874
  if (!fs37.existsSync(src)) return false;
16866
16875
  try {
16867
- fs37.mkdirSync(path40.dirname(dest), { recursive: true, mode: 448 });
16876
+ fs37.mkdirSync(path41.dirname(dest), { recursive: true, mode: 448 });
16868
16877
  fs37.copyFileSync(src, dest);
16869
16878
  fs37.chmodSync(dest, 384);
16870
16879
  log.info("host-agent", `headroom config restored: ${src} \u2192 ${dest}`);
@@ -16915,20 +16924,20 @@ function bundledClaudeBinDir() {
16915
16924
  const roots = /* @__PURE__ */ new Set();
16916
16925
  let dir = __dirname;
16917
16926
  for (let i = 0; i < 6; i++) {
16918
- roots.add(path41.join(dir, "node_modules"));
16919
- const parent = path41.dirname(dir);
16927
+ roots.add(path42.join(dir, "node_modules"));
16928
+ const parent = path42.dirname(dir);
16920
16929
  if (parent === dir) break;
16921
16930
  dir = parent;
16922
16931
  }
16923
16932
  try {
16924
16933
  const main2 = require.resolve("@anthropic-ai/claude-agent-sdk");
16925
- const marker = `${path41.sep}@anthropic-ai${path41.sep}`;
16934
+ const marker = `${path42.sep}@anthropic-ai${path42.sep}`;
16926
16935
  const idx = main2.lastIndexOf(marker);
16927
16936
  if (idx !== -1) roots.add(main2.slice(0, idx));
16928
16937
  } catch {
16929
16938
  }
16930
16939
  for (const nm of roots) {
16931
- const atAnthropic = path41.join(nm, "@anthropic-ai");
16940
+ const atAnthropic = path42.join(nm, "@anthropic-ai");
16932
16941
  let entries;
16933
16942
  try {
16934
16943
  entries = fs38.readdirSync(atAnthropic);
@@ -16937,8 +16946,8 @@ function bundledClaudeBinDir() {
16937
16946
  }
16938
16947
  for (const entry of entries) {
16939
16948
  if (!entry.startsWith("claude-agent-sdk-")) continue;
16940
- const bin = path41.join(atAnthropic, entry, "claude");
16941
- if (fs38.existsSync(bin)) return path41.dirname(bin);
16949
+ const bin = path42.join(atAnthropic, entry, "claude");
16950
+ if (fs38.existsSync(bin)) return path42.dirname(bin);
16942
16951
  }
16943
16952
  }
16944
16953
  return null;
@@ -17007,7 +17016,7 @@ async function setupHeadroomForSelfHosted(agent, runner = defaultHeadroomRunner,
17007
17016
  if (initKind === "claude") {
17008
17017
  const claudeDir = bundledClaudeBinDir();
17009
17018
  if (claudeDir) {
17010
- initEnv.PATH = `${claudeDir}${path41.delimiter}${process.env["PATH"] ?? ""}`;
17019
+ initEnv.PATH = `${claudeDir}${path42.delimiter}${process.env["PATH"] ?? ""}`;
17011
17020
  log.info("host-agent", `headroom init: bundled claude on PATH (${claudeDir})`);
17012
17021
  } else {
17013
17022
  log.warn("host-agent", "headroom init: bundled claude binary not found \u2014 init may fail");
@@ -17044,7 +17053,7 @@ var import_node_child_process21 = require("child_process");
17044
17053
  // src/lib/updateNotifier.ts
17045
17054
  var fs39 = __toESM(require("fs"));
17046
17055
  var os34 = __toESM(require("os"));
17047
- var path42 = __toESM(require("path"));
17056
+ var path43 = __toESM(require("path"));
17048
17057
  var https6 = __toESM(require("https"));
17049
17058
  var import_node_child_process20 = require("child_process");
17050
17059
  var import_picocolors3 = __toESM(require("picocolors"));
@@ -17053,8 +17062,8 @@ var REGISTRY_URL = `https://registry.npmjs.org/${PKG_NAME}/latest`;
17053
17062
  var TTL_MS = 24 * 60 * 60 * 1e3;
17054
17063
  var REQUEST_TIMEOUT_MS = 1500;
17055
17064
  function cachePath() {
17056
- const dir = path42.join(os34.homedir(), ".codeam");
17057
- return path42.join(dir, "update-check.json");
17065
+ const dir = path43.join(os34.homedir(), ".codeam");
17066
+ return path43.join(dir, "update-check.json");
17058
17067
  }
17059
17068
  function readCache() {
17060
17069
  try {
@@ -17069,7 +17078,7 @@ function readCache() {
17069
17078
  function writeCache(cache) {
17070
17079
  try {
17071
17080
  const file = cachePath();
17072
- fs39.mkdirSync(path42.dirname(file), { recursive: true });
17081
+ fs39.mkdirSync(path43.dirname(file), { recursive: true });
17073
17082
  const tmp = `${file}.${process.pid}.tmp`;
17074
17083
  fs39.writeFileSync(tmp, JSON.stringify(cache));
17075
17084
  fs39.renameSync(tmp, file);
@@ -17146,7 +17155,7 @@ function isLinkedInstall() {
17146
17155
  timeout: 2e3
17147
17156
  }).trim();
17148
17157
  if (!root) return false;
17149
- const pkgPath = path42.join(root, PKG_NAME);
17158
+ const pkgPath = path43.join(root, PKG_NAME);
17150
17159
  return fs39.lstatSync(pkgPath).isSymbolicLink();
17151
17160
  } catch {
17152
17161
  return false;
@@ -17199,7 +17208,7 @@ async function autoUpgradeBeforeCriticalCommand() {
17199
17208
  if (process.env.NODE_ENV === "test") return;
17200
17209
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
17201
17210
  if (process.env.CI) return;
17202
- const current = true ? "2.60.26" : null;
17211
+ const current = true ? "2.60.27" : null;
17203
17212
  if (!current) return;
17204
17213
  const cache = readCache();
17205
17214
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
@@ -17216,7 +17225,7 @@ function checkForUpdates() {
17216
17225
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
17217
17226
  if (process.env.CI) return;
17218
17227
  if (!process.stdout.isTTY) return;
17219
- const current = true ? "2.60.26" : null;
17228
+ const current = true ? "2.60.27" : null;
17220
17229
  if (!current) return;
17221
17230
  const cache = readCache();
17222
17231
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
@@ -17236,7 +17245,7 @@ var SELF_UPDATE_INTERVAL_MS = 60 * 60 * 1e3;
17236
17245
  var SELF_UPDATE_VIEW_TIMEOUT_MS = 3e4;
17237
17246
  var SELF_UPDATE_INSTALL_TIMEOUT_MS = 18e4;
17238
17247
  function currentCliVersion() {
17239
- return true ? "2.60.26" : null;
17248
+ return true ? "2.60.27" : null;
17240
17249
  }
17241
17250
  function runCmd(cmd, args2, timeoutMs) {
17242
17251
  return new Promise((resolve7) => {
@@ -17786,7 +17795,7 @@ var HostAgentSupervisor = class {
17786
17795
  API_TIMEOUT_MS: "3000000",
17787
17796
  CODEAM_AUTO_TOKEN: payload.autoPairToken
17788
17797
  };
17789
- const houseConfigDir = path43.join(os35.homedir(), ".codeam", "house-claude");
17798
+ const houseConfigDir = path44.join(os35.homedir(), ".codeam", "house-claude");
17790
17799
  try {
17791
17800
  fs41.mkdirSync(houseConfigDir, { recursive: true, mode: 448 });
17792
17801
  } catch {
@@ -17813,7 +17822,7 @@ var HostAgentSupervisor = class {
17813
17822
  report("preparing", "configuring git tooling");
17814
17823
  const ghCmd = await ensureGhCli(defaultGitToolingRunner, payload.cloneToken);
17815
17824
  if (ghCmd) {
17816
- childEnv.PATH = `${codeamBinDir()}${path43.delimiter}${childEnv.PATH}`;
17825
+ childEnv.PATH = `${codeamBinDir()}${path44.delimiter}${childEnv.PATH}`;
17817
17826
  await ensureGhAuth(defaultGitToolingRunner, ghCmd, payload.cloneToken);
17818
17827
  }
17819
17828
  } catch (e) {
@@ -18137,7 +18146,7 @@ async function configureHeadroom(action, ctx, deps) {
18137
18146
  // src/services/headroom/budget-relaunch.ts
18138
18147
  var fs42 = __toESM(require("fs"));
18139
18148
  var os36 = __toESM(require("os"));
18140
- var path44 = __toESM(require("path"));
18149
+ var path45 = __toESM(require("path"));
18141
18150
  var import_child_process13 = require("child_process");
18142
18151
  function amendDeploymentManifestBudget(manifest, budget) {
18143
18152
  const rawArgs = manifest.proxy_args ?? [];
@@ -18171,7 +18180,7 @@ function amendDeploymentManifestBudget(manifest, budget) {
18171
18180
  return { ...manifest, proxy_args: newArgs, base_env: newEnv };
18172
18181
  }
18173
18182
  function findHeadroomDeployments(homeDir2, deps) {
18174
- const deployDir = path44.join(homeDir2, ".headroom", "deploy");
18183
+ const deployDir = path45.join(homeDir2, ".headroom", "deploy");
18175
18184
  let profiles;
18176
18185
  try {
18177
18186
  profiles = deps.readDir(deployDir);
@@ -18180,7 +18189,7 @@ function findHeadroomDeployments(homeDir2, deps) {
18180
18189
  }
18181
18190
  const results = [];
18182
18191
  for (const profile of profiles) {
18183
- const manifestPath = path44.join(deployDir, profile, "manifest.json");
18192
+ const manifestPath = path45.join(deployDir, profile, "manifest.json");
18184
18193
  let raw;
18185
18194
  try {
18186
18195
  raw = deps.readJson(manifestPath);
@@ -18928,7 +18937,7 @@ function activePreviewSessionIds() {
18928
18937
  // src/services/preview/start-orchestrator.ts
18929
18938
  var import_child_process17 = require("child_process");
18930
18939
  var fs47 = __toESM(require("fs"));
18931
- var path49 = __toESM(require("path"));
18940
+ var path50 = __toESM(require("path"));
18932
18941
  var import_which2 = __toESM(require("which"));
18933
18942
  var INSTALL_TIMEOUT_MS = 5 * 6e4;
18934
18943
  var SETUP_TIMEOUT_MS = 2 * 6e4;
@@ -18995,7 +19004,7 @@ function normalizeDetectionForSpawn(detection, cwd) {
18995
19004
  if (args2.length === 0) return detection;
18996
19005
  const binName = args2[0];
18997
19006
  if (binName.startsWith("-")) return detection;
18998
- const binPath = path49.join(cwd, "node_modules", ".bin", binName);
19007
+ const binPath = path50.join(cwd, "node_modules", ".bin", binName);
18999
19008
  if (!fs47.existsSync(binPath)) return detection;
19000
19009
  return {
19001
19010
  ...detection,
@@ -19348,7 +19357,7 @@ async function establishTunnel(ctx, dev) {
19348
19357
  var import_child_process18 = require("child_process");
19349
19358
  var fs48 = __toESM(require("fs"));
19350
19359
  var os38 = __toESM(require("os"));
19351
- var path50 = __toESM(require("path"));
19360
+ var path51 = __toESM(require("path"));
19352
19361
  var BD_PACKAGE = "@beads/bd";
19353
19362
  function resolveBundledBdBinary() {
19354
19363
  return _resolveSeam.resolveBundled();
@@ -19360,9 +19369,9 @@ function _defaultResolveBundled() {
19360
19369
  } catch {
19361
19370
  return null;
19362
19371
  }
19363
- const binDir = path50.join(path50.dirname(pkgJsonPath), "bin");
19372
+ const binDir = path51.join(path51.dirname(pkgJsonPath), "bin");
19364
19373
  const binaryName = process.platform === "win32" ? "bd.exe" : "bd";
19365
- const binaryPath = path50.join(binDir, binaryName);
19374
+ const binaryPath = path51.join(binDir, binaryName);
19366
19375
  try {
19367
19376
  fs48.accessSync(binaryPath, fs48.constants.F_OK);
19368
19377
  return binaryPath;
@@ -19374,11 +19383,11 @@ function resolveBdOnPath() {
19374
19383
  return _resolveSeam.resolveOnPath();
19375
19384
  }
19376
19385
  function _defaultResolveOnPath() {
19377
- const dirs = (process.env.PATH ?? "").split(path50.delimiter).filter(Boolean);
19386
+ const dirs = (process.env.PATH ?? "").split(path51.delimiter).filter(Boolean);
19378
19387
  const candidates = process.platform === "win32" ? ["bd.exe", "bd.cmd", "bd"] : ["bd"];
19379
19388
  for (const dir of dirs) {
19380
19389
  for (const candidate of candidates) {
19381
- const full = path50.join(dir, candidate);
19390
+ const full = path51.join(dir, candidate);
19382
19391
  try {
19383
19392
  fs48.accessSync(full, fs48.constants.F_OK);
19384
19393
  return full;
@@ -19559,7 +19568,7 @@ function coerceIssue(row, projectKey) {
19559
19568
  var import_child_process22 = require("child_process");
19560
19569
  var fs51 = __toESM(require("fs"));
19561
19570
  var os40 = __toESM(require("os"));
19562
- var path53 = __toESM(require("path"));
19571
+ var path54 = __toESM(require("path"));
19563
19572
 
19564
19573
  // src/beads/install-bd.ts
19565
19574
  var import_child_process19 = require("child_process");
@@ -19626,7 +19635,7 @@ async function installBd(platform3 = process.platform) {
19626
19635
  var import_child_process20 = require("child_process");
19627
19636
  var fs49 = __toESM(require("fs"));
19628
19637
  var os39 = __toESM(require("os"));
19629
- var path51 = __toESM(require("path"));
19638
+ var path52 = __toESM(require("path"));
19630
19639
  var DOLT_INSTALL_SH_URL = "https://github.com/dolthub/dolt/releases/latest/download/install.sh";
19631
19640
  var DOLT_MSI_URL = "https://github.com/dolthub/dolt/releases/latest/download/dolt-windows-amd64.msi";
19632
19641
  function resolveDoltInstallStrategy(platform3) {
@@ -19733,7 +19742,7 @@ function doltBinaryNames(platform3) {
19733
19742
  return platform3 === "win32" ? ["dolt.exe", "dolt.cmd", "dolt"] : ["dolt"];
19734
19743
  }
19735
19744
  function knownDoltDirs(platform3) {
19736
- const P3 = platform3 === "win32" ? path51.win32 : path51.posix;
19745
+ const P3 = platform3 === "win32" ? path52.win32 : path52.posix;
19737
19746
  const home = _doltPathSeam.homedir();
19738
19747
  if (platform3 === "win32") {
19739
19748
  return [
@@ -19749,7 +19758,7 @@ function knownDoltDirs(platform3) {
19749
19758
  ].filter(Boolean);
19750
19759
  }
19751
19760
  function ensureDoltResolvable(platform3 = process.platform) {
19752
- const P3 = platform3 === "win32" ? path51.win32 : path51.posix;
19761
+ const P3 = platform3 === "win32" ? path52.win32 : path52.posix;
19753
19762
  const delim = platform3 === "win32" ? ";" : ":";
19754
19763
  const names = doltBinaryNames(platform3);
19755
19764
  const pathDirs = _doltPathSeam.getPath().split(delim).filter(Boolean);
@@ -19886,7 +19895,7 @@ async function ensureSharedServer(adapter, options = {}) {
19886
19895
  var import_child_process21 = require("child_process");
19887
19896
  var crypto2 = __toESM(require("crypto"));
19888
19897
  var fs50 = __toESM(require("fs"));
19889
- var path52 = __toESM(require("path"));
19898
+ var path53 = __toESM(require("path"));
19890
19899
  function normalizeOrigin(raw) {
19891
19900
  const trimmed = raw.trim();
19892
19901
  if (!trimmed) return null;
@@ -19912,17 +19921,17 @@ function normalizeOrigin(raw) {
19912
19921
  return `${host2}/${pathPart}`;
19913
19922
  }
19914
19923
  function findRepoRoot(cwd) {
19915
- let dir = path52.resolve(cwd);
19924
+ let dir = path53.resolve(cwd);
19916
19925
  const seen = /* @__PURE__ */ new Set();
19917
19926
  for (let i = 0; i < 256; i++) {
19918
19927
  if (seen.has(dir)) return null;
19919
19928
  seen.add(dir);
19920
19929
  try {
19921
- const stat3 = fs50.statSync(path52.join(dir, ".git"), { throwIfNoEntry: false });
19930
+ const stat3 = fs50.statSync(path53.join(dir, ".git"), { throwIfNoEntry: false });
19922
19931
  if (stat3 && (stat3.isDirectory() || stat3.isFile())) return dir;
19923
19932
  } catch {
19924
19933
  }
19925
- const parent = path52.dirname(dir);
19934
+ const parent = path53.dirname(dir);
19926
19935
  if (parent === dir) return null;
19927
19936
  dir = parent;
19928
19937
  }
@@ -19962,7 +19971,7 @@ function deriveProjectIdentity(cwd = process.cwd()) {
19962
19971
  } catch {
19963
19972
  }
19964
19973
  const hash = crypto2.createHash("sha256").update(real).digest("hex");
19965
- return { projectKey: `path:${hash}`, projectLabel: path52.basename(real) || "project" };
19974
+ return { projectKey: `path:${hash}`, projectLabel: path53.basename(real) || "project" };
19966
19975
  }
19967
19976
 
19968
19977
  // src/beads/project-prefix.ts
@@ -20038,9 +20047,9 @@ var _linkSeam = {
20038
20047
  * which `linkBdOntoPath` creates if missing.
20039
20048
  */
20040
20049
  cliBinDir: () => {
20041
- const pathDirs = (process.env.PATH ?? "").split(path53.delimiter).filter(Boolean);
20050
+ const pathDirs = (process.env.PATH ?? "").split(path54.delimiter).filter(Boolean);
20042
20051
  const home = _linkSeam.homedir();
20043
- const localBin = home ? path53.join(home, ".local", "bin") : null;
20052
+ const localBin = home ? path54.join(home, ".local", "bin") : null;
20044
20053
  if (localBin) {
20045
20054
  try {
20046
20055
  _linkSeam.ensureDir(localBin);
@@ -20050,16 +20059,16 @@ var _linkSeam = {
20050
20059
  const candidates = [];
20051
20060
  if (localBin) candidates.push(localBin);
20052
20061
  try {
20053
- candidates.push(path53.dirname(process.execPath));
20062
+ candidates.push(path54.dirname(process.execPath));
20054
20063
  } catch {
20055
20064
  }
20056
20065
  candidates.push("/usr/local/bin");
20057
20066
  const entry = process.argv[1];
20058
20067
  if (entry) {
20059
20068
  try {
20060
- candidates.push(path53.dirname(fs51.realpathSync(entry)));
20069
+ candidates.push(path54.dirname(fs51.realpathSync(entry)));
20061
20070
  } catch {
20062
- candidates.push(path53.dirname(entry));
20071
+ candidates.push(path54.dirname(entry));
20063
20072
  }
20064
20073
  }
20065
20074
  const onPathWritable = candidates.find(
@@ -20084,7 +20093,7 @@ function linkBdOntoPath(binaryPath) {
20084
20093
  const binDir = _linkSeam.cliBinDir();
20085
20094
  if (!binDir) return;
20086
20095
  _linkSeam.ensureDir(binDir);
20087
- const linkPath = path53.join(binDir, "bd");
20096
+ const linkPath = path54.join(binDir, "bd");
20088
20097
  if (linkPath === binaryPath) return;
20089
20098
  const current = _linkSeam.readlink(linkPath);
20090
20099
  if (current === binaryPath) return;
@@ -20279,7 +20288,7 @@ function dedupeRecipes(agents) {
20279
20288
 
20280
20289
  // src/beads/watcher.ts
20281
20290
  var crypto4 = __toESM(require("crypto"));
20282
- var path54 = __toESM(require("path"));
20291
+ var path55 = __toESM(require("path"));
20283
20292
  var API_BASE6 = resolveApiBaseUrl();
20284
20293
  var DEBOUNCE_MS2 = 400;
20285
20294
  var ZERO_SUMMARY = {
@@ -20303,7 +20312,7 @@ var BeadsWatcher = class {
20303
20312
  constructor(opts) {
20304
20313
  this.opts = opts;
20305
20314
  this.bd = opts.adapter ?? new BdAdapter({ cwd: opts.cwd, beadsDir: opts.beadsDir });
20306
- this.feedPath = opts.feedPath ?? path54.join(opts.cwd ?? process.cwd(), ".beads", "last-touched");
20315
+ this.feedPath = opts.feedPath ?? path55.join(opts.cwd ?? process.cwd(), ".beads", "last-touched");
20307
20316
  this.apiBase = opts.apiBaseUrl ?? API_BASE6;
20308
20317
  }
20309
20318
  opts;
@@ -20720,7 +20729,7 @@ function cleanupAttachmentTempFiles() {
20720
20729
  function saveFilesTemp(files) {
20721
20730
  return files.filter(({ base64 }) => base64 && base64.length > 0).map(({ filename, base64 }) => {
20722
20731
  const safeName = filename.replace(/[^a-zA-Z0-9._-]/g, "_").slice(0, 80);
20723
- const tmpPath = path56.join(os42.tmpdir(), `codeam-${(0, import_crypto3.randomUUID)()}-${safeName}`);
20732
+ const tmpPath = path57.join(os42.tmpdir(), `codeam-${(0, import_crypto3.randomUUID)()}-${safeName}`);
20724
20733
  fs53.writeFileSync(tmpPath, Buffer.from(base64, "base64"));
20725
20734
  pendingAttachmentFiles.add(tmpPath);
20726
20735
  return tmpPath;
@@ -20933,7 +20942,7 @@ var listFiles = async (ctx, cmd, parsed) => {
20933
20942
  await ctx.relay.sendResult(cmd.id, "completed", result);
20934
20943
  };
20935
20944
  var envReadH = async (ctx, cmd) => {
20936
- const envPath = path56.join(process.cwd(), ".env");
20945
+ const envPath = path57.join(process.cwd(), ".env");
20937
20946
  try {
20938
20947
  const raw = await fs53.promises.readFile(envPath, "utf8");
20939
20948
  await ctx.relay.sendResult(cmd.id, "completed", {
@@ -20966,8 +20975,8 @@ var envWriteH = async (ctx, cmd, parsed) => {
20966
20975
  }
20967
20976
  seen.add(v.key);
20968
20977
  }
20969
- const envPath = path56.join(process.cwd(), ".env");
20970
- const tmpPath = path56.join(process.cwd(), ".env.codeam.tmp");
20978
+ const envPath = path57.join(process.cwd(), ".env");
20979
+ const tmpPath = path57.join(process.cwd(), ".env.codeam.tmp");
20971
20980
  try {
20972
20981
  await fs53.promises.writeFile(tmpPath, serializeDotenv(vars), "utf8");
20973
20982
  await fs53.promises.rename(tmpPath, envPath);
@@ -21321,12 +21330,12 @@ function buildNpmInstallInvocation(opts) {
21321
21330
  const entryScript = opts?.entryScript ?? process.argv[1] ?? "";
21322
21331
  const execPath = opts?.execPath ?? process.execPath;
21323
21332
  const exists2 = opts?.existsSync ?? fs53.existsSync;
21324
- const normalized = entryScript.split(path56.sep).join("/");
21333
+ const normalized = entryScript.split(path57.sep).join("/");
21325
21334
  const marker = "/lib/node_modules/codeam-cli/";
21326
21335
  const markerIdx = normalized.indexOf(marker);
21327
21336
  const prefix = markerIdx > 0 ? entryScript.slice(0, markerIdx) : null;
21328
- const siblingNpm = path56.join(
21329
- path56.dirname(execPath),
21337
+ const siblingNpm = path57.join(
21338
+ path57.dirname(execPath),
21330
21339
  process.platform === "win32" ? "npm.cmd" : "npm"
21331
21340
  );
21332
21341
  const command2 = exists2(siblingNpm) ? siblingNpm : "npm";
@@ -22169,11 +22178,11 @@ function resolveTokenValue(args2) {
22169
22178
  }
22170
22179
  const fileFlag = args2.find((a) => a.startsWith("--token-file="));
22171
22180
  if (fileFlag) {
22172
- const path71 = fileFlag.slice("--token-file=".length);
22181
+ const path72 = fileFlag.slice("--token-file=".length);
22173
22182
  try {
22174
- const content = fs54.readFileSync(path71, "utf8").trim();
22175
- if (content.length === 0) fail(`--token-file ${path71} is empty`);
22176
- rmIfExistsQuiet(path71);
22183
+ const content = fs54.readFileSync(path72, "utf8").trim();
22184
+ if (content.length === 0) fail(`--token-file ${path72} is empty`);
22185
+ rmIfExistsQuiet(path72);
22177
22186
  return content;
22178
22187
  } catch (err) {
22179
22188
  fail(`Could not read --token-file: ${err.message}`);
@@ -22263,7 +22272,7 @@ async function claim(token, pluginId, pluginSecretHash) {
22263
22272
  }
22264
22273
  }
22265
22274
  function pairAutoLockPath() {
22266
- return path57.join(os43.homedir(), ".codeam", "pair-auto.lock");
22275
+ return path58.join(os43.homedir(), ".codeam", "pair-auto.lock");
22267
22276
  }
22268
22277
  function isLivePairAuto(pid) {
22269
22278
  if (!Number.isInteger(pid) || pid <= 0 || pid === process.pid) return false;
@@ -22283,12 +22292,12 @@ function isLiveCodeam(pid) {
22283
22292
  }
22284
22293
  function daemonLockPath(sessionId) {
22285
22294
  const safe = sessionId.replace(/[^a-zA-Z0-9_-]/g, "_");
22286
- return path57.join(os43.homedir(), ".codeam", `daemon-${safe}.lock`);
22295
+ return path58.join(os43.homedir(), ".codeam", `daemon-${safe}.lock`);
22287
22296
  }
22288
22297
  function acquireDaemonLock(sessionId) {
22289
22298
  const lockPath = daemonLockPath(sessionId);
22290
22299
  try {
22291
- fs54.mkdirSync(path57.dirname(lockPath), { recursive: true });
22300
+ fs54.mkdirSync(path58.dirname(lockPath), { recursive: true });
22292
22301
  try {
22293
22302
  fs54.writeFileSync(lockPath, String(process.pid), { flag: "wx" });
22294
22303
  } catch (e) {
@@ -22322,7 +22331,7 @@ function acquireDaemonLock(sessionId) {
22322
22331
  function acquireSingletonLock() {
22323
22332
  const lockPath = pairAutoLockPath();
22324
22333
  try {
22325
- fs54.mkdirSync(path57.dirname(lockPath), { recursive: true });
22334
+ fs54.mkdirSync(path58.dirname(lockPath), { recursive: true });
22326
22335
  try {
22327
22336
  fs54.writeFileSync(lockPath, String(process.pid), { flag: "wx" });
22328
22337
  } catch (e) {
@@ -22779,7 +22788,7 @@ var AgentService = class _AgentService {
22779
22788
  };
22780
22789
 
22781
22790
  // src/agents/acp/adapters.ts
22782
- var path59 = __toESM(require("path"));
22791
+ var path60 = __toESM(require("path"));
22783
22792
 
22784
22793
  // src/agents/acp/agent-binary.ts
22785
22794
  var import_fs4 = __toESM(require("fs"));
@@ -23021,13 +23030,13 @@ function resolveBin(pkgName, binName) {
23021
23030
  try {
23022
23031
  const manifestPath = require_.resolve(`${pkgName}/package.json`);
23023
23032
  const manifest = require_(`${pkgName}/package.json`);
23024
- const pkgDir = path59.dirname(manifestPath);
23033
+ const pkgDir = path60.dirname(manifestPath);
23025
23034
  const bin = manifest.bin;
23026
23035
  if (!bin) return null;
23027
- if (typeof bin === "string") return path59.resolve(pkgDir, bin);
23036
+ if (typeof bin === "string") return path60.resolve(pkgDir, bin);
23028
23037
  const target = binName ?? Object.keys(bin)[0];
23029
23038
  if (!target || !bin[target]) return null;
23030
- return path59.resolve(pkgDir, bin[target]);
23039
+ return path60.resolve(pkgDir, bin[target]);
23031
23040
  } catch {
23032
23041
  return null;
23033
23042
  }
@@ -23132,7 +23141,7 @@ var import_node_crypto10 = require("crypto");
23132
23141
 
23133
23142
  // src/services/history.service.ts
23134
23143
  var fs56 = __toESM(require("fs"));
23135
- var path60 = __toESM(require("path"));
23144
+ var path61 = __toESM(require("path"));
23136
23145
  var os45 = __toESM(require("os"));
23137
23146
  var https7 = __toESM(require("https"));
23138
23147
  var http6 = __toESM(require("http"));
@@ -23301,7 +23310,7 @@ var HistoryService = class _HistoryService {
23301
23310
  return this._quotaPercent === null || Date.now() - this._quotaFetchedAt > ttlMs;
23302
23311
  }
23303
23312
  get projectDir() {
23304
- return this.runtime.resolveHistoryDir(this.cwd) ?? path60.join(os45.homedir(), ".claude", "projects", encodeCwd(this.cwd));
23313
+ return this.runtime.resolveHistoryDir(this.cwd) ?? path61.join(os45.homedir(), ".claude", "projects", encodeCwd(this.cwd));
23305
23314
  }
23306
23315
  /** Set the current Claude conversation ID (extracted from /cost command or session start) */
23307
23316
  setCurrentConversationId(id) {
@@ -23313,7 +23322,7 @@ var HistoryService = class _HistoryService {
23313
23322
  /** Return the current message count in the active conversation. */
23314
23323
  getCurrentMessageCount() {
23315
23324
  if (!this.currentConversationId) return 0;
23316
- const filePath = path60.join(this.projectDir, `${this.currentConversationId}.jsonl`);
23325
+ const filePath = path61.join(this.projectDir, `${this.currentConversationId}.jsonl`);
23317
23326
  return parseJsonl(filePath).length;
23318
23327
  }
23319
23328
  /**
@@ -23324,7 +23333,7 @@ var HistoryService = class _HistoryService {
23324
23333
  const deadline = Date.now() + timeoutMs;
23325
23334
  while (Date.now() < deadline) {
23326
23335
  if (!this.currentConversationId) return null;
23327
- const filePath = path60.join(this.projectDir, `${this.currentConversationId}.jsonl`);
23336
+ const filePath = path61.join(this.projectDir, `${this.currentConversationId}.jsonl`);
23328
23337
  const messages = parseJsonl(filePath);
23329
23338
  if (messages.length > previousCount) {
23330
23339
  for (let i = messages.length - 1; i >= previousCount; i--) {
@@ -23352,14 +23361,14 @@ var HistoryService = class _HistoryService {
23352
23361
  try {
23353
23362
  const files = fs56.readdirSync(dir, { withFileTypes: true }).filter((e) => e.isFile() && e.name.endsWith(".jsonl")).map((e) => {
23354
23363
  try {
23355
- const stat3 = fs56.statSync(path60.join(dir, e.name));
23364
+ const stat3 = fs56.statSync(path61.join(dir, e.name));
23356
23365
  return { name: e.name, mtime: stat3.mtimeMs, birthtime: stat3.birthtimeMs };
23357
23366
  } catch {
23358
23367
  return { name: e.name, mtime: 0, birthtime: 0 };
23359
23368
  }
23360
23369
  }).filter((f) => f.birthtime >= cutoff).sort((a, b) => b.mtime - a.mtime);
23361
23370
  if (files.length > 0) {
23362
- this.currentConversationId = path60.basename(files[0].name, ".jsonl");
23371
+ this.currentConversationId = path61.basename(files[0].name, ".jsonl");
23363
23372
  }
23364
23373
  } catch {
23365
23374
  }
@@ -23399,7 +23408,7 @@ var HistoryService = class _HistoryService {
23399
23408
  }
23400
23409
  const files = entries.filter((e) => e.isFile() && e.name.endsWith(".jsonl")).map((e) => {
23401
23410
  try {
23402
- const stat3 = fs56.statSync(path60.join(dir, e.name));
23411
+ const stat3 = fs56.statSync(path61.join(dir, e.name));
23403
23412
  return { name: e.name, mtime: stat3.mtimeMs, birthtime: stat3.birthtimeMs };
23404
23413
  } catch {
23405
23414
  return { name: e.name, mtime: 0, birthtime: 0 };
@@ -23408,7 +23417,7 @@ var HistoryService = class _HistoryService {
23408
23417
  if (files.length === 0) return null;
23409
23418
  const targetFile = this.currentConversationId ? `${this.currentConversationId}.jsonl` : files[0].name;
23410
23419
  if (!files.some((f) => f.name === targetFile)) return null;
23411
- return this.extractUsageFromFile(path60.join(dir, targetFile));
23420
+ return this.extractUsageFromFile(path61.join(dir, targetFile));
23412
23421
  }
23413
23422
  extractUsageFromFile(filePath) {
23414
23423
  let raw;
@@ -23460,7 +23469,7 @@ var HistoryService = class _HistoryService {
23460
23469
  try {
23461
23470
  files = fs56.readdirSync(projectDir).filter((f) => f.endsWith(".jsonl")).filter((f) => {
23462
23471
  try {
23463
- return fs56.statSync(path60.join(projectDir, f)).mtimeMs >= monthStartMs;
23472
+ return fs56.statSync(path61.join(projectDir, f)).mtimeMs >= monthStartMs;
23464
23473
  } catch {
23465
23474
  return false;
23466
23475
  }
@@ -23471,7 +23480,7 @@ var HistoryService = class _HistoryService {
23471
23480
  for (const file of files) {
23472
23481
  let raw;
23473
23482
  try {
23474
- raw = fs56.readFileSync(path60.join(projectDir, file), "utf8");
23483
+ raw = fs56.readFileSync(path61.join(projectDir, file), "utf8");
23475
23484
  } catch {
23476
23485
  continue;
23477
23486
  }
@@ -23550,7 +23559,7 @@ var HistoryService = class _HistoryService {
23550
23559
  if (this.runtime.resolveHistoryFile) {
23551
23560
  return this.runtime.resolveHistoryFile(this.cwd, sessionId);
23552
23561
  }
23553
- return path60.join(this.projectDir, `${sessionId}.jsonl`);
23562
+ return path61.join(this.projectDir, `${sessionId}.jsonl`);
23554
23563
  }
23555
23564
  /**
23556
23565
  * Parse a conversation's messages from disk, agent-aware. Claude uses the
@@ -23584,7 +23593,7 @@ var HistoryService = class _HistoryService {
23584
23593
  };
23585
23594
  });
23586
23595
  }
23587
- return parseJsonl(path60.join(this.projectDir, `${sessionId}.jsonl`));
23596
+ return parseJsonl(path61.join(this.projectDir, `${sessionId}.jsonl`));
23588
23597
  }
23589
23598
  async loadConversation(sessionId) {
23590
23599
  const messages = this.readConversation(sessionId);
@@ -23712,7 +23721,7 @@ var import_node_child_process26 = require("child_process");
23712
23721
  var fs57 = __toESM(require("fs/promises"));
23713
23722
  var fsSync = __toESM(require("fs"));
23714
23723
  var os46 = __toESM(require("os"));
23715
- var path61 = __toESM(require("path"));
23724
+ var path62 = __toESM(require("path"));
23716
23725
  var import_node_stream = require("stream");
23717
23726
 
23718
23727
  // ../../node_modules/@agentclientprotocol/sdk/dist/acp.js
@@ -26700,24 +26709,24 @@ function knownAgentBinaryDirs() {
26700
26709
  out2.push("/tmp/codeam-node20/bin");
26701
26710
  for (const root of [
26702
26711
  "/usr/local/share/nvm/versions/node",
26703
- path61.join(home, ".nvm/versions/node")
26712
+ path62.join(home, ".nvm/versions/node")
26704
26713
  ]) {
26705
26714
  try {
26706
26715
  for (const child of fsSync.readdirSync(root)) {
26707
- out2.push(path61.join(root, child, "bin"));
26716
+ out2.push(path62.join(root, child, "bin"));
26708
26717
  }
26709
26718
  } catch {
26710
26719
  }
26711
26720
  }
26712
- out2.push(path61.join(home, ".volta/bin"));
26721
+ out2.push(path62.join(home, ".volta/bin"));
26713
26722
  out2.push("/usr/local/bin");
26714
26723
  out2.push("/usr/bin");
26715
- out2.push(path61.join(home, ".local/bin"));
26716
- out2.push(path61.join(home, "bin"));
26724
+ out2.push(path62.join(home, ".local/bin"));
26725
+ out2.push(path62.join(home, "bin"));
26717
26726
  if (process.platform === "win32") {
26718
26727
  const { LOCALAPPDATA, APPDATA } = process.env;
26719
- if (LOCALAPPDATA) out2.push(path61.join(LOCALAPPDATA, "cursor-agent"));
26720
- if (APPDATA) out2.push(path61.join(APPDATA, "npm"));
26728
+ if (LOCALAPPDATA) out2.push(path62.join(LOCALAPPDATA, "cursor-agent"));
26729
+ if (APPDATA) out2.push(path62.join(APPDATA, "npm"));
26721
26730
  }
26722
26731
  return out2.filter((p2) => {
26723
26732
  try {
@@ -26729,7 +26738,7 @@ function knownAgentBinaryDirs() {
26729
26738
  }
26730
26739
  function expandPathForAgentBinaries(existingPath) {
26731
26740
  const existing = new Set(
26732
- existingPath.split(path61.delimiter).filter((p2) => p2.length > 0)
26741
+ existingPath.split(path62.delimiter).filter((p2) => p2.length > 0)
26733
26742
  );
26734
26743
  const additions = [];
26735
26744
  for (const dir of knownAgentBinaryDirs()) {
@@ -26739,7 +26748,7 @@ function expandPathForAgentBinaries(existingPath) {
26739
26748
  }
26740
26749
  }
26741
26750
  if (additions.length === 0) return existingPath;
26742
- return [...additions, existingPath].filter((p2) => p2.length > 0).join(path61.delimiter);
26751
+ return [...additions, existingPath].filter((p2) => p2.length > 0).join(path62.delimiter);
26743
26752
  }
26744
26753
 
26745
26754
  // src/agents/acp/headroom-budget-proxy.ts
@@ -27223,12 +27232,12 @@ function commonPrefixLength(a, b) {
27223
27232
  var import_child_process26 = require("child_process");
27224
27233
  var fs58 = __toESM(require("fs"));
27225
27234
  var os47 = __toESM(require("os"));
27226
- var path62 = __toESM(require("path"));
27235
+ var path63 = __toESM(require("path"));
27227
27236
  var _onboardingSeam = {
27228
- markerPath: (sessionId) => path62.join(os47.homedir(), ".codeam", "welcomed", `${sessionId}.done`),
27237
+ markerPath: (sessionId) => path63.join(os47.homedir(), ".codeam", "welcomed", `${sessionId}.done`),
27229
27238
  exists: (p2) => fs58.existsSync(p2),
27230
27239
  write: (p2) => {
27231
- fs58.mkdirSync(path62.dirname(p2), { recursive: true });
27240
+ fs58.mkdirSync(path63.dirname(p2), { recursive: true });
27232
27241
  fs58.writeFileSync(p2, "");
27233
27242
  },
27234
27243
  disabled: () => {
@@ -27266,7 +27275,7 @@ function resolveRepoName(cwd) {
27266
27275
  if (name) return name;
27267
27276
  }
27268
27277
  }
27269
- const base = path62.basename(cwd || "");
27278
+ const base = path63.basename(cwd || "");
27270
27279
  if (base && !isUuid(base)) return base;
27271
27280
  return "this project";
27272
27281
  }
@@ -27519,7 +27528,7 @@ var import_crypto5 = require("crypto");
27519
27528
  // src/services/turn-files/git-changeset.ts
27520
27529
  var import_child_process27 = require("child_process");
27521
27530
  var fs59 = __toESM(require("fs/promises"));
27522
- var path63 = __toESM(require("path"));
27531
+ var path64 = __toESM(require("path"));
27523
27532
  async function collectRepoChangeset(opts) {
27524
27533
  const status2 = await runGit3(opts.repoRoot, ["status", "--porcelain=v1", "-z"]);
27525
27534
  if (status2 === null) return null;
@@ -27537,7 +27546,7 @@ async function collectRepoChangeset(opts) {
27537
27546
  let stats;
27538
27547
  if (row.fileStatus === "added" && numstatEntry === void 0) {
27539
27548
  const lineCount = await readUntrackedLineCount(
27540
- path63.join(opts.repoRoot, row.filePath)
27549
+ path64.join(opts.repoRoot, row.filePath)
27541
27550
  );
27542
27551
  stats = { added: lineCount, removed: 0 };
27543
27552
  } else {
@@ -27679,8 +27688,8 @@ async function discoverRepos(workingDir, maxDepth = 4) {
27679
27688
  if (hasGit) {
27680
27689
  out2.push({
27681
27690
  repoRoot: dir,
27682
- repoPath: path63.relative(workingDir, dir),
27683
- repoName: path63.basename(dir)
27691
+ repoPath: path64.relative(workingDir, dir),
27692
+ repoName: path64.basename(dir)
27684
27693
  });
27685
27694
  return;
27686
27695
  }
@@ -27688,14 +27697,14 @@ async function discoverRepos(workingDir, maxDepth = 4) {
27688
27697
  if (!entry.isDirectory) continue;
27689
27698
  if (entry.name === "node_modules") continue;
27690
27699
  if (entry.name === "dist" || entry.name === "build") continue;
27691
- await walk(path63.join(dir, entry.name), depth + 1);
27700
+ await walk(path64.join(dir, entry.name), depth + 1);
27692
27701
  }
27693
27702
  }
27694
27703
  }
27695
27704
 
27696
27705
  // src/services/turn-files/files-outbox.ts
27697
27706
  var fs60 = __toESM(require("fs/promises"));
27698
- var path64 = __toESM(require("path"));
27707
+ var path65 = __toESM(require("path"));
27699
27708
  var import_os12 = require("os");
27700
27709
  var HOME_OUTBOX_DIR = ".codeam/outbox";
27701
27710
  var MAX_AGE_MS = 24 * 60 * 60 * 1e3;
@@ -27728,15 +27737,15 @@ var FilesOutbox = class {
27728
27737
  backoffIndex = 0;
27729
27738
  stopped = false;
27730
27739
  constructor(opts) {
27731
- const base = opts.baseDir ?? path64.join(homeDir(), HOME_OUTBOX_DIR);
27732
- this.filePath = path64.join(base, `${opts.sessionId}.jsonl`);
27740
+ const base = opts.baseDir ?? path65.join(homeDir(), HOME_OUTBOX_DIR);
27741
+ this.filePath = path65.join(base, `${opts.sessionId}.jsonl`);
27733
27742
  this.post = opts.post;
27734
27743
  this.autoSchedule = opts.autoSchedule !== false;
27735
27744
  }
27736
27745
  /** Persist the entry to disk and trigger a flush. Returns once the
27737
27746
  * line is durable on disk (not once the POST succeeds). */
27738
27747
  async enqueue(entry) {
27739
- await fs60.mkdir(path64.dirname(this.filePath), { recursive: true });
27748
+ await fs60.mkdir(path65.dirname(this.filePath), { recursive: true });
27740
27749
  await fs60.appendFile(this.filePath, JSON.stringify(entry) + "\n", "utf8");
27741
27750
  this.backoffIndex = 0;
27742
27751
  if (this.autoSchedule) this.scheduleFlush(0);
@@ -31281,10 +31290,10 @@ function toEpochMs(ts) {
31281
31290
  // src/agents/claude/onboarding.ts
31282
31291
  var fs62 = __toESM(require("fs"));
31283
31292
  var os48 = __toESM(require("os"));
31284
- var path65 = __toESM(require("path"));
31293
+ var path66 = __toESM(require("path"));
31285
31294
  function ensureClaudeOnboarded() {
31286
31295
  try {
31287
- const file = path65.join(os48.homedir(), ".claude.json");
31296
+ const file = path66.join(os48.homedir(), ".claude.json");
31288
31297
  let config = {};
31289
31298
  try {
31290
31299
  config = JSON.parse(fs62.readFileSync(file, "utf8"));
@@ -31298,7 +31307,7 @@ function ensureClaudeOnboarded() {
31298
31307
  if (typeof config.lastOnboardingVersion !== "string") {
31299
31308
  config.lastOnboardingVersion = "2.1.177";
31300
31309
  }
31301
- fs62.mkdirSync(path65.dirname(file), { recursive: true });
31310
+ fs62.mkdirSync(path66.dirname(file), { recursive: true });
31302
31311
  fs62.writeFileSync(file, JSON.stringify(config, null, 2));
31303
31312
  log.info("claude", "pre-completed Claude onboarding (skip first-run theme picker)");
31304
31313
  } catch (err) {
@@ -31973,7 +31982,7 @@ var import_picocolors11 = __toESM(require("picocolors"));
31973
31982
  var import_child_process28 = require("child_process");
31974
31983
  var import_util4 = require("util");
31975
31984
  var import_picocolors9 = __toESM(require("picocolors"));
31976
- var path66 = __toESM(require("path"));
31985
+ var path67 = __toESM(require("path"));
31977
31986
  var execFileP6 = (0, import_util4.promisify)(import_child_process28.execFile);
31978
31987
  var MAX_BUFFER = 8 * 1024 * 1024;
31979
31988
  function resetStdinForChild() {
@@ -32462,7 +32471,7 @@ var GitHubCodespacesProvider = class {
32462
32471
  });
32463
32472
  }
32464
32473
  async uploadFile(workspaceId, remotePath, contents, options = {}) {
32465
- const remoteDir = path66.posix.dirname(remotePath);
32474
+ const remoteDir = path67.posix.dirname(remotePath);
32466
32475
  const parts = [
32467
32476
  `mkdir -p ${shellQuote(remoteDir)}`,
32468
32477
  `cat > ${shellQuote(remotePath)}`
@@ -32532,7 +32541,7 @@ function shellQuote(s) {
32532
32541
  // src/services/providers/gitpod.ts
32533
32542
  var import_child_process29 = require("child_process");
32534
32543
  var import_util5 = require("util");
32535
- var path67 = __toESM(require("path"));
32544
+ var path68 = __toESM(require("path"));
32536
32545
  var import_picocolors10 = __toESM(require("picocolors"));
32537
32546
  var execFileP7 = (0, import_util5.promisify)(import_child_process29.execFile);
32538
32547
  var MAX_BUFFER2 = 8 * 1024 * 1024;
@@ -32772,7 +32781,7 @@ var GitpodProvider = class {
32772
32781
  });
32773
32782
  }
32774
32783
  async uploadFile(workspaceId, remotePath, contents, options = {}) {
32775
- const remoteDir = path67.posix.dirname(remotePath);
32784
+ const remoteDir = path68.posix.dirname(remotePath);
32776
32785
  const parts = [
32777
32786
  `mkdir -p ${shellQuote2(remoteDir)}`,
32778
32787
  `cat > ${shellQuote2(remotePath)}`
@@ -32808,7 +32817,7 @@ function shellQuote2(s) {
32808
32817
  // src/services/providers/gitlab-workspaces.ts
32809
32818
  var import_child_process30 = require("child_process");
32810
32819
  var import_util6 = require("util");
32811
- var path68 = __toESM(require("path"));
32820
+ var path69 = __toESM(require("path"));
32812
32821
  var execFileP8 = (0, import_util6.promisify)(import_child_process30.execFile);
32813
32822
  var MAX_BUFFER3 = 8 * 1024 * 1024;
32814
32823
  var GITLAB_API_BASE = process.env.CODEAM_GITLAB_API_URL ?? "https://gitlab.com/api/v4";
@@ -33068,7 +33077,7 @@ Docs: https://docs.gitlab.com/ee/user/workspace/configuration.html`
33068
33077
  }
33069
33078
  async uploadFile(workspaceId, remotePath, contents, options = {}) {
33070
33079
  const sshHost = process.env.CODEAM_GITLAB_SSH_HOST ?? "workspaces.gitlab.com";
33071
- const remoteDir = path68.posix.dirname(remotePath);
33080
+ const remoteDir = path69.posix.dirname(remotePath);
33072
33081
  const parts = [`mkdir -p ${shellQuote3(remoteDir)}`, `cat > ${shellQuote3(remotePath)}`];
33073
33082
  if (options.mode != null) {
33074
33083
  parts.push(`chmod ${options.mode.toString(8)} ${shellQuote3(remotePath)}`);
@@ -33136,7 +33145,7 @@ function shellQuote3(s) {
33136
33145
  // src/services/providers/railway.ts
33137
33146
  var import_child_process31 = require("child_process");
33138
33147
  var import_util7 = require("util");
33139
- var path69 = __toESM(require("path"));
33148
+ var path70 = __toESM(require("path"));
33140
33149
  var execFileP9 = (0, import_util7.promisify)(import_child_process31.execFile);
33141
33150
  var MAX_BUFFER4 = 8 * 1024 * 1024;
33142
33151
  function resetStdinForChild4() {
@@ -33372,7 +33381,7 @@ var RailwayProvider = class {
33372
33381
  if (!projectId || !serviceId) {
33373
33382
  throw new Error("Invalid Railway workspace id (expected projectId/serviceId).");
33374
33383
  }
33375
- const remoteDir = path69.posix.dirname(remotePath);
33384
+ const remoteDir = path70.posix.dirname(remotePath);
33376
33385
  const parts = [`mkdir -p ${shellQuote4(remoteDir)}`, `cat > ${shellQuote4(remotePath)}`];
33377
33386
  if (options.mode != null) {
33378
33387
  parts.push(`chmod ${options.mode.toString(8)} ${shellQuote4(remotePath)}`);
@@ -34019,7 +34028,7 @@ var import_node_dns = require("dns");
34019
34028
  var import_node_util5 = require("util");
34020
34029
  var import_node_crypto12 = require("crypto");
34021
34030
  var fs63 = __toESM(require("fs"));
34022
- var path70 = __toESM(require("path"));
34031
+ var path71 = __toESM(require("path"));
34023
34032
  var import_picocolors14 = __toESM(require("picocolors"));
34024
34033
  var dnsResolveP = (0, import_node_util5.promisify)(import_node_dns.resolve);
34025
34034
  async function checkDns(apiBase2) {
@@ -34075,10 +34084,10 @@ async function checkHealth(apiBase2) {
34075
34084
  }
34076
34085
  }
34077
34086
  function checkConfigDir() {
34078
- const dir = path70.join(require("os").homedir(), ".codeam");
34087
+ const dir = path71.join(require("os").homedir(), ".codeam");
34079
34088
  try {
34080
34089
  fs63.mkdirSync(dir, { recursive: true, mode: 448 });
34081
- const probe = path70.join(dir, ".doctor-probe");
34090
+ const probe = path71.join(dir, ".doctor-probe");
34082
34091
  fs63.writeFileSync(probe, "ok", { mode: 384 });
34083
34092
  const read2 = fs63.readFileSync(probe, "utf8");
34084
34093
  fs63.unlinkSync(probe);
@@ -34145,7 +34154,7 @@ function checkNodePty() {
34145
34154
  detail: "not required on this platform"
34146
34155
  };
34147
34156
  }
34148
- const vendoredPath = path70.join(__dirname, "vendor", "node-pty");
34157
+ const vendoredPath = path71.join(__dirname, "vendor", "node-pty");
34149
34158
  for (const target of [vendoredPath, "node-pty"]) {
34150
34159
  try {
34151
34160
  require(target);
@@ -34187,7 +34196,7 @@ function checkChokidar() {
34187
34196
  }
34188
34197
  async function doctor(args2 = []) {
34189
34198
  const json = args2.includes("--json");
34190
- const cliVersion = true ? "2.60.26" : "0.0.0-dev";
34199
+ const cliVersion = true ? "2.60.27" : "0.0.0-dev";
34191
34200
  const apiBase2 = resolveApiBaseUrl();
34192
34201
  const diagnosticId = (0, import_node_crypto12.randomUUID)();
34193
34202
  log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
@@ -34386,7 +34395,7 @@ async function completion(args2) {
34386
34395
  // src/commands/version.ts
34387
34396
  var import_picocolors15 = __toESM(require("picocolors"));
34388
34397
  function version2() {
34389
- const v = true ? "2.60.26" : "unknown";
34398
+ const v = true ? "2.60.27" : "unknown";
34390
34399
  console.log(`${import_picocolors15.default.bold("codeam-cli")} ${import_picocolors15.default.cyan(v)}`);
34391
34400
  }
34392
34401
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeam-cli",
3
- "version": "2.60.26",
3
+ "version": "2.60.27",
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",