Merge remote-tracking branch 'origin/main'
Some checks failed
Electron E2E / Electron E2E (macos-latest) (push) Has been cancelled
Electron E2E / Electron E2E (ubuntu-latest) (push) Has been cancelled
Electron E2E / Electron E2E (windows-latest) (push) Has been cancelled

# Conflicts:
#	.project-docs/20-architecture/module-map.md
#	src/pages/ImageCanvas/DesignConversationPane.tsx
#	tests/unit/image-canvas-page.test.tsx
This commit is contained in:
inman
2026-09-07 18:40:36 +08:00
17 changed files with 2437 additions and 105 deletions

View File

@@ -4,6 +4,9 @@
Accepted / implemented, amended 2026-09-07
Amended on 2026-09-07 to define operation-scoped public activity as transient
presentation state beneath the matching optimistic user message.
## Date
2026-08-30
@@ -34,6 +37,12 @@ are expressed through public Prompt aliases bound to canonical Assets.
- 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.
- While a chat operation is pending, Electron Main may normalize the server's closed
`design.assistant.progress` lifecycle into fixed youth-safe stages, and Renderer
may show one transient activity panel beneath the matching optimistic user message.
Activity is not a canonical Turn, Current Specification state, assistant content,
or evidence that a change committed. Model chain-of-thought, prompts, Provider
responses, tool arguments, and unvalidated model text are never rendered.
- 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.
@@ -73,6 +82,8 @@ and uncertain retries auditable without exposing provider internals.
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.
- Replayed activity and generic terminal Gateway events reconcile by the original
operation identity. They do not create another message, form, or retry intent.
- Layout and reference aliases are public projections, not new semantic authorities.
Any future UI must preserve one active plan, stable Asset identity, and the exact
Specification-revision/Quote boundary even if its visual arrangement changes.

View File

@@ -34,6 +34,7 @@
| 客户端更新检查 | 设置页 | Renderer update store → IPC → Main AppUpdater → 目标 feed | Main 记录并重抛原始错误Renderer 只显示去重、脱敏的单条提示,稳定源缺包不伪装为最新版 |
| Design Workspace load | Canvas 中央区与右侧 Works rail | Renderer Host API → Main-owned Works Square V2 adapter → current Workspace/Direction/Living Form projection | 一个 Workspace 公开一个 current Direction 与 persistent Agent Session右 rail 只选择/创建/删除 Workspaceconversation 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 | 全部进入同一 reduceraccepted 前 draft 保持本地revision conflict 刷新权威投影unknown result 复用原 command/operation identity |
| Design activity and reply streaming | Direction Gateway journal | Main 固定活动阶段归一化 → Renderer operation-scoped activitycommitted assistant delta → matching provisional assistant bubble → canonical Turn | `design.assistant.progress` 只显示在对应 optimistic user message 下方,不成为消息或右侧摘要;`design.assistant.delta` 只投影已提交回复。两者都按 Workspace、Direction、operation identity 和 replay cursor 收敛,均不改写 Specification |
| 设计有限请求生命周期 | 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 不隐式重放 |
| Design Asset binding | 当前 Workspace 已完成图片 / 本地上传 | canonical Asset → typed `asset_binding` input → Current Specification revision | 图片/视频用途由 Specification medium 和 binding role 决定;只提交真实 Workspace Asset identity不使用本地路径或自然语言占位 |
| Design reference alias editing | Active plan 的 final Prompt 与 binding-only reference row | `@图片N` token/add/replace/remove → typed field/collection operations → Current Specification revision | Prompt 决定图片如何参与生成row 只管理稳定 reference/Asset identity。未绑定 alias 定点要求上传并阻止 Quote删除时原子移除 binding 并重排后续 alias既有 alias 不重复插入 |

View File

@@ -36,11 +36,11 @@
| `electron/coding-runtime/pi/{extension-host,subagent,write-lease}.ts` / `electron/main/background-lifecycle.ts` | 必需 Makelore extension、显式安装且启用的 Device Package extensions、交互、子 Agent、同项目写租约与后台运行租约 | parent generation 加载完整 Main-selected extension 集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 Design V2 Workspace、Direction、Living Form、immutable Quote、Task、Asset 与事件共享契约 | Current Specification 是唯一语义权威Task/Asset 属于独立 Workspace resource projection |
| `shared/image-workspace.ts` | AI Design V2 Workspace、Direction、Living Form、immutable Quote、Task、Asset 与事件共享契约 | Current Specification 是唯一语义权威Task/Asset 属于独立 Workspace resource projectionpublic activity 是固定、operation-scoped presentation contract |
| `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 classificationsafe errors |
| `src/stores/image-workspace.ts` | Current Workspace/Direction/Living Form、local drafts、pending operations 与 Workspace resources | revision conflict 刷新 canonical stateevent order/Task progress 不成为 Specification authority |
| `src/pages/ImageCanvas/{index,DesignConversationPane,DesignProductionPanel,DesignHistoryRail,DesignWorksRail,YouthCreationCard}.tsx` | 左侧 Workspace 项目导航、中央 conversation/active 制作方案、右侧全高历史作品栏、immutable Quote confirmation | active 方案留在时间线;桌面端已提交 Tasks 与 Assets 进入右侧历史栏,紧凑窗口仍在时间线内展示。最终 Prompt、reference binding 与直接参数编辑继续通过同一 V2 reducer确认只提交 Quote ID |
| `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 classificationsafe 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 stateactivity/delta/terminal event 按 Workspace、Direction 和 operation identity 收敛;event order/Task progress 不成为 Specification authority |
| `src/pages/ImageCanvas/{index,DesignConversationPane,DesignProductionPanel,DesignPlanHistory,DesignHistoryRail,DesignWorksRail,YouthCreationCard}.tsx` | 左侧 Workspace 项目导航、中央 conversation/active 制作方案与 operation-scoped AI activity、右侧全高历史作品栏、immutable Quote confirmation | active 方案留在时间线;桌面端已提交 Tasks 与 Assets 进入右侧历史栏,紧凑窗口仍在时间线内展示。固定活动附着于对应 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/DesignHistoryRail.tsx` | 当前 Workspace 的全高右侧历史作品栏 | 桌面为 320340 px 右 rail按时间展示 Tasks 与生成 Assets紧凑布局将同一历史保留在中央时间线 |
| `src/pages/ImageCanvas/DesignWorksRail.tsx` | 紧凑布局的 Workspace 选择、创建和删除 | 仅作为左侧项目 Sheet 使用;无“获取灵感”入口,不创建嵌套 Conversation |

View File

@@ -30,8 +30,8 @@ Makelore 是 Electron 桌面客户端。Renderer 负责项目操作与状态展
| Device Packages | Conversation install tools → Main-owned inspect/preview/confirm/commit → immutable local generation → parent Skill/Pi-extension resources | 支持 npm、Git、绝对本地 Plugin 目录与 loose `SKILL.md`没有可见安装入口、Account Library、Release、Admission 或 Marketplace Package Store。可执行 extension 与非空 Skill `scripts/` 拥有桌面用户权限,必须披露并独立确认;生命周期脚本禁用。每个 generation 包含所有显式安装且当前启用的 Skill/extension新/idle parent 自动刷新active parent 在 turn settled 后刷新child 始终为空。 |
| Unified Plugin Workspace | Project Configuration 的 `插件` ResourceCard → `/project-config/plugins` same-page wide sheet | 复用统一 Plugin controller 与生命周期Project Configuration 保持挂载Code 侧栏不再提供独立入口;`/plugins` 和旧 Plugin URL 仅做保留查询条件的兼容重定向 |
| AI Design Workspace & Living Form | 一个 Workspace 的当前 Direction、Current Specification、持久 Agent Session、conversation timeline、Tasks 与 Assets | 中央区域承载对话和唯一 active 制作方案320340 px 右侧 Works rail 承载 Workspace 导航;紧凑布局使用同一右侧 Sheet。Renderer 只持有草稿和已接受投影 |
| AI Design Input & Reconciliation | Chat、字段/集合编辑、decision、proposal、lock、Asset binding 与 restore | 全部进入同一 `design.input.apply` reducer稳定 command/operation ID 支持 unknown-result 重放revision conflict 刷新权威状态;待提交 chat 从同一 pending operation 临时投影assistant delta 只能在匹配 operation 的一个未完成助手气泡中临时绘制且不生成独立整理进度栏 |
| AI Design Gateway Routing | Main-owned Works Square V2 adapter 与 Direction event stream | Main 持有 Works Token、stream ticket、WebSocket、重试分类和错误脱敏事件顺序与 Task progress 不构成 Specification 真值 |
| AI Design Input & Reconciliation | Chat、字段/集合编辑、decision、proposal、lock、Asset binding 与 restore | 全部进入同一 `design.input.apply` reducer稳定 command/operation ID 支持 unknown-result 重放revision conflict 刷新权威状态;待提交 chat 从同一 pending operation 临时投影,固定 public activity 附着于该用户消息,assistant delta 只进入匹配 operation 的一个未完成助手气泡;两者都不生成独立语义权威或全局整理栏 |
| AI Design Gateway Routing | Main-owned Works Square V2 adapter 与 Direction event stream | Main 持有 Works Token、stream ticket、WebSocket、重试分类和错误脱敏Main 将闭集 `design.assistant.progress` 阶段归一为固定中文不透传模型推理或任意服务端文案事件顺序、activity 与 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 保存 |
| Dormant Prompt Museum compatibility | Retained Main Host API/auth/media validation/shared DTO → Works Square | 当前 App 不挂载或打包 Museum 页面Canvas 无“获取灵感”入口,历史 `/image-prompts` 重定向到 `/image-canvas`;保留代码不是可见产品模块 |
@@ -96,7 +96,8 @@ Makelore 是 Electron 桌面客户端。Renderer 负责项目操作与状态展
- 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、Direction、revision 和 operation identityDirection snapshot 是 Specification 真值Task/Asset 事件只更新 Workspace resource projection。
- 待提交 chat 可以从现有 pending operation 立即投影为明确标注“发送中/正在确认”的用户气泡,但只有服务端 canonical turn 能进入对话历史;确定失败必须恢复原草稿,不能另建一套消息状态或新业务意图。
- `design.assistant.delta` 是未完成的传输状态,不是 canonical assistant turn。Renderer 只能把它临时绘制为与同一 pending chat identity 绑定的单个未完成助手气泡,并在该 operation 确定收敛后由 canonical turn 替换不得持久化为第二条消息、伪装为已完成回复或创建独立整理进度栏。unknown outcome 保留原 identity 与已有片段,其他 operation 的更新不得全局清除它;中央 active 制作方案继续呈现 AI 当前整理出的设计理解。重叠连接与重放 chunk 必须按连接 generation 和 `chunkIndex` 收敛。
- `design.assistant.delta` 是未完成的传输状态,不是 canonical assistant turn。Renderer 只能把它临时绘制为与同一 pending chat identity 绑定的单个未完成助手气泡,并在该 operation 确定收敛后由 canonical turn 替换不得持久化为第二条消息、伪装为已完成回复或创建独立整理进度栏。unknown outcome 保留原 identity 与已有片段,其他 operation 的更新不得全局清除它;中央 active 制作方案继续呈现 Current Specification 的公共投影。重叠连接与重放 chunk 必须按连接 generation 和 `chunkIndex` 收敛。
- `design.assistant.progress` 是与同一 pending chat identity 绑定的瞬时活动投影,可在 optimistic user bubble 下更新和折叠。它只能使用 Main 归一化的固定阶段,不得成为 conversation Turn、中央 active 制作方案中 Current Specification 的副本、通用全局整理栏或 model chain-of-thought终态事件按原 operation identity 收敛它。
- 确认生成只提交不可变 Quote ID。Task 事务已提交但事件迟到时可刷新 Workspace projectionTask progress 不得改写 Living Form 或授权新的生成操作。
- Updater feed 选择、原始错误日志、下载和安装生命周期只属于 Electron Main。Renderer 不得把缺失稳定 manifest 投影为“已是最新版”也不得显示原始堆栈、URL、路径或错误码并发检查共享同一错误事件时只发送一次错误状态后续独立重试仍可重新报告。
- 图片与视频复用同一个单图来源选择器。图片 Brief 可从当前 Workspace 的已完成作品或本地上传中选择一张参考图继续生成;视频 Brief 使用同一入口绑定首帧。两条路径都必须通过现有 Workspace Asset 上传/选择契约提交一个真实 `attachmentAssetIds`,不得用本地路径或自然语言描述代替资产身份。

View File

@@ -4,6 +4,103 @@ This file is the integrated default-branch snapshot. Feature tasks record progre
## Integrated Through
- Local AI Design activity frontier
`4b894c7e320cdf829888f63f501d176f051be7d7` and fetched remote frontier
`918f8f80dca61b0f561f96b168e4ef541734d414` are reconciled by the ordinary
two-parent merge prepared under task
`20260907-complete-current-merge-b61e4a93`. The semantic resolution keeps the
remote Code/Canvas/Plugin/Learning-removal product state while adding the local
Main-normalized, operation-scoped Design activity panel to the matching pending or
canonical user turn. Activity and assistant delta remain transient projections;
the central active production plan remains the Current Specification projection.
Typecheck, 90 focused tests, lint with 0 errors and 5 existing warnings, all Vite
targets, targeted Electron E2E 12/12, pressure 1/1, and staged-diff checks passed.
The ordinary unit suite passed 1,933 tests with 2 skips; its sole failure was the
unchanged Pi real-process two-second timing assertion, which also missed its limit
in isolation on this Windows host. No push, package, deployment, publication,
production database, paid Provider, or historical user-data change is claimed.
- AI Design operation activity source
`81b524a02c2cf51304090afa8fb89d27c72c5d2b` from task
`20260907-design-agent-activity-client-b6d913e4` is integrated by task
`20260907-land-design-agent-activity-e3b7a1c9`. Electron Main now
normalizes the server's four closed public stages into fixed youth-safe copy;
Renderer attaches one transient, update-in-place `AI 处理过程` panel to the exact
optimistic user message and collapses completed work without creating a chat Turn
or duplicating the right-side Current Specification. Workspace, Direction,
operation, pre-command turn sequence, connection generation, cursor, and terminal
events keep replay and stale results scoped; unknown outcomes retain the original
identity. Integration review additionally preserves prior completed/unknown activity
when a later chat starts and keeps each pending user's activity and provisional
reply together in visual order. Final committed assistant text continues through
the existing provisional assistant bubble and canonical Turn replacement. Focused verification passed 69
tests, TypeScript, changed-file ESLint, and all Vite production targets. No server,
database, billing, Quote/Task, navigation, package, deployment, publication, or paid
Provider call changed.
- Token Point V2 account-usage source `6348e402a4e8dde712e5cba4620bb883ffe24e0b`
from task `20260906-trace-makelore-usage-3d7a5c1e` is integrated onto local
`main` by task `20260906-integrate-token-points-v2-7b4e1c92`. The account menu
now uses the Main-owned `/api/works/billing/points` route and the Works Square
`/api/billing/points` authority instead of the retired rolling-window usage
contract. Managing accounts see the authoritative plan, weekly remaining/allowance,
total remaining points, and refresh time; loading and retrieval failures remain
explicit. Every non-managing account receives only coarse `shared_available`
state, including both family-shared members and youth self entitlements, and never
receives plan, cycle, or exact balance fields through the Main projection. Source
verification passed 72 focused tests, typecheck, scoped lint, all Vite targets,
diff/source checks, and two matching Works Square V2 contract tests. The deployed
service/database state and signed-in packaged-client smoke remain release evidence
gaps; no server deployment, database migration, package, publication, or remote
push is claimed.
- Automatic Game Resource delivery source
`6113a2453299141eab8420a56e93675712dd607b` from task
`20260906-game-resource-auto-delivery-7a4e2c91` is integrated onto local `main`
as product commit `4df4bc96245c01cd95e35ddf1b2b03d0e0d231c5` by task
`20260906-game-resource-auto-delivery-integration-8c4e1a72`. One confirmed
`game_resource_generate` call is now a Main-owned submit-and-deliver operation:
Main submits once, polls the accepted execution internally, downloads every terminal
output, and saves the files under the frozen original project at
`assets/generated/game-resource/<executionId>/`. Provider execution, billing, and
local delivery remain separate states. A durable user-data receipt resumes only the
local download/save phase after an interruption, so it cannot create a second
Provider submission or Token Point charge. The shared project write lease is held
only while terminal outputs are materialized, and the Agent-visible status/save tools
and second save confirmation are removed. Source verification passed 99 focused
tests, the 1,901-test full unit suite with 2 skips plus pressure, typecheck, lint with
0 errors/5 unchanged warnings, all Vite targets, 8 Electron tests, the unified Plugin
E2E journey, and Windows x64 runtime staging. No live paid Provider generation,
client installation, deployment, publication, or push is claimed.
- Official project-wide Plugin activation source
`718783f6837e29f56c9add633596249c03e5701f` from task
`20260905-official-plugin-project-scope-6e4a9c21` is integrated onto local `main`
as `e0de7aa28c1d6e97454f0e4073ae9153e746bb4b` by task
`20260905-official-plugin-project-scope-integration-8b3d6f42`. The shared
activation predicate now treats `makelore.data-service`,
`makelore.game-resource`, and `makelore.project-scaffold` as code-owned official
project Plugins: after their existing system delivery or Account acquisition and
project enablement, every parent Agent receives the full Skill/tool set without an
Agent-assignment gate or partner-assignment action. Child Agents remain empty;
downloaded Marketplace and local Device Packages retain their existing lifecycles,
and stored assignments for the three official identities may remain inert. Source
verification passed 30 focused, 70 adjacent, and 37 resolver/composition tests,
typecheck, lint with 0 errors/5 unchanged warnings, all Vite targets, and the
targeted Electron project-Plugin journey. The ordinary full unit run had one
unrelated two-second Pi real-process timing miss among 1,889 passes/2 skips; that
exact file passed 6/6 in isolation. A rebuilt and installed client smoke is still
required; this source integration does not change an already running binary.
- Project Scaffold project-wide activation source
`300ac89a81409440aac84ff45b1d9ca2fa186629` from task
`20260905-project-plugin-scope-7c4e9a21` is integrated onto local `main` as
`6710527e8f7150a6c4997d566a380454e33f455e`. The code-owned
`makelore.project-scaffold` remains Account-acquired and project-enabled, but no longer
has an Agent-assignment gate or partner-assignment action. Main now materializes its
complete Skill set for every parent Agent in the enabled project; child Agents remain
empty, active generations keep their existing freeze boundary. This was the initial
narrow exception and is superseded by the three-identity official rule above; Plugins
outside that set retain their assignment semantics. Source verification passed 45 focused and 87
adjacent tests, typecheck, lint with 0 errors/5 unchanged warnings, pressure, and all
Vite targets. One unrelated two-second Pi real-process timing assertion failed in the
ordinary full run and passed 6/6 in isolation. A rebuilt/installed-client smoke remains
pending; local source integration does not replace an already installed binary.
- Remote `main` frontier `da29294` is semantically integrated with local
frontier `f53683a` under task
`20260907-integrate-remote-before-push-a4c9e27b`. The merge retains the
@@ -721,7 +818,7 @@ This file is the integrated default-branch snapshot. Feature tasks record progre
AI Design Canvas 现在以中央 conversation timeline 加唯一 active 制作方案、右侧 320340 px 全高 Works rail 的两区布局服务创作者Canvas 路由不挂载全局左栏,紧凑宽度把同一 Works rail 放进右侧 Sheet。Active 方案的 `content.concept` 直接作为可编辑“创作提示词”类型、画幅、视频时长和数量保持紧凑直控已提交、运行中或终止方案折叠进对话历史。Reference 使用稳定 reference ID、真实 Workspace Asset binding 与连续 `@图片N` aliasPrompt 是用途的唯一可见表达binding row 只管理缩略图、文件、alias、替换与删除。未绑定 alias 提供定点上传并阻止 QuotePrompt/reference/参数变更产生新 Specification revision 和新 immutable Quote。一个 Workspace 仍只公开一个 current Direction、一个 persistent Agent Session 和一个 Current Specificationconversation timeline 只记录交互历史。Chat、direct edits、decision responses、proposal acceptance、locks、Asset binding 与 restore 都通过 `design.input.apply` 进入同一服务端 reducerRenderer 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 V2V1 DTO、local semantic adapter、mutable Quote PATCH 与 editable provider Prompt 已移除。
新提交的 Design chat 会立即从现有 pending operation 投影为带“发送中”或“正在确认”的临时用户气泡,服务端确认的 canonical turn 到达后再替换它;确定失败时原草稿重新出现在输入框。匹配该 pending chat 的 `design.assistant.delta` 可以临时合并显示为一个未完成助手气泡,并在 canonical turn 到达后被替换;它不进入 conversation timeline也不生成独立的“AI 正在整理你的想法”进度栏。中央 active 制作方案继续呈现 AI 当前整理出的 Current Specification 公共投影。重复连接和事件按 connection generation 与 `chunkIndex` 收敛。
新提交的 Design chat 会立即从现有 pending operation 投影为带“发送中”或“正在确认”的临时用户气泡,服务端确认的 canonical turn 到达后再替换它;确定失败时原草稿重新出现在输入框。`design.assistant.progress` 经 Main 归一为固定通俗阶段只在对应用户气泡下形成可更新、可折叠的“AI 处理过程”,不成为对话消息、中央制作方案或模型思考过程。匹配同一 pending chat 的 `design.assistant.delta` 只临时绘制为一个未完成助手气泡,随后由 canonical turn 替换;它不进入 conversation timeline也不生成独立全局整理栏。中央 active 制作方案继续呈现 AI 当前整理出的 Current Specification 公共投影。重复连接和事件按 connection generation、operation identity`chunkIndex` 收敛。
Prompt Museum 已退出当前产品面Canvas 不再显示“获取灵感”App 不挂载或 lazy-load Museum Renderer 页面,历史 `/image-prompts/*` 只重定向到 `/image-canvas`。Main-owned 固定 API、Works 认证、相对媒体路径校验、单次 401 刷新、可信 raster MIME/10 MiB 上限与共享 DTO 暂作为 dormant 兼容/安全基础设施保留,不代表可见模块或生产内容已启用;恢复入口需要新的明确产品决定。`pnpm run dev` 与 packaged Canvas 均使用云端 V2 适配器,产品 UI 只保留中文。

View File

@@ -0,0 +1,91 @@
# Task: Complete current remote main merge
## Identity
- Task ID: 20260907-complete-current-merge-b61e4a93
- Mode: Integration
- Branch: main
- Worktree: D:\Datas\OthersProjects\makelore
- Base commit: 4b894c7e320cdf829888f63f501d176f051be7d7
- Owner: codex-root
- Status: Ready for Integration
## Scope
- Take over the already-started merge of local `main@4b894c7` with fetched
`origin/main@918f8f8` after the user's explicit authorization.
- Resolve the seven remaining conflicts across AI Design source/tests and canonical
project memory, preserving compatible intent from both histories.
- Verify the reconciled tree and create the ordinary two-parent merge commit locally.
A remote push is not part of this request.
## Intent And Constraints
- Preserve the remote Canvas right-side Works rail, central active production plan,
stable `@图片N` reference flow, retired Prompt Museum surface, retired Learning
module, directory-only project creation, non-blocking `/chat` entry, and Project
Configuration-owned Plugin workspace.
- Preserve the local Main-normalized, operation-scoped `design.assistant.progress`
activity projection alongside the existing single provisional assistant delta.
Neither projection may become a conversation, Current Specification, authorization,
or chain-of-thought surface.
- Resolve semantic conflicts from base/ours/theirs and source-task evidence; do not
choose a side mechanically, rewrite history, abort/reset/stash the merge, or alter
unrelated user work.
- Keep all adopted foreign task records byte-for-byte unchanged. In particular, leave
the three pre-existing untracked task records outside this task's commit.
- Retain existing external acceptance limits: no production deployment, paid Provider,
signed-package, real-account, or publication success is claimed by a local merge.
## Outcome
- Reconciled local `main@4b894c7` with fetched `origin/main@918f8f8`; the index now
has no unmerged paths and is ready for the ordinary two-parent merge commit.
- Combined the remote central Canvas plan, right-side Works rail, plan history,
stable reference aliases, and inline Quote flow with the local operation-scoped
activity panel. Pending user message, activity, and provisional assistant reply
remain one ordered group; completed activity follows its canonical user turn.
- Reconciled ADR-007, architecture maps, business rules, and current state around one
Current Specification authority. Removed the obsolete required-Agent entry from
current state and did not restore Learning or the Prompt Museum Renderer surface.
- Preserved the remote directory-only project flow, non-blocking no-Agent chat entry,
Project Configuration Plugin sheet, all staged source-task history, and the three
pre-existing untracked task records.
- No history rewrite, remote push, package, deployment, publication, database change,
paid Provider call, or historical user-data mutation was performed.
## Verification
- Pinned package manager: `pnpm@10.33.4` confirmed through Corepack.
- `pnpm run typecheck` — passed.
- Focused Vitest across Image Canvas, Workspace Store/Route/adapter, youth plan, and
reference aliases — 6 files / 90 tests passed.
- `pnpm run lint:check` — passed with 0 errors and 5 existing warnings in
`src/pages/Home/index.tsx` and `src/pages/Makelore/index.tsx`.
- `pnpm run build:vite` — Renderer, Electron Main, Preload, and utility worker passed;
only existing Browserslist, mixed-import, and chunk-size warnings were emitted.
- Targeted Electron E2E across Canvas, retired Learning navigation, Code project
identity/navigation, Project Configuration, and Plugin flows — 12/12 passed.
- `pnpm test` — 225 files / 1,933 tests passed and 2 skipped; one unchanged test in
`pi-agent-server-process-real.test.ts` failed its two-second timing assertion. The
test and Pi worker/write-lease/Agent Server blobs are identical in base, both parents,
and the merge index. An isolated run completed the functional path in 3.139 seconds
but still exceeded the threshold; a later isolated run timed out during slow process
startup. The separately skipped pressure test passed 1/1. Full-suite green is not
claimed, and no unrelated threshold or Pi code was changed.
- Conflict-marker scan, unmerged-path scan, and `git diff --cached --check` — passed.
- Required project-document structure and task-aware drift/ownership checks — passed;
adopted foreign task-record fingerprints remain intact.
## Follow-ups
- The existing Pi real-process two-second timing test remains a separate Windows test
reliability/performance follow-up; this merge provides no evidence of a Pi code
regression and does not change its behavior or threshold.
- Push `main` only if the user separately requests publication to `origin`.
## Promotion Candidates
- Applied in this integration: ADR-007, module map, system overview, business rules,
and current state now describe the combined central-plan/reference layout and
operation-scoped transient activity contract. No further promotion is pending.

View File

@@ -0,0 +1,64 @@
# Task: Integrate AI Design agent activity UI
## Identity
- Task ID: 20260907-integrate-design-agent-activity-b7d3f1a8
- Mode: Integration
- Branch: codex/20260907-integrate-design-agent-activity-b7d3f1a8-integrate-design-agent-activity
- Worktree: D:\Datas\OthersProjects\.codex-worktrees\makelore\20260907-integrate-design-agent-activity-b7d3f1a8
- Base commit: da29294979da4ce041edf992b590ee6ea170a44f
- Owner: codex-root
- Status: Ready for Integration
## Scope
- Integrate client source commit `81b524a02c2cf51304090afa8fb89d27c72c5d2b` from exact base `da29294979da4ce041edf992b590ee6ea170a44f`.
- Promote the operation-scoped AI Design activity projection into canonical client memory.
- Verify Main event normalization, Renderer reconciliation, conversation rendering, and existing Design streaming behavior.
## Intent And Constraints
- Render only the server's fixed public lifecycle stages beneath the matching optimistic user message.
- Keep `design.assistant.delta` as the single provisional assistant-text stream and the right-side Living Form as the Current Specification projection.
- Never render raw chain-of-thought, prompt/provider/tool payloads, or a duplicate global “整理进度” banner.
- Preserve stable operation identity and existing unknown-result reconciliation.
- Do not touch or adopt unrelated changes in the root worktree.
## Outcome
- Fast-forwarded the exact source commit from the recorded base without conflict.
- Integrated Main-normalized public Design activity, operation-scoped Renderer
reconciliation, terminal-event convergence, and the conversation-attached activity
panel while preserving optimistic user messages and canonical assistant replacement.
- Fixed two integration-review findings: a later chat no longer erases earlier
completed/unknown activity, and each pending operation now renders its user message,
activity, and provisional assistant stream as one ordered group.
- Promoted the accepted transient-activity boundary into ADR-007, architecture maps,
data flow, domain rules, and current integrated state.
- No server contract, database, billing, Quote/Task, navigation, package, deployment,
publication, or Provider behavior changed.
## Verification
- `pnpm exec vitest run tests/unit/image-workspace-store.test.ts
tests/unit/image-canvas-page.test.tsx
tests/unit/works-square-design-workspace.test.ts
tests/unit/image-workspace-route.test.ts` — 69 passed.
- `pnpm exec tsc --noEmit` — passed.
- Focused ESLint across all eight changed TypeScript/TSX files — passed.
- `pnpm run build:vite` — passed; only existing chunk-size, dynamic-import, and
stale Browserslist-data warnings were emitted.
- `git diff --check` — passed.
- Independent integration review — PASS after the two multi-operation findings were
fixed and covered.
## Follow-ups
- Add an explicit snapshot/cursor reseed contract for a Gateway `cursor expired`
response in a separate transport-resilience task.
## Promotion Candidates
- Applied: ADR-007, system overview, module map, data flow, domain rules, and current
integrated state now define operation-scoped public activity as transient
presentation rather than Design authority or model reasoning.

View File

@@ -0,0 +1,63 @@
# Task: Land AI Design agent activity UI on main
## Identity
- Task ID: 20260907-land-design-agent-activity-e3b7a1c9
- Mode: Integration
- Branch: main
- Worktree: D:\Datas\OthersProjects\makelore
- Base commit: 7bdb42f26c60747fbabf3bb3a00e3df3477a46a3
- Owner: codex-root
- Status: Ready for Integration
## Scope
- Record and verify the root `main` landing of reviewed candidate
`7bdb42f26c60747fbabf3bb3a00e3df3477a46a3`.
- Promote this root landing task as the current-state integration owner while
preserving the retired candidate task record as immutable evidence.
- Preserve the three pre-existing untracked task records byte-for-byte and keep them
outside this task's commit.
## Intent And Constraints
- The candidate was fast-forwarded only after exact branch, ancestry, dirty-path, and
fingerprint preflight; do not rewrite its product tree.
- Do not reset, stash, clean, stage, or edit unrelated work.
- Reuse candidate tests and independent review; run the final root document, drift,
ancestry, fingerprint, and status gates that can detect landing-specific failures.
## Outcome
- `main` was fast-forwarded from
`da29294979da4ce041edf992b590ee6ea170a44f` to the exact reviewed candidate
`7bdb42f26c60747fbabf3bb3a00e3df3477a46a3`.
- The landed tree contains Main-normalized public Design activity,
operation-scoped Renderer reconciliation, terminal convergence, and ordered
optimistic-user/activity/provisional-reply groups.
- The three adopted task records retained preflight fingerprints
`728a9d4a20d4f0c4fee82177807c07e2a207264c`,
`2df2c08a55c2670f99588d3511deb1e533a6c97c`, and
`0538a686602b1ee7ef907880d65f5cf176b9916f`; they remain excluded from this task.
## Verification
- Candidate evidence: 69 focused tests, TypeScript, focused ESLint,
`pnpm run build:vite`, and `git diff --check` passed.
- Independent client activity integration review: PASS after the two
multi-operation findings were fixed and covered.
- Final root `check_project_docs.py`, task-aware `check_doc_drift.py`, and
`git diff --check` passed. `main` remained at the exact candidate, the candidate is
an ancestor, no non-document delta exists, and all three adopted fingerprints
remained unchanged.
## Follow-ups
- Add an explicit snapshot/cursor reseed contract for a Gateway `cursor expired`
response in a separate transport-resilience task.
## Promotion Candidates
- Applied: ADR-007, system overview, module map, data flow, domain rules, and current
integrated state define operation-scoped public activity as transient presentation,
not Design authority or model reasoning.

View File

@@ -135,7 +135,8 @@
- 每个 mutation 使用稳定 command 与 semantic operation identity。transport-unknown 只能重放原命令business rejection、timeout 或用户再次点击不能自动生成新的业务意图。
- Direction projection 是 Specification 真值。event cursor、assistant delta、Task progress 与 Asset event 只用于传输/资源收敛,不得推进或覆盖 canonical specification revision。
- 用户提交 chat 后,客户端可以立即把同一个 pending operation 投影为临时用户气泡,并明确显示“发送中”或“正在确认”;只有服务端返回的 canonical turn 才进入 conversation timeline。确定失败时必须让原草稿重新可编辑不得把临时投影持久化为第二条消息。
- `design.assistant.delta` 只用于未完成回复的传输和结果收敛,不得进入 canonical conversation timeline。客户端可以把它临时显示为与同一 pending chat identity 绑定的单个未完成助手气泡;确定收敛后必须由 canonical turn 替换unknown outcome 则保留原 identity 与已有片段。不得把片段伪装为完成回复、持久化为第二条消息、因其他 operation 更新而全局清除或另加独立的整理进度栏。AI 当前整理出的设计理解仍由中央 active 制作方案投影承载;连接重叠或事件重放按 connection generation 与 `chunkIndex` 去重收敛。
- `design.assistant.delta` 只用于未完成回复的传输和结果收敛,不得进入 canonical conversation timeline。客户端可以把它临时显示为与同一 pending chat identity 绑定的单个未完成助手气泡;确定收敛后必须由 canonical turn 替换unknown outcome 则保留原 identity 与已有片段。不得把片段伪装为完成回复、持久化为第二条消息、因其他 operation 更新而全局清除或另加独立的整理进度栏。AI 当前整理出的设计理解仍由中央 active 制作方案中的 Current Specification 公共投影承载;连接重叠或事件重放按 connection generation 与 `chunkIndex` 去重收敛。
- `design.assistant.progress` 只能由 Main 把服务端闭集 stage 归一为固定、通俗的活动文案,并附着在同一 pending chat identity 的 optimistic user bubble 下。它是可更新、可折叠的瞬时 presentation state不是消息、Current Specification、任务授权或模型思考过程不得显示 chain-of-thought、prompt、Provider response、tool argument、任意服务端文案或未验证模型文本。终态、重连和重放必须按原 operation identity 收敛。
- 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 被隐式重放,任何重试必须由上层显式幂等合同授权。
- `design.quote.request` 必须绑定 exact current Specification revision 并返回 immutable Quote任何 production-meaning edit 都需要新 revision 与新 Quote。对话或 Current Specification 就绪态可以引导用户请求并查看 Quote桌面端可定位到报价区、移动端可打开报价面板但该动作不得创建 Task。