docs: integrate project conversations and coding teacher
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

This commit is contained in:
2026-09-22 13:59:36 +08:00
parent 00ad84c094
commit e5d271bc45
9 changed files with 110 additions and 3 deletions

View File

@@ -1,5 +1,11 @@
# Data Flow
## Project conversations and teacher chat
目录式创建 → Main 保存项目与 defaultAgentId → 项目直接列出会话 → 首次发送或显式新建创建 Conversation → 原 Pi 执行链。历史会话继续使用原 Agent 绑定;切换项目丢弃旧读取。
问老师/显式引用 → Main 读取 WS 已发布定义与当前来源分支的已完成文本 → 固定话题版本并持久化 requestId → 当前账号模型网关 → Host SSE/本机话题存储 → 右侧面板。取消、重启中断和结果恢复以持久请求为准;关闭面板不取消模型。带回回答只追加主草稿,运营精确草稿版本试聊只用示例上下文。见[老师决定](../10-decisions/ADR-2026-09-22-coding-teacher.md)。
## Permanent wallet and recharge
账号菜单 / PointWallet → `src/lib/works-billing.ts` → Main 固定 `/api/works/billing/*` 路由 → Works Square 账务 API。Main 持有认证与账号绑定,通过 `shared/works-billing.ts` 的公开 DTO 投影余额、产品、订单及流水;充值沿用 Renderer capability,Renderer 不传付款人、价格、Token 或任意上游地址。账号切换后 Main 与账号绑定的 UI 丢弃迟到结果,打开菜单和窗口 focus 刷新当前账号。

View File

@@ -4,6 +4,8 @@
| Path | Responsibility | Owner Notes |
|---|---|---|
| `electron/coding-teacher/**`, `electron/api/routes/coding-teacher.ts`, `shared/coding-teacher.ts`, and `src/pages/Chat/Teacher*.tsx` | Main-owned 云配置、来源上下文、本机话题、模型调用、Host API/SSE、独立右侧答疑与运营试聊 | 无 Pi worker 或工具;固定发布版本,账号/项目/来源会话隔离。见 [teacher ADR](../10-decisions/ADR-2026-09-22-coding-teacher.md)。 |
| `electron/coding-projects/project-config.ts`, `src/pages/Chat/CodingProjectConversations.tsx`, and `src/components/layout/Sidebar.tsx` | 内部默认 Agent 与项目下会话导航 | 旧绑定保留;首次发送或显式新建创建会话,打开项目不创建。 |
| `electron/coding-plugins/manifest.ts`, `release-descriptor.ts`, `signature-verifier.ts`, and `trusted-keys.ts` | Closed Plugin package/descriptor parsing, fixed code-owned resource roots, compatibility checks, canonical archive validation, and Ed25519 trust | Data Service plus exact Game Resource, Game Audio and Project Scaffold roots are code-owned. Other schema-2 packages still pass descriptor/signature/archive validation; downloadable P0 Skill assets remain text/image-only. Hosted Web Search is not a current Plugin root. |
| `electron/coding-plugins/account-plugin-cache.ts`, `marketplace-client.ts`, and `package-store.ts` | Main-owned Account Library cache, authenticated server client, and atomic immutable device installation store | Account acquisition and device installation are separate. Package bytes switch atomically only after descriptor, signature, archive, client-range, and provenance checks; failed updates preserve the prior current release. |
| `shared/coding-plugins.ts`, `electron/coding-plugins/effective-resolver.ts`, `registry.ts`, `project-service.ts`, and `electron/coding-runtime/pi/**` | Effective official Plugin projection, selected-model tools, Device Package resources, and frozen parent logical-thread runtime snapshot | The shared project-wide predicate covers `makelore.data-service`, `makelore.game-resource`, `makelore.game-audio`, and `makelore.project-scaffold`: after their existing delivery/acquisition requirement and project enablement, all parent Agents receive their Skills/tools without assignment. Trusted Marketplace artifacts that require assignment and immutable local Device Package generations retain their distinct authorities. Child workers remain empty; active threads retain frozen resources until settlement/disposal. |

View File

@@ -1,5 +1,7 @@
# System Overview
官方编程老师由 Works Square 运营维护一个版本化定义,MakeLore Main 按账号/项目/来源会话运行独立无工具答疑并持久化本机话题;Code 项目自动建立内部默认 Agent、会话直接列于项目下。该能力与个人云智能体及 Pi 执行独立。详见[已接受决定](../10-decisions/ADR-2026-09-22-coding-teacher.md)。
## Current Architecture
知识文档上传、附件导入与替换后由客户端自动衔接既有解析索引接口,Main 保留处理 Task、可用性与替换关系。Renderer 每 5 秒串行刷新已加载页面,以服务端持久 Task 与实际分块显示阶段、失败原因及可用于回答的文档;请求未确认时保留同一操作意图,观察到新 Task 后才解除本地不确定状态。替换失败及清理重试保留旧可用内容,零分块不显示可用。见[知识处理交互规则](../10-decisions/ADR-2026-09-11-personal-cloud-agents.md#知识文档处理与可用状态)。