codeam-cli 2.71.2 → 2.72.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.
Files changed (2) hide show
  1. package/dist/index.js +55 -9
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -8092,7 +8092,7 @@ function readAnonId() {
8092
8092
  }
8093
8093
  function superProperties() {
8094
8094
  return {
8095
- cliVersion: true ? "2.71.2" : "0.0.0-dev",
8095
+ cliVersion: true ? "2.72.0" : "0.0.0-dev",
8096
8096
  nodeVersion: process.version,
8097
8097
  platform: process.platform,
8098
8098
  arch: process.arch,
@@ -8334,7 +8334,7 @@ var http = __toESM(require("http"));
8334
8334
  // package.json
8335
8335
  var package_default = {
8336
8336
  name: "codeam-cli",
8337
- version: "2.71.2",
8337
+ version: "2.72.0",
8338
8338
  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.",
8339
8339
  type: "commonjs",
8340
8340
  main: "dist/index.js",
@@ -9902,7 +9902,7 @@ var CommandRelayService = class _CommandRelayService {
9902
9902
  if (/PLUGIN_SECRET_REQUIRED|INVALID_PLUGIN_SECRET/.test(reason)) {
9903
9903
  log.warn(
9904
9904
  "relay",
9905
- `ack REJECTED (${reason}) \u2014 this host needs to be re-paired; commands will be redelivered forever until it is`
9905
+ `ack REJECTED (${reason}) \u2014 this host must be re-paired; retrying will never fix it. Delivery still works while this client drains on receive, but the ack rail is dead and ack-mode would stall here.`
9906
9906
  );
9907
9907
  return;
9908
9908
  }
@@ -9927,7 +9927,7 @@ var CommandRelayService = class _CommandRelayService {
9927
9927
  // fresh + clear the "CLI update available" banner after a self-update
9928
9928
  // (a codespace that reinstalls @latest reconnects via heartbeat, not
9929
9929
  // pair/reconnect). Older backends ignore the extra field.
9930
- ..."2.71.2" ? { ideVersion: "2.71.2" } : {}
9930
+ ..."2.72.0" ? { ideVersion: "2.72.0" } : {}
9931
9931
  }).then(() => log.trace("relay", `heartbeat ok online=${online}`)).catch((err) => log.trace("relay", `heartbeat failed online=${online}`, err));
9932
9932
  }
9933
9933
  /**
@@ -11527,6 +11527,13 @@ var startCommandSchema = import_zod.z.object({
11527
11527
  value: import_zod.z.string().max(32768)
11528
11528
  })
11529
11529
  ).max(512).optional(),
11530
+ // `env_parse` — how a pasted `.env` blob meets the project's current one.
11531
+ // `merge` (the default when absent) keeps variables the paste does not
11532
+ // mention, because a PARTIAL paste is the common case: people copy the block
11533
+ // they care about, not the whole file. `replace` is opt-in and destructive
11534
+ // in intent, so it must be asked for explicitly. The blob itself rides the
11535
+ // existing `content` field.
11536
+ mode: import_zod.z.enum(["merge", "replace"]).optional(),
11530
11537
  // `skills_configure` — the curated `SkillId` to add/remove. `list` (and a
11531
11538
  // malformed/unknown id on add/remove) sends no `skillId` or an invalid one;
11532
11539
  // `configureSkill` itself validates against the shared registry.
@@ -22186,7 +22193,7 @@ async function autoUpgradeBeforeCriticalCommand() {
22186
22193
  if (process.env.NODE_ENV === "test") return;
22187
22194
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
22188
22195
  if (process.env.CI) return;
22189
- const current2 = true ? "2.71.2" : null;
22196
+ const current2 = true ? "2.72.0" : null;
22190
22197
  if (!current2) return;
22191
22198
  const cache = readCache();
22192
22199
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
@@ -22203,7 +22210,7 @@ function checkForUpdates() {
22203
22210
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
22204
22211
  if (process.env.CI) return;
22205
22212
  if (!process.stdout.isTTY) return;
22206
- const current2 = true ? "2.71.2" : null;
22213
+ const current2 = true ? "2.72.0" : null;
22207
22214
  if (!current2) return;
22208
22215
  const cache = readCache();
22209
22216
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
@@ -22226,7 +22233,7 @@ var SELF_UPDATE_INSTALL_TIMEOUT_MS = 18e4;
22226
22233
  var SELF_UPDATE_LS_TIMEOUT_MS = 15e3;
22227
22234
  var SUDO_PREFLIGHT_TIMEOUT_MS = 5e3;
22228
22235
  function currentCliVersion() {
22229
- return true ? "2.71.2" : null;
22236
+ return true ? "2.72.0" : null;
22230
22237
  }
22231
22238
  async function installedVersion(deps) {
22232
22239
  const ls = await deps.run(
@@ -28213,6 +28220,44 @@ var envReadH = async (ctx, cmd) => {
28213
28220
  await ctx.relay.sendResult(cmd.id, "failed", { error: err.message });
28214
28221
  }
28215
28222
  };
28223
+ var envParseH = async (ctx, cmd, parsed) => {
28224
+ const content = typeof parsed.content === "string" ? parsed.content : null;
28225
+ if (content === null) {
28226
+ await ctx.relay.sendResult(cmd.id, "failed", { error: "Missing content" });
28227
+ return;
28228
+ }
28229
+ const replace = parsed.mode === "replace";
28230
+ const incoming = /* @__PURE__ */ new Map();
28231
+ for (const v of parseDotenv(content)) incoming.set(v.key, v.value);
28232
+ const distinctAssignments = new Set(
28233
+ content.split(/\r?\n/).map((l) => l.trim()).filter((l) => l !== "" && !l.startsWith("#") && l.includes("=")).map((l) => l.startsWith("export ") ? l.slice("export ".length).trim() : l).map((l) => l.slice(0, l.indexOf("=")).trim())
28234
+ );
28235
+ const unrecognized = Math.max(0, distinctAssignments.size - incoming.size);
28236
+ const existing = /* @__PURE__ */ new Map();
28237
+ if (!replace) {
28238
+ try {
28239
+ const raw = await fs65.promises.readFile(path71.join(process.cwd(), ".env"), "utf8");
28240
+ for (const v of parseDotenv(raw)) existing.set(v.key, v.value);
28241
+ } catch {
28242
+ }
28243
+ }
28244
+ let added = 0;
28245
+ let updated = 0;
28246
+ for (const [key, value] of incoming) {
28247
+ if (existing.has(key)) {
28248
+ if (existing.get(key) !== value) updated += 1;
28249
+ } else {
28250
+ added += 1;
28251
+ }
28252
+ existing.set(key, value);
28253
+ }
28254
+ await ctx.relay.sendResult(cmd.id, "completed", {
28255
+ vars: [...existing].map(([key, value]) => ({ key, value })),
28256
+ added,
28257
+ updated,
28258
+ unrecognized
28259
+ });
28260
+ };
28216
28261
  var envWriteH = async (ctx, cmd, parsed) => {
28217
28262
  const vars = parsed.vars;
28218
28263
  if (!Array.isArray(vars)) {
@@ -29490,6 +29535,7 @@ var handlers = {
29490
29535
  save_preview_config: savePreviewConfigH,
29491
29536
  env_read: envReadH,
29492
29537
  env_write: envWriteH,
29538
+ env_parse: envParseH,
29493
29539
  skills_configure: skillsConfigureH,
29494
29540
  take_control: takeControlH,
29495
29541
  handback: handbackH,
@@ -46859,7 +46905,7 @@ function checkChokidar() {
46859
46905
  }
46860
46906
  async function doctor(args2 = []) {
46861
46907
  const json = args2.includes("--json");
46862
- const cliVersion = true ? "2.71.2" : "0.0.0-dev";
46908
+ const cliVersion = true ? "2.72.0" : "0.0.0-dev";
46863
46909
  const apiBase2 = resolveApiBaseUrl();
46864
46910
  const diagnosticId = (0, import_node_crypto13.randomUUID)();
46865
46911
  log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
@@ -47250,7 +47296,7 @@ async function mcpRun(args2) {
47250
47296
  // src/commands/version.ts
47251
47297
  var import_picocolors15 = __toESM(require("picocolors"));
47252
47298
  function version2() {
47253
- const v = true ? "2.71.2" : "unknown";
47299
+ const v = true ? "2.72.0" : "unknown";
47254
47300
  console.log(`${import_picocolors15.default.bold("codeam-cli")} ${import_picocolors15.default.cyan(v)}`);
47255
47301
  }
47256
47302
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeam-cli",
3
- "version": "2.71.2",
3
+ "version": "2.72.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",