merge: integrate marketplace and design v2 client
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
## Status
|
||||
|
||||
Accepted
|
||||
Superseded by ADR-007
|
||||
|
||||
## Date
|
||||
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
# ADR-007: AI Design Living Form V2 authority
|
||||
|
||||
## Status
|
||||
|
||||
Accepted / implemented
|
||||
|
||||
## Date
|
||||
|
||||
2026-08-30
|
||||
|
||||
## Context
|
||||
|
||||
ADR-001 modeled a Workspace as multiple independently selected Conversations, each
|
||||
with its own Brief, mutable Quote, and persistent Session. That split made chat,
|
||||
form edits, Quote options, and provider prompts competing representations of the
|
||||
same design. The coordinated Works Square and MakeLore V2 cutover now provides one
|
||||
versioned Design Specification and a persistent form throughout the design flow.
|
||||
|
||||
## Decision
|
||||
|
||||
- One Workspace exposes one current Direction, one persistent Agent Session, one
|
||||
Current Design Specification, one Living Form projection, one conversation
|
||||
timeline, immutable Quotes, Tasks, and Assets.
|
||||
- Chat, direct field edits, decision responses, accepted proposals, lock changes,
|
||||
Asset binding, and restore actions enter the same server-owned reducer. Renderer
|
||||
drafts are temporary buffers and never semantic authority.
|
||||
- Every mutation carries stable command and semantic operation identities. An
|
||||
unknown transport result keeps the same command for replay; revision conflicts
|
||||
refresh canonical state without discarding local drafts.
|
||||
- Generation is a compile-and-confirm boundary. The server returns an immutable
|
||||
Quote for one exact Specification revision; the client displays the public output
|
||||
plan, warnings, expiry, and Token Point amount and confirms only the Quote ID.
|
||||
Provider prompts, models, routing, storage, safety evidence, and billing atoms stay
|
||||
server-private.
|
||||
- Electron Main is the only Canvas network authority. Development and packaged
|
||||
builds use the Works Square V2 contract; there is no V1 DTO adapter, local semantic
|
||||
adapter, mutable Quote PATCH, editable provider Prompt, or cloud-failure fallback.
|
||||
|
||||
## Rationale
|
||||
|
||||
The Living Form makes the current Specification the sole rebuild and generation
|
||||
authority while keeping conversational continuity visible. One reducer removes
|
||||
client/server drift, and immutable Quotes plus stable operation IDs make confirmation
|
||||
and uncertain retries auditable without exposing provider internals.
|
||||
|
||||
## Consequences
|
||||
|
||||
- Client and server V2 must move together after the stopped deployment passes the
|
||||
server cutover dry-run/apply/validate gate.
|
||||
- Existing V1 data remains historical evidence and frozen execution recovery input;
|
||||
old clients and V1 semantic writers receive no compatibility window.
|
||||
- Production database cutover, paid Provider activation, and real-account installed
|
||||
client smoke remain separate operator gates.
|
||||
|
||||
## Supersedes
|
||||
|
||||
- ADR-001: AI 绘画 Workspace / Conversation 状态归属.
|
||||
|
||||
## Related
|
||||
|
||||
- Client source `b0b5a602b501308a23eb27e2f51a5169b9e46b1e`
|
||||
- Server source `b5351d54f595ce8eb873593e462e4a556bea0b05`
|
||||
- Server ADR `ADR-2026-08-28-001`
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
| ID | Decision | Status | Date | Applies To | Detail |
|
||||
|---|---|---|---|---|---|
|
||||
| ADR-001 | AI 绘画采用 Workspace / Conversation / Task 分层状态与服务端持久 Conversation Session | Accepted | 2026-08-11 | AI 绘画客户端、Main 适配器、Works Square API | `adr-001-ai-design-conversation-ownership.md` |
|
||||
| ADR-007 | AI Design 采用单一 Current Specification、Living Form 与不可变 Quote 的 V2 权威 | Accepted / implemented | 2026-08-30 | AI Design Renderer、Electron Main、Works Square V2 API | `adr-007-ai-design-living-form-v2.md` |
|
||||
| ADR-002 | Robot V1 采用 Main 门控的引导式热点配网并衔接现有六位 Binding | Accepted / implemented, default on | 2026-08-16 | Robot Renderer、Host API、Electron Main、现有固件热点入口 | `adr-002-robot-guided-hotspot-binding-v1.md` |
|
||||
| ADR-003 | Robot 配网页内扫描并连接 Windows/macOS 热点 | Accepted / implemented with physical release gates pending | 2026-08-16 | Robot Renderer、Host API、Electron Main、Windows WLAN、macOS CoreWLAN/CoreLocation | `adr-003-robot-in-app-hotspot-connection.md` |
|
||||
| ADR-004 | Works Square 统一拥有桌面认证生命周期边界 | Accepted / implemented | 2026-08-19 | Renderer、Host API、Electron Main、Works Square auth facade | `adr-004-square-auth-lifecycle-boundary.md` |
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
| ID | Decision | Superseded By | Date |
|
||||
|---|---|---|---|
|
||||
| ADR-001 | AI 绘画 Workspace / Conversation 状态归属 | ADR-007 | 2026-08-30 |
|
||||
|
||||
## Decision Criteria
|
||||
|
||||
|
||||
@@ -22,13 +22,13 @@
|
||||
| AI 编程 Provider 错误 | Pi worker Provider 请求 | selected worker env → Main AI proxy → Works 模型上游 → projector safe error | 确定性的 Works user-context 缺失使缓存 gateway credential 过期、返回非重试认证失败且不重放请求;Renderer 只看到固定 Provider-auth 提示,不能把它解释为 Pi 崩溃 |
|
||||
| AI 编程子 Agent | parent `subagent.v1` tool call | explicit extension → authenticated Main bridge → scheduler → ephemeral Pi child | child 并发最多 4、单次最多 8、禁止递归;父子共享总进程预算 8,coding child 与 parent 共用项目 write lease,父 abort/crash/generation 失效必须清理 child 与 permit |
|
||||
| 客户端更新检查 | 设置页 | Renderer update store → IPC → Main AppUpdater → 目标 feed | Main 记录并重抛原始错误;Renderer 只显示去重、脱敏的单条提示,稳定源缺包不伪装为最新版 |
|
||||
| 设计会话创建/切换 | AI 绘画页面或侧栏 | Renderer API → Main → Workspace Conversation API | 新会话属于现有 Workspace;读取独立消息、Brief、Quote 和 `turnRevision` |
|
||||
| 设计消息与确认 | 当前 Conversation | Main ↔ 持久 Agent Gateway Session WebSocket → Conversation 快照 | `command.submit`、Run 与设计事件共用连接;传输失败才以同一幂等 ID 回退 REST;结构化业务错误不重试且未知文本由 Main 脱敏;请求和流式结果同时绑定 Workspace + Conversation |
|
||||
| Design Workspace load | Canvas/Sidebar | Renderer Host API → Main-owned Works Square V2 adapter → current Workspace/Direction/Living Form projection | 一个 Workspace 公开一个 current Direction 与 persistent Agent Session;conversation timeline 是交互历史,不是独立 authority object |
|
||||
| Design input and reconciliation | Chat/direct edit/decision/proposal/lock/Asset binding/restore | Renderer draft → Main → `design.input.apply` → canonical Direction projection | 全部进入同一 reducer;accepted 前 draft 保持本地,revision conflict 刷新权威投影,unknown result 复用原 command/operation identity |
|
||||
| 设计有限请求生命周期 | Renderer Workspace JSON 调用 / shared Works token refresh | Main deadline → Electron transport → safe-read-only Node fallback → Host API timeout envelope | 包括取凭据、请求头和响应 body 的完整生命周期最多 30 秒;超时 abort transport 并稳定返回 `504 DESIGN_WORKSPACE_REQUEST_TIMEOUT`;透明 fallback 只允许 `GET`/`HEAD`/`OPTIONS`,mutation 不隐式重放 |
|
||||
| 设计单图来源选择 | 当前 Workspace 已完成图片 / 本地图片 | 现有 Asset 上传或选择 → `attachmentAssetIds` → 当前 Conversation Turn | 图片 Brief 用作图生图参考图;视频 Brief 用作首帧;只提交一个真实 Workspace Asset ID |
|
||||
| 设计任务同步 | 任一 Conversation 的事件流 / Quote REST 对账 | Renderer Workspace 任务列表 | Task 和 Asset 按 Workspace 归并;任务已落库但 Run 失败时恢复可见性,内部对账失败不覆盖新会话错误,切换 Conversation 后仍同步任务但不回写旧会话 |
|
||||
| 设计 Quote 编辑与重报价 | 当前 Conversation 的 active Quote | Renderer 修改最终 Prompt/参数 → Main Host API → Works Square Quote update → 当前 Conversation | 服务端返回最新参数与设计点;报价完成前不能确认,确认提交最新原值,客户端不自行计价 |
|
||||
| 设计项目删除 | Canvas 侧栏精确项目名确认 | Renderer → Main Host API → Works Square Workspace DELETE | 删除成功后清理当前 Workspace/Conversation/task stream 并选择最近更新的剩余项目;结算与软删除语义由服务端负责 |
|
||||
| Design Asset binding | 当前 Workspace 已完成图片 / 本地上传 | canonical Asset → typed `asset_binding` input → Current Specification revision | 图片/视频用途由 Specification medium 和 binding role 决定;只提交真实 Workspace Asset identity,不使用本地路径或自然语言占位 |
|
||||
| Design Quote and confirmation | 当前 exact Specification revision | `design.quote.request` → immutable public Quote projection → `design.generation.confirm` with Quote ID | Renderer 只展示 output summary、warnings、expiry、Token Points;Provider Prompt/model/route/storage/internal billing 不下发或编辑 |
|
||||
| Design Task and Asset sync | Direction event stream / Workspace resource events / explicit refresh | Renderer Task/Asset projections | Task/Asset events独立于 Living Form;transport order 和 progress 不改写 Specification,也不授权新生成操作 |
|
||||
| 设计项目删除 | Canvas 侧栏精确项目名确认 | Renderer → Main Host API → Works Square Workspace DELETE | 删除成功后清理当前 Workspace/Direction/resources 并选择最近更新的剩余项目;结算与软删除语义由服务端负责 |
|
||||
| Prompt Museum 浏览与使用 | Canvas 侧栏“获取灵感” | Renderer → Main Host API → Works Square list/detail;选中 Prompt → 进程内 pending state → 当前 Canvas 输入框 | 只发送白名单筛选/游标;Works Token 留在 Main,Prompt 不自动发送,Museum 不包含客户端静态数据集 |
|
||||
| Learning 项目浏览 | Learning 项目列表 / README 详情 | Renderer → typed Host API → Main fixed list/detail routes → Works Square published projects;README 图片节点 → 远程 HTTPS origin | 保留登录与 `module_access.learning`;Main 严格投影分页项目 DTO,README 禁用原始 HTML,仅图片节点可直连无凭据 HTTPS URL;封面和历史媒体仍使用受控媒体读取 |
|
||||
| Learning 项目下载 | README 详情页“下载项目” | Renderer → Host API → Main 原生保存对话框 → Works archive stream → 临时文件 → 原子重命名 | 不校验 `Content-Length`、`archiveBytes`、实际流字节数或客户端大小上限;最多五跳同 Works origin 重定向且不向重定向请求携带 Bearer;SHA-256 与 ZIP 签名匹配后才保存,Renderer 只得到 `saved` 或 `cancelled` |
|
||||
@@ -42,13 +42,13 @@
|
||||
- Renderer 可持久化当前账号的四布尔模块入口策略,但不持有原始 Works profile 或 Token。新账号不继承上一账号缓存;网络/暂时上游失败可保留同会话已知策略,终止性 `401` 不得回退到默认开启。
|
||||
- 本地构建临时目录、HTTP origin 和预检 WebContents/partition 只属于一次调用;预检读取与 `built_archive` 相同的内存字节,但结果不写为可信上传 receipt,也不覆盖生产 opaque-origin。
|
||||
- 旧 schema v1 `submitted` 记录迁移并保留;旧 `armed`、`waiting_for_package`、`waiting_for_login`、`uploading`、`failed` 归一为 `legacy_retired`,不再启动 watcher 或上传任务。
|
||||
- AI 绘画 Conversation 持有消息、Brief、Quote、`turnRevision` 和服务端 Session 绑定;Workspace 持有 Conversation 列表、生成任务和资产。
|
||||
- AI Design Current Specification 与 current Direction 是语义权威;conversation timeline 只保存交互历史,immutable Quote 绑定精确 Specification revision,Task/Asset 属于 Workspace resource projection。
|
||||
- AI 绘画 Main 持有 Workspace 请求 deadline、底层 transport fallback 和共享 Works token refresh flight。共同等待者必须在同一有限期限内 settle,refresh flight 结束后必须释放,后续刷新可重新发起;底层 mutation transport failure 不得自动产生第二次上游请求。
|
||||
- Prompt Museum pending Prompt 是 Renderer 进程内一次性导航状态;Canvas 消费后立即清除,不进入 Workspace/Conversation 直到用户主动发送。
|
||||
- Prompt Museum pending Prompt 是 Renderer 进程内一次性导航状态;Canvas 消费后立即清除,不进入 Workspace/Specification,直到用户主动提交 Design input。
|
||||
- Learning 不再维护客户端课程库、生成任务、player registration、进度或 runtime 状态。Main 在一次下载调用内持有当前账号快照、Works 凭据、保存路径和临时文件;账号变化或校验失败会中止并清理临时文件。历史课程数据不会被新逻辑读取,也不会自动删除。
|
||||
- 图生图参考图与视频首帧都先归一为当前 Workspace 的 Asset;从作品选择时复用生成结果 Asset,本地选择时先走既有上传接口,再把唯一 Asset ID 随 Turn 提交。选择或上传成功后关闭选择器。
|
||||
- 本地开发适配器将旧单会话 schema v2 原子迁移为带默认 Conversation 的 schema v3;打包应用不使用该本地适配器作为云端失败回退。
|
||||
- 注销和退出会关闭本地事件流并清除本机 Conversation Session-id 缓存;服务端持久 Session 保留,下一次访问从 Conversation API 重新读取。
|
||||
- 图生图参考图与视频首帧都先归一为当前 Workspace Asset,再通过 typed binding 写入 Specification;本地路径不会进入 canonical contract。
|
||||
- Development 与 packaged Canvas 都使用 Main-owned Works Square V2 adapter。V1 DTO/local semantic adapter 与 local/cloud mode switches 已删除,不存在失败回退。
|
||||
- 注销和退出关闭本地 event stream、清除 drafts/pending state 和凭据;服务端 current Direction Session 与 semantic history 保持持久化。
|
||||
- project、Agent、Conversation schema v2 与每条 Conversation 的 opaque Pi session binding 由 Main 原子持久化。旧 v1 先做时间戳备份再迁移;旧 OpenCode Session 不进入新 runtime,也不删除无关 `.opencode` 内容。
|
||||
- Renderer Store 只拥有产品中立 Snapshot、Patch、optimistic request 与 project-scoped metadata。每条 Conversation 的 generation/seq 独立;stale generation 丢弃,gap/reconnect 只为目标 Conversation 取 Snapshot 并重放严格连续的缓冲 tail,不重放 mutation。
|
||||
- Main 为每条 active/warm Conversation 持有一个 persistent Pi worker/session、Provider/resource revision 和 selected-account secret env。运行中 stale revision 保留本 run snapshot,settled 后重建;其他 Conversation 不受影响。
|
||||
@@ -68,11 +68,11 @@
|
||||
- 本机 `/api/coding/*` project/Agent/Conversation、Snapshot/patch-batch SSE、prompt/compact/fork/recover、attachment/file/interaction/diagnostics 路由,以及 Main-owned AI 模型代理。
|
||||
- Main-owned electron-updater IPC 与 Works Square 平台/架构稳定 feed;正式安装产物发布不由 Renderer 控制。
|
||||
- 服务端安全投影后的公共 `play_url`;只接受同源 HTTPS、精确 App 路径和可信版本状态。
|
||||
- Works Square Workspace/Conversation API、每个 Conversation 的持久 Agent Gateway Session、单次 WebSocket ticket、双向命令/事件帧与幂等 REST 传输回退。
|
||||
- Works Square Design V2 Workspace/Direction/Living Form API、持久 Agent Gateway Session、Direction event stream,以及 `design.input.apply`、`design.quote.request`、`design.generation.confirm` stable-operation contract。
|
||||
- Works Square Prompt Museum list/detail API;Main 添加当前账号 Bearer Token,Renderer 只使用 Host API 投影。
|
||||
- Works Square Learning project list/detail/media/archive API;Main 添加当前账号 Bearer Token,并限制固定路径、DTO、封面/历史媒体 MIME/大小、归档重定向、摘要和 ZIP 签名;归档大小字段只作展示,不参与下载门禁。README 中经服务端校验的无凭据 HTTPS 图片由 Renderer 图片节点直接请求。
|
||||
- 已实现的本机 Robot provisioning capability、固定 portal-open 与 hotspot scan/connect Host API。它们是本地 Main 操作,不读取 Works access token、不调用上游,也不接受任意 URL/SSID/BSSID/interface/profile。
|
||||
|
||||
## Last Updated
|
||||
|
||||
2026-08-26
|
||||
2026-08-30
|
||||
|
||||
@@ -30,13 +30,12 @@
|
||||
| `electron/coding-runtime/pi/{extension-host,subagent,write-lease}.ts` / `electron/main/background-lifecycle.ts` | 唯一显式 Makelore extension、交互、子 Agent、同项目写租约与后台运行租约 | child 并发 4、单次最多 8、禁止递归;active/uncertain run 不因页面隐藏或确认超时被回收,所有 stop/replacement 必须有原因 |
|
||||
| `electron/main/updater.ts` | 目标 feed 解析、electron-updater 生命周期与原始诊断 | 缺少稳定 manifest 保持错误;事件/Promise 重复失败按检查实例去重 |
|
||||
| `src/components/settings/UpdateSettings.tsx` | 更新状态、重试与用户可读错误展示 | 只显示一条简洁中文提示;技术诊断统一回退到本地化通用文案 |
|
||||
| `shared/image-workspace.ts` | AI 绘画 Workspace、Conversation、Task、Asset 与事件共享契约 | Conversation 状态与 Workspace 任务归属必须分离 |
|
||||
| `shared/image-workspace.ts` | AI Design V2 Workspace、Direction、Living Form、immutable Quote、Task、Asset 与事件共享契约 | Current Specification 是唯一语义权威;Task/Asset 属于独立 Workspace resource projection |
|
||||
| `electron/api/routes/image-workspace.ts` | AI 绘画 Host API 与本地事件流投影 | Renderer 只通过该路由访问 Main-owned workspace adapter |
|
||||
| `electron/image-workspace/works-square-workspace.ts` | Works Square 多 Conversation 云端适配器与双向 Gateway 命令/事件映射 | 使用服务端持久 Session;WebSocket 传输故障才以同一幂等 ID 回退 REST;未知 Gateway 错误文本不得穿透安全投影;本地清理不 DELETE 远端 Session |
|
||||
| `electron/image-workspace/local-workspace.ts` | 未打包开发模式的本地 Workspace 适配器和 v2→v3 迁移 | 仅开发使用,不得成为打包回退 |
|
||||
| `src/stores/image-workspace.ts` | 当前 Workspace/Conversation、项目任务及流式更新状态 | Quote/task 按 Workspace 无 UI 错误副作用地对账;Conversation 写入按 Workspace-load + Conversation-selection generation/revision 防护 |
|
||||
| `src/pages/ImageCanvas/index.tsx` | Conversation 对话、Quote 确认、统一任务列表、新会话入口与单图来源选择器 | 图片 Brief 选择/上传图生图参考图;视频 Brief 绑定首帧;均提交一个 Workspace Asset ID |
|
||||
| `src/components/layout/ImageWorkspaceSidebar.tsx` | Workspace 与近期 Conversation 切换/创建 | 切换会话不清空项目级任务 |
|
||||
| `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 |
|
||||
| `src/stores/image-workspace.ts` | Current Workspace/Direction/Living Form、local drafts、pending operations 与 Workspace resources | revision conflict 刷新 canonical state;event order/Task progress 不成为 Specification authority |
|
||||
| `src/pages/ImageCanvas/{index,DesignConversationPane,DesignFormPane,DesignProductionPanel}.tsx` | 持久双栏 Canvas、conversation、Living Form、immutable Quote confirmation、Tasks 与 Assets | chat/direct edits/decisions/locks/bindings 使用同一 V2 reducer;确认只提交 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 输入框,不自动发送;页面不接受投稿或互动 |
|
||||
@@ -73,15 +72,15 @@
|
||||
- Parent and child workers share one FIFO process budget of 8. Child reservation may reclaim ready/idle or queued parent capacity without losing FIFO order, session binding, or generation ownership; stop/reclaim failure must release leases in `finally`.
|
||||
- Provider/resource revisions apply before the next prompt for idle workers and after `agent_settled` for active runs. Same-account model changes may use `set_model`; cross-account changes rebuild only the target Conversation so old credentials never enter the new worker.
|
||||
- `electron/main/updater.ts` 的稳定源错误归一化必须保持窄化:只识别 Works Square 对应 manifest 的 404,不得吞掉其他 feed/网络/签名错误;Renderer 的脱敏边界不能取代 Main 原始日志。
|
||||
- 多 Conversation 事件处理必须区分对话快照与 Workspace 任务更新;不得用任务时间戳推进 Conversation 流水位,也不得让旧会话的迟到流覆盖当前会话。
|
||||
- Quote 编辑、重报价、确认和项目删除都跨 Renderer/Main/Works Square。异步结果必须核对当前 Workspace + Conversation;删除当前项目时必须先使旧选择和事件流失效,再加载剩余 Workspace。
|
||||
- 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 下载或文件系统代理。
|
||||
- Gateway 命令的 REST fallback 只处理 WebSocket 发送、断连和 ACK 超时,必须复用 `client_command_id`;业务错误回退会造成重复提交。Quote 任务恢复只更新 Workspace 所有的任务,不能覆盖当前 Conversation。
|
||||
- `closeEventSessions` 只负责本地流和缓存生命周期;远端 Conversation Session 是服务端持久资源。
|
||||
- 单图来源选择器当前仍由精确中文 quick reply 触发,并以 Brief medium 判断图生图或视频首帧用途;扩展更多输入用途前应先把消息协议升级为结构化 action/purpose,避免展示文案与行为继续耦合。
|
||||
- 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.
|
||||
- Guided Hotspot Binding 已由产品决策默认开启,并通过 native dependency 执行未经认证的热点扫描/连接。未完成指定固件镜像核对、六位码发行契约、签名 macOS x64/arm64 worker/ASAR/Koffi 验证、Windows 真机和完整 Electron/Robot smoke 前不得宣称完整兼容;现场异常使用精确环境值 `0` 回滚。
|
||||
|
||||
## Last Updated
|
||||
|
||||
2026-08-21
|
||||
2026-08-30
|
||||
|
||||
@@ -23,11 +23,11 @@ Makelore 是 Electron 桌面客户端。Renderer 负责项目操作与状态展
|
||||
| Pi Conversation Runtime | 每条 active/warm Conversation 一个 persistent Pi `0.84.2` worker/session | 严格 LF JSONL RPC、generation recovery、Snapshot hydration;top-level 并发 4、warm idle LRU 4、总进程预算 8 |
|
||||
| Pi Provider & Managed Resources | Provider catalog、secret/env 投影、model/resource revision、Prompt/Skill/extension materialization | 凭据只进入选中 worker env;不扫描项目或用户的 `.pi/.agents/.codex`,不把 secret 放进 argv、catalog 或 Renderer |
|
||||
| Pi Extension, Subagents & Lifecycle | 唯一显式 Makelore extension、UI interaction、ephemeral child、write lease 与 background run lease | child 并发 4、单次最多 8、禁止递归;active/uncertain run 不因页面隐藏或 confirmation timeout 被停止,replacement/stop 必须可解释并清理所有 ownership |
|
||||
| AI Design Workspace | 保存项目身份、Conversation 列表、生成任务和资产 | 任务和资产在切换 Conversation 后继续可见 |
|
||||
| AI Design Conversation | 保存消息、Brief、Quote、`turnRevision` 与服务端 Agent Session 绑定 | 同一 Workspace 内互相隔离;Session 由服务端持久化 |
|
||||
| AI Design Image Source Picker | 当前 Workspace 已完成图片或本地上传 | 图片 Brief 绑定图生图参考图;视频 Brief 绑定首帧;提交一个真实 Asset ID |
|
||||
| AI Design Gateway Routing | Main 云端适配器 ↔ Conversation WebSocket;Main → Host API/SSE → Renderer store | 命令、Run 与设计事件共用双向 WebSocket;Conversation 更新按 Workspace + Conversation 路由,任务更新按 Workspace 归并 |
|
||||
| AI Design Quote & Task Controls | 当前 Conversation Quote 与 Workspace 任务 | 最终 Prompt/generation options 每次修改由服务端重新计价;任务结果在详情中预览并经 Main-owned asset download 保存 |
|
||||
| AI Design Workspace & Living Form | 一个 Workspace 的当前 Direction、Current Specification、持久 Agent Session、conversation timeline、Tasks 与 Assets | Living Form 是服务端 Current Specification 的投影;Renderer 只持有草稿和已接受投影 |
|
||||
| AI Design Input & Reconciliation | Chat、字段/集合编辑、decision、proposal、lock、Asset binding 与 restore | 全部进入同一 `design.input.apply` reducer;稳定 command/operation ID 支持 unknown-result 重放,revision conflict 刷新权威状态 |
|
||||
| AI Design Gateway Routing | Main-owned Works Square V2 adapter 与 Direction event stream | Main 持有 Works Token、stream ticket、WebSocket、重试分类和错误脱敏;事件顺序与 Task progress 不构成 Specification 真值 |
|
||||
| AI Design Quote & Task Controls | 精确 Specification revision 编译出的不可变 Quote 与 Workspace Tasks | 客户端只展示 public output summary、warnings、expiry 与 Token Points,并以 Quote ID 确认;Provider Prompt/model/route/storage/billing atoms 不下发 |
|
||||
| AI Design Assets | Workspace 已完成作品或本地上传的真实 Asset | Asset 通过 typed binding 写入 Specification;生成结果经 Main-owned asset download 保存 |
|
||||
| Prompt Museum | Canvas “获取灵感”页面 → Main Host API → Works Square | 服务端驱动的审核内容、筛选和分页;Renderer 不持有 Works Token 或内置数据集,“使用此 Prompt”只回填输入框 |
|
||||
| Learning Project Catalog | 服务端分页项目卡片、README 详情与用户选择的 ZIP 下载 | Renderer 只持有安全项目 DTO 和 Markdown;不提供生成、进度、本地课程库或播放器 |
|
||||
| Learning Main Boundary | 固定 Host API → Works Square project list/detail/media/archive | Main 持有 Works Bearer、封面/历史媒体代理、原生保存路径、受控重定向、临时文件、SHA-256/ZIP 签名校验与原子落盘;归档下载不执行大小校验,README 图片节点可直接加载无凭据 HTTPS URL,Renderer 不获得任意归档 URL 或本地路径 |
|
||||
@@ -45,7 +45,7 @@ Makelore 是 Electron 桌面客户端。Renderer 负责项目操作与状态展
|
||||
- 每个登录用户可由 Works `module_access` 关闭任意顶层模块入口。Main 只投影四个布尔值;被关闭卡片置灰不可点,根/深层/别名路由在 `MainLayout` 和模块初始化前拦截。Code provider 必须等待 auth policy hydration,而全局 `/settings` 不属于 Code policy guard。
|
||||
- 模块入口策略是用户交互与客户端初始化边界,不是服务端 API 授权。终止性 `/api/auth/me` `401` 必须清理 Main 和 Renderer 会话;各模块 API 仍须独立强制认证与授权。
|
||||
- Product UI language is Chinese-only. Unsupported system or persisted language values normalize to `zh`; removed locale files are not runtime fallbacks.
|
||||
- Packaged Canvas remains cloud-only with no local fallback. `pnpm run dev` now uses the cloud adapter; the local Workspace adapter requires the explicit development command and remains unpackaged-only.
|
||||
- Canvas is cloud-only in development and packaged builds. The removed local Workspace adapter and V1 DTOs are not fallback paths.
|
||||
- Prompt Museum is a read-only curated inspiration surface, not a user-content community. Main owns Works authentication and forwards only the bounded list/detail routes; the client never bundles museum content or automatically submits a selected Prompt.
|
||||
- Learning uses a Main-owned read-only project-catalog boundary. Renderer does not receive Works credentials, object-storage identifiers, arbitrary archive URLs, temporary/final paths, or an arbitrary network proxy. README raw HTML is disabled; Markdown image nodes alone may load validated credential-free HTTPS URLs directly, including SVG and other formats Electron supports. Main continues to validate covers/historical media and streams a selected project ZIP through bounded same-origin redirects, SHA-256, ZIP signature, and atomic rename before returning only `saved` or `cancelled`; it ignores archive size metadata and applies no client download-size ceiling.
|
||||
- AI hardware network access is Main-owned. Renderer cannot hold Works Square or Xiaozhi credentials and cannot select arbitrary upstream paths or headers.
|
||||
@@ -73,22 +73,22 @@ Makelore 是 Electron 桌面客户端。Renderer 负责项目操作与状态展
|
||||
- 公共播放投影只有在上游 `playable === true`、版本名非空且 URL 通过同源 HTTPS、无 userinfo/loopback、长度、精确路径和无 query/fragment 校验时才可播放;不可信数据 fail closed。
|
||||
- Renderer 只能获得安全状态字段和安全投影的公共播放 URL,不得持有发布凭据、归档路径或自动部署状态。
|
||||
- 落盘文件名 `works-cloud-deploy.json` 仅为已安装客户端的数据兼容;领域模型和代码接口是 submission binding,不表示仍存在 cloud deployment coordinator。
|
||||
- AI 绘画中,一个 Workspace 可包含多条 Conversation;消息、Brief、Quote 和 `turnRevision` 属于 Conversation,生成任务和资产属于 Workspace。新建 Conversation 不得隐式创建新 Workspace。
|
||||
- 每条 Conversation 复用服务端持久 Agent Gateway Session。客户端不得在注销或退出时 DELETE 该 Session;只关闭本地事件流并清除本机 Session-id 缓存,重新访问时从 Conversation API 刷新。
|
||||
- 已连接的 Conversation Session 通过同一 WebSocket 提交 `command.submit` 并接收 `command.accepted`、Run 与设计事件。只有发送失败、连接关闭或 ACK 超时属于可回退的传输故障,REST 必须复用同一 `client_command_id`;结构化 Gateway 业务错误不得再次提交,未知上游错误文本不得穿透 Main 安全投影。
|
||||
- AI Design 的一个 Workspace 公开一个当前 Direction、一个持久 Agent Session 和一个 Current Specification;conversation timeline 是交互历史,不是独立创建或选择的语义权威。
|
||||
- Living Form 与 chat、direct edit、decision、proposal、lock、Asset binding、restore 共用同一服务端 reducer。Renderer 草稿在 accepted 前不进入 canonical state。
|
||||
- Main 通过 `design.input.apply`、`design.quote.request` 和 `design.generation.confirm` 访问 V2。unknown transport result 必须复用原 command/operation identity;结构化业务错误不得重放,未知上游文本不得穿透安全投影。
|
||||
- Main-owned Canvas Workspace JSON 请求和 shared Works token refresh 的完整生命周期最多 30 秒,超时 abort transport 并以固定 `504 DESIGN_WORKSPACE_REQUEST_TIMEOUT` 结束 Renderer 等待。Electron `net.fetch` 失败后的 Node fetch 透明回退只允许 `GET`、`HEAD`、`OPTIONS`;PATCH/POST 等 mutation 只允许由持有显式幂等身份的上层协议决定重试,不能由底层 transport 隐式重放。该边界不改变上面的 WebSocket→REST 幂等 fallback。
|
||||
- Renderer 的异步与流式状态必须同时校验 Workspace + Conversation 身份;项目任务事件只按 Workspace 归并,避免切换会话时丢失任务或接收迟到消息。
|
||||
- 确认生成按 Quote 对账 Workspace 任务。任务事务已提交但 Run 随后失败时可通过 REST 恢复任务可见性;内部任务对账失败不写当前 Conversation 的用户错误,任务恢复也不授权旧请求回写已切换的 Conversation 或清理新 pending turn。
|
||||
- Renderer 的异步与流式结果必须核对 Workspace、Direction、revision 和 operation identity;Direction snapshot 是 Specification 真值,Task/Asset 事件只更新 Workspace resource projection。
|
||||
- 确认生成只提交不可变 Quote ID。Task 事务已提交但事件迟到时可刷新 Workspace projection;Task progress 不得改写 Living Form 或授权新的生成操作。
|
||||
- Updater feed 选择、原始错误日志、下载和安装生命周期只属于 Electron Main。Renderer 不得把缺失稳定 manifest 投影为“已是最新版”,也不得显示原始堆栈、URL、路径或错误码;并发检查共享同一错误事件时只发送一次错误状态,后续独立重试仍可重新报告。
|
||||
- 图片与视频复用同一个单图来源选择器。图片 Brief 可从当前 Workspace 的已完成作品或本地上传中选择一张参考图继续生成;视频 Brief 使用同一入口绑定首帧。两条路径都必须通过现有 Workspace Asset 上传/选择契约提交一个真实 `attachmentAssetIds`,不得用本地路径或自然语言描述代替资产身份。
|
||||
- Canvas generation confirmation must use the latest server Quote after final Prompt or generation-option edits; the client displays server pricing and submits parameter values but does not derive provider dimensions, supplier pricing, or design-point cost.
|
||||
- Canvas generation confirmation must use the immutable server Quote for the exact current Specification revision. The client confirms only the Quote identity and never edits or derives provider Prompt, model, dimensions, supplier pricing, or Token Point cost.
|
||||
- Canvas project deletion is an explicit destructive Workspace mutation guarded by exact project-name confirmation. Renderer clears the deleted Workspace's local state and selects the most recently updated remaining Workspace; upstream hiding, cancellation, reservation release, and settlement remain service-owned behavior.
|
||||
- 当前兼容协议仍通过精确 quick reply `从作品列表选择图片` 打开选择器,并由当前 Brief medium 区分用途;仅 `medium === image` 使用图生图语义,`video`、null 或缺失 medium 保持视频首帧语义。该展示文案耦合不得扩散到更多用途,后续应升级为结构化 action/purpose。
|
||||
- 图片/视频输入以 typed Asset binding 和 Current Specification medium 决定用途,不再从本地化 quick-reply 文案或 V1 Brief 推断行为。
|
||||
|
||||
## Related Decisions
|
||||
|
||||
- 当前长期边界记录于 README、ADR-001 至 ADR-006、集成任务 `20260807-integrate-login-client-a4f8`、源任务 `20260810-static-release-only-a91c`、`20260812-client-built-release-makelore-7e5b`、`20260812-design-image-to-image-client-c91e` 及本次 Integration Gate;后续如改变唯一入口、凭据所有权、构建执行边界、Conversation 状态归属、Pi 单 runtime/worker/lease 边界、Learning 项目分发边界、Robot 配网/绑定安全边界或重新引入客户端部署协调器,应新增 ADR。
|
||||
- 当前长期边界记录于 README、ADR-002 至 ADR-007(ADR-001 已由 ADR-007 supersede)及各 Integration Gate;后续如改变唯一入口、凭据所有权、构建执行边界、Living Form/Specification 状态归属、Pi 单 runtime/worker/lease 边界、Learning/Marketplace 分发边界、Robot 配网边界或重新引入客户端部署协调器,应新增 ADR。
|
||||
|
||||
## Last Updated
|
||||
|
||||
2026-08-26
|
||||
2026-08-30
|
||||
|
||||
@@ -17,6 +17,16 @@ This file is the integrated default-branch snapshot. Feature tasks record progre
|
||||
against real PostgreSQL and a signed-in packaged Windows client. Production trust
|
||||
activation remains HOLD until the official Ed25519 public key is built in; Release B
|
||||
and hosted Provider runtime remain closed.
|
||||
- AI Design Living Form V2 client source
|
||||
`b0b5a602b501308a23eb27e2f51a5169b9e46b1e` is integrated with matching Works
|
||||
Square server source `b5351d54f595ce8eb873593e462e4a556bea0b05` by task
|
||||
`20260830-integrate-marketplace-design-client-main-9d5f3b82`. Canvas now exposes
|
||||
one current Direction, one persistent Agent Session, one Current Specification and
|
||||
Living Form, one conversation timeline, immutable Quotes, Tasks, and Assets. Chat,
|
||||
direct edits, decisions, locks, and Asset binding share one server reducer; Main is
|
||||
the only V2 transport authority, and V1 DTO/local semantic fallback paths are
|
||||
removed. Production database cutover, real-account installed-client smoke, and paid
|
||||
Provider activation remain separate operator gates.
|
||||
- Updater downgrade-prevention source commit `2e61800` from feature task
|
||||
`20260826-fix-version-update-check-7c91a4` is integrated by task
|
||||
`20260826-recover-pi-updater-integration-8f3a6c21`. Every automatic-update
|
||||
@@ -156,7 +166,7 @@ This file is the integrated default-branch snapshot. Feature tasks record progre
|
||||
|
||||
客户端面向非专业用户提供“创建小游戏或小程序 → 项目配置中一键提交 → Main 本地 npm/Vite 构建 → Electron 双视口预检最终产物 → 上传 source+built 双归档与 contract → 运营审核”的唯一创建者链路。Main 对安全源码快照运行安装包内固定 npm 11.6.2 的 `npm ci --ignore-scripts`,再显式调用项目 `package-lock.json` 锁定的 Vite;Vite config/plugins 以当前桌面用户权限执行,因此只适用于用户信任的本地项目,不是 sandbox。预检由 Main 以临时 loopback origin 和 Electron WebContents/CDP 检查与最终 `built_archive` 相同的内存文件字节,覆盖桌面/移动视口、运行错误、白屏和外域访问;不使用 Playwright。该检查仍可由非官方客户端绕过,不产生可信 receipt,也不复刻生产 opaque-origin。服务端不再替客户端运行项目 Vite,而是把源码、构建归档和 contract 视为不可信输入,逐字节重算与校验并固化不可变 Release;人工审核仍不可绕过。自定义和缺少类型字段的旧项目不提供该入口。已发布作品优先使用安全投影后的 `play_url`,`runtime_url` 仅保留一个客户端版本的兼容回退。
|
||||
|
||||
AI 绘画的一个 Workspace 可包含多条 Conversation。消息、Brief、Quote 和 `turnRevision` 随 Conversation 隔离;生成任务和资产保持 Workspace 级共享。图片 Brief 支持文生图,以及从当前项目已完成作品或本地上传中选择一张参考图继续生成;视频复用同一选择器绑定首帧。两条路径都通过现有 Workspace Asset 契约提交一个真实 Asset ID。每条 Conversation 使用服务端持久 Agent Gateway Session;连接正常时命令、Run 与设计事件共用双向 WebSocket,只有发送、断连或 ACK 超时等传输故障才以同一 `client_command_id` 回退 REST,结构化业务错误不重复提交且未知上游文本由 Main 脱敏。Main-owned Workspace JSON 请求与共享 Works token refresh 的完整生命周期均限制为 30 秒,超时稳定投影为 `504 DESIGN_WORKSPACE_REQUEST_TIMEOUT`;底层 Electron-to-Node fetch 回退只允许 `GET`、`HEAD`、`OPTIONS`,PATCH/POST 等变更请求失败时不得隐式二次发送。确认栏允许编辑服务端最终 Prompt 与 generation options,每次修改都由服务端 Quote 重算设计点,确认时提交最新原值;客户端不推算供应商或积分价格。任务详情可预览/下载结果。侧栏删除项目要求完整输入项目名,删除当前项目后切换到最近更新的剩余项目;服务端删除/结算语义仍由 Works Square 契约负责。确认生成会按 Quote 对账 Workspace 任务;任务已经落库但 Run 随后失败时仍恢复任务列表,内部对账失败不覆盖当前 UI 错误,同时 Conversation 写入继续受 Workspace-load 与 Conversation-selection generation 保护。
|
||||
AI Design Canvas 现在是持续可见的双栏 Living Form 工作区。一个 Workspace 公开一个 current Direction、一个 persistent Agent Session 和一个 Current Specification;conversation timeline 只记录交互历史。Chat、direct edits、decision responses、proposal acceptance、locks、Asset binding 与 restore 都通过 `design.input.apply` 进入同一服务端 reducer,Renderer drafts 在 accepted 前保持本地。Main 持有 Works Token、stream ticket、WebSocket、request deadline、stable command/operation IDs 与错误脱敏;unknown result 只能复用原 identity,结构化业务错误不得重放。Generation 由服务端对 exact Specification revision 编译 immutable Quote,客户端只展示 public output plan、warnings、expiry 与 Token Points,并以 Quote ID 调用 `design.generation.confirm`;Provider Prompt、model、route、storage 和 billing atoms 不进入 Renderer。Task/Asset events 独立收敛 Workspace resources,不改写 Living Form。Development 与 packaged builds 均使用 Works Square V2,V1 DTO、local semantic adapter、mutable Quote PATCH 与 editable provider Prompt 已移除。
|
||||
|
||||
Canvas 侧栏提供“获取灵感”进入 Prompt Museum。列表、筛选、分页、详情、作者/来源/许可证和图片地址全部由服务端经 Main-owned Host API 提供,客户端不打包静态数据集;服务端相对媒体只允许固定 `/api/image-prompt-museum/{entry}/media/{thumbnail|number}` 形状,并由 Main 注入 Works Bearer、执行一次 401 刷新、可信 raster MIME 与 10 MiB 上限后转为 Renderer data URL;credential-free HTTPS CDN 图片保持直连。图片失败只显示卡片内占位,不阻断卡片或详情;缺少来源 URL 时显示纯文本。“使用此 Prompt”只把原文带回当前 Canvas 输入框,不自动发送。该模块不是投稿、点赞、评论或排行榜社区。客户端契约已就绪,但不据此宣称 Works Square 内容后台和生产数据已经部署。`pnpm run dev` 现在默认使用云端 Canvas 适配器,本地适配器只能通过显式开发命令启用;产品 UI 只保留中文。
|
||||
|
||||
@@ -209,7 +219,7 @@ Robot 绑定设备默认先显示“引导配网 / 已有激活码”路径选
|
||||
|
||||
## Next Recommended Steps
|
||||
|
||||
1. 用包含本次修复的安装包和真实 Works 账号重复执行 Quote PATCH、重试报价与继续调整,确认任一超时在 30 秒内释放 UI、其他请求可继续、服务端不收到隐式重复 mutation;确认后单独恢复 HTTP/2 再对照 smoke,决定是否移除临时 `disable-http2`。
|
||||
1. 在停止服务的目标数据库完成 Design V2 cutover dry-run、清零 blocker、显式 apply/validate,再用成对部署的服务端与安装包真实账号执行 direct edit、chat edit、Quote request/confirm、后台完成、结果下载和 interrupted unknown-result replay smoke; paid Provider activation 另行授权。
|
||||
2. 部署 Works `module_access` migration 与 `/api/auth/me` 权限 API,打包新 Makelore 客户端,再用真实账号分别关闭 Code、Canvas、Learning、Robot 执行卡片、根/深层/别名路由 smoke;同时独立验证模块 API 服务端授权。
|
||||
3. 部署 Works Square Learning 项目管理、对象存储、README HTTPS URL 校验和 list/detail/media/archive API,再使用真实账号验证发布/下架、分页、远程 README 图片(含 SVG、失效 origin 和隐私提示)、ZIP 校验/保存以及 Windows 与签名 macOS 安装包。
|
||||
4. 对 default-on Guided Hotspot Binding 核对指定固件镜像与六位码发行/消费契约,补齐 Windows 真机热点连接、签名 macOS x64/arm64 CoreWLAN/CoreLocation/worker 打包验证、真实 Host API/native seam Electron E2E 和完整真机 smoke;发布支持保留精确 `=0` 回滚,不把缺失证据表述为已验收。
|
||||
@@ -234,18 +244,18 @@ Robot 绑定设备默认先显示“引导配网 / 已有激活码”路径选
|
||||
- 本地 `projectType` 只决定产品分流和模板选择,不得作为授权依据或替代 Main/服务端的包体校验。
|
||||
- 本地构建必须使用安装版 Electron Node、固定 npm 11.6.2 和项目 `package-lock.json` 锁定的 Vite,不得回退到全局 PATH、已有 `node_modules` 或未验证的 npm 闭包;依赖安装需要网络。
|
||||
- 项目 Vite config/plugins 以桌面用户权限执行,不能称为 sandbox;此风险边界必须在发布说明中保留。
|
||||
- AI 绘画消息、Brief、Quote 和 `turnRevision` 必须按 Workspace + Conversation 隔离;任务事件仍按 Workspace 归并,迟到的异步结果不得污染已切换的会话。
|
||||
- AI 绘画 WebSocket 命令只能在传输发送、连接关闭或 ACK 超时时回退到 REST,并必须复用原 `client_command_id`;Gateway 结构化业务错误不得触发重复提交,未知错误文本不得进入 Renderer。确认后的任务恢复必须按不可变 Quote 身份归并到 Workspace,不能用任务恢复放宽 Conversation generation 门禁或覆盖新会话错误。
|
||||
- AI Design 的 Current Specification 是唯一语义权威。Direction events 必须按 Workspace/Direction/revision/operation identity 收敛;assistant delta、event cursor、Task progress 和 Asset updates 不得改写 Living Form。
|
||||
- Design unknown-result replay 必须复用原 stable command 与 semantic operation ID;业务错误不得重复提交。Immutable Quote confirmation 只提交 Quote ID,Task recovery 不授权新的生成 intent。
|
||||
- AI 绘画 Main-owned Workspace JSON 请求和共享 Works token refresh 必须在 30 秒内结束并释放共同等待者;只允许 `GET`/`HEAD`/`OPTIONS` 在 Electron transport 失败后透明改走 Node fetch,PATCH/POST 等 mutation 必须由具有显式幂等身份的上层协议决定是否重试。临时 `disable-http2` 只用于安装包诊断,不能替代该有限生命周期与非重放边界。
|
||||
- 服务端持久 Conversation Session 不由客户端在注销或退出时删除;Main 只关闭本地流、清除本机缓存并撤销本地凭据。
|
||||
- 服务端 current Direction Session 与 semantic history 不由客户端在注销或退出时删除;Main 只关闭本地流、清除 drafts/pending state 和本机凭据。
|
||||
- 客户端对最终构建字节的 loopback 检查没有可信 receipt,且不复刻生产 opaque-origin;服务端必须独立重算 source/built/contract、校验不可变 Release,人工审核仍不可绕过。如未来需要不可绕过的 runtime gate,必须引入可信 verifier 并绑定精确构建产物。
|
||||
- Pi RPC confirmation timeout 是不确定性边界,不是释放 run permit、process ownership 或 Main background lease 的依据;accepted/uncertain mutation 不得自动重放,迟到 terminal 必须 exactly-once 收敛。隐藏/显示、abort、recover、replacement 与 app quit 都必须保留可解释 reason 并最终清零 ownership。
|
||||
- Pi `0.84.2` 手动 compact 不发 `agent_settled`。只有 correlated compact RPC success 或权威 compaction failure 可以结束 compact;普通 prompt 仍需自己的 terminal/settled 语义,不能相互释放 lease。
|
||||
- 本地 provider-shaped loopback 和 4+4 process proof 证明客户端序列化、调度与隔离 seam,不证明真实 Provider 会并发、不会限流或正确隔离账号凭据。真实认证、endpoint/proxy/rate-limit、协议和图片差异仍为 `Explicitly Waived / Accepted Risk`,`realTurnVerified=false`。
|
||||
- Provider/resource freshness 属于目标 Conversation worker generation。idle stale 在下一 prompt 前重建,running stale 在 settled 后重建;同账号 refresh single-flight 且最多一次 reopen。确定性 Works user-context 缺失必须失效缓存凭据并 fail fast,不能触发无限 Pi 重试、自动 replay 或把 Provider 故障写成 runtime crash。
|
||||
- AI 绘画单图选择器仍精确匹配 quick reply `从作品列表选择图片`,用途再从当前 Brief medium 推断;本地化或协议文案变化可能破坏入口。扩展更多素材输入前应升级为结构化 action/purpose。
|
||||
- AI Design 图片/视频引用必须以 typed Asset binding 写入 Specification,不能从本地化 quick reply、V1 Brief 或本地路径推断 action/purpose。
|
||||
- Updater 源码错误提示不能代替发布正式签名产物;稳定 feed 缺 manifest 必须保持失败,Renderer 不得展示原始堆栈、URL、路径或错误码。升级链只有在旧版本完成发现、下载、重启和安装 smoke 后才可视为生产就绪。
|
||||
|
||||
## Last Updated
|
||||
|
||||
2026-08-26
|
||||
2026-08-30
|
||||
|
||||
@@ -1,86 +0,0 @@
|
||||
# Task: Integrate MakeLore Plugin Marketplace Release A client
|
||||
|
||||
## Identity
|
||||
|
||||
- Task ID: 20260830-integrate-plugin-marketplace-client-6e3b9d82
|
||||
- Mode: Integration
|
||||
- Branch: codex/20260830-integrate-plugin-marketplace-client-6e3b9d82-integrate-plugin-marketplace-client
|
||||
- Worktree: D:\Datas\OthersProjects\makelore-integrate-plugin-marketplace-6e3b9d82
|
||||
- Base commit: f2456039230f68e3ecb2c8653fc3379c23bbe5ce
|
||||
- Owner: codex-root
|
||||
- Status: Ready for Integration
|
||||
|
||||
## Scope
|
||||
|
||||
- Fast-forward the clean integration branch from local `main`
|
||||
`f2456039230f68e3ecb2c8653fc3379c23bbe5ce` through completed Marketplace
|
||||
Release A client source `40df677a31ff7651f962151eb84b925987781c03`.
|
||||
- Preserve the R7 Standards/Spec zero-finding result and completed XMA-01
|
||||
packaged-client evidence.
|
||||
- Promote the source task's accepted Main/Package Store/effective resolver,
|
||||
state-separation, current-state, and evidence facts into canonical project
|
||||
memory.
|
||||
- Verify the integrated Marketplace client seams without modifying the dirty,
|
||||
unowned user root worktree.
|
||||
|
||||
## Intent And Constraints
|
||||
|
||||
- Integration Gate and lock are mandatory; source promotion candidates and
|
||||
server DTO authority were reviewed before reconciliation.
|
||||
- Account Library, Device Installation, project enablement, Agent assignment,
|
||||
runtime authorization, and billing remain distinct states and actions.
|
||||
- Release A remains the only integrated Marketplace scope. Release B, hosted
|
||||
runtime, deployment, publication, push, and PR remain out of scope.
|
||||
- Production trust remains fail closed until the official Ed25519 public key is
|
||||
built into MakeLore; no private key or runtime trust override is added.
|
||||
- Preserve the pre-existing untracked task record in the user `main` worktree;
|
||||
do not adopt, delete, stash, reset, or clean it implicitly.
|
||||
|
||||
## Outcome
|
||||
|
||||
- Fast-forwarded the integration branch from local `main`
|
||||
`f2456039230f68e3ecb2c8653fc3379c23bbe5ce` to completed Marketplace client
|
||||
source `40df677a31ff7651f962151eb84b925987781c03`.
|
||||
- Promoted the accepted Marketplace Main/Package Store/effective resolver,
|
||||
runtime lifecycle, state-separation, and live evidence facts in commit
|
||||
`30f84fe973e0deecff1448ac119421ab98941de0`.
|
||||
- Recorded clean candidate documentation checkpoint
|
||||
`90bed992c128617ed983609c0201833fda66e0e8`; the final readiness commit adds
|
||||
only this task's status/evidence, so product history remains the verified
|
||||
Release A source plus canonical project-memory promotion only.
|
||||
- Foreign task-owned records introduced by the source history were excluded
|
||||
from the final integration tree; they remain on their source branches.
|
||||
- Canonical `main` has not yet advanced. Its user worktree contains preserved,
|
||||
unowned untracked record
|
||||
`.project-docs/30-worklog/tasks/20260827-plugin-ml07-spec-7c5a2e91.md`;
|
||||
the integration task did not adopt, delete, stage, stash, reset, or clean it.
|
||||
|
||||
## Verification
|
||||
|
||||
- `corepack pnpm run typecheck` passed.
|
||||
- Ten Marketplace/package/effective-resolver/Pi/Renderer focused files passed
|
||||
`108` tests with one worker.
|
||||
- `corepack pnpm run build:vite` passed for Renderer (`2261 modules`), Main
|
||||
(`193 modules`), Preload, and utility worker.
|
||||
- `git diff --check`, `check_project_docs.py`, and `check_doc_drift.py` pass.
|
||||
- Source R7 Standards/Spec zero-finding review and XMA-01 12/12 signed-in
|
||||
packaged evidence were reviewed and promoted; packaging and live acceptance
|
||||
were not repeated for the byte-identical fast-forwarded product tree.
|
||||
|
||||
## Follow-ups
|
||||
|
||||
- Obtain explicit human adoption of the dirty, unowned client root worktree (or
|
||||
have the originating task remove its orphan record), start a matching root
|
||||
task context, and fast-forward `main` to this integration branch's final head
|
||||
while preserving the record unchanged.
|
||||
- Production trust activation remains HOLD for the official Ed25519 public key;
|
||||
Release B remains closed.
|
||||
|
||||
## Promotion Candidates
|
||||
|
||||
- Applied: Marketplace Main, Account cache, immutable Package Store, effective
|
||||
resolver, and Pi lifecycle to canonical module map and data flow.
|
||||
- Applied: Library/device/project/Agent/runtime/billing separation and trust
|
||||
boundaries to business rules.
|
||||
- Applied: final R7/XMA evidence and source commit to current state and evidence
|
||||
index. No new ADR or product direction was introduced.
|
||||
@@ -54,17 +54,16 @@
|
||||
- Provider Account、credential、custom header 和 proxy token 只可投影到选中 worker env,不能进入 argv、catalog、Renderer 或未选中 worker。确定性的 Works user-context 缺失必须使缓存 gateway credential 过期、fail fast 且不重放 mutation,并向产品投影固定的 `CODING_PROVIDER_AUTH_REQUIRED`;不能把它解释为 Pi worker 崩溃。
|
||||
- Provider/resource revision 在 idle worker 下一 prompt 前应用;running worker 使用当前 run snapshot,settled 后重建。同账号 refresh single-flight 且最多一次 auth refresh/reopen。真实 Provider 认证、endpoint/proxy/rate-limit、协议差异、真实并发和跨 worker 凭据隔离由用户明确豁免并接受风险,`realTurnVerified=false`,不得写成 Pass。
|
||||
- 客户端更新检查由 Electron Main 持有。缺少当前平台正式稳定 manifest 必须保持错误并提示稍后重试或从官网下载,不得宣称“已是最新版”;设置页只显示一条中文用户提示,原始堆栈、URL、路径和错误码只保留在 Main 日志。
|
||||
- 一个 AI 绘画 Workspace 可以包含多条独立 Conversation;新建 Conversation 不得创建新 Workspace。
|
||||
- Conversation 持有消息、Brief、Quote 和 `turnRevision`;生成任务和资产属于 Workspace,切换 Conversation 后必须继续可见。
|
||||
- 每条 Conversation 使用服务端持久 Agent Gateway Session。客户端注销或退出时只关闭本地流并清除本机 Session-id 缓存,不删除服务端 Session。
|
||||
- Conversation 异步与流式更新必须同时核对 Workspace 和 Conversation 身份;任务事件按 Workspace 归并。
|
||||
- 已连接的 Conversation Agent 命令、Run 和设计事件共用 WebSocket。只有命令发送失败、连接关闭或 ACK 超时可用同一 `client_command_id` 回退 REST;Gateway 结构化业务错误不得重复提交。Main 只向 Renderer 投影已知错误码的固定中文提示,未知上游错误文本必须脱敏为通用提示。
|
||||
- 一个 AI Design Workspace 公开一个 current Direction、一个 persistent Agent Session 和一个 Current Specification;conversation timeline 不是独立创建或选择的权威对象。
|
||||
- Living Form 只能投影服务端 Current Specification。Chat、direct edit、decision、proposal、lock、Asset binding 与 restore 必须通过同一 V2 reducer;Renderer drafts 在 accepted 前保持本地。
|
||||
- 每个 mutation 使用稳定 command 与 semantic operation identity。transport-unknown 只能重放原命令;business rejection、timeout 或用户再次点击不能自动生成新的业务意图。
|
||||
- Direction projection 是 Specification 真值。event cursor、assistant delta、Task progress 与 Asset event 只用于传输/资源收敛,不得推进或覆盖 canonical specification revision。
|
||||
- Main 只向 Renderer 投影已知错误码的固定中文提示,未知上游错误文本必须脱敏为通用提示;Works Token、stream ticket、provider internals 留在 Main/服务端。
|
||||
- AI 绘画 Workspace JSON 请求与 shared Works token refresh 必须覆盖取凭据、发请求和读取响应 body 的完整 30 秒 deadline;即使底层 transport 忽略 abort,调用方也必须确定性结束为 `504 DESIGN_WORKSPACE_REQUEST_TIMEOUT` 并释放共同等待者。Electron-to-Node 透明 fallback 仅允许 `GET`/`HEAD`/`OPTIONS`;mutation 不得因 transport failure 被隐式重放,任何重试必须由上层显式幂等合同授权。
|
||||
- 确认生成后按 Quote 对账 Workspace 任务。任务已经落库但 Run 随后失败时应恢复右侧任务列表;切换 Conversation 后仍同步 Workspace 任务,但旧确认不得覆盖当前 Conversation、清除其 pending turn,或用任务对账失败覆盖新会话错误。
|
||||
- 图片生成支持无参考图的文生图和单参考图图生图;参考图必须来自当前 Workspace 的已完成图片 Asset,或先通过现有 Workspace 上传接口把本地图片转成 Asset,再随当前 Conversation Turn 提交唯一 Asset ID。
|
||||
- 视频首帧与图生图参考图复用单图选择器,但用途由当前 Brief medium 决定:只有明确 `image` 使用图生图语义,`video`、null 或缺失值保持视频首帧兼容语义。选择作品或上传成功后应关闭弹窗。
|
||||
- 当前 quick reply 文案匹配只是兼容契约;新增更多素材输入用途前,应改为结构化 action/purpose,不得继续依赖本地化展示字符串推断行为。
|
||||
- Canvas generation Quote 的最终 Prompt、清晰度、画幅或视频时长变化必须经服务端重新报价;报价进行中不得确认。客户端只展示服务端返回的设计点并提交参数原值,不计算供应商价格、尺寸映射或积分价格。
|
||||
- `design.quote.request` 必须绑定 exact current Specification revision 并返回 immutable Quote;任何 production-meaning edit 都需要新 revision 与新 Quote。
|
||||
- `design.generation.confirm` 只提交 Quote identity。客户端不编辑 provider Prompt/model/route/storage,不计算 Token Points,也不把 Task recovery 当作再次确认授权。
|
||||
- 图片/视频 source 必须是当前 Workspace 的 canonical Asset,并通过 typed binding 进入 Specification;medium/role 决定用途,不得从 quick-reply 文案、V1 Brief 或本地路径推断。
|
||||
- Task/Asset reconciliation 只能更新 Workspace resources;已经落库但事件迟到的 Task 可通过 refresh 恢复,不能覆盖 Living Form、local drafts 或 pending Design input。
|
||||
- 删除 Canvas 项目必须要求用户完整输入项目名并通过 Main-owned Workspace DELETE。成功后被删 Workspace 的会话、任务和资产不得继续留在 Renderer 可访问状态;服务端决定软删除、任务取消、预留积分释放和运行中任务结算。
|
||||
- Prompt Museum 只展示服务端审核并带稳定作者、来源、许可证/署名和素材授权信息的内容;客户端不内置数据集、不推断缺失版权、不提供投稿/点赞/评论/收藏/关注/排行,也不自动发送或生成选中的 Prompt。
|
||||
- Prompt Museum Renderer 只能通过 Main-owned 固定 GET 路由读取列表和详情。Works Token 不得进入 Renderer;列表查询只允许搜索、使用场景、风格、主体、语言、模型、游标和限制字段。需要受保护图片时必须新增 Main-owned 媒体代理,不能把 access token、内部路径或用户隐私放进图片 URL。
|
||||
@@ -91,11 +90,10 @@
|
||||
- 生产整链需要真实账号、新上传/校验合同、OSS immutable Release、CDN/Edge、运营审核、App 播放与监控环境完成最终验收;当前客户端验证不能替代该验收。
|
||||
- 是否需要在生产发布链引入绑定精确 Release/digest 的可信 runtime verifier;当前客户端 loopback preflight 不能承担该职责。
|
||||
- 在一个客户端兼容版本且服务端与存量数据稳定提供 `play_url` 后,移除 `runtime_url` 回退。
|
||||
- 多 Conversation 客户端发布前需确认服务端迁移 `0033`、Conversation API 与持久 Session 契约已经部署。
|
||||
- Design V2 发布前必须在停止服务的目标数据库运行 cutover dry-run、解决全部 blocker、显式 apply 并验证 remaining legacy rows 为零;客户端与服务端必须成对部署。
|
||||
- 图生图随客户端发布前,需确认相匹配的服务端 `image_to_image` Brief/Quote/Task 冻结、私有源图复核与 Bailian edit 执行链已部署,并使用真实 Workspace Asset 完成生产 smoke。
|
||||
- Updater 生产恢复仍需对齐权威版本、发布正式签名/公证的平台产物,并从旧安装版本执行发现、下载、重启和安装 smoke;源码提示修复本身不构成发布链恢复。
|
||||
- AI Canvas 双向 Gateway 与 Quote 任务恢复仍需真实账号执行一次生产确认 smoke,核对 WebSocket 不产生 `/runs/{run_id}` 轮询、任务按 Quote 出现在 Workspace 列表,并区分真正的 `agent_runtime_unavailable` worker 故障。
|
||||
- AI Canvas 请求冻结修复仍需在安装包内用真实账号重复 Quote PATCH、重试报价和继续调整:确认超时在 30 秒内释放 UI、并行请求可继续、服务端没有隐式重复 mutation。临时 `disable-http2` 不构成根因结论;修复确认后应恢复 HTTP/2 做对照 smoke,再决定正式协议策略。
|
||||
- AI Canvas V2 仍需安装包真实账号 smoke:direct edit、chat edit、Quote request、confirmation、background completion、result download 与 deliberately interrupted unknown-result retry;生产 Provider 激活需另行授权。
|
||||
- Robot Guided Hotspot Binding default-on 发布仍需确认指定硬件/固件确实提供被审计的开放 Hotspot/Portal、部署端签发严格六位 ASCII 数字码且与 Works validator 的时效/消费语义一致,并完成 Windows 真机、签名 macOS x64/arm64 native worker/association 与真实设备端到端 smoke。
|
||||
- Prompt Museum 客户端契约和页面完成不等于 Works Square 内容后台、审核数据或 CDN 已部署;上线前需以真实登录账号验证列表、详情、署名链接、分页、图片和 Prompt 回填。
|
||||
- Learning 客户端集成不等于 Works Square 运营后台、对象存储或项目 API 已部署;上线前需先部署服务端合同,再以真实账号验证发布/下架、分页、远程 HTTPS README 图片(含 SVG 与失败隔离)、保存取消、缺失或错误 `Content-Length` 的 ZIP、摘要/签名错误以及 Windows/签名 macOS 安装包。
|
||||
|
||||
@@ -4,6 +4,7 @@ Use this index for searchable, traceable evidence records.
|
||||
|
||||
| Date | Topic | Status | Source | Detail |
|
||||
|---|---|---|---|---|
|
||||
| 2026-08-30 | MakeLore AI Design Living Form V2 hard cutover | Integrated locally with matching server source; production data cutover and Provider activation pending | Client source `b0b5a602b501308a23eb27e2f51a5169b9e46b1e`, server source `b5351d54f595ce8eb873593e462e4a556bea0b05`, integration task `20260830-integrate-marketplace-design-client-main-9d5f3b82`, ADR-007 | Replaces nested V1 Conversations, Briefs, editable provider Prompt, mutable Quote PATCH, and local semantic fallback with one current Direction, one Living Form/Specification authority, stable operations, immutable Quote confirmation, and Main-owned V2 transport. Client source passed typecheck, lint with zero errors, 1,425 unit tests, Vite/Electron build, and 2 Electron E2E tests. Server source passed 2,626 tests / 31 skipped under UTF-8 mode. No production database cutover, real paid Provider request, deployment, or publication occurred. |
|
||||
| 2026-08-30 | MakeLore curated Plugin Marketplace Release A | Integrated locally; XMA-01 live acceptance PASS; production trust activation HOLD | Source `40df677a31ff7651f962151eb84b925987781c03`, source task `20260828-plugin-marketplace-client-5f8b3d72`, integration task `20260830-integrate-plugin-marketplace-client-6e3b9d82` | R7 Standards/Spec passed with zero findings. XMA-01 passed 12/12 using real PostgreSQL, signed-in packaged MakeLore, Operations-published temporary-key packages, A/B account isolation, immutable install/update/freeze/rollback, project/Agent/Pi materialization, lifecycle invalidation, pricing-only ETag change, Data Service 10 tools/14 operations and zero Token Point transactions. Final Windows installer was 208,235,670 bytes with SHA-256 `738A2F6573C502281787F418EA666C6E62C287CA0EC13C6EB22369DAB0B3FFFA`. The official Ed25519 public key was not supplied, so the production trust store correctly remains fail closed; no deployment or production publication occurred. |
|
||||
| 2026-08-26 | Makelore Code Pi hard cutover、后台运行 ownership 与 Works user-context Provider 修复 | 本地 `main` 已集成;Windows 最终安装包与 packaged proof Pass;真实 Provider/macOS/native Linux 非 Pass | 集成交付 `48a9189`、实现 `a098266`、任务 `20260826-fix-pi-model-provider-8d4c2a71` / `20260826-integrate-pi-provider-fix-6e4c2a91`、`docs/pi-runtime-release-runbook.md` | OpenCode production runtime/package/plugin/fallback 已删除,Pi `0.84.2` 是唯一 runtime。未解析 Conversation 现在 validate→persist resolved model→prepare;exact Works `works square AI gateway did not return one-api user context` 会失效缓存 credential、以非重试 Provider-auth failure 结束且不自动 replay,`agent_end willRetry:false` 不再被 `agent_settled` 覆盖成 completed。聚焦 47/47、related 54/54、projector 12/12、181 files / 1541 full unit + pressure、typecheck、lint、Vite build、Windows Electron 4/4、publish/runtime/artifact/Pi/subagent/final packaged proof 通过。NSIS 208,162,564 bytes,SHA-256 `A02F79FCD3273FB0B013450492DC788B6E5ED7BBC1007468FB83BE949B8CB30D`,未签名;final app.asar SHA-256 `A8394D0F7324B27D2C95469ABD4E2A39C739EABCC6D8B41E1D65BA4B41FB9D39`。真实 Provider 是 Explicitly Waived / Accepted Risk 且 `realTurnVerified=false`;macOS x64/arm64 与 native non-WSL Linux 未验收。 |
|
||||
| 2026-08-21 | AI 编程模型切换真实 OpenCode wire 与 fresh runtime proxy token 修复 | 客户端实现及自动化验证通过;新构建真实本地 smoke 待执行 | 源任务 `20260821-model-switch-runtime-fix-a83d6c91`、源提交 `cce7722`、集成任务 `20260821-integrate-model-switch-fix-8f2d6c41` | 本地 1.1.8 / OpenCode 1.18.9 日志暴露旧请求缺少 `model.id`,且每进程 Host API token 被误判为 provider credential rotation。Main client 现将内部 `modelID` 映射为 wire `id`;owned fresh runtime 构建时注入当前 proxy token,持久化该已生效值不再要求 restart,attached/unknown 与 timeout/partial persistence 仍 fail closed。4 files / 171 focused、177 files / 2074 full unit、typecheck、lint(0 errors / 6 existing warnings)、production build 与 Electron E2E 1/1 通过。 |
|
||||
|
||||
Reference in New Issue
Block a user