mirror of
https://github.com/Narcooo/inkos.git
synced 2026-09-01 15:08:51 +08:00
docs: split README into English/Chinese, fix SVG logo
- README.md: English only, no CI badge - README.zh-CN.md: Chinese only, cross-linked - SVG logo: fix text overflow, reduce font size/letter-spacing - gitignore: exclude article and screenshots
This commit is contained in:
@@ -9,3 +9,5 @@ coverage/
|
||||
SKILL.txt
|
||||
skill.md.txt
|
||||
文本来源.txt
|
||||
article-linuxdo.md
|
||||
assets/screenshot-*.png
|
||||
|
||||
@@ -1,62 +1,39 @@
|
||||
<p align="center">
|
||||
<img src="assets/logo.svg" width="200" height="200" alt="InkOS Logo">
|
||||
<img src="assets/logo.svg" width="180" height="180" alt="InkOS Logo">
|
||||
</p>
|
||||
|
||||
<h1 align="center">InkOS</h1>
|
||||
|
||||
<p align="center">
|
||||
<strong>Multi-Agent Novel Production System</strong><br>
|
||||
<strong>多智能体网文生产系统</strong>
|
||||
<strong>Multi-Agent Novel Production System</strong>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License: MIT"></a>
|
||||
<a href="https://nodejs.org/"><img src="https://img.shields.io/badge/node-%3E%3D20.0.0-brightgreen.svg" alt="Node.js"></a>
|
||||
<a href="https://pnpm.io/"><img src="https://img.shields.io/badge/pnpm-%3E%3D9.0.0-orange.svg" alt="pnpm"></a>
|
||||
<a href="https://github.com/Narcooo/inkos/actions"><img src="https://github.com/Narcooo/inkos/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
|
||||
<a href="#status"><img src="https://img.shields.io/badge/status-alpha-red.svg" alt="Alpha"></a>
|
||||
<a href="https://www.typescriptlang.org/"><img src="https://img.shields.io/badge/TypeScript-5.x-3178C6.svg?logo=typescript&logoColor=white" alt="TypeScript"></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="#why-inkos">English</a> | <a href="#为什么选择-inkos">中文</a>
|
||||
English | <a href="README.zh-CN.md">中文</a>
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
Open-source multi-agent novel production system. AI agents autonomously write, audit, and revise novels — with human review gates that keep you in control.
|
||||
|
||||
开源多智能体网文生产系统。AI 智能体自主写作、审计、修订小说 — 人类审核门控让你始终掌控全局。
|
||||
|
||||
> Inspired by a validated workflow from a [linux.do](https://linux.do) community member who earned $10K+ in 3 months using AI-assisted novel writing.
|
||||
>
|
||||
> 灵感来自 [linux.do](https://linux.do) 社区成员验证的工作流,该成员通过 AI 辅助网文写作在 3 个月内收入超过 $10K。
|
||||
|
||||
---
|
||||
Open-source multi-agent system that autonomously writes, audits, and revises novels — with human review gates that keep you in control.
|
||||
|
||||
## Why InkOS?
|
||||
|
||||
Writing a novel with AI isn't just "prompt and paste." Long-form fiction breaks down fast: characters forget things, items appear from nowhere, the same adjectives repeat every paragraph, and plot threads silently die. InkOS treats these as engineering problems.
|
||||
|
||||
- **Canonical truth files** — track the real state of the world, not what the LLM hallucinates
|
||||
- **Anti-information-leaking** — ensures characters only know what they've actually witnessed
|
||||
- **Anti-information-leaking** — characters only know what they've actually witnessed
|
||||
- **Resource decay** — supplies deplete and items break, no infinite backpacks
|
||||
- **Vocabulary fatigue detection** — catches overused words before your readers do
|
||||
- **Auto-revision** — fixes critical issues (math errors, continuity breaks) before they reach human review
|
||||
- **Vocabulary fatigue detection** — catches overused words before readers do
|
||||
- **Auto-revision** — fixes math errors and continuity breaks before human review
|
||||
|
||||
## 为什么选择 InkOS?
|
||||
|
||||
用 AI 写小说不是简单的"提示词+复制粘贴"。长篇小说很快就会崩:角色记忆混乱、物品凭空出现、同样的形容词每段都在重复、伏笔悄无声息地断了。InkOS 把这些当工程问题来解决。
|
||||
|
||||
- **三大真相文件** — 追踪世界的真实状态,而非 LLM 的幻觉
|
||||
- **反信息泄漏** — 确保角色只知道他们亲眼见证过的事
|
||||
- **资源衰减** — 物资会消耗、物品会损坏,没有无限背包
|
||||
- **词汇疲劳检测** — 在读者发现之前就捕捉过度使用的词语
|
||||
- **自动修订** — 在人工审核之前修复关键问题(数值错误、连续性断裂)
|
||||
|
||||
---
|
||||
|
||||
## How It Works / 工作原理
|
||||
## How It Works
|
||||
|
||||
InkOS runs a multi-agent pipeline for each chapter:
|
||||
|
||||
@@ -68,66 +45,58 @@ InkOS runs a multi-agent pipeline for each chapter:
|
||||
topics outline the outline canonical truth the auditor
|
||||
```
|
||||
|
||||
### Agent Roles / 智能体角色
|
||||
### Agent Roles
|
||||
|
||||
| Agent 智能体 | Responsibility 职责 |
|
||||
| Agent | Responsibility |
|
||||
|-------|---------------|
|
||||
| **Radar** 雷达 | Scans platform trends and reader preferences / 扫描平台趋势和读者偏好 |
|
||||
| **Architect** 建筑师 | Plans chapter structure: outline, scene beats, pacing / 规划章节结构:大纲、场景节拍、节奏 |
|
||||
| **Writer** 写手 | Produces prose from the plan + current world state / 根据大纲+当前世界状态生成正文 |
|
||||
| **Continuity Auditor** 连续性审计员 | Validates draft against canonical truth files / 对照真相文件验证草稿 |
|
||||
| **Reviser** 修订者 | Fixes issues found by auditor / 修复审计发现的问题 |
|
||||
| **Radar** | Scans platform trends and reader preferences to inform story direction |
|
||||
| **Architect** | Plans chapter structure: outline, scene beats, pacing targets |
|
||||
| **Writer** | Produces prose from the plan + current world state |
|
||||
| **Continuity Auditor** | Validates the draft against three canonical truth files |
|
||||
| **Reviser** | Fixes issues found by the auditor — auto-fixes critical problems, flags others for human review |
|
||||
|
||||
### Three Canonical Truth Files / 三大真相文件
|
||||
### Three Canonical Truth Files
|
||||
|
||||
Every book maintains three files as the single source of truth:
|
||||
|
||||
每本书维护三个文件作为唯一事实来源:
|
||||
|
||||
| File 文件 | Purpose 用途 |
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `current_state.md` | World state: locations, relationships, knowledge, emotions / 世界状态:位置、关系、认知、情感 |
|
||||
| `particle_ledger.md` | Resource accounting: items, money, quantities, decay / 资源账本:物品、金钱、数量、衰减 |
|
||||
| `pending_hooks.md` | Open plot threads: foreshadowing, promises, conflicts / 未闭合伏笔:铺垫、承诺、冲突 |
|
||||
| `current_state.md` | World state: character locations, relationships, knowledge, emotional arcs |
|
||||
| `particle_ledger.md` | Resource accounting: items, money, supplies with quantities and decay tracking |
|
||||
| `pending_hooks.md` | Open plot threads: foreshadowing planted, promises to readers, unresolved conflicts |
|
||||
|
||||
The Continuity Auditor checks every draft against these files. If a character "remembers" something they never witnessed, or pulls a weapon they lost two chapters ago, the auditor catches it.
|
||||
|
||||
连续性审计员对照这三个文件检查每一章草稿。如果角色"记起"了他们从未亲眼见过的事,或者拿出了两章前已经丢失的武器,审计员会捕捉到。
|
||||
|
||||
---
|
||||
|
||||
## Architecture / 项目结构
|
||||
## Architecture
|
||||
|
||||
```
|
||||
inkos/
|
||||
├── packages/
|
||||
│ ├── core/ # Agent runtime, pipeline, state / 智能体运行时、管线、状态
|
||||
│ ├── core/ # Agent runtime, pipeline, state management
|
||||
│ │ ├── agents/ # architect, writer, continuity, reviser, radar
|
||||
│ │ ├── pipeline/ # runner (write→audit→revise), scheduler (daemon)
|
||||
│ │ ├── state/ # File-based state manager / 基于文件的状态管理
|
||||
│ │ ├── state/ # File-based state manager
|
||||
│ │ ├── llm/ # OpenAI-compatible provider (streaming)
|
||||
│ │ ├── notify/ # Telegram, Feishu (飞书), WeCom (企业微信)
|
||||
│ │ ├── notify/ # Telegram, Feishu, WeCom
|
||||
│ │ ├── models/ # Zod schemas
|
||||
│ │ └── prompts/ # Agent prompt templates / 提示词模板
|
||||
│ │ └── prompts/ # Agent prompt templates
|
||||
│ └── cli/ # Commander.js CLI
|
||||
│ └── commands/ # init, book, write, review, status, radar, daemon, doctor
|
||||
├── templates/ # Project scaffolding templates / 项目脚手架模板
|
||||
└── (future) studio/ # Web UI / 网页界面
|
||||
│ └── commands/ # init, book, write, review, status, export, etc.
|
||||
├── templates/ # Project scaffolding templates
|
||||
└── (future) studio/ # Web UI for review and editing
|
||||
```
|
||||
|
||||
TypeScript monorepo managed with pnpm workspaces.
|
||||
|
||||
---
|
||||
## Quick Start
|
||||
|
||||
## Quick Start / 快速开始
|
||||
|
||||
### Prerequisites / 前置要求
|
||||
### Prerequisites
|
||||
|
||||
- Node.js >= 20.0.0
|
||||
- pnpm >= 9.0.0
|
||||
- An OpenAI-compatible API key / 一个 OpenAI 兼容的 API Key
|
||||
- An OpenAI-compatible API key
|
||||
|
||||
### Install / 安装
|
||||
### Install
|
||||
|
||||
```bash
|
||||
git clone https://github.com/Narcooo/inkos.git
|
||||
@@ -136,130 +105,97 @@ pnpm install
|
||||
pnpm build
|
||||
```
|
||||
|
||||
### Configure / 配置
|
||||
### Configure
|
||||
|
||||
```bash
|
||||
cp .env.example .env
|
||||
```
|
||||
|
||||
```env
|
||||
# .env
|
||||
OPENAI_API_KEY=sk-your-key-here
|
||||
OPENAI_BASE_URL=https://api.openai.com/v1 # or any compatible endpoint
|
||||
OPENAI_MODEL=gpt-4o
|
||||
|
||||
# Optional: notifications / 可选:通知
|
||||
# Optional: notifications
|
||||
TELEGRAM_BOT_TOKEN=
|
||||
TELEGRAM_CHAT_ID=
|
||||
FEISHU_WEBHOOK_URL=
|
||||
WECOM_WEBHOOK_URL=
|
||||
```
|
||||
|
||||
### Create Your First Book / 创建你的第一本书
|
||||
### Create Your First Book
|
||||
|
||||
```bash
|
||||
# Initialize project / 初始化项目
|
||||
inkos init
|
||||
|
||||
# Create a new book / 创建新书(交互式)
|
||||
inkos book create
|
||||
|
||||
# Write the next chapter / 写下一章(运行完整智能体管线)
|
||||
inkos write next
|
||||
|
||||
# Review the latest draft / 审阅最新草稿
|
||||
inkos review
|
||||
|
||||
# Check project status / 查看项目状态
|
||||
inkos status
|
||||
inkos init # Initialize project
|
||||
inkos book create # Create a new book (interactive)
|
||||
inkos write next # Write next chapter (full agent pipeline)
|
||||
inkos review # Review the latest draft
|
||||
inkos status # Check project status
|
||||
```
|
||||
|
||||
---
|
||||
## CLI Reference
|
||||
|
||||
## CLI Reference / 命令参考
|
||||
|
||||
| Command 命令 | Description 说明 |
|
||||
| Command | Description |
|
||||
|---------|-------------|
|
||||
| `inkos init` | Initialize project / 初始化项目 |
|
||||
| `inkos book create` | Create a new book (interactive) / 创建新书 |
|
||||
| `inkos write next` | Run agent pipeline for next chapter / 智能体管线写下一章 |
|
||||
| `inkos write rewrite <n>` | Rewrite chapter N (restores state snapshot) / 重写第 N 章 |
|
||||
| `inkos review` | Review and approve/reject draft / 审阅草稿 |
|
||||
| `inkos review approve-all <id>` | Batch approve all pending chapters / 批量通过所有待审章节 |
|
||||
| `inkos status` | Show project and book status / 项目状态 |
|
||||
| `inkos export <id>` | Export book to txt/md / 导出书籍 |
|
||||
| `inkos radar` | Scan platform trends / 扫描平台趋势 |
|
||||
| `inkos config` | View/update configuration / 查看/更新配置 |
|
||||
| `inkos doctor` | Diagnose setup issues / 诊断配置问题 |
|
||||
| `inkos up` | Start daemon mode / 启动守护进程 |
|
||||
| `inkos down` | Stop daemon / 停止守护进程 |
|
||||
| `inkos init` | Initialize a new InkOS project |
|
||||
| `inkos book create` | Create a new book (interactive) |
|
||||
| `inkos write next` | Run the agent pipeline to produce the next chapter |
|
||||
| `inkos write rewrite <n>` | Rewrite chapter N (restores state snapshot) |
|
||||
| `inkos review` | Review and approve/reject the latest draft |
|
||||
| `inkos review approve-all <id>` | Batch approve all pending chapters |
|
||||
| `inkos status` | Show project and book status |
|
||||
| `inkos export <id>` | Export book to txt/md |
|
||||
| `inkos radar` | Run the Radar agent to scan platform trends |
|
||||
| `inkos config` | View or update project configuration |
|
||||
| `inkos doctor` | Diagnose setup issues |
|
||||
| `inkos up` | Start daemon mode |
|
||||
| `inkos down` | Stop the daemon |
|
||||
|
||||
---
|
||||
## Key Features
|
||||
|
||||
## Key Features / 核心特性
|
||||
|
||||
### State Snapshots / 状态快照
|
||||
### State Snapshots
|
||||
|
||||
Every chapter automatically creates a state snapshot. Use `inkos write rewrite <n>` to roll back and regenerate any chapter — world state, resource ledger, and plot hooks all restore to the pre-chapter state.
|
||||
|
||||
每章自动创建状态快照。使用 `inkos write rewrite <n>` 可以回滚并重新生成任意章节 — 世界状态、资源账本、伏笔钩子全部恢复到该章写入前的状态。
|
||||
### Write Lock
|
||||
|
||||
### Write Lock / 写入锁
|
||||
File-based locking prevents concurrent writes to the same book.
|
||||
|
||||
File-based locking prevents concurrent writes to the same book — no more duplicate chapters from parallel processes.
|
||||
|
||||
基于文件的锁机制防止对同一本书的并发写入 — 不再出现并行进程产生重复章节的问题。
|
||||
|
||||
### Daemon Mode / 守护进程模式
|
||||
### Daemon Mode
|
||||
|
||||
`inkos up` starts an autonomous loop that writes chapters on a schedule. The pipeline runs fully unattended for non-critical issues, but pauses for human review when the auditor flags problems it cannot auto-fix.
|
||||
|
||||
`inkos up` 启动自主循环,按计划写章。管线对非关键问题全自动运行,但当审计员标记无法自动修复的问题时会暂停等待人工审核。
|
||||
Notifications via Telegram, Feishu, or WeCom.
|
||||
|
||||
Notifications via Telegram, Feishu (飞书), or WeCom (企业微信).
|
||||
## Status
|
||||
|
||||
通过 Telegram、飞书或企业微信发送通知。
|
||||
**Early alpha.** The core pipeline works, but expect breaking changes.
|
||||
|
||||
---
|
||||
What works:
|
||||
- Full agent pipeline (architect -> writer -> continuity auditor -> reviser)
|
||||
- File-based state management with canonical truth files
|
||||
- CLI for project init, book creation, writing, review, export
|
||||
- State snapshots and chapter rewrite
|
||||
- Notification dispatch (Telegram, Feishu, WeCom)
|
||||
- Daemon mode with scheduler
|
||||
|
||||
## Status / 项目状态
|
||||
What's planned:
|
||||
- `packages/studio` — web UI for review, editing, and book management
|
||||
- Plugin system for custom agents
|
||||
- Multi-LLM routing (different models for different agents)
|
||||
- Export to platform-specific formats
|
||||
|
||||
**Early alpha / 早期 alpha 阶段。** The core pipeline works, but expect breaking changes.
|
||||
## Contributing
|
||||
|
||||
核心管线可用,但预计会有破坏性变更。
|
||||
|
||||
What works / 已实现:
|
||||
- Full agent pipeline (architect → writer → continuity auditor → reviser) / 完整智能体管线
|
||||
- File-based state management with canonical truth files / 基于文件的状态管理 + 真相文件
|
||||
- CLI for project init, book creation, writing, review, export / 完整 CLI
|
||||
- State snapshots and chapter rewrite / 状态快照和章节重写
|
||||
- Notification dispatch (Telegram, Feishu, WeCom) / 通知推送
|
||||
- Daemon mode with scheduler / 守护进程模式
|
||||
- 102 unit tests / 102 个单元测试
|
||||
|
||||
What's planned / 规划中:
|
||||
- `packages/studio` — web UI for review and editing / 网页审阅编辑界面
|
||||
- Plugin system for custom agents / 自定义智能体插件系统
|
||||
- Multi-LLM routing (different models for different agents) / 多模型路由
|
||||
- Export to platform-specific formats (起点, 番茄, etc.) / 平台格式导出
|
||||
|
||||
---
|
||||
|
||||
## Contributing / 贡献
|
||||
|
||||
Contributions welcome. This is early-stage software — if you're interested in AI-assisted creative writing infrastructure, open an issue or PR.
|
||||
|
||||
欢迎贡献。这是早期阶段的软件 — 如果你对 AI 辅助创作基础设施感兴趣,欢迎提 issue 或 PR。
|
||||
Contributions welcome. Open an issue or PR.
|
||||
|
||||
```bash
|
||||
pnpm install
|
||||
pnpm dev # watch mode / 监听模式
|
||||
pnpm test # run tests / 运行测试
|
||||
pnpm typecheck # type-check / 类型检查
|
||||
pnpm dev # watch mode for all packages
|
||||
pnpm test # run tests
|
||||
pnpm typecheck # type-check without emitting
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## License
|
||||
|
||||
[MIT](LICENSE)
|
||||
|
||||
+201
@@ -0,0 +1,201 @@
|
||||
<p align="center">
|
||||
<img src="assets/logo.svg" width="180" height="180" alt="InkOS Logo">
|
||||
</p>
|
||||
|
||||
<h1 align="center">InkOS</h1>
|
||||
|
||||
<p align="center">
|
||||
<strong>多智能体网文生产系统</strong>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License: MIT"></a>
|
||||
<a href="https://nodejs.org/"><img src="https://img.shields.io/badge/node-%3E%3D20.0.0-brightgreen.svg" alt="Node.js"></a>
|
||||
<a href="https://pnpm.io/"><img src="https://img.shields.io/badge/pnpm-%3E%3D9.0.0-orange.svg" alt="pnpm"></a>
|
||||
<a href="https://www.typescriptlang.org/"><img src="https://img.shields.io/badge/TypeScript-5.x-3178C6.svg?logo=typescript&logoColor=white" alt="TypeScript"></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="README.md">English</a> | 中文
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
开源多智能体网文生产系统。AI 智能体自主完成写作、审计、修订的完整流程 — 人类审核门控让你始终掌控全局。
|
||||
|
||||
## 为什么需要 InkOS?
|
||||
|
||||
用 AI 写小说不是简单的"提示词 + 复制粘贴"。长篇小说很快就会崩:角色记忆混乱、物品凭空出现、同样的形容词每段都在重复、伏笔悄无声息地断掉。InkOS 把这些当工程问题来解决。
|
||||
|
||||
- **三大真相文件** — 追踪世界的真实状态,而非 LLM 的幻觉
|
||||
- **反信息泄漏** — 确保角色只知道他们亲眼见证过的事
|
||||
- **资源衰减** — 物资会消耗、物品会损坏,没有无限背包
|
||||
- **词汇疲劳检测** — 在读者发现之前就捕捉过度使用的词语
|
||||
- **自动修订** — 在人工审核之前修复数值错误和连续性断裂
|
||||
|
||||
## 工作原理
|
||||
|
||||
InkOS 为每一章运行多智能体管线:
|
||||
|
||||
```
|
||||
雷达 ──> 建筑师 ──> 写手 ──> 连续性审计员 ──> 修订者
|
||||
│ │ │ │ │
|
||||
扫描 规划 根据大纲 对照真相文件 修复审计员
|
||||
平台 章节 +当前状态 验证草稿 发现的问题
|
||||
趋势 结构 生成正文
|
||||
```
|
||||
|
||||
### 智能体角色
|
||||
|
||||
| 智能体 | 职责 |
|
||||
|--------|------|
|
||||
| **雷达 Radar** | 扫描平台趋势和读者偏好,指导故事方向 |
|
||||
| **建筑师 Architect** | 规划章节结构:大纲、场景节拍、节奏控制 |
|
||||
| **写手 Writer** | 根据大纲 + 当前世界状态生成正文 |
|
||||
| **连续性审计员 Auditor** | 对照三大真相文件验证草稿 |
|
||||
| **修订者 Reviser** | 修复审计发现的问题 — 关键问题自动修复,其他标记给人工审核 |
|
||||
|
||||
### 三大真相文件
|
||||
|
||||
每本书维护三个文件作为唯一事实来源:
|
||||
|
||||
| 文件 | 用途 |
|
||||
|------|------|
|
||||
| `current_state.md` | 世界状态:角色位置、关系网络、已知信息、情感弧线 |
|
||||
| `particle_ledger.md` | 资源账本:物品、金钱、物资数量及衰减追踪 |
|
||||
| `pending_hooks.md` | 未闭合伏笔:铺垫、对读者的承诺、未解决冲突 |
|
||||
|
||||
连续性审计员对照这三个文件检查每一章草稿。如果角色"记起"了从未亲眼见过的事,或者拿出了两章前已经丢失的武器,审计员会捕捉到。
|
||||
|
||||
## 项目结构
|
||||
|
||||
```
|
||||
inkos/
|
||||
├── packages/
|
||||
│ ├── core/ # 智能体运行时、管线、状态管理
|
||||
│ │ ├── agents/ # architect, writer, continuity, reviser, radar
|
||||
│ │ ├── pipeline/ # runner (写→审→改), scheduler (守护进程)
|
||||
│ │ ├── state/ # 基于文件的状态管理器
|
||||
│ │ ├── llm/ # OpenAI 兼容接口 (流式)
|
||||
│ │ ├── notify/ # Telegram, 飞书, 企业微信
|
||||
│ │ ├── models/ # Zod schema 校验
|
||||
│ │ └── prompts/ # 提示词模板
|
||||
│ └── cli/ # Commander.js 命令行
|
||||
│ └── commands/ # init, book, write, review, status, export 等
|
||||
├── templates/ # 项目脚手架模板
|
||||
└── (规划中) studio/ # 网页审阅编辑界面
|
||||
```
|
||||
|
||||
TypeScript 单仓库,pnpm workspaces 管理。
|
||||
|
||||
## 快速开始
|
||||
|
||||
### 前置要求
|
||||
|
||||
- Node.js >= 20.0.0
|
||||
- pnpm >= 9.0.0
|
||||
- OpenAI 兼容的 API Key
|
||||
|
||||
### 安装
|
||||
|
||||
```bash
|
||||
git clone https://github.com/Narcooo/inkos.git
|
||||
cd inkos
|
||||
pnpm install
|
||||
pnpm build
|
||||
```
|
||||
|
||||
### 配置
|
||||
|
||||
```bash
|
||||
cp .env.example .env
|
||||
```
|
||||
|
||||
```env
|
||||
OPENAI_API_KEY=sk-your-key-here
|
||||
OPENAI_BASE_URL=https://api.openai.com/v1 # 或任何兼容端点
|
||||
OPENAI_MODEL=gpt-4o
|
||||
|
||||
# 可选:通知推送
|
||||
TELEGRAM_BOT_TOKEN=
|
||||
TELEGRAM_CHAT_ID=
|
||||
FEISHU_WEBHOOK_URL=
|
||||
WECOM_WEBHOOK_URL=
|
||||
```
|
||||
|
||||
### 创建你的第一本书
|
||||
|
||||
```bash
|
||||
inkos init # 初始化项目
|
||||
inkos book create # 创建新书(交互式)
|
||||
inkos write next # 写下一章(运行完整智能体管线)
|
||||
inkos review # 审阅最新草稿
|
||||
inkos status # 查看项目状态
|
||||
```
|
||||
|
||||
## 命令参考
|
||||
|
||||
| 命令 | 说明 |
|
||||
|------|------|
|
||||
| `inkos init` | 初始化项目 |
|
||||
| `inkos book create` | 创建新书 |
|
||||
| `inkos write next` | 智能体管线写下一章 |
|
||||
| `inkos write rewrite <n>` | 重写第 N 章(恢复状态快照) |
|
||||
| `inkos review` | 审阅并通过/拒绝草稿 |
|
||||
| `inkos review approve-all <id>` | 批量通过所有待审章节 |
|
||||
| `inkos status` | 项目状态 |
|
||||
| `inkos export <id>` | 导出书籍为 txt/md |
|
||||
| `inkos radar` | 扫描平台趋势 |
|
||||
| `inkos config` | 查看/更新配置 |
|
||||
| `inkos doctor` | 诊断配置问题 |
|
||||
| `inkos up` | 启动守护进程模式 |
|
||||
| `inkos down` | 停止守护进程 |
|
||||
|
||||
## 核心特性
|
||||
|
||||
### 状态快照
|
||||
|
||||
每章自动创建状态快照。使用 `inkos write rewrite <n>` 可以回滚并重新生成任意章节 — 世界状态、资源账本、伏笔钩子全部恢复到该章写入前的状态。
|
||||
|
||||
### 写入锁
|
||||
|
||||
基于文件的锁机制防止对同一本书的并发写入。
|
||||
|
||||
### 守护进程模式
|
||||
|
||||
`inkos up` 启动自主循环,按计划写章。管线对非关键问题全自动运行,当审计员标记无法自动修复的问题时暂停等待人工审核。
|
||||
|
||||
通过 Telegram、飞书或企业微信推送通知。
|
||||
|
||||
## 项目状态
|
||||
|
||||
**早期 alpha 阶段。** 核心管线可用,预计会有破坏性变更。
|
||||
|
||||
已实现:
|
||||
- 完整智能体管线(建筑师 → 写手 → 连续性审计员 → 修订者)
|
||||
- 基于文件的状态管理 + 三大真相文件
|
||||
- 完整 CLI(初始化、建书、写作、审阅、导出)
|
||||
- 状态快照和章节重写
|
||||
- 通知推送(Telegram、飞书、企业微信)
|
||||
- 守护进程模式
|
||||
|
||||
规划中:
|
||||
- `packages/studio` — 网页审阅编辑界面
|
||||
- 自定义智能体插件系统
|
||||
- 多模型路由(不同智能体用不同模型)
|
||||
- 平台格式导出(起点、番茄等)
|
||||
|
||||
## 参与贡献
|
||||
|
||||
欢迎贡献代码。这是早期阶段的软件,欢迎提 issue 或 PR。
|
||||
|
||||
```bash
|
||||
pnpm install
|
||||
pnpm dev # 监听模式
|
||||
pnpm test # 运行测试
|
||||
pnpm typecheck # 类型检查
|
||||
```
|
||||
|
||||
## 许可证
|
||||
|
||||
[MIT](LICENSE)
|
||||
+18
-20
@@ -29,38 +29,36 @@
|
||||
<circle cx="256" cy="256" r="210" fill="none" stroke="#533483" stroke-width="1.5" stroke-dasharray="12 6" opacity="0.6"/>
|
||||
|
||||
<!-- Ink drop shape - main icon -->
|
||||
<path d="M256 80 C256 80, 340 190, 340 270 C340 316, 302 360, 256 360 C210 360, 172 316, 172 270 C172 190, 256 80, 256 80Z"
|
||||
<path d="M256 70 C256 70, 345 185, 345 268 C345 317, 305 362, 256 362 C207 362, 167 317, 167 268 C167 185, 256 70, 256 70Z"
|
||||
fill="url(#dropGrad)" stroke="#e94560" stroke-width="2.5" filter="url(#glow)"/>
|
||||
|
||||
<!-- Quill nib inside the drop -->
|
||||
<path d="M256 140 L240 280 L256 310 L272 280 Z"
|
||||
<path d="M256 130 L238 278 L256 312 L274 278 Z"
|
||||
fill="url(#penGrad)" opacity="0.9"/>
|
||||
|
||||
<!-- Quill split line -->
|
||||
<line x1="256" y1="180" x2="256" y2="300" stroke="#1a1a2e" stroke-width="2" opacity="0.5"/>
|
||||
<line x1="256" y1="170" x2="256" y2="302" stroke="#1a1a2e" stroke-width="2" opacity="0.5"/>
|
||||
|
||||
<!-- Circuit nodes around the drop -->
|
||||
<circle cx="190" cy="200" r="4" fill="#e94560" opacity="0.8"/>
|
||||
<circle cx="322" cy="200" r="4" fill="#e94560" opacity="0.8"/>
|
||||
<circle cx="170" cy="290" r="4" fill="#e94560" opacity="0.8"/>
|
||||
<circle cx="342" cy="290" r="4" fill="#e94560" opacity="0.8"/>
|
||||
<!-- Circuit nodes -->
|
||||
<circle cx="185" cy="195" r="4" fill="#e94560" opacity="0.8"/>
|
||||
<circle cx="327" cy="195" r="4" fill="#e94560" opacity="0.8"/>
|
||||
<circle cx="165" cy="290" r="4" fill="#e94560" opacity="0.8"/>
|
||||
<circle cx="347" cy="290" r="4" fill="#e94560" opacity="0.8"/>
|
||||
|
||||
<!-- Circuit lines connecting nodes -->
|
||||
<line x1="190" y1="200" x2="170" y2="290" stroke="#e94560" stroke-width="1.5" opacity="0.4"/>
|
||||
<line x1="322" y1="200" x2="342" y2="290" stroke="#e94560" stroke-width="1.5" opacity="0.4"/>
|
||||
<!-- Circuit lines -->
|
||||
<line x1="185" y1="195" x2="165" y2="290" stroke="#e94560" stroke-width="1.5" opacity="0.4"/>
|
||||
<line x1="327" y1="195" x2="347" y2="290" stroke="#e94560" stroke-width="1.5" opacity="0.4"/>
|
||||
|
||||
<!-- Data flow dots -->
|
||||
<circle cx="150" cy="240" r="2.5" fill="#e94560" opacity="0.6"/>
|
||||
<circle cx="362" cy="240" r="2.5" fill="#e94560" opacity="0.6"/>
|
||||
<circle cx="256" cy="370" r="2.5" fill="#e94560" opacity="0.6"/>
|
||||
<circle cx="148" cy="240" r="2.5" fill="#e94560" opacity="0.6"/>
|
||||
<circle cx="364" cy="240" r="2.5" fill="#e94560" opacity="0.6"/>
|
||||
|
||||
<!-- Text: InkOS -->
|
||||
<text x="256" y="430" text-anchor="middle" font-family="'SF Pro Display', 'Helvetica Neue', Arial, sans-serif" font-size="52" font-weight="700" fill="#ffffff" letter-spacing="6">
|
||||
InkOS
|
||||
</text>
|
||||
<text x="256" y="420" text-anchor="middle" font-family="'Helvetica Neue', Arial, sans-serif" font-size="48" font-weight="700" fill="#ffffff" letter-spacing="4">InkOS</text>
|
||||
|
||||
<!-- Subtitle -->
|
||||
<text x="256" y="460" text-anchor="middle" font-family="'SF Pro Display', 'Helvetica Neue', Arial, sans-serif" font-size="14" fill="#e94560" letter-spacing="4" opacity="0.9">
|
||||
MULTI-AGENT NOVEL ENGINE
|
||||
</text>
|
||||
<text x="256" y="452" text-anchor="middle" font-family="'Helvetica Neue', Arial, sans-serif" font-size="13" fill="#e94560" letter-spacing="2" opacity="0.9">MULTI-AGENT NOVEL ENGINE</text>
|
||||
|
||||
<!-- Chinese subtitle -->
|
||||
<text x="256" y="474" text-anchor="middle" font-family="'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="11" fill="#ffffff" opacity="0.5">多智能体网文生产系统</text>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
Reference in New Issue
Block a user