docs: generate each subsystem's cordis surface into its own page; delete the flat catalogs

Rebuild of the region machinery (PR3) on the post-#904 Typert projection:
renderPageRegion/renderInheritedPage live in dsh-typert-generator beside the
projection; scripts/gen-cordis-catalog.ts owns the curated SERVICE_PAGE /
EVENT_SCOPE_PAGE / SERVICE_WALK_EXEMPTIONS / LINK_MAP partition (fail-loud in
both directions, with the independent Context-merge scan backstopping the
projection's blind spot), spliceRegion, and the guarded pair auto-record.
docs/cordis-catalog/ is deleted: the flat events/services catalogs dissolve
into per-page regions and docs/cordis-catalog/core moves to docs/cordis-api/
with the inherited tier as its own generated page. The partition absorbs the
post-regrouping surface: ctx.typert → invariants.md, ctx.directoryPicker →
workspace.md, skills/* events → skills.md, and the four launcher-provided tui
accessor values join the named exemptions.
This commit is contained in:
Tianyi Cui
2026-07-30 21:40:58 +08:00
parent 44b035c711
commit f7323354bb
214 changed files with 10434 additions and 4447 deletions

View File

@@ -261,29 +261,46 @@ const coreDataReference = pairedPages(([
['core.md', '核心数据结构', 'Core data structures', 0],
['scope.md', '作用域', 'Scopes', 1],
['session.md', '会话', 'Sessions', 2],
['system-prompt.md', '系统提示词', 'System prompts', 4],
['tools.md', '工具', 'Tools', 5],
['llm-streaming.md', 'LLM 流式响应', 'LLM streaming', 6],
['bash.md', 'Bash 执行', 'Bash execution', 7],
['filesystem.md', '文件系统', 'Filesystem', 9],
['code-runtime.md', '代码运行时', 'Code runtime', 10],
['compaction.md', '上下文压缩', 'Compaction', 11],
['subagent.md', '子代理', 'Subagents', 12],
['workflow.md', '工作流', 'Workflows', 13],
['skills.md', '技能', 'Skills', 14],
['approval.md', '审批', 'Approvals', 15],
['user-interaction.md', '用户交互', 'User interaction', 16],
['sandbox.md', '沙箱', 'Sandboxing', 18],
['web.md', 'Web 访问', 'Web access', 19],
['persistence.md', '会话持久化', 'Session persistence', 20],
['settings.md', '用户设置', 'User settings', 21],
['credentials.md', '用户凭据', 'User credentials', 22],
['session-query.md', '会话查询', 'Session query', 3],
['session-reference.md', '会话引用', 'Session references', 4],
['session-title.md', '会话标题', 'Session titles', 5],
['settings.md', '用户设置', 'User settings', 6],
['credentials.md', '用户凭据', 'User credentials', 7],
['system-prompt.md', '系统提示词', 'System prompts', 8],
['tools.md', '工具', 'Tools', 9],
['llm-streaming.md', 'LLM 流式响应', 'LLM streaming', 10],
['token-meter.md', 'Token 计量', 'Token metering', 11],
['bash.md', 'Bash 执行', 'Bash execution', 12],
['subprocess.md', '子进程', 'Subprocesses', 13],
['tasks.md', '后台任务', 'Background tasks', 14],
['filesystem.md', '文件系统', 'Filesystem', 15],
['lsp.md', 'LSP 导航', 'LSP navigation', 16],
['code-runtime.md', '代码运行时', 'Code runtime', 17],
['compaction.md', '上下文压缩', 'Compaction', 18],
['subagent.md', '子代理', 'Subagents', 19],
['workflow.md', '工作流', 'Workflows', 20],
['skills.md', '技能', 'Skills', 21],
['approval.md', '审批', 'Approvals', 22],
['permission.md', '权限预设', 'Permission presets', 23],
['plan.md', '计划模式', 'Plan mode', 24],
['user-interaction.md', '用户交互', 'User interaction', 25],
['sandbox.md', '沙箱', 'Sandboxing', 26],
['web.md', 'Web 访问', 'Web access', 27],
['spill.md', 'Spill 存储', 'Spill storage', 28],
['persistence.md', '会话持久化', 'Session persistence', 29],
['storage.md', '存储', 'Storage', 30],
['workspace.md', '工作区', 'Workspaces', 31],
['http-server.md', 'HTTP 服务器', 'HTTP server', 32],
['client-modules.md', '客户端模块', 'Client modules', 33],
['invariants.md', '运行时不变式', 'Runtime invariants', 35],
['session-projection.md', '会话投影', 'Session projections', 36],
['telemetry.md', '遥测', 'Telemetry', 37],
] as const).map(([file, rootLabel, enLabel, order]): PairedPage => ({
source: `docs/subsystems/${file}`,
route: `reference/subsystems/${file}`,
label: { root: rootLabel, en: enLabel },
sidebar: { root: 'zh-reference', en: 'en-reference' },
section: { root: '数据结构', en: 'Data structures' },
section: { root: '子系统', en: 'Subsystems' },
order,
...(file === 'core.md' ? { sourceAliases: ['docs/subsystems'] } : {}),
})))
@@ -306,8 +323,6 @@ const reference = mirroredPages([
...([
['docs/config-catalog.md', 'reference/config-catalog.md', '插件配置', 'Plugin configuration'],
['docs/tool-catalog.md', 'reference/tool-catalog.md', 'Tool Schema', 'Tool schemas'],
['docs/cordis-catalog/services.md', 'reference/cordis-catalog/services.md', '服务', 'Services'],
['docs/cordis-catalog/events.md', 'reference/cordis-catalog/events.md', '事件', 'Events'],
['docs/persistence-catalog.md', 'reference/persistence-catalog.md', '持久化事件', 'Persistence events', 'deep'],
] as const).map(([source, route, rootLabel, enLabel, outline], order): MirroredPage => ({
source,
@@ -325,8 +340,9 @@ const reference = mirroredPages([
['fiber.md', 'Fiber', 'Fiber'],
['registry.md', 'Plugin Registry', 'Plugin Registry'],
['service.md', 'Service', 'Service'],
['inherited.md', '继承接口面', 'Inherited surface'],
] as const).map(([file, rootLabel, enLabel], order): MirroredPage => ({
source: `docs/cordis-catalog/core/${file}`,
source: `docs/cordis-api/${file}`,
route: `reference/cordis-api/${file}`,
contentLocale: 'en-US',
label: { root: rootLabel, en: enLabel },
@@ -335,16 +351,16 @@ const reference = mirroredPages([
order,
})),
...([
['goal.md', '目标', 'Goals', 3],
['pty.md', 'PTY 会话', 'PTY sessions', 8],
['commands.md', '命令', 'Human commands', 17],
['goal.md', '目标', 'Goals', 13],
['pty.md', 'PTY 会话', 'PTY sessions', 25],
['commands.md', '命令', 'Human commands', 37],
] as const).map(([file, rootLabel, enLabel, order]): MirroredPage => ({
source: `docs/subsystems/${file}`,
route: `reference/subsystems/${file}`,
contentLocale: 'en-US',
label: { root: rootLabel, en: enLabel },
sidebar: { root: 'zh-reference', en: 'en-reference' },
section: { root: '数据结构', en: 'Data structures' },
section: { root: '子系统', en: 'Subsystems' },
order,
})),
...([