@hanna84/mcp-writing 3.1.0 → 3.1.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/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
+ #### [v3.1.1](https://github.com/hannasdev/mcp-writing.git
8
+ /compare/v3.1.0...v3.1.1)
9
+
10
+ - fix: surface runtime warning for invalid PROSE_STYLEGUIDE_ENFORCEMENT_MODE [`#167`](https://github.com/hannasdev/mcp-writing.git
11
+ /pull/167)
12
+
7
13
  #### [v3.1.0](https://github.com/hannasdev/mcp-writing.git
8
14
  /compare/v3.0.0...v3.1.0)
9
15
 
16
+ > 2 May 2026
17
+
10
18
  - feat(editing): enforce styleguide automatically in edit flow [`#166`](https://github.com/hannasdev/mcp-writing.git
11
19
  /pull/166)
20
+ - Release 3.1.0 [`ad1106c`](https://github.com/hannasdev/mcp-writing.git
21
+ /commit/ad1106ca4099777d9b05556dfd9cf75de4f030f1)
12
22
 
13
23
  ### [v3.0.0](https://github.com/hannasdev/mcp-writing.git
14
24
  /compare/v2.18.1...v3.0.0)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanna84/mcp-writing",
3
- "version": "3.1.0",
3
+ "version": "3.1.1",
4
4
  "description": "MCP service for AI-assisted reasoning and editing on long-form fiction projects",
5
5
  "homepage": "https://hannasdev.github.io/mcp-writing/",
6
6
  "type": "module",
package/src/index.js CHANGED
@@ -78,6 +78,7 @@ const STYLEGUIDE_ENFORCEMENT_MODE = STYLEGUIDE_ENFORCEMENT_MODE_RAW === "off"
78
78
  ? STYLEGUIDE_ENFORCEMENT_MODE_RAW
79
79
  : "warn";
80
80
  const OWNERSHIP_GUARD_MODE_RAW_DISPLAY = JSON.stringify(OWNERSHIP_GUARD_MODE_RAW);
81
+ const STYLEGUIDE_ENFORCEMENT_MODE_RAW_DISPLAY = JSON.stringify(STYLEGUIDE_ENFORCEMENT_MODE_RAW);
81
82
  const __filename = fileURLToPath(import.meta.url);
82
83
  const __dirname = path.dirname(__filename);
83
84
  const ROOT_DIR = path.resolve(__dirname, "..");
@@ -219,6 +220,9 @@ const RUNTIME_DIAGNOSTICS = getRuntimeDiagnostics({
219
220
  ownershipGuardModeRaw: OWNERSHIP_GUARD_MODE_RAW,
220
221
  ownershipGuardMode: OWNERSHIP_GUARD_MODE,
221
222
  ownershipGuardModeRawDisplay: OWNERSHIP_GUARD_MODE_RAW_DISPLAY,
223
+ styleguideEnforcementModeRaw: STYLEGUIDE_ENFORCEMENT_MODE_RAW,
224
+ styleguideEnforcementMode: STYLEGUIDE_ENFORCEMENT_MODE,
225
+ styleguideEnforcementModeRawDisplay: STYLEGUIDE_ENFORCEMENT_MODE_RAW_DISPLAY,
222
226
  syncDirWritable: SYNC_DIR_WRITABLE,
223
227
  syncDirAbs: SYNC_DIR_ABS,
224
228
  syncOwnershipDiagnostics: SYNC_OWNERSHIP_DIAGNOSTICS,
@@ -6,9 +6,12 @@
6
6
  * is straightforward to test.
7
7
  *
8
8
  * @param {object} opts
9
- * @param {string} opts.ownershipGuardModeRaw Raw env value before normalisation
9
+ * @param {string} opts.ownershipGuardModeRaw Trimmed/lowercased env token before enum validation
10
10
  * @param {string} opts.ownershipGuardMode Normalised value ("warn" | "fail")
11
11
  * @param {string} opts.ownershipGuardModeRawDisplay JSON.stringify of the raw value
12
+ * @param {string} opts.styleguideEnforcementModeRaw Trimmed/lowercased env token before enum validation
13
+ * @param {string} opts.styleguideEnforcementMode Normalised value ("off" | "warn" | "required")
14
+ * @param {string} opts.styleguideEnforcementModeRawDisplay JSON.stringify of the raw value
12
15
  * @param {boolean} opts.syncDirWritable
13
16
  * @param {string} opts.syncDirAbs Resolved absolute path shown in messages
14
17
  * @param {object} opts.syncOwnershipDiagnostics Result of getSyncOwnershipDiagnostics()
@@ -20,6 +23,9 @@ export function getRuntimeDiagnostics({
20
23
  ownershipGuardModeRaw,
21
24
  ownershipGuardMode,
22
25
  ownershipGuardModeRawDisplay,
26
+ styleguideEnforcementModeRaw,
27
+ styleguideEnforcementMode,
28
+ styleguideEnforcementModeRawDisplay,
23
29
  syncDirWritable,
24
30
  syncDirAbs,
25
31
  syncOwnershipDiagnostics,
@@ -36,6 +42,13 @@ export function getRuntimeDiagnostics({
36
42
  recommendations.push("Set OWNERSHIP_GUARD_MODE to either 'warn' or 'fail'.");
37
43
  }
38
44
 
45
+ if (styleguideEnforcementModeRaw !== styleguideEnforcementMode) {
46
+ warnings.push(
47
+ `STYLEGUIDE_ENFORCEMENT_MODE_INVALID: Unsupported PROSE_STYLEGUIDE_ENFORCEMENT_MODE=${styleguideEnforcementModeRawDisplay}. Falling back to 'warn'.`
48
+ );
49
+ recommendations.push("Set PROSE_STYLEGUIDE_ENFORCEMENT_MODE to one of 'off', 'warn', or 'required'.");
50
+ }
51
+
39
52
  if (syncOwnershipDiagnostics.runtime_uid_override_ignored) {
40
53
  warnings.push("RUNTIME_UID_OVERRIDE_IGNORED: RUNTIME_UID_OVERRIDE is ignored unless NODE_ENV=test or ALLOW_RUNTIME_UID_OVERRIDE=1.");
41
54
  recommendations.push("Avoid RUNTIME_UID_OVERRIDE in production runtime environments.");