codeam-cli 2.39.13 → 2.39.14

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,12 @@ 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.13] — 2026-06-14
8
+
9
+ ### Added
10
+
11
+ - **cli:** Proof-of-possession secret for /status + /reconnect (SEC crit1)
12
+
7
13
  ## [2.39.12] — 2026-06-13
8
14
 
9
15
  ### Fixed
package/dist/index.js CHANGED
@@ -498,7 +498,7 @@ var import_qrcode_terminal = __toESM(require("qrcode-terminal"));
498
498
  // package.json
499
499
  var package_default = {
500
500
  name: "codeam-cli",
501
- version: "2.39.13",
501
+ version: "2.39.14",
502
502
  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.",
503
503
  type: "commonjs",
504
504
  main: "dist/index.js",
@@ -5908,7 +5908,7 @@ function readAnonId() {
5908
5908
  }
5909
5909
  function superProperties() {
5910
5910
  return {
5911
- cliVersion: true ? "2.39.13" : "0.0.0-dev",
5911
+ cliVersion: true ? "2.39.14" : "0.0.0-dev",
5912
5912
  nodeVersion: process.version,
5913
5913
  platform: process.platform,
5914
5914
  arch: process.arch,
@@ -24605,7 +24605,7 @@ function networkError(msg, cause) {
24605
24605
  if (cause !== void 0) err.cause = cause;
24606
24606
  return err;
24607
24607
  }
24608
- async function claimOnce(token, pluginId) {
24608
+ async function claimOnce(token, pluginId, pluginSecretHash) {
24609
24609
  const url = `${API_BASE10}/api/pairing/claim-auto-token`;
24610
24610
  const body = {
24611
24611
  token,
@@ -24617,7 +24617,11 @@ async function claimOnce(token, pluginId) {
24617
24617
  // Current git branch of the codespace's working directory, so the
24618
24618
  // backend can populate `PairedSession.branch` for the codespace pair.
24619
24619
  // `null` when detached HEAD / not a git repo.
24620
- branch: detectCurrentBranch()
24620
+ branch: detectCurrentBranch(),
24621
+ // SEC crit1 (#813): enroll the PoP hash so /status + /reconnect for
24622
+ // this codespace session require the raw secret. Older backends
24623
+ // ignore the unknown field.
24624
+ ...pluginSecretHash ? { pluginSecretHash } : {}
24621
24625
  };
24622
24626
  const controller = new AbortController();
24623
24627
  const timer = setTimeout(() => controller.abort(), CLAIM_TIMEOUT_MS);
@@ -24654,14 +24658,14 @@ async function claimOnce(token, pluginId) {
24654
24658
  }
24655
24659
  return ok.data;
24656
24660
  }
24657
- async function claim(token, pluginId) {
24661
+ async function claim(token, pluginId, pluginSecretHash) {
24658
24662
  try {
24659
- return await claimOnce(token, pluginId);
24663
+ return await claimOnce(token, pluginId, pluginSecretHash);
24660
24664
  } catch (err) {
24661
24665
  if (err.code !== "NETWORK") throw err;
24662
24666
  await new Promise((r) => setTimeout(r, RETRY_BACKOFF_MS3));
24663
24667
  try {
24664
- return await claimOnce(token, pluginId);
24668
+ return await claimOnce(token, pluginId, pluginSecretHash);
24665
24669
  } catch (retryErr) {
24666
24670
  const netErr = retryErr;
24667
24671
  fail(`Auto-pair failed (NETWORK): ${netErr.message}`);
@@ -24717,9 +24721,11 @@ async function pairAuto(args2) {
24717
24721
  }
24718
24722
  const token = readTokenFromArgs(args2);
24719
24723
  const pluginId = (0, import_crypto7.randomUUID)();
24724
+ const pollSecret = (0, import_crypto7.randomBytes)(32).toString("base64url");
24725
+ const pluginSecretHash = (0, import_crypto7.createHash)("sha256").update(pollSecret).digest("hex");
24720
24726
  capture("pair_auto_started", { pluginId });
24721
24727
  console.log(" Claiming pairing token\u2026");
24722
- const claimed = await claim(token, pluginId);
24728
+ const claimed = await claim(token, pluginId, pluginSecretHash);
24723
24729
  if (!isKnownAgentId(claimed.agent)) {
24724
24730
  fail(
24725
24731
  `agent "${claimed.agent}" is not supported in this codeam-cli version. Upgrade with 'npm i -g codeam-cli@latest'.`
@@ -24733,6 +24739,8 @@ async function pairAuto(args2) {
24733
24739
  plan: claimed.user.plan,
24734
24740
  pairedAt: Date.now(),
24735
24741
  pluginAuthToken: claimed.pluginAuthToken,
24742
+ // SEC crit1 (#813): persist so boot-time /reconnect proves possession.
24743
+ pollSecret,
24736
24744
  agent: claimed.agent
24737
24745
  });
24738
24746
  identifyUser({
@@ -27009,7 +27017,7 @@ function checkChokidar() {
27009
27017
  }
27010
27018
  async function doctor(args2 = []) {
27011
27019
  const json = args2.includes("--json");
27012
- const cliVersion = true ? "2.39.13" : "0.0.0-dev";
27020
+ const cliVersion = true ? "2.39.14" : "0.0.0-dev";
27013
27021
  const apiBase = resolveApiBaseUrl();
27014
27022
  const diagnosticId = (0, import_node_crypto8.randomUUID)();
27015
27023
  log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
@@ -27208,7 +27216,7 @@ async function completion(args2) {
27208
27216
  // src/commands/version.ts
27209
27217
  var import_picocolors13 = __toESM(require("picocolors"));
27210
27218
  function version2() {
27211
- const v = true ? "2.39.13" : "unknown";
27219
+ const v = true ? "2.39.14" : "unknown";
27212
27220
  console.log(`${import_picocolors13.default.bold("codeam-cli")} ${import_picocolors13.default.cyan(v)}`);
27213
27221
  }
27214
27222
 
@@ -27494,7 +27502,7 @@ function checkForUpdates() {
27494
27502
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
27495
27503
  if (process.env.CI) return;
27496
27504
  if (!process.stdout.isTTY) return;
27497
- const current = true ? "2.39.13" : null;
27505
+ const current = true ? "2.39.14" : null;
27498
27506
  if (!current) return;
27499
27507
  const cache = readCache();
27500
27508
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeam-cli",
3
- "version": "2.39.13",
3
+ "version": "2.39.14",
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",