dsh-novel 0.1.0
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/LICENSE +21 -0
- package/README.md +149 -0
- package/cordis.patch.yml +3 -0
- package/lib/client.js +1560 -0
- package/lib/client.js.map +1 -0
- package/lib/index.js +1436 -0
- package/lib/index.js.map +1 -0
- package/lib/types/client/NovelWorkspaceView.d.ts +3 -0
- package/lib/types/client/entity-client.d.ts +17 -0
- package/lib/types/client/index.d.ts +3 -0
- package/lib/types/client/noveel-shapes.d.ts +1 -0
- package/lib/types/client/novel-api.d.ts +1 -0
- package/lib/types/client/section-icons.d.ts +5 -0
- package/lib/types/client/sections/ChapterSection.d.ts +2 -0
- package/lib/types/client/sections/LevelSection.d.ts +2 -0
- package/lib/types/client/sections/ListDetailSection.d.ts +13 -0
- package/lib/types/client/sections/OutlineSection.d.ts +2 -0
- package/lib/types/client/sections/OverviewSection.d.ts +2 -0
- package/lib/types/client/sections/SkillSection.d.ts +3 -0
- package/lib/types/client/sections/TimelineSection.d.ts +2 -0
- package/lib/types/client/sections/WorldSection.d.ts +2 -0
- package/lib/types/client/sections/owned-sections.d.ts +4 -0
- package/lib/types/client/sections/types.d.ts +14 -0
- package/lib/types/client/styles.d.ts +1 -0
- package/lib/types/client/ui/EntitySidebar.d.ts +10 -0
- package/lib/types/client/ui/RelationPanel.d.ts +6 -0
- package/lib/types/client/ui/TemplateRead.d.ts +13 -0
- package/lib/types/client/ui/TimelinePanel.d.ts +8 -0
- package/lib/types/client/ui/controls.d.ts +22 -0
- package/lib/types/client/ui/live-reload.d.ts +2 -0
- package/lib/types/index.d.ts +5 -0
- package/lib/types/novel/contract.d.ts +2 -0
- package/lib/types/novel/defaults.d.ts +66 -0
- package/lib/types/novel/domains.d.ts +12 -0
- package/lib/types/novel/host-skills.d.ts +58 -0
- package/lib/types/novel/http.d.ts +5 -0
- package/lib/types/novel/normalize-entity.d.ts +18 -0
- package/lib/types/novel/noveel-shapes.d.ts +98 -0
- package/lib/types/novel/outline-labels.d.ts +10 -0
- package/lib/types/novel/schema.d.ts +3 -0
- package/lib/types/novel/seed.d.ts +27 -0
- package/lib/types/novel/store.d.ts +96 -0
- package/lib/types/novel/template-fields.d.ts +17 -0
- package/lib/types/novel/timeline-labels.d.ts +2 -0
- package/lib/types/novel/tools.d.ts +3 -0
- package/package.json +77 -0
- package/seed/skills/chapter//345/216/273AI/345/221/263/344/270/216/350/264/250/346/243/200.md +34 -0
- package/seed/skills/chapter//345/257/271/350/257/235/344/270/216/346/203/205/347/273/252.md +52 -0
- package/seed/skills/chapter//347/253/240/350/212/202/346/225/260/346/215/256/347/273/264/346/212/244.md +61 -0
- package/seed/skills/chapter//347/253/240/350/212/202/350/212/202/345/245/217/344/270/216/345/274/200/345/244/264.md +61 -0
- package/seed/skills/chapter//347/253/240/351/246/226/351/222/251/345/255/220.md +40 -0
- package/seed/skills/creature//345/274/202/345/205/275/344/270/216/347/201/265/346/244/215.md +11 -0
- package/seed/skills/creature//347/224/237/347/211/251/346/241/243/346/241/210/350/246/201/347/264/240.md +13 -0
- package/seed/skills/genres//344/273/231/344/276/240/overview//351/242/230/346/235/220/350/247/204/345/210/231.md +32 -0
- package/seed/skills/genres//344/273/231/344/276/240/review/outline//345/244/247/347/272/262/345/256/241/346/237/245.md +21 -0
- package/seed/skills/genres//345/216/206/345/217/262/overview//351/242/230/346/235/220/350/247/204/345/210/231.md +32 -0
- package/seed/skills/genres//345/216/206/345/217/262/review/outline//345/244/247/347/272/262/345/256/241/346/237/245.md +21 -0
- package/seed/skills/genres//346/202/254/347/226/221/overview//351/242/230/346/235/220/350/247/204/345/210/231.md +33 -0
- package/seed/skills/genres//346/202/254/347/226/221/review/outline//345/244/247/347/272/262/345/256/241/346/237/245.md +21 -0
- package/seed/skills/genres//346/234/253/344/270/226/overview//351/242/230/346/235/220/350/247/204/345/210/231.md +33 -0
- package/seed/skills/genres//346/234/253/344/270/226/review/outline//345/244/247/347/272/262/345/256/241/346/237/245.md +21 -0
- package/seed/skills/genres//347/216/204/345/271/273/overview//351/242/230/346/235/220/350/247/204/345/210/231.md +32 -0
- package/seed/skills/genres//347/216/204/345/271/273/review/outline//345/244/247/347/272/262/345/256/241/346/237/245.md +22 -0
- package/seed/skills/genres//347/247/221/345/271/273/overview//351/242/230/346/235/220/350/247/204/345/210/231.md +33 -0
- package/seed/skills/genres//347/247/221/345/271/273/review/outline//345/244/247/347/272/262/345/256/241/346/237/245.md +21 -0
- package/seed/skills/genres//350/250/200/346/203/205/overview//351/242/230/346/235/220/350/247/204/345/210/231.md +31 -0
- package/seed/skills/genres//350/250/200/346/203/205/review/outline//345/244/247/347/272/262/345/256/241/346/237/245.md +21 -0
- package/seed/skills/genres//351/203/275/345/270/202/overview//351/242/230/346/235/220/350/247/204/345/210/231.md +32 -0
- package/seed/skills/genres//351/203/275/345/270/202/review/outline//345/244/247/347/272/262/345/256/241/346/237/245.md +21 -0
- package/seed/skills/item//346/265/201/350/275/254/344/270/216/345/275/222/345/261/236.md +22 -0
- package/seed/skills/item//347/211/251/345/223/201/346/241/243/346/241/210/350/246/201/347/264/240.md +13 -0
- package/seed/skills/level//346/210/220/351/225/277/344/270/216/347/210/275/347/202/271.md +44 -0
- package/seed/skills/level//350/203/275/345/212/233/344/270/216/344/273/243/344/273/267.md +42 -0
- package/seed/skills/outline//345/211/247/346/203/205/351/252/250/346/236/266/346/265/201/346/260/264/347/272/277.md +51 -0
- package/seed/skills/outline//347/273/223/346/236/204/344/270/216/345/215/267/347/253/240/346/250/241/346/235/277.md +68 -0
- package/seed/skills/outline//351/273/204/351/207/221/344/270/211/347/253/240/344/270/216/351/252/214/346/224/266.md +42 -0
- package/seed/skills/overview//345/215/226/347/202/271/344/270/216/345/256/232/344/275/215.md +52 -0
- package/seed/skills/overview//345/274/200/344/271/246/347/247/215/345/255/220.md +60 -0
- package/seed/skills/overview//346/240/207/351/242/230/345/210/233/344/275/234.md +43 -0
- package/seed/skills/review/chapter//347/253/240/350/212/202/345/256/241/346/237/245.md +72 -0
- package/seed/skills/review/outline//345/244/247/347/272/262/345/256/241/346/237/245.md +74 -0
- package/seed/skills/role//344/272/272/347/211/251/345/241/221/351/200/240.md +52 -0
- package/seed/skills/role//345/205/263/347/263/273/344/270/216/351/205/215/350/247/222.md +53 -0
- package/seed/skills/role//350/247/222/350/211/262/346/241/243/346/241/210.md +52 -0
- package/seed/skills/timeline//344/272/213/344/273/266/350/275/264/350/247/204/345/210/222.md +33 -0
- package/seed/skills/timeline//347/212/266/346/200/201/345/220/214/346/255/245.md +41 -0
- package/seed/skills/world//344/270/226/347/225/214/350/247/204/345/210/231.md +30 -0
- package/seed/skills/world//344/274/217/347/254/224/350/264/246/346/234/254.md +44 -0
- package/seed/skills/world//345/212/277/345/212/233/344/270/216/345/234/260/345/233/276.md +52 -0
- package/seed/skills/writing-style/da-feng-da-geng-ren/STYLE.md +132 -0
- package/seed/skills/writing-style/da-feng-da-geng-ren/meta.json +6 -0
- package/seed/skills/writing-style/hei-dao-da-feng/STYLE.md +144 -0
- package/seed/skills/writing-style/hei-dao-da-feng/meta.json +6 -0
- package/seed/skills/writing-style/hei-dao-xie-huang/STYLE.md +139 -0
- package/seed/skills/writing-style/hei-dao-xie-huang/meta.json +6 -0
- package/seed/templates//344/273/231/344/276/240.json +1322 -0
- package/seed/templates//345/216/206/345/217/262.json +1318 -0
- package/seed/templates//346/202/254/347/226/221.json +1318 -0
- package/seed/templates//346/234/253/344/270/226.json +1127 -0
- package/seed/templates//347/216/204/345/271/273.json +1322 -0
- package/seed/templates//347/247/221/345/271/273.json +1322 -0
- package/seed/templates//350/250/200/346/203/205.json +1318 -0
- package/seed/templates//351/203/275/345/270/202.json +1318 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 ddedook
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="assets/novel.png" alt="DSH Novel:会话「内容」页里的人物档案" width="100%">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
<a href="https://github.com/ddedook/dsh-novel"><img src="https://img.shields.io/github/stars/ddedook/dsh-novel?style=flat&label=%E2%98%85&color=08C" alt="GitHub stars"></a>
|
|
7
|
+
<img src="https://img.shields.io/badge/DSH-Plugin-08C?style=flat" alt="DeepSeek Harness plugin">
|
|
8
|
+
<img src="https://img.shields.io/badge/storage-PGlite-336791?style=flat" alt="PGlite">
|
|
9
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-2EA44F?style=flat" alt="MIT License"></a>
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
<h1 align="center">dsh-novel</h1>
|
|
13
|
+
|
|
14
|
+
<h3 align="center">DeepSeek Harness 的标准小说插件:一个工作区目录就是一本小说。</h3>
|
|
15
|
+
|
|
16
|
+
在官方 Web UI 的会话里打开 **内容** 页,人物、世界、大纲和章节都落在同一份 canon 里。Agent 通过工具读写,你在侧栏里核对。
|
|
17
|
+
|
|
18
|
+
## 安装
|
|
19
|
+
|
|
20
|
+
从 GitHub 装进任意 DSH profile:
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
dsh plugin add github:ddedook/dsh-novel
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Git 安装拉的是源码。pnpm ≥10 第一次可能会拦住安装时构建:按 CLI 提示,把 `dsh-novel` 写进该 profile 的 `pnpm-workspace.yaml`,再重新执行上面的 `add`:
|
|
27
|
+
|
|
28
|
+
```yaml
|
|
29
|
+
allowBuilds:
|
|
30
|
+
dsh-novel: true
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
从 npm:
|
|
34
|
+
|
|
35
|
+
```sh
|
|
36
|
+
dsh plugin add dsh-novel
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
从本地仓库:
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
dsh plugin add /path/to/dsh-novel
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
装完后重启 Harness,会话顶部会出现 **内容** 页。
|
|
46
|
+
|
|
47
|
+
## 一本小说怎么写
|
|
48
|
+
|
|
49
|
+
1. 左侧打开或新建会话,并绑定一个空目录作为工作区。
|
|
50
|
+
2. 对话里输入 `/novel-create`,可选书名和题材(如「玄幻」)。插件会写入 `.dsh-novel`、建 PGlite,并播种模板与技能。
|
|
51
|
+
3. Agent 只做开书设定:概述、世界、人物、等级、时间线。**这一步不写大纲和章节。**
|
|
52
|
+
4. 设定写完后,用 `/novel-outline` 出大纲,再用 `/novel-chapter` 写正文。
|
|
53
|
+
5. 随时切到 **内容** 页查看档案、关系、时间线和章节。
|
|
54
|
+
|
|
55
|
+
已经是小说工作区时,`/novel-create` 会直接忽略,不会改书名或题材。
|
|
56
|
+
|
|
57
|
+
## 功能
|
|
58
|
+
|
|
59
|
+
<table>
|
|
60
|
+
<tr>
|
|
61
|
+
<td width="50%" valign="top">
|
|
62
|
+
<h3>会话「内容」页</h3>
|
|
63
|
+
<p>在对话旁浏览概述、世界树、人物(详情 / 关系 / 时间线)、生物、物品、等级、全书时间线、大纲、章节和技能。字段标签来自题材模板。</p>
|
|
64
|
+
</td>
|
|
65
|
+
<td width="50%" valign="top">
|
|
66
|
+
<h3>一本一库</h3>
|
|
67
|
+
<p>每个工作区目录一份 <code>.dsh-novel/pglite</code>。设定、实体、技能和文风都存在这本书自己的数据库里,换目录就是换书。</p>
|
|
68
|
+
</td>
|
|
69
|
+
</tr>
|
|
70
|
+
<tr>
|
|
71
|
+
<td width="50%" valign="top">
|
|
72
|
+
<h3>写作技能</h3>
|
|
73
|
+
<p>内置开书、人物、世界、大纲、章节和审查技能;Agent 按模块加载。大纲和章节必须由用户显式调用斜杠命令,避免设定阶段提前开写。</p>
|
|
74
|
+
</td>
|
|
75
|
+
<td width="50%" valign="top">
|
|
76
|
+
<h3>题材模板与文风</h3>
|
|
77
|
+
<p>玄幻、仙侠、科幻、都市、言情、历史、悬疑、末世各有一份表单模板。内置文风包括大奉打更人风、黑道邪皇风等,可按书切换。</p>
|
|
78
|
+
</td>
|
|
79
|
+
</tr>
|
|
80
|
+
</table>
|
|
81
|
+
|
|
82
|
+
## 内容分区
|
|
83
|
+
|
|
84
|
+
| 分区 | 存什么 |
|
|
85
|
+
| --- | --- |
|
|
86
|
+
| 概述 | 书名、题材、卖点、blueprint |
|
|
87
|
+
| 世界 | 世界树(规则、势力、地图、伏笔) |
|
|
88
|
+
| 人物 | 档案、关系、人物时间线 |
|
|
89
|
+
| 生物 | 异兽与灵植 |
|
|
90
|
+
| 物品 | 档案与流转归属 |
|
|
91
|
+
| 等级 | 体系、能力与代价 |
|
|
92
|
+
| 时间线 | 全书事件轴(含伏笔 / 冲突 / 悬念) |
|
|
93
|
+
| 大纲 | 卷章结构 |
|
|
94
|
+
| 章节 | 正文 |
|
|
95
|
+
| 技能 | 本书自己的写作 / 审查技能行 |
|
|
96
|
+
|
|
97
|
+
## 斜杠命令与模块技能
|
|
98
|
+
|
|
99
|
+
| 命令 | 谁能调用 | 做什么 |
|
|
100
|
+
| --- | --- | --- |
|
|
101
|
+
| `/novel-create` | 用户 / 模型 | 初始化工作区并写开书设定,不写大纲和章节 |
|
|
102
|
+
| `/novel-outline` | 用户 | 写大纲 |
|
|
103
|
+
| `/novel-chapter` | 用户 | 写章节 |
|
|
104
|
+
|
|
105
|
+
其余模块技能由模型在需要时加载:`novel-overview`、`novel-world`、`novel-role`、`novel-creature`、`novel-item`、`novel-level`、`novel-timeline`、`novel-review`。
|
|
106
|
+
|
|
107
|
+
技能正文存在这本书的数据库里,可在 **内容 → 技能** 里改;改的是本书目录,不是插件包里的种子文件。
|
|
108
|
+
|
|
109
|
+
## Host 工具
|
|
110
|
+
|
|
111
|
+
Agent 用这些工具读写 canon(工作区路径默认为会话 cwd):
|
|
112
|
+
|
|
113
|
+
| 工具 | 作用 |
|
|
114
|
+
| --- | --- |
|
|
115
|
+
| `novel_status` / `novel_create` | 检查或初始化小说工作区 |
|
|
116
|
+
| `get_novel` / `update_novel` | 读、改书名、题材、概述 blueprint |
|
|
117
|
+
| `describe_schema` | 列出实体域 |
|
|
118
|
+
| `query_entities` / `get_entities` / `mutate_entities` / `delete_entity` | 实体 CRUD |
|
|
119
|
+
| `get_template` / `save_template` | 读、换表单模板 |
|
|
120
|
+
| `skill_list` / `upsert_skill` / `delete_skill` | 本书技能行 |
|
|
121
|
+
| `list_writing_styles` | 列出可用文风 |
|
|
122
|
+
|
|
123
|
+
实体域包括 `role`、`roleRelation`、`roleTimeline`、`world`、`creature`、`item`、`level`、`timeline`、`outline`、`chapter` 等。写入时字段用模板的顶层 key,不要包进 `profile`。
|
|
124
|
+
|
|
125
|
+
Web 客户端走同源 JSON API:`/dsh-novel/api`。
|
|
126
|
+
|
|
127
|
+
## 开发
|
|
128
|
+
|
|
129
|
+
```sh
|
|
130
|
+
corepack pnpm install
|
|
131
|
+
corepack pnpm check
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
`check` 会构建、类型检查并跑测试。插件入口是 Host 的 `src/index.ts` 和客户端的 `src/client/index.ts`;种子模板和技能在 `seed/`。
|
|
135
|
+
|
|
136
|
+
```sh
|
|
137
|
+
corepack pnpm test
|
|
138
|
+
corepack pnpm build
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## License
|
|
142
|
+
|
|
143
|
+
本项目遵循 [MIT License](LICENSE)。
|
|
144
|
+
|
|
145
|
+
本项目是基于 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 构建的社区插件,并非 DeepSeek 官方产品。
|
|
146
|
+
|
|
147
|
+
本项目完全开源免费。如果有人向您以任何形式出售此软件,请拒绝交易。
|
|
148
|
+
|
|
149
|
+
DeepSeek 是 DeepSeek AI 的商标。dsh-novel 是独立的社区项目,与 DeepSeek 官方没有隶属关系,也未获得其背书。
|
package/cordis.patch.yml
ADDED