Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion .codex-backups/last-debug-cleanup-path.txt

This file was deleted.

Empty file.
Empty file.
Empty file.
Empty file.
14 changes: 0 additions & 14 deletions .cursor/debug-2b6adb.log

This file was deleted.

42 changes: 42 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "08:30"
timezone: "Asia/Shanghai"
open-pull-requests-limit: 5
labels:
- "dependencies"
commit-message:
prefix: "chore(deps)"
include: "scope"
groups:
typescript-tooling:
patterns:
- "typescript"
- "tsx"
- "tslib"
- "@types/*"
eslint:
patterns:
- "eslint"
- "eslint-*"
- "@eslint/*"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "08:30"
timezone: "Asia/Shanghai"
open-pull-requests-limit: 3
labels:
- "dependencies"
- "ci"
commit-message:
prefix: "ci(deps)"
include: "scope"
3 changes: 2 additions & 1 deletion .github/workflows/desktop-beta-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ jobs:
AI_NOVEL_RELEASE_CHANNEL: beta
AI_NOVEL_GITHUB_OWNER: ExplosiveCoderflome
AI_NOVEL_GITHUB_REPO: AI-Novel-Writing-Assistant
AI_NOVEL_WINDOWS_PUBLISHER_NAME: AI Novel Writing Assistant Team
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CSC_LINK: ${{ secrets.WINDOWS_CSC_LINK }}
CSC_KEY_PASSWORD: ${{ secrets.WINDOWS_CSC_KEY_PASSWORD }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Setup pnpm
uses: pnpm/action-setup@v4
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/desktop-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,25 @@ on:
push:
tags:
- "v*"
- "desktop-v*"

permissions:
contents: write

jobs:
publish-release:
if: ${{ startsWith(github.ref_name, 'desktop-v') || !contains(github.ref_name, '-') }}
if: ${{ !contains(github.ref_name, '-') }}
runs-on: windows-latest
env:
AI_NOVEL_RELEASE_CHANNEL: release
AI_NOVEL_ALLOW_UNSIGNED_RELEASE: "true"
AI_NOVEL_GITHUB_OWNER: ExplosiveCoderflome
AI_NOVEL_GITHUB_REPO: AI-Novel-Writing-Assistant
AI_NOVEL_WINDOWS_PUBLISHER_NAME: AI Novel Writing Assistant Team
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CSC_LINK: ${{ secrets.WINDOWS_CSC_LINK }}
CSC_KEY_PASSWORD: ${{ secrets.WINDOWS_CSC_KEY_PASSWORD }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Setup pnpm
uses: pnpm/action-setup@v4
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
node_modules/
.cursor/
*.log
tmp/
dist/
.turbo/
.DS_Store
.env
.env.local
dev.db
m[[]0])
client/.env
client/.env.local
server/.env
Expand Down
20 changes: 20 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,26 @@
- If a build is triggered manually or from a non-matching tag, treat it as verification or packaging only. It must not be treated as a valid public release upload.
- If the required `vX.Y.Z` tag and `desktop/package.json` version are not aligned, stop before upload, fix the version/tag pair first, and then rerun the release flow.

## Desktop Runtime Debugging Rules

- For packaged desktop bugs, do not assume a source fix has reached the executable just because a rebuild or packaging command ran.
- First verify the packaged runtime behavior from the actual desktop logs before changing more code.
- For portable builds, inspect the runtime logs under the portable data directory beside the executable, for example `*-data/logs/desktop-main.log`.
- When debugging packaged prompt or LLM issues, capture and compare at least:
- the concrete API route;
- the prompt id or task label when available;
- the structured strategy actually used, such as `json_schema`, `json_object`, or `prompt_json`;
- the latest error text, especially whether it changed after a rebuild.
- If the packaged log shows the strategy or stack has changed, treat that as a new layer of failure and re-evaluate the root cause instead of continuing under the previous assumption.

### Packaged Runtime Lessons

- When multiple unpacked or packaged desktop instances exist, always identify the fresh runtime by its new startup timestamp and bound server port before trusting any later log line. Old `desktop-main.log` failure records can remain in the same file and must not be mistaken for the current run.
- For live verification, pair desktop log inspection with runtime API checks such as `/api/llm/model-routes`, `/api/llm/structured-fallback`, and the active director task snapshot. This is the fastest way to prove whether route normalization, fallback policy, and the current failure layer actually changed in the packaged app.
- For OpenAI-compatible structured prompts, the real packaged path may start at `json_schema` even when the stored route format is `prompt_json`. Shared transport resilience must therefore cover `json_schema -> json_object -> prompt_json -> direct chat fallback`, not only direct `prompt_json` failures.
- Timeout-governance tests for structured calls must use real abort semantics. Test doubles that immediately throw `fetch failed` can hide timeout-specific behavior and produce false conclusions about whether direct fallback should run.
- When shared structured fallback has demonstrably taken over a transport path, prefer removing duplicated service-local retries while preserving only the final prompt-family-specific direct-call hop needed for packaged-runtime parity.

## Prompt Governance

- `server/src/prompting/` is the only allowed entrypoint for adding new product-level prompts.
Expand Down
29 changes: 9 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,25 +124,15 @@

完整历史更新见 [docs/releases/release-notes.md](./docs/releases/release-notes.md)。

### 2026-05-08

自动导演主链完成一次完整发布整合:从新手开书、方向确认、后台执行、章节拆分、正文生成、审校修复、状态回灌到任务恢复,都更接近“一句想法持续推进成一本书”的连续体验。

- 新手可以从“新手上路”、首页、小说列表和小说工作台进入更清晰的自动导演路线,按系统推荐完成模型配置、AI 开书、方向确认和章节执行。
- 自动导演支持更完整的整本自动推进:系统会准备故事规划、角色资产、卷战略、节奏拆章、章节任务单、正文、审校、修复和状态同步,普通质量问题优先由 AI 继续处理。
- 每本小说拥有统一的 AI 驾驶舱和任务投影,能看到当前进展、阻塞原因、下一步动作、后台队列、最近事件、产物摘要和 AI 用量,减少在小说页、任务中心和弹窗之间来回猜状态。
- 后台执行链更稳定:候选生成、方向确认、接管继续、恢复、重试、取消、章节执行和质量修复逐步收口到统一运行事实,服务重启或任务中断后更容易从最近安全进度继续。
- 自动导演候选生成的继续路径更可靠:书级候选方案生成中断后,后台继续和重试会沿用当前运行步骤继续生成,减少卡在 0% 并提示缺少执行器的情况。
- 章节执行更可靠:系统按真实章节产物判断可执行范围,缺少任务单或场景拆解时先回到节奏 / 拆章补齐,指定章节范围完成后按本次范围验收,不再误报后续章节未写导致的中断。
- 质量闭环更适合新手:章节审校、局部修复、整章重写、窗口重规划、质量预算和质量待回收会形成连续判断,能先推进整本书,再集中处理可回收质量问题。
- 写法、提示词和上下文能力进一步统一:写法参考会先净化为可迁移指导,产品级提示词纳入提示词资产和上下文经纪层,方便后续稳定调参和排查。
- 提示词工作台可以更清楚地查看每个提示词的上下文需求、可安全调整的表达槽位、锁定字段和资料检查结果,方便先确认小说资料是否齐全,再进入后续提示词优化。
- 提示词工作台支持自定义补充要求:可以为章节写作、章节审校和章节修复设置全局或单本小说要求,启用后作为额外上下文参与生成,不覆盖内置提示词。
- 提示词列表优先展示可补充的提示词,方便先处理章节写作、审校和修复这类主要生成链路。
- 开发启动体验更顺:前端页面可以先显示本地创作服务连接中,等待服务可用后自动进入工作台,减少刚打开页面就看到加载错误。
- 桌面客户端进入 `0.3.1` 正式发布,用于承载本次整合后的公开客户端构建和启动体验优化。
- 桌面客户端推进到 `0.3.2`,用于发布候选生成继续路径修复后的 Windows 客户端包。
- 桌面客户端推进到 `0.3.3`,用于发布提示词工作台和自定义补充要求能力后的 Windows 客户端包。
### 2026-05-10

桌面版自动导演的结构化调用治理和打包稳定性继续收口:OpenAI 兼容模型在候选生成、故事规划、角色准备和分卷战略里的共享降级路径更稳定,恢复中的整本流程已经能穿过旧的角色阵容故障层,继续推进到卷战略与卷骨架阶段;fresh 打包时的 Prisma 运行时装配和 electron-builder 兼容问题也做了补强。

- 桌面版在 fresh runtime 上已经确认:角色阵容生成和修复都能继续推进,不再停在旧的首层传输错误。
- 自动导演恢复后已从角色准备推进到卷战略与卷骨架生成,让长链路开书更接近持续自动完成。
- 结构化协议与共享降级路径更集中,后续桌面版排错可以更快判断当前真实失败层。
- 旧库存量缺字段的工作区分析和手动改文影响分析更稳,书级 framing 与故事宏观规划在 OpenAI 兼容端点上的兜底也更一致。
- fresh 打包时更不容易被 Prisma 运行时版本漂移或 electron-builder 兼容问题卡住。

## 功能预览
### 功能概览中的95%以上编写都是AI完成
Expand Down Expand Up @@ -620,4 +610,3 @@ docs/ 设计文档、阶段检查点、模块计划与历史归档
- 请遵守开源协议条款,并在适用场景下取得相应授权。

贡献说明:新贡献默认按 [CLA.md](./CLA.md) 提交,可随项目按 AGPL-3.0-only 分发,并可纳入项目维护者另行提供的商业授权;详见 [CONTRIBUTING.md](./CONTRIBUTING.md)。

4 changes: 2 additions & 2 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@
"zustand": "^5.0.11"
},
"devDependencies": {
"@types/node": "^25.3.3",
"@types/node": "^25.6.2",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react": "^5.1.4",
"autoprefixer": "^10.4.27",
"postcss": "^8.5.8",
"tailwindcss": "^3.4.17",
"typescript": "^5.9.3",
"typescript": "^6.0.3",
"vite": "^7.3.1",
"vite-plugin-pages": "^0.33.3"
}
Expand Down
1 change: 1 addition & 0 deletions client/src/api/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ export interface ModelRoutesResponse {
maxTokens: number | null;
requestProtocol: ModelRouteRequestProtocol;
structuredResponseFormat: ModelRouteStructuredResponseFormat;
requestHeadersText: string | null;
}>;
}

Expand Down
Loading