dsh-novel-write-engine 0.2.10 → 0.2.12

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/lib/index.d.ts CHANGED
@@ -2813,7 +2813,7 @@ declare const PANEL_ROUTE = "/api/novel-write-engine/panel";
2813
2813
  declare const SKILL_NAME = "novel-write-engine";
2814
2814
  declare const REMOTE_VERSION = 6;
2815
2815
  /** User-visible panel/tutorial version; keep in sync with package.json. */
2816
- declare const PANEL_VERSION = "0.2.10";
2816
+ declare const PANEL_VERSION = "0.2.12";
2817
2817
  /** The panel is a recent-history view; the wire payload and UI use one cap. */
2818
2818
  declare const PANEL_CHAPTER_LIMIT = 30;
2819
2819
  /** Project-relative locations. Every write goes through these constants. */
package/lib/index.js CHANGED
@@ -16,7 +16,7 @@ const PANEL_ROUTE = "/api/novel-write-engine/panel";
16
16
  const SKILL_NAME = "novel-write-engine";
17
17
  const REMOTE_VERSION = 6;
18
18
  /** User-visible panel/tutorial version; keep in sync with package.json. */
19
- const PANEL_VERSION = "0.2.10";
19
+ const PANEL_VERSION = "0.2.12";
20
20
  /** The panel is a recent-history view; the wire payload and UI use one cap. */
21
21
  const PANEL_CHAPTER_LIMIT = 30;
22
22
  /** Project-relative locations. Every write goes through these constants. */
@@ -17815,6 +17815,254 @@ const NEXT_DETAILS = {
17815
17815
  novel_diff: "对比当前正文与上一版或给定文本。",
17816
17816
  novel_word_count: "按引擎字数口径核对正文长度。"
17817
17817
  };
17818
+ [
17819
+ {
17820
+ title: "状态与内容",
17821
+ hint: "只读查询,随时可跑",
17822
+ items: [
17823
+ {
17824
+ form: "/novel status",
17825
+ summary: "进度、项目选择、轮次、字数、门控与下一步。"
17826
+ },
17827
+ {
17828
+ form: "/novel next",
17829
+ summary: "下一步该调哪个工具、为什么;卡住时先看它。"
17830
+ },
17831
+ {
17832
+ form: "/novel stats",
17833
+ summary: "章节数、总字数(归档 + 草稿)、均分、伏笔、覆盖率与规则包。"
17834
+ },
17835
+ {
17836
+ form: "/novel outline",
17837
+ summary: "蓝图、大纲覆盖率、当前章卡与世界观计数。"
17838
+ },
17839
+ {
17840
+ form: "/novel guide",
17841
+ summary: "六态引导与下一步;新项目、写作中、完结都能用。"
17842
+ },
17843
+ {
17844
+ form: "/novel report",
17845
+ summary: "全书报告:进度、质量、伏笔、节奏与警告。"
17846
+ },
17847
+ {
17848
+ form: "/novel doctor",
17849
+ summary: "项目体检:锁、备份、状态文档、正文与大纲漂移。"
17850
+ },
17851
+ {
17852
+ form: "/novel search <关键词>",
17853
+ summary: "搜索正文、摘要、大纲、世界观与台账;空关键词会报用法。"
17854
+ }
17855
+ ]
17856
+ },
17857
+ {
17858
+ title: "项目与会话",
17859
+ hint: "只改查看对象或登记,不动正文",
17860
+ items: [
17861
+ {
17862
+ form: "/novel projects",
17863
+ summary: "列出登记项目;* 当前会话,P 面板默认,! 缺失/待修复。"
17864
+ },
17865
+ {
17866
+ form: "/novel projects --prune",
17867
+ summary: "只预览失效登记(missing / not-project / unreadable),不写盘。"
17868
+ },
17869
+ {
17870
+ form: "/novel projects --prune --yes",
17871
+ summary: "删除失效登记行,不删项目目录;--yes 不能单独使用。"
17872
+ },
17873
+ {
17874
+ form: "/novel current",
17875
+ summary: "当前会话绑定、选择来源和失效状态。"
17876
+ },
17877
+ {
17878
+ form: "/novel use <路径|书名|.>",
17879
+ summary: "切换当前会话;不改变 active;点号按 cwd 规则选唯一项目。"
17880
+ },
17881
+ {
17882
+ form: "/novel unbind",
17883
+ summary: "只清当前会话绑定;项目、登记和正文都不动。"
17884
+ },
17885
+ {
17886
+ form: "/novel scan",
17887
+ summary: "只读扫描 cwd、cwd/novel 和直接子目录;不递归、不跟随符号链接。"
17888
+ },
17889
+ {
17890
+ form: "/novel scan --register",
17891
+ summary: "只登记健康项目;不选择、不改 active、不绑会话。"
17892
+ }
17893
+ ]
17894
+ },
17895
+ {
17896
+ title: "续写与导出",
17897
+ hint: "resume 只读;export 写入 exports/",
17898
+ items: [
17899
+ {
17900
+ form: "/novel resume",
17901
+ summary: "输出可粘贴的续写指令;只读,与面板“复制续写指令”同源。"
17902
+ },
17903
+ {
17904
+ form: "/novel export md",
17905
+ summary: "正文 Markdown。"
17906
+ },
17907
+ {
17908
+ form: "/novel export txt",
17909
+ summary: "正文纯文本。"
17910
+ },
17911
+ {
17912
+ form: "/novel export epub",
17913
+ summary: "正文 EPUB 3。"
17914
+ },
17915
+ {
17916
+ form: "/novel export outline",
17917
+ summary: "大纲计划。"
17918
+ },
17919
+ {
17920
+ form: "/novel export worldbook",
17921
+ summary: "世界观设定集。"
17922
+ },
17923
+ {
17924
+ form: "/novel export proposal",
17925
+ summary: "书级提案。"
17926
+ }
17927
+ ]
17928
+ },
17929
+ {
17930
+ title: "隐藏与运维",
17931
+ hint: "JSON 必须是对象",
17932
+ items: [{
17933
+ form: "/novel admin",
17934
+ summary: "列出全部 25 个隐藏/运维操作与示例。"
17935
+ }, {
17936
+ form: "/novel admin <op> <json>",
17937
+ summary: "执行一个操作;参数同对应工具,JSON 外层的双引号要保留。"
17938
+ }]
17939
+ }
17940
+ ].reduce((total, group) => total + group.items.length, 0);
17941
+ const ADMIN_OPERATION_NAMES = [
17942
+ {
17943
+ title: "写作、状态与恢复",
17944
+ hint: "参数与同名工具一致",
17945
+ items: [
17946
+ {
17947
+ name: "novel_plan_world",
17948
+ summary: "提交 P1 世界计划"
17949
+ },
17950
+ {
17951
+ name: "novel_plan_chapter",
17952
+ summary: "提交 P2 章节计划"
17953
+ },
17954
+ {
17955
+ name: "novel_word_count",
17956
+ summary: "统计纯文本或项目字数"
17957
+ },
17958
+ {
17959
+ name: "novel_amend",
17960
+ summary: "修复状态文档"
17961
+ },
17962
+ {
17963
+ name: "novel_rollback",
17964
+ summary: "回退阶段"
17965
+ },
17966
+ {
17967
+ name: "novel_diff",
17968
+ summary: "对比文本或章稿"
17969
+ },
17970
+ {
17971
+ name: "novel_audit",
17972
+ summary: "审计 journal"
17973
+ },
17974
+ {
17975
+ name: "novel_pipeline",
17976
+ summary: "下一步建议"
17977
+ },
17978
+ {
17979
+ name: "novel_state",
17980
+ summary: "读取原始状态、历史与备份"
17981
+ },
17982
+ {
17983
+ name: "novel_reopen",
17984
+ summary: "重开已归档章"
17985
+ },
17986
+ {
17987
+ name: "novel_restore",
17988
+ summary: "从备份事务恢复"
17989
+ }
17990
+ ]
17991
+ },
17992
+ {
17993
+ title: "规划、检索与诊断",
17994
+ hint: "书级写操作也在这里",
17995
+ items: [
17996
+ {
17997
+ name: "novel_blueprint",
17998
+ summary: "写书级蓝图与卷"
17999
+ },
18000
+ {
18001
+ name: "novel_outline",
18002
+ summary: "章卡与卷 upsert"
18003
+ },
18004
+ {
18005
+ name: "novel_outline_import",
18006
+ summary: "导入 Markdown / YAML / JSON 大纲"
18007
+ },
18008
+ {
18009
+ name: "novel_worldbook",
18010
+ summary: "按段更新世界观"
18011
+ },
18012
+ {
18013
+ name: "novel_search",
18014
+ summary: "搜索正文、大纲与台账"
18015
+ },
18016
+ {
18017
+ name: "novel_doctor",
18018
+ summary: "项目体检"
18019
+ },
18020
+ {
18021
+ name: "novel_report",
18022
+ summary: "全书报告"
18023
+ },
18024
+ {
18025
+ name: "novel_guide",
18026
+ summary: "引导与下一步"
18027
+ }
18028
+ ]
18029
+ },
18030
+ {
18031
+ title: "导出",
18032
+ hint: "六种 kind 同一入口",
18033
+ items: [{
18034
+ name: "novel_export",
18035
+ summary: "导出正文、大纲、世界观或提案"
18036
+ }]
18037
+ },
18038
+ {
18039
+ title: "登记与设定包",
18040
+ hint: "只走命令入口,不注册工具",
18041
+ items: [
18042
+ {
18043
+ name: "novel_registry_list",
18044
+ summary: "列出登记项目"
18045
+ },
18046
+ {
18047
+ name: "novel_registry_register",
18048
+ summary: "登记一个项目,传 root"
18049
+ },
18050
+ {
18051
+ name: "novel_registry_activate",
18052
+ summary: "改面板默认 active,传 root"
18053
+ },
18054
+ {
18055
+ name: "novel_registry_forget",
18056
+ summary: "删登记行,传 root"
18057
+ },
18058
+ {
18059
+ name: "novel_import",
18060
+ summary: "导入设定包"
18061
+ }
18062
+ ]
18063
+ }
18064
+ ].flatMap((group) => group.items.map((operation) => operation.name));
18065
+ ADMIN_OPERATION_NAMES.length;
17818
18066
  // src/commands/admin.ts
17819
18067
  /** Registry commands need an explicit root; do not pass undefined into path.resolve. */
17820
18068
  const rootArg = (args) => {
@@ -17870,7 +18118,7 @@ const OPERATIONS$1 = {
17870
18118
  novel_registry_forget: (engine, args) => engine.forgetProject({ root: rootArg(args) }),
17871
18119
  novel_import: (engine, args) => engine.importPack(args)
17872
18120
  };
17873
- const ADMIN_OPERATION_NAMES = Object.keys(OPERATIONS$1);
18121
+ Object.keys(OPERATIONS$1);
17874
18122
  const adminHelp = () => [
17875
18123
  "隐藏操作/运维操作(tools.mode=core 时经本命令可达;registry/import 仅命令入口):",
17876
18124
  ...ADMIN_OPERATION_NAMES.map((name) => ` ${name}`),
@@ -0,0 +1,45 @@
1
+ /**
2
+ * User-facing command reference shared by the panel tutorial and command help.
3
+ * Keep this file free of Node-only imports: it is bundled into the browser half.
4
+ */
5
+ export interface CommandSpec {
6
+ readonly form: string;
7
+ readonly summary: string;
8
+ }
9
+ export interface CommandGroup {
10
+ readonly title: string;
11
+ readonly hint: string;
12
+ readonly items: readonly CommandSpec[];
13
+ }
14
+ /** The five registered command entry points, including the umbrella command. */
15
+ export declare const COMMAND_ENTRY: readonly CommandSpec[];
16
+ /**
17
+ * Every named `/novel` form. The bare `/novel` default is listed in COMMAND_ENTRY,
18
+ * so the total here is 25 rather than 26.
19
+ */
20
+ export declare const COMMAND_GROUPS: readonly CommandGroup[];
21
+ /** Number of named `/novel` forms (the bare `/novel` default is separate). */
22
+ export declare const COMMAND_FORM_COUNT: number;
23
+ export interface AdminOperationSpec {
24
+ readonly name: string;
25
+ readonly summary: string;
26
+ }
27
+ export interface AdminOperationGroup {
28
+ readonly title: string;
29
+ readonly hint: string;
30
+ readonly items: readonly AdminOperationSpec[];
31
+ }
32
+ /**
33
+ * Operations reachable through `/novel admin <op> <json>`. This list must stay
34
+ * byte-for-byte aligned with `src/commands/admin.ts`; tests enforce that.
35
+ */
36
+ export declare const ADMIN_OPERATION_GROUPS: readonly AdminOperationGroup[];
37
+ export declare const ADMIN_OPERATION_NAMES: readonly string[];
38
+ export declare const ADMIN_OPERATION_COUNT: number;
39
+ export interface CommandCombination {
40
+ readonly title: string;
41
+ readonly steps: readonly string[];
42
+ readonly note: string;
43
+ }
44
+ /** Copyable workflows; no hidden state changes beyond the listed commands. */
45
+ export declare const COMMAND_COMBINATIONS: readonly CommandCombination[];
@@ -6,7 +6,7 @@ export declare const PANEL_ROUTE = "/api/novel-write-engine/panel";
6
6
  export declare const SKILL_NAME = "novel-write-engine";
7
7
  export declare const REMOTE_VERSION = 6;
8
8
  /** User-visible panel/tutorial version; keep in sync with package.json. */
9
- export declare const PANEL_VERSION = "0.2.10";
9
+ export declare const PANEL_VERSION = "0.2.12";
10
10
  /** The panel is a recent-history view; the wire payload and UI use one cap. */
11
11
  export declare const PANEL_CHAPTER_LIMIT = 30;
12
12
  /** Project-relative locations. Every write goes through these constants. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-novel-write-engine",
3
- "version": "0.2.10",
3
+ "version": "0.2.12",
4
4
  "description": "Novel writing engine for DeepSeek Harness: state machine, gates, rulepacks and ledgers moved from prompts into code.",
5
5
  "keywords": [
6
6
  "dsh-plugin",