@hanna84/mcp-writing 2.0.2 → 2.0.3
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 +10 -0
- package/metadata-lint.js +21 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,11 +4,21 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
+
#### [v2.0.3](https://github.com/hannasdev/mcp-writing.git
|
|
8
|
+
/compare/v2.0.2...v2.0.3)
|
|
9
|
+
|
|
10
|
+
- fix(metadata-lint): warn on mixed scene character reference styles [`#81`](https://github.com/hannasdev/mcp-writing.git
|
|
11
|
+
/pull/81)
|
|
12
|
+
|
|
7
13
|
#### [v2.0.2](https://github.com/hannasdev/mcp-writing.git
|
|
8
14
|
/compare/v2.0.1...v2.0.2)
|
|
9
15
|
|
|
16
|
+
> 25 April 2026
|
|
17
|
+
|
|
10
18
|
- fix(scene-character-batch): tighten precision-first character linking [`#80`](https://github.com/hannasdev/mcp-writing.git
|
|
11
19
|
/pull/80)
|
|
20
|
+
- Release 2.0.2 [`0ca5898`](https://github.com/hannasdev/mcp-writing.git
|
|
21
|
+
/commit/0ca58982799b64f115681948b19b4dc795095951)
|
|
12
22
|
|
|
13
23
|
#### [v2.0.1](https://github.com/hannasdev/mcp-writing.git
|
|
14
24
|
/compare/v2.0.0...v2.0.1)
|
package/metadata-lint.js
CHANGED
|
@@ -119,6 +119,23 @@ function validateUniqueArrays(meta, kind, issues) {
|
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
+
function validateSceneCharacterReferenceStyle(meta, issues) {
|
|
123
|
+
if (!Array.isArray(meta.characters) || meta.characters.length === 0) return;
|
|
124
|
+
|
|
125
|
+
if (!meta.characters.every(value => typeof value === "string")) return;
|
|
126
|
+
|
|
127
|
+
const hasCanonicalIds = meta.characters.some(value => /^char-/.test(String(value).trim()));
|
|
128
|
+
const hasNonCanonicalEntries = meta.characters.some(value => !/^char-/.test(String(value).trim()));
|
|
129
|
+
|
|
130
|
+
if (!hasCanonicalIds || !hasNonCanonicalEntries) return;
|
|
131
|
+
|
|
132
|
+
issues.push({
|
|
133
|
+
level: "warning",
|
|
134
|
+
code: "MIXED_CHARACTER_REFERENCE_STYLE",
|
|
135
|
+
message: "Scene characters contain mixed canonical and non-canonical references. Prefer canonical character_id values only.",
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
|
|
122
139
|
export function validateMetadataObject(meta, { sourcePath, kindHint } = {}) {
|
|
123
140
|
const issues = [];
|
|
124
141
|
const kind = metadataKindSchema.parse(kindHint ?? detectMetadataKind(meta));
|
|
@@ -168,6 +185,10 @@ export function validateMetadataObject(meta, { sourcePath, kindHint } = {}) {
|
|
|
168
185
|
|
|
169
186
|
validateUniqueArrays(meta, kind, issues);
|
|
170
187
|
|
|
188
|
+
if (kind === "scene") {
|
|
189
|
+
validateSceneCharacterReferenceStyle(meta, issues);
|
|
190
|
+
}
|
|
191
|
+
|
|
171
192
|
if (kind === "scene" && sourcePath) {
|
|
172
193
|
const sidecar = sourcePath.endsWith(".meta.yaml");
|
|
173
194
|
if (sidecar && !meta.scene_id) {
|