dsh-openwrite 0.2.27 → 0.2.33

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 (130) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +55 -6
  3. package/THIRD_PARTY_NOTICES.md +4 -3
  4. package/companions.mjs +508 -0
  5. package/cordis.patch.yml +0 -2
  6. package/docs/CLOSED_ISSUE_FOLLOWUPS.md +5 -3
  7. package/docs/COMPANION_PLUGINS.md +142 -0
  8. package/docs/CONTEXT_SLOTS.md +60 -0
  9. package/docs/COST_MEASUREMENT.md +2 -2
  10. package/docs/DEVELOPMENT.md +6 -11
  11. package/docs/DSH_STORE.md +14 -2
  12. package/docs/EDITOR_SAFETY_REPAIRS.md +17 -0
  13. package/docs/INSTALL.md +112 -4
  14. package/docs/ISSUES_121_123.md +97 -0
  15. package/docs/ISSUES_140_142.md +58 -0
  16. package/docs/ISSUES_149_150_151.md +77 -0
  17. package/docs/ISSUES_98_100.md +2 -0
  18. package/docs/ISSUE_123_FOLLOWUP.md +55 -0
  19. package/docs/ISSUE_146_REVIEW_EVIDENCE.md +53 -0
  20. package/docs/LEARNING.md +1 -1
  21. package/docs/MOBILE_READINESS.md +62 -0
  22. package/docs/PLUGIN_MAINTENANCE.md +1 -3
  23. package/docs/RELEASE_ACCEPTANCE.md +90 -3
  24. package/docs/REVIEW_ROUND_22.md +67 -0
  25. package/docs/REVIEW_ROUND_23.md +48 -0
  26. package/docs/REVIEW_ROUND_25.md +51 -0
  27. package/docs/SELECTION_UPGRADE_REPAIRS.md +16 -0
  28. package/docs/TOOLS.md +933 -0
  29. package/docs/WORKFLOWS.md +5 -5
  30. package/package.json +18 -21
  31. package/packages/openwrite-bridge/lib/client.d.ts +0 -1
  32. package/packages/openwrite-bridge/lib/client.js +90 -9
  33. package/packages/openwrite-bridge/lib/contracts-generated.js +2 -1
  34. package/packages/openwrite-bridge/lib/dog-delivery.d.ts +1 -0
  35. package/packages/openwrite-bridge/lib/dog-delivery.js +10 -4
  36. package/packages/openwrite-bridge/lib/dog-review.js +15 -3
  37. package/packages/openwrite-bridge/lib/domain.d.ts +27 -0
  38. package/packages/openwrite-bridge/lib/domain.js +250 -29
  39. package/packages/openwrite-bridge/lib/host-llm.d.ts +188 -0
  40. package/packages/openwrite-bridge/lib/host-llm.js +657 -0
  41. package/packages/openwrite-bridge/lib/host-web.d.ts +61 -0
  42. package/packages/openwrite-bridge/lib/host-web.js +166 -0
  43. package/packages/openwrite-bridge/lib/index.d.ts +4 -0
  44. package/packages/openwrite-bridge/lib/index.js +150 -6
  45. package/packages/openwrite-bridge/lib/managed-runtime.d.ts +47 -2
  46. package/packages/openwrite-bridge/lib/managed-runtime.js +179 -35
  47. package/packages/openwrite-bridge/lib/tool-policy.js +39 -12
  48. package/packages/openwrite-bridge/lib/tools.js +1238 -1219
  49. package/packages/openwrite-bridge/package.json +7 -5
  50. package/packages/studio-panel/lib/client.js +116667 -114773
  51. package/packages/studio-panel/lib/client.js.map +1 -1
  52. package/packages/studio-panel/lib/types/client/LaunchOpenWrite.d.ts +10 -0
  53. package/packages/studio-panel/lib/types/client/ModelView.d.ts +28 -4
  54. package/packages/studio-panel/lib/types/client/OpenWriteSettings.d.ts +64 -0
  55. package/packages/studio-panel/lib/types/client/SceneWorkbench.d.ts +2 -0
  56. package/packages/studio-panel/lib/types/client/SearchSettings.d.ts +2 -0
  57. package/packages/studio-panel/lib/types/client/SerialWritingView.d.ts +2 -1
  58. package/packages/studio-panel/lib/types/client/TurnMutationSummary.d.ts +2 -0
  59. package/packages/studio-panel/lib/types/client/VditorBody.d.ts +8 -2
  60. package/packages/studio-panel/lib/types/client/api.d.ts +41 -2
  61. package/packages/studio-panel/lib/types/client/browser-download.d.ts +4 -0
  62. package/packages/studio-panel/lib/types/client/companions.d.ts +46 -0
  63. package/packages/studio-panel/lib/types/client/dto.d.ts +22 -0
  64. package/packages/studio-panel/lib/types/client/locales.d.ts +1 -1
  65. package/packages/studio-panel/lib/types/client/manuscript-annotations.d.ts +2 -1
  66. package/packages/studio-panel/lib/types/client/manuscript-overlay.d.ts +2 -1
  67. package/packages/studio-panel/lib/types/client/manuscript-selection.d.ts +18 -5
  68. package/packages/studio-panel/lib/types/client/selection-coordinates.d.ts +15 -0
  69. package/packages/studio-panel/lib/types/client/workspace-chrome.d.ts +41 -0
  70. package/packages/studio-panel/package.json +5 -3
  71. package/plugin.mjs +159 -20
  72. package/preset-definition.mjs +144 -4
  73. package/presets/openwrite/agent.cordis.yml +7 -9
  74. package/presets/openwrite/ops-integration.mjs +28 -0
  75. package/presets/openwrite/preset.yml +2 -1
  76. package/presets/openwrite/skills/canon/SKILL.md +3 -3
  77. package/presets/openwrite/skills/delivery-artifact-query/SKILL.md +41 -0
  78. package/presets/openwrite/skills/dialoguequality/SKILL.md +16 -17
  79. package/presets/openwrite/skills/dog-delivery-verification/SKILL.md +113 -0
  80. package/presets/openwrite/skills/export-book/SKILL.md +3 -3
  81. package/presets/openwrite/skills/foreshadow/SKILL.md +1 -1
  82. package/presets/openwrite/skills/foreshadowing-system/SKILL.md +16 -25
  83. package/presets/openwrite/skills/import-artifact-query/SKILL.md +30 -0
  84. package/presets/openwrite/skills/learn/SKILL.md +3 -3
  85. package/presets/openwrite/skills/novel-creator/SKILL.md +10 -10
  86. package/presets/openwrite/skills/novel-reviewer/SKILL.md +11 -11
  87. package/presets/openwrite/skills/progress/SKILL.md +1 -1
  88. package/presets/openwrite/skills/review-artifact-query/SKILL.md +41 -0
  89. package/presets/openwrite/skills/review-chapter/SKILL.md +2 -2
  90. package/presets/openwrite/skills/revise-span/SKILL.md +5 -5
  91. package/presets/openwrite/skills/style-system/SKILL.md +13 -6
  92. package/presets/openwrite/skills/truth-validation/SKILL.md +9 -12
  93. package/presets/openwrite/skills/workflow-manager/SKILL.md +13 -13
  94. package/presets/openwrite/skills/world-query/SKILL.md +16 -11
  95. package/presets/openwrite/skills/write-next/SKILL.md +1 -1
  96. package/release/{openwrite-5.8.16-py3-none-any.whl → openwrite-5.8.30-py3-none-any.whl} +0 -0
  97. package/release/runtime-manifest.json +4 -12
  98. package/release/source.json +21 -21
  99. package/release/wheels/licenses/OPENSSL-3.6.3-LICENSE.txt +225 -0
  100. package/scripts/maintenance.mjs +67 -7
  101. package/scripts/plugin-doctor.mjs +179 -0
  102. package/scripts/prepare.mjs +11 -2
  103. package/scripts/safe-upgrade.mjs +141 -13
  104. package/dog-tools.mjs +0 -11
  105. package/presets/openwrite/skills/dog-delivery-query/SKILL.md +0 -42
  106. package/presets/openwrite/skills/dog-import-query/SKILL.md +0 -29
  107. package/presets/openwrite/skills/dog-review-query/SKILL.md +0 -42
  108. package/scripts/dog/delivery-stage.js +0 -32
  109. package/scripts/dog/import-chapter.js +0 -20
  110. package/scripts/dog/import-record.js +0 -35
  111. package/scripts/dog/review-dimension.js +0 -41
  112. package/scripts/dog/review-record.js +0 -42
  113. package/vendor/dsh-dog/LICENSE +0 -29
  114. package/vendor/dsh-dog/README.md +0 -114
  115. package/vendor/dsh-dog/UPSTREAM.md +0 -30
  116. package/vendor/dsh-dog/cordis.patch.yml +0 -14
  117. package/vendor/dsh-dog/lib/client.js +0 -2960
  118. package/vendor/dsh-dog/lib/client.js.map +0 -1
  119. package/vendor/dsh-dog/lib/core-BAlgZpLq.js +0 -2074
  120. package/vendor/dsh-dog/lib/core-BiEBMLz3.d.ts +0 -495
  121. package/vendor/dsh-dog/lib/core.d.ts +0 -2
  122. package/vendor/dsh-dog/lib/core.js +0 -2
  123. package/vendor/dsh-dog/lib/index.d.ts +0 -143
  124. package/vendor/dsh-dog/lib/index.js +0 -1279
  125. package/vendor/dsh-dog/package.json +0 -110
  126. package/vendor/dsh-dog/schemas/schema-0.2/graph.schema.json +0 -139
  127. package/vendor/dsh-dog/schemas/schema-0.2/report.schema.json +0 -87
  128. package/vendor/dsh-dog/schemas/schema-0.2/run.schema.json +0 -259
  129. package/vendor/dsh-dog/schemas/schema-0.2/runtime-event.schema.json +0 -105
  130. package/vendor/dsh-dog/schemas/schema-0.2/verification.schema.json +0 -40
package/docs/TOOLS.md ADDED
@@ -0,0 +1,933 @@
1
+ # 小说工具参考
2
+
3
+ 本候选共 56 个 novel_* 工具。由 tools.ts 的注册定义生成;说明与参数保留实际 schema 原文,避免手册与接口漂移。用浏览器或编辑器搜索工具名即可定位。
4
+
5
+ ## 先选入口
6
+
7
+ - 看当前作品:`novel_status`;查文件:`novel_doc(action="read"`;看本章输入:`novel_context_preview`。上下文来源与预算见 [上下文槽位](CONTEXT_SLOTS.md)。
8
+ - 修改大纲/设定/创作罗盘:先用 `novel_change_plan`(action="structured")预览并核对;只有作者已明确授权的精确变更才使用兼容的直接写入工具,如 `novel_focus`。
9
+ - 正文确认:`novel_manuscript_acceptance {}` 只读查 operation_id,核对影响后用 `novel_manuscript_acceptance_reconcile {"action":"acknowledge","operation_id":"实际返回值","confirm":true}` 确认;这不会补跑结算或审稿。
10
+ - 结算缺失:核对目标章节后使用 `novel_settle_backfill {"chapter_ids":["ch_001"],"only_missing":true}`,再查返回任务;会调用模型并写入记忆/运行态资料,不重写正文。不要把 canon 未定论一律解释为缺结算。
11
+ - 模型与嵌入:Chat 与 Embedding 档案独立;配置不等于连接成功。`novel_model_profiles(action="list"`(action="test")/ `novel_embedding_profiles(action="list"`(action="test")会实际请求提供方,可能计费。
12
+ - 写章返回 task_id 后用 `novel_task`(action="get")查询;取消用 action="cancel"。超时/网络错误后先查任务与运行,避免重复提交。
13
+
14
+ ## 参数和错误
15
+
16
+ 必填项是 schema 的静态必填;action 描述里的条件必填也要满足。JSON 参数传对象或数组,不要传 Markdown 代码块。章节 ID 使用 ch_数字。文档写入先读当前 version,大纲变更使用当前 revision;冲突时重读并重新预览。
17
+
18
+ 参数错误会在请求前或服务端拒绝并说明原因;服务端错误提供 code/message/status/details/request_id。这里只读/会操作按执行路径保守分类:POST 也可能是预览或查询,GET 后的导出/审稿辅助操作也可能落盘;请同时看 action 和下面的完整说明。
19
+
20
+ ## 工具索引
21
+
22
+ | 工具 | 影响 | 必填参数 |
23
+ | --- | --- | --- |
24
+ | [novel_arc_reconcile](#novel_arc_reconcile) | 会提交操作或保存文件;具体取决于 action/参数 | `data` |
25
+ | [novel_assets](#novel_assets) | 会提交操作或保存文件;具体取决于 action/参数 | `action` |
26
+ | [novel_assets_package](#novel_assets_package) | 会提交操作或保存文件;具体取决于 action/参数 | `action` |
27
+ | [novel_change_plan](#novel_change_plan) | 会提交操作或保存文件;具体取决于 action/参数 | `action` |
28
+ | [novel_chapter_delete](#novel_chapter_delete) | 会提交操作或保存文件;具体取决于 action/参数 | `path`, `confirm`, `version` |
29
+ | [novel_chapter_delete_batch](#novel_chapter_delete_batch) | 会提交操作或保存文件;具体取决于 action/参数 | `keep_through`, `confirm`, `version` |
30
+ | [novel_chapter_run_action](#novel_chapter_run_action) | 会提交操作或保存文件;具体取决于 action/参数 | `action` |
31
+ | [novel_chapter_scenes](#novel_chapter_scenes) | 会提交操作或保存文件;具体取决于 action/参数 | `chapter_id` |
32
+ | [novel_chapter_work](#novel_chapter_work) | 会提交操作或保存文件;具体取决于 action/参数 | `chapter_id` |
33
+ | [novel_context_preview](#novel_context_preview) | 会提交操作或保存文件;具体取决于 action/参数 | 无 |
34
+ | [novel_continuity](#novel_continuity) | 会提交操作或保存文件;具体取决于 action/参数 | 无 |
35
+ | [novel_diagnostics](#novel_diagnostics) | 会提交操作或保存文件;具体取决于 action/参数 | 无 |
36
+ | [novel_doc](#novel_doc) | 会提交操作或保存文件;具体取决于 action/参数 | `action` |
37
+ | [novel_drift_entry](#novel_drift_entry) | 会提交操作或保存文件;具体取决于 action/参数 | `group_id`, `chapter_id`, `kind`, `impact`, `note`, `expected_revision` |
38
+ | [novel_embedding_profiles](#novel_embedding_profiles) | 会提交操作或保存文件;具体取决于 action/参数 | `action` |
39
+ | [novel_export](#novel_export) | 会提交操作或保存文件;具体取决于 action/参数 | `action` |
40
+ | [novel_focus](#novel_focus) | 会提交操作或保存文件;具体取决于 action/参数 | `goal` |
41
+ | [novel_foreshadowing](#novel_foreshadowing) | 会提交操作或保存文件;具体取决于 action/参数 | `action`, `node_id` |
42
+ | [novel_import](#novel_import) | 会提交操作或保存文件;具体取决于 action/参数 | `action` |
43
+ | [novel_manuscript_acceptance](#novel_manuscript_acceptance) | 会提交操作或保存文件;具体取决于 action/参数 | 无 |
44
+ | [novel_manuscript_acceptance_reconcile](#novel_manuscript_acceptance_reconcile) | 会提交操作或保存文件;具体取决于 action/参数 | `action` |
45
+ | [novel_manuscript_edit_action](#novel_manuscript_edit_action) | 会提交操作或保存文件;具体取决于 action/参数 | `action` |
46
+ | [novel_manuscript_import_action](#novel_manuscript_import_action) | 会提交操作或保存文件;具体取决于 action/参数 | `action` |
47
+ | [novel_manuscript_metrics](#novel_manuscript_metrics) | 会提交操作或保存文件;具体取决于 action/参数 | `chapter_id` |
48
+ | [novel_model_benchmark](#novel_model_benchmark) | 会提交操作或保存文件;具体取决于 action/参数 | `action` |
49
+ | [novel_model_profiles](#novel_model_profiles) | 会提交操作或保存文件;具体取决于 action/参数 | `action` |
50
+ | [novel_multi_write](#novel_multi_write) | 会提交操作或保存文件;具体取决于 action/参数 | 无 |
51
+ | [novel_narrative_forecast_action](#novel_narrative_forecast_action) | 会提交操作或保存文件;具体取决于 action/参数 | `action` |
52
+ | [novel_outline_audit](#novel_outline_audit) | 会提交操作或保存文件;具体取决于 action/参数 | 无 |
53
+ | [novel_outline_edit](#novel_outline_edit) | 会提交操作或保存文件;具体取决于 action/参数 | `operation`, `revision` |
54
+ | [novel_outline_read](#novel_outline_read) | 会提交操作或保存文件;具体取决于 action/参数 | 无 |
55
+ | [novel_project](#novel_project) | 会提交操作或保存文件;具体取决于 action/参数 | `action` |
56
+ | [novel_reading_order](#novel_reading_order) | 会提交操作或保存文件;具体取决于 action/参数 | `action` |
57
+ | [novel_reading_packet](#novel_reading_packet) | 会提交操作或保存文件;具体取决于 action/参数 | `document_id` |
58
+ | [novel_reference_library_action](#novel_reference_library_action) | 会提交操作或保存文件;具体取决于 action/参数 | `action` |
59
+ | [novel_research_report](#novel_research_report) | 会提交操作或保存文件;具体取决于 action/参数 | `report_id` |
60
+ | [novel_research_settings_save](#novel_research_settings_save) | 会提交操作或保存文件;具体取决于 action/参数 | `settings` |
61
+ | [novel_research_status](#novel_research_status) | 会提交操作或保存文件;具体取决于 action/参数 | 无 |
62
+ | [novel_review_chapter](#novel_review_chapter) | 会提交操作或保存文件;具体取决于 action/参数 | 无 |
63
+ | [novel_review_framework](#novel_review_framework) | 会提交操作或保存文件;具体取决于 action/参数 | 无 |
64
+ | [novel_revision](#novel_revision) | 会提交操作或保存文件;具体取决于 action/参数 | `action` |
65
+ | [novel_rolling_plan_action](#novel_rolling_plan_action) | 会提交操作或保存文件;具体取决于 action/参数 | `action` |
66
+ | [novel_rule_action](#novel_rule_action) | 会提交操作或保存文件;具体取决于 action/参数 | `action` |
67
+ | [novel_runtime_skill_action](#novel_runtime_skill_action) | 会提交操作或保存文件;具体取决于 action/参数 | `action` |
68
+ | [novel_scene](#novel_scene) | 会提交操作或保存文件;具体取决于 action/参数 | `action` |
69
+ | [novel_scene_migration](#novel_scene_migration) | 会提交操作或保存文件;具体取决于 action/参数 | `action` |
70
+ | [novel_search](#novel_search) | 会提交操作或保存文件;具体取决于 action/参数 | `q` |
71
+ | [novel_settle_backfill](#novel_settle_backfill) | 会提交操作或保存文件;具体取决于 action/参数 | 无 |
72
+ | [novel_source_action](#novel_source_action) | 会提交操作或保存文件;具体取决于 action/参数 | `action` |
73
+ | [novel_status](#novel_status) | 会提交操作或保存文件;具体取决于 action/参数 | 无 |
74
+ | [novel_sync](#novel_sync) | 会提交操作或保存文件;具体取决于 action/参数 | 无 |
75
+ | [novel_task](#novel_task) | 会提交操作或保存文件;具体取决于 action/参数 | `action` |
76
+ | [novel_trace_list](#novel_trace_list) | 会提交操作或保存文件;具体取决于 action/参数 | 无 |
77
+ | [novel_write_chapter](#novel_write_chapter) | 会提交操作或保存文件;具体取决于 action/参数 | 无 |
78
+ | [novel_writing_assets](#novel_writing_assets) | 会提交操作或保存文件;具体取决于 action/参数 | `action` |
79
+ | [novel_writing_targets](#novel_writing_targets) | 会提交操作或保存文件;具体取决于 action/参数 | 无 |
80
+
81
+ ## novel_arc_reconcile
82
+
83
+ Resolve selected drift entries by absorbing authored outline metadata, scheduling recovery in a later chapter, or freezing. Absorption requires concrete outline_updates and outline_revision; baseline is saved before edits. resume=true explicitly resumes a replanned group within budget. Does not rewrite manuscript.
84
+
85
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
86
+
87
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
88
+ | --- | --- | --- | --- |
89
+ | data | json | 是 | Object: group_id, expected_revision, entry_ids[], decision absorb/recover/freeze, confirm:true. absorb: outline_revision, outline_updates[{node_id,metadata}], resume?. recover: plan, target_chapter_id. |
90
+
91
+ ## novel_assets
92
+
93
+ List, read, create and update the writing assets of the current project (terminology, sample pools, character attribute groups and related records).
94
+
95
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
96
+
97
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
98
+ | --- | --- | --- | --- |
99
+ | action | string | 是 | ["list","read","create","update"];Writing-asset operation. |
100
+ | kind | string | 否 | ["character","world","progression"];Restrict to one asset kind; omit to list all kinds. |
101
+ | id | string | 否 | Asset id; required for read/create/update. Must match [A-Za-z0-9][A-Za-z0-9_.-]{0,79}. |
102
+ | data | json | 否 | Object of asset fields (e.g. name, summary, aliases). |
103
+ | body_markdown | string | 否 | Markdown body (character/world assets). |
104
+ | revision | string | 否 | The asset revision fingerprint from a fresh novel_assets(action="list") call. |
105
+ | raw_text | string | 否 | Full replacement document text, validated by the server. |
106
+ | related_mode | string | 否 | ["merge","replace"];Preserve and merge existing related entries by default; replace explicitly clears or replaces relations. |
107
+
108
+ ## novel_assets_package
109
+
110
+ Export the project assets into a portable package, preview a package before importing it, and import a reviewed package with explicit dependency resolutions.
111
+
112
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
113
+
114
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
115
+ | --- | --- | --- | --- |
116
+ | action | string | 是 | ["export","preview","import"];Asset package operation. |
117
+ | selections | array[string] | 否 | Asset selectors in "kind:id" form, e.g. ["character:hero", "world:capital"]. |
118
+ | package_base64 | string | 否 | Base64-encoded .owasset.zip package (max 25 MB decoded). |
119
+ | upload_id | string | 否 | The upload_id returned by novel_assets_package(action="preview"). |
120
+ | package_sha256 | string | 否 | Package digest. Required for import: pass the package_sha256 returned by action="preview"; the server rejects an import without it as a stale package. |
121
+ | resolutions | json | 否 | Object mapping conflicting asset keys to resolutions. |
122
+ | allow_missing_dependencies | boolean | 否 | Allow import despite missing asset dependencies (default false). |
123
+
124
+ ## novel_change_plan
125
+
126
+ Preview, apply, reject, retry and undo a change plan. document plans edit one project document as text; structured plans edit the manuscript model (outline, scenes, canon) as operations. Both are two-step: preview returns a token the follow-up step must present.
127
+
128
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
129
+
130
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
131
+ | --- | --- | --- | --- |
132
+ | action | string | 是 | ["document","structured"];Plan kind: document edits a project document, structured edits the manuscript model. |
133
+ | step | string | 否 | ["preview","apply","reject","retry","undo"];Plan lifecycle step. |
134
+ | confirm | boolean | 否 | Required true for apply and undo after author acceptance. |
135
+ | path | string | 否 | Existing document path for preview, relative to the novel root. |
136
+ | edits | json | 否 | Preview edits: [{old_text,new_text}] or [{start_text,end_text,new_text,end_inclusive}]. Range end defaults to inclusive for compatibility; end_inclusive:false preserves the end anchor (e.g. the next heading). |
137
+ | preview_token | string | 否 | Immutable preview or undo token for apply/reject/retry/undo. |
138
+ | change_kind | string | 否 | ["outline","asset","focus","foreshadowing","writing_targets"];Structured domain for a preview. |
139
+ | change | json | 否 | One direct-tool-shaped change object, required for preview. |
140
+
141
+ ## novel_chapter_delete
142
+
143
+ Delete the LATEST manuscript chapter. The server enforces three safeguards: the path must be a chapter under data/manuscript, confirm must exactly equal the chapter id (e.g. "ch_0007"), and version must equal the document version fingerprint from a fresh novel_doc(action="read"). Only the newest chapter can be deleted, and never while a background task is active.
144
+
145
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
146
+
147
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
148
+ | --- | --- | --- | --- |
149
+ | path | string | 是 | Chapter path, e.g. "data/manuscript/ch_0007.md". |
150
+ | confirm | string | 是 | Must exactly equal the chapter id, e.g. "ch_0007". |
151
+ | version | string | 是 | The document version fingerprint from novel_doc(action="read"). |
152
+
153
+ ## novel_chapter_delete_batch
154
+
155
+ Delete the contiguous latest manuscript tail in one server request, retaining the specified chapter. The server still performs the single-chapter backup/projection cleanup for every chapter and refuses active tasks, missing chapters, non-tail ranges, or stale latest-version fingerprints. confirm must exactly equal "DELETE_AFTER:<keep_through>" (for example "DELETE_AFTER:ch_0030").
156
+
157
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
158
+
159
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
160
+ | --- | --- | --- | --- |
161
+ | keep_through | string | 是 | Last chapter to retain, e.g. "ch_0030". |
162
+ | confirm | string | 是 | Must exactly equal DELETE_AFTER:<keep_through>. |
163
+ | version | string | 是 | The latest chapter version fingerprint from a fresh novel_doc(action="read"). |
164
+
165
+ ## novel_chapter_run_action
166
+
167
+ Manage Chapter Run V2 records (the server's per-chapter write/review run ledger). Actions: "list" (chapter_id?/statuses?/limit?), "get" (run_id), "record_intervention" (run_id + revision + request, optional scope/risk/affected_items/rewrite_required), "update_intervention" (run_id + revision + intervention_id + state, optional facts_revision/impact/proposal/confirm — state transitions may require confirm: true), "cancel" (run_id + revision, optional reason). All mutating actions are revision-gated: pass the run's current revision from a list/get call.
168
+
169
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
170
+
171
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
172
+ | --- | --- | --- | --- |
173
+ | include_archived | boolean | 否 | For list: include historical runs moved to chapter_deletions when a chapter was deleted. Archived runs are read-only and include archive_directory. |
174
+ | action | string | 是 | ["list","get","record_intervention","update_intervention","cancel","archive"];The chapter-run operation. |
175
+ | run_id | string | 否 | Run id (required for get/record_intervention/update_intervention/cancel). |
176
+ | revision | string | 否 | Current run revision (required for mutating actions). |
177
+ | chapter_id | string | 否 | Chapter filter for list. |
178
+ | statuses | array[string] | 否 | Status filter for list. |
179
+ | since | string | 否 | ISO timestamp filter for recent runs. |
180
+ | limit | integer | 否 | List limit (default 20). |
181
+ | scope | string | 否 | Intervention scope (default "chapter"). |
182
+ | risk | string | 否 | Intervention risk level (default "medium"). |
183
+ | request | string | 否 | Intervention request text. |
184
+ | affected_items | json | 否 | Array of affected item ids. |
185
+ | rewrite_required | boolean | 否 | Whether the intervention forces a rewrite. |
186
+ | intervention_id | string | 否 | Intervention id (update_intervention). |
187
+ | state | string | 否 | Target intervention state (update_intervention). |
188
+ | facts_revision | string | 否 | Facts revision for the transition (update_intervention). |
189
+ | impact | json | 否 | Impact array for the transition (update_intervention). |
190
+ | proposal | string | 否 | Proposal text for the transition (update_intervention). |
191
+ | confirm | boolean | 否 | Confirm a gated state transition (default false). |
192
+ | reason | string | 否 | Cancel reason (cancel). |
193
+
194
+ ## novel_chapter_scenes
195
+
196
+ Read the revision-labelled scene slice for one chapter.
197
+
198
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
199
+
200
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
201
+ | --- | --- | --- | --- |
202
+ | chapter_id | string | 是 | Chapter id (ch_<digits>). |
203
+
204
+ ## novel_chapter_work
205
+
206
+ Read one chapter work brief: manuscript/acceptance/review revisions, writing target, recent edits, tasks, and categorized foreshadowing obligations.
207
+
208
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
209
+
210
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
211
+ | --- | --- | --- | --- |
212
+ | chapter_id | string | 是 | Chapter id (ch_<digits>). |
213
+ | document_id | string | 否 | Stable document id used to bind recent activity. |
214
+ | recent_limit | integer | 否 | Maximum recent edit records (default 20). |
215
+
216
+ ## novel_context_preview
217
+
218
+ Preview the context packet OpenWrite would assemble for writing a chapter (relevant outline, assets, foreshadowing, and prior-chapter memory). The chapter must already exist in the outline; an unknown chapter id is rejected instead of returning an empty generic context. Set include_agent_payload to inspect canonical writer inputs and document inclusion without calling a model.
219
+
220
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
221
+
222
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
223
+ | --- | --- | --- | --- |
224
+ | chapter | string | 否 | Chapter id (e.g. "ch_0007"); omit or pass "next" for the next chapter to write. |
225
+ | include_agent_payload | boolean | 否 | Include the full writer payload, rendered initial messages and document inventory. Later segment/retry messages depend on the write request. |
226
+
227
+ ## novel_continuity
228
+
229
+ Get the continuity report: unresolved foreshadowing, character state drift, and timeline consistency of the current project.
230
+
231
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
232
+
233
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
234
+ | --- | --- | --- | --- |
235
+ | 无 | — | — | — |
236
+
237
+ ## novel_diagnostics
238
+
239
+ Run runtime diagnostics over the project (read-only): stuck runs, stale locks, and other operational issues.
240
+
241
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
242
+
243
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
244
+ | --- | --- | --- | --- |
245
+ | stuck_minutes | integer | 否 | Minutes after which a run counts as stuck (default 30). |
246
+
247
+ ## novel_doc
248
+
249
+ Read, write and create the plain documents of the current project (notes, briefs and other author-owned files). Writes are optimistic and reject a stale version.
250
+
251
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
252
+
253
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
254
+ | --- | --- | --- | --- |
255
+ | action | string | 是 | ["read","write","create"];Document operation. |
256
+ | path | string | 否 | Document path relative to the novel data root (read/write). Writable roots are src/ and data/manuscript/; create derives its path from kind and name. |
257
+ | content | string | 否 | Full new document content (max 2 MB). |
258
+ | version | string | 否 | The version fingerprint from novel_doc(action="read") (optimistic lock). |
259
+ | force | boolean | 否 | Bypass the version check (default false). |
260
+ | kind | string | 否 | Document kind for create: "character" or "world" (the server derives the file path). |
261
+ | name | string | 否 | Document name. |
262
+ | description | string | 否 | Short description of the document. |
263
+
264
+ ## novel_drift_entry
265
+
266
+ Record author-observed chapter drift. Saves an immutable outline/manuscript baseline first. More than two unresolved rewrite drifts in a section freezes generation until explicit reconciliation and replanning.
267
+
268
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
269
+
270
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
271
+ | --- | --- | --- | --- |
272
+ | group_id | string | 是 | Section ID sec_*. |
273
+ | chapter_id | string | 是 | Chapter in this section. |
274
+ | kind | string | 是 | ["growth","escape","dilution","snowball"];Drift kind. |
275
+ | impact | string | 是 | ["local","section","arc"];Impact scope. |
276
+ | rewrite | boolean | 否 | Counts toward rewrite budget; default true. |
277
+ | note | string | 是 | Observed drift and supporting evidence. |
278
+ | expected_revision | integer | 是 | ledger.revision from outline audit. |
279
+
280
+ ## novel_embedding_profiles
281
+
282
+ List, save, select, delete and test embedding profiles. Selection chooses the profile the server uses for semantic search and recall.
283
+
284
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
285
+
286
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
287
+ | --- | --- | --- | --- |
288
+ | action | string | 是 | ["list","save","select","delete","test"];Embedding configuration operation. |
289
+ | profile | json | 否 | Embedding profile: id, label, provider, model, base_url, dimension, max_tokens. |
290
+ | api_key | string | 否 | Embedding API key. |
291
+ | remember_api_key | boolean | 否 | Persist the key (default true). |
292
+ | profile_id | string | 否 | |
293
+ | id | string | 否 | Stored profile id to probe. |
294
+ | candidate | json | 否 | Embedding candidate settings object (merged into the request). |
295
+
296
+ ## novel_export
297
+
298
+ Preflight and run a manuscript export. Preflight validates the selection, purpose and format and returns a revision the export must present.
299
+
300
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
301
+
302
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
303
+ | --- | --- | --- | --- |
304
+ | action | string | 是 | ["preflight","export"];Export step; preflight reports what would be written without writing it. |
305
+ | format | string | 否 | ["md","txt","epub"];Export format (default "md"). |
306
+ | purpose | string | 否 | ["backup","delivery","personal_archive"];Export purpose (default "delivery"). personal_archive preserves author copies with gate findings recorded as warnings. |
307
+ | preflight_revision | string | 否 | Revision returned by novel_export(action="preflight") for the same format and purpose. |
308
+
309
+ ## novel_focus
310
+
311
+ Immediate compatibility write for a focus change the author has already authorized exactly; otherwise use novel_change_plan(action="structured"). Set the writing focus compass for the project.
312
+
313
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
314
+
315
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
316
+ | --- | --- | --- | --- |
317
+ | goal | string | 是 | The current writing goal. |
318
+ | must_keep | array[string] | 否 | Constraints that must be kept. |
319
+ | must_avoid | array[string] | 否 | Things that must be avoided. |
320
+ | notes | array[string] | 否 | Free-form focus notes. |
321
+
322
+ ## novel_foreshadowing
323
+
324
+ Immediate compatibility write for a foreshadowing change the author has already authorized exactly; otherwise use novel_change_plan(action="structured"). Manage the foreshadowing DAG. action "create": node_id + content, optional weight (1-10, default 5), layer (default "支线"), target_chapter. action "update": node_id + status (e.g. planted/paid-off).
325
+
326
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
327
+
328
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
329
+ | --- | --- | --- | --- |
330
+ | action | string | 是 | ["create","update"];Create a new foreshadowing node or update an existing one. |
331
+ | node_id | string | 是 | Foreshadowing node id. |
332
+ | content | string | 否 | Node content (create). |
333
+ | weight | integer | 否 | Narrative weight 1-10 (create, default 5). |
334
+ | layer | string | 否 | Story layer, e.g. "主线" or "支线" (create, default "支线"). |
335
+ | target_chapter | string | 否 | Chapter id the foreshadowing should pay off at (create). |
336
+ | status | string | 否 | New node status (update). |
337
+
338
+ ## novel_import
339
+
340
+ Preview an imported manuscript and then import it. Preview reports the parsed chapters, arc mapping and conflicts without writing; import applies the reviewed plan.
341
+
342
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
343
+
344
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
345
+ | --- | --- | --- | --- |
346
+ | action | string | 是 | ["preview","import"];Import step; preview never writes anything. |
347
+ | content | string | 否 | The manuscript text to import. |
348
+ | filename | string | 否 | Source filename; suffix must be .txt/.md/.markdown (default "import.md"). |
349
+ | arc_id | string | 否 | Arc id like "arc_001" (default: the project's current arc). |
350
+ | start_number | integer | 否 | First chapter number (default: after the last existing chapter). |
351
+ | force | boolean | 否 | Report the import as allowed despite conflicts (default false). |
352
+
353
+ ## novel_manuscript_acceptance
354
+
355
+ Inspect the canonical manuscript acceptance ledger: current and accepted content revisions, drift, recoverable operations, derived-result impacts, and chapters that require author review.
356
+
357
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
358
+
359
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
360
+ | --- | --- | --- | --- |
361
+ | 无 | — | — | — |
362
+
363
+ ## novel_manuscript_acceptance_reconcile
364
+
365
+ Reconcile the canonical manuscript acceptance ledger. Actions: "baseline" (accept current text as the initial baseline), "external" (accept a detected external edit), "resume" (continue a durable incomplete operation), "abandon" (release a stale operation without deleting prose), and "acknowledge" (record that the author reviewed the completed acceptance and impacts). Each action is mapped to the corresponding OpenWrite acceptance endpoint. Baseline, external, and acknowledge are confirmation-gated by the server.
366
+
367
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
368
+
369
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
370
+ | --- | --- | --- | --- |
371
+ | action | string | 是 | ["baseline","external","resume","acknowledge","abandon"];The reconciliation action. |
372
+ | mode | string | 否 | ["full","fast"];resume: fast accepts frozen manuscript without calling a model; derived facts remain stale and can be reconciled later. |
373
+ | no_model | boolean | 否 | external: accept manuscript bytes without extracting facts; does not clear the facts guard. |
374
+ | chapter_id | string | 否 | Optional chapter id (ch_<digits>); omit for the project-level operation. |
375
+ | operation_id | string | 否 | Durable operation id to resume or acknowledge. |
376
+ | domains | array[string] | 否 | Affected domains to acknowledge or retry; acknowledge defaults to outline and foreshadowing. |
377
+ | confirm | boolean | 否 | Explicit confirmation for a gated baseline, external acceptance, or acknowledgement. |
378
+
379
+ ## novel_manuscript_edit_action
380
+
381
+ Chapter snapshots, annotations and saved drafts. Actions: "drafts" (list recoverable uncommitted prose), "restore_draft" (run_id_v2 + revision + confirm: true; copy the exact saved bytes without generation, then reconcile facts). Other actions: "versions" (chapter_id), "version" (chapter_id + version_id — returns the snapshot content), "checkpoint" (chapter_id, optional label — save a snapshot), "compare" (chapter_id + version_id — preview current-to-snapshot differences without writing), "restore" (chapter_id + version_id + revision — REVERTS the chapter to a snapshot; revision-gated and confirmation-gated: the server demands confirm: true), "annotations" (chapter_id), "annotate" (chapter_id + revision + quote + note, optional start_hint/end_hint (derived from the quote when omitted) and color amber|rose|sky|lime|violet), "resolve_annotation" (chapter_id + annotation_id).
382
+
383
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
384
+
385
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
386
+ | --- | --- | --- | --- |
387
+ | action | string | 是 | ["drafts","restore_draft","versions","version","compare","checkpoint","restore","annotations","annotate","resolve_annotation"];The manuscript-editing operation. |
388
+ | chapter_id | string | 否 | Chapter id (ch_<digits>), required except for drafts/restore_draft. |
389
+ | run_id_v2 | string | 否 | Saved run id from drafts (restore_draft). |
390
+ | version_id | string | 否 | Snapshot id (version/restore). |
391
+ | label | string | 否 | Snapshot label (checkpoint). |
392
+ | revision | string | 否 | Current chapter revision (restore/annotate). |
393
+ | confirm | boolean | 否 | Confirm a restore (required by the server). |
394
+ | quote | string | 否 | Annotated passage (annotate). |
395
+ | note | string | 否 | Annotation note (annotate). |
396
+ | start_hint | integer | 否 | Approximate start offset (annotate). |
397
+ | end_hint | integer | 否 | Approximate end offset (annotate). |
398
+ | color | string | 否 | ["amber","rose","sky","lime","violet"];Display color for a selection note (annotate). |
399
+ | annotation_id | string | 否 | Annotation id (resolve_annotation). |
400
+
401
+ ## novel_manuscript_import_action
402
+
403
+ Operate the durable, resumable import workspace for the author's own TXT/Markdown manuscript. Use list/get to inspect saved operations, prepare to snapshot and split a manuscript, structure to revise the chapter boundaries against the current preview revision, confirm for explicit structure approval, run to start or resume the persistent import task, and discard only before publication. This is manuscript migration, not reference-library analysis.
404
+
405
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
406
+
407
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
408
+ | --- | --- | --- | --- |
409
+ | action | string | 是 | ["list","get","prepare","structure","confirm","run","discard"];Import workspace action. |
410
+ | import_id | string | 否 | Persistent import operation id. |
411
+ | limit | integer | 否 | Maximum operations for list (default 50). |
412
+ | filename | string | 否 | Source filename ending in .txt, .md, or .markdown. |
413
+ | content | string | 否 | The author's own manuscript text for prepare. |
414
+ | arc_id | string | 否 | Target arc id, e.g. arc_001. Optional for prepare; defaults to the project's current arc. |
415
+ | start_number | integer | 否 | Optional first chapter number. |
416
+ | expected_preview_revision | string | 否 | Current preview revision required by structure/confirm. |
417
+ | chapters | array[json] | 否 | Edited chapter objects: chapter_id, title, content. |
418
+ | confirm | boolean | 否 | Must be true for confirm or discard. |
419
+
420
+ ## novel_manuscript_metrics
421
+
422
+ Read deterministic chapter metrics, terminology findings, overlap against anchors and the previous three chapters, duplicate paragraphs and selected character groups. Overlap spans use Unicode codepoint offsets. No model call.
423
+
424
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
425
+
426
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
427
+ | --- | --- | --- | --- |
428
+ | chapter_id | string | 是 | Canonical chapter ID. |
429
+
430
+ ## novel_model_benchmark
431
+
432
+ Run or inspect isolated chapter or outline model benchmarks through OpenWrite profiles and LiteLLM. Use options first to read chapter choices, task limits, supported execution modes and the authoritative pipeline DAG/review domains without invoking a model. The run action creates a background task and never changes model routes, canonical manuscript or canonical outline files.
433
+
434
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
435
+
436
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
437
+ | --- | --- | --- | --- |
438
+ | action | string | 是 | ["list","get","options","run"];Benchmark operation; options previews task choices and pipeline DAGs without starting a run. |
439
+ | run_id | string | 否 | Benchmark run id for get. |
440
+ | task_type | string | 否 | ["chapter","outline"];Run target: chapter (default) or outline. Outline supports framework mode only. |
441
+ | chapter_id | string | 否 | Chapter task target: next (default) or an available canonical chapter_id from options, e.g. ch_003. Unavailable targets are rejected without fallback; inspect availability/reason first. |
442
+ | allow_historical | boolean | 否 | Explicit isolated rewrite of an already written chapter using current canon. This is not a reconstructed pre-chapter baseline. Source manuscript and ledgers remain unchanged. |
443
+ | outline_start_chapter | integer | 否 | Outline task first chapter number, inclusive, 1-100000. Omit to continue after the last outline chapter. |
444
+ | outline_chapter_count | integer | 否 | Outline task range length including its starting chapter, 1-20 (default 3). |
445
+ | writer_profile_ids | array[string] | 否 | Writing profiles to compare (run). |
446
+ | reviewer_profile_ids | array[string] | 否 | Independent blind-review profiles (run). |
447
+ | execution_mode | string | 否 | ["framework","creative"];Execution path: full framework (default); creative diagnostic is available only for chapter tasks. Read task pipelines with options. |
448
+ | repeats | integer | 否 | Repeats per writing profile, 1-5. |
449
+ | target_words | integer | 否 | Chapter candidate target length, 200-50000; use outline_chapter_count for outline range. |
450
+ | concurrency | integer | 否 | Concurrent model jobs, 1-4. |
451
+ | limit | integer | 否 | List limit, default 20. |
452
+
453
+ ## novel_model_profiles
454
+
455
+ List, save, delete and test OpenWrite model profiles, per-task routing and the active model settings. Profiles select which provider/model each task uses; routes map tasks to profiles.
456
+
457
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
458
+
459
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
460
+ | --- | --- | --- | --- |
461
+ | action | string | 是 | ["list","save","delete","save_routes","configure","test"];Model configuration operation. |
462
+ | profile | json | 否 | Profile object, e.g. {"id": "fast", "label": "...", "provider": "openai", "model": "...", "base_url": "...", "max_output_tokens": 24000}. |
463
+ | api_key | string | 否 | Chat API key to store with the profile. |
464
+ | remember_api_key | boolean | 否 | Persist the API key on the server (default true). |
465
+ | profile_id | string | 否 | Profile id to delete. |
466
+ | fallback_id | string | 否 | Profile id to reroute to (default: the server default profile). |
467
+ | routes | json | 否 | Object mapping operation names to profile ids. |
468
+ | provider | string | 否 | ["openai","anthropic","custom"];Provider (default "openai"). |
469
+ | model | string | 否 | Model name (max 120 characters). |
470
+ | base_url | string | 否 | Base URL (required for provider "custom"). |
471
+ | api_format | string | 否 | ["chat","responses"];API format (default "chat"). |
472
+ | context_tokens | integer | 否 | Context budget (min 12000). |
473
+ | max_tokens | integer | 否 | Max output tokens (min 256, must be < context_tokens). |
474
+ | id | string | 否 | Stored profile id to test. |
475
+
476
+ ## novel_multi_write
477
+
478
+ Queue a BACKGROUND continuous-writing run: writes up to max_chapters chapters following the outline, reviewing each; stops early on review blockers, continuity errors, low scores, or budget limits. Returns immediately with a task id — poll with novel_task(action="get"). A paused run is resumed with novel_task(action="confirm"), which returns a continuation task: poll that returned task_id. Confirming the same paused task again is idempotent.
479
+
480
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
481
+
482
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
483
+ | --- | --- | --- | --- |
484
+ | max_chapters | integer | 否 | Chapters to write, 1-10 (default 1). |
485
+ | minimum_review_score | integer | 否 | Stop when a chapter scores below this, 0-100 (default 82). |
486
+ | max_tokens | integer | 否 | Token budget, 0 = unlimited (default 0). |
487
+ | max_failures | integer | 否 | Stop after this many consecutive failures, 1-10 (default 2). |
488
+ | max_cost_usd | number | 否 | Cost budget in USD, 0 = unlimited (default 0). |
489
+ | guidance | string | 否 | Writing guidance applied to every chapter. |
490
+ | target_words | integer | 否 | Target words per chapter (falls back to the outline recommendation). |
491
+ | temperature | number | 否 | Sampling temperature (default 0.7). |
492
+ | stop_on_blocker | boolean | 否 | Stop when a review reports a blocker issue (default true). |
493
+ | stop_on_continuity_error | boolean | 否 | Stop on high-severity continuity issues (default true). |
494
+ | require_confirmation_after_each_chapter | boolean | 否 | Pause for novel_task(action="confirm") after each chapter (default false). |
495
+
496
+ ## novel_narrative_forecast_action
497
+
498
+ Manage narrative forecasts (branching "what-if" plot projections). Actions: "list" (limit?), "create" (divergence + anchor_chapter_id?, branch_count default 3, horizon default 5), "get" (forecast_id), "stage" (forecast_id + branches + revision), "select" (forecast_id + branch_id + revision — commits one branch; revision-gated).
499
+
500
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
501
+
502
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
503
+ | --- | --- | --- | --- |
504
+ | action | string | 是 | ["list","create","get","stage","select"];The forecast operation. |
505
+ | limit | integer | 否 | List limit (default 20). |
506
+ | divergence | string | 否 | The divergence point description (create). |
507
+ | anchor_chapter_id | string | 否 | Chapter to anchor the forecast at (create). |
508
+ | branch_count | integer | 否 | Number of branches (create, default 3). |
509
+ | horizon | integer | 否 | Forecast horizon in chapters (create, default 5). |
510
+ | forecast_id | string | 否 | Forecast id (get/stage/select). |
511
+ | branches | json | 否 | Branch array to stage (stage). |
512
+ | branch_id | string | 否 | Branch id to commit (select). |
513
+ | revision | string | 否 | Forecast revision (stage/select, revision-gated). |
514
+
515
+ ## novel_outline_audit
516
+
517
+ Read countable chapter-group facts: budgets/actual words, declared promises and function streaks, declared/confirmed payoffs, overdue hooks and drift ledger. Never generates a score or claims prose fulfilled a promise. No model call.
518
+
519
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
520
+
521
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
522
+ | --- | --- | --- | --- |
523
+ | group_id | string | 否 | Optional sec_* or arc_* group. |
524
+ | start | string | 否 | Optional first chapter ID. |
525
+ | end | string | 否 | Optional last chapter ID. |
526
+
527
+ ## novel_outline_edit
528
+
529
+ Immediate compatibility write for an outline change the author has already authorized exactly; otherwise use novel_change_plan(action="structured"). Apply ONE atomic structural edit to the outline tree. Edits are revision-gated: read the current `revision` via novel_outline_read first and pass it back; the server rejects the edit with a conflict if the outline changed in between. Operations: "rename" (node_id + title), "update_summary" (node_id + summary), "add_child" (node_id = parent, + title/summary/kind), "add_after" (node_id = sibling, + title/summary/kind), "delete" (node_id, cascade=false keeps children), "promote" (remove a container), and "get_meta"/"set_meta" (chapter metadata, optionally updates[] for a batch).
530
+
531
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
532
+
533
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
534
+ | --- | --- | --- | --- |
535
+ | operation | string | 是 | ["rename","update_summary","add_child","add_after","delete","promote","get_meta","set_meta"];The structural operation to apply. |
536
+ | cascade | boolean | 否 | For delete, false removes only the container and keeps children and chapter IDs. |
537
+ | metadata | json | 否 | Field object for set_meta; use dramatic_position, content_focus, goals, target_words, word_budget, characters, settings, emotional_arc, beats, hooks, promise, payoff_of or function. Text fields (dramatic_position, content_focus, emotional_arc) take one line of text; word counts (target_words, word_budget) take a number. List fields (goals, beats, hooks, characters, settings, payoff_of, function) take an array of strings or one comma-separated string; promise accepts both too. |
538
+ | chapter_id | string | 否 | Chapter ID alias for node_id in get_meta/set_meta. |
539
+ | updates | json | 否 | Batch of 1-50 {chapter_id, metadata} objects for set_meta, or {chapter_id} for get_meta; one revision guards the whole batch. |
540
+ | revision | string | 是 | The outline revision fingerprint from a fresh novel_outline_read call. |
541
+ | node_id | string | 否 | Target node id (parent for add_child, sibling for add_after); not needed for add_child at root. |
542
+ | title | string | 否 | Node title (rename / add_child / add_after). |
543
+ | summary | string | 否 | Node summary (update_summary / add_child / add_after). |
544
+ | kind | string | 否 | Node kind, e.g. "volume" or "chapter" (add_child / add_after). |
545
+
546
+ ## novel_outline_read
547
+
548
+ Read the live outline tree. The response carries a `revision` fingerprint required by novel_outline_edit and a chapter `recommendation`.
549
+
550
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
551
+
552
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
553
+ | --- | --- | --- | --- |
554
+ | chapter | string | 否 | Optional chapter id to get a writing recommendation for. |
555
+
556
+ ## novel_project
557
+
558
+ Initialize, open and delete a novel project, and manage its archive packages (list, get, create, restore preview, restore, download). Archiving never touches the live project.
559
+
560
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
561
+
562
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
563
+ | --- | --- | --- | --- |
564
+ | action | string | 是 | ["init","open","delete","archive","download"];Project operation. |
565
+ | novel_id | string | 否 | Project id, e.g. "my_novel" (2-64 chars: letters, digits, "-", "_"). |
566
+ | title | string | 否 | Book title (max 120 characters). |
567
+ | author | string | 否 | Author credit for delivery export (max 120 characters). |
568
+ | language | string | 否 | Book language tag, e.g. zh-CN or en (default zh-CN). |
569
+ | project_path | string | 否 | Target directory on the server; omit to use the server default location. |
570
+ | template | string | 否 | ["default","demo_short"];Project template (default "default"). |
571
+ | confirm_novel_id | string | 否 | Must exactly equal the project's novel_id (from its novel_config.yaml). |
572
+ | archive_op | string | 否 | ["preflight","list","get","create","restore_preview","restore"];Archive lifecycle operation. |
573
+ | archive_id | string | 否 | Archive id shaped owa_<24 lowercase hex>. |
574
+ | expected_preflight_revision | string | 否 | Current archive preflight revision for create. |
575
+ | target_root | string | 否 | Absolute new or empty project directory for restore. |
576
+ | target_novel_id | string | 否 | Optional restored novel id. |
577
+ | reference_policy | string | 否 | ["preserve_relative","rewrite_novel_id"];Reference handling during restore. |
578
+ | archive_sha256 | string | 否 | Checksum returned by restore_preview. |
579
+ | confirm | boolean | 否 | Must be true for restore. |
580
+
581
+ ## novel_reading_order
582
+
583
+ Read the reading order of the current project and move one document to another volume or position. The move is optimistic and requires the current revision.
584
+
585
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
586
+
587
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
588
+ | --- | --- | --- | --- |
589
+ | action | string | 是 | ["get","move"];Reading-order operation. |
590
+ | document_id | string | 否 | Stable document_id or unambiguous occurrence_id. |
591
+ | target_volume_id | string | 否 | Target volume_id from novel_reading_order. |
592
+ | target_index | integer | 否 | Zero-based position inside the target volume. |
593
+ | expected_revision | string | 否 | Fresh reading-order revision used for CAS. |
594
+
595
+ ## novel_reading_packet
596
+
597
+ Read a bounded continuous-reading window around one stable manuscript document or occurrence id.
598
+
599
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
600
+
601
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
602
+ | --- | --- | --- | --- |
603
+ | document_id | string | 是 | Stable document_id or occurrence_id from novel_reading_order. |
604
+ | before | integer | 否 | Number of preceding chapters (0-20, default 1). |
605
+ | after | integer | 否 | Number of following chapters (0-20, default 1). |
606
+
607
+ ## novel_reference_library_action
608
+
609
+ Reference-library pipeline (decomposing reference works into structured evidence). Actions: "list", "prepare" (source_id + content, optional title/relative_name/intent/focus array/input_budget_tokens), "confirm_structure" (source_id, units? array), "analyze" (source_id, LONG-RUNNING), "status" (source_id), "retry" (source_id + chunk_id?), "synthesize" (source_ids array), "profile" (profile_id), "adoption_preview" (profile_id + selections array, optional rejected_item_ids), "adopt" (preview_id, confirm: true to commit).
610
+
611
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
612
+
613
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
614
+ | --- | --- | --- | --- |
615
+ | action | string | 是 | ["list","prepare","confirm_structure","analyze","status","retry","synthesize","profile","adoption_preview","adopt"];The reference-library operation. |
616
+ | source_id | string | 否 | Reference source id. |
617
+ | content | string | 否 | Reference text (prepare). |
618
+ | title | string | 否 | Reference title (prepare). |
619
+ | relative_name | string | 否 | Display filename (prepare, default "source.txt"). |
620
+ | intent | string | 否 | Analysis intent (prepare, default "reference"). |
621
+ | focus | json | 否 | Array of focus names (prepare). |
622
+ | input_budget_tokens | integer | 否 | Token budget per chunk (prepare, default 12000). |
623
+ | units | json | 否 | Confirmed structure units (confirm_structure). |
624
+ | chunk_id | string | 否 | Chunk to retry (retry). |
625
+ | source_ids | array[string] | 否 | References to synthesize (synthesize). |
626
+ | profile_id | string | 否 | Analysis profile id (profile/adoption_preview). |
627
+ | selections | json | 否 | Array of adoption selections (adoption_preview). |
628
+ | rejected_item_ids | array[string] | 否 | Items to reject (adoption_preview). |
629
+ | preview_id | string | 否 | Adoption preview id (adopt). |
630
+ | confirm | boolean | 否 | Confirm a gated adoption (default false). |
631
+
632
+ ## novel_research_report
633
+
634
+ Read one deep-research report by id (ids come from novel_research_status).
635
+
636
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
637
+
638
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
639
+ | --- | --- | --- | --- |
640
+ | report_id | string | 是 | Report id. |
641
+
642
+ ## novel_research_settings_save
643
+
644
+ Save deep-research API settings (search/LLM providers, API keys, defaults). Pass the whole settings object; returns the refreshed research surface.
645
+
646
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
647
+
648
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
649
+ | --- | --- | --- | --- |
650
+ | settings | json | 是 | Settings object, e.g. {"search": "bocha", "llm": "deepseek", ...}. |
651
+
652
+ ## novel_research_status
653
+
654
+ Get the deep-research surface: settings status, report list, and the configured model route. Run a research job via novel_task(action="create") with type "research".
655
+
656
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
657
+
658
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
659
+ | --- | --- | --- | --- |
660
+ | 无 | — | — | — |
661
+
662
+ ## novel_review_chapter
663
+
664
+ Run OpenWrite's multi-dimensional review on a drafted manuscript chapter (LONG-RUNNING). Pass either the manuscript path (e.g. "data/manuscript/ch_0007.md") or a chapter_id like "ch_0007".
665
+
666
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
667
+
668
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
669
+ | --- | --- | --- | --- |
670
+ | action | string | 否 | ["review","versions","compare"];Default review; versions lists saved reviews, compare compares a historical revision with the current review. |
671
+ | revision | string | 否 | Historical review revision for compare. |
672
+ | path | string | 否 | Manuscript path relative to the novel data root. Takes precedence over chapter_id. |
673
+ | chapter_id | string | 否 | Chapter id (ch_<digits>), resolved client-side to data/manuscript/<id>.md. |
674
+ | strict | boolean | 否 | Enable strict review mode (default false). |
675
+ | dimensions | array[integer] | 否 | Optional list of review dimension numbers (1-37) to restrict to. |
676
+ | depth | string | 否 | ["quick","full"];Default full. Quick reviews coherence/canon/prose and safety only; scope_status=partial cannot approve full-chapter delivery. Do not combine quick with dimensions. |
677
+ | domains | array[string] | 否 | Review domain ids: coherence, character, plot, pacing, prose, canon. Use this or dimensions. Omitted domains remain explicitly unreviewed. |
678
+ | dog_threshold | integer | 否 | DoG aggregate score threshold (default 70); this does not change OpenWrite review. |
679
+
680
+ ## novel_review_framework
681
+
682
+ Inspect the canonical reusable chapter-review DAG blueprint: its version, revision, six quality domains, 37 checks, hard gates, dependencies, invariants, and extension points.
683
+
684
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
685
+
686
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
687
+ | --- | --- | --- | --- |
688
+ | 无 | — | — | — |
689
+
690
+ ## novel_revision
691
+
692
+ List, inspect, create, regenerate, apply and reject revision proposals for a chapter. Create builds a proposal from review issues (source=review) or from an explicit text selection (source=selection); apply writes the accepted hunks into the manuscript.
693
+
694
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
695
+
696
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
697
+ | --- | --- | --- | --- |
698
+ | action | string | 是 | ["list","get","create","regenerate","apply","reject"];Revision operation; create reads its source from the source parameter. |
699
+ | chapter | string | 否 | Chapter id filter (e.g. "ch_0007"). |
700
+ | status | string | 否 | Status filter (e.g. "proposed", "applied", "rejected"). |
701
+ | proposal_id | string | 否 | Revision proposal id (rev_*). |
702
+ | source | string | 否 | ["review","selection"];Create source: review (default) fixes review issues, selection revises an explicit text range. |
703
+ | chapter_id | string | 否 | Chapter id (ch_<digits>). |
704
+ | issue_ids | array[string] | 否 | Review issue ids to fix; required for create with source="review". |
705
+ | selection | object | 否 | Optional exact saved-text range in Unicode code points; preserve raw CR/LF characters. |
706
+ | instruction | string | 否 | Additional revision instruction. |
707
+ | target_units | integer | 否 | Target length in writing units (0 = keep similar). |
708
+ | expected_review_revision | string | 否 | Exact review file revision from the chapter work brief. |
709
+ | expected_document_revision | string | 否 | Exact manuscript revision from the chapter work brief. |
710
+ | start | integer | 否 | Selection start offset. |
711
+ | end | integer | 否 | Selection end offset. |
712
+ | original_text | string | 否 | The selected original text. |
713
+ | mode | string | 否 | ["rewrite","expand","compress","pace","dialogue","naturalize","custom"];Revision mode (default "rewrite"). |
714
+ | full_chapter | boolean | 否 | Treat the whole chapter as the selection (default false). |
715
+ | replacement_text | string | 否 | Replacement text overriding the proposal. |
716
+ | selected_hunk_ids | array[string] | 否 | Apply only these diff hunk ids. |
717
+
718
+ ## novel_rolling_plan_action
719
+
720
+ Manage rolling plan candidates (mid-range plot planning windows). Actions: "list" (limit?), "create" (current_arc?, window_size? default 50, max 50). current_window/accepted_window is accepted manuscript facts only; next_window/planned_window is outline plan, not facts. "get" (candidate_id), "stage" (candidate_id + proposal + revision — stages a Markdown plan; chapter headings should read "第N章:标题" or "第N章 标题" and Chinese numerals are accepted; revision-gated), "delete" (candidate_id + revision), "apply" (candidate_id + revision — appends staged draft chapters that do not collide with the canonical outline into src/outline.md; never writes accepted facts; a proposal without recognizable chapter headings is reported as such instead of as "already exists").
721
+
722
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
723
+
724
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
725
+ | --- | --- | --- | --- |
726
+ | action | string | 是 | ["list","create","get","stage","delete","apply"];The rolling-plan operation. |
727
+ | limit | integer | 否 | List limit (default 20). |
728
+ | current_arc | string | 否 | Current arc id (create). |
729
+ | window_size | integer | 否 | Planning window size in chapters (create, default 50, max 50). |
730
+ | candidate_id | string | 否 | Candidate id (get/stage/delete/apply). |
731
+ | proposal | string | 否 | Plan proposal text (stage). |
732
+ | revision | string | 否 | Candidate revision (stage/delete/apply, revision-gated). |
733
+
734
+ ## novel_rule_action
735
+
736
+ Compiled writing rules. Actions: "status" (active rule set), "preview" (compile a candidate preview), "apply" (preview_id — confirmation-gated: the server answers CONFIRMATION_REQUIRED until called again with confirm: true).
737
+
738
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
739
+
740
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
741
+ | --- | --- | --- | --- |
742
+ | action | string | 是 | ["status","preview","apply"];The rule operation. |
743
+ | preview_id | string | 否 | Preview id to apply (apply). |
744
+ | confirm | boolean | 否 | Confirm applying the preview (apply). |
745
+
746
+ ## novel_runtime_skill_action
747
+
748
+ Inspect OpenWrite runtime skills. Actions: "list" (all discovered skills), "diagnose" (skill loading problems), "resolve" (which skills apply for an agent and task — optional agent one of dante/goethe/writer/reviewer/studio, skills, task, intent, document_type). Read-only.
749
+
750
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
751
+
752
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
753
+ | --- | --- | --- | --- |
754
+ | action | string | 是 | ["list","diagnose","resolve"];The runtime-skill operation. |
755
+ | agent | string | 否 | Agent baseline for resolve: "dante", "goethe", "writer", "reviewer", or "studio" (default). |
756
+ | skills | array[string] | 否 | Explicit skill ids to resolve. |
757
+ | task | string | 否 | Task description for resolve. |
758
+ | intent | string | 否 | Intent hint for resolve. |
759
+ | document_type | string | 否 | Document type hint for resolve. |
760
+
761
+ ## novel_scene
762
+
763
+ Read the scene structure of a chapter, update one scene, and move a scene to another chapter or position. Structure is read-only; update and move are optimistic and require the current revision.
764
+
765
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
766
+
767
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
768
+ | --- | --- | --- | --- |
769
+ | action | string | 是 | ["structure","update","move"];Scene operation. |
770
+ | scene_id | string | 否 | Stable scene id from novel_scene(action="structure"). |
771
+ | expected_revision | string | 否 | Fresh scene-structure revision used for CAS. |
772
+ | title | string | 否 | Optional scene title. |
773
+ | story_time_sort_key | string | 否 | Optional lexical story-time sort key. |
774
+ | story_time_label | string | 否 | Optional author-facing story-time label. |
775
+ | characters | array[string] | 否 | Character references; replaces the current list when supplied. |
776
+ | locations | array[string] | 否 | Location references; replaces the current list when supplied. |
777
+ | events | array[string] | 否 | Event references; replaces the current list when supplied. |
778
+ | target_chapter_id | string | 否 | Target chapter id (ch_<digits>). |
779
+ | target_index | integer | 否 | Zero-based scene position inside the target chapter. |
780
+ | expected_source_revision | string | 否 | Fresh source chapter revision. |
781
+ | expected_target_revision | string | 否 | Fresh target chapter revision. |
782
+
783
+ ## novel_scene_migration
784
+
785
+ Preview, apply and roll back the paragraph-to-scene migration of one chapter. The preview is read-only; apply and rollback are guarded by the revisions the previous step reported.
786
+
787
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
788
+
789
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
790
+ | --- | --- | --- | --- |
791
+ | action | string | 是 | ["preview","apply","rollback"];Scene migration step; apply and rollback require the revision the previous step reported. |
792
+ | expected_preview_revision | string | 否 | Exact preview_revision from novel_scene_migration(action="preview"). |
793
+ | confirm | boolean | 否 | Must be true after the author approves the preview. |
794
+ | migration_id | string | 否 | Migration id returned by novel_scene_migration(action="apply"). |
795
+ | expected_revision | string | 否 | Fresh scene-structure revision used for CAS. |
796
+
797
+ ## novel_search
798
+
799
+ Search the novel project (semantic + exact match) across chapters, outline, and assets.
800
+
801
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
802
+
803
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
804
+ | --- | --- | --- | --- |
805
+ | q | string | 是 | The search query. |
806
+ | scope | string | 否 | Search scope, e.g. "all" (default), "chapters", "outline", "assets". |
807
+ | limit | integer | 否 | Maximum number of results (server default 20). |
808
+
809
+ ## novel_settle_backfill
810
+
811
+ Settlement backfill for existing/imported chapters: replay the writer pipeline observer+settler over the actual chapter prose (never rewriting it) and commit chapter memory, runtime-truth notes and a character-state index refresh. Run once after importing an old manuscript so later chapters, reviews and canon/continuity checks have real facts from earlier chapters (without it, review canon stays inconclusive and context lacks previous-chapter recaps). Returns a background task (tsk_*); poll with novel_task(action="get").
812
+
813
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
814
+
815
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
816
+ | --- | --- | --- | --- |
817
+ | chapter_ids | array[string] | 否 | Optional chapter ids to backfill, e.g. ["ch_001","ch_002"]; omit to backfill every chapter missing memory. |
818
+ | only_missing | boolean | 否 | Skip chapters that already have memory (default true). |
819
+
820
+ ## novel_source_action
821
+
822
+ Style/setting source pipeline (learning from reference texts). Actions: "extract" (source_id + content, focus "style"|"setting"), "analyze_v2" (source_id + content, focus as array, optional relative_name/input_budget_tokens), "status_v2" (source_id), "retry_v2" (source_id + chunk_id?), "synthesize_v2" (source_ids array), "profile_v2" (profile_id), "promotion_preview_v2" (profile_id + target), "promote_v2" (preview_id, confirm: true to commit), "review" (source_id), "promote" (source_id, target? default "all"), "synthesize" (source_id). Model-backed actions are LONG-RUNNING.
823
+
824
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
825
+
826
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
827
+ | --- | --- | --- | --- |
828
+ | action | string | 是 | ["extract","analyze_v2","status_v2","retry_v2","synthesize_v2","profile_v2","promotion_preview_v2","promote_v2","review","promote","synthesize"];The source operation. |
829
+ | source_id | string | 否 | Source pack id. |
830
+ | content | string | 否 | Source text (extract/analyze_v2). |
831
+ | focus | json | 否 | "style"/"setting" string for extract; array of focus names for analyze_v2. |
832
+ | relative_name | string | 否 | Display filename (analyze_v2, default "source.txt"). |
833
+ | input_budget_tokens | integer | 否 | Token budget per analysis chunk (default 12000). |
834
+ | chunk_id | string | 否 | Chunk to retry (retry_v2). |
835
+ | source_ids | array[string] | 否 | Sources to synthesize (synthesize_v2). |
836
+ | profile_id | string | 否 | Analysis profile id (profile_v2/promotion_preview_v2). |
837
+ | target | string | 否 | Promotion target: style/rules/inspiration/setting_candidates for promotion_preview_v2 (required); style/setting/world/all for legacy promote (default "all"). |
838
+ | preview_id | string | 否 | Promotion preview id (promote_v2). |
839
+ | confirm | boolean | 否 | Confirm a gated promotion (default false). |
840
+
841
+ ## novel_status
842
+
843
+ Get a snapshot of the current OpenWrite novel project: title, chapters, word counts, writing targets, and focus compass.
844
+
845
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
846
+
847
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
848
+ | --- | --- | --- | --- |
849
+ | 无 | — | — | — |
850
+
851
+ ## novel_sync
852
+
853
+ Synchronize derived caches that are direct src derivatives: outline hierarchy (data/hierarchy.yaml) and character cards (data/characters/cards/*.yaml). It does NOT rebuild chapter memory / runtime truth / character state: those are produced by the chapter-write settlement, so imported or pre-existing chapters need a one-time novel_settle_backfill. The sync response also reports memory_missing / memory_missing_count.
854
+
855
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
856
+
857
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
858
+ | --- | --- | --- | --- |
859
+ | 无 | — | — | — |
860
+
861
+ ## novel_task
862
+
863
+ Queue a background AI task and return immediately; poll with get or list. Task types and their `input` keys: chapter_write {chapter_id?, guidance?, target_words?, temperature?, outline_revision?}; chapter_review {chapter_id | path, strict?, dimensions?}; revision_selection / revision_from_review (same inputs as the novel_revision create action); source_operation / reference_operation (same inputs as novel_source_action / novel_reference_library_action); manuscript_import (same input as novel_import); research {prompt, search?, language?, quality? (advisory|balanced|strict), llm?}; manuscript_reconcile (durable acceptance analysis; usually started through novel_manuscript_acceptance_reconcile); settle_backfill {chapter_ids?, only_missing?} - prefer the novel_settle_backfill convenience tool; continuous_write - prefer the novel_multi_write convenience tool.
864
+
865
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
866
+
867
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
868
+ | --- | --- | --- | --- |
869
+ | action | string | 是 | ["create","get","list","cancel","confirm","retry"];Task operation; long-running work returns a task id immediately. confirm resumes a paused run and returns a continuation task: poll the returned task_id; re-confirming the paused task is idempotent. |
870
+ | type | string | 否 | ["chapter_write","chapter_review","revision_selection","revision_from_review","source_operation","reference_operation","manuscript_import","manuscript_reconcile","continuous_write","research","settle_backfill"];Task type; required for create. |
871
+ | input | json | 否 | Task input object; required for create. Shape depends on the task type (see description). |
872
+ | task_id | string | 否 | Task id (tsk_*). |
873
+ | since | string | 否 | ISO timestamp filter for requests whose response was lost. |
874
+ | limit | integer | 否 | Maximum number of tasks (server default 100). |
875
+ | wait_seconds | number | 否 | Wait up to 30 seconds for actual cancellation; running model calls may finish later. |
876
+
877
+ ## novel_trace_list
878
+
879
+ Inspect recent redacted Prompt→context→model→tool→domain traces. Raw prompts, context, model output, credentials, chain-of-thought, and mutation values are never stored.
880
+
881
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
882
+
883
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
884
+ | --- | --- | --- | --- |
885
+ | limit | number | 否 | Maximum records to return (1-100, default 20). |
886
+
887
+ ## novel_write_chapter
888
+
889
+ Queue a chapter write and immediately return a durable task_id. Poll novel_task(action="get") for progress/result. Omit chapter_id to write the outline-recommended next chapter; a given chapter_id must match the current recommendation. Preview context first with novel_context_preview and consult novel_outline_read for the recommendation. Cancel with novel_task(action="cancel"). Generated partial prose is retained; resume_from_draft continues it in a new run when the source/context revisions still match.
890
+
891
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
892
+
893
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
894
+ | --- | --- | --- | --- |
895
+ | dry_run | boolean | 否 | Only assemble the current writer input and per-document sizes; no model call and no writing task. Guidance and target_words are included in this preview. |
896
+ | run_id_v2 | string | 否 | Resume this completed draft without generating it again. |
897
+ | resume_from_draft | boolean | 否 | Resume the latest uncommitted draft for this chapter. |
898
+ | target_words | integer | 否 | Target word count, 200-50000. When omitted use the outline target, then default 3000. |
899
+ | guidance | string | 否 | Writing guidance for this chapter (plot beats, tone, POV notes). |
900
+ | chapter_id | string | 否 | Chapter id to write; must equal the current outline recommendation. Omit for the next chapter. |
901
+ | temperature | number | 否 | Sampling temperature (default 0.7). |
902
+ | outline_revision | string | 否 | Optional outline revision guard from novel_outline_read; the server rejects the write if the outline changed. |
903
+
904
+ ## novel_writing_assets
905
+
906
+ Read or save shared project terminology, review_terms toggle, concrete noun lexicon, overlap_threshold and character_groups. Anchors are Markdown files in the novel anchor/ directory. Save requires the revision returned by get. Character groups are optional descriptive material; retain identity and canonical state in character cards.
907
+
908
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
909
+
910
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
911
+ | --- | --- | --- | --- |
912
+ | action | string | 是 | ["get","save","save_anchor","mark_usage"];Asset operation. |
913
+ | assets | json | 否 | Object: terms [{term, forbidden?, replacement?, min_occurrences?, example?}], character_groups {name: [{id,text}]}, review_terms?, concrete_nouns?, overlap_threshold?. |
914
+ | expected_revision | string | 否 | Revision from get; empty for a new asset table. |
915
+ | name | string | 否 | save_anchor: simple .md filename. |
916
+ | content | string | 否 | save_anchor: Markdown reference prose. |
917
+ | chapter_id | string | 否 | mark_usage: chapter whose optional character details were used. |
918
+ | groups | json | 否 | mark_usage: character name to group IDs used in this chapter. |
919
+
920
+ ## novel_writing_targets
921
+
922
+ Immediate compatibility write for targets the author has already authorized exactly; otherwise use novel_change_plan(action="structured"). Update the project writing targets. Ranges: book_words 10000-5000000, chapter_words 200-50000, outline_volume_words 100-5000, outline_act_words 80-3000, outline_section_words 50-2000, outline_chapter_words 30-1000. Omitted fields keep their current values.
923
+
924
+ 影响:会提交操作或保存文件;具体取决于 action/参数。
925
+
926
+ | 参数 | 类型 | 必填 | 允许值 / 说明 |
927
+ | --- | --- | --- | --- |
928
+ | book_words | integer | 否 | Whole-book target word count. |
929
+ | chapter_words | integer | 否 | Default words per chapter. |
930
+ | outline_volume_words | integer | 否 | Outline summary words per volume. |
931
+ | outline_act_words | integer | 否 | Outline summary words per act. |
932
+ | outline_section_words | integer | 否 | Outline summary words per section. |
933
+ | outline_chapter_words | integer | 否 | Outline summary words per chapter. |