codeam-cli 2.61.41 → 2.61.43

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.61.42] — 2026-07-25
8
+
9
+ ### Added
10
+
11
+ - **cli:** Host-agent deploy supports a specific branch/ref
12
+
13
+ ## [2.61.41] — 2026-07-25
14
+
15
+ ### Fixed
16
+
17
+ - **cli:** Bypass the box-wide pair-auto singleton for host-agent children
18
+
7
19
  ## [2.61.40] — 2026-07-25
8
20
 
9
21
  ### CI
package/dist/index.js CHANGED
@@ -780,12 +780,40 @@ var INTEGRATION_REGISTRY = {
780
780
  name: "Discord",
781
781
  icon: "discord",
782
782
  category: "comms",
783
- // COMING SOON placeholder catalog entry (no OAuth provider / MCP yet). The
784
- // agent will post review pings + read channels over the Discord API once the
785
- // provider lands. `enabled:false` dimmed "coming soon" tile.
786
- enabled: false,
787
- auth: { kind: "oauth_redirect" },
788
- delivery: {}
783
+ // LIVEthe DiscordOAuthProvider + DISCORD_* secrets (client id/secret,
784
+ // bot token, per-env redirect) are registered; the backend provider is
785
+ // config-gated (503 if env unset). Follows the SLACK pattern (OAuth redirect, zero friction),
786
+ // EXCEPT Discord OAuth gives no per-install token: the user's `bot`-scope
787
+ // authorize INVITES the app's single bot into their guild, and we store the
788
+ // returned guild id as the per-user credential. The broker injects the app's
789
+ // BOT token as `accessToken` (from config), so `DISCORD_TOKEN` = that bot
790
+ // token and `DISCORD_GUILD_ID` = the user's guild.
791
+ enabled: true,
792
+ auth: {
793
+ kind: "oauth_redirect",
794
+ // `bot` invites the app's bot into the user's guild (Guild Install);
795
+ // `guilds` lets the exchange read the guild name for display. The bot's
796
+ // channel permissions (View Channels + Read Message History + Send
797
+ // Messages + Send Messages in Threads) are set on the app's bot, NOT here.
798
+ // ⚠️ The app's bot MUST have the Message Content privileged intent enabled
799
+ // or read_messages returns empty content.
800
+ scopes: ["bot", "guilds"]
801
+ },
802
+ delivery: {
803
+ mcp: {
804
+ // mcp-discord (barryyip0625) — Node stdio, BYO bot token headless via the
805
+ // DISCORD_TOKEN env (never argv). Version PINNED; bump only after
806
+ // re-verifying headless. Tools: list/read channels + messages, send
807
+ // message, reply in thread, add reaction. `DISCORD_GUILD_ID` scopes it to
808
+ // the user's invited guild.
809
+ command: "npx",
810
+ args: ["-y", "mcp-discord@1.3.4"],
811
+ envMapping: {
812
+ DISCORD_TOKEN: "accessToken",
813
+ DISCORD_GUILD_ID: "guildId"
814
+ }
815
+ }
816
+ }
789
817
  },
790
818
  notion: {
791
819
  id: "notion",
@@ -6355,7 +6383,7 @@ function readAnonId() {
6355
6383
  }
6356
6384
  function superProperties() {
6357
6385
  return {
6358
- cliVersion: true ? "2.61.41" : "0.0.0-dev",
6386
+ cliVersion: true ? "2.61.43" : "0.0.0-dev",
6359
6387
  nodeVersion: process.version,
6360
6388
  platform: process.platform,
6361
6389
  arch: process.arch,
@@ -6536,7 +6564,7 @@ var os4 = __toESM(require("os"));
6536
6564
  // package.json
6537
6565
  var package_default = {
6538
6566
  name: "codeam-cli",
6539
- version: "2.61.41",
6567
+ version: "2.61.43",
6540
6568
  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.",
6541
6569
  type: "commonjs",
6542
6570
  main: "dist/index.js",
@@ -7707,7 +7735,7 @@ var CommandRelayService = class _CommandRelayService {
7707
7735
  // fresh + clear the "CLI update available" banner after a self-update
7708
7736
  // (a codespace that reinstalls @latest reconnects via heartbeat, not
7709
7737
  // pair/reconnect). Older backends ignore the extra field.
7710
- ..."2.61.41" ? { ideVersion: "2.61.41" } : {}
7738
+ ..."2.61.43" ? { ideVersion: "2.61.43" } : {}
7711
7739
  }).then(() => log.trace("relay", `heartbeat ok online=${online}`)).catch((err) => log.trace("relay", `heartbeat failed online=${online}`, err));
7712
7740
  }
7713
7741
  /**
@@ -17413,7 +17441,7 @@ function maskToken(text, cloneToken) {
17413
17441
  }
17414
17442
  return masked;
17415
17443
  }
17416
- async function prepareWorkspace(repoOrPath, deployId, cloneToken, provider = "github") {
17444
+ async function prepareWorkspace(repoOrPath, deployId, cloneToken, provider = "github", branch) {
17417
17445
  if (isAbsolutePathTarget(repoOrPath)) {
17418
17446
  if (!fs36.existsSync(repoOrPath)) {
17419
17447
  throw new Error(`deploy target path does not exist: ${repoOrPath}`);
@@ -17427,8 +17455,9 @@ async function prepareWorkspace(repoOrPath, deployId, cloneToken, provider = "gi
17427
17455
  }
17428
17456
  fs36.mkdirSync(selfHostedWorkspaceRoot(), { recursive: true, mode: 448 });
17429
17457
  const cloneUrl = repoCloneUrl(repoOrPath, cloneToken, provider);
17458
+ const cloneArgs = branch ? ["clone", "--depth", "1", "--branch", branch, cloneUrl, dest] : ["clone", "--depth", "1", cloneUrl, dest];
17430
17459
  try {
17431
- await execFileP4("git", ["clone", "--depth", "1", cloneUrl, dest], {
17460
+ await execFileP4("git", cloneArgs, {
17432
17461
  timeout: 12e4,
17433
17462
  maxBuffer: 16 * 1024 * 1024,
17434
17463
  env: nonInteractiveGitEnv()
@@ -18691,7 +18720,7 @@ async function autoUpgradeBeforeCriticalCommand() {
18691
18720
  if (process.env.NODE_ENV === "test") return;
18692
18721
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
18693
18722
  if (process.env.CI) return;
18694
- const current = true ? "2.61.41" : null;
18723
+ const current = true ? "2.61.43" : null;
18695
18724
  if (!current) return;
18696
18725
  const cache = readCache();
18697
18726
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
@@ -18708,7 +18737,7 @@ function checkForUpdates() {
18708
18737
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
18709
18738
  if (process.env.CI) return;
18710
18739
  if (!process.stdout.isTTY) return;
18711
- const current = true ? "2.61.41" : null;
18740
+ const current = true ? "2.61.43" : null;
18712
18741
  if (!current) return;
18713
18742
  const cache = readCache();
18714
18743
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
@@ -18728,7 +18757,7 @@ var SELF_UPDATE_INTERVAL_MS = 60 * 60 * 1e3;
18728
18757
  var SELF_UPDATE_VIEW_TIMEOUT_MS = 3e4;
18729
18758
  var SELF_UPDATE_INSTALL_TIMEOUT_MS = 18e4;
18730
18759
  function currentCliVersion() {
18731
- return true ? "2.61.41" : null;
18760
+ return true ? "2.61.43" : null;
18732
18761
  }
18733
18762
  function runCmd(cmd, args2, timeoutMs) {
18734
18763
  return new Promise((resolve8) => {
@@ -18940,6 +18969,9 @@ function isDeployPayload(p2) {
18940
18969
  if (p2.repoProvider !== void 0 && p2.repoProvider !== "github" && p2.repoProvider !== "gitlab") {
18941
18970
  return false;
18942
18971
  }
18972
+ if (p2.branch !== void 0 && typeof p2.branch !== "string") {
18973
+ return false;
18974
+ }
18943
18975
  if (p2.headroomEnabled !== void 0 && typeof p2.headroomEnabled !== "boolean") {
18944
18976
  return false;
18945
18977
  }
@@ -19653,7 +19685,8 @@ var HostAgentSupervisor = class {
19653
19685
  payload.repoOrPath,
19654
19686
  payload.deployId,
19655
19687
  payload.cloneToken,
19656
- payload.repoProvider ?? "github"
19688
+ payload.repoProvider ?? "github",
19689
+ payload.branch
19657
19690
  );
19658
19691
  let childEnv;
19659
19692
  let extraArgs = [];
@@ -38850,7 +38883,7 @@ function checkChokidar() {
38850
38883
  }
38851
38884
  async function doctor(args2 = []) {
38852
38885
  const json = args2.includes("--json");
38853
- const cliVersion = true ? "2.61.41" : "0.0.0-dev";
38886
+ const cliVersion = true ? "2.61.43" : "0.0.0-dev";
38854
38887
  const apiBase2 = resolveApiBaseUrl();
38855
38888
  const diagnosticId = (0, import_node_crypto13.randomUUID)();
38856
38889
  log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
@@ -39361,7 +39394,7 @@ async function mcpRun(args2) {
39361
39394
  // src/commands/version.ts
39362
39395
  var import_picocolors15 = __toESM(require("picocolors"));
39363
39396
  function version2() {
39364
- const v = true ? "2.61.41" : "unknown";
39397
+ const v = true ? "2.61.43" : "unknown";
39365
39398
  console.log(`${import_picocolors15.default.bold("codeam-cli")} ${import_picocolors15.default.cyan(v)}`);
39366
39399
  }
39367
39400
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeam-cli",
3
- "version": "2.61.41",
3
+ "version": "2.61.43",
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",