codeam-cli 2.23.8 → 2.23.10

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.23.9] — 2026-05-27
8
+
9
+ ### Added
10
+
11
+ - **cli:** Auto-link the chosen agent's creds inside codeam pair (#197)
12
+
13
+ ## [2.23.8] — 2026-05-26
14
+
15
+ ### Added
16
+
17
+ - **cli:** Capture ~/.claude.json on codeam link claude (#196)
18
+
7
19
  ## [2.23.7] — 2026-05-26
8
20
 
9
21
  ### 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.10",
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.10" : "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"));
@@ -16254,6 +16301,18 @@ async function pairAuto(args2) {
16254
16301
  codespaceName: process.env.CODESPACE_NAME ?? void 0
16255
16302
  });
16256
16303
  console.log(` Paired with ${claimed.user.name} (${claimed.user.plan})`);
16304
+ if (process.env.CODEAM_SKIP_AGENT_LAUNCH === "true") {
16305
+ capture("pair_auto_skipped_launch", {
16306
+ sessionId: claimed.sessionId,
16307
+ pluginId,
16308
+ agentId: claimed.agent,
16309
+ codespaceName: process.env.CODESPACE_NAME ?? void 0
16310
+ });
16311
+ console.log(
16312
+ " Skipping agent launch \u2014 install an agent from the dashboard to start chatting."
16313
+ );
16314
+ return;
16315
+ }
16257
16316
  console.log(" Starting agent loop\u2026");
16258
16317
  await start();
16259
16318
  }
@@ -18500,7 +18559,7 @@ function checkChokidar() {
18500
18559
  }
18501
18560
  async function doctor(args2 = []) {
18502
18561
  const json = args2.includes("--json");
18503
- const cliVersion = true ? "2.23.8" : "0.0.0-dev";
18562
+ const cliVersion = true ? "2.23.10" : "0.0.0-dev";
18504
18563
  const apiBase = resolveApiBaseUrl();
18505
18564
  const diagnosticId = (0, import_node_crypto5.randomUUID)();
18506
18565
  log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
@@ -18699,7 +18758,7 @@ async function completion(args2) {
18699
18758
  // src/commands/version.ts
18700
18759
  var import_picocolors13 = __toESM(require("picocolors"));
18701
18760
  function version2() {
18702
- const v = true ? "2.23.8" : "unknown";
18761
+ const v = true ? "2.23.10" : "unknown";
18703
18762
  console.log(`${import_picocolors13.default.bold("codeam-cli")} ${import_picocolors13.default.cyan(v)}`);
18704
18763
  }
18705
18764
 
@@ -18927,7 +18986,7 @@ function checkForUpdates() {
18927
18986
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
18928
18987
  if (process.env.CI) return;
18929
18988
  if (!process.stdout.isTTY) return;
18930
- const current = true ? "2.23.8" : null;
18989
+ const current = true ? "2.23.10" : null;
18931
18990
  if (!current) return;
18932
18991
  const cache = readCache();
18933
18992
  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.10",
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",