@contentrain/mcp 3.3.0 → 3.3.2
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
|
@@ -301,3 +301,10 @@ Full documentation at **[ai.contentrain.io/packages/mcp](https://ai.contentrain.
|
|
|
301
301
|
## License
|
|
302
302
|
|
|
303
303
|
MIT
|
|
304
|
+
|
|
305
|
+
### Runtime model configuration
|
|
306
|
+
|
|
307
|
+
Structural `contentrain_model_save` edits preserve existing top-level `form` and
|
|
308
|
+
`comments` blocks. These blocks belong to the runtime provider; the structural
|
|
309
|
+
tool does not enable or change them. Its response lists `preserved_blocks` when
|
|
310
|
+
configuration was carried forward.
|
package/dist/index.mjs
CHANGED
|
@@ -15,7 +15,7 @@ import "./transaction-BR2jg4uj.mjs";
|
|
|
15
15
|
import "./local-DbPlR0Br.mjs";
|
|
16
16
|
import "./detect-CI32ynpq.mjs";
|
|
17
17
|
import "./annotations-CXHPnS-M.mjs";
|
|
18
|
-
import { n as createServer } from "./server-
|
|
18
|
+
import { n as createServer } from "./server-CETqKFGZ.mjs";
|
|
19
19
|
import "./errors-BmLE-JSC.mjs";
|
|
20
20
|
import "./reconcile-EANDIp_T.mjs";
|
|
21
21
|
import "./scan-config-C5zzygeH.mjs";
|
|
@@ -14,7 +14,7 @@ import "../../transaction-BR2jg4uj.mjs";
|
|
|
14
14
|
import "../../local-DbPlR0Br.mjs";
|
|
15
15
|
import "../../detect-CI32ynpq.mjs";
|
|
16
16
|
import "../../annotations-CXHPnS-M.mjs";
|
|
17
|
-
import { n as createServer } from "../../server-
|
|
17
|
+
import { n as createServer } from "../../server-CETqKFGZ.mjs";
|
|
18
18
|
import "../../errors-BmLE-JSC.mjs";
|
|
19
19
|
import "../../reconcile-EANDIp_T.mjs";
|
|
20
20
|
import "../../scan-config-C5zzygeH.mjs";
|
|
@@ -22,7 +22,7 @@ import { n as applyExtract, r as applyReuse } from "./apply-manager-eZ6zA99Y.mjs
|
|
|
22
22
|
import { t as runDoctor } from "./doctor-VnOzDTbk.mjs";
|
|
23
23
|
import { join } from "node:path";
|
|
24
24
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
25
|
-
import { CONTENTRAIN_BRANCH } from "@contentrain/types";
|
|
25
|
+
import { CONTENTRAIN_BRANCH, MODEL_EXTENSION_KEYS } from "@contentrain/types";
|
|
26
26
|
import { appendFile, readFile, writeFile } from "node:fs/promises";
|
|
27
27
|
import { z } from "zod";
|
|
28
28
|
import "simple-git";
|
|
@@ -902,7 +902,8 @@ function registerModelTools(server, provider, projectRoot) {
|
|
|
902
902
|
}],
|
|
903
903
|
isError: true
|
|
904
904
|
};
|
|
905
|
-
const
|
|
905
|
+
const existing = await readModel(provider, input.id);
|
|
906
|
+
const { errors, warnings: schemaWarnings } = validateModel(input, { existingFieldPaths: collectFieldPaths(existing?.fields) });
|
|
906
907
|
if (errors.length > 0) return {
|
|
907
908
|
content: [{
|
|
908
909
|
type: "text",
|
|
@@ -944,6 +945,14 @@ function registerModelTools(server, provider, projectRoot) {
|
|
|
944
945
|
content_path: input.content_path,
|
|
945
946
|
locale_strategy: input.locale_strategy
|
|
946
947
|
};
|
|
948
|
+
const preserved = [];
|
|
949
|
+
for (const key of MODEL_EXTENSION_KEYS) {
|
|
950
|
+
const block = existing?.[key];
|
|
951
|
+
if (block !== void 0) {
|
|
952
|
+
model[key] = block;
|
|
953
|
+
preserved.push(key);
|
|
954
|
+
}
|
|
955
|
+
}
|
|
947
956
|
const savePlan = await planModelSave(provider, { model });
|
|
948
957
|
const action = savePlan.result.action;
|
|
949
958
|
const branch = buildBranchName("model", input.id);
|
|
@@ -991,6 +1000,7 @@ function registerModelTools(server, provider, projectRoot) {
|
|
|
991
1000
|
errors: []
|
|
992
1001
|
},
|
|
993
1002
|
...schemaWarnings.length > 0 ? { schema_warnings: schemaWarnings } : {},
|
|
1003
|
+
...preserved.length > 0 ? { preserved_blocks: preserved } : {},
|
|
994
1004
|
git: gitReport({
|
|
995
1005
|
branch,
|
|
996
1006
|
action: commit.workflowAction,
|
|
@@ -3012,7 +3022,7 @@ function registerMediaTools(server, provider, _projectRoot) {
|
|
|
3012
3022
|
}
|
|
3013
3023
|
//#endregion
|
|
3014
3024
|
//#region package.json
|
|
3015
|
-
var version = "3.3.
|
|
3025
|
+
var version = "3.3.2";
|
|
3016
3026
|
//#endregion
|
|
3017
3027
|
//#region src/server.ts
|
|
3018
3028
|
/**
|
|
@@ -3087,4 +3097,4 @@ function resolveServerContext(input) {
|
|
|
3087
3097
|
//#endregion
|
|
3088
3098
|
export { createServer as n, DEFAULT_INSTRUCTIONS as t };
|
|
3089
3099
|
|
|
3090
|
-
//# sourceMappingURL=server-
|
|
3100
|
+
//# sourceMappingURL=server-CETqKFGZ.mjs.map
|