codeam-cli 2.23.8 → 2.23.9

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.23.8] — 2026-05-26
8
+
9
+ ### Added
10
+
11
+ - **cli:** Capture ~/.claude.json on codeam link claude (#196)
12
+
7
13
  ## [2.23.7] — 2026-05-26
8
14
 
9
15
  ### Added
package/dist/index.js CHANGED
@@ -441,7 +441,7 @@ var import_qrcode_terminal = __toESM(require("qrcode-terminal"));
441
441
  // package.json
442
442
  var package_default = {
443
443
  name: "codeam-cli",
444
- version: "2.23.8",
444
+ version: "2.23.9",
445
445
  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.",
446
446
  type: "commonjs",
447
447
  main: "dist/index.js",
@@ -721,6 +721,9 @@ async function postLinkCredential(input) {
721
721
  if (input.agentState) {
722
722
  body.agentState = input.agentState;
723
723
  }
724
+ if (input.preserveSession) {
725
+ body.preserveSession = true;
726
+ }
724
727
  try {
725
728
  await _transport.postJsonAuthed(
726
729
  `${API_BASE}/api/plugin/agents/${input.agentId}/link`,
@@ -5771,7 +5774,7 @@ function readAnonId() {
5771
5774
  }
5772
5775
  function superProperties() {
5773
5776
  return {
5774
- cliVersion: true ? "2.23.8" : "0.0.0-dev",
5777
+ cliVersion: true ? "2.23.9" : "0.0.0-dev",
5775
5778
  nodeVersion: process.version,
5776
5779
  platform: process.platform,
5777
5780
  arch: process.arch,
@@ -16097,6 +16100,14 @@ async function pair(args2 = []) {
16097
16100
  });
16098
16101
  showSuccess(`Paired with ${info.userName} (${info.plan})`);
16099
16102
  console.log("");
16103
+ if (info.pluginAuthToken) {
16104
+ void autoLinkAfterPair({
16105
+ agentId,
16106
+ sessionId: info.sessionId,
16107
+ pluginId,
16108
+ pluginAuthToken: info.pluginAuthToken
16109
+ });
16110
+ }
16100
16111
  resolve5();
16101
16112
  },
16102
16113
  () => {
@@ -16111,6 +16122,42 @@ async function pair(args2 = []) {
16111
16122
  });
16112
16123
  await start();
16113
16124
  }
16125
+ async function autoLinkAfterPair(opts) {
16126
+ if (!opts.agentId) return;
16127
+ try {
16128
+ const strategy = createAgentStrategy(opts.agentId);
16129
+ const locator = strategy.credentialLocator();
16130
+ const token = await locator.extract();
16131
+ if (!token) {
16132
+ capture("pair_auto_link_skipped", { agentId: opts.agentId, reason: "no_local_creds" });
16133
+ return;
16134
+ }
16135
+ const res = await postLinkCredential({
16136
+ agentId: locator.publicId,
16137
+ sessionId: opts.sessionId,
16138
+ pluginId: opts.pluginId,
16139
+ pluginAuthToken: opts.pluginAuthToken,
16140
+ method: token.method,
16141
+ credential: token.credential,
16142
+ agentState: token.agentState,
16143
+ preserveSession: true
16144
+ });
16145
+ if (res.ok) {
16146
+ capture("pair_auto_link_succeeded", {
16147
+ agentId: opts.agentId,
16148
+ source: token.source,
16149
+ hasState: Boolean(token.agentState)
16150
+ });
16151
+ } else {
16152
+ capture("pair_auto_link_failed", { agentId: opts.agentId, status: res.status });
16153
+ }
16154
+ } catch (err) {
16155
+ capture("pair_auto_link_threw", {
16156
+ agentId: opts.agentId,
16157
+ error: err instanceof Error ? err.message : String(err)
16158
+ });
16159
+ }
16160
+ }
16114
16161
 
16115
16162
  // src/commands/pair-auto.ts
16116
16163
  var fs28 = __toESM(require("fs"));
@@ -18500,7 +18547,7 @@ function checkChokidar() {
18500
18547
  }
18501
18548
  async function doctor(args2 = []) {
18502
18549
  const json = args2.includes("--json");
18503
- const cliVersion = true ? "2.23.8" : "0.0.0-dev";
18550
+ const cliVersion = true ? "2.23.9" : "0.0.0-dev";
18504
18551
  const apiBase = resolveApiBaseUrl();
18505
18552
  const diagnosticId = (0, import_node_crypto5.randomUUID)();
18506
18553
  log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
@@ -18699,7 +18746,7 @@ async function completion(args2) {
18699
18746
  // src/commands/version.ts
18700
18747
  var import_picocolors13 = __toESM(require("picocolors"));
18701
18748
  function version2() {
18702
- const v = true ? "2.23.8" : "unknown";
18749
+ const v = true ? "2.23.9" : "unknown";
18703
18750
  console.log(`${import_picocolors13.default.bold("codeam-cli")} ${import_picocolors13.default.cyan(v)}`);
18704
18751
  }
18705
18752
 
@@ -18927,7 +18974,7 @@ function checkForUpdates() {
18927
18974
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
18928
18975
  if (process.env.CI) return;
18929
18976
  if (!process.stdout.isTTY) return;
18930
- const current = true ? "2.23.8" : null;
18977
+ const current = true ? "2.23.9" : null;
18931
18978
  if (!current) return;
18932
18979
  const cache = readCache();
18933
18980
  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.23.8",
3
+ "version": "2.23.9",
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",