打通 appearance/motive 从生成→schema→契约→落库→前端整条穿线 (DB 列早在初始迁移、此前一直 NULL,无新迁移),并原子重切人物 内驱口径。 - @llm: CharacterCard/character-gen.md 加 appearance/motive(给默认值守 解析韧性),重切——动机唯一落 motive、traits 只留核心/表层/阴影三层、 arc 引用 motive;regen prompt_hashes.json 金标准。 - @backend: CharacterCardView + CharacterWriteRepo/SqlCharacterWriteRepo (create + update backfill 分支)+ CharacterWriteFields + 路由双向形变 与 _existing_characters 带上两字段。 - @frontend: pnpm gen:api 重生成 TS 客户端;CharacterCardItem 展示/编辑 两字段。 - 测试: schema 默认值/解析、动机不双写重切回归、card_to_view 双向、 ingest 透传、list 暴露、SqlCharacterWriteRepo create/backfill 真 pg 集成。
3743 lines
119 KiB
TypeScript
3743 lines
119 KiB
TypeScript
/**
|
||
* This file was auto-generated by openapi-typescript.
|
||
* Do not make direct changes to the file.
|
||
*/
|
||
|
||
export interface paths {
|
||
"/": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/** Root */
|
||
get: operations["root__get"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/health": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/** Health */
|
||
get: operations["health_health_get"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/jobs/{job_id}": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/** Get Job */
|
||
get: operations["get_job_jobs__job_id__get"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/projects": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/** List Projects */
|
||
get: operations["list_projects_projects_get"];
|
||
put?: never;
|
||
/** Create Project */
|
||
post: operations["create_project_projects_post"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/projects/{project_id}": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/** Get Project */
|
||
get: operations["get_project_projects__project_id__get"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/projects/{project_id}/chapters/{chapter_no}/injection": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* Get Injection
|
||
* @description 本章注入透明(B0,读端点):回放确定性 SelectionTrace + 作者覆盖。无 LLM、无 commit。
|
||
*
|
||
* 项目不存在 → 404;无大纲 → selected: [](不报错)。看到的=写章用的(不变量 #6)。
|
||
*/
|
||
get: operations["get_injection_projects__project_id__chapters__chapter_no__injection_get"];
|
||
/**
|
||
* Save Injection
|
||
* @description 本章注入覆盖(B0 可控版,写端点):存 pin/排除/recent_n → 回放新的确定性 selected。
|
||
*
|
||
* 项目不存在 → 404。upsert 只 flush,端点末尾 commit。覆盖是确定性输入,draft 端点同读,
|
||
* 故「看到的=写章用的」仍成立(不变量 #6 的作者兜底)。
|
||
*/
|
||
put: operations["save_injection_projects__project_id__chapters__chapter_no__injection_put"];
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/projects/{project_id}/chapters/{chapter_no}/draft": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* Get Draft
|
||
* @description 读取已保存草稿(含正文),供工作台重访时重载编辑器(镜像 GET /outline 读侧)。
|
||
*
|
||
* 复用 `chapter_repo.get_draft`(与续审 `_resolve_review_draft` 同一读 seam);只读不写库。
|
||
* 无草稿行(含空正文)→ 404 NOT_FOUND,工作台据此呈现空编辑器(与其它「缺资源」端点一致)。
|
||
* 多版本时该读取固定返草稿版次(DRAFT_VERSION)这条可编辑工作副本,与 PUT 保存的同一行。
|
||
*/
|
||
get: operations["get_draft_projects__project_id__chapters__chapter_no__draft_get"];
|
||
/**
|
||
* Save Draft
|
||
* @description 自动保存:幂等 upsert 草稿(同章节覆盖同一行,版次不爆炸)。
|
||
*/
|
||
put: operations["save_draft_projects__project_id__chapters__chapter_no__draft_put"];
|
||
/**
|
||
* Stream Draft
|
||
* @description 流式写章草稿:组装记忆(含作者注入覆盖 + 本章指令)→ 网关流 → 归一 SSE → event-stream。
|
||
*
|
||
* `body.directive`(可选,T4-b)是临时本章指令,直通 assemble→volatile(不持久化);
|
||
* 无 body 的旧调用方仍可用(向后兼容)。
|
||
*
|
||
* 项目不存在 → 404(在触网关前 fail-fast):否则非法 project_id 会静默烧一次付费/限流的
|
||
* LLM 调用并返回 200(QA C1)。
|
||
*/
|
||
post: operations["stream_draft_projects__project_id__chapters__chapter_no__draft_post"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/projects/{project_id}/chapters/{chapter_no}/review": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
/**
|
||
* Review Chapter
|
||
* @description 续审(SSE):组审稿上下文 → 跑审稿子图 → 归一为 section/conflict/done 事件。
|
||
*
|
||
* 提交边界:网关 ledger + collect 经 review_repo.record 均只 flush;端点在**流耗尽后**
|
||
* `await session.commit()`(镜像 draft 端点,否则记账/留痕静默丢失)。
|
||
*/
|
||
post: operations["review_chapter_projects__project_id__chapters__chapter_no__review_post"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/projects/{project_id}/chapters/{chapter_no}/reviews": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* List Reviews
|
||
* @description 审稿历史(新→旧):供前端审稿页加载既往审稿留痕 + 裁决。
|
||
*/
|
||
get: operations["list_reviews_projects__project_id__chapters__chapter_no__reviews_get"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/projects/{project_id}/chapters/{chapter_no}/accept": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
/**
|
||
* Accept Chapter
|
||
* @description 验收事务 + 冲突 gate(§5.5):gate(事务前)→ 终稿提炼 digest(事务外,R2)→
|
||
* 单原子事务(晋升 + digest + 裁决留痕)→ 一次 commit → 登记**验收后伏笔到期扫描**
|
||
* BackgroundTask(M3-b/d,§6.2)。
|
||
*
|
||
* 到期扫描接 §5.5 步骤 3 的 `TODO(M3)` 占位:验收提交成功**后**,把
|
||
* `current_ch > expected_close_to AND status≠CLOSED` 的伏笔确定性置 OVERDUE。
|
||
* 伏笔登记/回收(PARTIAL/CLOSED)的「采纳建议」经作者经 foreshadow 端点显式确认,
|
||
* 不在验收事务里 AI 静默改库(不变量 #3)。**§7.4 持久性局限**:BackgroundTask 进程内
|
||
* 跑、重启丢失——原型可接受(见 `services/foreshadow_scan.py`,不引入 jobs 表)。
|
||
*/
|
||
post: operations["accept_chapter_projects__project_id__chapters__chapter_no__accept_post"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/projects/{project_id}/foreshadow": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* List Foreshadow
|
||
* @description 伏笔看板:按 `status` 过滤(缺省=全部),按 code 升序。
|
||
*
|
||
* 项目不存在 → 404(与写端点一致,避免不存在 project 返回误导性空 200)。
|
||
* `status` 非法(不在 OPEN/PARTIAL/CLOSED/OVERDUE)→ VALIDATION 信封。四泳道前端
|
||
* 据 `status` 分组;OVERDUE 泳道 + 逾期标记用 `expected_close_to`(看板字段已齐)。
|
||
*/
|
||
get: operations["list_foreshadow_projects__project_id__foreshadow_get"];
|
||
put?: never;
|
||
/**
|
||
* Register Foreshadow
|
||
* @description 登记一条伏笔(status=OPEN)。重复 `code` → DB 唯一约束冲突 → VALIDATION 信封。
|
||
*/
|
||
post: operations["register_foreshadow_projects__project_id__foreshadow_post"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/projects/{project_id}/foreshadow/{code}": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
/**
|
||
* Update Foreshadow
|
||
* @description 状态机转移 和/或 追加进展。非法转移 → VALIDATION 信封;不存在 → NOT_FOUND。
|
||
*
|
||
* `to_status` 与 `progress_entry` 皆可选;两者都缺 → VALIDATION(无操作)。先转移、后追加。
|
||
*/
|
||
patch: operations["update_foreshadow_projects__project_id__foreshadow__code__patch"];
|
||
trace?: never;
|
||
};
|
||
"/projects/{project_id}/outline": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* Get Outline
|
||
* @description 读取已持久化的大纲(逐章,按 chapter_no 升序)。
|
||
*
|
||
* 可选 `?volume=N`:只返回该卷的章节(前端按卷切换);不传 → 全部章节(向后兼容)。
|
||
* 项目不存在 → 404;项目存在但尚无大纲(或该卷无章节)→ 200 空列表(非 404)。
|
||
* DB `outline.beats` 是 JSONB `{"beats": [...]}` → 解包成裸 `list[str]`(与 POST 响应同形,
|
||
* 前端 OpenAPI 类型对齐)。读侧复用 C5 assemble 的 `OutlineRepo`,不写库。
|
||
*/
|
||
get: operations["get_outline_projects__project_id__outline_get"];
|
||
put?: never;
|
||
/**
|
||
* Generate Outline
|
||
* @description 生成大纲并逐章持久化。无凭据 → LLM_UNAVAILABLE;项目不存在 → NOT_FOUND。
|
||
*/
|
||
post: operations["generate_outline_projects__project_id__outline_post"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/projects/{project_id}/rules": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* List Rules
|
||
* @description 规则列表(带 id,供前端删除 handle)。项目不存在 → 404(QA MEDIUM:此前返误导性空 200)。
|
||
*/
|
||
get: operations["list_rules_projects__project_id__rules_get"];
|
||
put?: never;
|
||
/**
|
||
* Create Rule
|
||
* @description 新增一条规则(201)。非法 level / 空 content → FastAPI 422;项目不存在 → 404。
|
||
*
|
||
* 项目存在性须在 insert 前校验:否则 FK 违例会逃逸成 500(QA H2),而非干净的 404。
|
||
*/
|
||
post: operations["create_rule_projects__project_id__rules_post"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/projects/{project_id}/rules/{rule_id}": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
post?: never;
|
||
/**
|
||
* Delete Rule
|
||
* @description 删除一条本作品规则(204)。项目不存在 → 404;规则不存在 / 不属于该项目 → 404。
|
||
*
|
||
* 删规则是**作者显式动作**(不变量 #3:规则增删不经 AI 静默写库)。repo.delete 只 flush,
|
||
* 端点提交;删不到行(未知 id / 跨项目)→ 不提交、抛 404。
|
||
*/
|
||
delete: operations["delete_rule_projects__project_id__rules__rule_id__delete"];
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/projects/{project_id}/style": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* Get Style
|
||
* @description 取最新文风指纹(完整 16 维 + 证据 + 版本)。项目不存在 → 404;无指纹 → 404。
|
||
*/
|
||
get: operations["get_style_projects__project_id__style_get"];
|
||
put?: never;
|
||
/**
|
||
* Learn Style
|
||
* @description 学文风:写一行 job 返 202,提取经 BackgroundTask 异步跑。
|
||
*
|
||
* 项目不存在 → 404;无凭据 → 503(在调度 job 前拦下)。`mode` 不影响落库逻辑
|
||
* (写侧始终 append 新版本,version+1 自动),仅供前端区分首学/更新语义。
|
||
*/
|
||
post: operations["learn_style_projects__project_id__style_post"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/projects/{project_id}/chapters/{chapter_no}/refine": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
/**
|
||
* Refine Segment
|
||
* @description 同步回炉:writer 网关纯文本重写选中段,返回 {original, refined}。
|
||
*
|
||
* 项目不存在 → 404;无凭据 → 503。不写库(不变量 #3);末尾 `commit()` 让网关
|
||
* usage_ledger 落库(add-only,否则记账静默丢失,同 draft/review 纪律)。
|
||
*/
|
||
post: operations["refine_segment_projects__project_id__chapters__chapter_no__refine_post"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/templates": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* List Templates
|
||
* @description 列出当前用户(stub)的模板。
|
||
*/
|
||
get: operations["list_templates_templates_get"];
|
||
put?: never;
|
||
/**
|
||
* Create Template
|
||
* @description 新建模板(201)。title/body 空 → FastAPI 422(schema `min_length=1`)。
|
||
*/
|
||
post: operations["create_template_templates_post"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/templates/{template_id}": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
post?: never;
|
||
/**
|
||
* Delete Template
|
||
* @description 删除模板(204)。不存在 → 404 NOT_FOUND。
|
||
*/
|
||
delete: operations["delete_template_templates__template_id__delete"];
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/projects/{project_id}/world/generate": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
/**
|
||
* Generate World
|
||
* @description 生成世界观实体预览(不持久化;作者确认后另入库)。无凭据 → 503;项目不存在 → 404。
|
||
*/
|
||
post: operations["generate_world_projects__project_id__world_generate_post"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/projects/{project_id}/characters/generate": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
/**
|
||
* Generate Characters
|
||
* @description 生成角色卡预览(不持久化;注入已有角色防雷同)。无凭据 → 503;项目不存在 → 404。
|
||
*/
|
||
post: operations["generate_characters_projects__project_id__characters_generate_post"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/projects/{project_id}/characters": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* List Characters
|
||
* @description 已入库角色全量列表(设定库 Codex 真源;复用 C5 读侧 SqlCharacterRepo)。
|
||
*
|
||
* 项目不存在 → 404(与写端点一致,避免不存在 project 返回误导性空 200)。
|
||
* DB JSONB dict 列 → API list/str 反向解包(入库形变的逆向,见 `_existing_characters`)。
|
||
*/
|
||
get: operations["list_characters_projects__project_id__characters_get"];
|
||
put?: never;
|
||
/**
|
||
* Ingest Characters
|
||
* @description 入库作者确认的角色卡。有 continuity 冲突且未确认 → 409;越权写表丢弃 + 审计。
|
||
*/
|
||
post: operations["ingest_characters_projects__project_id__characters_post"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/projects/{project_id}/world_entities": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* List World Entities
|
||
* @description 已入库世界观实体全量列表(设定库 Codex 真源;复用 C5 读侧 SqlWorldEntityRepo)。
|
||
*
|
||
* 项目不存在 → 404(与写端点一致)。
|
||
* DB `rules` JSONB dict `{"rules":[...]}` → 裸 list(worldbuilder 形变的逆向)。
|
||
*/
|
||
get: operations["list_world_entities_projects__project_id__world_entities_get"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/skills": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* List Skills
|
||
* @description 技能库列表(按 name 升序)。技能库 UI 用。
|
||
*/
|
||
get: operations["list_skills_skills_get"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/skills/toolbox": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* List Toolbox
|
||
* @description 创作工具箱全量描述符(legacy + 新工具;前端据此渲染卡片栅格 + 表单 + 路由)。
|
||
*/
|
||
get: operations["list_toolbox_skills_toolbox_get"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/projects/{project_id}/skills/{tool_key}/generate": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
/**
|
||
* Generate With Tool
|
||
* @description 通用生成(结构化预览,不入库)。未知/ legacy 工具→404;项目不存在→404;无凭据→503。
|
||
*/
|
||
post: operations["generate_with_tool_projects__project_id__skills__tool_key__generate_post"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/projects/{project_id}/skills/{tool_key}/ingest": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
/**
|
||
* Ingest With Tool
|
||
* @description 通用入库(仅可入库工具):过 continuity 预检 + 白名单 → 写 ingest.table。
|
||
*
|
||
* 未知/legacy 工具→404;不可入库工具→422;有冲突且未确认→409;越权写表丢弃+审计。
|
||
*/
|
||
post: operations["ingest_with_tool_projects__project_id__skills__tool_key__ingest_post"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/projects/{project_id}/chains/{chain_key}/run": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
/**
|
||
* Run Chain
|
||
* @description 发起多章链:写一行 job 返 202,链经 BackgroundTask 异步跑。
|
||
*
|
||
* 项目不存在 → 404;未知 chain_key → 404;无凭据 → 503(dep 解析阶段拦下);
|
||
* `count` 越界由 schema Field 在解析阶段 → 422。`gateway` 仅做请求阶段凭据探测——
|
||
* 链本体在 BackgroundTask 里用独立 session 重建网关跑(请求 session 即将关闭)。
|
||
*/
|
||
post: operations["run_chain_projects__project_id__chains__chain_key__run_post"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/projects/{project_id}/chains/runs/{job_id}/resume": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
/**
|
||
* Resume Chain
|
||
* @description 裁决续跑:仅当 job=awaiting_input,带裁决经 BackgroundTask resume。
|
||
*
|
||
* 项目不存在 → 404;job 不存在 / 不属于该项目 → 404(同案,不枚举);非 awaiting 态 →
|
||
* 409(CONFLICT)。`awaiting→running` 在 HTTP 处理器内**原子抢占**(条件 UPDATE),避免两个
|
||
* 并发 resume 都过守卫后双 `Command(resume=...)` 损坏图(审评 #3);抢不到(已被并发抢走/非
|
||
* awaiting)→ 409。resume 经 `Command(resume=decisions)` 从 interrupt 续跑(同 thread_id)。
|
||
*/
|
||
post: operations["resume_chain_projects__project_id__chains_runs__job_id__resume_post"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/settings/providers": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/** List Providers */
|
||
get: operations["list_providers_settings_providers_get"];
|
||
/** Upsert Providers */
|
||
put: operations["upsert_providers_settings_providers_put"];
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/settings/providers/test": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
/** Test Connection */
|
||
post: operations["test_connection_settings_providers_test_post"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/settings/providers/kimi-code/oauth/start": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
/**
|
||
* Start Oauth
|
||
* @description 发起 device authorization:返回 202 + user_code/verification_uri,后台轮询 token。
|
||
*
|
||
* 创建一行 `jobs(kind="kimi_oauth")`(202 前持久化供轮询)→ 调度 BackgroundTask 后台
|
||
* 轮询。前端展示 user_code + 打开 verification_uri + 轮询 `GET /jobs/{id}`。
|
||
*/
|
||
post: operations["start_oauth_settings_providers_kimi_code_oauth_start_post"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/settings/providers/kimi-code/oauth/disconnect": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
/**
|
||
* Disconnect Oauth
|
||
* @description 断开 Kimi Code:删除 OAuth 凭据行(token 一并消失)。
|
||
*/
|
||
post: operations["disconnect_oauth_settings_providers_kimi_code_oauth_disconnect_post"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/settings/providers/kimi-code/oauth/status": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* Oauth Status
|
||
* @description 连接状态:是否已连接 + access token 过期时刻(**无 token 本体**)。
|
||
*/
|
||
get: operations["oauth_status_settings_providers_kimi_code_oauth_status_get"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
}
|
||
export type webhooks = Record<string, never>;
|
||
export interface components {
|
||
schemas: {
|
||
/**
|
||
* AcceptRequest
|
||
* @description POST /projects/:id/chapters/:no/accept:裁决清单 + 可能改过的终稿。
|
||
*/
|
||
AcceptRequest: {
|
||
/**
|
||
* Final Text
|
||
* @description 作者裁决/改稿后的最终验收文本
|
||
*/
|
||
final_text: string;
|
||
/**
|
||
* Decisions
|
||
* @description 对最近审稿每个冲突的裁决(每冲突必有其一,R5)
|
||
*/
|
||
decisions?: components["schemas"]["ConflictDecision"][];
|
||
};
|
||
/**
|
||
* AcceptResponse
|
||
* @description 验收「本次将更新」清单(ARCH §7.2 写回结果)。
|
||
*/
|
||
AcceptResponse: {
|
||
/**
|
||
* Project Id
|
||
* Format: uuid
|
||
*/
|
||
project_id: string;
|
||
/** Chapter No */
|
||
chapter_no: number;
|
||
/**
|
||
* Accepted Version
|
||
* @description 晋升到的 accepted 版次(max+1)
|
||
*/
|
||
accepted_version: number;
|
||
/**
|
||
* Digest Added
|
||
* @description 是否新增了一行 chapter_digests
|
||
*/
|
||
digest_added: boolean;
|
||
/**
|
||
* Decisions Recorded
|
||
* @description 本次写回的裁决条数
|
||
*/
|
||
decisions_recorded: number;
|
||
/**
|
||
* Review Id
|
||
* @description 写回裁决的审稿留痕行 id
|
||
*/
|
||
review_id?: string | null;
|
||
};
|
||
/**
|
||
* CapabilitiesView
|
||
* @description 探测得到的能力矩阵(镜像网关 `Capabilities`)。
|
||
*/
|
||
CapabilitiesView: {
|
||
/**
|
||
* Structured Output
|
||
* @default false
|
||
*/
|
||
structured_output: boolean;
|
||
/**
|
||
* Prefix Cache
|
||
* @default false
|
||
*/
|
||
prefix_cache: boolean;
|
||
/**
|
||
* Thinking
|
||
* @default false
|
||
*/
|
||
thinking: boolean;
|
||
};
|
||
/**
|
||
* ChainResumeAccepted
|
||
* @description resume 受理回执(202):job_id + chain_key(前端走 `GET /jobs/{id}` 轮询续跑进度)。
|
||
*
|
||
* 续跑无独立区间(图从检查点续),故不回显 start/count(会是无意义哨兵值)——只回 job 标识。
|
||
*/
|
||
ChainResumeAccepted: {
|
||
/**
|
||
* Job Id
|
||
* Format: uuid
|
||
*/
|
||
job_id: string;
|
||
/** Chain Key */
|
||
chain_key: string;
|
||
};
|
||
/**
|
||
* ChainResumeRequest
|
||
* @description 裁决续跑:对 awaiting 章最近审稿的每个冲突逐条裁决(复用 `ConflictDecision`)。
|
||
*/
|
||
ChainResumeRequest: {
|
||
/**
|
||
* Decisions
|
||
* @description 对 awaiting 章冲突的裁决清单(采纳/忽略/手改)
|
||
*/
|
||
decisions?: components["schemas"]["ConflictDecision"][];
|
||
};
|
||
/**
|
||
* ChainRunAccepted
|
||
* @description 链受理回执(202):job_id + 回显请求参数(前端走 `GET /jobs/{id}` 轮询进度/awaiting)。
|
||
*/
|
||
ChainRunAccepted: {
|
||
/**
|
||
* Job Id
|
||
* Format: uuid
|
||
*/
|
||
job_id: string;
|
||
/** Chain Key */
|
||
chain_key: string;
|
||
/** Start Chapter No */
|
||
start_chapter_no: number;
|
||
/** Count */
|
||
count: number;
|
||
};
|
||
/**
|
||
* ChainRunRequest
|
||
* @description 发起多章链:从 `start_chapter_no` 起循环写 `count` 章(区间含两端)。
|
||
*
|
||
* `count` 1..50(>50 → 422 VALIDATION,由 Field 约束在边界拦下,不进 BackgroundTask);
|
||
* `start_chapter_no >= 1`。
|
||
*/
|
||
ChainRunRequest: {
|
||
/**
|
||
* Start Chapter No
|
||
* @description 起始章号(含),>=1
|
||
*/
|
||
start_chapter_no: number;
|
||
/**
|
||
* Count
|
||
* @description 本 run 连续写的章数(1..50,含起始章)
|
||
*/
|
||
count: number;
|
||
};
|
||
/**
|
||
* CharacterCardView
|
||
* @description 单张角色卡(贴 ww_agents.CharacterCard;预览 + 入库请求共用形)。
|
||
*/
|
||
CharacterCardView: {
|
||
/**
|
||
* Name
|
||
* @description 角色名
|
||
*/
|
||
name: string;
|
||
/**
|
||
* Role
|
||
* @description 角色定位
|
||
*/
|
||
role: string;
|
||
/**
|
||
* Traits
|
||
* @description 性格特质清单(性格三层)
|
||
*/
|
||
traits?: string[];
|
||
/**
|
||
* Appearance
|
||
* @description 外貌形象(缺则空串)
|
||
* @default
|
||
*/
|
||
appearance: string;
|
||
/**
|
||
* Motive
|
||
* @description 核心动机/欲望/恐惧(缺则空串)
|
||
* @default
|
||
*/
|
||
motive: string;
|
||
/**
|
||
* Backstory
|
||
* @description 背景故事
|
||
*/
|
||
backstory: string;
|
||
/**
|
||
* Arc
|
||
* @description 人物弧光(一句话)
|
||
*/
|
||
arc: string;
|
||
/**
|
||
* Speech Tics
|
||
* @description 口癖/语言风格
|
||
*/
|
||
speech_tics?: string[];
|
||
/**
|
||
* Tags
|
||
* @description 人设标签/萌点
|
||
*/
|
||
tags?: string[];
|
||
/**
|
||
* Relations
|
||
* @description 关系网
|
||
*/
|
||
relations?: components["schemas"]["CharacterRelationView"][];
|
||
};
|
||
/**
|
||
* CharacterGenPreviewResponse
|
||
* @description 角色生成预览(不持久化;作者确认后经 POST /characters 入库)。
|
||
*/
|
||
CharacterGenPreviewResponse: {
|
||
/** Cards */
|
||
cards?: components["schemas"]["CharacterCardView"][];
|
||
};
|
||
/**
|
||
* CharacterGenerateRequest
|
||
* @description POST /projects/:id/characters/generate:据需求生成角色卡(预览,群像防雷同)。
|
||
*/
|
||
CharacterGenerateRequest: {
|
||
/**
|
||
* Brief
|
||
* @description 角色生成需求
|
||
*/
|
||
brief: string;
|
||
/**
|
||
* Count
|
||
* @description 生成数量
|
||
* @default 1
|
||
*/
|
||
count: number;
|
||
/**
|
||
* Role
|
||
* @description 角色定位(主角/CP/对手/导师/工具人 等)
|
||
*/
|
||
role?: string | null;
|
||
};
|
||
/**
|
||
* CharacterIngestRequest
|
||
* @description POST /projects/:id/characters:把作者确认的角色卡入库。
|
||
*
|
||
* `acknowledge_conflicts`:作者已查看并接受预检冲突时置 `true`,越过 continuity gate
|
||
* (仿 accept 的冲突裁决:不静默入库,须作者确认;默认 false → 有冲突即 409,见端点)。
|
||
*/
|
||
CharacterIngestRequest: {
|
||
/**
|
||
* Cards
|
||
* @description 待入库的角色卡(至少 1 张)
|
||
*/
|
||
cards: components["schemas"]["CharacterCardView"][];
|
||
/**
|
||
* Acknowledge Conflicts
|
||
* @description 作者已知悉并接受 continuity 冲突 → 放行入库
|
||
* @default false
|
||
*/
|
||
acknowledge_conflicts: boolean;
|
||
};
|
||
/**
|
||
* CharacterIngestResponse
|
||
* @description 角色入库结果(201):写入的角色 + 被白名单丢弃的越权表(审计)。
|
||
*/
|
||
CharacterIngestResponse: {
|
||
/**
|
||
* Created
|
||
* @description 写入的角色名(按入参顺序)
|
||
*/
|
||
created?: string[];
|
||
/**
|
||
* Rejected Tables
|
||
* @description 被权限白名单丢弃的越权写表名(审计;正常为空)
|
||
*/
|
||
rejected_tables?: string[];
|
||
};
|
||
/**
|
||
* CharacterListResponse
|
||
* @description GET /projects/:id/characters:已入库角色全量列表(设定库 Codex 真源)。
|
||
*
|
||
* DB JSONB dict 列 → API list/str 反向解包(入库形变的逆向,见 character_repo):
|
||
* `{"items":[...]}`→list、`{"text":...}`→str;tags/relations 直落 list。
|
||
*/
|
||
CharacterListResponse: {
|
||
/** Characters */
|
||
characters?: components["schemas"]["CharacterCardView"][];
|
||
};
|
||
/**
|
||
* CharacterRelationView
|
||
* @description 单条人物关系(贴 ww_agents.CharacterRelation)。
|
||
*/
|
||
CharacterRelationView: {
|
||
/** Name */
|
||
name: string;
|
||
/** Kind */
|
||
kind: string;
|
||
/** Note */
|
||
note?: string | null;
|
||
};
|
||
/**
|
||
* ConflictDecision
|
||
* @description 对最近一次审稿留痕里**某个冲突**(按其在 conflicts 列表的下标定位)的裁决。
|
||
*/
|
||
ConflictDecision: {
|
||
/**
|
||
* Conflict Index
|
||
* @description 冲突在最近审稿 conflicts 列表中的下标
|
||
*/
|
||
conflict_index: number;
|
||
/**
|
||
* Verdict
|
||
* @description 采纳改法 / 忽略 / 手改
|
||
* @enum {string}
|
||
*/
|
||
verdict: "accept" | "ignore" | "manual";
|
||
/**
|
||
* Note
|
||
* @description 可选裁决备注(如手改说明)
|
||
*/
|
||
note?: string | null;
|
||
};
|
||
/**
|
||
* DimensionEntry
|
||
* @description 单个文风维度:名称 + 判定值 + 原文证据摘录(强类型,替代裸 dict[str, Any])。
|
||
*/
|
||
DimensionEntry: {
|
||
/** Name */
|
||
name: string;
|
||
/** Value */
|
||
value: string;
|
||
/** Evidence */
|
||
evidence?: string[];
|
||
};
|
||
/**
|
||
* DraftResponse
|
||
* @description 草稿保存结果(脱敏:只回元信息 + 长度,不回灌正文以外的衍生)。
|
||
*/
|
||
DraftResponse: {
|
||
/**
|
||
* Project Id
|
||
* Format: uuid
|
||
*/
|
||
project_id: string;
|
||
/** Chapter No */
|
||
chapter_no: number;
|
||
/** Volume */
|
||
volume: number;
|
||
/** Status */
|
||
status: string;
|
||
/** Version */
|
||
version: number;
|
||
/** Length */
|
||
length: number;
|
||
};
|
||
/**
|
||
* DraftSaveRequest
|
||
* @description PUT /projects/:id/chapters/:no/draft:自动保存草稿正文。
|
||
*/
|
||
DraftSaveRequest: {
|
||
/** Text */
|
||
text: string;
|
||
};
|
||
/**
|
||
* DraftStreamRequest
|
||
* @description POST /projects/:id/chapters/:no/draft:本章生成的可选输入(T4-b)。
|
||
*
|
||
* `directive` = 作者本章指令(覆盖/补充大纲节拍)。临时输入,不持久化、无迁移;
|
||
* 后端只入 volatile(守缓存前缀不变量 #9)。无 body 时退化为纯按大纲生成(向后兼容)。
|
||
*/
|
||
DraftStreamRequest: {
|
||
/** Directive */
|
||
directive?: string | null;
|
||
};
|
||
/**
|
||
* DraftView
|
||
* @description GET .../draft:回灌已保存草稿(含正文,供工作台重载编辑器)。
|
||
*
|
||
* 与 PUT 的 `DraftResponse` 同元信息,**额外带 `content`**——读侧需要正文以重建编辑器,
|
||
* 保存侧不回灌正文故不带。`length` 仍按 content 字符数派生。
|
||
*/
|
||
DraftView: {
|
||
/**
|
||
* Project Id
|
||
* Format: uuid
|
||
*/
|
||
project_id: string;
|
||
/** Chapter No */
|
||
chapter_no: number;
|
||
/** Volume */
|
||
volume: number;
|
||
/** Status */
|
||
status: string;
|
||
/** Version */
|
||
version: number;
|
||
/** Content */
|
||
content: string;
|
||
/** Length */
|
||
length: number;
|
||
};
|
||
/** ErrorBody */
|
||
ErrorBody: {
|
||
/** Code */
|
||
code: string;
|
||
/** Message */
|
||
message: string;
|
||
/** Details */
|
||
details?: {
|
||
[key: string]: unknown;
|
||
};
|
||
/** Request Id */
|
||
request_id?: string | null;
|
||
};
|
||
/** ErrorEnvelope */
|
||
ErrorEnvelope: {
|
||
error: components["schemas"]["ErrorBody"];
|
||
};
|
||
/**
|
||
* ForeshadowBoardResponse
|
||
* @description GET /projects/:id/foreshadow?status=:伏笔看板(四泳道 + OVERDUE 字段齐)。
|
||
*
|
||
* `status` 缺省返回全部;按 `code` 升序(repo `list_by_status` 已排序)。前端按
|
||
* `status` 分四泳道(OPEN/PARTIAL/CLOSED/OVERDUE),用 `expected_close_to` 标逾期。
|
||
*/
|
||
ForeshadowBoardResponse: {
|
||
/** Foreshadow */
|
||
foreshadow?: components["schemas"]["ForeshadowView"][];
|
||
};
|
||
/**
|
||
* ForeshadowRegisterRequest
|
||
* @description POST /projects/:id/foreshadow:作者显式登记一条伏笔(status 落 OPEN)。
|
||
*/
|
||
ForeshadowRegisterRequest: {
|
||
/**
|
||
* Code
|
||
* @description 伏笔代号,`(project_id, code)` 唯一
|
||
*/
|
||
code: string;
|
||
/**
|
||
* Title
|
||
* @description 伏笔标题/一句话描述
|
||
*/
|
||
title: string;
|
||
/**
|
||
* Planted At
|
||
* @description 埋设章号
|
||
*/
|
||
planted_at?: number | null;
|
||
/**
|
||
* Content
|
||
* @description 伏笔正文/线索
|
||
*/
|
||
content?: string | null;
|
||
/**
|
||
* Expected Close From
|
||
* @description 预期回收窗口起始章
|
||
*/
|
||
expected_close_from?: number | null;
|
||
/**
|
||
* Expected Close To
|
||
* @description 预期回收窗口结束章(到期判据用)
|
||
*/
|
||
expected_close_to?: number | null;
|
||
/**
|
||
* Importance
|
||
* @description 重要度(自由文本,看板用)
|
||
*/
|
||
importance?: string | null;
|
||
};
|
||
/**
|
||
* ForeshadowTransitionRequest
|
||
* @description PATCH /projects/:id/foreshadow/:code:状态机转移 和/或 追加一条进展。
|
||
*
|
||
* 两字段皆可选:`to_status` 走状态机(非法 → VALIDATION 信封);`progress_entry`
|
||
* append-only 追加到 progress JSONB。二者可同时给(先转移、后追加进展)。
|
||
*/
|
||
ForeshadowTransitionRequest: {
|
||
/**
|
||
* To Status
|
||
* @description 目标状态(OPEN/PARTIAL/CLOSED/OVERDUE)
|
||
*/
|
||
to_status?: string | null;
|
||
/**
|
||
* Progress Entry
|
||
* @description 追加一条进展记录(append-only,不覆盖历史)
|
||
*/
|
||
progress_entry?: {
|
||
[key: string]: unknown;
|
||
} | null;
|
||
};
|
||
/**
|
||
* ForeshadowView
|
||
* @description 伏笔账本视图(登记/状态变更/看板共用;snake_case)。形对齐 `ForeshadowLedgerView`。
|
||
*/
|
||
ForeshadowView: {
|
||
/** Code */
|
||
code: string;
|
||
/** Title */
|
||
title: string;
|
||
/** Status */
|
||
status: string;
|
||
/** Planted At */
|
||
planted_at?: number | null;
|
||
/** Content */
|
||
content?: string | null;
|
||
/** Expected Close From */
|
||
expected_close_from?: number | null;
|
||
/** Expected Close To */
|
||
expected_close_to?: number | null;
|
||
/** Importance */
|
||
importance?: string | null;
|
||
/** Links */
|
||
links?: {
|
||
[key: string]: unknown;
|
||
}[];
|
||
/** Progress */
|
||
progress?: {
|
||
[key: string]: unknown;
|
||
}[];
|
||
};
|
||
/**
|
||
* ForeshadowWindowView
|
||
* @description 单章关联的伏笔回收窗口(snake_case;形对齐 `ww_agents.ForeshadowWindow`)。
|
||
*/
|
||
ForeshadowWindowView: {
|
||
/** Code */
|
||
code: string;
|
||
/** Plant Chapter */
|
||
plant_chapter?: number | null;
|
||
/** Expected Close From */
|
||
expected_close_from?: number | null;
|
||
/** Expected Close To */
|
||
expected_close_to?: number | null;
|
||
};
|
||
/** HTTPValidationError */
|
||
HTTPValidationError: {
|
||
/** Detail */
|
||
detail?: components["schemas"]["ValidationError"][];
|
||
};
|
||
/**
|
||
* InjectionEntity
|
||
* @description 一个被注入本章上下文的实体 + 入选理由(喂给透明面板的徽标)。
|
||
*/
|
||
InjectionEntity: {
|
||
/**
|
||
* Kind
|
||
* @description character / world_entity
|
||
*/
|
||
kind: string;
|
||
/** Name */
|
||
name: string;
|
||
/**
|
||
* Reasons
|
||
* @description explicit_beat/main_character/recent_digest/foreshadow_window/author_pin
|
||
*/
|
||
reasons?: string[];
|
||
};
|
||
/**
|
||
* InjectionEntityRef
|
||
* @description 作者 pin/排除点名的实体引用(kind + name)。
|
||
*/
|
||
InjectionEntityRef: {
|
||
/**
|
||
* Kind
|
||
* @description character / world_entity
|
||
*/
|
||
kind: string;
|
||
/** Name */
|
||
name: string;
|
||
};
|
||
/**
|
||
* InjectionOverrideRequest
|
||
* @description PUT /projects/:id/chapters/:no/injection:作者对本章注入的覆盖。
|
||
*
|
||
* pinned 强制纳入(加 author_pin 理由);excluded 强制剔除;recent_n 覆盖近况回看章数
|
||
* (None=用默认)。空覆盖 = 纯自动选择。
|
||
*/
|
||
InjectionOverrideRequest: {
|
||
/** Pinned */
|
||
pinned?: components["schemas"]["InjectionEntityRef"][];
|
||
/** Excluded */
|
||
excluded?: components["schemas"]["InjectionEntityRef"][];
|
||
/** Recent N */
|
||
recent_n?: number | null;
|
||
};
|
||
/**
|
||
* InjectionResponse
|
||
* @description GET/PUT /projects/:id/chapters/:no/injection:本章注入留痕 + 作者覆盖回显。
|
||
*/
|
||
InjectionResponse: {
|
||
/**
|
||
* Project Id
|
||
* Format: uuid
|
||
*/
|
||
project_id: string;
|
||
/** Chapter No */
|
||
chapter_no: number;
|
||
/** Selected */
|
||
selected?: components["schemas"]["InjectionEntity"][];
|
||
/**
|
||
* Recent N
|
||
* @description 生效的近况回看章数(默认或被 override 覆盖后的值)
|
||
*/
|
||
recent_n: number;
|
||
/**
|
||
* Pinned
|
||
* @description 作者强制纳入的实体(回显)
|
||
*/
|
||
pinned?: components["schemas"]["InjectionEntityRef"][];
|
||
/**
|
||
* Excluded
|
||
* @description 作者强制剔除的实体(回显,供面板恢复)
|
||
*/
|
||
excluded?: components["schemas"]["InjectionEntityRef"][];
|
||
};
|
||
/**
|
||
* JobResponse
|
||
* @description 长任务状态(`GET /jobs/{id}`):状态 + 进度 + 结果/错误。
|
||
*
|
||
* `result` 是任务成功后的非密摘要(如 `{"connected": true, ...}`);`error` 是失败后的
|
||
* 面向用户文案(已脱敏,绝不含 `str(exc)`,见 `services/job_runner._classify_job_error`)。
|
||
*/
|
||
JobResponse: {
|
||
/**
|
||
* Id
|
||
* Format: uuid
|
||
*/
|
||
id: string;
|
||
/** Kind */
|
||
kind: string;
|
||
/** Status */
|
||
status: string;
|
||
/**
|
||
* Progress
|
||
* @default 0
|
||
*/
|
||
progress: number;
|
||
/** Result */
|
||
result?: {
|
||
[key: string]: unknown;
|
||
} | null;
|
||
/** Error */
|
||
error?: string | null;
|
||
};
|
||
/**
|
||
* OAuthDisconnectResponse
|
||
* @description 断开:是否删到凭据行。
|
||
*/
|
||
OAuthDisconnectResponse: {
|
||
/** Disconnected */
|
||
disconnected: boolean;
|
||
};
|
||
/**
|
||
* OAuthStartResponse
|
||
* @description device flow 启动:返回 job_id(轮询 `GET /jobs/{id}`)+ 用户面展示信息。
|
||
*
|
||
* 前端展示 `user_code`、打开 `verification_uri`(或 `verification_uri_complete`),并按
|
||
* `interval` 轮询 job 直到 `done`(已连接)/`failed`(过期/拒绝)。**无 token**。
|
||
*/
|
||
OAuthStartResponse: {
|
||
/**
|
||
* Job Id
|
||
* Format: uuid
|
||
*/
|
||
job_id: string;
|
||
/** User Code */
|
||
user_code: string;
|
||
/** Verification Uri */
|
||
verification_uri: string;
|
||
/** Verification Uri Complete */
|
||
verification_uri_complete?: string | null;
|
||
/** Expires In */
|
||
expires_in: number;
|
||
/** Interval */
|
||
interval: number;
|
||
};
|
||
/**
|
||
* OAuthStatusResponse
|
||
* @description 连接状态:是否已连接 + access token 过期时刻(ISO8601;**无 token 本体**)。
|
||
*/
|
||
OAuthStatusResponse: {
|
||
/** Connected */
|
||
connected: boolean;
|
||
/** Expires At */
|
||
expires_at?: string | null;
|
||
};
|
||
/**
|
||
* OutlineChapterView
|
||
* @description 单章大纲视图:章号 + 卷 + 节拍 + 伏笔窗口。
|
||
*/
|
||
OutlineChapterView: {
|
||
/** No */
|
||
no: number;
|
||
/** Volume */
|
||
volume: number;
|
||
/** Beats */
|
||
beats?: string[];
|
||
/** Foreshadow Windows */
|
||
foreshadow_windows?: components["schemas"]["ForeshadowWindowView"][];
|
||
};
|
||
/**
|
||
* OutlineGenerateRequest
|
||
* @description POST /projects/:id/outline:触发大纲生成 + 持久化。
|
||
*
|
||
* M3 简单分卷:`volume` 缺省=1(schema 无逐章卷号;本端点把整批章节落到同一卷)。
|
||
*/
|
||
OutlineGenerateRequest: {
|
||
/**
|
||
* Volume
|
||
* @description 本批大纲所属卷号(M3 默认全卷 1)
|
||
* @default 1
|
||
*/
|
||
volume: number;
|
||
};
|
||
/**
|
||
* OutlineResponse
|
||
* @description 大纲生成响应:逐章已持久化的大纲(含窗口,供前端 T3.6)。
|
||
*/
|
||
OutlineResponse: {
|
||
/** Chapters */
|
||
chapters?: components["schemas"]["OutlineChapterView"][];
|
||
};
|
||
/**
|
||
* OutlineSceneIngestView
|
||
* @description 细纲入库的单章场景行(贴 ww_agents.Scene;落 outline 表)。
|
||
*/
|
||
OutlineSceneIngestView: {
|
||
/** Idx */
|
||
idx: number;
|
||
/** Beat */
|
||
beat: string;
|
||
/**
|
||
* Purpose
|
||
* @default
|
||
*/
|
||
purpose: string;
|
||
/**
|
||
* Conflict
|
||
* @default
|
||
*/
|
||
conflict: string;
|
||
/**
|
||
* Hook
|
||
* @default
|
||
*/
|
||
hook: string;
|
||
};
|
||
/**
|
||
* ProjectCreateRequest
|
||
* @description POST /projects:立项向导字段(owner_id 由后端补 stub,不入参)。
|
||
*/
|
||
ProjectCreateRequest: {
|
||
/** Title */
|
||
title: string;
|
||
/** Genre */
|
||
genre?: string | null;
|
||
/** Logline */
|
||
logline?: string | null;
|
||
/** Premise */
|
||
premise?: string | null;
|
||
/** Theme */
|
||
theme?: string | null;
|
||
/** Selling Points */
|
||
selling_points?: string[];
|
||
/** Structure */
|
||
structure?: string | null;
|
||
};
|
||
/**
|
||
* ProjectListResponse
|
||
* @description GET /projects:项目列表。
|
||
*/
|
||
ProjectListResponse: {
|
||
/** Projects */
|
||
projects?: components["schemas"]["ProjectResponse"][];
|
||
};
|
||
/**
|
||
* ProjectResponse
|
||
* @description 项目视图(创建/列表/详情共用)。
|
||
*/
|
||
ProjectResponse: {
|
||
/**
|
||
* Id
|
||
* Format: uuid
|
||
*/
|
||
id: string;
|
||
/** Title */
|
||
title: string;
|
||
/** Genre */
|
||
genre?: string | null;
|
||
/** Logline */
|
||
logline?: string | null;
|
||
/** Premise */
|
||
premise?: string | null;
|
||
/** Theme */
|
||
theme?: string | null;
|
||
/** Selling Points */
|
||
selling_points?: string[];
|
||
/** Structure */
|
||
structure?: string | null;
|
||
/**
|
||
* Updated At
|
||
* @description 项目最近更新时间
|
||
*/
|
||
updated_at?: string | null;
|
||
/**
|
||
* Pending Review Count
|
||
* @description 待审稿章节数
|
||
* @default 0
|
||
*/
|
||
pending_review_count: number;
|
||
};
|
||
/**
|
||
* ProviderCredentialInput
|
||
* @description 单条提供商凭据写入。
|
||
*/
|
||
ProviderCredentialInput: {
|
||
/** Provider */
|
||
provider: string;
|
||
/** Api Key */
|
||
api_key: string;
|
||
};
|
||
/**
|
||
* ProviderView
|
||
* @description 已配置提供商(掩码视图)。
|
||
*/
|
||
ProviderView: {
|
||
/** Provider */
|
||
provider: string;
|
||
/** Masked Key */
|
||
masked_key: string;
|
||
};
|
||
/**
|
||
* ProvidersResponse
|
||
* @description GET/PUT 响应:已配置提供商(掩码)+ 当前档位路由。
|
||
*/
|
||
ProvidersResponse: {
|
||
/** Providers */
|
||
providers?: components["schemas"]["ProviderView"][];
|
||
/** Tier Routing */
|
||
tier_routing?: components["schemas"]["TierRoutingView"][];
|
||
};
|
||
/**
|
||
* ProvidersUpsertRequest
|
||
* @description PUT 请求:可同时 upsert 若干凭据与档位路由(幂等)。
|
||
*/
|
||
ProvidersUpsertRequest: {
|
||
/** Credentials */
|
||
credentials?: components["schemas"]["ProviderCredentialInput"][];
|
||
/** Tier Routing */
|
||
tier_routing?: components["schemas"]["TierRoutingInput"][];
|
||
};
|
||
/**
|
||
* RefineRequest
|
||
* @description 回炉:重写选中段(可选改写指令)。
|
||
*/
|
||
RefineRequest: {
|
||
/** Segment */
|
||
segment: string;
|
||
/** Instruction */
|
||
instruction?: string | null;
|
||
};
|
||
/**
|
||
* RefineResponse
|
||
* @description 回炉结果:原段 + 重写段(不写库,作者采纳经既有 draft 自动保存合入)。
|
||
*/
|
||
RefineResponse: {
|
||
/** Original */
|
||
original: string;
|
||
/** Refined */
|
||
refined: string;
|
||
};
|
||
/**
|
||
* ReviewConflictView
|
||
* @description 单条一致性冲突(chapter_reviews.conflicts JSONB 子项;形对齐 SSE `conflict` 事件)。
|
||
*
|
||
* 强类型化此前的裸 `dict[str, Any]`,给 TS 客户端真实字段类型。容忍历史/缺省(默认值)。
|
||
*/
|
||
ReviewConflictView: {
|
||
/**
|
||
* Type
|
||
* @default
|
||
*/
|
||
type: string;
|
||
/**
|
||
* Where
|
||
* @default
|
||
*/
|
||
where: string;
|
||
/** Refs */
|
||
refs?: string[];
|
||
/**
|
||
* Suggestion
|
||
* @default
|
||
*/
|
||
suggestion: string;
|
||
/** Original */
|
||
original?: string | null;
|
||
/** Replacement */
|
||
replacement?: string | null;
|
||
};
|
||
/**
|
||
* ReviewHistoryItem
|
||
* @description 单条审稿留痕(GET .../reviews 历史项;snake_case)。
|
||
*/
|
||
ReviewHistoryItem: {
|
||
/**
|
||
* Id
|
||
* Format: uuid
|
||
*/
|
||
id: string;
|
||
/**
|
||
* Project Id
|
||
* Format: uuid
|
||
*/
|
||
project_id: string;
|
||
/** Chapter No */
|
||
chapter_no: number;
|
||
/** Chapter Version */
|
||
chapter_version?: number | null;
|
||
/** Conflicts */
|
||
conflicts?: components["schemas"]["ReviewConflictView"][];
|
||
/** Foreshadow Sug */
|
||
foreshadow_sug?: {
|
||
[key: string]: unknown;
|
||
}[];
|
||
/** Style */
|
||
style?: {
|
||
[key: string]: unknown;
|
||
} | null;
|
||
/** Pace */
|
||
pace?: {
|
||
[key: string]: unknown;
|
||
} | null;
|
||
/** Health Score */
|
||
health_score?: number | null;
|
||
/** Decisions */
|
||
decisions?: {
|
||
[key: string]: unknown;
|
||
} | null;
|
||
};
|
||
/**
|
||
* ReviewHistoryResponse
|
||
* @description GET /projects/:id/chapters/:no/reviews:审稿历史(新→旧)。
|
||
*/
|
||
ReviewHistoryResponse: {
|
||
/** Reviews */
|
||
reviews?: components["schemas"]["ReviewHistoryItem"][];
|
||
};
|
||
/**
|
||
* ReviewRequest
|
||
* @description POST /projects/:id/chapters/:no/review:可选携带待审草稿正文。
|
||
*
|
||
* 不传 `draft` 时端点回退到已保存的草稿(chapter_repo)。
|
||
*/
|
||
ReviewRequest: {
|
||
/** Draft */
|
||
draft?: string | null;
|
||
};
|
||
/**
|
||
* RuleCreateRequest
|
||
* @description POST /projects/:id/rules:新增一条规则。
|
||
*/
|
||
RuleCreateRequest: {
|
||
/**
|
||
* Level
|
||
* @description 规则级别(global/genre/style/project,越具体越优先)
|
||
* @enum {string}
|
||
*/
|
||
level: "global" | "genre" | "style" | "project";
|
||
/**
|
||
* Content
|
||
* @description 规则正文(首尾空白会被裁剪,不可全空白)
|
||
*/
|
||
content: string;
|
||
};
|
||
/**
|
||
* RuleListResponse
|
||
* @description GET /projects/:id/rules:规则列表(规则页)。
|
||
*/
|
||
RuleListResponse: {
|
||
/** Rules */
|
||
rules?: components["schemas"]["RuleView"][];
|
||
};
|
||
/**
|
||
* RuleView
|
||
* @description 规则视图(创建后回显 + 列表项;snake_case)。
|
||
*
|
||
* `id` 是该规则行的稳定主键——前端规则页用它作删除 handle(DELETE /rules/{rule_id})。
|
||
*/
|
||
RuleView: {
|
||
/**
|
||
* Id
|
||
* Format: uuid
|
||
*/
|
||
id: string;
|
||
/** Level */
|
||
level: string;
|
||
/** Content */
|
||
content: string;
|
||
};
|
||
/**
|
||
* SkillListResponse
|
||
* @description GET /skills:技能库列表(按 name 升序)。
|
||
*/
|
||
SkillListResponse: {
|
||
/** Skills */
|
||
skills?: components["schemas"]["SkillView"][];
|
||
};
|
||
/**
|
||
* SkillView
|
||
* @description 单个 skill 的声明式视图(技能库 UI)。
|
||
*/
|
||
SkillView: {
|
||
/** Name */
|
||
name: string;
|
||
/**
|
||
* Scope
|
||
* @description builtin / custom / community
|
||
*/
|
||
scope: string;
|
||
/**
|
||
* Tier
|
||
* @description 能力档位(writer / analyst / light)
|
||
*/
|
||
tier: string;
|
||
/** Reads */
|
||
reads?: string[];
|
||
/** Writes */
|
||
writes?: string[];
|
||
/** Genre */
|
||
genre?: string | null;
|
||
};
|
||
/**
|
||
* StyleFingerprintResponse
|
||
* @description 最新文风指纹(`GET /style`):完整 16 维(名称/值/证据)+ 版本(对齐 UX §6.9)。
|
||
*
|
||
* DB 存两列并行 dict(`{name:value}` + `{name:[evidence]}`);响应合并为
|
||
* `list[DimensionEntry]`,给 TS 客户端强类型(替代弱类型 `dict[str, Any]`)。
|
||
*/
|
||
StyleFingerprintResponse: {
|
||
/** Dimensions */
|
||
dimensions?: components["schemas"]["DimensionEntry"][];
|
||
/** Version */
|
||
version: number;
|
||
};
|
||
/**
|
||
* StyleLearnRequest
|
||
* @description 学文风:上传样本正文(前端可读文件转文本)+ 模式(首学 / 更新)。
|
||
*/
|
||
StyleLearnRequest: {
|
||
/** Samples */
|
||
samples: string[];
|
||
/**
|
||
* Mode
|
||
* @default create
|
||
* @enum {string}
|
||
*/
|
||
mode: "create" | "update";
|
||
};
|
||
/**
|
||
* StyleLearnResponse
|
||
* @description 学文风受理:返回 job_id(长任务,走 `GET /jobs/{id}` 轮询)。
|
||
*/
|
||
StyleLearnResponse: {
|
||
/**
|
||
* Job Id
|
||
* Format: uuid
|
||
*/
|
||
job_id: string;
|
||
};
|
||
/**
|
||
* TeardownIngestView
|
||
* @description 拆书入库产物(贴 ww_agents.BookTeardownResult;落 rules 表)。F1。
|
||
*/
|
||
TeardownIngestView: {
|
||
/**
|
||
* Themes
|
||
* @description 核心主题/立意清单
|
||
*/
|
||
themes?: string[];
|
||
/**
|
||
* Archetypes
|
||
* @description 人物原型/角色模板清单
|
||
*/
|
||
archetypes?: string[];
|
||
/**
|
||
* Structure
|
||
* @description 叙事结构概述
|
||
* @default
|
||
*/
|
||
structure: string;
|
||
/**
|
||
* Hooks
|
||
* @description 抓人钩子/爽点套路清单
|
||
*/
|
||
hooks?: string[];
|
||
};
|
||
/**
|
||
* TemplateCreateRequest
|
||
* @description POST /templates:新建一条提示词模板。
|
||
*/
|
||
TemplateCreateRequest: {
|
||
/**
|
||
* Title
|
||
* @description 模板标题(非空,纯空白 → 422)
|
||
*/
|
||
title: string;
|
||
/**
|
||
* Body
|
||
* @description 模板正文(非空,一键填入生成器的 brief/text)
|
||
*/
|
||
body: string;
|
||
/**
|
||
* Category
|
||
* @description 可选分类
|
||
*/
|
||
category?: string | null;
|
||
/**
|
||
* Tool Key
|
||
* @description 可选关联生成器(NULL=通用)
|
||
*/
|
||
tool_key?: string | null;
|
||
};
|
||
/**
|
||
* TemplateResponse
|
||
* @description 模板视图(列出/创建后回显;snake_case)。
|
||
*/
|
||
TemplateResponse: {
|
||
/**
|
||
* Id
|
||
* Format: uuid
|
||
*/
|
||
id: string;
|
||
/** Title */
|
||
title: string;
|
||
/** Body */
|
||
body: string;
|
||
/** Category */
|
||
category?: string | null;
|
||
/** Tool Key */
|
||
tool_key?: string | null;
|
||
};
|
||
/**
|
||
* TestConnectionRequest
|
||
* @description POST /test:最小探测请求。
|
||
*/
|
||
TestConnectionRequest: {
|
||
/** Provider */
|
||
provider: string;
|
||
};
|
||
/**
|
||
* TestConnectionResponse
|
||
* @description POST /test 响应:连通性 + 能力矩阵。
|
||
*/
|
||
TestConnectionResponse: {
|
||
/** Provider */
|
||
provider: string;
|
||
/** Ok */
|
||
ok: boolean;
|
||
capabilities: components["schemas"]["CapabilitiesView"];
|
||
};
|
||
/**
|
||
* TierRoutingInput
|
||
* @description 单条档位路由写入。
|
||
*/
|
||
TierRoutingInput: {
|
||
/**
|
||
* Tier
|
||
* @enum {string}
|
||
*/
|
||
tier: "writer" | "analyst" | "light";
|
||
/** Provider */
|
||
provider: string;
|
||
/** Model */
|
||
model: string;
|
||
/** Fallback */
|
||
fallback?: string[];
|
||
};
|
||
/**
|
||
* TierRoutingView
|
||
* @description 档位 → provider:model 路由(含回退链)。
|
||
*/
|
||
TierRoutingView: {
|
||
/** Tier */
|
||
tier: string;
|
||
/** Provider */
|
||
provider: string;
|
||
/** Model */
|
||
model: string;
|
||
/** Fallback */
|
||
fallback?: string[];
|
||
};
|
||
/**
|
||
* ToolDescriptorView
|
||
* @description 单个生成器卡片描述符视图(前端据此渲染卡片栅格 + 输入表单)。
|
||
*/
|
||
ToolDescriptorView: {
|
||
/**
|
||
* Key
|
||
* @description 路由用稳定标识(brainstorm / book-title ...)
|
||
*/
|
||
key: string;
|
||
/** Title */
|
||
title: string;
|
||
/** Subtitle */
|
||
subtitle: string;
|
||
/** Genre */
|
||
genre?: string | null;
|
||
/**
|
||
* Is Legacy
|
||
* @description legacy 工具(spec=None)→ 前端走 legacy_route 跳现有页面
|
||
*/
|
||
is_legacy: boolean;
|
||
/**
|
||
* Ingestable
|
||
* @description 是否可入库(声明了 ingest 目标)
|
||
*/
|
||
ingestable: boolean;
|
||
/** Input Fields */
|
||
input_fields?: components["schemas"]["ToolInputFieldView"][];
|
||
/**
|
||
* Legacy Route
|
||
* @description legacy 工具指向的现有页面路径(含 {id} 占位)
|
||
*/
|
||
legacy_route?: string | null;
|
||
};
|
||
/**
|
||
* ToolGeneratePreviewResponse
|
||
* @description 通用生成预览:结构化产物(不持久化;仅记 ledger)。
|
||
*
|
||
* `output_kind` = 该工具产物的 schema 名(如 IdeaListResult),供前端按类型选预览渲染器;
|
||
* `preview` = 解析后的结构化产物(按各工具 output_schema 的形,键名见 ww_agents.schemas)。
|
||
*/
|
||
ToolGeneratePreviewResponse: {
|
||
/** Tool Key */
|
||
tool_key: string;
|
||
/**
|
||
* Output Kind
|
||
* @description 产物 schema 名(前端按此选预览渲染器)
|
||
*/
|
||
output_kind: string;
|
||
/**
|
||
* Preview
|
||
* @description 结构化产物(各工具 output_schema 的 model_dump;不入库)
|
||
*/
|
||
preview?: {
|
||
[key: string]: unknown;
|
||
};
|
||
};
|
||
/**
|
||
* ToolGenerateRequest
|
||
* @description 通用生成请求(覆盖全部工具的可选入参;按工具 input_fields 取用,snake_case)。
|
||
*/
|
||
ToolGenerateRequest: {
|
||
/**
|
||
* Brief
|
||
* @description 一句话需求/方向(可空,空则按题材发散)
|
||
* @default
|
||
*/
|
||
brief: string;
|
||
/**
|
||
* Text
|
||
* @description 原文输入(扩写/降AI 的原文、拆书的样本;text_input 策略工具用)
|
||
*/
|
||
text?: string | null;
|
||
/**
|
||
* Chapter No
|
||
* @description 按章展开/续写类工具的章号(开篇/细纲/续写)
|
||
*/
|
||
chapter_no?: number | null;
|
||
/**
|
||
* Count
|
||
* @description 生成数量(部分工具可用)
|
||
*/
|
||
count?: number | null;
|
||
/**
|
||
* Kind
|
||
* @description 命名对象类别等(部分工具可用)
|
||
*/
|
||
kind?: string | null;
|
||
};
|
||
/**
|
||
* ToolIngestRequest
|
||
* @description 通用入库请求:待持久化的产物 + 冲突确认。
|
||
*
|
||
* 仅声明了 `ingest` 的工具可用。按入库表取用对应字段:
|
||
* - world_entities(金手指/词条)→ `world_entities`(贴 WorldEntityCardView:type/name/rules);
|
||
* - outline(细纲)→ `chapter_no` + `scenes`(贴 OutlineSceneIngestView);
|
||
* - rules(拆书)→ `teardown`(贴 TeardownIngestView:themes/archetypes/structure/hooks)。
|
||
* `acknowledge_conflicts`:作者已查看并接受 continuity 预检冲突时置 true 放行(仿 accept gate)。
|
||
*/
|
||
ToolIngestRequest: {
|
||
/**
|
||
* World Entities
|
||
* @description world_entities 入库项(金手指/词条)
|
||
*/
|
||
world_entities?: components["schemas"]["WorldEntityCardView"][];
|
||
/**
|
||
* Chapter No
|
||
* @description outline 入库的目标章号(细纲)
|
||
*/
|
||
chapter_no?: number | null;
|
||
/**
|
||
* Scenes
|
||
* @description outline 入库的场景行(细纲)
|
||
*/
|
||
scenes?: components["schemas"]["OutlineSceneIngestView"][];
|
||
/** @description rules 入库的拆书结论(F1;拍平为可读规则条目) */
|
||
teardown?: components["schemas"]["TeardownIngestView"] | null;
|
||
/**
|
||
* Acknowledge Conflicts
|
||
* @description 作者已知悉并接受 continuity 冲突 → 放行入库
|
||
* @default false
|
||
*/
|
||
acknowledge_conflicts: boolean;
|
||
};
|
||
/**
|
||
* ToolIngestResponse
|
||
* @description 通用入库结果(201):写入项标识 + 被白名单丢弃的越权表(审计)。
|
||
*/
|
||
ToolIngestResponse: {
|
||
/**
|
||
* Table
|
||
* @description 入库目标表
|
||
*/
|
||
table: string;
|
||
/**
|
||
* Created
|
||
* @description 写入项的标识(实体名 / 场景索引),按入参顺序
|
||
*/
|
||
created?: string[];
|
||
/**
|
||
* Rejected Tables
|
||
* @description 被权限白名单丢弃的越权写表名(审计;正常为空)
|
||
*/
|
||
rejected_tables?: string[];
|
||
};
|
||
/**
|
||
* ToolInputFieldView
|
||
* @description 单个声明式表单字段视图(贴 ww_skills.InputField)。
|
||
*/
|
||
ToolInputFieldView: {
|
||
/** Name */
|
||
name: string;
|
||
/** Label */
|
||
label: string;
|
||
/**
|
||
* Type
|
||
* @description 控件类型:text / textarea / number / select 等
|
||
*/
|
||
type: string;
|
||
/**
|
||
* Required
|
||
* @default true
|
||
*/
|
||
required: boolean;
|
||
/** Default */
|
||
default?: string | null;
|
||
/** Help */
|
||
help?: string | null;
|
||
};
|
||
/**
|
||
* ToolboxListResponse
|
||
* @description GET /skills/toolbox:创作工具箱全量描述符(legacy + 新工具)。
|
||
*/
|
||
ToolboxListResponse: {
|
||
/** Tools */
|
||
tools?: components["schemas"]["ToolDescriptorView"][];
|
||
};
|
||
/** ValidationError */
|
||
ValidationError: {
|
||
/** Location */
|
||
loc: (string | number)[];
|
||
/** Message */
|
||
msg: string;
|
||
/** Error Type */
|
||
type: string;
|
||
/** Input */
|
||
input?: unknown;
|
||
/** Context */
|
||
ctx?: Record<string, never>;
|
||
};
|
||
/**
|
||
* WorldEntityCardView
|
||
* @description 单个世界观实体卡(贴 ww_agents.WorldEntityCard;预览 + 入库共用形)。
|
||
*/
|
||
WorldEntityCardView: {
|
||
/**
|
||
* Type
|
||
* @description 实体类型(势力 / 地理 / 力量体系 / 物品 / 概念 等)
|
||
*/
|
||
type: string;
|
||
/**
|
||
* Name
|
||
* @description 实体名
|
||
*/
|
||
name: string;
|
||
/**
|
||
* Rules
|
||
* @description 该实体的硬规则清单
|
||
*/
|
||
rules?: string[];
|
||
};
|
||
/**
|
||
* WorldEntityListResponse
|
||
* @description GET /projects/:id/world_entities:已入库世界观实体全量列表(设定库 Codex 真源)。
|
||
*
|
||
* DB JSONB dict 列 `{"rules":[...]}`→裸 list(worldbuilder 形变的逆向)。
|
||
*/
|
||
WorldEntityListResponse: {
|
||
/** World Entities */
|
||
world_entities?: components["schemas"]["WorldEntityCardView"][];
|
||
};
|
||
/**
|
||
* WorldGenPreviewResponse
|
||
* @description 世界观生成预览(不持久化;作者确认后另走入库,本期入库端点为角色)。
|
||
*/
|
||
WorldGenPreviewResponse: {
|
||
/** Entities */
|
||
entities?: components["schemas"]["WorldEntityCardView"][];
|
||
};
|
||
/**
|
||
* WorldGenerateRequest
|
||
* @description POST /projects/:id/world/generate:据需求生成世界观实体(预览)。
|
||
*/
|
||
WorldGenerateRequest: {
|
||
/**
|
||
* Brief
|
||
* @description 世界观生成需求(题材/设定方向/约束)
|
||
*/
|
||
brief: string;
|
||
};
|
||
};
|
||
responses: never;
|
||
parameters: never;
|
||
requestBodies: never;
|
||
headers: never;
|
||
pathItems: never;
|
||
}
|
||
export type $defs = Record<string, never>;
|
||
export interface operations {
|
||
root__get: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Successful Response */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": {
|
||
[key: string]: string;
|
||
};
|
||
};
|
||
};
|
||
};
|
||
};
|
||
health_health_get: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Successful Response */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": {
|
||
[key: string]: string;
|
||
};
|
||
};
|
||
};
|
||
};
|
||
};
|
||
get_job_jobs__job_id__get: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
job_id: string;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Successful Response */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["JobResponse"];
|
||
};
|
||
};
|
||
/** @description job 不存在 */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ErrorEnvelope"];
|
||
};
|
||
};
|
||
/** @description Validation Error */
|
||
422: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["HTTPValidationError"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
list_projects_projects_get: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Successful Response */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ProjectListResponse"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
create_project_projects_post: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": components["schemas"]["ProjectCreateRequest"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description Successful Response */
|
||
201: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ProjectResponse"];
|
||
};
|
||
};
|
||
/** @description Validation Error */
|
||
422: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["HTTPValidationError"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
get_project_projects__project_id__get: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
project_id: string;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Successful Response */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ProjectResponse"];
|
||
};
|
||
};
|
||
/** @description 资源不存在 */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ErrorEnvelope"];
|
||
};
|
||
};
|
||
/** @description Validation Error */
|
||
422: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["HTTPValidationError"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
get_injection_projects__project_id__chapters__chapter_no__injection_get: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
project_id: string;
|
||
chapter_no: number;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Successful Response */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["InjectionResponse"];
|
||
};
|
||
};
|
||
/** @description 资源不存在 */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ErrorEnvelope"];
|
||
};
|
||
};
|
||
/** @description Validation Error */
|
||
422: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["HTTPValidationError"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
save_injection_projects__project_id__chapters__chapter_no__injection_put: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
project_id: string;
|
||
chapter_no: number;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": components["schemas"]["InjectionOverrideRequest"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description Successful Response */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["InjectionResponse"];
|
||
};
|
||
};
|
||
/** @description 资源不存在 */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ErrorEnvelope"];
|
||
};
|
||
};
|
||
/** @description Validation Error */
|
||
422: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["HTTPValidationError"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
get_draft_projects__project_id__chapters__chapter_no__draft_get: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
project_id: string;
|
||
chapter_no: number;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Successful Response */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["DraftView"];
|
||
};
|
||
};
|
||
/** @description 资源不存在 */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ErrorEnvelope"];
|
||
};
|
||
};
|
||
/** @description Validation Error */
|
||
422: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["HTTPValidationError"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
save_draft_projects__project_id__chapters__chapter_no__draft_put: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
project_id: string;
|
||
chapter_no: number;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": components["schemas"]["DraftSaveRequest"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description Successful Response */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["DraftResponse"];
|
||
};
|
||
};
|
||
/** @description Validation Error */
|
||
422: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["HTTPValidationError"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
stream_draft_projects__project_id__chapters__chapter_no__draft_post: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
project_id: string;
|
||
chapter_no: number;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: {
|
||
content: {
|
||
"application/json": components["schemas"]["DraftStreamRequest"] | null;
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description Successful Response */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": unknown;
|
||
};
|
||
};
|
||
/** @description Validation Error */
|
||
422: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["HTTPValidationError"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
review_chapter_projects__project_id__chapters__chapter_no__review_post: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
project_id: string;
|
||
chapter_no: number;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": components["schemas"]["ReviewRequest"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description Successful Response */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": unknown;
|
||
};
|
||
};
|
||
/** @description Validation Error */
|
||
422: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["HTTPValidationError"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
list_reviews_projects__project_id__chapters__chapter_no__reviews_get: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
project_id: string;
|
||
chapter_no: number;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Successful Response */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ReviewHistoryResponse"];
|
||
};
|
||
};
|
||
/** @description Validation Error */
|
||
422: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["HTTPValidationError"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
accept_chapter_projects__project_id__chapters__chapter_no__accept_post: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
project_id: string;
|
||
chapter_no: number;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": components["schemas"]["AcceptRequest"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description Successful Response */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["AcceptResponse"];
|
||
};
|
||
};
|
||
/** @description 资源不存在 */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ErrorEnvelope"];
|
||
};
|
||
};
|
||
/** @description 存在未裁决冲突 */
|
||
409: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ErrorEnvelope"];
|
||
};
|
||
};
|
||
/** @description Validation Error */
|
||
422: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["HTTPValidationError"];
|
||
};
|
||
};
|
||
/** @description LLM 不可用 */
|
||
503: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ErrorEnvelope"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
list_foreshadow_projects__project_id__foreshadow_get: {
|
||
parameters: {
|
||
query?: {
|
||
status?: string | null;
|
||
};
|
||
header?: never;
|
||
path: {
|
||
project_id: string;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Successful Response */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ForeshadowBoardResponse"];
|
||
};
|
||
};
|
||
/** @description Validation Error */
|
||
422: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["HTTPValidationError"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
register_foreshadow_projects__project_id__foreshadow_post: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
project_id: string;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": components["schemas"]["ForeshadowRegisterRequest"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description Successful Response */
|
||
201: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ForeshadowView"];
|
||
};
|
||
};
|
||
/** @description Validation Error */
|
||
422: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["HTTPValidationError"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
update_foreshadow_projects__project_id__foreshadow__code__patch: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
project_id: string;
|
||
code: string;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": components["schemas"]["ForeshadowTransitionRequest"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description Successful Response */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ForeshadowView"];
|
||
};
|
||
};
|
||
/** @description Validation Error */
|
||
422: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["HTTPValidationError"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
get_outline_projects__project_id__outline_get: {
|
||
parameters: {
|
||
query?: {
|
||
volume?: number | null;
|
||
};
|
||
header?: never;
|
||
path: {
|
||
project_id: string;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Successful Response */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["OutlineResponse"];
|
||
};
|
||
};
|
||
/** @description Validation Error */
|
||
422: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["HTTPValidationError"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
generate_outline_projects__project_id__outline_post: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
project_id: string;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": components["schemas"]["OutlineGenerateRequest"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description Successful Response */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["OutlineResponse"];
|
||
};
|
||
};
|
||
/** @description Validation Error */
|
||
422: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["HTTPValidationError"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
list_rules_projects__project_id__rules_get: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
project_id: string;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Successful Response */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["RuleListResponse"];
|
||
};
|
||
};
|
||
/** @description Validation Error */
|
||
422: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["HTTPValidationError"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
create_rule_projects__project_id__rules_post: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
project_id: string;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": components["schemas"]["RuleCreateRequest"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description Successful Response */
|
||
201: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["RuleView"];
|
||
};
|
||
};
|
||
/** @description Validation Error */
|
||
422: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["HTTPValidationError"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
delete_rule_projects__project_id__rules__rule_id__delete: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
project_id: string;
|
||
rule_id: string;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Successful Response */
|
||
204: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
/** @description Validation Error */
|
||
422: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["HTTPValidationError"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
get_style_projects__project_id__style_get: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
project_id: string;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Successful Response */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["StyleFingerprintResponse"];
|
||
};
|
||
};
|
||
/** @description 项目或指纹不存在 */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ErrorEnvelope"];
|
||
};
|
||
};
|
||
/** @description Validation Error */
|
||
422: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["HTTPValidationError"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
learn_style_projects__project_id__style_post: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
project_id: string;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": components["schemas"]["StyleLearnRequest"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description Successful Response */
|
||
202: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["StyleLearnResponse"];
|
||
};
|
||
};
|
||
/** @description Validation Error */
|
||
422: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["HTTPValidationError"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
refine_segment_projects__project_id__chapters__chapter_no__refine_post: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
project_id: string;
|
||
chapter_no: number;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": components["schemas"]["RefineRequest"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description Successful Response */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["RefineResponse"];
|
||
};
|
||
};
|
||
/** @description Validation Error */
|
||
422: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["HTTPValidationError"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
list_templates_templates_get: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Successful Response */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["TemplateResponse"][];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
create_template_templates_post: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": components["schemas"]["TemplateCreateRequest"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description Successful Response */
|
||
201: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["TemplateResponse"];
|
||
};
|
||
};
|
||
/** @description Validation Error */
|
||
422: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["HTTPValidationError"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
delete_template_templates__template_id__delete: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
template_id: string;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Successful Response */
|
||
204: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content?: never;
|
||
};
|
||
/** @description Validation Error */
|
||
422: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["HTTPValidationError"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
generate_world_projects__project_id__world_generate_post: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
project_id: string;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": components["schemas"]["WorldGenerateRequest"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description Successful Response */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["WorldGenPreviewResponse"];
|
||
};
|
||
};
|
||
/** @description Validation Error */
|
||
422: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["HTTPValidationError"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
generate_characters_projects__project_id__characters_generate_post: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
project_id: string;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": components["schemas"]["CharacterGenerateRequest"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description Successful Response */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["CharacterGenPreviewResponse"];
|
||
};
|
||
};
|
||
/** @description Validation Error */
|
||
422: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["HTTPValidationError"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
list_characters_projects__project_id__characters_get: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
project_id: string;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Successful Response */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["CharacterListResponse"];
|
||
};
|
||
};
|
||
/** @description Validation Error */
|
||
422: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["HTTPValidationError"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
ingest_characters_projects__project_id__characters_post: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
project_id: string;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": components["schemas"]["CharacterIngestRequest"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description Successful Response */
|
||
201: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["CharacterIngestResponse"];
|
||
};
|
||
};
|
||
/** @description Validation Error */
|
||
422: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["HTTPValidationError"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
list_world_entities_projects__project_id__world_entities_get: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
project_id: string;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Successful Response */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["WorldEntityListResponse"];
|
||
};
|
||
};
|
||
/** @description Validation Error */
|
||
422: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["HTTPValidationError"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
list_skills_skills_get: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Successful Response */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["SkillListResponse"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
list_toolbox_skills_toolbox_get: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Successful Response */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ToolboxListResponse"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
generate_with_tool_projects__project_id__skills__tool_key__generate_post: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
project_id: string;
|
||
tool_key: string;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": components["schemas"]["ToolGenerateRequest"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description Successful Response */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ToolGeneratePreviewResponse"];
|
||
};
|
||
};
|
||
/** @description 工具或项目不存在 / legacy 工具无通用执行 */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ErrorEnvelope"];
|
||
};
|
||
};
|
||
/** @description 工具不支持该操作(如不可入库) */
|
||
422: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ErrorEnvelope"];
|
||
};
|
||
};
|
||
/** @description LLM 不可用 */
|
||
503: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ErrorEnvelope"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
ingest_with_tool_projects__project_id__skills__tool_key__ingest_post: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
project_id: string;
|
||
tool_key: string;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": components["schemas"]["ToolIngestRequest"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description Successful Response */
|
||
201: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ToolIngestResponse"];
|
||
};
|
||
};
|
||
/** @description 工具或项目不存在 / legacy 工具无通用执行 */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ErrorEnvelope"];
|
||
};
|
||
};
|
||
/** @description 存在未裁决 continuity 冲突 */
|
||
409: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ErrorEnvelope"];
|
||
};
|
||
};
|
||
/** @description 工具不支持该操作(如不可入库) */
|
||
422: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ErrorEnvelope"];
|
||
};
|
||
};
|
||
/** @description LLM 不可用 */
|
||
503: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ErrorEnvelope"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
run_chain_projects__project_id__chains__chain_key__run_post: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
project_id: string;
|
||
chain_key: string;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": components["schemas"]["ChainRunRequest"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description Successful Response */
|
||
202: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ChainRunAccepted"];
|
||
};
|
||
};
|
||
/** @description 项目或链 key 不存在 */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ErrorEnvelope"];
|
||
};
|
||
};
|
||
/** @description 请求参数非法(count 越界等) */
|
||
422: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ErrorEnvelope"];
|
||
};
|
||
};
|
||
/** @description 无可用 LLM 凭据 */
|
||
503: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ErrorEnvelope"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
resume_chain_projects__project_id__chains_runs__job_id__resume_post: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
project_id: string;
|
||
job_id: string;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": components["schemas"]["ChainResumeRequest"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description Successful Response */
|
||
202: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ChainResumeAccepted"];
|
||
};
|
||
};
|
||
/** @description 项目或 job 不存在 */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ErrorEnvelope"];
|
||
};
|
||
};
|
||
/** @description job 非 awaiting_input 态,不可续跑 */
|
||
409: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ErrorEnvelope"];
|
||
};
|
||
};
|
||
/** @description Validation Error */
|
||
422: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["HTTPValidationError"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
list_providers_settings_providers_get: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Successful Response */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ProvidersResponse"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
upsert_providers_settings_providers_put: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": components["schemas"]["ProvidersUpsertRequest"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description Successful Response */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["ProvidersResponse"];
|
||
};
|
||
};
|
||
/** @description Validation Error */
|
||
422: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["HTTPValidationError"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
test_connection_settings_providers_test_post: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": components["schemas"]["TestConnectionRequest"];
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description Successful Response */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["TestConnectionResponse"];
|
||
};
|
||
};
|
||
/** @description Validation Error */
|
||
422: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["HTTPValidationError"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
start_oauth_settings_providers_kimi_code_oauth_start_post: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Successful Response */
|
||
202: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["OAuthStartResponse"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
disconnect_oauth_settings_providers_kimi_code_oauth_disconnect_post: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Successful Response */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["OAuthDisconnectResponse"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
oauth_status_settings_providers_kimi_code_oauth_status_get: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description Successful Response */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["OAuthStatusResponse"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
}
|