@waterwx/dsh-novel-forge 1.3.2 → 1.4.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/src/index.ts CHANGED
@@ -7,6 +7,8 @@
7
7
  * changes.
8
8
  */
9
9
 
10
+ import { homedir } from 'node:os'
11
+ import { join } from 'node:path'
10
12
  import type { Context } from '@deepseek-ai/cordis'
11
13
  import { installSettingsSection, settingsNamespace } from '@deepseek-ai/dsh-settings'
12
14
  import z from 'schemastery'
@@ -69,8 +71,8 @@ export interface Config {
69
71
  export const Config: z<Config> = z.object({
70
72
  announceToAgent: z.boolean().default(true),
71
73
  enabled: z.boolean().default(true),
72
- outlinePath: z.string().default('D:\\ryan work\\harness\\novels\\归墟玉主\\《归墟玉主》全书大纲_重新排版版.docx'),
73
- outputDir: z.string().default('D:\\ryan work\\harness\\novels\\归墟玉主'),
74
+ outlinePath: z.string().default(''),
75
+ outputDir: z.string().default(join(homedir(), '.dsh', 'novels')),
74
76
  provider: z.string().default('deepseek-official'),
75
77
  model: z.string().default('deepseek-v4-flash'),
76
78
  reasoningEffort: z.union(['off', 'low', 'high', 'max']).default('off'),
@@ -87,8 +89,8 @@ export const Config: z<Config> = z.object({
87
89
 
88
90
  /** Schema defaults, re-read for hand-built test contexts. */
89
91
  const DEFAULT_ANNOUNCE = true
90
- const DEFAULT_OUTLINE_PATH = 'D:\\ryan work\\harness\\novels\\归墟玉主\\《归墟玉主》全书大纲_重新排版版.docx'
91
- const DEFAULT_OUTPUT_DIR = 'D:\\ryan work\\harness\\novels\\归墟玉主'
92
+ const DEFAULT_OUTLINE_PATH = ''
93
+ const DEFAULT_OUTPUT_DIR = join(homedir(), '.dsh', 'novels')
92
94
  const DEFAULT_PROVIDER = 'deepseek-official'
93
95
  const DEFAULT_MODEL = 'deepseek-v4-flash'
94
96
  const DEFAULT_REASONING_EFFORT = 'off' as const
@@ -103,7 +105,7 @@ const DEFAULT_AUTO_REVIEW_AFTER_REVISE = true
103
105
  const SECTION_ORDER = 160
104
106
 
105
107
  /** Model-facing announcement: plugin presence, capabilities, and limits. */
106
- export const NOVEL_GUIDANCE = '本机已安装 dsh-novel-forge 插件(AI 编译小说工作台):侧边栏「小说工坊」入口。能力:读取 docx 大纲(默认 D:\\ryan work\\harness\\novels\\归墟玉主 大纲)或粘贴大纲文本;用 LLM 提炼道藏(人设/世界观/金手指规则/写作红线,即设定圣经);生成卷计划与章节计划;逐章调用 LLM 生成 3000-4000 字正文并保存为 Markdown(默认输出到 D:\\ryan work\\harness\\novels\\归墟玉主);每章自动生成摘要(叙事记忆)、自动 AI 审稿(人设/设定/红线/文笔/爽点/逻辑),支持按审稿意见重写、去 AI 味润色、暗线(伏笔)管理、批量连写与全本导出(txt/md)。限制:生成消耗 LLM API 额度;输出目录与模型可在插件设置中修改;章节正文质量取决于大纲完整度。用户提到「小说 / 大纲 / 写小说 / 章节 / 审稿 / 润色 / 归墟玉主」时即指本插件,请据此协作。'
108
+ export const NOVEL_GUIDANCE = '本机已安装 dsh-novel-forge 插件(AI 编译小说工作台):侧边栏「小说工坊」入口。能力:读取 docx 大纲或粘贴大纲文本;用 LLM 提炼道藏(人设/世界观/金手指规则/写作红线,即设定圣经);生成卷计划与章节计划;逐章调用 LLM 生成 3000-4000 字正文并保存为 Markdown(默认输出到用户主目录 ~/.dsh/novels);每章自动生成摘要(叙事记忆)、自动 AI 审稿(人设/设定/红线/文笔/爽点/逻辑),支持按审稿意见重写、去 AI 味润色、暗线(伏笔)管理、批量连写与全本导出(txt/md)。限制:生成消耗 LLM API 额度;输出目录与模型可在插件设置中修改;章节正文质量取决于大纲完整度。用户提到「小说 / 大纲 / 写小说 / 章节 / 审稿 / 润色」时即指本插件,请据此协作。'
107
109
 
108
110
  /** Resolve a config-like value into the full runtime config. */
109
111
  export function resolveConfig(value: Partial<Config> | undefined): NovelConfig {