@hanna84/mcp-writing 2.12.4 → 2.12.6
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 +20 -0
- package/async-jobs.js +1 -218
- package/async-progress.js +1 -1
- package/helpers.js +2 -2
- package/importer.js +1 -448
- package/index.js +1 -501
- package/metadata-lint.js +1 -468
- package/package.json +32 -2
- package/runtime-diagnostics.js +1 -97
- package/scene-character-batch.js +1 -246
- package/scene-character-normalization.js +1 -199
- package/scripts/async-job-runner.mjs +3 -3
- package/scripts/generate-tool-docs.mjs +21 -3
- package/scripts/import.js +1 -1
- package/scripts/lint-metadata.mjs +1 -1
- package/scripts/manual-scrivener-realtest.mjs +3 -3
- package/scripts/merge-scrivx.js +2 -2
- package/scripts/new-world-entity.js +2 -2
- package/scripts/normalize-scene-characters.mjs +3 -3
- package/scripts/profile-review-bundles.mjs +1 -1
- package/scrivener-direct.js +1 -843
- package/src/index.js +502 -0
- package/src/runtime/async-jobs.js +218 -0
- package/src/runtime/async-progress.js +1 -0
- package/src/runtime/runtime-diagnostics.js +97 -0
- package/src/sync/importer.js +448 -0
- package/src/sync/metadata-lint.js +468 -0
- package/src/sync/scene-character-batch.js +246 -0
- package/src/sync/scene-character-normalization.js +199 -0
- package/src/sync/scrivener-direct.js +843 -0
- package/src/sync/sync.js +755 -0
- package/src/world/world-entity-templates.js +116 -0
- package/sync.js +1 -755
- package/tools/editing.js +1 -1
- package/tools/metadata.js +2 -2
- package/tools/review-bundles.js +1 -1
- package/tools/styleguide.js +1 -1
- package/tools/sync.js +2 -2
- package/world-entity-templates.js +1 -116
package/tools/editing.js
CHANGED
|
@@ -3,7 +3,7 @@ import fs from "node:fs";
|
|
|
3
3
|
import matter from "gray-matter";
|
|
4
4
|
import yaml from "js-yaml";
|
|
5
5
|
import { createSnapshot, listSnapshots } from "../git.js";
|
|
6
|
-
import { getFileWriteDiagnostics, readMeta, indexSceneFile } from "../sync.js";
|
|
6
|
+
import { getFileWriteDiagnostics, readMeta, indexSceneFile } from "../src/sync/sync.js";
|
|
7
7
|
|
|
8
8
|
function renderSceneContent(metadata, revisedProse) {
|
|
9
9
|
const hasFrontmatter = metadata && Object.keys(metadata).length > 0;
|
package/tools/metadata.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import fs from "node:fs";
|
|
3
3
|
import matter from "gray-matter";
|
|
4
|
-
import { readMeta, writeMeta, indexSceneFile, normalizeSceneMetaForPath } from "../sync.js";
|
|
5
|
-
import { validateProjectId, validateUniverseId } from "../importer.js";
|
|
4
|
+
import { readMeta, writeMeta, indexSceneFile, normalizeSceneMetaForPath } from "../src/sync/sync.js";
|
|
5
|
+
import { validateProjectId, validateUniverseId } from "../src/sync/importer.js";
|
|
6
6
|
|
|
7
7
|
export function registerMetadataTools(s, {
|
|
8
8
|
db,
|
package/tools/review-bundles.js
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
buildReviewBundlePlan,
|
|
8
8
|
createReviewBundleArtifacts,
|
|
9
9
|
} from "../review-bundles.js";
|
|
10
|
-
import { validateProjectId } from "../importer.js";
|
|
10
|
+
import { validateProjectId } from "../src/sync/importer.js";
|
|
11
11
|
import { getHeadCommitHash } from "../git.js";
|
|
12
12
|
|
|
13
13
|
export function registerReviewBundleTools(s, {
|
package/tools/styleguide.js
CHANGED
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
PROSE_STYLEGUIDE_SKILL_DIRNAME,
|
|
23
23
|
buildProseStyleguideSkill,
|
|
24
24
|
} from "../prose-styleguide-skill.js";
|
|
25
|
-
import { validateProjectId } from "../importer.js";
|
|
25
|
+
import { validateProjectId } from "../src/sync/importer.js";
|
|
26
26
|
|
|
27
27
|
export function registerStyleguideTools(s, {
|
|
28
28
|
db,
|
package/tools/sync.js
CHANGED
|
@@ -2,8 +2,8 @@ import { z } from "zod";
|
|
|
2
2
|
import fs from "node:fs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import matter from "gray-matter";
|
|
5
|
-
import { syncAll, writeMeta, readMeta, indexSceneFile, normalizeSceneMetaForPath } from "../sync.js";
|
|
6
|
-
import { importScrivenerSync, validateProjectId } from "../importer.js";
|
|
5
|
+
import { syncAll, writeMeta, readMeta, indexSceneFile, normalizeSceneMetaForPath } from "../src/sync/sync.js";
|
|
6
|
+
import { importScrivenerSync, validateProjectId } from "../src/sync/importer.js";
|
|
7
7
|
|
|
8
8
|
export function registerSyncTools(s, {
|
|
9
9
|
db,
|
|
@@ -1,116 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
return str
|
|
3
|
-
.toLowerCase()
|
|
4
|
-
.replace(/[^a-z0-9]+/g, "-")
|
|
5
|
-
.replace(/^-+|-+$/g, "")
|
|
6
|
-
.slice(0, 60);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export function renderCharacterSheetTemplate(name) {
|
|
10
|
-
return [
|
|
11
|
-
`# ${name}`,
|
|
12
|
-
"",
|
|
13
|
-
"## Core Identity",
|
|
14
|
-
"",
|
|
15
|
-
"- Age:",
|
|
16
|
-
"- Location:",
|
|
17
|
-
"- Occupation:",
|
|
18
|
-
"",
|
|
19
|
-
"## Role In Story",
|
|
20
|
-
"",
|
|
21
|
-
"What narrative function does this character serve?",
|
|
22
|
-
"",
|
|
23
|
-
"## Primary Goal",
|
|
24
|
-
"",
|
|
25
|
-
"What does this character want, at least at the start?",
|
|
26
|
-
"",
|
|
27
|
-
"## Physical Description",
|
|
28
|
-
"",
|
|
29
|
-
"What should remain visually consistent on the page?",
|
|
30
|
-
"",
|
|
31
|
-
"## Personality",
|
|
32
|
-
"",
|
|
33
|
-
"Core traits, temperament, social presence, and emotional texture.",
|
|
34
|
-
"",
|
|
35
|
-
"## Habits And Mannerisms",
|
|
36
|
-
"",
|
|
37
|
-
"Repeated behaviors, speech patterns, body language, or style cues.",
|
|
38
|
-
"",
|
|
39
|
-
"## Background",
|
|
40
|
-
"",
|
|
41
|
-
"Family, upbringing, education, and formative context.",
|
|
42
|
-
"",
|
|
43
|
-
"## Internal Conflict",
|
|
44
|
-
"",
|
|
45
|
-
"What fear, wound, contradiction, or need drives them internally?",
|
|
46
|
-
"",
|
|
47
|
-
"## External Conflict",
|
|
48
|
-
"",
|
|
49
|
-
"What pressures, antagonists, systems, or relationships oppose them?",
|
|
50
|
-
"",
|
|
51
|
-
"## Relationships",
|
|
52
|
-
"",
|
|
53
|
-
"Short notes on the most important relational dynamics.",
|
|
54
|
-
"",
|
|
55
|
-
"## Notes",
|
|
56
|
-
"",
|
|
57
|
-
`Anything important about ${name} that does not fit cleanly elsewhere.`,
|
|
58
|
-
"",
|
|
59
|
-
].join("\n");
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export function renderCharacterArcTemplate(name) {
|
|
63
|
-
return [
|
|
64
|
-
`# ${name} Arc`,
|
|
65
|
-
"",
|
|
66
|
-
"## Arc Premise",
|
|
67
|
-
"",
|
|
68
|
-
`How does ${name} change over the course of the story?`,
|
|
69
|
-
"",
|
|
70
|
-
"## Starting State",
|
|
71
|
-
"",
|
|
72
|
-
"Who are they at the opening, before the main pressure changes them?",
|
|
73
|
-
"",
|
|
74
|
-
"## Core Need Vs. Want",
|
|
75
|
-
"",
|
|
76
|
-
"- Want:",
|
|
77
|
-
"- Need:",
|
|
78
|
-
"",
|
|
79
|
-
"## Key Inflection Points",
|
|
80
|
-
"",
|
|
81
|
-
"1. Opening disturbance:",
|
|
82
|
-
"2. First meaningful choice:",
|
|
83
|
-
"3. Midpoint shift:",
|
|
84
|
-
"4. Crisis or moral fracture:",
|
|
85
|
-
"5. Climax choice:",
|
|
86
|
-
"6. Ending state:",
|
|
87
|
-
"",
|
|
88
|
-
"## Thematic Function",
|
|
89
|
-
"",
|
|
90
|
-
"What idea or question does this arc test?",
|
|
91
|
-
"",
|
|
92
|
-
"## Mirror Or Foil Characters",
|
|
93
|
-
"",
|
|
94
|
-
"- ",
|
|
95
|
-
"",
|
|
96
|
-
"## Notes",
|
|
97
|
-
"",
|
|
98
|
-
"Anything about the arc that is useful during revision.",
|
|
99
|
-
"",
|
|
100
|
-
].join("\n");
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
export function renderPlaceSheetTemplate(name) {
|
|
104
|
-
return [
|
|
105
|
-
`# ${name}`,
|
|
106
|
-
"",
|
|
107
|
-
"## Overview",
|
|
108
|
-
"",
|
|
109
|
-
"One-paragraph summary of why this location matters.",
|
|
110
|
-
"",
|
|
111
|
-
"## Atmosphere",
|
|
112
|
-
"",
|
|
113
|
-
"- ",
|
|
114
|
-
"",
|
|
115
|
-
].join("\n");
|
|
116
|
-
}
|
|
1
|
+
export * from "./src/world/world-entity-templates.js";
|