codeam-cli 2.18.1 → 2.19.0

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,50 @@ 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.18.2] — 2026-05-24
8
+
9
+ ### Fixed
10
+
11
+ - **cli:** Doctor node-pty check uses vendored loader + skips non-windows
12
+
13
+ ## [2.18.1] — 2026-05-24
14
+
15
+ ### Added
16
+
17
+ - **cli:** Split AgentStrategy into Interactive + Batch shapes (#58)
18
+ - **cli:** CodeRabbit BatchAgentStrategy (#59)
19
+ - **cli:** Cursor agent strategy (InteractiveAgentStrategy) (#60)
20
+ - **cli:** Aider agent strategy (InteractiveAgentStrategy) (#61)
21
+ - **cli:** \`codeam doctor\` diagnostic command (#64)
22
+ - **cli:** PostHog telemetry with full session + user context (#65)
23
+ - **cli:** Log rotation + JSON mode + XDG-aware paths (#66)
24
+ - **cli:** Quick wins bundle — banner→stderr, unknown cmd, exit-codes, --api-key-file, logout heartbeat (#67)
25
+ - **cli:** Unknown-command typo suggester + shell completion command (#68)
26
+
27
+ ### CI
28
+
29
+ - **cli:** MacOS runner + Node 18/20/22 matrix + coverage gate (#63)
30
+
31
+ ### Changed
32
+
33
+ - **cli:** Extract OsStrategy interface — pure helpers slice (#48)
34
+ - **cli:** Move buildClaudeLaunch wrap to OsStrategy.buildLaunch (#49)
35
+ - **cli:** Inject OsStrategy into RuntimeStrategy — compose, don't branch (#50)
36
+ - **cli:** Move PTY factories under OsStrategy.createPtyStrategies (#51)
37
+ - **cli:** Relocate claude-resolver + claude-installer to agents/claude/ (#53)
38
+ - **cli:** Extract LinkStrategy + drop link.ts AGENT_META hardcode (#56)
39
+ - **cli:** Switch HistoryService to /api/sessions/conversation + /list (#54)
40
+
41
+ ### Fixed
42
+
43
+ - **cli:** AgentService.restart routes through RuntimeStrategy (#52)
44
+ - **cli:** Cap PtyBuffer + StreamingEmitter rawBuffer + eager cleanup on exit (#57)
45
+ - **cli:** Doctor marks agent-binary probes as optional
46
+
47
+ ### Tests
48
+
49
+ - **cli:** Agent contract suite — one spec runs against every registered agent (#62)
50
+
7
51
  ## [2.17.7] — 2026-05-24
8
52
 
9
53
  ### Fixed
package/dist/index.js CHANGED
@@ -89,6 +89,9 @@ var require_src = __commonJS({
89
89
  // src/commands/start.ts
90
90
  var import_picocolors2 = __toESM(require("picocolors"));
91
91
 
92
+ // ../../packages/shared/src/protocol/constants.ts
93
+ var PROTOCOL_VERSION = "2.0.0";
94
+
92
95
  // ../../packages/shared/src/protocol/renderToLines.ts
93
96
  function renderToLines(raw) {
94
97
  const screen = [""];
@@ -275,11 +278,7 @@ var AGENT_REGISTRY = {
275
278
  id: "coderabbit",
276
279
  displayName: "CodeRabbit",
277
280
  binaryName: "coderabbit",
278
- // Gated behind a feature flag until the per-agent contract test +
279
- // a real PR review smoke pass on a paid CodeRabbit tenant. Strategy
280
- // is fully implemented (BatchAgentStrategy); the flip from false →
281
- // true happens in a follow-up release.
282
- enabled: false,
281
+ enabled: true,
283
282
  supportedAuthKinds: ["oauth_token", "api_key"],
284
283
  preferredAuthKind: "oauth_token"
285
284
  },
@@ -287,12 +286,7 @@ var AGENT_REGISTRY = {
287
286
  id: "cursor",
288
287
  displayName: "Cursor Agent",
289
288
  binaryName: "cursor-agent",
290
- // Gated. Strategy implemented as InteractiveAgentStrategy; TUI
291
- // parser borrows the Codex baseline because Cursor's CLI ships a
292
- // similar ratatui-style chrome. Real parser fixtures need to be
293
- // captured against a paid Cursor account before the flag flips
294
- // false → true.
295
- enabled: false,
289
+ enabled: true,
296
290
  supportedAuthKinds: ["oauth_token", "api_key"],
297
291
  preferredAuthKind: "oauth_token"
298
292
  },
@@ -300,12 +294,10 @@ var AGENT_REGISTRY = {
300
294
  id: "aider",
301
295
  displayName: "Aider",
302
296
  binaryName: "aider",
303
- // Gated. Aider is OAuth-less — auth is ANTHROPIC_API_KEY / OPENAI_API_KEY
304
- // / etc. env vars. The link flow surfaces this via the existing
305
- // --api-key escape hatch in commands/link.ts. Flip false true
306
- // after a real PTY capture lands + the contract test passes.
307
- enabled: false,
308
- // Aider only supports api_key (raw model-provider key, not OAuth).
297
+ enabled: true,
298
+ // Aider is OAuth-less auth is via ANTHROPIC_API_KEY / OPENAI_API_KEY
299
+ // / etc. env vars or `~/.aider.conf.yml`. The link flow surfaces
300
+ // this via the existing --api-key escape hatch in commands/link.ts.
309
301
  supportedAuthKinds: ["api_key"],
310
302
  preferredAuthKind: "api_key"
311
303
  }
@@ -440,7 +432,7 @@ var import_qrcode_terminal = __toESM(require("qrcode-terminal"));
440
432
  // package.json
441
433
  var package_default = {
442
434
  name: "codeam-cli",
443
- version: "2.18.1",
435
+ version: "2.19.0",
444
436
  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.",
445
437
  type: "commonjs",
446
438
  main: "dist/index.js",
@@ -5739,7 +5731,7 @@ function readAnonId() {
5739
5731
  }
5740
5732
  function superProperties() {
5741
5733
  return {
5742
- cliVersion: true ? "2.18.1" : "0.0.0-dev",
5734
+ cliVersion: true ? "2.19.0" : "0.0.0-dev",
5743
5735
  nodeVersion: process.version,
5744
5736
  platform: process.platform,
5745
5737
  arch: process.arch,
@@ -10599,7 +10591,7 @@ var SEVERITY_MAP = {
10599
10591
  };
10600
10592
  function parseReview(stdout) {
10601
10593
  const hunks = [];
10602
- const lines = stdout.split("\n");
10594
+ const lines = stdout.split(/\r?\n/);
10603
10595
  for (const line of lines) {
10604
10596
  const m = line.match(HUNK_LINE_RE);
10605
10597
  if (!m) continue;
@@ -11171,11 +11163,7 @@ var ChunkEmitter = class {
11171
11163
  this.opts = opts;
11172
11164
  this.headers = {
11173
11165
  "Content-Type": "application/json",
11174
- // Tell the backend which wire-format version we speak so
11175
- // it can route legacy translations / 426 us when we're
11176
- // too far behind. Bumped to 2.0.0 with the discriminated-
11177
- // chunk + delta-chrome refactor in this release.
11178
- "X-Codeam-Protocol-Version": "2.0.0",
11166
+ "X-Codeam-Protocol-Version": PROTOCOL_VERSION,
11179
11167
  ...vercelBypassHeader()
11180
11168
  };
11181
11169
  if (opts.pluginAuthToken) {
@@ -17283,24 +17271,34 @@ function checkAgentBinaries() {
17283
17271
  });
17284
17272
  }
17285
17273
  function checkNodePty() {
17286
- try {
17287
- require("node-pty");
17274
+ if (process.platform !== "win32") {
17288
17275
  return {
17289
17276
  id: "node-pty",
17290
17277
  label: "node-pty native module",
17291
17278
  ok: true,
17292
- detail: "loaded"
17293
- };
17294
- } catch (err) {
17295
- const msg = err.message;
17296
- return {
17297
- id: "node-pty",
17298
- label: "node-pty native module",
17299
- ok: false,
17300
- detail: msg.split("\n")[0],
17301
- hint: "Reinstall the CLI to fetch the vendored prebuilt binary:\n npm install -g codeam-cli@latest\n On Windows, antivirus may have quarantined `conpty.node` \u2014 restore it from quarantine or whitelist the install dir."
17279
+ detail: "not required on this platform"
17302
17280
  };
17303
17281
  }
17282
+ const vendoredPath = path35.join(__dirname, "vendor", "node-pty");
17283
+ for (const target of [vendoredPath, "node-pty"]) {
17284
+ try {
17285
+ require(target);
17286
+ return {
17287
+ id: "node-pty",
17288
+ label: "node-pty native module",
17289
+ ok: true,
17290
+ detail: target === vendoredPath ? "vendored bundle loaded" : "loaded"
17291
+ };
17292
+ } catch {
17293
+ }
17294
+ }
17295
+ return {
17296
+ id: "node-pty",
17297
+ label: "node-pty native module",
17298
+ ok: false,
17299
+ detail: "vendored bundle missing or unloadable",
17300
+ hint: "Reinstall the CLI to fetch the vendored prebuilt binary:\n npm install -g codeam-cli@latest\n On Windows, antivirus may have quarantined `conpty.node` \u2014 restore it from quarantine or whitelist the install dir."
17301
+ };
17304
17302
  }
17305
17303
  function checkChokidar() {
17306
17304
  try {
@@ -17323,7 +17321,7 @@ function checkChokidar() {
17323
17321
  }
17324
17322
  async function doctor(args2 = []) {
17325
17323
  const json = args2.includes("--json");
17326
- const cliVersion = true ? "2.18.1" : "0.0.0-dev";
17324
+ const cliVersion = true ? "2.19.0" : "0.0.0-dev";
17327
17325
  const apiBase = process.env.CODEAM_API_URL ?? DEFAULT_API_BASE_URL;
17328
17326
  const diagnosticId = (0, import_node_crypto5.randomUUID)();
17329
17327
  log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
@@ -17515,7 +17513,7 @@ async function completion(args2) {
17515
17513
  // src/commands/version.ts
17516
17514
  var import_picocolors13 = __toESM(require("picocolors"));
17517
17515
  function version2() {
17518
- const v = true ? "2.18.1" : "unknown";
17516
+ const v = true ? "2.19.0" : "unknown";
17519
17517
  console.log(`${import_picocolors13.default.bold("codeam-cli")} ${import_picocolors13.default.cyan(v)}`);
17520
17518
  }
17521
17519
 
@@ -17743,7 +17741,7 @@ function checkForUpdates() {
17743
17741
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
17744
17742
  if (process.env.CI) return;
17745
17743
  if (!process.stdout.isTTY) return;
17746
- const current = true ? "2.18.1" : null;
17744
+ const current = true ? "2.19.0" : null;
17747
17745
  if (!current) return;
17748
17746
  const cache = readCache();
17749
17747
  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.18.1",
3
+ "version": "2.19.0",
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",