codeam-cli 2.39.63 → 2.39.65

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,18 @@ 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.39.64] — 2026-06-20
8
+
9
+ ### Added
10
+
11
+ - **host-agent:** Handle self_hosted_refresh_credentials (in-place re-auth)
12
+
13
+ ## [2.39.63] — 2026-06-20
14
+
15
+ ### Added
16
+
17
+ - **acp:** Make the auth-fail message's re-auth a tappable deep-link
18
+
7
19
  ## [2.39.62] — 2026-06-20
8
20
 
9
21
  ### Fixed
package/dist/index.js CHANGED
@@ -5388,7 +5388,7 @@ function readAnonId() {
5388
5388
  }
5389
5389
  function superProperties() {
5390
5390
  return {
5391
- cliVersion: true ? "2.39.63" : "0.0.0-dev",
5391
+ cliVersion: true ? "2.39.65" : "0.0.0-dev",
5392
5392
  nodeVersion: process.version,
5393
5393
  platform: process.platform,
5394
5394
  arch: process.arch,
@@ -5547,7 +5547,7 @@ var os4 = __toESM(require("os"));
5547
5547
  // package.json
5548
5548
  var package_default = {
5549
5549
  name: "codeam-cli",
5550
- version: "2.39.63",
5550
+ version: "2.39.65",
5551
5551
  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.",
5552
5552
  type: "commonjs",
5553
5553
  main: "dist/index.js",
@@ -17367,7 +17367,7 @@ function checkForUpdates() {
17367
17367
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
17368
17368
  if (process.env.CI) return;
17369
17369
  if (!process.stdout.isTTY) return;
17370
- const current = true ? "2.39.63" : null;
17370
+ const current = true ? "2.39.65" : null;
17371
17371
  if (!current) return;
17372
17372
  const cache = readCache();
17373
17373
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
@@ -17419,6 +17419,9 @@ function maybeStartHeadroomReporter(ctx) {
17419
17419
  return null;
17420
17420
  }
17421
17421
  }
17422
+ function isRefreshCredentialsPayload(p2) {
17423
+ return typeof p2.agentId === "string" && typeof p2.sealedAgentAuth === "string";
17424
+ }
17422
17425
  function isHouseProxy(v) {
17423
17426
  if (typeof v !== "object" || v === null) return false;
17424
17427
  const o = v;
@@ -17769,7 +17772,7 @@ var defaultSpawner = (env, cwd, args2 = []) => (0, import_node_child_process13.s
17769
17772
  detached: false
17770
17773
  });
17771
17774
  function currentCliVersion() {
17772
- return true ? "2.39.63" : null;
17775
+ return true ? "2.39.65" : null;
17773
17776
  }
17774
17777
  function runCmd(cmd, args2, timeoutMs) {
17775
17778
  return new Promise((resolve7) => {
@@ -18069,6 +18072,14 @@ var HostAgentSupervisor = class {
18069
18072
  this.stopChild(cmd.payload.sessionId);
18070
18073
  return;
18071
18074
  }
18075
+ if (cmd.type === "self_hosted_refresh_credentials") {
18076
+ if (!isRefreshCredentialsPayload(cmd.payload)) {
18077
+ log.warn("host-agent", `ignoring malformed self_hosted_refresh_credentials id=${cmd.id}`);
18078
+ return;
18079
+ }
18080
+ await this.refreshCredentials(cmd.payload);
18081
+ return;
18082
+ }
18072
18083
  if (cmd.type === "self_hosted_wipe") {
18073
18084
  log.warn("host-agent", `self_hosted_wipe received id=${cmd.id} \u2014 de-provisioning`);
18074
18085
  this.stop();
@@ -18134,6 +18145,7 @@ var HostAgentSupervisor = class {
18134
18145
  CODEAM_AUTO_TOKEN: payload.autoPairToken
18135
18146
  };
18136
18147
  }
18148
+ childEnv = { ...childEnv, CODEAM_AUTO_APPROVE: "1" };
18137
18149
  if (payload.agentInstallScript) {
18138
18150
  report("installing", "installing agent CLI");
18139
18151
  await this.runAgentInstall(payload.agentInstallScript);
@@ -18291,6 +18303,30 @@ var HostAgentSupervisor = class {
18291
18303
  }
18292
18304
  this.children.delete(child.deployId);
18293
18305
  }
18306
+ /**
18307
+ * Handle `self_hosted_refresh_credentials` (the user re-linked the agent).
18308
+ * Unseal the fresh credential and re-provision the agent's on-disk auth IN
18309
+ * PLACE (`provisionAgentCredentials` rewrites `~/.claude/.credentials.json`
18310
+ * etc.). The running pair-auto child re-reads its auth file on the next API
18311
+ * call, so a 401'd session recovers WITHOUT a restart — the self-hosted
18312
+ * parallel to the codespace `refreshAgentCredentialsOnly` sweep. Best-effort:
18313
+ * a failure is logged, never throws (the relay dispatch must not crash).
18314
+ */
18315
+ async refreshCredentials(payload) {
18316
+ try {
18317
+ const auth = await this.resolveAgentAuth(this.identity, payload.sealedAgentAuth);
18318
+ provisionAgentCredentials(payload.agentId, auth, void 0);
18319
+ log.info(
18320
+ "host-agent",
18321
+ `refreshed credentials in place for agent=${payload.agentId} (${this.children.size} active child(ren))`
18322
+ );
18323
+ } catch (err) {
18324
+ log.warn(
18325
+ "host-agent",
18326
+ `credential refresh failed (best-effort): ${err instanceof Error ? err.message : String(err)}`
18327
+ );
18328
+ }
18329
+ }
18294
18330
  };
18295
18331
  async function resolveHostIdentity(enrollToken) {
18296
18332
  const existing = loadHostIdentity();
@@ -25683,10 +25719,13 @@ async function start(requestedAgent) {
25683
25719
  adapter,
25684
25720
  cwd,
25685
25721
  getBeads,
25686
- // AUTO mode in a headless GitHub Codespace: no human at the phone to
25687
- // answer permission prompts, so auto-approve them rather than stall the
25688
- // turn (the agent-agnostic equivalent of --dangerously-skip-permissions).
25689
- autoApprovePermissions: process.env.CODESPACES === "true"
25722
+ // AUTO mode for headless, mobile-driven sessions: no human at the box
25723
+ // to answer permission prompts, so auto-approve them rather than stall
25724
+ // the turn (the agent-agnostic equivalent of
25725
+ // --dangerously-skip-permissions). Both surfaces qualify — a GitHub
25726
+ // Codespace (`CODESPACES=true`) and a self-hosted deploy (the host-agent
25727
+ // sets `CODEAM_AUTO_APPROVE=1` on the pair-auto child).
25728
+ autoApprovePermissions: process.env.CODESPACES === "true" || process.env.CODEAM_AUTO_APPROVE === "1"
25690
25729
  });
25691
25730
  return;
25692
25731
  }
@@ -28348,7 +28387,7 @@ function checkChokidar() {
28348
28387
  }
28349
28388
  async function doctor(args2 = []) {
28350
28389
  const json = args2.includes("--json");
28351
- const cliVersion = true ? "2.39.63" : "0.0.0-dev";
28390
+ const cliVersion = true ? "2.39.65" : "0.0.0-dev";
28352
28391
  const apiBase2 = resolveApiBaseUrl();
28353
28392
  const diagnosticId = (0, import_node_crypto8.randomUUID)();
28354
28393
  log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
@@ -28547,7 +28586,7 @@ async function completion(args2) {
28547
28586
  // src/commands/version.ts
28548
28587
  var import_picocolors14 = __toESM(require("picocolors"));
28549
28588
  function version2() {
28550
- const v = true ? "2.39.63" : "unknown";
28589
+ const v = true ? "2.39.65" : "unknown";
28551
28590
  console.log(`${import_picocolors14.default.bold("codeam-cli")} ${import_picocolors14.default.cyan(v)}`);
28552
28591
  }
28553
28592
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeam-cli",
3
- "version": "2.39.63",
3
+ "version": "2.39.65",
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",