merge: integrate remote main
This commit is contained in:
@@ -10,16 +10,17 @@
|
||||
| `electron/coding-runtime/pi/model-tools/**` and `shared/model-tools.ts` | Closed selected-model tool registry and provider-specific Web Search request shaping | The frozen selected model capability controls whether `makelore_web_search` exists. The tool uses that model/provider/credential and normal model billing; no Hosted Plugin adapter, Admission, Plugin Charge, or browser fallback exists. |
|
||||
| `electron/coding-packages/**`, `electron/api/routes/device-packages.ts`, `shared/device-packages.ts`, and `src/stores/device-packages.ts` | Main-owned conversation install preview/confirmation/commit, immutable local package generations, safe Renderer projection, and parent-worker refresh | Sources are npm, Git, absolute local Plugin directories, or loose `SKILL.md`. Lifecycle scripts are disabled; executable extensions and non-empty Skill `scripts/` run with desktop-user authority after disclosure and explicit confirmation. Every generation projects all explicitly installed and currently enabled Skills/extensions; Device Packages never join Account Library, Marketplace Package Store, Release, Channel, or Admission state. |
|
||||
| `electron/coding-plugins/adapters/game-resource.ts`, `electron/services/game-resource-client.ts`, and `electron/services/game-resource-delivery.ts` | Provider-neutral `makelore.game-resource` adapter, Main-owned Works Square transport, and durable local delivery coordinator | An eligible frozen parent submits one confirmed generation. Main polls internally, persists delivery state under userData, downloads every terminal output, and writes it to the frozen original project. A delivery retry resumes download/save only; Renderer/Pi never receive Provider URLs, credentials, balances, raw responses, Provider job IDs, or filesystem authority. |
|
||||
| `electron/api/routes/plugin-marketplace.ts`, `src/stores/{plugin-marketplace,device-packages,coding-plugins}.ts`, and `src/pages/Plugins/` | Existing Main/store authorities plus the pure unified Renderer projection for official catalog, Account Library, official package-device state, local Device Packages, retained IDs, and current-project actions | `/plugins` is the sole canonical surface; legacy Plugin routes only replace-redirect into deterministic filters. `official:`, `local:`, and `retained:` identities stay separate, source failures are isolated, and no Account token, filesystem path, Admission, package bytes, signed URL, or visible install-source picker enters Renderer. |
|
||||
| `electron/api/routes/plugin-marketplace.ts`, `src/stores/{plugin-marketplace,device-packages,coding-plugins}.ts`, `src/pages/Plugins/`, and `src/pages/ProjectConfiguration/index.tsx` | Existing Main/store authorities plus the unified Renderer projection embedded in Project Configuration | `/project-config/plugins` is the canonical same-page sheet state. `/plugins` and legacy Plugin routes only replace-redirect while preserving deterministic filters. `official:`, `local:`, and `retained:` identities stay separate, source failures are isolated, and no Account token, filesystem path, Admission, package bytes, signed URL, or visible install-source picker enters Renderer. |
|
||||
| `src/components/works/ProjectPublishAction.tsx` | 可发布项目的一键提交、云构建轮询与用户可理解状态 | 只通过 Renderer API 提交非敏感元数据;绑定告警不终止轮询 |
|
||||
| `shared/project-config.ts` and `electron/coding-projects/project-config.ts` | 规范 `ProjectType` 归一与最小项目创建 | 新写入只使用 `interactive_ai_app` / `custom`;历史 `mini_game` / `mini_program` 只读归一,项目创建只生成 metadata 与 `knowledge/` |
|
||||
| `shared/project-config.ts`, `electron/coding-projects/{project-config,project-service}.ts`, and `src/components/layout/Sidebar.tsx` | 规范 `ProjectType`、Main-owned UUID 与目录式最小项目创建 | 普通新建只要求目录,内部默认 `interactive_ai_app`,Main 自动生成 UUID;有效旧配置仅缺 `projectId` 时串行修复。既有 `custom` 和历史类型仍兼容,`initialized` 不再是导航 gate |
|
||||
| `resources/coding-plugins/project-scaffold/` and `tests/project-scaffold/` | 官方 bundled Scaffold Plugin、固定六文件模板、确定性 Node 脚本、发布要求参考与回归测试 | 通过既有 Pi `bash` write lease 和 `MAKELORE_NODE_EXECUTABLE` 显式运行;脚本信任来自固定客户端资源,而非下载 artifact;不覆盖、不安装依赖、不联网,也不复制 build/upload/review 实现 |
|
||||
| `src/lib/works-square.ts` | Renderer 侧 Works Square Host API 契约与安全错误映射 | 不接触 Token、ZIP、本地绝对路径或自动部署状态 |
|
||||
| `electron/api/routes/works.ts`, `src/lib/works-square-token-points.ts`, and `src/components/layout/Sidebar.tsx` | Token Points V2 的 Main-owned 上游代理、安全 DTO 投影、格式化与账号菜单状态 | 管理者可见规范字符串点数与周期;非管理者只见粗粒度可用性。旧 rolling-window usage contract 和 Renderer stale event 已删除。 |
|
||||
| `electron/api/routes/works.ts` | Works Host API、Renderer capability 门禁、上游安全投影 | 发布凭据、打包、上传与本地绑定均在 Main 内完成 |
|
||||
| `electron/services/project-release-builder.ts` | Main-owned 安全快照、本地 npm/Vite 构建、source+built 双归档与 v1 contract | 固定 npm 11.6.2;项目 Vite 由 lockfile 决定;Vite config/plugins 以桌面用户权限执行 |
|
||||
| `electron/services/publish-runtime.ts` | 安装包内 npm 闭包定位与 Electron Node 执行 | 不回退全局 npm/PATH;缺失或版本不符 fail closed |
|
||||
| `electron/services/static-release-server.ts` | 用内存 built snapshot 建立一次性 loopback origin | 预检和最终上传归档必须来自相同文件字节;总是清理临时服务 |
|
||||
| `electron/agent-browser/module.ts` | built artifact 的桌面/移动临时 WebContents/CDP 预检 | UX fail-fast;不生成可信 receipt、不得升级为平台证明 |
|
||||
| `electron/agent-browser/module.ts`, `electron/api/routes/agent-browser.ts`, `src/lib/agent-browser.ts`, and `src/pages/Chat/AgentBrowserPanel.tsx` | 项目级共享开发浏览器、可见 viewport 协调、Console/Network 诊断与 built artifact 临时预检 | 用户和 parent Agent 共享同一 sandboxed 页面;Main 校验当前项目、generation、bounds 与 CDP method。诊断按 owner 引用计数,关闭/切换/隐藏/休眠会释放 view 与 debugger;发布预检仍只是 UX fail-fast,不生成可信 receipt。 |
|
||||
| `electron/agent-browser/electron-adapter.ts` | Electron WebContents/CDP 设备指标、事件与临时 partition 适配 | probe 不挂载 UI,并在结束后销毁视图、清理隔离存储 |
|
||||
| `electron/services/project-packager.ts` | 受控项目扫描、静态 ZIP 生成和敏感/历史控制文件排除 | 只允许可发布 `ProjectType`,不提供 Compose 或手工 ZIP 路径 |
|
||||
| `electron/services/works-submission-binding.ts` | submission binding v2 持久化与旧 schema 迁移 | 旧中间态终止为 `legacy_retired`;文件名暂作安装兼容 |
|
||||
@@ -39,14 +40,10 @@
|
||||
| `electron/api/routes/image-workspace.ts` | AI 绘画 Host API 与本地事件流投影 | Renderer 只通过该路由访问 Main-owned workspace adapter |
|
||||
| `electron/image-workspace/works-square-workspace.ts` | Works Square V2 adapter、stable command/operation IDs 与 Direction event mapping | unknown transport result 保留精确命令;Main 持有 token、ticket、WebSocket、retry classification、safe errors,并把闭集 progress stage 归一为固定 youth-safe copy |
|
||||
| `src/stores/image-workspace.ts` | Current Workspace/Direction/Living Form、local drafts、pending operations、operation activity 与 Workspace resources | revision conflict 刷新 canonical state;activity/delta/terminal event 按 Workspace、Direction 和 operation identity 收敛;event order/Task progress 不成为 Specification authority |
|
||||
| `src/pages/ImageCanvas/{index,DesignConversationPane,DesignFormPane,DesignProductionPanel}.tsx` | 持久双栏 Canvas、conversation、operation-scoped AI activity、Living Form、immutable Quote confirmation、Tasks 与 Assets | chat/direct edits/decisions/locks/bindings 使用同一 V2 reducer;固定活动附着于对应 user bubble 且不成为对话或右侧摘要;确认只提交 Quote ID |
|
||||
| `src/components/layout/ImageWorkspaceSidebar.tsx` | Workspace 选择、创建与 Prompt Museum 入口 | 不再创建或选择嵌套 Conversation |
|
||||
| `shared/image-prompt-museum.ts` | Prompt Museum 列表、分类、详情、署名与分页共享 DTO | 客户端不包含内容数据集,只定义服务端字段契约 |
|
||||
| `electron/api/routes/image-prompt-museum.ts` | Main-owned Museum 列表/详情代理与 Works 登录态 | 仅 GET 固定路径和白名单查询;Renderer 不获得 Bearer Token |
|
||||
| `src/pages/ImagePromptMuseum/index.tsx` / `src/lib/image-prompt-museum.ts` / `src/stores/image-prompt-museum.ts` | Museum 搜索/筛选/详情与一次性 Prompt 回填 | 原 Prompt 只带回 Canvas 输入框,不自动发送;页面不接受投稿或互动 |
|
||||
| `shared/learning.ts` / `src/lib/learning.ts` | Learning 项目列表、详情、媒体和下载结果的共享 DTO/Renderer facade | 项目 API 访问走固定 Host API;Renderer 不持有 Token、任意归档 URL 或本地路径,README 仅接受无凭据 HTTPS 图片 URL |
|
||||
| `electron/api/routes/learning.ts` / `electron/services/learning-project-download.ts` | Main-owned Learning 项目代理、封面/历史媒体读取和原生 ZIP 保存 | 固定 Works 路径、严格 DTO 与媒体 MIME/大小边界、最多五跳同源重定向、SHA-256/ZIP 签名校验和原子重命名;归档不做大小校验 |
|
||||
| `src/pages/Learning/` / `src/components/layout/LearningSidebar.tsx` | 分页项目卡片、README 详情和下载入口 | 保留登录与 `module_access.learning`;README 禁用原始 HTML,仅图片节点直连无凭据 HTTPS URL,旧生成/播放器入口不存在 |
|
||||
| `src/pages/ImageCanvas/{index,DesignConversationPane,DesignProductionPanel,DesignPlanHistory,DesignWorksRail,YouthCreationCard}.tsx` | 中央 conversation/active 制作方案、operation-scoped AI activity、右侧 Works rail、immutable Quote confirmation、历史 Tasks 与 Assets | active 方案留在时间线;已提交状态折叠为历史。固定活动附着于对应 user bubble 且不成为对话、制作方案或模型思考过程;最终 Prompt、reference binding 与直接参数编辑继续通过同一 V2 reducer,确认只提交 Quote ID |
|
||||
| `src/pages/ImageCanvas/reference-tokens.ts` and `src/pages/ImageCanvas/youth-form-projection.ts` | `@图片N` alias、缺失 binding 检测与青少年可读方案投影 | Prompt 是 reference 用途的唯一可见表达;binding row 只管理真实 Asset/token identity。缺失 token 对应图片时提供定点上传并阻止 Quote,新增/删除/替换保持稳定 reference ID 与连续 alias |
|
||||
| `src/pages/ImageCanvas/DesignWorksRail.tsx` | 全高右侧 Workspace 选择、创建和删除 | 桌面为 320–340 px 右 rail,紧凑布局复用右侧 Sheet;无“获取灵感”入口,不创建嵌套 Conversation |
|
||||
| `shared/image-prompt-museum.ts` and `electron/api/routes/image-prompt-museum.ts` | Dormant Museum DTO 与 Main-owned 列表/详情/auth/media 安全边界 | 当前 App 不挂载 Museum Renderer 页面;历史路由回到 Canvas。仅保留固定 GET/媒体校验兼容,不代表可见模块 |
|
||||
| `src/pages/AiHardware/index.tsx` | Robot 管理、现有六位 Binding,以及已实现的 default-on 引导式热点配网状态机 | 只编排非敏感步骤;不接收 Wi-Fi 密码,不把 `bound` 展示为在线证明 |
|
||||
| `src/lib/ai-hardware.ts` | Renderer 侧 Robot Host API 类型、安全错误映射和稳定 Binding/hotspot facade | 读取 Main-owned capability,调用固定 portal-open,并只传递短效 hotspot candidate ID;不添加任意 URL、SSID 或 Renderer IPC |
|
||||
| `electron/api/routes/ai-hardware.ts` | Main-owned Robot 云端代理,以及本地 capability/portal/hotspot actions | 默认开启、精确环境值 `0` 回滚;所有本地操作必须在 Works token/上游访问前返回,且只投影稳定安全错误 |
|
||||
@@ -58,14 +55,13 @@
|
||||
## Dependency Direction
|
||||
|
||||
- Renderer UI → Renderer API contract → Main Host routes → Main services → Works Square;Renderer 不反向读取 Main 凭据、文件系统或归档。
|
||||
- Plugin sidebar/legacy links → canonical `/plugins` projection → existing Renderer stores → bounded Main Marketplace and Device Package routes. Compatibility routes replace-redirect into deterministic filters and do not create a second lifecycle.
|
||||
- Project Configuration `插件` card → canonical `/project-config/plugins` same-page sheet → unified Renderer stores → bounded Main Marketplace and Device Package routes. `/plugins` and legacy URLs replace-redirect into deterministic filters and do not create a second lifecycle.
|
||||
- Hosted Game Resource parent tool → frozen Registry adapter → Main delivery coordinator → `GameResourceClient` → fixed Works Square game-resource routes → durable local receipt → frozen project output directory. Stable logical operation identity survives response loss and Main restart; ambiguous submission remains reviewable and is never converted into an automatic fresh mutation. Main polls internally and acquires the shared project write lease only while materializing terminal outputs; resuming delivery never submits or charges again.
|
||||
- AI 编程 Renderer product Snapshot/commands → typed `/api/coding/*` Host API → Main Coding composition → target `CodingConversationRuntime` → shared Agent Server 内的目标 Pi 逻辑线程;Pi Provider 请求再经 Main AI proxy 访问模型上游。Renderer 不持有 Pi wire、凭据或本地 runtime URL。
|
||||
- Project configuration 只决定产品身份与分流;用户显式调用 Scaffold Skill 才生成固定起步文件;Main release builder 生成 source/built/contract,服务端独立重算和校验决定发布安全。本地 `ProjectType` 或 Skill 准备度结论都不是授权结论。
|
||||
- 普通项目创建只收集目录并使用内部 `interactive_ai_app` 默认与 Main-owned UUID;既有 Project Configuration 继续管理 Agent/Skill/知识/插件。用户可选地显式调用 Scaffold Skill 生成固定起步文件;Main release builder 生成 source/built/contract,服务端独立重算和校验决定发布安全。本地 `ProjectType` 或 Skill 准备度结论都不是授权结论。
|
||||
- Built artifact preflight 检查最终上传的同字节快照,但客户端可被绕过且不产生可信 receipt;服务端仍是合同、摘要和不可变 Release 安全权威。
|
||||
- Robot Renderer → typed AI hardware API → Main Host route → Robot Hotspot Module → Windows/macOS Adapter。云端 Binding 仍由 Main 代理;热点选择/连接移入页面,但家庭 Wi-Fi 凭据输入仍只留在固件 Portal,系统 Wi-Fi 保留为兜底。
|
||||
- Prompt Museum Renderer → typed Host API facade → Main fixed list/detail route → Works Square。Museum 只把用户明确选择的 Prompt 原文暂存到进程内 Store 并导航回当前 Canvas;不会直接触发 Agent 命令或生成任务。
|
||||
- Learning Renderer → typed Host API → Main fixed project routes → Works Square list/detail/media/archive。Main 代理受控图片并持有原生保存与归档校验;Renderer 只获得安全 DTO、图片数据和保存结果。
|
||||
- 历史 `/image-prompts` → App replace-redirect → `/image-canvas`。Museum Main API/DTO 保持 dormant;当前 Renderer 没有可达的 Museum 数据流或 pending-Prompt 导航。
|
||||
|
||||
## Risky Or Sensitive Areas
|
||||
|
||||
@@ -84,8 +80,7 @@
|
||||
- `electron/main/updater.ts` 的稳定源错误归一化必须保持窄化:只识别 Works Square 对应 manifest 的 404,不得吞掉其他 feed/网络/签名错误;Renderer 的脱敏边界不能取代 Main 原始日志。
|
||||
- Design V2 事件处理必须区分 Direction projection 与 Workspace Task/Asset projection;不得用 transport sequence 或 Task progress 推进 Specification revision。
|
||||
- 输入、Quote request、confirmation 和项目切换跨 Renderer/Main/Works Square。异步结果必须核对 Workspace、Direction、revision 与 operation identity;unknown write 复用原 identity,不能生成新业务意图。
|
||||
- Prompt Museum 图片和来源 URL 来自服务端数据。服务端必须完成内容授权/署名审核;若未来需要凭据化素材,应新增 Main-owned 媒体代理,不能把对象存储凭据放进 Renderer URL。
|
||||
- Learning 的远端 JSON、Markdown、媒体、错误和 ZIP 下载跨信任边界;必须保持严格 DTO、固定项目/封面/历史媒体路径、可信 raster MIME、媒体/README 大小、同源重定向、SHA-256、ZIP 签名、一次 401 refresh 和固定安全错误。ZIP 下载明确不校验 `Content-Length`、`archiveBytes`、实际流字节数或客户端大小上限。README 仅允许图片节点直连经服务端校验的无凭据 HTTPS URL,不能扩展为任意 Works 下载或文件系统代理。
|
||||
- Dormant Prompt Museum API/media 代码仍必须保持 Main-owned Bearer、固定路径、可信 raster MIME、10 MiB 上限和错误脱敏;如未来重新启用产品面,需新的明确产品决策与端到端授权/署名审核。
|
||||
- Design command replay requires the original stable command and semantic operation IDs; business rejection never authorizes a retry with a fresh identity. Resource reconciliation cannot overwrite the Living Form.
|
||||
- Canvas cleanup only closes the local stream/buffers. The server-owned Direction Session and semantic history remain durable.
|
||||
- Image/video references use typed Asset binding and Specification medium; display text is never an action protocol.
|
||||
|
||||
Reference in New Issue
Block a user