Commit Graph

20 Commits

Author SHA1 Message Date
kdletters 5db407c3dc 新增 AGC 模板库与由模板创建项目链路 (#396)
Project CI / AI game creator shell Rust shard 3/4 (push) Successful in 7m12s
Project CI / AI game creator shell Rust shard 2/4 (push) Successful in 7m18s
Project CI / AI game creator shell Rust shard 1/4 (push) Successful in 7m25s
Project CI / AI game creator shell Rust shard 4/4 (push) Successful in 7m22s
Project CI / AI game creator shell Rust smoke (push) Successful in 1m49s
Project CI / AI game creator shell Rust crates (push) Successful in 2m36s
Project CI / Repository checks (push) Failing after 1m11s
Project CI / Frontend tests (push) Failing after 4m37s
Project CI / AI game creator shell web tests (push) Failing after 4m6s
Project CI / Native shell tests (push) Successful in 9m39s
Project CI / Backend tests (push) Successful in 10m12s
## 交付范围

- OSS `agc-dev` bucket 的 `templates/` 前缀作为 AGC 游戏模板库(**去掉 `agc/` 这一层**;`agc/` 继续只放客户端安装包与更新清单)。
- 模板正文改为 zip(zip 根 == AGC 项目根,如 `game/index.html`);清单补齐 `tags`、封面字段与包大小/摘要,`templateVersion` 用于判断是否需要重下。
- 客户端:Rust 模板库模块、模板库全屏页、首页模板推荐位、左侧导航入口。

## 客户端行为

- `fetch_game_template_library`:读取并校验清单(≤4 MiB),缓存到 `<app_data>/templates/index.json`;网络失败回退本机缓存并标注 `source=cache`。
- `download_game_template`:按清单下载 zip(≤512 MiB),校验字节数与 SHA-256 后解压到 `<app_data>/templates/installed/<id>/<version>/`,最后写 `installed.json` 作为安装完成标记。
- `create_automatic_local_game_project_from_template`:先把模板文件铺进新项目目录,再走既有 `init_local_game_project_at` 补 `.agent` 清单与标准目录;失败删除半成品目录。
- 解压只接受普通文件与目录(拒绝绝对路径、`..`、盘符、符号链接),安装目录名由标识符白名单拼出;远端只信「受信任 OSS 主机 + 对象键」,清单里的地址字段不参与请求。
- UI:搜索(空白分隔多关键词「与」)、标签/运行时筛选、仅看已下载、封面卡片与已下载徽标;「使用模板」在版本落后时先重下再建项。

## 文档与脚本

- 主规范 `docs/technical/【技术方案】AGC模板库与模板建项-2026-09-17.md`;里程碑与实施计划见 `docs/project-memory/plans/`;`decision-log.md` 记录库路径、清单 schema、安装缓存目录与 CSP 约定。
- 发布脚本 `scripts/agc-template-library-publish.mjs`(`--dry-run` 校验 → 上传 → 回读校验)。
- 首页「灵感推荐」替换为模板库推荐位,删除本机灵感图目录与 `InspirationGallery.tsx`;`tauri.conf.json` 的 `img-src` 放行受信任 OSS 主机用于加载封面。

## 验证

- `cargo test --bin genarrative-ai-game-creator-shell template_library`:9 passed;`--ignored` 真连检查 `fetches_the_live_template_library_index` 通过。
- `npx vitest run src/features/template-library`:9 passed。
- `npm run typecheck`、`cargo fmt --check`、`npm run check:encoding`、`node scripts/check-doc-index.mjs`、`git diff --check` 均通过。
- OSS 侧匿名复核:`templates/index.json`、各 `cover.png` 与 `template.zip` 均返回 200。

## 未做 / 待确认

- 本轮未做客户端点击级人工验收(下一步单独验证并把结果补进此 PR)。
- 模板封面目前是占位标题卡,正式封面由后续模板包提供。

---------

Co-authored-by: kdletters <61648117+kdletters@users.noreply.github.com>
Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/396
2026-09-17 17:48:06 +08:00
kdletters 737a2266b9 支持同 AppData 多窗口共享 Agent Runner
- owner 独占锁改为可多窗口同时持有的界面参与锁 agent-runner.gui-participant.lock
- Runner 启动检查、attach 门禁与 watchdog 改用参与锁存活判定,最后一个窗口退出才关停 Runner
- 窗口启动只采纳现有 owner claim,登录/refresh/退出/换号才发布新 epoch claim
- 同 claim 重复 attach 改为幂等空操作,不再清空 Runner 平台登录态
- manifest 失效与 Runtime update relay 接收端改为按 token 去重的注册表并广播,失败只淘汰该接收端
- GUI 退出先释放参与锁,仍有其它窗口时保留 Runner 并记录 retained_for_other_windows
- Runner 启动失败时按最新 endpoint 复用一次,避免两窗口同时冷启动被实例锁竞争误报
- 更新 runner 定向测试、GUI 生命周期集成测试与自检用例
- 同步 AGC 技术方案、决策记录、踩坑记录与多窗口里程碑/实施计划
2026-09-16 16:56:21 +08:00
kdletters 4a46f89c9b 接入 AGC 内置插件宿主并补齐 Cocos 编辑器能力 (#338)
Project CI / Repository checks (push) Successful in 2m45s
Project CI / Frontend tests (push) Successful in 3m27s
Project CI / Backend tests (push) Successful in 6m18s
Project CI / Native shell tests (push) Failing after 13m52s
客户端新增随包提供的插件宿主和 Cocos Creator 集成:识别并导入 Cocos 项目,通过内置桥接操作已打开的编辑器,无需安装项目 MCP 扩展。DirectProject 现在公开 36 个独立 cocos_* 工具,保留通用 JavaScript 执行入口。

- 通用插件 SDK、命令/能力/面板注册、编辑器适配器和跨进程内置插件开关。
- Cocos 场景、节点、组件、Prefab、UI、Layout/Widget、资源、保存、撤销、日志与预览调试;目录和实现由 JS/native 共用。
- 编辑事务回读、失败回滚、后续手动修改保护及不确定结果禁止重放;预览截图通过 MCP image 返回。
- DirectProject 跳过无关专业 Agent 历史,将项目打开和历史读取中的同步 I/O 移出窗口线程,消除 Cocos 执行与项目文件锁的错误耦合。

验证:
- 合并 master 后:类型/配置检查、编码检查、Rust 格式检查和提交钩子通过。
- 合并 master 后:Cocos 项目打开、插件面板和开发启动定向测试 10 通过、2 跳过;DirectProject MCP 测试 17 通过、1 项真实 Creator opt-in 忽略;插件宿主测试 9/9。
- 插件行为测试 17/17;native 测试 20/20,4 项 opt-in 测试默认忽略。
- 真实 Creator 3.8.8 的 36/36 操作 smoke,以及客户端 MCP tools/list、tools/call、UI/撤销和预览截图,在功能实现阶段已验证通过;本次 master 合并后未重复真实 GUI smoke。

验证边界:发行安装包和远端 CI 尚未验收。

Reviewed-on: #338
Co-authored-by: kdletters <kdletters@qq.com>
Co-committed-by: kdletters <kdletters@qq.com>
2026-09-13 14:48:55 +08:00
lhk229 47a3240e81 按 rustfmt 修正 V1 删除后残留的格式偏差
Project CI / Repository checks (pull_request) Successful in 4m51s
Project CI / Frontend tests (pull_request) Successful in 7m39s
Project CI / Backend tests (pull_request) Successful in 11m23s
Project CI / Native shell tests (pull_request) Failing after 13m38s
Repository checks 门禁的 cargo fmt --check 要求,仅格式化、无行为变化
2026-09-08 11:25:17 +00:00
lhk229 55377f9e51 修复 prompt bundle 集成测试夹具残留 V1 planning 形状导致 CI 失败
Project CI / Backend tests (pull_request) Failing after 15s
Project CI / Repository checks (pull_request) Failing after 15s
Project CI / Frontend tests (pull_request) Successful in 6m40s
Project CI / Native shell tests (pull_request) Successful in 27m25s
基础夹具 manifest 同步删除 supervisorPlan 组合、planning 目录条目与四个已删 section 登记
roleOverlays 校验测试改为自带合法 overlay 夹具后逐项破坏,与生产 manifest 的空 overlay 形状对齐
2026-09-08 11:11:31 +00:00
lhk229 b14e42d9bb AGC支持安装扩展skill、MCP (#233)
Project CI / Repository checks (push) Failing after 1m45s
Project CI / Frontend tests (push) Successful in 4m1s
Project CI / Backend tests (push) Successful in 6m55s
Project CI / Native shell tests (push) Failing after 16m22s
Co-authored-by: 段舒康 <kdletters@qq.com>
Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/233
Co-authored-by: Linghong <ink29535@proton.me>
Co-committed-by: Linghong <ink29535@proton.me>
2026-09-01 20:13:48 +08:00
kdletters c09a511aaa Codex/fix pr188 191 ci (#194)
Project CI / Repository checks (push) Successful in 2m24s
Project CI / Frontend tests (push) Successful in 2m54s
Project CI / Backend tests (push) Successful in 4m33s
Project CI / Native shell tests (push) Successful in 14m29s
Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/194
Co-authored-by: kdletters <kdletters@qq.com>
Co-committed-by: kdletters <kdletters@qq.com>
2026-08-25 15:41:55 +08:00
lhk229 3d8e0211db 5分钟策划agent (#159)
Project CI / Repository checks (push) Successful in 3m54s
Project CI / Frontend tests (push) Successful in 4m20s
Project CI / Backend tests (push) Successful in 4m33s
Project CI / Native shell tests (push) Successful in 16m31s
Co-authored-by: 段舒康 <kdletters@qq.com>
Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/159
Co-authored-by: Linghong <ink29535@proton.me>
Co-committed-by: Linghong <ink29535@proton.me>
2026-08-24 21:44:44 +08:00
kdletters 578f8019fc 优化AGC项目入口并识别Godot工作区
Project CI / Repository checks (push) Successful in 1m14s
Project CI / Frontend tests (push) Successful in 3m9s
Project CI / Backend tests (push) Successful in 3m58s
Project CI / Native shell tests (push) Successful in 14m6s
项目页只保留打开项目和新建项目并统一原生目录选择
按根目录及一层子目录识别project.godot并记录相对Godot根
保持.agent位于用户选择的工作区根并补齐Windows构建门禁
补充响应式布局、测试、技术方案和共享项目记忆
2026-08-14 21:53:43 +08:00
kdletters 04251f42a7 禁止协作Prompt跨语义复用
Project CI / Repository checks (push) Failing after 44s
Project CI / Frontend tests (push) Successful in 3m18s
Project CI / Backend tests (push) Successful in 4m11s
Project CI / Native shell tests (push) Failing after 11m33s
为runtime supervisor chat variant overlay与Provider fragment建立单一section所有权
仅允许Supervisor planning与chat显式复用同一identity section
阻断动态variant与静态composition的重复注入
补齐跨域alias负例并同步架构文档
2026-08-04 18:58:51 +08:00
kdletters 22edb1dfb1 收紧Supervisor Prompt所有权
从planning visual与chat组合推导完整Supervisor专属section集合
拒绝专属section流入公共runtime平台变体专业overlay或Provider fragment
将公共Runtime header改为身份中立并消除Supervisor双重system身份
保留普通专业Agent规划与最终回复身份约束
补齐跨层逃逸负例并同步架构文档
2026-08-04 18:58:51 +08:00
kdletters 68d202f4a4 隔离Supervisor专属Prompt段
限制identity section仅用于Supervisor planning与chat
限制final-reply section仅用于Supervisor chat
拒绝公共runtime变体overlay与Provider fragment复用专属段
补齐五类失败关闭回归并同步架构文档
2026-08-04 18:58:51 +08:00
kdletters 9c978f00cb 补全协作Prompt增量构建监听
递归登记Prompt Bundle各级目录为构建依赖
确保嵌套目录新增孤立Markdown触发失败关闭
补充深层目录依赖回归并同步架构文档
2026-08-04 18:58:51 +08:00
kdletters 07a18d516b 强类型化协作Prompt选择器
将role overlay source改为构建期强类型语义selector
消除Supervisor身份合同的第二个配置入口
强制Supervisor规划与最终回复复用同一身份section
移除user context中的Supervisor重复身份注入
收窄background context builder接口并补齐失败关闭回归
同步协作graph配置化边界文档
2026-08-04 18:58:51 +08:00
kdletters 15a0924d4b 拆分Supervisor身份与回复合同
将Supervisor共享核心身份与最终回复规则拆成独立Prompt section
由manifest组合interaction和final-reply system prompt
让background planning只注入核心身份并移除final-reply user context重复合同
补齐请求级单次注入断言、构建期组合校验和边界文档
2026-08-04 18:58:50 +08:00
kdletters d02b4afeae 收紧协作Prompt单一来源
复用Bundle内Supervisor身份合同覆盖后台规划上下文
将首批协作协议错误收敛为结构化事实并由外置fragment给出动作指令
监听Prompt Bundle根目录以阻断增量构建中的孤立section
补齐源码回流门禁、依赖断言和边界文档
2026-08-04 18:58:50 +08:00
kdletters ab08ac0ac3 外置Supervisor交互协作提示
将Supervisor交互与最终回复身份合同迁入版本化Prompt Bundle
将isolated模板目录静态说明纳入manifest组合并仅在Rust注入动态节点ID
补齐构建期注册、源码回流门禁和运行期回归覆盖
同步协作graph配置化边界文档
2026-08-04 18:58:50 +08:00
kdletters 82f5455972 外置Provider协作图提示片段
把 isolated 与 all-join 合同移入 Prompt Bundle
把 autonomous 首轮与 Supervisor manifest 指令移入 Prompt Bundle
把首批协作、回执收敛、DAG 等待和试玩返工指令移入 Prompt Bundle
保留 Rust 对工具收窄、状态判断和正式 DAG 的强制执行
补充 fragment 注册校验、生产源码门禁和请求级回归
2026-08-04 18:58:50 +08:00
kdletters 84926ee0cd 外置智能体协作编排与节点目录
Project CI / Repository checks (push) Failing after 4m58s
Project CI / Frontend tests (push) Successful in 3m18s
Project CI / Backend tests (push) Successful in 4m9s
Project CI / Native shell tests (push) Successful in 14m3s
由 Prompt Bundle manifest 统一驱动 section、composition、变体和 role overlay
由构建脚本生成 Supervisor 与六组专业 Agent 的静态节点目录
构建期失败关闭校验路径、引用、selector、alias 与 seed DAG 一致性
补充平台、Editor、Provider 请求、节点快照和非法 manifest 回归
同步 Runtime 技术方案与项目决策记录
2026-08-04 18:58:50 +08:00
AIGameCreator App d4075c3423 抽取通用多智能体运行时与可扩展Provider
Project CI / Frontend tests (push) Failing after 3m43s
Project CI / Native shell tests (push) Failing after 3m36s
Project CI / Repository checks (push) Failing after 4m36s
Project CI / Backend tests (push) Successful in 8m36s
新增纯 Rust agent-runtime-core,提供运行时契约、能力注册、Agent 目录、Profile、完成策略与零重放恢复
抽取中立 LLM Provider 协议与可扩展 Registry,并适配 OpenAI Responses、OpenAI Chat 和 Anthropic
将 AGC interaction、Provider 控制、Runner 生命周期、steering 与 tool-plan handoff 接入统一运行时边界
补充非游戏消费者、Provider 网络闭环、Runtime 恢复及 GUI Runner owner 测试
同步 Cargo/npm 门禁、Runtime 技术方案和项目共享记忆
2026-07-30 16:15:51 +08:00