contentrain 0.15.42 → 0.16.1

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/README.md CHANGED
@@ -248,7 +248,7 @@ Most write operations create feature branches from the dedicated `contentrain` b
248
248
 
249
249
  When baseBranch has diverged (commits `contentrain` lacks — the state a dual-domain migration PR leaves behind), a write is a **partial success**: it lands on `contentrain` and reports `base_advance: "blocked_diverged"` instead of failing. `contentrain status` shows the relation in both directions; `contentrain reconcile` merges the branches content-aware (a two-parent merge commit) so the fast-forward advance works again.
250
250
 
251
- Merging a review branch (via `contentrain merge`, `contentrain diff`, the Serve UI, or the MCP tools) also deletes its remote copy, so merged branches never pile up as phantom pending reviews. The same applies to rejected/deleted drafts. This is best-effort — an offline or permission failure only produces a warning — and can be disabled with `remoteBranchCleanup: false` in `config.json`. Note that deleting a pushed branch closes any open PR/MR on it.
251
+ Merging a review branch (via `contentrain merge`, `contentrain diff`, the Serve UI, or the MCP tools) also deletes its remote copy, so merged branches never pile up as phantom pending reviews. The same applies to rejected/deleted drafts. This is best-effort — an offline or permission failure only produces a warning — and can be disabled with `remoteBranchCleanup: false` in `config.json`. In local mode (`"git": { "push": false }` in `config.json`, or `CONTENTRAIN_NO_PUSH=1`) nothing is pushed or deleted on the remote, and `merge`/`prune` print that they skipped it. Note that deleting a pushed branch closes any open PR/MR on it.
252
252
 
253
253
  Use:
254
254
 
package/dist/index.mjs CHANGED
@@ -2,7 +2,7 @@
2
2
  import { i as pc } from "./ui-B8l_LC36.mjs";
3
3
  import { defineCommand, runMain } from "citty";
4
4
  //#region package.json
5
- var version = "0.15.42";
5
+ var version = "0.16.1";
6
6
  //#endregion
7
7
  //#region src/utils/debug.ts
8
8
  /**
@@ -49,12 +49,12 @@ runMain(defineCommand({
49
49
  status: () => import("./status-DSzoldCi.mjs").then((m) => m.default),
50
50
  doctor: () => import("./doctor-B9MJgRO5.mjs").then((m) => m.default),
51
51
  validate: () => import("./validate-CiP3MkeV.mjs").then((m) => m.default),
52
- serve: () => import("./serve-C2c8aU-K.mjs").then((m) => m.default),
52
+ serve: () => import("./serve-BlnNcFpN.mjs").then((m) => m.default),
53
53
  generate: () => import("./generate-Cd-4W6ja.mjs").then((m) => m.default),
54
54
  diff: () => import("./diff-6EnRgpPR.mjs").then((m) => m.default),
55
- merge: () => import("./merge-C8l80Cg-.mjs").then((m) => m.default),
55
+ merge: () => import("./merge-C2ZE_Vg4.mjs").then((m) => m.default),
56
56
  reconcile: () => import("./reconcile-D1clXB6h.mjs").then((m) => m.default),
57
- prune: () => import("./prune-CvTj9QMj.mjs").then((m) => m.default),
57
+ prune: () => import("./prune-BVT3jmRn.mjs").then((m) => m.default),
58
58
  describe: () => import("./describe-C6-AWlKx.mjs").then((m) => m.default),
59
59
  "describe-format": () => import("./describe-format-CR0-NMR8.mjs").then((m) => m.default),
60
60
  scaffold: () => import("./scaffold-DX6eJ0n1.mjs").then((m) => m.default),
@@ -67,6 +67,7 @@ var merge_default = defineCommand({
67
67
  log.success(`Merged ${branch} (commit ${result.commit.slice(0, 8)})`);
68
68
  if (result.base_advance === "blocked_diverged") log.warning(result.warning ?? "The base branch has diverged and was not advanced — run `contentrain reconcile`.");
69
69
  if (result.remote_push === "rejected") log.warning("The remote refused the contentrain push — local and remote have diverged; fetch and run `contentrain reconcile`.");
70
+ if (result.remote_push === "disabled") log.info("Not pushed (local mode): pushing is off (git.push: false in config.json, or CONTENTRAIN_NO_PUSH=1).");
70
71
  if (result.remote?.deleted) log.message(pc.dim(" Deleted remote copy."));
71
72
  if (result.remote?.warning) log.warning(`Remote copy not deleted: ${result.remote.warning}`);
72
73
  if (result.sync?.synced?.length) log.message(pc.dim(` Synced ${result.sync.synced.length} file(s) to working tree.`));
@@ -65,6 +65,7 @@ var prune_default = defineCommand({
65
65
  }
66
66
  intro(pc.bold("contentrain prune"));
67
67
  if (preview.skipped === "disabled") log.info("Remote branch cleanup is disabled (remoteBranchCleanup: false in config.json).");
68
+ else if (preview.skipped === "local-mode") log.info("Local mode: pushing is off (git.push: false in config.json, or CONTENTRAIN_NO_PUSH=1) — the remote is left untouched; only local merged branches will be pruned.");
68
69
  else if (preview.skipped === "no-remote") log.info("No git remote configured — only local merged branches will be pruned.");
69
70
  else if (preview.skipped === "offline") log.warning(`Could not reach the remote: ${preview.errors[0] ?? "unknown error"}`);
70
71
  else if (preview.deleted.length === 0) log.info("No merged cr/* branches on the remote.");
@@ -139,7 +139,7 @@ var serve_default = defineCommand({
139
139
  consola.warn("Serve UI not found. Running in API-only mode.");
140
140
  consola.info("UI will be available after building: cd packages/cli/src/serve-ui && pnpm build");
141
141
  }
142
- const { createServeApp } = await import("./server-B5Iv0MyV.mjs");
142
+ const { createServeApp } = await import("./server-CO3WS3I8.mjs");
143
143
  const { app, handleUpgrade } = await createServeApp({
144
144
  projectRoot,
145
145
  port,
@@ -7,7 +7,7 @@ import { InMemoryTransport } from "@modelcontextprotocol/sdk/inMemory.js";
7
7
  import { Client } from "@modelcontextprotocol/sdk/client/index.js";
8
8
  import { createGit } from "@contentrain/mcp/git/identity";
9
9
  import { CONTENTRAIN_BRANCH, LOCAL_CAPABILITIES } from "@contentrain/types";
10
- import { mergeBranch } from "@contentrain/mcp/git/transaction";
10
+ import { LOCAL_MODE_NOTE, mergeBranch } from "@contentrain/mcp/git/transaction";
11
11
  import { branchDiff, checkBranchHealth, deleteRemoteBranch } from "@contentrain/mcp/git/branch-lifecycle";
12
12
  import { resolveBaseBranch } from "@contentrain/mcp/git/base-branch";
13
13
  import { normalizeOperationError } from "@contentrain/mcp/git/errors";
@@ -465,6 +465,7 @@ async function createServeApp(options) {
465
465
  sync: result.sync,
466
466
  base_advance: result.base_advance,
467
467
  remote_push: result.remote_push,
468
+ ...result.remote_push === "disabled" ? { remote_note: LOCAL_MODE_NOTE } : {},
468
469
  ...result.warning ? { warning: result.warning } : {},
469
470
  remote: result.remote
470
471
  };
@@ -778,6 +779,7 @@ async function createServeApp(options) {
778
779
  sync: result.sync,
779
780
  base_advance: result.base_advance,
780
781
  remote_push: result.remote_push,
782
+ ...result.remote_push === "disabled" ? { remote_note: LOCAL_MODE_NOTE } : {},
781
783
  ...result.warning ? { warning: result.warning } : {},
782
784
  remote: result.remote
783
785
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contentrain",
3
- "version": "0.15.42",
3
+ "version": "0.16.1",
4
4
  "license": "MIT",
5
5
  "description": "CLI for Contentrain — AI content governance infrastructure",
6
6
  "type": "module",
@@ -47,12 +47,12 @@
47
47
  "simple-git": "^3.27.0",
48
48
  "ws": "^8.18.0",
49
49
  "zod": "^3.24.0",
50
- "@contentrain/mcp": "3.9.33",
51
- "@contentrain/query": "7.6.40",
50
+ "@contentrain/mcp": "3.10.1",
51
+ "@contentrain/query": "7.6.42",
52
52
  "@contentrain/rules": "0.7.3",
53
53
  "@contentrain/skills": "0.9.5",
54
- "@contentrain/types": "1.60.0",
55
- "@contentrain/wp-import": "0.12.0"
54
+ "@contentrain/types": "1.62.0",
55
+ "@contentrain/wp-import": "0.12.2"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@types/ws": "^8.5.0",