{ "generatedAt": "2026-04-20T14:26:38.663Z", "manifestVersion": "2026-04-20", "generatedCommand": "npm run server-node:manifest:backend", "outputTargets": { "json": "server-node/manifests/backend-capability-index.json", "markdown": "docs/technical/NODE_BACKEND_MODULE_AND_API_INDEX.md" }, "summary": { "surfaceCount": 6, "routeCount": 96, "moduleCount": 12, "publicRouteCount": 10, "jwtRouteCount": 69, "envSwitchRouteCount": 17, "streamRouteCount": 6 }, "surfaces": [ { "id": "assets", "title": "资产生成工具面", "mounts": [ { "entryFile": "server-node/src/app.ts", "mountPath": "/api/assets", "routeFactory": "createCharacterAssetRoutes" }, { "entryFile": "server-node/src/app.ts", "mountPath": "/api/assets/qwen-sprite", "routeFactory": "createQwenSpriteRoutes" } ], "responsibilities": [ "生成角色主形象、动作、动作模板与工作流缓存。", "承接 Qwen 精灵表主图、整表、修帧与保存链路。", "把产物发布到 `public/generated-*` 目录并落地局部 manifest。" ], "primaryServiceBoundaries": [ "负责对接 DashScope、Ark 等外部媒体供应商,但不维护 runtime 快照与业务状态。", "统一受 `ASSETS_API_ENABLED` 开关控制,产物以文件与 JSON manifest 形式落在仓库工作区。" ], "relatedModuleIds": [ "assets" ], "routeCount": 14, "routeIds": [ "assets.characterAnimationGenerate", "assets.characterAnimationImportVideo", "assets.characterAnimationJobGet", "assets.characterAnimationPublish", "assets.characterAnimationTemplatesList", "assets.characterVisualGenerate", "assets.characterVisualJobGet", "assets.characterVisualPublish", "assets.characterWorkflowCacheSave", "assets.characterWorkflowCacheGet", "assets.qwenSpriteFrameRepairGenerate", "assets.qwenSpriteMasterGenerate", "assets.qwenSpriteAssetSave", "assets.qwenSpriteSheetGenerate" ] }, { "id": "auth", "title": "鉴权与会话面", "mounts": [ { "entryFile": "server-node/src/app.ts", "mountPath": "/api/auth", "routeFactory": "createAuthRoutes" } ], "responsibilities": [ "承接本地账号、短信验证码与微信登录流程。", "管理 refresh session、用户信息、会话吊销、审计日志与风险拦截。" ], "primaryServiceBoundaries": [ "HTTP 层只做 schema 校验、请求上下文拼装与 Cookie 管理,核心鉴权逻辑统一收口到 `server-node/src/auth/*`。", "用户、身份、会话、风控与短信事件等持久化职责全部下沉到 repository 层,避免路由直接碰数据库细节。" ], "relatedModuleIds": [], "routeCount": 17, "routeIds": [ "auth.auditLogs", "auth.entry", "auth.loginOptions", "auth.logout", "auth.logoutAll", "auth.me", "auth.phoneChange", "auth.phoneLogin", "auth.phoneSendCode", "auth.refresh", "auth.riskBlocks", "auth.riskBlocksLift", "auth.sessions", "auth.sessionRevoke", "auth.wechatBindPhone", "auth.wechatCallback", "auth.wechatStart" ] }, { "id": "editor", "title": "编辑器工具面", "mounts": [ { "entryFile": "server-node/src/app.ts", "mountPath": "/api/editor", "routeFactory": "createEditorRoutes" } ], "responsibilities": [ "读取编辑器资源 JSON。", "回写编辑器覆盖文件。", "枚举 `public/Icons` 下的物品图标资源。" ], "primaryServiceBoundaries": [ "只对工作区文件系统与 `public` 目录负责,不参与运行时数据库存储。", "统一受 `EDITOR_API_ENABLED` 开关控制,生产环境可按需关闭。" ], "relatedModuleIds": [ "editor" ], "routeCount": 3, "routeIds": [ "editor.catalogItems", "editor.resourceRead", "editor.resourceWrite" ] }, { "id": "health", "title": "基础健康检查", "mounts": [ { "entryFile": "server-node/src/app.ts", "mountPath": "/healthz", "routeFactory": "createApp" } ], "responsibilities": [ "提供 Node 后端进程级健康探针。", "给反向代理、部署平台和本地联调提供最小可用状态确认。" ], "primaryServiceBoundaries": [ "只返回服务静态信息,不触达数据库、鉴权或外部模型供应商。" ], "relatedModuleIds": [], "routeCount": 1, "routeIds": [ "health.check" ] }, { "id": "runtime-main", "title": "运行时主能力面", "mounts": [ { "entryFile": "server-node/src/app.ts", "mountPath": "/api", "routeFactory": "createRuntimeRoutes" }, { "entryFile": "server-node/src/routes/runtimeRoutes.ts", "mountPath": "/runtime/custom-world/agent", "routeFactory": "createCustomWorldAgentRoutes" } ], "responsibilities": [ "承接运行时资料库、公开画廊、存档、设置与个人档案接口。", "承接剧情生成、聊天流、任务生成、运行时物品意图与自定义世界链路。", "承接 Custom World Agent 会话、消息流和操作回放。" ], "primaryServiceBoundaries": [ "HTTP contract 收口在 `runtimeRoutes.ts`,真正的世界生成、剧情、聊天、任务和资源逻辑继续下沉到 `services/*` 与 `src/modules/*`。", "除公开画廊外,运行时接口统一走 JWT 鉴权,并依赖 `runtimeRepository`、session store 与 LLM client 执行。" ], "relatedModuleIds": [ "ai", "custom-world", "quest", "runtime", "runtime-item", "story" ], "routeCount": 59, "routeIds": [ "runtime.customWorldCoverImage", "runtime.customWorldCoverUpload", "runtime.customWorldEntity.primary", "runtime.customWorldSceneImage", "runtime.customWorldSceneNpc.primary", "runtime.llmChatCompletionsProxy", "runtime.profileBrowseHistoryDelete.primary", "runtime.profileBrowseHistoryGet.primary", "runtime.profileBrowseHistoryPost.primary", "runtime.profileDashboard.primary", "runtime.profilePlayStats.primary", "runtime.profileSaveArchivesList.primary", "runtime.profileSaveArchivesResume.primary", "runtime.profileWalletLedger.primary", "runtime.characterReplyStream", "runtime.characterSuggestions", "runtime.characterSummary", "runtime.npcDialogueStream", "runtime.npcRecruitStream", "runtime.npcTurnStream", "runtime.customWorldGalleryList", "runtime.customWorldGalleryDetail", "runtime.customWorldLibraryList", "runtime.customWorldLibraryDelete", "runtime.customWorldLibraryUpsert", "runtime.customWorldLibraryPublish", "runtime.customWorldLibraryUnpublish", "runtime.customWorldAgentCreateSession", "runtime.customWorldAgentGetSession", "runtime.customWorldAgentExecuteAction", "runtime.customWorldAgentGetCardDetail", "runtime.customWorldAgentSendMessage", "runtime.customWorldAgentStreamMessage", "runtime.customWorldAgentGetOperation", "runtime.customWorldEntity.compat", "runtime.customWorldSceneNpc.compat", "runtime.customWorldSessionCreate", "runtime.customWorldSessionGet", "runtime.customWorldSessionAnswer", "runtime.customWorldSessionGenerateStream", "runtime.customWorldWorksList", "runtime.itemsIntent", "runtime.profileBrowseHistoryDelete.compat", "runtime.profileBrowseHistoryGet.compat", "runtime.profileBrowseHistoryPost.compat", "runtime.profileDashboard.compat", "runtime.profilePlayStats.compat", "runtime.profileSaveArchivesList.compat", "runtime.profileSaveArchivesResume.compat", "runtime.profileWalletLedger.compat", "runtime.questsGenerate", "runtime.snapshotDelete", "runtime.snapshotGet", "runtime.snapshotPut", "runtime.settingsGet", "runtime.settingsPut", "runtime.storyContinue", "runtime.storyInitial", "runtime.wsHealth" ] }, { "id": "runtime-story-action", "title": "运行时 Story Action 面", "mounts": [ { "entryFile": "server-node/src/app.ts", "mountPath": "/api/runtime/story", "routeFactory": "createStoryActionRoutes" } ], "responsibilities": [ "把前端 story choice 动作解析为新的运行时状态。", "查询指定 story session 的可恢复状态。" ], "primaryServiceBoundaries": [ "路由层只做鉴权与 schema 校验,真正的动作分发与跨模块协作集中在 `storyActionService.ts`。", "Story Action 会联动 quest、inventory、runtime-item、npc 等内部模块,但对前端只暴露 story 这一条稳定入口。" ], "relatedModuleIds": [ "story", "quest", "inventory", "runtime-item", "npc", "progression", "combat", "runtime" ], "routeCount": 2, "routeIds": [ "storyAction.resolve", "storyAction.stateGet" ] } ], "modules": [ { "id": "ai", "title": "AI 编排模块", "directory": "server-node/src/modules/ai", "exposedBySurfaceIds": [ "runtime-main" ], "responsibilities": [ "统一剧情、多轮聊天与自定义世界编排器的 prompt 构造与输出归一化。", "屏蔽前端对不同 AI 链路的直接拼装细节。" ], "primaryServiceBoundaries": [ "专注提示词与编排,不负责持久化与 HTTP 传输。", "通过 `services/llmClient.ts` 与外部模型交互,由路由与 service 层决定何时调用。" ], "keyFiles": [ "server-node/src/modules/ai/chatOrchestrator.ts", "server-node/src/modules/ai/customWorldOrchestrator.ts", "server-node/src/modules/ai/storyOrchestrator.ts" ], "routeCount": 23, "routeIds": [ "runtime.customWorldEntity.primary", "runtime.customWorldSceneNpc.primary", "runtime.llmChatCompletionsProxy", "runtime.characterReplyStream", "runtime.characterSuggestions", "runtime.characterSummary", "runtime.npcDialogueStream", "runtime.npcRecruitStream", "runtime.npcTurnStream", "runtime.customWorldAgentCreateSession", "runtime.customWorldAgentGetSession", "runtime.customWorldAgentExecuteAction", "runtime.customWorldAgentGetCardDetail", "runtime.customWorldAgentSendMessage", "runtime.customWorldAgentStreamMessage", "runtime.customWorldAgentGetOperation", "runtime.customWorldEntity.compat", "runtime.customWorldSceneNpc.compat", "runtime.customWorldSessionGenerateStream", "runtime.itemsIntent", "runtime.questsGenerate", "runtime.storyContinue", "runtime.storyInitial" ] }, { "id": "assets", "title": "资产工具模块", "directory": "server-node/src/modules/assets", "exposedBySurfaceIds": [ "assets" ], "responsibilities": [ "承接角色资产与 Qwen 精灵表的生成、查询、发布和保存。", "维护资产流程需要的缓存、草稿与产物 manifest。" ], "primaryServiceBoundaries": [ "以文件系统和外部媒体模型为主要边界,不碰 runtimeRepository。", "对外暴露稳定 HTTP 路径,对内通过私有 helper 处理媒体编码、任务轮询与写盘。" ], "keyFiles": [ "server-node/src/modules/assets/characterAssetRoutes.ts", "server-node/src/modules/assets/qwenSpriteRoutes.ts" ], "routeCount": 18, "routeIds": [ "assets.characterAnimationGenerate", "assets.characterAnimationImportVideo", "assets.characterAnimationJobGet", "assets.characterAnimationPublish", "assets.characterAnimationTemplatesList", "assets.characterVisualGenerate", "assets.characterVisualJobGet", "assets.characterVisualPublish", "assets.characterWorkflowCacheSave", "assets.characterWorkflowCacheGet", "assets.qwenSpriteFrameRepairGenerate", "assets.qwenSpriteMasterGenerate", "assets.qwenSpriteAssetSave", "assets.qwenSpriteSheetGenerate", "runtime.customWorldCoverImage", "runtime.customWorldCoverUpload", "runtime.customWorldSceneImage", "runtime.customWorldAgentExecuteAction" ] }, { "id": "combat", "title": "战斗结算模块", "directory": "server-node/src/modules/combat", "exposedBySurfaceIds": [ "runtime-story-action" ], "responsibilities": [ "提供运行时战斗结算与数值变更能力。", "为 story action 里的战斗型交互提供纯计算服务。" ], "primaryServiceBoundaries": [ "聚焦状态推导与结果计算,不负责 transport 与持久化。" ], "keyFiles": [ "server-node/src/modules/combat/combatResolutionService.ts" ], "routeCount": 1, "routeIds": [ "storyAction.resolve" ] }, { "id": "custom-world", "title": "自定义世界运行时模块", "directory": "server-node/src/modules/custom-world", "exposedBySurfaceIds": [ "runtime-main" ], "responsibilities": [ "规范 creator intent、世界运行时类型与 profile compile。", "把世界创作输入整理成运行时可消费的数据结构。" ], "primaryServiceBoundaries": [ "偏纯领域建模与 compile,不直接做 HTTP、数据库查询或模型调用。" ], "keyFiles": [ "server-node/src/modules/custom-world/creatorIntentRuntime.ts", "server-node/src/modules/custom-world/runtimeProfile.ts", "server-node/src/modules/custom-world/runtimeTypes.ts" ], "routeCount": 26, "routeIds": [ "runtime.customWorldCoverImage", "runtime.customWorldCoverUpload", "runtime.customWorldEntity.primary", "runtime.customWorldSceneImage", "runtime.customWorldSceneNpc.primary", "runtime.customWorldGalleryList", "runtime.customWorldGalleryDetail", "runtime.customWorldLibraryList", "runtime.customWorldLibraryDelete", "runtime.customWorldLibraryUpsert", "runtime.customWorldLibraryPublish", "runtime.customWorldLibraryUnpublish", "runtime.customWorldAgentCreateSession", "runtime.customWorldAgentGetSession", "runtime.customWorldAgentExecuteAction", "runtime.customWorldAgentGetCardDetail", "runtime.customWorldAgentSendMessage", "runtime.customWorldAgentStreamMessage", "runtime.customWorldAgentGetOperation", "runtime.customWorldEntity.compat", "runtime.customWorldSceneNpc.compat", "runtime.customWorldSessionCreate", "runtime.customWorldSessionGet", "runtime.customWorldSessionAnswer", "runtime.customWorldSessionGenerateStream", "runtime.customWorldWorksList" ] }, { "id": "editor", "title": "编辑器资源模块", "directory": "server-node/src/modules/editor", "exposedBySurfaceIds": [ "editor" ], "responsibilities": [ "提供编辑器资源目录枚举与 JSON 读写入口。" ], "primaryServiceBoundaries": [ "只负责工作区文件输入输出,不参与运行时业务计算。" ], "keyFiles": [ "server-node/src/modules/editor/editorRoutes.ts" ], "routeCount": 3, "routeIds": [ "editor.catalogItems", "editor.resourceRead", "editor.resourceWrite" ] }, { "id": "inventory", "title": "背包与物品变更模块", "directory": "server-node/src/modules/inventory", "exposedBySurfaceIds": [ "runtime-story-action" ], "responsibilities": [ "维护背包变更、NPC 背包交互与 story action 里的物品副作用。" ], "primaryServiceBoundaries": [ "对运行时状态做局部变更,不直接暴露 HTTP 路由。" ], "keyFiles": [ "server-node/src/modules/inventory/inventoryMutationService.ts", "server-node/src/modules/inventory/inventoryStoryActionService.ts", "server-node/src/modules/inventory/npcInventoryStoryActionService.ts" ], "routeCount": 1, "routeIds": [ "storyAction.resolve" ] }, { "id": "npc", "title": "NPC 交互模块", "directory": "server-node/src/modules/npc", "exposedBySurfaceIds": [ "runtime-story-action", "runtime-main" ], "responsibilities": [ "维护 NPC 互动规则、任务 primitive 与关系变更逻辑。" ], "primaryServiceBoundaries": [ "专注 NPC 侧状态推导,供 story action 与聊天/任务链路复用。" ], "keyFiles": [ "server-node/src/modules/npc/npcInteractionService.ts", "server-node/src/modules/npc/npcTask6Primitives.ts" ], "routeCount": 6, "routeIds": [ "runtime.customWorldSceneNpc.primary", "runtime.npcDialogueStream", "runtime.npcRecruitStream", "runtime.npcTurnStream", "runtime.customWorldSceneNpc.compat", "storyAction.resolve" ] }, { "id": "progression", "title": "成长与关卡进程模块", "directory": "server-node/src/modules/progression", "exposedBySurfaceIds": [ "runtime-story-action", "runtime-main" ], "responsibilities": [ "提供角色成长、敌对等级、章节推进与 benchmark 逻辑。" ], "primaryServiceBoundaries": [ "只做成长数值与章节进度计算,由 runtime hydrate 与 story action 复用。" ], "keyFiles": [ "server-node/src/modules/progression/playerProgressionService.ts", "server-node/src/modules/progression/hostileProgressionService.ts", "server-node/src/modules/progression/chapterProgressionPlanner.ts" ], "routeCount": 3, "routeIds": [ "runtime.snapshotGet", "runtime.snapshotPut", "storyAction.resolve" ] }, { "id": "quest", "title": "任务运行时模块", "directory": "server-node/src/modules/quest", "exposedBySurfaceIds": [ "runtime-main", "runtime-story-action" ], "responsibilities": [ "生成任务意图、维护任务日志与处理任务进度信号。", "为运行时 quest 接口与 story action 提供统一任务语义。" ], "primaryServiceBoundaries": [ "领域逻辑以 quest module 为中心,AI 生成只是一种输入来源。", "不直接处理 HTTP 响应,统一由 routes/service 层调用。" ], "keyFiles": [ "server-node/src/modules/quest/runtimeQuestModule.ts", "server-node/src/modules/quest/questProgressionService.ts", "server-node/src/modules/quest/questStoryActionService.ts" ], "routeCount": 4, "routeIds": [ "runtime.questsGenerate", "runtime.snapshotGet", "runtime.snapshotPut", "storyAction.resolve" ] }, { "id": "runtime", "title": "运行时状态基座模块", "directory": "server-node/src/modules/runtime", "exposedBySurfaceIds": [ "runtime-main", "runtime-story-action" ], "responsibilities": [ "定义运行时状态 primitive、经济与装备规则。", "负责存档 hydration、兼容迁移与状态归一化。" ], "primaryServiceBoundaries": [ "是 runtimeRepository 与 story action 的共同状态基座,不承担 HTTP 入口职责。" ], "keyFiles": [ "server-node/src/modules/runtime/runtimeSnapshotHydration.ts", "server-node/src/modules/runtime/runtimeStatePrimitives.ts", "server-node/src/modules/runtime/runtimeEquipmentModule.ts" ], "routeCount": 32, "routeIds": [ "runtime.profileBrowseHistoryDelete.primary", "runtime.profileBrowseHistoryGet.primary", "runtime.profileBrowseHistoryPost.primary", "runtime.profileDashboard.primary", "runtime.profilePlayStats.primary", "runtime.profileSaveArchivesList.primary", "runtime.profileSaveArchivesResume.primary", "runtime.profileWalletLedger.primary", "runtime.customWorldGalleryList", "runtime.customWorldGalleryDetail", "runtime.customWorldLibraryList", "runtime.customWorldLibraryDelete", "runtime.customWorldLibraryUpsert", "runtime.customWorldLibraryPublish", "runtime.customWorldLibraryUnpublish", "runtime.customWorldWorksList", "runtime.profileBrowseHistoryDelete.compat", "runtime.profileBrowseHistoryGet.compat", "runtime.profileBrowseHistoryPost.compat", "runtime.profileDashboard.compat", "runtime.profilePlayStats.compat", "runtime.profileSaveArchivesList.compat", "runtime.profileSaveArchivesResume.compat", "runtime.profileWalletLedger.compat", "runtime.snapshotDelete", "runtime.snapshotGet", "runtime.snapshotPut", "runtime.settingsGet", "runtime.settingsPut", "storyAction.resolve", "storyAction.stateGet", "runtime.wsHealth" ] }, { "id": "runtime-item", "title": "运行时物品模块", "directory": "server-node/src/modules/runtime-item", "exposedBySurfaceIds": [ "runtime-main", "runtime-story-action" ], "responsibilities": [ "生成运行时物品意图、物品奖励与剧情指纹。", "维护宝藏与物品解析逻辑。" ], "primaryServiceBoundaries": [ "聚焦物品领域编译与奖励拼装,由 route/service 选择具体触发时机。" ], "keyFiles": [ "server-node/src/modules/runtime-item/runtimeItemModule.ts", "server-node/src/modules/runtime-item/runtimeItemResolutionService.ts", "server-node/src/modules/runtime-item/treasureStoryActionService.ts" ], "routeCount": 2, "routeIds": [ "runtime.itemsIntent", "storyAction.resolve" ] }, { "id": "story", "title": "故事会话模块", "directory": "server-node/src/modules/story", "exposedBySurfaceIds": [ "runtime-main", "runtime-story-action" ], "responsibilities": [ "维护运行时故事会话状态与 action 分发。", "为 story resolve、story state 查询提供统一入口。" ], "primaryServiceBoundaries": [ "story 模块是 runtime 主循环的编排层,必要时再向 quest、inventory、combat 等领域模块分发。" ], "keyFiles": [ "server-node/src/modules/story/runtimeSession.ts", "server-node/src/modules/story/storyActionRoutes.ts", "server-node/src/modules/story/storyActionService.ts" ], "routeCount": 10, "routeIds": [ "runtime.characterReplyStream", "runtime.characterSuggestions", "runtime.characterSummary", "runtime.npcDialogueStream", "runtime.npcRecruitStream", "runtime.npcTurnStream", "storyAction.resolve", "runtime.storyContinue", "runtime.storyInitial", "storyAction.stateGet" ] } ], "routes": [ { "id": "assets.characterAnimationGenerate", "group": "assets-character-animation", "method": "POST", "path": "/api/assets/character-animation/generate", "operation": "assets.character.animation.generate", "access": "开关: ASSETS_API_ENABLED", "responseMode": "json", "summary": "生成角色动作草稿。", "domainModuleIds": [ "assets" ], "sourceHint": "assets.character.animation.generate", "surfaceId": "assets", "sourceFile": "server-node/src/modules/assets/characterAssetRoutes.ts" }, { "id": "assets.characterAnimationImportVideo", "group": "assets-character-animation", "method": "POST", "path": "/api/assets/character-animation/import-video", "operation": "assets.character.animation.importVideo", "access": "开关: ASSETS_API_ENABLED", "responseMode": "json", "summary": "导入动作参考视频并转为可消费素材。", "domainModuleIds": [ "assets" ], "sourceHint": "assets.character.animation.importVideo", "surfaceId": "assets", "sourceFile": "server-node/src/modules/assets/characterAssetRoutes.ts" }, { "id": "assets.characterAnimationJobGet", "group": "assets-character-animation", "method": "GET", "path": "/api/assets/character-animation/jobs/:taskId", "operation": "assets.character.animation.job.get", "access": "开关: ASSETS_API_ENABLED", "responseMode": "json", "summary": "查询角色动作生成任务状态。", "domainModuleIds": [ "assets" ], "sourceHint": "assets.character.animation.job.get", "surfaceId": "assets", "sourceFile": "server-node/src/modules/assets/characterAssetRoutes.ts" }, { "id": "assets.characterAnimationPublish", "group": "assets-character-animation", "method": "POST", "path": "/api/assets/character-animation/publish", "operation": "assets.character.animation.publish", "access": "开关: ASSETS_API_ENABLED", "responseMode": "json", "summary": "发布角色动作帧集到 public 目录。", "domainModuleIds": [ "assets" ], "sourceHint": "assets.character.animation.publish", "surfaceId": "assets", "sourceFile": "server-node/src/modules/assets/characterAssetRoutes.ts" }, { "id": "assets.characterAnimationTemplatesList", "group": "assets-character-animation", "method": "GET", "path": "/api/assets/character-animation/templates", "operation": "assets.character.animation.templates.list", "access": "开关: ASSETS_API_ENABLED", "responseMode": "json", "summary": "列出内置角色动作模板。", "domainModuleIds": [ "assets" ], "sourceHint": "assets.character.animation.templates.list", "surfaceId": "assets", "sourceFile": "server-node/src/modules/assets/characterAssetRoutes.ts" }, { "id": "assets.characterVisualGenerate", "group": "assets-character-visual", "method": "POST", "path": "/api/assets/character-visual/generate", "operation": "assets.character.visual.generate", "access": "开关: ASSETS_API_ENABLED", "responseMode": "json", "summary": "生成角色主形象候选图。", "domainModuleIds": [ "assets" ], "sourceHint": "assets.character.visual.generate", "surfaceId": "assets", "sourceFile": "server-node/src/modules/assets/characterAssetRoutes.ts" }, { "id": "assets.characterVisualJobGet", "group": "assets-character-visual", "method": "GET", "path": "/api/assets/character-visual/jobs/:taskId", "operation": "assets.character.visual.job.get", "access": "开关: ASSETS_API_ENABLED", "responseMode": "json", "summary": "查询角色主形象生成任务状态。", "domainModuleIds": [ "assets" ], "sourceHint": "assets.character.visual.job.get", "surfaceId": "assets", "sourceFile": "server-node/src/modules/assets/characterAssetRoutes.ts" }, { "id": "assets.characterVisualPublish", "group": "assets-character-visual", "method": "POST", "path": "/api/assets/character-visual/publish", "operation": "assets.character.visual.publish", "access": "开关: ASSETS_API_ENABLED", "responseMode": "json", "summary": "发布选中的角色主形象到 public 目录。", "domainModuleIds": [ "assets" ], "sourceHint": "assets.character.visual.publish", "surfaceId": "assets", "sourceFile": "server-node/src/modules/assets/characterAssetRoutes.ts" }, { "id": "assets.characterWorkflowCacheSave", "group": "assets-character-cache", "method": "POST", "path": "/api/assets/character-workflow-cache", "operation": "assets.character.workflowCache.save", "access": "开关: ASSETS_API_ENABLED", "responseMode": "json", "summary": "保存角色资产工作流缓存。", "domainModuleIds": [ "assets" ], "sourceHint": "assets.character.workflowCache.save", "surfaceId": "assets", "sourceFile": "server-node/src/modules/assets/characterAssetRoutes.ts" }, { "id": "assets.characterWorkflowCacheGet", "group": "assets-character-cache", "method": "GET", "path": "/api/assets/character-workflow-cache/:characterId", "operation": "assets.character.workflowCache.get", "access": "开关: ASSETS_API_ENABLED", "responseMode": "json", "summary": "按角色读取角色资产工作流缓存。", "domainModuleIds": [ "assets" ], "sourceHint": "assets.character.workflowCache.get", "surfaceId": "assets", "sourceFile": "server-node/src/modules/assets/characterAssetRoutes.ts" }, { "id": "assets.qwenSpriteFrameRepairGenerate", "group": "assets-qwen", "method": "POST", "path": "/api/assets/qwen-sprite/frame-repair", "operation": "assets.qwenSprite.frameRepair.generate", "access": "开关: ASSETS_API_ENABLED", "responseMode": "json", "summary": "对单帧做 Qwen 修复。", "domainModuleIds": [ "assets" ], "sourceHint": "assets.qwenSprite.frameRepair.generate", "surfaceId": "assets", "sourceFile": "server-node/src/modules/assets/qwenSpriteRoutes.ts" }, { "id": "assets.qwenSpriteMasterGenerate", "group": "assets-qwen", "method": "POST", "path": "/api/assets/qwen-sprite/master", "operation": "assets.qwenSprite.master.generate", "access": "开关: ASSETS_API_ENABLED", "responseMode": "json", "summary": "生成 Qwen 精灵主图。", "domainModuleIds": [ "assets" ], "sourceHint": "assets.qwenSprite.master.generate", "surfaceId": "assets", "sourceFile": "server-node/src/modules/assets/qwenSpriteRoutes.ts" }, { "id": "assets.qwenSpriteAssetSave", "group": "assets-qwen", "method": "POST", "path": "/api/assets/qwen-sprite/save", "operation": "assets.qwenSprite.asset.save", "access": "开关: ASSETS_API_ENABLED", "responseMode": "json", "summary": "保存 Qwen 精灵资产到 public 目录。", "domainModuleIds": [ "assets" ], "sourceHint": "assets.qwenSprite.asset.save", "surfaceId": "assets", "sourceFile": "server-node/src/modules/assets/qwenSpriteRoutes.ts" }, { "id": "assets.qwenSpriteSheetGenerate", "group": "assets-qwen", "method": "POST", "path": "/api/assets/qwen-sprite/sheet", "operation": "assets.qwenSprite.sheet.generate", "access": "开关: ASSETS_API_ENABLED", "responseMode": "json", "summary": "生成 Qwen 精灵表。", "domainModuleIds": [ "assets" ], "sourceHint": "assets.qwenSprite.sheet.generate", "surfaceId": "assets", "sourceFile": "server-node/src/modules/assets/qwenSpriteRoutes.ts" }, { "id": "auth.auditLogs", "group": "auth-audit", "method": "GET", "path": "/api/auth/audit-logs", "operation": "auth.audit_logs", "access": "JWT", "responseMode": "json", "summary": "查询当前账号的鉴权审计日志。", "domainModuleIds": [], "sourceHint": "/audit-logs", "surfaceId": "auth", "sourceFile": "server-node/src/routes/authRoutes.ts" }, { "id": "auth.entry", "group": "auth-entry", "method": "POST", "path": "/api/auth/entry", "operation": "auth.entry", "access": "公开", "responseMode": "json", "summary": "用户名密码登录;不存在则创建本地账号。", "domainModuleIds": [], "sourceHint": "/entry", "surfaceId": "auth", "sourceFile": "server-node/src/routes/authRoutes.ts" }, { "id": "auth.loginOptions", "group": "auth-entry", "method": "GET", "path": "/api/auth/login-options", "operation": "auth.login_options", "access": "公开", "responseMode": "json", "summary": "返回当前启用的登录方式与入口配置。", "domainModuleIds": [], "sourceHint": "/login-options", "surfaceId": "auth", "sourceFile": "server-node/src/routes/authRoutes.ts" }, { "id": "auth.logout", "group": "auth-session", "method": "POST", "path": "/api/auth/logout", "operation": "auth.logout", "access": "JWT", "responseMode": "json", "summary": "退出当前会话并清理 refresh cookie。", "domainModuleIds": [], "sourceHint": "/logout", "surfaceId": "auth", "sourceFile": "server-node/src/routes/authRoutes.ts" }, { "id": "auth.logoutAll", "group": "auth-session", "method": "POST", "path": "/api/auth/logout-all", "operation": "auth.logout_all", "access": "JWT", "responseMode": "json", "summary": "退出当前账号的全部会话。", "domainModuleIds": [], "sourceHint": "/logout-all", "surfaceId": "auth", "sourceFile": "server-node/src/routes/authRoutes.ts" }, { "id": "auth.me", "group": "auth-profile", "method": "GET", "path": "/api/auth/me", "operation": "auth.me", "access": "JWT", "responseMode": "json", "summary": "读取当前登录用户的鉴权资料。", "domainModuleIds": [], "sourceHint": "/me", "surfaceId": "auth", "sourceFile": "server-node/src/routes/authRoutes.ts" }, { "id": "auth.phoneChange", "group": "auth-phone", "method": "POST", "path": "/api/auth/phone/change", "operation": "auth.phone.change", "access": "JWT", "responseMode": "json", "summary": "已登录用户更换绑定手机号。", "domainModuleIds": [], "sourceHint": "/phone/change", "surfaceId": "auth", "sourceFile": "server-node/src/routes/authRoutes.ts" }, { "id": "auth.phoneLogin", "group": "auth-phone", "method": "POST", "path": "/api/auth/phone/login", "operation": "auth.phone.login", "access": "公开", "responseMode": "json", "summary": "手机号验证码登录。", "domainModuleIds": [], "sourceHint": "/phone/login", "surfaceId": "auth", "sourceFile": "server-node/src/routes/authRoutes.ts" }, { "id": "auth.phoneSendCode", "group": "auth-phone", "method": "POST", "path": "/api/auth/phone/send-code", "operation": "auth.phone.send_code", "access": "公开", "responseMode": "json", "summary": "发送手机号登录或绑定验证码。", "domainModuleIds": [], "sourceHint": "/phone/send-code", "surfaceId": "auth", "sourceFile": "server-node/src/routes/authRoutes.ts" }, { "id": "auth.refresh", "group": "auth-session", "method": "POST", "path": "/api/auth/refresh", "operation": "auth.refresh", "access": "公开", "responseMode": "json", "summary": "使用 refresh session 刷新 JWT。", "domainModuleIds": [], "sourceHint": "/refresh", "surfaceId": "auth", "sourceFile": "server-node/src/routes/authRoutes.ts" }, { "id": "auth.riskBlocks", "group": "auth-risk", "method": "GET", "path": "/api/auth/risk-blocks", "operation": "auth.risk_blocks", "access": "JWT", "responseMode": "json", "summary": "查询当前用户命中的风控封禁。", "domainModuleIds": [], "sourceHint": "/risk-blocks", "surfaceId": "auth", "sourceFile": "server-node/src/routes/authRoutes.ts" }, { "id": "auth.riskBlocksLift", "group": "auth-risk", "method": "POST", "path": "/api/auth/risk-blocks/:scopeType/lift", "operation": "auth.risk_blocks.lift", "access": "JWT", "responseMode": "json", "summary": "请求解除指定维度的风控拦截。", "domainModuleIds": [], "sourceHint": "/risk-blocks/:scopeType/lift", "surfaceId": "auth", "sourceFile": "server-node/src/routes/authRoutes.ts" }, { "id": "auth.sessions", "group": "auth-session", "method": "GET", "path": "/api/auth/sessions", "operation": "auth.sessions", "access": "JWT", "responseMode": "json", "summary": "列出当前账号的活跃会话。", "domainModuleIds": [], "sourceHint": "/sessions", "surfaceId": "auth", "sourceFile": "server-node/src/routes/authRoutes.ts" }, { "id": "auth.sessionRevoke", "group": "auth-session", "method": "POST", "path": "/api/auth/sessions/:sessionId/revoke", "operation": "auth.sessions.revoke", "access": "JWT", "responseMode": "json", "summary": "吊销指定会话。", "domainModuleIds": [], "sourceHint": "/sessions/:sessionId/revoke", "surfaceId": "auth", "sourceFile": "server-node/src/routes/authRoutes.ts" }, { "id": "auth.wechatBindPhone", "group": "auth-wechat", "method": "POST", "path": "/api/auth/wechat/bind-phone", "operation": "auth.wechat.bind_phone", "access": "JWT", "responseMode": "json", "summary": "为已登录微信账号绑定手机号。", "domainModuleIds": [], "sourceHint": "/wechat/bind-phone", "surfaceId": "auth", "sourceFile": "server-node/src/routes/authRoutes.ts" }, { "id": "auth.wechatCallback", "group": "auth-wechat", "method": "GET", "path": "/api/auth/wechat/callback", "operation": "auth.wechat.callback", "access": "公开", "responseMode": "redirect", "summary": "处理微信回调并重定向回前端。", "domainModuleIds": [], "sourceHint": "/wechat/callback", "surfaceId": "auth", "sourceFile": "server-node/src/routes/authRoutes.ts" }, { "id": "auth.wechatStart", "group": "auth-wechat", "method": "GET", "path": "/api/auth/wechat/start", "operation": "auth.wechat.start", "access": "公开", "responseMode": "json", "summary": "发起微信登录并返回授权 URL。", "domainModuleIds": [], "sourceHint": "/wechat/start", "surfaceId": "auth", "sourceFile": "server-node/src/routes/authRoutes.ts" }, { "id": "runtime.customWorldCoverImage", "group": "runtime-custom-world-assets", "method": "POST", "path": "/api/custom-world/cover-image", "operation": "runtime.customWorld.coverImage", "access": "JWT", "responseMode": "json", "summary": "生成自定义世界封面图。", "domainModuleIds": [ "custom-world", "assets" ], "sourceHint": "/custom-world/cover-image", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.customWorldCoverUpload", "group": "runtime-custom-world-assets", "method": "POST", "path": "/api/custom-world/cover-upload", "operation": "runtime.customWorld.coverUpload", "access": "JWT", "responseMode": "json", "summary": "上传并落地自定义世界封面图。", "domainModuleIds": [ "custom-world", "assets" ], "sourceHint": "/custom-world/cover-upload", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.customWorldEntity.primary", "group": "runtime-custom-world-assets", "method": "POST", "path": "/api/custom-world/entity", "operation": "runtime.customWorld.entity", "access": "JWT", "responseMode": "json", "summary": "按世界 profile 生成单个角色或地标实体。", "domainModuleIds": [ "custom-world", "ai" ], "sourceHint": "/custom-world/entity", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.customWorldSceneImage", "group": "runtime-custom-world-assets", "method": "POST", "path": "/api/custom-world/scene-image", "operation": "runtime.customWorld.sceneImage", "access": "JWT", "responseMode": "json", "summary": "生成自定义世界场景图。", "domainModuleIds": [ "custom-world", "assets" ], "sourceHint": "/custom-world/scene-image", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.customWorldSceneNpc.primary", "group": "runtime-custom-world-assets", "method": "POST", "path": "/api/custom-world/scene-npc", "operation": "runtime.customWorld.sceneNpc", "access": "JWT", "responseMode": "json", "summary": "按地标生成场景 NPC。", "domainModuleIds": [ "custom-world", "ai", "npc" ], "sourceHint": "/custom-world/scene-npc", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "editor.catalogItems", "group": "editor-catalog", "method": "GET", "path": "/api/editor/catalog/items", "operation": "editor.catalog.items.list", "access": "开关: EDITOR_API_ENABLED", "responseMode": "json", "summary": "列出 `public/Icons` 下的物品图标资源。", "domainModuleIds": [ "editor" ], "sourceHint": "/api/editor/catalog/items", "surfaceId": "editor", "sourceFile": "server-node/src/modules/editor/editorRoutes.ts" }, { "id": "editor.resourceRead", "group": "editor-json", "method": "GET", "path": "/api/editor/json/:resourceId", "operation": "editor.resource.read", "access": "开关: EDITOR_API_ENABLED", "responseMode": "json", "summary": "读取指定编辑器资源 JSON。", "domainModuleIds": [ "editor" ], "sourceHint": "/api/editor/json/:resourceId", "surfaceId": "editor", "sourceFile": "server-node/src/modules/editor/editorRoutes.ts" }, { "id": "editor.resourceWrite", "group": "editor-json", "method": "POST", "path": "/api/editor/json/:resourceId", "operation": "editor.resource.write", "access": "开关: EDITOR_API_ENABLED", "responseMode": "json", "summary": "回写指定编辑器资源 JSON。", "domainModuleIds": [ "editor" ], "sourceHint": "/api/editor/json/:resourceId", "surfaceId": "editor", "sourceFile": "server-node/src/modules/editor/editorRoutes.ts" }, { "id": "runtime.llmChatCompletionsProxy", "group": "runtime-proxy", "method": "POST", "path": "/api/llm/chat/completions", "operation": "runtime.llm.chatCompletionsProxy", "access": "JWT", "responseMode": "proxy", "summary": "把聊天补全请求透传到上游模型。", "domainModuleIds": [ "ai" ], "sourceHint": "/llm/chat/completions", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.profileBrowseHistoryDelete.primary", "group": "runtime-profile", "method": "DELETE", "path": "/api/profile/browse-history", "operation": "profile.browseHistory.clear", "access": "JWT", "responseMode": "json", "summary": "清空平台浏览历史。", "domainModuleIds": [ "runtime" ], "sourceHint": "routeCompatPaths('/profile/browse-history')", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.profileBrowseHistoryGet.primary", "group": "runtime-profile", "method": "GET", "path": "/api/profile/browse-history", "operation": "profile.browseHistory.list", "access": "JWT", "responseMode": "json", "summary": "读取平台浏览历史。", "domainModuleIds": [ "runtime" ], "sourceHint": "routeCompatPaths('/profile/browse-history')", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.profileBrowseHistoryPost.primary", "group": "runtime-profile", "method": "POST", "path": "/api/profile/browse-history", "operation": "profile.browseHistory.upsert", "access": "JWT", "responseMode": "json", "summary": "写入或批量同步平台浏览历史。", "domainModuleIds": [ "runtime" ], "sourceHint": "routeCompatPaths('/profile/browse-history')", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.profileDashboard.primary", "group": "runtime-profile", "method": "GET", "path": "/api/profile/dashboard", "operation": "profile.dashboard.get", "access": "JWT", "responseMode": "json", "summary": "读取运行时个人主页汇总。", "domainModuleIds": [ "runtime" ], "sourceHint": "routeCompatPaths('/profile/dashboard')", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.profilePlayStats.primary", "group": "runtime-profile", "method": "GET", "path": "/api/profile/play-stats", "operation": "profile.playStats.get", "access": "JWT", "responseMode": "json", "summary": "读取个人游玩统计。", "domainModuleIds": [ "runtime" ], "sourceHint": "routeCompatPaths('/profile/play-stats')", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.profileSaveArchivesList.primary", "group": "runtime-save", "method": "GET", "path": "/api/profile/save-archives", "operation": "profile.saveArchives.list", "access": "JWT", "responseMode": "json", "summary": "列出个人存档摘要。", "domainModuleIds": [ "runtime" ], "sourceHint": "routeCompatPaths('/profile/save-archives')", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.profileSaveArchivesResume.primary", "group": "runtime-save", "method": "POST", "path": "/api/profile/save-archives/:worldKey", "operation": "profile.saveArchives.resume", "access": "JWT", "responseMode": "json", "summary": "恢复指定世界的最近存档。", "domainModuleIds": [ "runtime" ], "sourceHint": "'/profile/save-archives/:worldKey'", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.profileWalletLedger.primary", "group": "runtime-profile", "method": "GET", "path": "/api/profile/wallet-ledger", "operation": "profile.walletLedger.list", "access": "JWT", "responseMode": "json", "summary": "列出个人资产流水。", "domainModuleIds": [ "runtime" ], "sourceHint": "routeCompatPaths('/profile/wallet-ledger')", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.characterReplyStream", "group": "runtime-chat", "method": "POST", "path": "/api/runtime/chat/character/reply/stream", "operation": "runtime.chat.character.replyStream", "access": "JWT", "responseMode": "stream", "summary": "流式生成角色回复。", "domainModuleIds": [ "ai", "story" ], "sourceHint": "/runtime/chat/character/reply/stream", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.characterSuggestions", "group": "runtime-chat", "method": "POST", "path": "/api/runtime/chat/character/suggestions", "operation": "runtime.chat.character.suggestions", "access": "JWT", "responseMode": "json", "summary": "生成角色聊天建议语。", "domainModuleIds": [ "ai", "story" ], "sourceHint": "/runtime/chat/character/suggestions", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.characterSummary", "group": "runtime-chat", "method": "POST", "path": "/api/runtime/chat/character/summary", "operation": "runtime.chat.character.summary", "access": "JWT", "responseMode": "json", "summary": "生成角色聊天摘要。", "domainModuleIds": [ "ai", "story" ], "sourceHint": "/runtime/chat/character/summary", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.npcDialogueStream", "group": "runtime-chat", "method": "POST", "path": "/api/runtime/chat/npc/dialogue/stream", "operation": "runtime.chat.npc.dialogueStream", "access": "JWT", "responseMode": "stream", "summary": "流式生成 NPC 对话。", "domainModuleIds": [ "ai", "npc", "story" ], "sourceHint": "/runtime/chat/npc/dialogue/stream", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.npcRecruitStream", "group": "runtime-chat", "method": "POST", "path": "/api/runtime/chat/npc/recruit/stream", "operation": "runtime.chat.npc.recruitStream", "access": "JWT", "responseMode": "stream", "summary": "流式生成招募 NPC 对话。", "domainModuleIds": [ "ai", "npc", "story" ], "sourceHint": "/runtime/chat/npc/recruit/stream", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.npcTurnStream", "group": "runtime-chat", "method": "POST", "path": "/api/runtime/chat/npc/turn/stream", "operation": "runtime.chat.npc.turnStream", "access": "JWT", "responseMode": "stream", "summary": "流式生成 NPC 单回合发言。", "domainModuleIds": [ "ai", "npc", "story" ], "sourceHint": "/runtime/chat/npc/turn/stream", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.customWorldGalleryList", "group": "runtime-gallery", "method": "GET", "path": "/api/runtime/custom-world-gallery", "operation": "runtime.customWorldGallery.list", "access": "公开", "responseMode": "json", "summary": "列出公开的自定义世界画廊。", "domainModuleIds": [ "custom-world", "runtime" ], "sourceHint": "/runtime/custom-world-gallery", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.customWorldGalleryDetail", "group": "runtime-gallery", "method": "GET", "path": "/api/runtime/custom-world-gallery/:ownerUserId/:profileId", "operation": "runtime.customWorldGallery.detail", "access": "公开", "responseMode": "json", "summary": "读取指定公开世界作品详情。", "domainModuleIds": [ "custom-world", "runtime" ], "sourceHint": "/runtime/custom-world-gallery/:ownerUserId/:profileId", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.customWorldLibraryList", "group": "runtime-custom-world-library", "method": "GET", "path": "/api/runtime/custom-world-library", "operation": "runtime.customWorldLibrary.list", "access": "JWT", "responseMode": "json", "summary": "列出当前账号的自定义世界资料库。", "domainModuleIds": [ "custom-world", "runtime" ], "sourceHint": "/runtime/custom-world-library", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.customWorldLibraryDelete", "group": "runtime-custom-world-library", "method": "DELETE", "path": "/api/runtime/custom-world-library/:profileId", "operation": "runtime.customWorldLibrary.delete", "access": "JWT", "responseMode": "json", "summary": "删除指定自定义世界 profile。", "domainModuleIds": [ "custom-world", "runtime" ], "sourceHint": "/runtime/custom-world-library/:profileId", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.customWorldLibraryUpsert", "group": "runtime-custom-world-library", "method": "PUT", "path": "/api/runtime/custom-world-library/:profileId", "operation": "runtime.customWorldLibrary.upsert", "access": "JWT", "responseMode": "json", "summary": "写入或更新指定自定义世界 profile。", "domainModuleIds": [ "custom-world", "runtime" ], "sourceHint": "/runtime/custom-world-library/:profileId", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.customWorldLibraryPublish", "group": "runtime-custom-world-library", "method": "POST", "path": "/api/runtime/custom-world-library/:profileId/publish", "operation": "runtime.customWorldLibrary.publish", "access": "JWT", "responseMode": "json", "summary": "发布指定世界到公开画廊。", "domainModuleIds": [ "custom-world", "runtime" ], "sourceHint": "/runtime/custom-world-library/:profileId/publish", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.customWorldLibraryUnpublish", "group": "runtime-custom-world-library", "method": "POST", "path": "/api/runtime/custom-world-library/:profileId/unpublish", "operation": "runtime.customWorldLibrary.unpublish", "access": "JWT", "responseMode": "json", "summary": "撤回指定世界的公开发布状态。", "domainModuleIds": [ "custom-world", "runtime" ], "sourceHint": "/runtime/custom-world-library/:profileId/unpublish", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.customWorldAgentCreateSession", "group": "runtime-custom-world-agent", "method": "POST", "path": "/api/runtime/custom-world/agent/sessions", "operation": "runtime.customWorldAgent.createSession", "access": "JWT", "responseMode": "json", "summary": "创建 Custom World Agent 会话。", "domainModuleIds": [ "custom-world", "ai" ], "sourceHint": "/sessions", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/customWorldAgent.ts" }, { "id": "runtime.customWorldAgentGetSession", "group": "runtime-custom-world-agent", "method": "GET", "path": "/api/runtime/custom-world/agent/sessions/:sessionId", "operation": "runtime.customWorldAgent.getSession", "access": "JWT", "responseMode": "json", "summary": "读取 Agent 会话快照。", "domainModuleIds": [ "custom-world", "ai" ], "sourceHint": "/sessions/:sessionId", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/customWorldAgent.ts" }, { "id": "runtime.customWorldAgentExecuteAction", "group": "runtime-custom-world-agent", "method": "POST", "path": "/api/runtime/custom-world/agent/sessions/:sessionId/actions", "operation": "runtime.customWorldAgent.executeAction", "access": "JWT", "responseMode": "json", "summary": "执行 Agent 卡片生成、资产同步或发布动作。", "domainModuleIds": [ "custom-world", "ai", "assets" ], "sourceHint": "/sessions/:sessionId/actions", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/customWorldAgent.ts" }, { "id": "runtime.customWorldAgentGetCardDetail", "group": "runtime-custom-world-agent", "method": "GET", "path": "/api/runtime/custom-world/agent/sessions/:sessionId/cards/:cardId", "operation": "runtime.customWorldAgent.getCardDetail", "access": "JWT", "responseMode": "json", "summary": "读取 Agent 卡片详情。", "domainModuleIds": [ "custom-world", "ai" ], "sourceHint": "/sessions/:sessionId/cards/:cardId", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/customWorldAgent.ts" }, { "id": "runtime.customWorldAgentSendMessage", "group": "runtime-custom-world-agent", "method": "POST", "path": "/api/runtime/custom-world/agent/sessions/:sessionId/messages", "operation": "runtime.customWorldAgent.sendMessage", "access": "JWT", "responseMode": "json", "summary": "向 Agent 会话提交一条创作消息。", "domainModuleIds": [ "custom-world", "ai" ], "sourceHint": "/sessions/:sessionId/messages", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/customWorldAgent.ts" }, { "id": "runtime.customWorldAgentStreamMessage", "group": "runtime-custom-world-agent", "method": "POST", "path": "/api/runtime/custom-world/agent/sessions/:sessionId/messages/stream", "operation": "runtime.customWorldAgent.streamMessage", "access": "JWT", "responseMode": "stream", "summary": "流式提交 Agent 消息并实时接收回执。", "domainModuleIds": [ "custom-world", "ai" ], "sourceHint": "/sessions/:sessionId/messages/stream", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/customWorldAgent.ts" }, { "id": "runtime.customWorldAgentGetOperation", "group": "runtime-custom-world-agent", "method": "GET", "path": "/api/runtime/custom-world/agent/sessions/:sessionId/operations/:operationId", "operation": "runtime.customWorldAgent.getOperation", "access": "JWT", "responseMode": "json", "summary": "查询 Agent 后台操作状态。", "domainModuleIds": [ "custom-world", "ai" ], "sourceHint": "/sessions/:sessionId/operations/:operationId", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/customWorldAgent.ts" }, { "id": "runtime.customWorldEntity.compat", "group": "runtime-custom-world-assets", "method": "POST", "path": "/api/runtime/custom-world/entity", "operation": "runtime.customWorld.entity.compat", "access": "JWT", "responseMode": "json", "summary": "按世界 profile 生成单个角色或地标实体(兼容路径)。", "domainModuleIds": [ "custom-world", "ai" ], "sourceHint": "/runtime/custom-world/entity", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.customWorldSceneNpc.compat", "group": "runtime-custom-world-assets", "method": "POST", "path": "/api/runtime/custom-world/scene-npc", "operation": "runtime.customWorld.sceneNpc.compat", "access": "JWT", "responseMode": "json", "summary": "按地标生成场景 NPC(兼容路径)。", "domainModuleIds": [ "custom-world", "ai", "npc" ], "sourceHint": "/runtime/custom-world/scene-npc", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.customWorldSessionCreate", "group": "runtime-custom-world-session", "method": "POST", "path": "/api/runtime/custom-world/sessions", "operation": "runtime.customWorldSession.create", "access": "JWT", "responseMode": "json", "summary": "创建传统自定义世界问答会话。", "domainModuleIds": [ "custom-world" ], "sourceHint": "/runtime/custom-world/sessions", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.customWorldSessionGet", "group": "runtime-custom-world-session", "method": "GET", "path": "/api/runtime/custom-world/sessions/:sessionId", "operation": "runtime.customWorldSession.get", "access": "JWT", "responseMode": "json", "summary": "读取传统自定义世界问答会话。", "domainModuleIds": [ "custom-world" ], "sourceHint": "/runtime/custom-world/sessions/:sessionId", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.customWorldSessionAnswer", "group": "runtime-custom-world-session", "method": "POST", "path": "/api/runtime/custom-world/sessions/:sessionId/answers", "operation": "runtime.customWorldSession.answer", "access": "JWT", "responseMode": "json", "summary": "回答传统自定义世界问答题目。", "domainModuleIds": [ "custom-world" ], "sourceHint": "/runtime/custom-world/sessions/:sessionId/answers", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.customWorldSessionGenerateStream", "group": "runtime-custom-world-session", "method": "GET", "path": "/api/runtime/custom-world/sessions/:sessionId/generate/stream", "operation": "runtime.customWorldSession.generateStream", "access": "JWT", "responseMode": "stream", "summary": "流式编译传统自定义世界 profile。", "domainModuleIds": [ "custom-world", "ai" ], "sourceHint": "/runtime/custom-world/sessions/:sessionId/generate/stream", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.customWorldWorksList", "group": "runtime-custom-world-library", "method": "GET", "path": "/api/runtime/custom-world/works", "operation": "runtime.customWorldWorks.list", "access": "JWT", "responseMode": "json", "summary": "列出当前账号的自定义世界作品汇总。", "domainModuleIds": [ "custom-world", "runtime" ], "sourceHint": "/runtime/custom-world/works", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.itemsIntent", "group": "runtime-loot", "method": "POST", "path": "/api/runtime/items/runtime-intent", "operation": "runtime.items.intent", "access": "JWT", "responseMode": "json", "summary": "生成运行时物品意图。", "domainModuleIds": [ "runtime-item", "ai" ], "sourceHint": "/runtime/items/runtime-intent", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.profileBrowseHistoryDelete.compat", "group": "runtime-profile", "method": "DELETE", "path": "/api/runtime/profile/browse-history", "operation": "profile.browseHistory.clear.compat", "access": "JWT", "responseMode": "json", "summary": "清空平台浏览历史。(兼容路径)", "domainModuleIds": [ "runtime" ], "sourceHint": "routeCompatPaths('/profile/browse-history')", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.profileBrowseHistoryGet.compat", "group": "runtime-profile", "method": "GET", "path": "/api/runtime/profile/browse-history", "operation": "profile.browseHistory.list.compat", "access": "JWT", "responseMode": "json", "summary": "读取平台浏览历史。(兼容路径)", "domainModuleIds": [ "runtime" ], "sourceHint": "routeCompatPaths('/profile/browse-history')", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.profileBrowseHistoryPost.compat", "group": "runtime-profile", "method": "POST", "path": "/api/runtime/profile/browse-history", "operation": "profile.browseHistory.upsert.compat", "access": "JWT", "responseMode": "json", "summary": "写入或批量同步平台浏览历史。(兼容路径)", "domainModuleIds": [ "runtime" ], "sourceHint": "routeCompatPaths('/profile/browse-history')", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.profileDashboard.compat", "group": "runtime-profile", "method": "GET", "path": "/api/runtime/profile/dashboard", "operation": "profile.dashboard.get.compat", "access": "JWT", "responseMode": "json", "summary": "读取运行时个人主页汇总。(兼容路径)", "domainModuleIds": [ "runtime" ], "sourceHint": "routeCompatPaths('/profile/dashboard')", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.profilePlayStats.compat", "group": "runtime-profile", "method": "GET", "path": "/api/runtime/profile/play-stats", "operation": "profile.playStats.get.compat", "access": "JWT", "responseMode": "json", "summary": "读取个人游玩统计。(兼容路径)", "domainModuleIds": [ "runtime" ], "sourceHint": "routeCompatPaths('/profile/play-stats')", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.profileSaveArchivesList.compat", "group": "runtime-save", "method": "GET", "path": "/api/runtime/profile/save-archives", "operation": "profile.saveArchives.list.compat", "access": "JWT", "responseMode": "json", "summary": "列出个人存档摘要。(兼容路径)", "domainModuleIds": [ "runtime" ], "sourceHint": "routeCompatPaths('/profile/save-archives')", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.profileSaveArchivesResume.compat", "group": "runtime-save", "method": "POST", "path": "/api/runtime/profile/save-archives/:worldKey", "operation": "profile.saveArchives.resume.compat", "access": "JWT", "responseMode": "json", "summary": "恢复指定世界的最近存档(兼容路径)。", "domainModuleIds": [ "runtime" ], "sourceHint": "'/runtime/profile/save-archives/:worldKey'", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.profileWalletLedger.compat", "group": "runtime-profile", "method": "GET", "path": "/api/runtime/profile/wallet-ledger", "operation": "profile.walletLedger.list.compat", "access": "JWT", "responseMode": "json", "summary": "列出个人资产流水。(兼容路径)", "domainModuleIds": [ "runtime" ], "sourceHint": "routeCompatPaths('/profile/wallet-ledger')", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.questsGenerate", "group": "runtime-quest", "method": "POST", "path": "/api/runtime/quests/generate", "operation": "runtime.quests.generate", "access": "JWT", "responseMode": "json", "summary": "按当前遭遇生成任务候选。", "domainModuleIds": [ "quest", "ai" ], "sourceHint": "/runtime/quests/generate", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.snapshotDelete", "group": "runtime-save", "method": "DELETE", "path": "/api/runtime/save/snapshot", "operation": "runtime.snapshot.delete", "access": "JWT", "responseMode": "json", "summary": "删除当前用户的运行时存档。", "domainModuleIds": [ "runtime" ], "sourceHint": "/runtime/save/snapshot", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.snapshotGet", "group": "runtime-save", "method": "GET", "path": "/api/runtime/save/snapshot", "operation": "runtime.snapshot.get", "access": "JWT", "responseMode": "json", "summary": "读取当前用户的运行时存档。", "domainModuleIds": [ "runtime", "progression", "quest" ], "sourceHint": "/runtime/save/snapshot", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.snapshotPut", "group": "runtime-save", "method": "PUT", "path": "/api/runtime/save/snapshot", "operation": "runtime.snapshot.put", "access": "JWT", "responseMode": "json", "summary": "保存并归一化当前运行时存档。", "domainModuleIds": [ "runtime", "progression", "quest" ], "sourceHint": "/runtime/save/snapshot", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.settingsGet", "group": "runtime-settings", "method": "GET", "path": "/api/runtime/settings", "operation": "runtime.settings.get", "access": "JWT", "responseMode": "json", "summary": "读取运行时设置。", "domainModuleIds": [ "runtime" ], "sourceHint": "/runtime/settings", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.settingsPut", "group": "runtime-settings", "method": "PUT", "path": "/api/runtime/settings", "operation": "runtime.settings.put", "access": "JWT", "responseMode": "json", "summary": "更新运行时设置。", "domainModuleIds": [ "runtime" ], "sourceHint": "/runtime/settings", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "storyAction.resolve", "group": "story-action", "method": "POST", "path": "/api/runtime/story/actions/resolve", "operation": "runtime.story.actions.resolve", "access": "JWT", "responseMode": "json", "summary": "解析前端 story choice 动作为新的运行时结果。", "domainModuleIds": [ "story", "quest", "inventory", "runtime-item", "npc", "progression", "combat", "runtime" ], "sourceHint": "/actions/resolve", "surfaceId": "runtime-story-action", "sourceFile": "server-node/src/modules/story/storyActionRoutes.ts" }, { "id": "runtime.storyContinue", "group": "runtime-story-generation", "method": "POST", "path": "/api/runtime/story/continue", "operation": "runtime.story.continue", "access": "JWT", "responseMode": "json", "summary": "生成下一段故事内容。", "domainModuleIds": [ "story", "ai" ], "sourceHint": "/runtime/story/continue", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "runtime.storyInitial", "group": "runtime-story-generation", "method": "POST", "path": "/api/runtime/story/initial", "operation": "runtime.story.initial", "access": "JWT", "responseMode": "json", "summary": "生成首段故事内容。", "domainModuleIds": [ "story", "ai" ], "sourceHint": "/runtime/story/initial", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "storyAction.stateGet", "group": "story-action", "method": "GET", "path": "/api/runtime/story/state/:sessionId", "operation": "runtime.story.state.get", "access": "JWT", "responseMode": "json", "summary": "读取指定 story session 的运行时状态。", "domainModuleIds": [ "story", "runtime" ], "sourceHint": "/state/:sessionId", "surfaceId": "runtime-story-action", "sourceFile": "server-node/src/modules/story/storyActionRoutes.ts" }, { "id": "runtime.wsHealth", "group": "runtime-diagnostics", "method": "GET", "path": "/api/ws/health", "operation": "runtime.ws.health", "access": "JWT", "responseMode": "json", "summary": "保留给未来实时链路的占位健康检查。", "domainModuleIds": [ "runtime" ], "sourceHint": "/ws/health", "surfaceId": "runtime-main", "sourceFile": "server-node/src/routes/runtimeRoutes.ts" }, { "id": "health.check", "surfaceId": "health", "group": "health", "method": "GET", "path": "/healthz", "operation": "health.check", "access": "公开", "responseMode": "json", "summary": "返回 Node 后端进程健康状态。", "domainModuleIds": [], "sourceFile": "server-node/src/app.ts", "sourceHint": "/healthz" } ], "maintenanceRules": [ "新增 `server-node/src/modules/*` 目录时,必须先补充 manifest 里的模块说明,再重新生成产物。", "新增或下线路由时,先更新 manifest 里的路由清单,再运行生成命令同步 JSON 与文档。", "如果路由来自兼容路径或中间件派生路径,`sourceHint` 需要指向源代码里的真实表达式,确保生成脚本能做最小校验。" ] }