integrate completed September 6 product changes

This commit is contained in:
inman
2026-09-07 11:05:25 +08:00
parent e069ec6294
commit 0fb1dac245
22 changed files with 314 additions and 924 deletions

View File

@@ -2,12 +2,14 @@
## Status
Accepted / implemented
Accepted / implemented, amended 2026-09-07
## Date
2026-08-30
Last amended: 2026-09-07
## Context
ADR-001 modeled a Workspace as multiple independently selected Conversations, each
@@ -16,6 +18,11 @@ 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.
The September 7 Canvas presentation refinement keeps that authority model while
making the current production plan easier to edit: conversation and the sole active
plan stay together, Workspace navigation moves to a right Works rail, and references
are expressed through public Prompt aliases bound to canonical Assets.
## Decision
- One Workspace exposes one current Direction, one persistent Agent Session, one
@@ -35,6 +42,21 @@ versioned Design Specification and a persistent form throughout the design flow.
- 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.
- The visible Canvas has two regions: a flexible central conversation timeline with
the only active editable production plan, and a full-height right Works rail for
Workspace navigation. Compact layouts expose that rail as a right Sheet. Terminal
submitted plans collapse into conversation history; they do not create a second
current-plan authority.
- The public `content.concept` projection is the directly editable final Prompt.
References retain stable reference IDs and typed Workspace Asset bindings while
appearing in that Prompt as continuous `@图片N` aliases. The Prompt is the only
visible expression of how a reference affects generation; the adjacent row manages
binding/file state only. An unbound referenced alias blocks Quote availability and
exposes a targeted upload slot.
- Prompt, reference binding, type, aspect-ratio, duration, or output-count changes
enter the existing typed reducer and create a new Specification revision. An offered
plan must be recompiled to a fresh immutable Quote before confirmation. Reference
count/media limits come from service capabilities, not client-only constants.
## Rationale
@@ -51,6 +73,9 @@ 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.
- 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.
## Supersedes
@@ -61,3 +86,6 @@ and uncertain retries auditable without exposing provider internals.
- Client source `b0b5a602b501308a23eb27e2f51a5169b9e46b1e`
- Server source `b5351d54f595ce8eb873593e462e4a556bea0b05`
- Server ADR `ADR-2026-08-28-001`
- Canvas refinement source `1562a49`
- Canvas refinement integration merge `ea1219c`
- Source task `20260906-canvas-reference-images-c4e97a`

View File

@@ -1,7 +1,8 @@
# ADR-008: 交互式 AI 应用使用显式 Scaffold Skill
- Status: Accepted / implemented
- Status: Accepted / implemented, amended 2026-09-07
- Date: 2026-09-04
- Last amended: 2026-09-07
- Applies to: Project creation, `ProjectType`, official bundled Marketplace Plugins, scaffold Skill, release readiness
## Context
@@ -10,12 +11,15 @@
项目服务当前已经只负责 `.makelore/project.json` 与 `knowledge/`。用户确认将小游戏和小程序合并为一个“交互式 AI 应用”类型,并把生成文件、目录以及提交审批要求放进由官方 Marketplace 管理、随签名客户端交付的 Skill。
后续面向青少年用户的验证表明,要求用户在创建时理解产品类型、模板、UUID 与初始化状态仍是多余门槛。用户进一步确认普通创建只应选择目录,其余身份与安全默认由客户端和 Main 自动处理;Scaffold Skill 保持可选能力,而不是创建或进入聊天的前置步骤。
## Decision
- 新建项目只提供规范产品类型 `interactive_ai_app`(显示为“交互式 AI 应用”)和 `custom`。`ProjectType` 创建后仍不可变。
- 普通新建项目只要求选择目录,不展示产品类型、模板、原始 UUID、绑定或独立副本选项。Renderer 写入内部默认 `interactive_ai_app`,Main 生成规范 UUID;`ProjectType` 创建后仍不可变。既有 `custom` 项目和底层兼容入口继续支持,但 `custom` 不再作为普通新建选项。
- `mini_game` 与 `mini_program` 只作为历史读取和脚手架兼容别名,在内存中归一为 `interactive_ai_app`。读取或运行脚手架不会改写原配置;后续普通配置变更可以保存规范值。缺少类型字段的旧项目仍归一为 `custom`。
- 项目创建只生成 `.makelore/project.json` 和 `knowledge/`,不生成业务源码、依赖、锁文件或发布模板。
- 代码内置的官方 Marketplace Plugin `makelore.project-scaffold` 提供显式 Skill `makelore-project-scaffold`。它保留 Account Library 获取、项目启用和 Agent 分配语义,但固定版本资源随 MakeLore 客户端交付,不经过 Package Store 下载。其脚本生成六个交互式 AI 应用起步文件;写入前预检全部目标,不覆盖已有路径,受控失败时只回滚本次创建的文件和目录。
- Main 为新项目自动生成 UUID,并为“其他 metadata 有效、仅缺 `projectId`”的旧配置串行补齐并持久化一次。原始 UUID、bind/independent-copy 选择不进入普通 UI;其他 metadata 缺失或无效仍是配置错误。旧 `initialized` 布尔只保留为 schema 兼容字段,不得阻断有效项目导航、聊天或首个 Agent 创建。
- 代码内置的官方 Marketplace Plugin `makelore.project-scaffold` 提供可选显式 Skill `makelore-project-scaffold`。它不是项目创建或聊天前置条件;其 Account Library 获取、项目启用和 Agent 分配语义保持独立,固定版本资源随 MakeLore 客户端交付且不经过 Package Store 下载。脚本生成六个交互式 AI 应用起步文件;写入前预检全部目标,不覆盖已有路径,受控失败时只回滚本次创建的文件和目录。
- Scaffold Skill 不安装依赖、不访问网络、不执行构建、不上传、不提交审核,也不提供 `--force`、类型覆盖或模板迁移状态。Main 继续独占固定 npm/Vite 构建、同字节预检、打包和上传;Works Square 继续独占服务端校验、不可变 Release 与运营审核。
- 官方 Plugin 的 `.mjs` 仅因它位于客户端固定、代码所有的 bundled resource root 中而可执行。应用通过不可覆盖的 `MAKELORE_NODE_EXECUTABLE` 向父 Pi worker/Agent Server 提供自身 Node;不得回退系统 Node。该例外不适用于 Marketplace 下载 artifact:P0 下载包仍只接受文本/图片 Skill 资源并拒绝 `.mjs`。第三方 Device Package 的可执行代码继续走自身的披露与确认边界。
- Skill 的发布检查只是只读准备度指导:区分确定阻断、源码包排除影响、运行时/平台待确认项和静态已满足项,并引用项目相对证据。它不能宣称构建、上传、审核或生产发布成功。
@@ -23,13 +27,14 @@
## Consequences
- 模板可随官方 Plugin 版本演进,不再扩大项目创建服务的职责,也不需要把脚本上传为 Marketplace artifact。
- 旧项目无需批量迁移即可继续打开、生成脚手架和发布;新写入只使用规范类型。
- 普通用户可从目录选择直接进入 `/chat`;没有 Agent 时显示非阻塞空状态并提供创建首个 Agent 的入口。Project Configuration 仍处理真正无效的 metadata,但不再承担初始化仪式。
- 旧项目无需批量迁移即可继续打开、生成脚手架和发布;普通新写入使用内部默认 `interactive_ai_app`,既有 `custom` 与历史类型保持兼容。
- 发布规则在 Skill 中可被 Agent 解释和预检,但权威执行仍只有 Main 与 Works Square,避免形成第二套发布实现。
- 对外分发仍需不可变 SemVer/Git 版本、服务端 bundled Release 元数据、已安装 Windows、签名 macOS 与 native Linux 运行证据;工作区测试不能替代这些发布门禁。
## Supersedes
本决定取代 2026-08-09 的双可发布类型与创建时自动生成模板行为;固定 Vite 构建、artifact contract、运营审核与公共播放边界保持不变。
本决定取代 2026-08-09 的双可发布类型与创建时自动生成模板行为,并于 2026-09-07 取代创建时的类型/身份选择及 `initialized` 工作区 gate;固定 Vite 构建、artifact contract、运营审核与公共播放边界保持不变。
## Related Evidence
@@ -41,3 +46,6 @@
- Marketplace source task: `20260904-marketplace-scaffold-client-6c4e8a21`
- Marketplace integration task: `20260904-project-scaffold-integration-client-4f2a8c71`
- Proposal: `10-decisions/proposals/20260904-project-scaffold-implementation-7e4c2a91__interactive-ai-app-type.md`
- Simplified-creation source commit: `af13aca`
- Simplified-creation integration merge: `39d7b7e`
- Simplified-creation source task: `20260906-remove-project-gate-7c31`

View File

@@ -4,8 +4,8 @@
| ID | Decision | Status | Date | Applies To | Detail |
|---|---|---|---|---|---|
| ADR-008 | 交互式 AI 应用使用单一规范类型,项目创建与官方 bundled Scaffold Skill、发布权威分离 | Accepted / implemented, amended 2026-09-04 | 2026-09-04 | Project creation、`ProjectType`、Official Plugins、Marketplace delivery、release readiness | `adr-008-interactive-ai-app-scaffold.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-008 | 交互式 AI 应用使用单一内部默认类型;目录式创建、Main-owned UUID、可选 bundled Scaffold Skill 与发布权威分离 | Accepted / implemented, amended 2026-09-07 | 2026-09-04 | Project creation、`ProjectType`/identity、Official Plugins、Marketplace delivery、release readiness | `adr-008-interactive-ai-app-scaffold.md` |
| ADR-007 | AI Design 采用单一 Current Specification、Living Form 与不可变 Quote 的 V2 权威;active plan 与 reference alias 是其公共投影 | Accepted / implemented, amended 2026-09-07 | 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` |

View File

@@ -1,86 +0,0 @@
# Project Configuration owns Plugin navigation
## Status
Proposed for integration; implemented and verified in task
`20260906-move-plugins-project-settings-7c91a4e2`.
## Date
2026-09-06
## Context
The integrated product exposed one reviewed unified Plugin workspace at
`/plugins` through a standalone Code sidebar entry. Project Configuration no
longer contained its predecessor Plugin Services sheet. The user first directed
that Plugins belong in Project Settings, then clarified that the workspace must
live on the same project page used to configure Agents and Skills rather than
replace that page after navigation.
The navigation change must not collapse the existing independent lifecycles for
Marketplace acquisition, device installation, project enablement, Agent Skill
assignment, runtime authorization, and billing. It also must not restore the
retired duplicate sheet or move Main-owned Plugin authority into Renderer code.
## Decision
- The Agent/Skill Project Configuration page is the visible owner of the single
unified Plugin workspace.
- Its `插件` resource card opens the workspace in a wide same-page drawer. The
Project Configuration page remains mounted behind it.
- `/project-config/plugins` is the canonical deep link for the drawer-open state;
it renders Project Configuration rather than a standalone Plugin page.
- `/plugins` preserves query and navigation state while redirecting to the
canonical URL. `/plugin-marketplace`, `/my-plugins`, and `/project-plugins`
remain deterministic filtered compatibility redirects.
- The Code sidebar has no standalone Plugin entry.
- The canonical workspace remains accessible before Code Provider initialization
and when no project is active, so Marketplace and account/device views do not
incorrectly depend on local project selection.
- The existing unified controller, data sources, mutation semantics,
authentication, and lifecycle separation remain unchanged.
## Rationale
Plugin installation and activation configure resources that projects may use, so
Project Configuration is the clearer navigation owner. Reusing the unified
workspace avoids competing product surfaces and preserves one authoritative view
across Marketplace, Account Library, device packages, and project status.
Compatibility redirects protect existing deep links and authenticated return
flows while establishing an unambiguous canonical location.
## Consequences
- Project Configuration gains a Plugin card beside models, Skills, and knowledge,
with access retained in the no-active-project state.
- Closing the Plugin drawer returns to the already-mounted Project Configuration
page; Agent assignment actions close the drawer to expose that same page.
- Existing bookmarks continue to work, but tests and new product links should use
`/project-config/plugins`.
- Canonical project memory that names the Code sidebar or `/plugins` as the sole
current entry must be superseded during Integration Mode.
- No backend contract, package trust boundary, runtime permission, billing rule,
or native Web Search behavior changes.
## Supersedes
- The navigation-only claim that the Code sidebar owns the single `插件` entry and
`/plugins` is the canonical product route.
- It does not supersede the retirement of the duplicate Project Configuration
Plugin Services sheet; that implementation remains retired.
## Evidence
- User direction: “插件应该在项目设置中”, clarified as “是放在配置agent、skill那个项目页”.
- Focused unit verification: 62/62 passed.
- Electron Plugin journeys: 4/4 passed.
- Full unit, typecheck, lint, and Vite production build passed.
## Related
- `.project-docs/10-decisions/adr-008-interactive-ai-app-scaffold.md`
- `.project-docs/30-worklog/tasks/20260906-move-plugins-project-settings-7c91a4e2.md`
- `src/pages/ProjectConfiguration/index.tsx`
- `src/pages/Plugins/index.tsx`
- `src/pages/Plugins/legacy-plugin-redirect.tsx`