Commit Graph

4773 Commits

Author SHA1 Message Date
k88936 fc8a674e91 3D 模型角标改用 Tailwind v4 可用的类与专用 CSS 规则
- src/index.css:新增 .image-canvas-editor__kind-badge--model3d 规则,背景与阴影沿用原取值,与其它 asset kind 的写法一致
- src/components/image-editor/ImageCanvasWorldView.tsx:model3d 角标改成引用该规则;原写法用 Tailwind v3 的 `!` 前缀(v4 改后缀),实际不会生成工具类,角标退化成白字无底色的白药丸

验证:npx prettier --check src/index.css src/components/image-editor/ImageCanvasWorldView.tsx
2026-09-22 13:23:24 +08:00
k88936 f1d0aed7dd 3D 生成面板补上浮动菜单的 portal 与定位参数
- src/components/image-editor/ImageCanvasGenerationComposerView.tsx:Model3dGenerationModal 传入 renderEditorPortal / buildPortalMenuStyle,与同文件其余生成面板一致;此前走默认的恒等实现,「参考图来源」菜单内联在文档流里且没有定位样式

验证:npx tsc -p tsconfig.typecheck-guardrails.json --noEmit
2026-09-22 13:22:44 +08:00
k88936 9f4f7341c9 修复 AGC 资源工具条缺 onPreviewModel3d 导致的类型检查失败
- apps/ai-game-creator-shell/src/view/project-development/index.tsx:给 ImageCanvasSelectedLayerToolbarView 补上 onPreviewModel3d 空实现,并写明资源画布不登记 preview-model3d、按钮不会渲染;此前该必填属性缺失,AGC 严格模式报 TS2741

验证:npm run ai-game-creator-shell:typecheck(修复前 error TS2741,修复后 exit 0、error TS 计数 0)
2026-09-22 13:21:10 +08:00
k88936 928aee403a 修正 model3d 绑定生成的 editor_canvas 测试过滤词
- package.json:contracts:model3d:generate 的测试过滤词由 editorcanvas 改为 editor_canvas;libtest 过滤词按子串区分大小写,而模块名是 editor_canvas::export_bindings_*,原写法命中 0 个用例,packages/shared/src/contracts/editor-canvas 实际只被 prettier 重排、从未重新生成

验证:cargo test --locked -p shared-contracts -- model3d editor_canvas(25 个导出用例命中,含 editor_canvas 的 2 个;修复前该过滤词命中 0 个)、npm run contracts:model3d:generate 后 packages/shared 零 diff
2026-09-22 13:19:34 +08:00
k88936 d24347d78e gitignore 的 3D 样例规则改为大小写不敏感
- .gitignore:把 /*.glb 一类规则改成 /*.[gG][lL][bB] 形式;gitignore 匹配与 core.ignoreCase 无关,浏览器下载保留下来的 Model.GLB / scene.GLTF 等大写扩展名此前仍会出现在 git status 里

验证:git check-ignore -v model.GLB scene.GLTF asset.FBX model.bin s.png(均命中新规则)
2026-09-22 13:19:09 +08:00
k88936 0ae73f7e0e gitignore 连 glTF 兄弟资源一起忽略
- .gitignore:仓库根目录手工下载的 3D 样例除容器文件外,再忽略多文件产物的 .bin 缓冲与 png / jpg / jpeg / webp / ktx2 / tga 贴图,避免整套样例在 git status 里逐条冒出来

验证:git check-ignore -v image_to_model.glb companion.bin scene.png(根目录同名文件命中新规则)
2026-09-22 13:18:55 +08:00
k88936 fb9c1d0e29 查看器取消时一并中止在途的模型下载
- packages/model3d-viewer/src/loader.ts:readModel3dViewerSource 与 loadModel3dViewerObject 新增可选 AbortSignal,透传给 fetch;signal 已中止时抛 Model3dViewerAbortedError,不再当成 load-failed
- packages/model3d-viewer/src/scene.ts:场景输入新增 signal,创建时透传给模型加载
- packages/model3d-viewer/src/Model3DViewer.tsx:加载 effect 内建 AbortController,卸载 / 换源时先 abort 再释放场景,避免下载要读完 64 MiB 才被丢弃
- packages/model3d-viewer/src/loader.test.ts:新增回归用例,断言 signal 确实交给 fetch 且中止后抛取消错误

验证:npx vitest run packages/model3d-viewer(20 用例全绿)、npx tsc 严格模式检查查看器包全部源文件
2026-09-22 13:18:40 +08:00
k88936 b71d18b166 场景释放不再强制丢失 WebGL 上下文
- packages/model3d-viewer/src/scene.ts:teardown 去掉 renderer.forceContextLoss(),只保留 renderer.dispose(),并写明原因;宿主 Model3DViewer 全程复用同一个 <canvas>,强制丢上下文会让下一个模型拿到已丢失的上下文渲染全黑

验证:npx tsc(严格模式单文件检查)、npx vitest run packages/model3d-viewer
2026-09-22 13:18:04 +08:00
k88936 4bcf0cdb86 释放材质时用 if/else 取代嵌套三元
- packages/model3d-viewer/src/scene.ts:disposeModel3dViewerObject 里把材质归一化成数组的三元链改成 if/else,展开层级与语义不变,只是去掉内层三元嵌套

验证:npx tsc(严格模式单文件检查)、npx vitest run packages/model3d-viewer
2026-09-22 13:17:43 +08:00
k88936 104656aa99 去掉 Model3DViewer 加载 effect 里冗余的 sourceKind 依赖
- packages/model3d-viewer/src/Model3DViewer.tsx:删除只出现在依赖数组里的 sourceKind 变量与依赖项,effect 实际只分支 sourceData / sourceUrl,kind 变化必然带动这两者之一变化

验证:npx tsc(严格模式单文件检查)、npx vitest run packages/model3d-viewer
2026-09-22 13:17:27 +08:00
k88936 de8bb9d373 取景近远裁剪面比例改为具名常量
- packages/model3d-viewer/src/framing.ts:把 near / far 推导里内联的 1/1000 与 10 提成 NEAR_DISTANCE_RATIO / FAR_DISTANCE_RATIO,与同文件其它比例常量口径一致,取值不变

验证:npx vitest run packages/model3d-viewer(19 用例全绿)
2026-09-22 13:17:02 +08:00
k88936 f9750bde0b 查看器取景距离改用前校验有限正数
- packages/model3d-viewer/src/framing.ts:computeModel3dViewerFitDistance 不再无条件采信调用方传入的 distance,改为 Number.isFinite 且大于 0 才采用,否则回落包围盒角点求解,避免 0 / 负数 / NaN 让 maxDistance 小于 minDistance

验证:npx vitest run packages/model3d-viewer、npx tsc -p tsconfig.typecheck-guardrails.json --noEmit
2026-09-22 13:16:40 +08:00
k88936 93002f1bd2 统一 model3d 查看器状态类型命名:Model3DViewerStatus 改回 Model3dViewerStatus
- packages/model3d-viewer/src/status.ts:状态类型改名,与同文件的 Model3dViewerFailureReason / Model3dViewerStatusDetail 以及仓库既有 Model3d* 口径一致
- packages/model3d-viewer/src/Model3DViewer.tsx、packages/model3d-viewer/src/index.ts:跟随改名更新导入与引用
- src/components/image-editor/model3d-preview/Model3dViewerModal.tsx:跟随改名更新导入与状态类型引用

验证:npx tsc -p tsconfig.typecheck-guardrails.json --noEmit、npm run lint:eslint(改动文件)
2026-09-22 13:16:05 +08:00
k88936 e7b067e977 恢复合并时丢掉的 AGC 壳依赖 codex-patch-parser 与 chrono
Project CI / AI game creator shell Rust crates (pull_request) Successful in 3m7s
Project CI / Backend tests (pull_request) Failing after 12s
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 3m58s
Project CI / Native shell tests (pull_request) Failing after 2m50s
Project CI / Repository checks (pull_request) Failing after 12s
Project CI / Frontend tests (pull_request) Successful in 3m27s
Project CI / AI game creator shell web tests (pull_request) Failing after 1m34s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 9m23s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 9m24s
- apps/ai-game-creator-shell/src-tauri/Cargo.toml:[dependencies] 补回 master 侧新增的 `codex-patch-parser = { path = "vendor/codex-patch-parser" }` 与 `chrono = { version = "0.4", default-features = false, features = ["std"] }`(冲突解决时随同段落的 ts-rs 一起被丢掉,导致 src/agent/direct_patch.rs 与 src/agent/direct_codex_audit.rs 报 8 条 E0433 / E0432)
- apps/ai-game-creator-shell/src-tauri/Cargo.lock:按清单恢复 genarrative-ai-game-creator-shell 条目里的 chrono 与 codex-patch-parser 依赖
- docs/project-memory/shared-memory/pitfalls.md:新增 2026-09-22 条,记录「合并后 CI 报 cannot find module or crate 先查对方新增的依赖行」的判据与踩坑点
- docs/project-memory/shared-memory/decision-log.md:在 2026-09-22 合并条目补记这次丢依赖与验证

验证:cargo metadata --locked(AGC workspace)、cargo test --locked --manifest-path apps/ai-game-creator-shell/src-tauri/Cargo.toml --no-run(bin + 4 个集成测试目标全部编译)、cargo check --locked --workspace --manifest-path server-rs/Cargo.toml、npm run check:native-shells:agc-rust-crates、npm run check:encoding、npm run check:doc-index、git diff --check
2026-09-22 13:13:00 +08:00
k88936 10e63ecb6b 合并 origin/master 到 feat/tribo3d-integeration:ts-rs 一律常开、Cargo 清单去重
- server-rs/Cargo.toml:删除与 workspace git 固定重复的 registry `ts-rs = "12.0.1"`,保留固定 commit 并写明「ts-rs 一律常开、绑定命令固定为 cargo test -p shared-contracts export_bindings」
- server-rs/crates/shared-contracts/Cargo.toml:删除 master 侧新增的 `ts-bindings` feature,`ts-rs` 保持常开依赖
- server-rs/crates/shared-contracts/src/game_creation_app/asset_kind.rs:去掉 `cfg_attr(feature = "ts-bindings", …)` 门控,derive 与字段级 `ts(...)` 无条件展开
- apps/ai-game-creator-shell/src-tauri/Cargo.toml:shared-contracts 依赖去掉 `features = ["ts-bindings"]`,继续保留本分支的 ts-rs git 固定
- apps/ai-game-creator-shell/src-tauri/Cargo.lock:按上述依赖变更同步(shared-contracts 指向 git 源 ts-rs)
- docs:同步 5 处绑定生成命令(去掉 `--features ts-bindings`),并在 decision-log 记本次合并的决策、代价与验证
- 其余暂存改动为 origin/master 带入的内容,冲突按两侧目的逐一合并

验证:cargo metadata --locked(server-rs 与 AGC 两个 workspace)、cargo test -p shared-contracts(119 + 5 + 5 + 2 + 2 全绿且无告警)、npm run contracts:model3d:generate 后 packages/shared 零 diff、cargo check -p spacetime-module --target wasm32-unknown-unknown、npm run check:encoding、npm run check:rustfmt、npm run check:spacetime-schema、git diff --check、暂存集 eslint / prettier 全过
2026-09-22 13:12:28 +08:00
k88936 61fe4c48af 图片画布接入 3D 资源:新增 model3d 类别、3D 预览与 3D 生成入口
Project CI / AI game creator shell Rust shard 1/4 (pull_request) Failing after 16s
Project CI / AI game creator shell Rust shard 3/4 (pull_request) Failing after 18s
Project CI / AI game creator shell Rust shard 4/4 (pull_request) Failing after 18s
Project CI / AI game creator shell Rust shard 2/4 (pull_request) Failing after 18s
Project CI / AI game creator shell Rust smoke (pull_request) Failing after 16s
Project CI / Backend tests (pull_request) Failing after 16s
Project CI / AI game creator shell Rust crates (pull_request) Failing after 16s
Project CI / Native shell tests (pull_request) Failing after 16s
Project CI / Frontend tests (pull_request) Failing after 7s
Project CI / Repository checks (pull_request) Failing after 12s
Project CI / AI game creator shell web tests (pull_request) Failing after 12s
- 后端资源投影按 asset_kind 分叉,新增 project_editor_client_media_src 与 EDITOR_MODEL3D_ASSET_KIND:model3d 只投影预览图,模型本体只留 objectKey,预览缺失才回落历史口径
- tripo3d 存储新增按字节魔数识别模型 content_type 与扩展名映射,不采信 provider 声明与下载响应头
- editor_project_storage 把 model3d 加入 EDITOR_CANVAS_ASSET_KINDS 白名单
- 前端 CanvasAssetKind 与 image-canvas-core 类型新增 model3d:画布卡片渲染预览图或 3D 占位,类型角标新增「3D模型」,覆盖资格只在它与空类别之间成立
- 新增 model3d-preview 子目录(Model3dViewerModal / Model3dViewerModel),Tailwind 内联、不新增 CSS,失败原因分超限 / 格式不可识别 / 无 WebGL2 三类展示
- 选中工具条新增只读 preview-model3d 能力位,仅 objectKey 为空时置灰;打开预览同时选中图层并暂停画布快捷键与舞台交互
- 查看器包源对象 format 改为可选,新增「声明 Content-Type → 字节魔数 → 地址扩展名」三级格式判定并导出支持格式清单
- 导出工作流新增 3d_models/ 目录,模型下载按真实响应头 MIME 定扩展名、对象键扩展名兜底
- 新增 3D 生成入口:底部工具栏浮动子选项与文生 / 图生 3D 面板,落 projectResource + canvasCompletion,复用占位框与任务侧栏
- 3D 定价只读实时定价查询,段缺失即入口不可提交;幂等键由前端铸造,用户重试必须换键
- 新增 ADR 0003 / 0004 与实施计划、里程碑文档;更新 Tripo 技术方案、后端架构、CONTEXT 术语、decision-log 与 pitfalls
- .gitignore 忽略仓库根目录手工下载的 3D 样例模型
2026-09-22 10:10:00 +08:00
k88936 6973a2cb45 Merge pull request '重构/拆分directproject聊天组件' (#420) from refactor/split-direct-project into master
Project CI / AI game creator shell Rust crates (push) Successful in 2m56s
Project CI / AI game creator shell Rust smoke (push) Successful in 3m55s
Project CI / Backend tests (push) Successful in 5m5s
Project CI / AI game creator shell Rust lane 2/2 (push) Successful in 10m20s
Project CI / Frontend tests (push) Failing after 2m20s
Project CI / Native shell tests (push) Successful in 6m36s
Project CI / AI game creator shell Rust lane 1/2 (push) Successful in 10m34s
Project CI / AI game creator shell web tests (push) Successful in 1m36s
Project CI / Repository checks (push) Successful in 1m48s
Reviewed-on: #420
2026-09-22 02:53:26 +08:00
k88936 19e1883f71 合并 origin/master:策划附件导入接入策划聊天入口
Project CI / AI game creator shell Rust crates (pull_request) Successful in 2m55s
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 3m54s
Project CI / Backend tests (pull_request) Successful in 5m4s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 10m18s
Project CI / Native shell tests (pull_request) Successful in 6m34s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 10m32s
Project CI / Frontend tests (pull_request) Successful in 3m15s
Project CI / AI game creator shell web tests (pull_request) Successful in 1m29s
Project CI / Repository checks (pull_request) Successful in 1m42s
- 保留 DirectProject 独立聊天容器与 Supervisor 退役结果,不为冲突恢复运行时兼容分支
- 策划工作区文件导入接入 PlanningChatView 输入盒,导入期间暂缓发送、阶段批准、澄清与重试
- 工作台壳按项目记录导入进行态,导入未完成时不切换游戏运行态并提示等待
- 首页策划附件导入结果落到工作台 fileImportNotice 提示条,可单独关闭
- 设计态输入盒样式选择器由 project-supervisor-* 收敛为 project-chat-*
- 策划导入回归用例适配退役后的 harness 与 chatProps 命名
2026-09-22 02:24:47 +08:00
lhk229 4e41bd3e56 修复预览发布测试状态文件恢复竞态
Project CI / AI game creator shell Rust crates (pull_request) Successful in 2m54s
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 3m49s
Project CI / Backend tests (pull_request) Successful in 5m7s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 9m49s
Project CI / Native shell tests (pull_request) Successful in 6m47s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 10m45s
Project CI / Frontend tests (pull_request) Successful in 5m10s
Project CI / Repository checks (pull_request) Successful in 3m57s
Project CI / AI game creator shell web tests (pull_request) Failing after 3m26s
Project CI / AI game creator shell Rust crates (push) Successful in 1m16s
Project CI / AI game creator shell Rust smoke (push) Successful in 2m11s
Project CI / Backend tests (push) Successful in 4m55s
Project CI / AI game creator shell Rust lane 1/2 (push) Successful in 9m50s
Project CI / AI game creator shell Rust lane 2/2 (push) Successful in 8m2s
Project CI / Native shell tests (push) Successful in 7m2s
Project CI / Repository checks (push) Successful in 3m51s
Project CI / AI game creator shell web tests (push) Successful in 3m23s
Project CI / Frontend tests (push) Successful in 5m48s
deploy_and_uninstall 测试在断言状态文件恢复前,改为轮询等待持久化状态到达 Stopped

新增 wait_for_persisted_status 辅助函数,经 load_deployments 真实加载路径校验状态文件
2026-09-22 00:53:47 +08:00
k88936 5315b233c8 预览激活回接「运行」入口,聊天 @ 清单打开选择器时按需重读
Project CI / AI game creator shell Rust crates (pull_request) Successful in 2m58s
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 3m49s
Project CI / Backend tests (pull_request) Successful in 5m7s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 10m7s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 10m15s
Project CI / Native shell tests (pull_request) Successful in 6m37s
Project CI / Frontend tests (pull_request) Successful in 3m8s
Project CI / AI game creator shell web tests (pull_request) Successful in 1m45s
Project CI / Repository checks (pull_request) Successful in 1m56s
- App.tsx 新增 activateRunningPreview,运行入口先问 Rust 要活体预览(activate_local_game_preview),命中就只切客户端运行视图
- App.tsx 的 executeRunLocal 命中活体预览时经 DirectProject 聊天的 announce 播报「已切换到客户端运行视图」,不再重复调用 start_local_game_preview;stopped / 非本项目 / 权限位要求确认一律回落到重新启动
- check-config.mjs 从 native-only 白名单移除 activate_local_game_preview 并同步注释(该门禁要求 App invoke 与白名单互斥)
- DirectProjectComposer 新增 onReferencePickerOpen,工具条按钮与附件菜单两处选择器入口打开前先刷新清单
- DirectProjectChatView 用 useDirectProjectManifest 的 refresh 重读聊天自己那份 @ 清单,不新增壳到聊天的清单推送通道
- 新增 tests/previewActivation.test.tsx,钉住切视图不重启 / stopped 回落重启 / 权限确认回落重启三条路径
- decision-log 记录本轮两处回归的背景、决策、取舍与验证方式
2026-09-21 23:09:43 +08:00
k88936 a11cdf13d7 画布生成面板重开草稿与重试身份收敛到 canonical content
生成面板 state、重开草稿、重试身份与提交载荷统一为一份 content[]
重试身份改用 directCodexContentKey 内容指纹比对并删除 referenceIdsMatch
directCodexContentToLegacyContentDto 只在任务落账的出站边界派生
账本回到草稿的反向翻译收敛为 legacyContentDtoToContent 单一实现
token 扫描从 ResourceReferenceInput 提到 resourceReferences 并两处共用
无法解析的资源引用合成 unknown 占位而不再静默丢弃
出站提示词规范化收敛为 resourceCanvasAssetGenerationPromptText 供两处共用
directCodexContentToPromptText 去掉 trim,空白只在整条 content 上判定
同步决策记录与 canonical content 里程碑落地结果
2026-09-21 22:56:32 +08:00
lhk229 085181c795 修复策划附件导入工作区并解除资源清单耦合
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 1m55s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m21s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 9m58s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 10m40s
Project CI / Backend tests (pull_request) Successful in 5m37s
Project CI / Native shell tests (pull_request) Successful in 7m30s
Project CI / Repository checks (pull_request) Successful in 3m46s
Project CI / AI game creator shell web tests (pull_request) Successful in 3m22s
Project CI / Frontend tests (pull_request) Successful in 4m54s
Project CI / AI game creator shell Rust crates (push) Successful in 2m57s
Project CI / AI game creator shell Rust smoke (push) Successful in 3m51s
Project CI / Backend tests (push) Failing after 3m47s
Project CI / AI game creator shell Rust lane 2/2 (push) Successful in 9m22s
Project CI / Native shell tests (push) Successful in 6m12s
Project CI / AI game creator shell Rust lane 1/2 (push) Successful in 10m13s
Project CI / Frontend tests (push) Successful in 3m51s
Project CI / Repository checks (push) Successful in 2m44s
Project CI / AI game creator shell web tests (push) Successful in 2m25s
新增策划工作区文件导入命令,支持同名另存并保留文件字节
首页和聊天框附件直接导入策划工作区,脱离游戏资源清单与回合附件
导入期间暂缓发送、阶段操作和游戏制作切换,保留逐文件失败提示
补充导入、刷新与切换回归测试,同步技术方案和共享约定
2026-09-21 22:49:21 +08:00
k88936 9fc55a5cac 写入Tripo 3D泥点默认价并锁定credit换算口径
- 受控默认配置新增 model3d 段:底价按端点 × 模型版本 × 是否有贴图,add-on 六项独立计价

- 换算口径固定为泥点 = ceil(0.8 × Tripo 官方 credit),H 系列 10/20 与 20/30、P1 30/40 与 40/50、P2 100/110

- editor_generation_config 定向用例按 credit 表反算默认泥点价,改价必须先改 credit 表

- 段缺失语义改为显式摘段验证,仍保持 fail closed 不扣费不入队

- 主规范、里程碑、实施计划与定价管理方案同步默认价已确认与部署侧 override 风险
2026-09-21 22:07:55 +08:00
k88936 8968762274 合并 origin/master:DirectProject 输入校验取回空白片段回归用例
Project CI / AI game creator shell Rust crates (pull_request) Successful in 2m57s
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 3m47s
Project CI / Native shell tests (pull_request) Failing after 50s
Project CI / Frontend tests (pull_request) Failing after 1m50s
Project CI / Backend tests (pull_request) Successful in 4m45s
Project CI / Repository checks (pull_request) Successful in 2m1s
Project CI / AI game creator shell web tests (pull_request) Failing after 1m38s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 9m21s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 9m31s
- validation.rs 保留本分支的 content_has_meaningful_input 与 Skill/附件独立上限,空输入报错取回 master 的用户可见文案“聊天内容不能为空”
- wire.rs 取回 master 新增的 text_projection / user_input_rejects / valid_references / nonempty_text 四条回归用例,测试导入合并两侧
- resourceReferenceInput.test.tsx 取 master 的注释口径:草稿 text 投影会 trim,提交用的 content 保留 chip 后的分隔空格
- pitfalls.md 与《AGC聊天素材引用》改为「任意非文本 part 均算有效内容」,与四类引用的实际校验对齐
- 本地私有改动的 .env 不进入本次合并
2026-09-21 21:42:41 +08:00
k88936 7745264990 同步canonical content里程碑落地结果与润色口径
里程碑与实施计划状态改为 implemented

记录润色按 token 原位恢复引用与附件、被改写 part 末尾补位

记录遗留 TODO:润色删掉 token 时无法反推原位置
2026-09-21 21:23:17 +08:00
k88936 295d4af384 润色回写按token原位恢复引用与附件
统一引用与附件的润色扫描口径,token 存活时原位换回真 part

token 被改写时剩余 part 补在末尾,附件不再丢出 canonical content

删除无调用方的 EMPTY_CHAT_COMPOSER_DRAFT

补充润色原位恢复与末尾补位两条回归用例
2026-09-21 21:22:04 +08:00
k88936 6981648796 合并 origin/master:Supervisor 永久退役,项目对话收敛为 DirectProject 与 Design Agent
Project CI / AI game creator shell Rust crates (pull_request) Successful in 2m56s
Project CI / Backend tests (pull_request) Failing after 12s
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 3m48s
Project CI / Native shell tests (pull_request) Failing after 45s
Project CI / Repository checks (pull_request) Failing after 13s
Project CI / Frontend tests (pull_request) Failing after 1m52s
Project CI / AI game creator shell web tests (pull_request) Failing after 1m42s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Failing after 6m57s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Failing after 8m1s
- 解决 refactor/split-direct-project 与 origin/master 在 App.tsx、立项策划聊天视图、Direct composer/引用输入区、styles.css、Rust direct user item 与 appSurface 用例上的冲突,按「Supervisor 永久退役」口径保留 DirectProject 独立聊天容器与 Design Agent 两条产品路径
- 采纳 master 的策划 Agent V1/V2 退役:删除 GDD 审批卡、策划输入卡、planningLane、planningSessionV2、planningSessionContract、规划展示适配与 Rust planning_*_v2 命令、模块、契约及对应用例,不保留兼容别名或双跑路径
- 把 master「折叠思考显示单行预览」的目的落到当前结构:新增共享表现 chat/components/AgentReasoning/AgentReasoning.tsx(折叠态单行纯文本预览 + 箭头、展开态安全 Markdown),DirectProject 回合与策划回合共用,删掉两处写死的 pre 折叠实现
- 把 master「策划入口可选模型 / 推理档」的目的接到当前策划输入盒:复用 ConversationModelSelect 与 ComposerReasoningEffortSelect,配置写回仍走客户端配置通道
- App.tsx 删除只服务退役 Supervisor / 策划 V2 的 state、ref、effect、回调与死参数,并删除两条读路径都退役后的 workspaceProjectKind;openWorkspace 的工程类型入参保留为未使用契约
- Rust 侧保留本分支 canonical→wire 投影、无审计 Direct 回合与 direct user item 严格校验,并入 master 的 prepare_new_web_project_at 前置复核
- 更新 ADR 与 shared-memory 决策记录:策划当前只有 Design Agent、两条路径的共享表现清单,以及本次合并的口径、代价与验证证据
- 验证:AGC 与仓库 typecheck、check:encoding、check:doc-index、git diff --check、改动文件 eslint 0 error;AGC vitest 168 个文件中除 5 个 jsdom localStorage 环境失败文件与本分支既有 resourceTagStatsRefresh 失败外全绿,appSurface 198 passed / 13 skipped;Rust 定向用例 direct_codex_user_item、skill_pack、sessions 全过(整套分片在本容器受 /sbin -> usr/bin 触发沙箱预检失败,与本合并无关)
2026-09-21 21:09:34 +08:00
k88936 2691ca8aca 补记图生输入的OSS直读待讨论项
- api-server 的 image_source 模块头与 platform-tripo 的 upload_image 各留一条 TODO(oss-direct-read):交签名 URL 或对端直读 OSS 能省掉字节中转,但把私有对象与带时效凭据交给第三方,安全口径与可行性待讨论
- 技术方案文档把图生输入口径更新为当前的 source 站内引用 tagged enum,并补同一条待讨论说明
- 讨论清楚之前保持「api-server 自己读、自己传」的现口径,不改行为
2026-09-21 20:02:18 +08:00
k88936 14066eea11 产物下载改为按「无数据推进」判超时
- artifact reqwest client 不再设包含响应体的总超时,改成 connect_timeout + read_timeout(reqwest 0.12 的「每次读操作」语义,读完自动重置)
- 响应头之前没有数据推进时用显式 tokio::time::timeout 兜住,避免连上却不返回响应头时无限挂住
- 新增 TripoProviderClient::artifact_stall_timeout 统一承载三处预算,取值沿用 TripoSettings::request_timeout
- 补 3 个 mock TCP 用例:响应头一直不来、传输中途断流按无数据推进失败,慢速但持续的下载必须完整收完(后者能拦住「改回总超时」的回归)
- 同步技术方案与后端架构文档里的下载超时口径
2026-09-21 19:54:57 +08:00
k88936 609b24c779 text-to-model入口的submit改名带端点
- TripoProviderClient::submit 改名为 submit_text_to_model,与 submit_image_to_model / submit_multiview_to_model 一致
- 同步 api-server tripo3d worker 与 tripo_generation_smoke example 的调用点
- 同步技术方案文档里写死的 submit 口径,方法名不再与另两个入口分叉
2026-09-21 19:49:31 +08:00
k88936 3af0d3d90b 契约枚举的线上取值只由serde定义
- shared-contracts 新增 wire_str 与 wire_str_lossy:线上取值只从 serde rename / rename_all 取,不再维护第二份字面量
- 删除模型版本、纹理质量、纹理版本、纹理对齐、几何质量、输入方向、导出方向、压缩共 8 个枚举上手工维护的 as_str
- platform-tripo 新增 common/wire.rs 负责契约枚举到 provider 请求字符串的转换,三个入口的 to_sdk_params 改走它并把失败归一成 provider 错误
- api-server 的定价文案与 job 模型版本取值改用 serde 取值,job 的 model_version 由 &'static str 改为 String
- 取值来源只剩 serde 一处,改 rename 不会再静默分叉
2026-09-21 19:46:43 +08:00
lhk229 2d61a4c057 Merge pull request 'Codex/fix direct image generation ci' (#452) from codex/fix-direct-image-generation-ci into master
Project CI / AI game creator shell Rust lane 2/2 (push) Has been cancelled
Project CI / AI game creator shell Rust smoke (push) Has been cancelled
Project CI / AI game creator shell Rust crates (push) Has been cancelled
Project CI / Backend tests (push) Has been cancelled
Project CI / Native shell tests (push) Has been cancelled
Project CI / Frontend tests (push) Has been cancelled
Project CI / Repository checks (push) Has been cancelled
Project CI / AI game creator shell web tests (push) Has been cancelled
Project CI / AI game creator shell Rust lane 1/2 (push) Has been cancelled
Reviewed-on: https://git.genarrative.world/git/GenarrativeAI/Genarrative/pulls/452
2026-09-21 19:46:05 +08:00
k88936 c0d6531e92 三个入口的seed参数在TS契约里改用bigint
- seed 是 i64,JS number 表示不了全部取值却又没有范围校验,客户端传 64 位值会被静默舍入
- text_to_model / image_to_model / multiview_to_model 的 image_seed、model_seed、texture_seed 由 number|null 改为 bigint|null
- 同步重新生成的 ts-rs 绑定,仅这三个字段变化
2026-09-21 19:38:47 +08:00
lhk229 e2bdb1105b 合并最新 master 到图片生成 CI 修复分支
Project CI / AI game creator shell Rust crates (pull_request) Successful in 3m7s
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 3m52s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 8m36s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 9m10s
Project CI / Repository checks (pull_request) Successful in 5m5s
Project CI / Frontend tests (pull_request) Successful in 5m40s
Project CI / Backend tests (pull_request) Successful in 8m16s
Project CI / Native shell tests (pull_request) Successful in 9m49s
Project CI / AI game creator shell web tests (pull_request) Successful in 4m45s
合入最新 master 的客户端图标素材描述修复
保留图片生成通知测试的宿主执行会话初始化与失败断言
2026-09-21 11:20:53 +00:00
lhk229 71f5f36764 修复图片生成通知测试缺失宿主执行会话
复用真实宿主执行会话与交付合同夹具,补齐 Direct 工具桥测试前置状态
保留图片资源提交后的刷新通知断言,并核对空提示词拒绝原因
同步更新图片生成集成测试初始化说明
2026-09-21 11:15:39 +00:00
lhk229 f71361c292 修复客户端图标素材生成丢失用户描述 (#450)
Project CI / Backend tests (push) Has been cancelled
Project CI / Native shell tests (push) Has been cancelled
Project CI / Frontend tests (push) Has been cancelled
Project CI / Repository checks (push) Has been cancelled
Project CI / AI game creator shell web tests (push) Has been cancelled
Project CI / AI game creator shell Rust lane 2/2 (push) Has been cancelled
Project CI / AI game creator shell Rust crates (push) Has been cancelled
Project CI / AI game creator shell Rust lane 1/2 (push) Has been cancelled
Project CI / AI game creator shell Rust smoke (push) Has been cancelled
删除图标生成的固定提示词包装、默认美术说明和两次截断
按服务端单条描述语义校验非空及200个Unicode字符,超限拒绝并保留原文
保留内部换行,直接以单条iconDescriptions提交用户描述
更新前端、原生入口和实际HTTP请求回归测试
同步工具说明、生成契约及项目排障文档

Reviewed-on: https://git.genarrative.world/git/GenarrativeAI/Genarrative/pulls/450
Co-authored-by: Linghong <ink29535@proton.me>
Co-committed-by: Linghong <ink29535@proton.me>
2026-09-21 19:12:35 +08:00
lhk229 6e9e7edcf8 修复回显测试身份数据与 Linux 条件编译
Project CI / AI game creator shell Rust crates (pull_request) Successful in 3m2s
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 3m46s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Failing after 6m12s
Project CI / Repository checks (pull_request) Has been cancelled
Project CI / AI game creator shell web tests (pull_request) Has been cancelled
Project CI / Native shell tests (pull_request) Has been cancelled
Project CI / Frontend tests (pull_request) Has been cancelled
Project CI / Backend tests (pull_request) Has been cancelled
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Has been cancelled
Project CI / Backend tests (push) Has been cancelled
Project CI / Native shell tests (push) Has been cancelled
Project CI / Frontend tests (push) Has been cancelled
Project CI / Repository checks (push) Has been cancelled
Project CI / AI game creator shell web tests (push) Has been cancelled
Project CI / AI game creator shell Rust lane 1/2 (push) Has been cancelled
Project CI / AI game creator shell Rust lane 2/2 (push) Has been cancelled
Project CI / AI game creator shell Rust smoke (push) Has been cancelled
Project CI / AI game creator shell Rust crates (push) Has been cancelled
按实际用户输入生成 SHA-256 请求摘要,保留回显去重与历史记录断言
保留 Windows 安装身份辅助函数的平台限制,补齐两处 AppData 调用分支的条件编译
同步 Direct 回合测试与安装路径策略文档
2026-09-21 10:59:28 +00:00
lhk229 480fe995ed Merge remote-tracking branch 'origin/master' into codex/fix-agc-command-runtime-ci 2026-09-21 10:43:06 +00:00
lhk229 afd5b8d91f 修复 Linux 命令执行将孤儿僵尸误判为未回收进程
Project CI / AI game creator shell Rust crates (pull_request) Successful in 2m59s
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 3m46s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 8m39s
Project CI / Repository checks (pull_request) Has been cancelled
Project CI / AI game creator shell web tests (pull_request) Has been cancelled
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Has been cancelled
Project CI / Backend tests (pull_request) Has been cancelled
Project CI / Native shell tests (pull_request) Has been cancelled
Project CI / Frontend tests (pull_request) Has been cancelled
命令主进程退出后区分存活成员与僵尸成员,保留进程组身份校验和失败关闭语义
处理 procfs 扫描期间进程退出及非 UTF-8 进程名,空进程组直接返回
新增隔离 subreaper 回归测试并补全命令 observation 断言诊断
同步 Runtime 技术方案与共享排障记录
2026-09-21 10:30:41 +00:00
kdletters c60d116af0 合并 codex/agc-godot-templates-20260921 到 master:新增 Godot 模板与按模板建项分流
Project CI / AI game creator shell Rust smoke (push) Has been cancelled
Project CI / AI game creator shell Rust crates (push) Has been cancelled
Project CI / Backend tests (push) Has been cancelled
Project CI / Native shell tests (push) Has been cancelled
Project CI / Frontend tests (push) Has been cancelled
Project CI / Repository checks (push) Has been cancelled
Project CI / AI game creator shell web tests (push) Has been cancelled
Project CI / AI game creator shell Rust lane 2/2 (push) Has been cancelled
Project CI / AI game creator shell Rust lane 1/2 (push) Has been cancelled
- 新增 Godot 模板源 godot-empty-2d / godot-empty-3d / godot-hello-world / godot-platformer-2d

- 按模板建项新增 Godot 分流:改写 project.godot 的 config/name 后走既有 Godot 导入并写入相对根

- Godot 工作区发现放宽:一层多命中按目录名排序取首个,project.godot 允许链接,内置插件行去掉手动启动

- 解决 decision-log.md 冲突:保留渠道安装身份与项目快照按渠道分区两条记录,并合入 Godot 两条记录
2026-09-21 18:17:33 +08:00
kdletters 3eb99f5124 合并 codex/agc-channel-install-identity 到 master:AGC 渠道安装身份隔离
- AGC 渠道安装身份隔离:不同渠道包体可在同一台设备并存
2026-09-21 18:17:12 +08:00
kdletters 34b1ad5d5c 新增 Godot 模板并补按模板建项的 Godot 分流
- 新增 4 个仓库内手写 Godot 4.7 模板源:godot-empty-2d、godot-empty-3d、godot-hello-world、godot-platformer-2d,entry 统一为 project.godot,各自带 meta.json 与 960×540 封面
- template_library.rs:复制模板后按 project.godot 识别 Godot 模板,改写工程显示名后走既有 Godot 导入并写入 godotProjectRoot,不再落到 Web 占位入口
- manifest.rs:新增 apply_godot_project_display_name,只改 [application] 段的 config/name 一行,其余字节逐字保留
- manifest.rs:放宽 Godot 工作区发现,一层子目录多命中按目录名排序取第一个,project.godot 允许是符号链接 / reparse point / 硬链接
- commands.rs:同步 Godot 导入错误文案,去掉「普通文件」限定
- RuntimeConfigDialog.tsx:内置插件行去掉手动启动 / 停止按钮,启动由前端自动启动承担、停止走该行启用开关
- import_tests.rs 与 tests/project.rs:补显示名改写、多命中确定性、链接标记与错误文案的定向回归
- 同步更新 PRD、模板包组织指南、模板库与模板建项技术方案、AGC Godot 编辑器插件接入方案、实施计划与共享决策记录
2026-09-21 17:25:34 +08:00
kdletters c52e0814d6 AGC渠道安装身份隔离:不同渠道包体可在同一台设备并存
- 新增 channel-identity.mjs 单点定义渠道安装身份,默认渠道保持基线 productName 与 identifier
- build-release.mjs 渠道 --config 同批注入 productName、identifier 与 updater 端点
- build-macos-ci.mjs 按发布渠道解析产品名,派生 .app、updater 归档与 DMG 名称
- main.rs 与 windows.rs 窗口标题取构建期产品名,同机并存的渠道客户端可区分
- config.rs 提权 ACL 的 managed 范围按目录名识别基线目录与渠道派生目录
- check-config.mjs 断言基线等于默认渠道身份且非默认渠道身份必须隔离
- build-release.test.mjs 与 prepare-macos-codex.test.mjs 补齐渠道身份与渠道首装包用例
- 更新 AGC 更新主规范、开发运维文档、共享记忆与渠道安装身份隔离的里程碑与实施计划
2026-09-21 17:06:03 +08:00
kdletters 4951b71d71 项目快照按渠道分区,后台项目工程支持渠道筛选与游标分页
Project CI / AI game creator shell Rust crates (push) Successful in 2m46s
Project CI / AI game creator shell Rust smoke (push) Successful in 3m37s
Project CI / AI game creator shell Rust lane 2/2 (push) Failing after 6m5s
Project CI / AI game creator shell Rust lane 1/2 (push) Failing after 6m40s
Project CI / Repository checks (push) Successful in 5m37s
Project CI / Frontend tests (push) Successful in 6m21s
Project CI / Backend tests (push) Successful in 9m56s
Project CI / Native shell tests (push) Successful in 10m57s
Project CI / AI game creator shell web tests (push) Successful in 5m29s
项目快照对象键升级为 agc/project-snapshots/v2/{channel}/{user}/{project}/,渠道取部署配置 GENARRATIVE_AGC_PROJECT_SNAPSHOT_CHANNEL(缺省沿用客户端下载渠道),非法渠道在写入处失败关闭
后台新增渠道列表接口,项目工程列表与下载接受 channel,游标绑定渠道并拒绝跨渠道复用
后台项目工程用户列改为素材查询口径:昵称 + 陶泥号 + 用户详情入口,由 api-server 解析作者信息
后台项目工程改为游标分页:每页 20/50/100、上一页/下一页与当前页提示,翻页失败保留当前页
部署环境示例补充快照渠道配置,并同步运维、技术方案、里程碑与决策记录文档
2026-09-21 16:57:16 +08:00
lhk229 8520b50c81 修复游戏智能体输入含空白片段时被误判为空 (#449)
Project CI / AI game creator shell Rust smoke (push) Successful in 2m20s
Project CI / AI game creator shell Rust crates (push) Successful in 1m17s
Project CI / AI game creator shell Rust lane 1/2 (push) Failing after 6m51s
Project CI / AI game creator shell Rust lane 2/2 (push) Failing after 5m21s
Project CI / Backend tests (push) Successful in 7m33s
Project CI / Frontend tests (push) Has been cancelled
Project CI / Native shell tests (push) Has been cancelled
Project CI / Repository checks (push) Has been cancelled
Project CI / AI game creator shell web tests (push) Has been cancelled
改为按整条消息判断有效内容,保留空白文本片段及两类引用的原有校验
补充多行文本、纯引用、全空白输入及非法引用的定向回归测试
同步素材引用文档、共享排障记录和过时测试注释

Reviewed-on: https://git.genarrative.world/git/GenarrativeAI/Genarrative/pulls/449
2026-09-21 16:36:59 +08:00
kdletters c5afc02e94 模板正文目录门禁:CLI 打包与后台上传统一拒绝身份/版本库/依赖/构建目录
Project CI / Frontend tests (push) Has been cancelled
Project CI / Backend tests (push) Has been cancelled
Project CI / Native shell tests (push) Has been cancelled
Project CI / AI game creator shell Rust lane 2/2 (push) Has been cancelled
Project CI / AI game creator shell Rust crates (push) Has been cancelled
Project CI / Repository checks (push) Has been cancelled
Project CI / AI game creator shell web tests (push) Has been cancelled
Project CI / AI game creator shell Rust lane 1/2 (push) Has been cancelled
Project CI / AI game creator shell Rust smoke (push) Has been cancelled
- scripts/agc-template-library-publish.mjs:readProjectFiles 增加正文门禁,任意层级拒绝 .agent/.git/.svn/node_modules,根目录拒绝 dist/build/library/temp/local/.idea/.vscode
- scripts/agc-template-library-publish.test.mjs:新增夹具源目录与门禁用例,覆盖 13 条拒绝路径及 game/dist/**、game/.gitignore 放行
- server-rs/crates/api-server/src/admin_templates.rs:上传归档校验与 CLI 用同一份段名单,新增 template_import_archive_rejects_identity_and_build_directories
- docs/【模板规范】AGC模板包组织指南-2026-09-21.md:已知边界改为「已有机器门禁」,并说明同名目录段只在根目录受限
- docs/technical/【技术方案】AGC模板库与模板建项-2026-09-17.md:CLI 与后台上传的校验口径补门禁,并追加 2026-09-21 证据(九个模板本地重打包摘要与线上清单逐条一致)
- docs/project-memory/plans/【里程碑】后台模板上传-2026-09-21.md:验收标准 2 补充门禁证据
- docs/project-memory/shared-memory/decision-log.md:新增 2026-09-21 正文目录门禁决策记录
2026-09-21 16:25:35 +08:00
kdletters b5e1c0f1d6 新增模板包组织规范并接入文档索引
Project CI / AI game creator shell Rust crates (push) Successful in 2m48s
Project CI / AI game creator shell Rust smoke (push) Successful in 3m37s
Project CI / AI game creator shell Rust lane 2/2 (push) Failing after 6m5s
Project CI / AI game creator shell Rust lane 1/2 (push) Failing after 8m59s
Project CI / Backend tests (push) Has been cancelled
Project CI / Native shell tests (push) Has been cancelled
Project CI / Frontend tests (push) Has been cancelled
Project CI / AI game creator shell web tests (push) Has been cancelled
Project CI / Repository checks (push) Has been cancelled
- 新增 docs/【模板规范】AGC模板包组织指南-2026-09-21.md:ZIP 根目录契约、html 与 Cocos 工程的建议结构与保留项、禁止放入的内容(.agent/.git/node_modules/dist/密钥/嵌套锁文件)、路径与体积上限、封面要求、元数据字段约束、版本不可变规则与发布前自检清单
- 说明两条发布路径的输入差异(CLI 源目录 vs 后台成品 ZIP 上传)与各自上限,并标注「工具不会自动拦截 .agent/.git」这一已知边界
- 主规范与模板库 README(会发布到 OSS templates/README.md)各加一条指向该指南的入口
- docs/README.md 登记新文档,check:doc-index 通过(194 份)
2026-09-21 16:16:21 +08:00
kdletters 15e7d6065e 记录后台模板上传里程碑的实现与证据
Project CI / AI game creator shell Rust crates (push) Successful in 2m58s
Project CI / AI game creator shell Rust smoke (push) Successful in 3m51s
Project CI / AI game creator shell Rust lane 1/2 (push) Has been cancelled
Project CI / Frontend tests (push) Has been cancelled
Project CI / Repository checks (push) Has been cancelled
Project CI / Backend tests (push) Has been cancelled
Project CI / Native shell tests (push) Has been cancelled
Project CI / AI game creator shell web tests (push) Has been cancelled
Project CI / AI game creator shell Rust lane 2/2 (push) Has been cancelled
- 里程碑 Status 更新为 implemented-awaiting-runtime-acceptance
- 补实现与证据表:路由/权限、写入前整批拒绝、批量原子性、版本一致性、CAS 与锁、保留语义、内容寻址与回读、界面用例与静态检查
- 明确仍未执行:真实 dev bucket 的批量写入 smoke(需用户确认,建议两个 smoke-import 模板验证后下架)
2026-09-21 16:10:55 +08:00
kdletters 2e23a54211 后台模板上传(页面):模板管理页支持批量选择 ZIP 与封面并整批提交
Project CI / AI game creator shell Rust crates (push) Successful in 3m2s
Project CI / AI game creator shell Rust smoke (push) Successful in 4m5s
Project CI / AI game creator shell Rust lane 2/2 (push) Has been cancelled
Project CI / Backend tests (push) Has been cancelled
Project CI / Frontend tests (push) Has been cancelled
Project CI / Repository checks (push) Has been cancelled
Project CI / AI game creator shell web tests (push) Has been cancelled
Project CI / AI game creator shell Rust lane 1/2 (push) Has been cancelled
Project CI / Native shell tests (push) Has been cancelled
- 新增上传模型:文件名派生模板 ID、按同名匹配封面、逐行字段校验与 multipart 组装(标签去重与上限)
- 模板管理页新增「上传模板」入口与弹窗:多选 ZIP、按 ID 同名多选封面、逐行编辑 ID/名称/版本/运行时/entry、逐行错误、沿用写入确认与防重复提交
- 失败只在弹窗内交代并区分 409 刷新引导与 503 锁占用提示,401 仍交由会话处理;成功后用服务端快照刷新列表并展示逐条导入结果
- admin API client 支持 multipart 请求(不预设 JSON Content-Type),新增 importAdminAgcTemplates 与对应类型
- 主规范新增「后台模板上传」章节并收口原「不上传 ZIP」表述;决策记录补一条
- 验证:admin-web typecheck、页面/模型/客户端 40 项 vitest、check:doc-index、check:encoding、cargo fmt --check、git diff --check
2026-09-21 16:06:23 +08:00
kdletters 4863c8c066 后台模板上传(后端):新增批量导入接口与存储/领域支持
- shared-contracts 新增导入 manifest、逐条与结果 DTO(camelCase,拒绝未知字段)
- module-assets 新增 prepare_template_import:新 ID 默认上架,已存在条目就地更新并保留上架状态与未知扩展字段;同一 ID 同版本字节不同时按 CLI 同一句文案拒绝,字节一致时按内容复用既有对象
- platform-oss 为 application/zip 放宽单对象上限到 64 MiB(图片与元数据仍 5 MiB),测试替身同步该口径
- api-server 新增 POST /admin/api/agc-templates/import:multipart(manifest + zip_N/cover_N),逐项校验归档安全性、entry 存在性与封面(按字节嗅探格式,仅 PNG/JPEG/WebP)后才取发布锁
- 锁内流程:CAS 校验 revision → 内容寻址写入 zip/封面/元数据并回读 → 一次提交清单 → 释放锁;断连由独立任务持有,不确定结果保留锁并返回 503
- 路由挂 require_admin_auth 与 200 MiB body 上限,页签权限矩阵与路由契约测试同步
- 新增用例:清单与文件字段校验、归档越界与符号链接拒绝、内容寻址键与封面嗅探、zip 内容类型存储上限
- 新增「后台模板上传」里程碑与实施计划文档
- 验证:cargo test(module-assets 11 项、platform-oss 12 项、api-server 定向 4 项)、cargo fmt --check、check:doc-index、check:encoding、git diff --check
2026-09-21 16:06:23 +08:00