Compare commits

..

52 Commits

Author SHA1 Message Date
kdletters 36ae9425e9 完善 AGC 独立 Agent 试验验证
支持使用 Fake Provider 验证跨进程 Agent 回合

修正独立 Agent 与排队模型的匹配和子进程超时回收

补充 AGC 到独立 App Server 的真实子进程 smoke
2026-09-10 13:07:09 +08:00
kdletters bd85694ee9 接入 AGC 独立 Agent 试验模式
新增 agent_runtime 配置并通过 stdio App Server 启动独立 Agent

接通后台、交互和 DirectProject 文本回合,保留旧 Codex 回退

对未接入的 function tool 明确失败,避免静默丢失工具调用

补充 AGC 配置回归与实施边界文档
2026-09-10 12:45:54 +08:00
kdletters c709b3d9b2 新增独立 Agent App Server
为 agent-cli 增加 stdio JSON-RPC 2.0 服务入口与运行控制协议

补充 Host 实时流监听和流式取消入口

新增 App Server 子进程闭环测试及协议文档

更新 README、架构、TODO 与共享决策记录
2026-09-10 00:05:02 +08:00
kdletters fc05617ecc 记录 AGC 使用独立 Agent 内核的边界
明确替换 Codex 执行循环而非替换二进制

保留 AGC 工具权限、Runtime 持久化和完成门

规定兼容桥、实验模式与新旧 fixture 对比顺序
2026-09-09 21:28:04 +08:00
kdletters d85557cf6d 制定 AGC 接入独立 Agent 内核计划
明确以新 Kernel/Engine 替换 Codex 执行循环

保留 AGC 工具权限、Runtime 持久化、预览和完成门

先实现兼容桥与可回滚 agent_runtime 实验模式
2026-09-09 21:27:11 +08:00
kdletters ce8425e671 明确 AGC 使用新 Agent 内核的替换目标
将替换对象从 Codex 适配器修正为 Agent Kernel 与 Engine 执行循环

保留 AGC 宿主的工具、权限、持久化、预览和完成门

规划 agent_runtime 实验模式与可回滚接线
2026-09-09 21:09:36 +08:00
kdletters 9eb1abfda5 评估 AGC 与独立 Codex 替换边界
对比 AGC 0.147.0、独立适配器 0.152.1 与本机 Codex 0.153.4

记录协议、隔离、工具桥与 Runtime 职责差异

明确先做 0.153.4 typed adapter 和可切换接线,不直接替换生产路径
2026-09-09 20:51:00 +08:00
kdletters 0c41cb6758 更新 Host 执行拆分计划状态
记录 execution.rs 已承接运行入口与 lease 恢复编排

保留 Engine worker 主体和终态 glue 的后续边界
2026-09-09 20:14:48 +08:00
kdletters 662ecd3e57 补录 Agent Runtime 架构决策
记录独立 Rust workspace、Runtime 控制面与 Host 模块拆分决策

补充执行入口、checkpoint、Codex 和外部桥接的职责边界与验证口径
2026-09-09 20:13:20 +08:00
kdletters c64d98a18f 拆分 Host 执行入口
将 run、run_existing、streaming 与 cancellation 入口移入 execution.rs

保持 AgentHost 公开 API、Runtime/SQLite 合同和 Engine 接口不变

同步 README、架构说明与 TODO,保留跨职责终态 glue 在根模块
2026-09-09 20:12:02 +08:00
kdletters c7d6eade5e 拆分 Host 检查点与 Codex 桥接
将 checkpoint listener 和 runtime trace 投影移入 checkpoint 模块

将 Codex server-request handler 与 durable tool-call helper 移入 codex 模块

保持根路径公开类型、Engine 执行和 Runtime 边界不变
2026-09-09 19:58:16 +08:00
kdletters 3ba935367a 拆分 Host 检查点与事件投影
将 DurableCheckpoints、RuntimeTraceProgress 和 runtime trace 投影移入 checkpoint 模块

保持 Engine 执行、Runtime reducer 和公开 Host API 边界不变

补齐拆分后的 workspace、Clippy、Rustdoc、编码与差异验证
2026-09-09 19:49:29 +08:00
kdletters 69fc3d8ca0 拆分 Agent Host 运行职责
将 durable 取消、失败收口、审批决议和外部结果对账迁入 RuntimeService

把 Host 工具、MCP、Skill 与外部 backend 桥接拆为私有模块并保持公开 API

补充 Runtime 控制测试、依赖反向门禁和架构验收文档
2026-09-09 19:20:54 +08:00
kdletters 202279c6d9 新增独立 Agent Runtime Rust 工作区
新增 Core、Engine、Runtime、SQLite、Provider、MCP、Skill、Codex、CLI 与 DAG crate

补齐 OpenAI endpoint 配置、Provider 实例/协议路由和统一工具权限边界

加入持久化、lease、checkpoint、reconciliation、审批恢复与消息历史回归

加入独立 workspace CI、依赖边界、能力集和 Fake Agent 测试脚本

同步建设计划、TODO、架构、测试与验收文档
2026-09-06 17:44:54 +08:00
kdletters 3e8591040d 忽略所有 Rust target 目录
将 target 忽略规则扩展到仓库任意层级
2026-09-01 15:23:50 +08:00
lhk229 933da91fa3 清除策划agent不可达分支 (#234)
Project CI / Repository checks (push) Successful in 3m37s
Project CI / Frontend tests (push) Successful in 4m28s
Project CI / Backend tests (push) Successful in 7m31s
Project CI / Native shell tests (push) Successful in 17m25s
Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/234
Co-authored-by: Linghong <ink29535@proton.me>
Co-committed-by: Linghong <ink29535@proton.me>
2026-09-01 10:30:23 +08:00
lhk229 d7fc4c5b6f 让 Direct 首轮带上本轮附件的项目路径映射 (#223)
Project CI / Repository checks (push) Successful in 3m4s
Project CI / Frontend tests (push) Successful in 3m24s
Project CI / Backend tests (push) Successful in 6m10s
Project CI / Native shell tests (push) Successful in 15m8s
抽出 Home/Project 共用的 DirectCodexTurnAttachment 与渲染函数
Direct command 在进 Codex 前拼接有界 sidecar,jsonl 与气泡仍写用户原文
首页建项 latch 把导入附件传给 Direct 首轮,后续手打消息不带 attachments
做方案首轮仍走 Supervisor,不注入 sidecar
补齐 Rust 渲染测试与 home.suite 附件断言
记录路径映射合同与决策

Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/223
Co-authored-by: 孔令弘 <ink29535@proton.me>
Co-committed-by: 孔令弘 <ink29535@proton.me>
2026-08-31 19:47:23 +08:00
k88936 6d2c275d32 修复项目页布局高度 (#228)
Project CI / Repository checks (push) Successful in 2m18s
Project CI / Frontend tests (push) Successful in 4m11s
Project CI / Backend tests (push) Successful in 6m17s
Project CI / Native shell tests (push) Successful in 14m19s
项目页父级改为纵向 flex 并填满可用高度
项目列表容器与表格占满剩余空间

before:
![shotmd-1788154666.jpg](/attachments/3a02fdae-22b1-49d7-9f20-6739fddb88b9)
![shotmd-1788143842.png](/attachments/7522543f-7f58-46f1-aa72-ee5d13d2819f)

after:
![shotmd-1788154694.jpg](/attachments/cd3fb3ea-fd55-4343-9e11-210af6fc767a)
![shotmd-1788155214.jpg](/attachments/2d39b273-57be-427e-9e08-2ffe994531fb)

---------

Co-authored-by: 段舒康 <kdletters@qq.com>
Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/228
Co-authored-by: 王德宇 <kvtodev@outlook.com>
Co-committed-by: 王德宇 <kvtodev@outlook.com>
2026-08-31 18:58:54 +08:00
suzmii 80b8238d0a 修复 AGC Windows ACL 提权与文件访问边界 (#211)
Project CI / Frontend tests (push) Successful in 4m30s
Project CI / Repository checks (push) Successful in 2m26s
Project CI / Backend tests (push) Successful in 8m12s
Project CI / Native shell tests (push) Successful in 17m46s
### 背景

Windows 下 AGC 读取配置目录、项目文件和本地资源时,可能先于 ACL 校验阶段就因继承权限、错误 owner 或拒绝访问而失败,表现为 `拒绝访问。 (os error 5)`。

此前自定义 `--config-dir` 场景还存在 scope 无法传递到提权子进程的问题;native picker 路径也缺少进程内来源证明,递归索引可能跟随 junction/reparse point,新建文件在权限加固失败时可能留下残留文件。

### 本次变更

1. 修复自定义 `--config-dir` 的 `managed / user-selected` scope 传递与提权票据校验。
2. 增加 native picker 文件/目录路径的短期 provenance 授权;未经过 picker 授权的任意 IPC 绝对路径不能触发 `user-selected` 自动提权。
3. 项目文件列表和索引递归改用 `symlink_metadata()`,拒绝 symlink、junction 和 Windows reparse point。
4. 统一在 metadata/read/open 前完成 ACL 准备,对 ACL 导致的 metadata 失败执行一次受控修复和重试。
5. 新建 conversation、导出包、Agent DB、资源、字体等文件在 harden 失败时关闭句柄并清理刚创建的文件。
6. 修复 UAC 提权授权票据以 `share_mode(0)` 独占打开后与 `GetNamedSecurityInfoW/SetNamedSecurityInfoW` 产生共享冲突的问题。
7. 同步 AGC Windows ACL 技术方案与安全回归测试。

### 安全行为

- UAC 取消返回 `1223`,不会被当作成功。
- 提权子进程重新校验目标路径、scope、当前用户 SID、nonce、有效期和票据一次性消费。
- symlink、junction、reparse point 和非普通文件对象保持失败关闭。
- 自定义配置目录可以位于用户 profile 外部,但仍受 owner、DACL 和路径类型校验。

### 验证结果

已执行并通过:

```
cargo check --locked --manifest-path apps/ai-game-creator-shell/src-tauri/Cargo.toml
cargo test --locked --manifest-path apps/ai-game-creator-shell/src-tauri/Cargo.toml private_path_elevation_policy_tests -- --nocapture
# 10 passed

cargo test --locked --manifest-path apps/ai-game-creator-shell/src-tauri/Cargo.toml local_project -- --nocapture
# 20 passed

cargo test --locked --manifest-path apps/ai-game-creator-shell/src-tauri/Cargo.toml checkpoint::security_tests -- --nocapture
# 10 passed

cargo test --locked --manifest-path apps/ai-game-creator-shell/src-tauri/Cargo.toml private_file_write_tests -- --nocapture
# 2 passed

npm run check:encoding
# 5554 files passed

git diff --check
# passed
```

另外确认:

- `origin/master` 是当前分支祖先。
- 交接文档已删除,且原本不在 Git 跟踪列表中。
- 全量 `cargo test` 未作为通过依据;此前存在与 ACL 无关的失败项。
- `cargo fmt --check` 仍受仓库已有格式漂移影响,本次未执行全仓库格式化。
- 真实 Windows UAC 点击“Yes”的手工回归仍需在目标机器上确认。

### 手工验收

使用:

```powershell
& "C:\Users\dongy\workspace\Genarrative\.worktrees\agc-windows-acl-fix\apps\ai-game-creator-shell\src-tauri\target\debug\genarrative-ai-game-creator-shell.exe" `
  --config-dir "C:\Users\dongy\AppData\Local\Temp\agc-acl-live-20260830\deny-config-2"
```

验收标准:

1. 选择“否”:进程返回 `exit code 1223`。
2. 重新启动并选择“Yes”:不再返回 `exit code 1`,ACL 修复完成后继续启动。
3. 再次启动同一配置目录:不应重复弹出修复。
4. 检查目录 owner 和 DACL,确认归当前用户所有且为私有权限。

---------

Co-authored-by: 段舒康 <kdletters@qq.com>
Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/211
Co-authored-by: 董羽秦 <suzmii@qq.com>
Co-committed-by: 董羽秦 <suzmii@qq.com>
2026-08-31 14:37:34 +08:00
lhk229 aa0e0ce5fa 批准 GDD 回填做游戏入口 (#210)
Project CI / Repository checks (push) Successful in 2m51s
Project CI / Backend tests (push) Successful in 6m32s
Project CI / Native shell tests (push) Successful in 17m8s
Project CI / Frontend tests (push) Successful in 4m4s
新增批准态 GDD 的做成游戏按钮与 Launcher 回调链

读取 game/fast_gdd.md 并回首页预填做游戏参考附件

补充不触发创建项目和 Runtime 的 appSurface 回归

同步 Fast GDD 技术方案与共享决策记录

Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/210
Co-authored-by: 孔令弘 <ink29535@proton.me>
Co-committed-by: 孔令弘 <ink29535@proton.me>
2026-08-31 14:37:16 +08:00
suzmii 1c2f82e246 优化 Game Agent 资源画布展示与默认缩放 (#208)
Project CI / Backend tests (push) Successful in 9m53s
Project CI / Repository checks (push) Successful in 3m11s
Project CI / Frontend tests (push) Successful in 4m59s
Project CI / Native shell tests (push) Successful in 19m18s
## 变更内容

### 1. 普通资源画布隐藏游戏代码

- 资源画布的大纲、分页和卡片展示不再显示“游戏代码”栏目。
- 保留内部完整的五栏目布局契约,避免已有代码资源坐标被重写。
- 补充回归测试,确认游戏代码不会出现在普通资源画布中,且代码端点不可见时不会渲染对应依赖边。

### 2. 增加资源类型角标

- 资源卡右上角增加类型角标,用于快速识别资源类型。
- 类型从既有资源投影字段推导,覆盖图片、SVG、视频、音频、文档、任务产物、Agent 回执、项目版本等类型,并为未知类型兜底。
- 该能力仅用于前端展示,不新增后端字段或修改资源投影契约。

### 3. 限制默认自动适配缩放

- 画布首次自动适配和显式复位时的默认最大缩放统一限制为 `1.5`,避免内容较少或只有一个资源时卡片被放得过大。
- 该限制对设计文档、美术、音频、游戏代码、项目版本全部资源栏目生效。
- 用户主动缩放仍沿用现有上限,不受默认适配上限影响。
- 用户调整后的画布缩放会按排序模式和栏目保留;切换到其他栏目再返回后,仍恢复用户调整后的 viewport,而不是重新自动放大。

## 兼容性

- 不修改后端 API、SpacetimeDB schema 或 `/api/external/v1`。
- 资源类型角标是展示层推导逻辑,不改变资源数据结构。
- 内部布局仍保留游戏代码栏目契约,已有布局数据不需要迁移。

## 验证

- `resourceCanvasLayoutModel.test.ts`
- `project-development.suite.ts` 相关 App Surface 用例
- `npm run typecheck`
- `npm run check:encoding`
- Prettier 相关文件检查
- `git diff --check`

历史分支检查不替代最新 head CI;PR 更新后将以最新 CI 结果为准。

---------

Co-authored-by: 段舒康 <kdletters@qq.com>
Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/208
Co-authored-by: 董羽秦 <suzmii@qq.com>
Co-committed-by: 董羽秦 <suzmii@qq.com>
2026-08-31 14:36:58 +08:00
kdletters c5200c7d45 补齐共享 UI 组件库与展示页交互 (#202)
Project CI / Backend tests (push) Successful in 8m31s
Project CI / Repository checks (push) Successful in 14m14s
Project CI / Frontend tests (push) Successful in 13m2s
Project CI / Native shell tests (push) Successful in 21m30s
## 变更内容

- 新增基于 shadcn open-code 模式的共享 UI canonical 组件、样式与导出。
- 新增 `/components` 共享组件展示页,并覆盖平台组件、Token、状态和移动端布局。
- 补齐平台展示页的筛选、排序、上传预览、标签、开关和异步状态交互。
- 修复排序导致预览主题变化、筛选弹窗误关闭和入口状态不更新的问题。
- 同步网站与客户端构建别名、依赖、路由测试和项目文档。

## 验证

- `npm run test -- src/components/shared-components/SharedComponentsShowcasePage.test.tsx`
- `npm run typecheck`
- `npm run check:encoding`
- `npm run build:raw`
- `git diff --check`
- pre-push 门禁通过

Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/202
Co-authored-by: kdletters <kdletters@qq.com>
Co-committed-by: kdletters <kdletters@qq.com>
2026-08-31 14:10:44 +08:00
suzmii cc6211fd41 修复 Backend 与 Native shell CI 回归并恢复完整测试门禁 (#209)
Project CI / Repository checks (push) Successful in 7m49s
Project CI / Backend tests (push) Successful in 9m56s
Project CI / Frontend tests (push) Successful in 8m24s
Project CI / Native shell tests (push) Successful in 19m18s
## 背景

这是一个独立的 CI 修复 PR,针对 Backend 与 Native shell 测试失败进行修复,不包含资源画布功能变更。

此前 CI 失败主要集中在:

- 后台精选素材契约测试初始化缺少来源素材字段。
- `spacetime-module` host 测试因缺少 SpacetimeDB WASM 宿主 ABI 符号而无法链接。
- Native shell 自主创作模式、runtime action、provider batch 和测试初始化之间存在状态机断言不一致。
- 部分失败测试曾被临时绕过,本 PR 恢复这些测试门禁。

## 变更内容

### Backend

- 补齐后台精选素材 payload 测试所需的来源素材字段。
- 增加 camelCase 序列化断言,防止 snake_case 字段泄漏。
- 调整 server-rs workspace 测试拆分:
  - 普通 workspace host 测试继续排除 `spacetime-module`,避免其 `spacetime-types` feature 污染其他领域 crate 的 host 链接。
  - 新增独立的 `spacetime-module` 单元测试步骤,不再跳过该模块自身测试。
- 为 host 测试构建提供仅测试期的 SpacetimeDB ABI 链接支持。
- 同步更新 CI workflow 断言、开发流程文档和运维验证文档。

### Native shell

- 恢复被临时跳过的 Native shell 失败测试门禁。
- 修复自主创作模式下的完成条件、runtime action 执行、provider batch 和 finalization 状态流转。
- 修正 Tauri/native 测试初始化、恢复流程及断言,使测试与实际运行时协议保持一致。
- 保持自主创作模式的宽松行为,不通过忽略测试规避失败。

## 验证

当前提交已完成以下本地验证:

- `cargo test --locked -p spacetime-module --no-fail-fast`
  - 259 个测试
  - 258 个通过
  - 0 个失败
  - 1 个已有的外部 fixture 测试 ignored
- `cargo check --locked -p spacetime-module --target wasm32-unknown-unknown`
- `cargo build --locked -p spacetime-module --target wasm32-unknown-unknown`
- `cargo check --locked -p api-server --all-targets`
- `npm run check:server-rs-ddd`
- `npm run check:spacetime-schema`
- `npm run check:encoding`
- `npm run test -- scripts/project-ci-workflow.test.ts`
- `cargo fmt --manifest-path server-rs/Cargo.toml --all -- --check`
- `git diff --check`

没有新增 `#[ignore]` 来规避失败。

## 测试边界说明

`spacetime-module` 的 host ABI 链接支持仅用于执行纯单元测试,不是 SpacetimeDB runtime 替身。Reducer、procedure 和真实数据库事务行为仍需要通过真实 SpacetimeDB runtime/integration harness 验证。

本机 Windows 上完整 workspace 测试中的 `wallet_refund_outbox` 测试仍有 11 项因 `os error 5(拒绝访问)`失败,表现为临时文件权限/锁定问题;该问题与本 PR 的 SpacetimeDB 模块测试改动无关,也没有通过忽略这些测试来掩盖。

Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/209
Co-authored-by: suzmii <suzmii@qq.com>
Co-committed-by: suzmii <suzmii@qq.com>
2026-08-31 10:53:30 +08:00
kdletters d2254d1e8c 抽取多 Agent 编排 crate 并支持运行中自主扩图 (#207)
Project CI / Repository checks (push) Successful in 2m16s
Project CI / Frontend tests (push) Successful in 6m37s
Project CI / Backend tests (push) Failing after 7m45s
Project CI / Native shell tests (push) Failing after 7m6s
## 概要

- 抽取通用 `agent-runtime-orchestration` crate,承接多 Agent DAG 的构图校验、ready/wave、下游闭包和全量/返工选择。
- 保留 `platform-agent` 的游戏领域任务与语义路由,避免把 Runtime、Provider、ToolHost 和持久化职责下沉到公共编排层。
- 增加 `GraphProposal` / `TaskProposal` / `GraphEdge` / `GraphLimits`,允许宿主在执行中安全应用 LLM 提出的新增节点和边。
- 扩图采用候选图原子校验:未知 Agent/端点、重复边、自依赖、环及节点/边/深度/扇出预算都会拒绝,失败时原图保持不变;新增节点默认为 `Pending`。

## 验证

- `npm run agent-runtime-orchestration:check`(15 项通过)
- `cargo test --manifest-path server-rs/crates/platform-agent/Cargo.toml`(19 项通过)
- `npm run agc:skill-pack:check`
- `npm run check:encoding`
- `git diff --check`

前端 typecheck 本轮未执行:当前工作树未安装 `node_modules/tsc`,命令会报 `tsc is not recognized`。

Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/207
2026-08-31 10:51:11 +08:00
kdletters 63abea0b3e 阻止命令输出污染 AGC 文件写入
Project CI / Repository checks (push) Successful in 3m22s
Project CI / Frontend tests (push) Successful in 4m2s
Project CI / Backend tests (push) Failing after 4m21s
Project CI / Native shell tests (push) Failing after 7m10s
明确 agc_write_file 只接受原始 UTF-8 文件正文

拒绝 Exit code、Wall time、Output 包装并补充回归测试
2026-08-29 00:49:53 +08:00
Git Hooks Test 5460c13216 提升 AGC 版本至 0.1.12
Project CI / Backend tests (push) Failing after 5m11s
Project CI / Native shell tests (push) Failing after 6m28s
Project CI / Repository checks (push) Successful in 3m37s
Project CI / Frontend tests (push) Successful in 4m3s
同步 npm、Tauri、Cargo 与锁文件版本

更新 workspace 和 release 版本校验
2026-08-28 21:44:20 +08:00
kdletters 58db9fa637 后台详情弹窗展示原图
Project CI / Frontend tests (push) Successful in 4m30s
Project CI / Repository checks (push) Successful in 5m13s
Project CI / Native shell tests (push) Failing after 7m38s
Project CI / Backend tests (push) Failing after 6m11s
素材查询详情弹窗并列展示原图与当前结果

精选审核详情弹窗保留原有元信息并补充原图

管理快照与后台 DTO 传递源资源媒体字段

限制源资源字段仅在后台审核读取路径回填

更新后台素材预览的架构踩坑说明
2026-08-28 21:36:22 +08:00
Git Hooks Test dcf01f5681 合并远端 0.1.11 基线并保留本地 AGC 全流程改动
Project CI / Repository checks (push) Successful in 3m49s
Project CI / Frontend tests (push) Successful in 4m54s
Project CI / Backend tests (push) Successful in 8m50s
Project CI / Native shell tests (push) Failing after 12m12s
2026-08-28 21:03:15 +08:00
Git Hooks Test 1ba34b8e25 放开 AGC 自主创作流程并补齐全流程执行能力
新增 agc_write_file 直写工具并放宽自主构建执行路径

移除固定任务依赖与确认门槛对并行创作的阻塞

同步 DirectProject、预览、运行状态和 E2E 测试调整
2026-08-28 20:55:23 +08:00
kdletters fc75363da4 提升 AGC 版本至 0.1.11
Project CI / Repository checks (push) Successful in 3m36s
Project CI / Frontend tests (push) Successful in 3m55s
Project CI / Backend tests (push) Successful in 6m10s
Project CI / Native shell tests (push) Successful in 15m10s
同步 npm、Tauri、Cargo 与锁文件版本

更新 workspace 和 release 版本校验
2026-08-28 20:05:54 +08:00
kdletters 116bce6b68 修复客户端预览根入口 404
Project CI / Repository checks (push) Successful in 3m8s
Project CI / Frontend tests (push) Successful in 3m50s
Project CI / Backend tests (push) Successful in 6m47s
Project CI / Native shell tests (push) Successful in 14m54s
允许项目根布局的 index.html 和网页资源通过预览服务访问

保留 game/ 与 assets/ 旧布局路径支持

增加根入口、资源和控制目录隔离回归测试
2026-08-28 19:22:35 +08:00
kdletters e52f43485a 修复客户端预览根入口 404
允许项目根布局的 index.html 和网页资源通过预览服务访问

保留 game/ 与 assets/ 旧布局路径支持

增加根入口、资源和控制目录隔离回归测试
2026-08-28 19:17:50 +08:00
lhk229 e31d8a2a5b 修复链路上存在的若干阻塞性漏洞 (#199)
Project CI / Backend tests (push) Successful in 6m48s
Project CI / Repository checks (push) Successful in 4m0s
Project CI / Frontend tests (push) Successful in 4m34s
Project CI / Native shell tests (push) Successful in 16m12s
Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/199
Co-authored-by: Linghong <ink29535@proton.me>
Co-committed-by: Linghong <ink29535@proton.me>
2026-08-28 17:09:02 +08:00
suzmii 7d4c47ec0c 修复 API Key app-server 认证重试循环 (#205)
Project CI / Repository checks (push) Successful in 3m15s
Project CI / Frontend tests (push) Successful in 3m50s
Project CI / Backend tests (push) Successful in 7m49s
Project CI / Native shell tests (push) Successful in 15m43s
## 修复摘要

Close #187

Issue #187 的根因是:API Key/provider-proxy 模式使用隔离 `CODEX_HOME`,其中没有 ChatGPT `auth.json`;Codex app-server 默认启动 remote-control 后,会在 `desired_state=Unknown` 时每约 1 秒重试认证,形成持续的认证日志循环。

本 PR 的最终修复是启动级禁用,而不是单纯屏蔽日志:

- API Key 和 provider-proxy 会话在启动 Codex app-server 子进程前设置 `CODEX_INTERNAL_APP_SERVER_REMOTE_CONTROL_DISABLED=1`,使 remote-control 从启动时即处于 `desired_state=Disabled`。
- 删除此前握手后调用 `remoteControl/disable` 的方案;真实 smoke 证明该 RPC 在无 ChatGPT 登录态时本身会返回 `remote control requires ChatGPT authentication`,无法阻止认证循环。
- 真实 AuthBridge 登录态不设置该变量,保持原有 remote-control 行为。
- API Key 子进程额外设置 `RUST_LOG=warn`,仅收敛剩余预期噪音,不承担修复职责。
- 更新 Unix fake app-server fixture、JSON-RPC 响应 ID 序列和凭据边界回归测试。
- 同步更新技术方案,明确启动环境变量、认证边界和验证结论。

## 真实 smoke

使用临时 API Key、隔离 `CODEX_HOME` 和 Codex `0.150.0-alpha.8`:

- 未设置启动变量时:出现 `remote control requires ChatGPT authentication`,并持续输出 `Reloading auth` / `Reloaded auth`。
- 设置 `CODEX_INTERNAL_APP_SERVER_REMOTE_CONTROL_DISABLED=1` 后:状态为 `desired_state=Disabled`,5 秒观察窗口内不再出现认证重试循环,仅剩少量启动/退出生命周期日志。
- `--disable remote_control` 与 `-c features.remote_control=false` 未达到同等效果。

## 验证

- `cargo test --bin genarrative-ai-game-creator-shell codex_app_server`:36 passed,1 ignored,0 failed
- `cargo check --bin genarrative-ai-game-creator-shell`:通过
- `rustfmt --edition 2021 --check src/agent/codex_app_server.rs`:通过
- `npm run ai-game-creator-shell:typecheck`:通过
- `npm run check:encoding`:通过
- `git diff --check`:通过

Windows 本机不会执行 Unix-only fake app-server 分支;相关 fixture 已更新,交由 Linux CI 覆盖。真实 smoke 只验证启动与认证循环,没有执行模型请求。

安全说明:临时 API Key 仅用于本次隔离 smoke,未写入仓库、提交或 PR;测试完成后应立即撤销/轮换该 Key。

---------

Co-authored-by: 段舒康 <kdletters@qq.com>
Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/205
Co-authored-by: 董羽秦 <suzmii@qq.com>
Co-committed-by: 董羽秦 <suzmii@qq.com>
2026-08-28 15:06:10 +08:00
kdletters 19a32f537b 补齐 AI 任务与历史清理的内存边界 (#206)
Project CI / Frontend tests (push) Successful in 19m8s
Project CI / Backend tests (push) Successful in 27m3s
Project CI / Repository checks (push) Successful in 15m42s
Project CI / Native shell tests (push) Successful in 29m15s
基于当前 master(含 #204)移植未进入 #203 的内存边界修复。

- 补齐外部生成历史清理 procedure 的 SATS tuple 解析与回归测试
- 限制 AI 流式文本每阶段 chunk 数量并分批释放明细
- 修正进程内失败收口的容量检查顺序
- 分批删除外部生成审计事件并同步更新契约文档

验证:
- cargo test -p module-ai -p spacetime-module
- cargo check -p api-server
- npm run test -- scripts/spacetime-migration-common.test.ts
- npm run check:spacetime-schema
- npm run check:production-ops
- npm run check:encoding
- git diff --check

Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/206
Co-authored-by: kdletters <kdletters@qq.com>
Co-committed-by: kdletters <kdletters@qq.com>
2026-08-27 22:18:16 +08:00
kdletters 458371a73d 将退款 outbox 主路径迁入 SpacetimeDB (#204)
Project CI / Repository checks (push) Successful in 4m11s
Project CI / Frontend tests (push) Successful in 8m38s
Project CI / Backend tests (push) Successful in 10m42s
Project CI / Native shell tests (push) Successful in 32m11s
## 变更内容

- 新增 `profile_wallet_refund_outbox` 表与 enqueue/process procedure,退款主路径进入 SpacetimeDB。
- 外部生成失败事务、inline 资产失败和跨节点 worker 统一使用库内 outbox,按 ledger 幂等并在事务内完成退款与删除。
- SpacetimeDB 完全不可达时才写本机 emergency spool,恢复时重新入库;兼容旧 spool 文件并保留 attempt 追踪。
- 更新 SpacetimeDB migration、生成 bindings、架构文档、运维恢复说明和项目决策记录。

## 验证

- `cargo check -p spacetime-module -p spacetime-client -p api-server --manifest-path server-rs/Cargo.toml`
- api-server / spacetime-client / spacetime-module / module-runtime 定向测试
- `npm run check:spacetime-schema`
- `npm run check:spacetime-runtime-access`
- `npm run check:server-rs-ddd`
- `npm run check:encoding`
- `git diff --check`

Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/204
Co-authored-by: kdletters <kdletters@qq.com>
Co-committed-by: kdletters <kdletters@qq.com>
2026-08-27 22:04:50 +08:00
kdletters a7337c67a1 修复生产发布内存持续增长 (#203)
Project CI / Backend tests (push) Successful in 10m5s
Project CI / Native shell tests (push) Successful in 15m8s
Project CI / Repository checks (push) Successful in 3m24s
Project CI / Frontend tests (push) Successful in 4m40s
修复 release 内存持续增长问题。

本次范围:
- 收口备份扫描与历史维护的内存峰值。
- 限制外部生成 worker 脱管任务的实际并发。
- 为 API 内存态和历史数据增加有界留存。

验收:
- 定向测试、cargo 检查和生产运维门禁通过。
- 备份不再触发全局 OOM。
- worker/API/SpacetimeDB 内存曲线在空闲期停止单调增长。

Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/203
Co-authored-by: kdletters <kdletters@qq.com>
Co-committed-by: kdletters <kdletters@qq.com>
2026-08-27 21:46:56 +08:00
suzmii 94521af890 升级 SpacetimeDB 工具链到 2.8.3 (#200)
Project CI / Repository checks (push) Successful in 2m52s
Project CI / Frontend tests (push) Successful in 10m40s
Project CI / Backend tests (push) Successful in 6m26s
Project CI / Native shell tests (push) Successful in 18m17s
将 spacetimedb、SDK、lib 精确升级到 2.8.3 并更新 Cargo.lock。

用 2.8.3 CLI 重新生成 spacetime-client Rust bindings。

同步本地 dev、生产 provision、容器镜像和事务 smoke 的版本与 commit 门禁。

更新后端契约、开发运维、项目记忆和 SpacetimeDB skills 的 2.8.3 口径。

---------

Co-authored-by: 段舒康 <kdletters@qq.com>
Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/200
Co-authored-by: suzmii <suzmii@qq.com>
Co-committed-by: suzmii <suzmii@qq.com>
2026-08-27 17:10:17 +08:00
suzmii d24321d657 修复第三方 Provider 流式工具计划请求 (#201)
Project CI / Frontend tests (push) Successful in 4m12s
Project CI / Repository checks (push) Successful in 4m19s
Project CI / Native shell tests (push) Successful in 16m14s
Project CI / Backend tests (push) Successful in 16m25s
## 变更摘要

- 当 Provider 配置 `llm.stream=true` 时,Provider tool-plan 请求改为使用 `stream_run`,由后端聚合完整响应;关闭流式时继续使用 `run`。
- 补充 Anthropic 原生 SSE 工具调用、原生最终回复和 OpenAI 响应流测试夹具。
- 新增流式原生函数工具计划回归测试,覆盖请求 `stream=true`、工具调用聚合、respond_to_user 收束和最终回复请求。
- 修复共享 Provider 测试夹具对 `stream=true` 的 Responses / Chat Completions 请求返回正确 SSE,避免时序测试误报 Timeout。
- 修正自主构建截断 scaffold 修复分支的错误前缀匹配,并补齐最终回复失败审计夹具的流式 planning 响应。
- 同步第三方 Provider 兼容性技术说明,记录缺陷 5 已修复。

## 验证

已通过:
- 5 个 Provider handoff/retry/restart 回归用例(逐项运行)
- `autonomous_game_build_repairs_truncated_scaffold_into_bounded_patch`
- `background_agent_runtime_asset_generation_respects_project_policy`
- `background_final_reply_failure_keeps_private_conversation_and_hashes_public_audits`
- `npm run ai-game-creator-shell:typecheck`
- `npm run check:encoding`
- `git diff --check`

说明:Provider handoff 重启用例在并发启动时曾出现一次时序失败,单独串行复跑通过;当前提交已通过 pre-push 检查。`cargo fmt --check` 仍会报告基线其他文件已有格式差异,本 PR 未改动这些无关文件。

Close #186

---------

Co-authored-by: 段舒康 <kdletters@qq.com>
Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/201
Reviewed-by: 段舒康 <kdletters@qq.com>
Co-authored-by: suzmii <suzmii@qq.com>
Co-committed-by: suzmii <suzmii@qq.com>
2026-08-27 17:08:47 +08:00
kdletters 5942ff25e7 修复生产角色动作抽帧临时目录
Project CI / Repository checks (push) Successful in 3m40s
Project CI / Frontend tests (push) Successful in 4m44s
Project CI / Backend tests (push) Successful in 5m54s
Project CI / Native shell tests (push) Failing after 9m50s
Project CI / Repository checks (pull_request) Successful in 2m42s
Project CI / Frontend tests (pull_request) Successful in 3m54s
Project CI / Native shell tests (pull_request) Failing after 10m46s
Project CI / Backend tests (pull_request) Successful in 5m24s
生产动作抽帧改用服务目录,绕开失效的 PrivateTmp 挂载

补充生产运维文档中的临时目录约定
2026-08-27 15:08:19 +08:00
kdletters 9476ff7648 迁移仓库工具资源到 Codex 并固化执行边界
Project CI / Frontend tests (push) Successful in 4m5s
Project CI / Repository checks (push) Successful in 4m23s
Project CI / Backend tests (push) Successful in 5m1s
Project CI / Native shell tests (push) Failing after 10m54s
将 .hermes 工具资源迁移至 .codex

同步代码、文档与 RAG 路径引用

补充任务范围、验收与时间盒执行规则
2026-08-27 13:55:25 +08:00
kdletters b07fccb9ae 收敛 SpacetimeDB 项目指导 skill
新增 Genarrative 单一 SpacetimeDB 项目适配 skill

删除重复的 CLI、Rust、Concepts 项目 skill

更新 AGENTS 与协作工作流入口

同步项目决策记录和官方插件路由
2026-08-27 13:55:25 +08:00
kdletters f1605de4d4 补齐 DirectProject 项目根工作区的 MCP 桥与试玩提示词
Project CI / Repository checks (push) Successful in 3m32s
Project CI / Backend tests (push) Successful in 5m32s
Project CI / Frontend tests (push) Successful in 6m7s
Project CI / Native shell tests (push) Failing after 12m24s
agc_tools MCP 工作目录校验改为直接把当前目录作为项目根解析,不再假设 game/ 子目录或反推 parent。

直连浏览器证据提示词同步为项目根 cwd,并更新对应断言与测试。
2026-08-27 10:14:53 +08:00
kdletters 6d36d625ad DirectProject 工作区改为项目根并站内化编辑器资源生成
Project CI / Repository checks (push) Successful in 10m0s
Project CI / Frontend tests (push) Successful in 10m20s
Project CI / Native shell tests (push) Failing after 13m58s
Project CI / Backend tests (push) Successful in 14m9s
DirectProject 的 Codex cwd、sandbox writable root 与文件变更批准根统一为用户选择的整个项目根,不再强制 game/ 子目录;assets/、game/ 与项目文件均可写,.agent/、.git/、密钥和 Runtime 控制面仍由项目文件层拒绝。

更新 direct 运行时提示词与内置 agc-project-structure Skill,明确项目根即工作区,路径相对项目根,game/ 仅兼容旧结构,并同步 Skill 清单指纹到 2026-08-26.4。

预览与自主构建入口支持项目根 index.html 与旧 game/index.html 双布局,入口解析、静态 smoke、试玩回执与完成门全部自适应。

客户端资源编辑(音频、视频、图片、角色动画)端点统一改为站内 /api/editor/... 路由并复用平台登录态,不再走 External v1;历史 external 账本仍可兼容重放,外部开发者模式保留 External v1。

同步 AGC 实施计划中项目根工作区与站内 API 口径。
2026-08-27 00:40:44 +08:00
kdletters 30e6c309ae 修复自绘标题栏让位后底部内容超出可视框
Project CI / Backend tests (push) Successful in 13m29s
Project CI / Repository checks (push) Successful in 14m56s
Project CI / Frontend tests (push) Successful in 21m28s
Project CI / Native shell tests (push) Successful in 14m6s
window-chrome 下 launcher-main 移除旧版悬浮账户条的 42px padding-bottom,页面容器填满内容区。

首页根容器统一按 platform-theme 覆盖高度与内部滚动,覆盖 h-screen 与 h-[calc] 变体,避免高度基于视口导致底部溢出。

固定弹层样式静态守门补充 launcher-main 与首页容器断言。
2026-08-27 00:12:57 +08:00
kdletters 7c11235612 网页内标题栏下统一预留内容与弹层空间
Project CI / Repository checks (push) Successful in 3m25s
Project CI / Frontend tests (push) Successful in 5m57s
Project CI / Backend tests (push) Successful in 14m45s
Project CI / Native shell tests (push) Successful in 22m42s
自绘标题栏改为悬浮覆盖,内容容器用 padding-top 预留标题栏高度,页面内容始终从标题栏下方开始。

全屏固定弹层(设置、通知、审批、GDD 审批及 portal 到 body 的通用弹层)统一从标题栏下方开始,避免与自绘标题栏重叠。

标题栏高度提升到 :root CSS 变量,portal 弹层与页面共用同一偏移,移动端同步缩为 46px。

恢复设置保存提示的右上角定位,由遮罩整体下移承载,并新增固定弹层样式静态守门测试。
2026-08-26 23:59:06 +08:00
kdletters 0f35dc33af Windows release 安装包只生成 NSIS
Project CI / Repository checks (push) Successful in 16m40s
Project CI / Frontend tests (push) Successful in 17m31s
Project CI / Native shell tests (push) Successful in 22m11s
Project CI / Backend tests (push) Successful in 26m46s
tauri.windows.conf.json 固定 bundle.targets 为 nsis,不再生成 MSI 安装包。

同步 AGC 实施计划中 Windows x64 release 打包口径。
2026-08-26 23:30:55 +08:00
kdletters d75547b36d 自动化 Skill 指纹同步并发布 AGC 0.1.10
新增 skill-pack-manifest 脚本统一计算并校验内置 AGC Skill 内容摘要,--write 模式自动递增清单版本并同步 SHA-256。

新增 check-skill-pack 只读门禁与 Node 回归测试,无参数默认只读,只有单个 --write 才进入写入模式。

AGC typecheck 与 release build 接入 Skill 清单指纹校验,内容漂移时直接列出 Skill 与实际摘要阻断构建。

修正 agc-client-projection 清单指纹并升级 Skill pack 版本到 2026-08-26.3。

升级 AGC 标准版到 0.1.10,同步 package、Cargo、Tauri 与 npm 工作区锁文件。

首页空输入占位符锚定到编辑区,避免整页滚动后占位文本脱离输入框。

更新 AGC 实施计划中 Skill 指纹同步与只读门禁说明。
2026-08-26 23:23:24 +08:00
kdletters 92165a36ae 发布 AGC 标准版 0.1.9
Project CI / Frontend tests (push) Successful in 3m57s
Project CI / Repository checks (push) Successful in 4m8s
Project CI / Native shell tests (push) Failing after 10m0s
Project CI / Backend tests (push) Successful in 4m55s
同步 AI 游戏创作器的 package、Cargo、Tauri 与锁文件版本。

更新版本一致性脚本及其测试夹具。
2026-08-26 21:39:52 +08:00
kdletters 170b988fcd Merge remote-tracking branch 'origin/master' 2026-08-26 21:34:40 +08:00
kdletters e5424cbf7b 完善陶泥儿桌面窗口外壳与素材导入
新增自绘标题栏、窗口控制和项目标题同步

将泥点账户入口接入标题栏并调整面板描边

收紧本地图片导入类型约束并同步契约文档

补充窗口外壳与泥点面板测试
2026-08-26 21:34:04 +08:00
kdletters 16a5d28ed3 修复 release 默认网页右键菜单
release 客户端关闭 WebView 默认上下文菜单

保留 contextmenu 事件供业务组件处理

补充 release/debug 行为测试与技术方案约定
2026-08-26 21:19:39 +08:00
644 changed files with 110734 additions and 7044 deletions
+16
View File
@@ -0,0 +1,16 @@
# Genarrative Codex 项目工具
`.codex/` 是仓库级 Codex 工具目录,保存项目共享的 skills、插件资源、hooks 和相关配置模板。它只描述如何协作和加载工具,不承载项目业务知识。
## 目录约定
- `.codex/skills/` 是项目专属 skill 根目录。每个 skill 以目录中的 `SKILL.md` 为入口,配套的参考资料和脚本放在同一目录下。
- `.codex/plugins/` 保存随仓库分发的项目插件资源及其参考资料。当前的 `game-studio` 插件提供浏览器游戏设计、原型、2D/3D 技术栈、素材管线和 playtest 工作流;是否启用遵循当前 Codex 的插件加载机制,不依赖旧工具的环境变量或个人配置脚本。
- `.codex/hooks/``.codex/environments/` 等目录保存项目工具链所需的 hooks 和环境模板;它们不替代项目代码中的运行时配置。
- 长期有效的产品、架构、接口、排障和协作知识统一放在 `docs/``docs/project-memory/`,不复制到本目录。
## 使用边界
进入仓库后先读根目录 `AGENTS.md`,再按任务路由读取对应 skill。SpacetimeDB 的通用概念、Rust 服务端、CLI、TypeScript 客户端和 MCP 用法由已安装的官方插件提供;项目约束和入口由 `.codex/skills/genarrative-spacetimedb/SKILL.md` 统一编排。
个人 `~/.codex` 配置、凭据、会话、环境变量和本地路径不得复制到仓库。若本目录内容与当前代码或最新 `docs/` 冲突,以代码和最新文档为准,并修正过期工具说明。
@@ -1,8 +1,8 @@
"""Hermes wrapper for the OpenAI Codex Game Studio plugin.
"""Metadata bridge for the bundled Codex Game Studio project plugin.
This plugin was imported from a Codex curated plugin cache. It exposes the
plugin's bundled SKILL.md files as Hermes plugin skills using qualified names
like `game-studio:phaser-2d-game`.
The manifest and bundled ``SKILL.md`` files are the source of truth. This
module only exposes their descriptions to a compatible plugin host and keeps
the project resource bundle free of runtime-specific behavior.
"""
from __future__ import annotations

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 8.7 KiB

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Some files were not shown because too many files have changed in this diff Show More