@contentrain/mcp 3.10.0 → 3.11.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 (42) hide show
  1. package/README.md +16 -1
  2. package/dist/{apply-manager-B-O3eAbz.mjs → apply-manager-DfLr1Q-T.mjs} +2 -2
  3. package/dist/{apply-manager-B-O3eAbz.mjs.map → apply-manager-DfLr1Q-T.mjs.map} +1 -1
  4. package/dist/core/apply-manager.mjs +2 -2
  5. package/dist/core/ops/index.mjs +2 -2
  6. package/dist/core/validator/index.d.mts.map +1 -1
  7. package/dist/core/validator/index.mjs +1 -1
  8. package/dist/{errors-De8Noahk.mjs → errors-Cp6_Hlws.mjs} +2 -2
  9. package/dist/{errors-De8Noahk.mjs.map → errors-Cp6_Hlws.mjs.map} +1 -1
  10. package/dist/git/errors.mjs +1 -1
  11. package/dist/git/reconcile.d.mts.map +1 -1
  12. package/dist/git/reconcile.mjs +4 -4
  13. package/dist/git/transaction.d.mts +4 -0
  14. package/dist/git/transaction.d.mts.map +1 -1
  15. package/dist/git/transaction.mjs +1 -1
  16. package/dist/index.mjs +8 -8
  17. package/dist/{local-CBtRYFH4.mjs → local-CCVjLKy2.mjs} +6 -5
  18. package/dist/local-CCVjLKy2.mjs.map +1 -0
  19. package/dist/providers/local/index.d.mts.map +1 -1
  20. package/dist/providers/local/index.mjs +4 -4
  21. package/dist/{reconcile-DSflMfhj.mjs → reconcile-B7w5gow1.mjs} +4 -4
  22. package/dist/reconcile-B7w5gow1.mjs.map +1 -0
  23. package/dist/{reconcile-J-iorvSa.mjs → reconcile-CYmKsXxx.mjs} +2 -2
  24. package/dist/{reconcile-J-iorvSa.mjs.map → reconcile-CYmKsXxx.mjs.map} +1 -1
  25. package/dist/server/http/index.d.mts +1 -1
  26. package/dist/server/http/index.mjs +8 -8
  27. package/dist/{server-24UHN9Ll.d.mts → server-CQKCQ8H_.d.mts} +2 -2
  28. package/dist/{server-24UHN9Ll.d.mts.map → server-CQKCQ8H_.d.mts.map} +1 -1
  29. package/dist/{server-CJbmjX48.mjs → server-tPKMBPdS.mjs} +38 -23
  30. package/dist/server-tPKMBPdS.mjs.map +1 -0
  31. package/dist/server.d.mts +1 -1
  32. package/dist/server.mjs +8 -8
  33. package/dist/{transaction-DnrUATJF.mjs → transaction-DCDf0y0T.mjs} +82 -16
  34. package/dist/transaction-DCDf0y0T.mjs.map +1 -0
  35. package/dist/{validator-S19GHR4V.mjs → validator-mfCY3eea.mjs} +27 -2
  36. package/dist/validator-mfCY3eea.mjs.map +1 -0
  37. package/package.json +2 -2
  38. package/dist/local-CBtRYFH4.mjs.map +0 -1
  39. package/dist/reconcile-DSflMfhj.mjs.map +0 -1
  40. package/dist/server-CJbmjX48.mjs.map +0 -1
  41. package/dist/transaction-DnrUATJF.mjs.map +0 -1
  42. package/dist/validator-S19GHR4V.mjs.map +0 -1
@@ -56,10 +56,10 @@ interface CreateServerOptions {
56
56
  * (`TOOL_REQUIREMENTS`) cannot be met by the resolved provider +
57
57
  * projectRoot pair are not registered, so `tools/list` only advertises
58
58
  * tools that can actually succeed. With a `LocalProvider` (stdio and CLI
59
- * flows) all 19 tools remain registered — behavior there is unchanged.
59
+ * flows) all 22 core tools remain registered — behavior there is unchanged.
60
60
  */
61
61
  declare function createServer(projectRoot: string): McpServer;
62
62
  declare function createServer(opts: CreateServerOptions): McpServer;
63
63
  //#endregion
64
64
  export { createServer as i, DEFAULT_INSTRUCTIONS as n, ToolProvider as r, CreateServerOptions as t };
65
- //# sourceMappingURL=server-24UHN9Ll.d.mts.map
65
+ //# sourceMappingURL=server-CQKCQ8H_.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"server-24UHN9Ll.d.mts","names":[],"sources":["../src/server.ts"],"mappings":";;;;;;AAaA;;;;;KAAY,YAAA,GAAe,YAAA;;;;;AA6B3B;cAVa,oBAAA;AAAA,UAUI,mBAAA;EAOQ;;;;;;EAAvB,QAAA,GAAW,YAAA;EAuEG;;;;;AAChB;EAjEE,WAAA;;;;;;EAMA,YAAA;AAAA;;;;;;;;;;;;;;;;;;;;;iBA0Dc,YAAA,CAAa,WAAA,WAAsB,SAAA;AAAA,iBACnC,YAAA,CAAa,IAAA,EAAM,mBAAA,GAAsB,SAAA"}
1
+ {"version":3,"file":"server-CQKCQ8H_.d.mts","names":[],"sources":["../src/server.ts"],"mappings":";;;;;;AAaA;;;;;KAAY,YAAA,GAAe,YAAA;;;;;AA6B3B;cAVa,oBAAA;AAAA,UAUI,mBAAA;EAOQ;;;;;;EAAvB,QAAA,GAAW,YAAA;EAuEG;;;;;AAChB;EAjEE,WAAA;;;;;;EAMA,YAAA;AAAA;;;;;;;;;;;;;;;;;;;;;iBA0Dc,YAAA,CAAa,WAAA,WAAsB,SAAA;AAAA,iBACnC,YAAA,CAAa,IAAA,EAAM,mBAAA,GAAsB,SAAA"}
@@ -5,21 +5,21 @@ import { a as readJson, n as ensureDir, r as pathExists, s as writeJson, t as co
5
5
  import { a as writeMeta, i as readMeta, o as writeMetaEntries, r as mergeEntryMeta, t as applyStatusChange } from "./meta-manager-CSpKtjnP.mjs";
6
6
  import { t as OverlayReader } from "./overlay-reader-Bx1YxGXq.mjs";
7
7
  import { n as readVocabulary, t as readConfig } from "./config-BnNYu128.mjs";
8
- import { t as validateProject } from "./validator-S19GHR4V.mjs";
8
+ import { t as validateProject } from "./validator-mfCY3eea.mjs";
9
9
  import { r as createGit } from "./identity-CxAB9Qb8.mjs";
10
10
  import { r as resolveInitDefaultBranch, t as resolveBaseBranch } from "./base-branch-Cw9DWvCC.mjs";
11
11
  import { a as contentBranchRelation, c as listRemoteCrBranches, d as LOCAL_MODE_NOTE, f as localModeReason, i as cleanupMergedBranches, n as checkBranchHealth, o as deleteRemoteBranch, p as pushPolicy, u as pruneMergedRemoteBranches } from "./branch-lifecycle-D4DxPgQg.mjs";
12
- import { i as ensureContentBranch, n as buildBranchName, o as mergeBranch, r as createTransaction } from "./transaction-DnrUATJF.mjs";
13
- import { n as withReadScope, r as isMerged, t as LocalProvider } from "./local-CBtRYFH4.mjs";
12
+ import { i as ensureContentBranch, l as commitOptions, n as buildBranchName, o as mergeBranch, r as createTransaction, u as hookPolicy } from "./transaction-DCDf0y0T.mjs";
13
+ import { n as withReadScope, r as isMerged, t as LocalProvider } from "./local-CCVjLKy2.mjs";
14
14
  import { n as isToolAvailable, t as TOOL_REQUIREMENTS } from "./availability-CO8Xfx3w.mjs";
15
15
  import { t as detectStack } from "./detect-B1QHYA0u.mjs";
16
16
  import { t as TOOL_ANNOTATIONS } from "./annotations-BYkjoj2d.mjs";
17
17
  import { n as listTemplates, t as getTemplate } from "./templates-Dn-iZyzp.mjs";
18
- import { t as normalizeOperationError } from "./errors-De8Noahk.mjs";
19
- import { t as reconcileBranches } from "./reconcile-DSflMfhj.mjs";
18
+ import { t as normalizeOperationError } from "./errors-Cp6_Hlws.mjs";
19
+ import { t as reconcileBranches } from "./reconcile-B7w5gow1.mjs";
20
20
  import { t as buildGraph } from "./graph-builder-BPhi-1KH.mjs";
21
21
  import { n as scanSummary, t as scanCandidates } from "./scanner-0sc_pARB.mjs";
22
- import { n as applyExtract, r as applyReuse } from "./apply-manager-B-O3eAbz.mjs";
22
+ import { n as applyExtract, r as applyReuse } from "./apply-manager-DfLr1Q-T.mjs";
23
23
  import { t as runDoctor } from "./doctor-Br1NqEl2.mjs";
24
24
  import { join } from "node:path";
25
25
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
@@ -484,12 +484,16 @@ const COMMIT_AUTHOR = {
484
484
  * hand-rolled literals, so `base_advance`/`remote_push` cannot drift between
485
485
  * tools. Both fields appear only when the provider reported them (local
486
486
  * auto-merge) — remote/review responses keep their previous shape.
487
+ * `base_branch` is the resolved base branch of a local write (#509): where an
488
+ * auto-merge lands and, unless pushing is off, what is pushed. It may differ
489
+ * from the checked-out branch; the write's warning says so when it does.
487
490
  */
488
491
  function gitReport(input) {
489
492
  return {
490
493
  branch: input.branch,
491
494
  action: input.action,
492
495
  commit: input.commit,
496
+ ...input.base_branch ? { base_branch: input.base_branch } : {},
493
497
  ...input.sync ? { sync: input.sync } : {},
494
498
  ...input.base_advance ? { base_advance: input.base_advance } : {},
495
499
  ...input.remote_push ? { remote_push: input.remote_push } : {},
@@ -550,7 +554,8 @@ async function commitThroughProvider(provider, input) {
550
554
  sync: result.sync,
551
555
  warning: result.warning,
552
556
  base_advance: result.base_advance,
553
- remote_push: result.remote_push
557
+ remote_push: result.remote_push,
558
+ ...result.base_branch ? { base_branch: result.base_branch } : {}
554
559
  };
555
560
  }
556
561
  const allChanges = changes.toSorted((a, b) => a.path.localeCompare(b.path));
@@ -595,10 +600,7 @@ function registerSetupTools(server, _provider, projectRoot) {
595
600
  "-n",
596
601
  "1",
597
602
  "--all"
598
- ]).then((out) => out.trim().length > 0).catch(() => false)) await git.commit("initial commit", {
599
- "--allow-empty": null,
600
- "--no-verify": null
601
- });
603
+ ]).then((out) => out.trim().length > 0).catch(() => false)) await git.commit("initial commit", commitOptions(hookPolicy(await readConfig(projectRoot)), { "--allow-empty": null }));
602
604
  const initHealth = await checkBranchHealth(projectRoot);
603
605
  if (initHealth.blocked) return {
604
606
  content: [{
@@ -693,7 +695,8 @@ function registerSetupTools(server, _provider, projectRoot) {
693
695
  commit: gitResult.commit,
694
696
  sync: gitResult.sync,
695
697
  base_advance: gitResult.base_advance,
696
- remote_push: gitResult.remote_push
698
+ remote_push: gitResult.remote_push,
699
+ base_branch: gitResult.base_branch
697
700
  }),
698
701
  ...gitResult.warning ? { warning: gitResult.warning } : {},
699
702
  next_steps: ["Create models with contentrain_model_save or contentrain_scaffold", "Use contentrain_scan to find hardcoded strings"]
@@ -800,7 +803,8 @@ function registerSetupTools(server, _provider, projectRoot) {
800
803
  commit: gitResult.commit,
801
804
  sync: gitResult.sync,
802
805
  base_advance: gitResult.base_advance,
803
- remote_push: gitResult.remote_push
806
+ remote_push: gitResult.remote_push,
807
+ base_branch: gitResult.base_branch
804
808
  }),
805
809
  ...gitResult.warning ? { warning: gitResult.warning } : {},
806
810
  context_updated: true,
@@ -1032,7 +1036,8 @@ function registerModelTools(server, provider, projectRoot) {
1032
1036
  commit: commit.commitSha,
1033
1037
  sync: commit.sync,
1034
1038
  base_advance: commit.base_advance,
1035
- remote_push: commit.remote_push
1039
+ remote_push: commit.remote_push,
1040
+ base_branch: commit.base_branch
1036
1041
  }),
1037
1042
  ...commit.warning ? { warning: commit.warning } : {},
1038
1043
  context_updated: true,
@@ -1115,7 +1120,8 @@ function registerModelTools(server, provider, projectRoot) {
1115
1120
  commit: commit.commitSha,
1116
1121
  sync: commit.sync,
1117
1122
  base_advance: commit.base_advance,
1118
- remote_push: commit.remote_push
1123
+ remote_push: commit.remote_push,
1124
+ base_branch: commit.base_branch
1119
1125
  }),
1120
1126
  ...commit.warning ? { warning: commit.warning } : {},
1121
1127
  files_removed: deletePlan.result,
@@ -1288,7 +1294,8 @@ function registerContentTools(server, provider, projectRoot) {
1288
1294
  commit: commit.commitSha,
1289
1295
  sync: commit.sync,
1290
1296
  base_advance: commit.base_advance,
1291
- remote_push: commit.remote_push
1297
+ remote_push: commit.remote_push,
1298
+ base_branch: commit.base_branch
1292
1299
  }),
1293
1300
  ...commit.warning ? { warning: commit.warning } : {},
1294
1301
  ...allAdvisories.length > 0 ? {
@@ -1395,7 +1402,8 @@ function registerContentTools(server, provider, projectRoot) {
1395
1402
  commit: commit.commitSha,
1396
1403
  sync: commit.sync,
1397
1404
  base_advance: commit.base_advance,
1398
- remote_push: commit.remote_push
1405
+ remote_push: commit.remote_push,
1406
+ base_branch: commit.base_branch
1399
1407
  }),
1400
1408
  ...commit.warning ? { warning: commit.warning } : {},
1401
1409
  context_updated: true,
@@ -1563,6 +1571,7 @@ function registerVocabularyTools(server, provider) {
1563
1571
  total_terms: plan.result.total,
1564
1572
  commit: commit.commitSha,
1565
1573
  workflow_action: commit.workflowAction,
1574
+ ...commit.base_branch ? { base_branch: commit.base_branch } : {},
1566
1575
  ...commit.base_advance ? { base_advance: commit.base_advance } : {},
1567
1576
  ...commit.remote_push ? { remote_push: commit.remote_push } : {},
1568
1577
  ...commit.remote_push === "disabled" ? { remote_note: LOCAL_MODE_NOTE } : {},
@@ -1639,6 +1648,7 @@ function registerVocabularyTools(server, provider) {
1639
1648
  total_terms: plan.result.total,
1640
1649
  commit: commit.commitSha,
1641
1650
  workflow_action: commit.workflowAction,
1651
+ ...commit.base_branch ? { base_branch: commit.base_branch } : {},
1642
1652
  ...commit.base_advance ? { base_advance: commit.base_advance } : {},
1643
1653
  ...commit.remote_push ? { remote_push: commit.remote_push } : {},
1644
1654
  ...commit.remote_push === "disabled" ? { remote_note: LOCAL_MODE_NOTE } : {},
@@ -1761,7 +1771,8 @@ function registerWorkflowTools(server, provider, projectRoot) {
1761
1771
  commit: gitResult.commit,
1762
1772
  sync: gitResult.sync,
1763
1773
  base_advance: gitResult.base_advance,
1764
- remote_push: gitResult.remote_push
1774
+ remote_push: gitResult.remote_push,
1775
+ base_branch: gitResult.base_branch
1765
1776
  }),
1766
1777
  ...gitResult.warning ? { warning: gitResult.warning } : {},
1767
1778
  context_updated: true,
@@ -1988,6 +1999,7 @@ function registerWorkflowTools(server, provider, projectRoot) {
1988
1999
  branch: targetBranch,
1989
2000
  action: result.action,
1990
2001
  commit: result.commit,
2002
+ base_branch: result.base_branch,
1991
2003
  sync: result.sync,
1992
2004
  base_advance: result.base_advance,
1993
2005
  remote_push: result.remote_push,
@@ -2632,7 +2644,8 @@ function registerBulkTools(server, _provider, projectRoot) {
2632
2644
  commit: gitResult.commit,
2633
2645
  sync: gitResult.sync,
2634
2646
  base_advance: gitResult.base_advance,
2635
- remote_push: gitResult.remote_push
2647
+ remote_push: gitResult.remote_push,
2648
+ base_branch: gitResult.base_branch
2636
2649
  }),
2637
2650
  ...gitResult.warning ? { warning: gitResult.warning } : {},
2638
2651
  ...divergenceNextSteps(gitResult).length > 0 ? { next_steps: divergenceNextSteps(gitResult) } : {},
@@ -2814,7 +2827,8 @@ function registerBulkTools(server, _provider, projectRoot) {
2814
2827
  commit: gitResult.commit,
2815
2828
  sync: gitResult.sync,
2816
2829
  base_advance: gitResult.base_advance,
2817
- remote_push: gitResult.remote_push
2830
+ remote_push: gitResult.remote_push,
2831
+ base_branch: gitResult.base_branch
2818
2832
  }),
2819
2833
  ...gitResult.warning ? { warning: gitResult.warning } : {},
2820
2834
  ...divergenceNextSteps(gitResult).length > 0 ? { next_steps: divergenceNextSteps(gitResult) } : {},
@@ -2907,7 +2921,8 @@ function registerBulkTools(server, _provider, projectRoot) {
2907
2921
  commit: gitResult.commit,
2908
2922
  sync: gitResult.sync,
2909
2923
  base_advance: gitResult.base_advance,
2910
- remote_push: gitResult.remote_push
2924
+ remote_push: gitResult.remote_push,
2925
+ base_branch: gitResult.base_branch
2911
2926
  }),
2912
2927
  ...gitResult.warning ? { warning: gitResult.warning } : {},
2913
2928
  ...divergenceNextSteps(gitResult).length > 0 ? { next_steps: divergenceNextSteps(gitResult) } : {},
@@ -3080,7 +3095,7 @@ function registerMediaTools(server, provider, _projectRoot) {
3080
3095
  }
3081
3096
  //#endregion
3082
3097
  //#region package.json
3083
- var version = "3.10.0";
3098
+ var version = "3.11.0";
3084
3099
  //#endregion
3085
3100
  //#region src/server.ts
3086
3101
  /**
@@ -3157,4 +3172,4 @@ function resolveServerContext(input) {
3157
3172
  //#endregion
3158
3173
  export { createServer as n, DEFAULT_INSTRUCTIONS as t };
3159
3174
 
3160
- //# sourceMappingURL=server-CJbmjX48.mjs.map
3175
+ //# sourceMappingURL=server-tPKMBPdS.mjs.map