docs: record game audio client main integration

This commit is contained in:
2026-09-21 16:38:54 +08:00
parent 1841bafb18
commit e3a480964d
5 changed files with 87 additions and 7 deletions

View File

@@ -1,5 +1,21 @@
# Data Flow
## Game Audio generation and local delivery
Project-enabled optional bundled Game Audio → frozen eligible parent tool → one explicit
generation confirmation → Main durable pre-submit receipt → fixed Works Square hosted API.
Main queries the original execution internally, then saves every output beneath
`assets/generated/game-audio/<executionId>/` in the frozen original project. A lost POST
response uses operation lookup; restart, account reconnect and download retry never submit
another generation. The shared project write lease covers materialization/tracker only,
not network waiting. Provider/billing status and local delivery status remain separate.
The conversation card displays saved relative paths. An explicit preview click uses the
receipt/account-owned Main route and existing bounded local media reader, then native
audio controls with no autoplay. No Provider credential, URL, job ID or audio payload is
sent to the model. Server migration 0093 and enabled authoritative prices are deployment
prerequisites; synthetic media tests are not real Meowa acceptance.
## Code conversation metadata
Main 的 `.makelore/conversations.json` schema v2 是 Conversation 标题和归档状态的唯一权威。新建自动命名会话由 Main 生命周期订阅从首条真实、完整用户消息提取标题;未命名会话的历史 hydration 可补齐同一次命名。串行存储重查 `titleMode` / `autoTitleSet`,手动命名和已删除记录不会被后续事件覆盖。内部命名字段不进入公共 DTO,也不向 Pi session title 双写。

View File

@@ -4,12 +4,13 @@
| Path | Responsibility | Owner Notes |
|---|---|---|
| `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 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/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`, 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. |
| `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. |
| `electron/coding-runtime/pi/model-tools/**` and `shared/model-tools.ts` | Closed selected-model tool registry and provider-specific Web Search request shaping | The frozen selected model capability controls whether `makelore_web_search` exists. The tool uses that model/provider/credential and normal model billing; no Hosted Plugin adapter, Admission, Plugin Charge, or browser fallback exists. |
| `electron/coding-packages/**`, `electron/api/routes/device-packages.ts`, `shared/device-packages.ts`, and `src/stores/device-packages.ts` | Main-owned conversation install preview/confirmation/commit, immutable local package generations, safe Renderer projection, and parent-worker refresh | Sources are npm, Git, absolute local Plugin directories, or loose `SKILL.md`. Lifecycle scripts are disabled; executable extensions and non-empty Skill `scripts/` run with desktop-user authority after disclosure and explicit confirmation. Every generation projects all explicitly installed and currently enabled Skills/extensions; Device Packages never join Account Library, Marketplace Package Store, Release, Channel, or Admission state. |
| `electron/coding-plugins/adapters/game-resource.ts`, `electron/services/game-resource-client.ts`, and `electron/services/game-resource-delivery.ts` | Provider-neutral `makelore.game-resource` adapter, Main-owned Works Square transport, and durable local delivery coordinator | An eligible frozen parent submits one confirmed generation. Main polls internally, persists delivery state under userData, downloads every terminal output, and writes it to the frozen original project. A delivery retry resumes download/save only; Renderer/Pi never receive Provider URLs, credentials, balances, raw responses, Provider job IDs, or filesystem authority. |
| `electron/coding-plugins/adapters/game-audio.ts`, `electron/services/game-audio-client.ts`, `game-audio-delivery.ts`, and `src/pages/Chat/GameAudioFiles.tsx` | Project-wide music/preview/sound tools, durable single-submit delivery, and click-only local audio preview | Main persists intent before POST, uses by-operation lookup after uncertain submission and resumes only the existing execution. Frozen account/project and shared write leases govern all-output materialization; receipt-owned content reaches native audio controls only on a user click, never as a Provider URL or model-message audio payload. |
| `electron/api/routes/plugin-marketplace.ts`, `src/stores/{plugin-marketplace,device-packages,coding-plugins}.ts`, `src/pages/Plugins/`, and `src/pages/ProjectConfiguration/index.tsx` | Existing Main/store authorities plus the unified Renderer projection embedded in Project Configuration | `/project-config/plugins` is the canonical same-page sheet state. `/plugins` and legacy Plugin routes only replace-redirect while preserving deterministic filters. `official:`, `local:`, and `retained:` identities stay separate, source failures are isolated, and no Account token, filesystem path, Admission, package bytes, signed URL, or visible install-source picker enters Renderer. |
| `src/components/works/ProjectPublishAction.tsx` | 可发布项目的一键提交、云构建轮询与用户可理解状态 | 只通过 Renderer API 提交非敏感元数据;绑定告警不终止轮询 |
| `shared/project-config.ts`, `electron/coding-projects/{project-config,project-service}.ts`, and `src/components/layout/Sidebar.tsx` | 规范 `ProjectType`、Main-owned UUID 与目录式最小项目创建 | 普通新建只要求目录,内部默认 `interactive_ai_app`,Main 自动生成 UUID;有效旧配置仅缺 `projectId` 时串行修复。既有 `custom` 和历史类型仍兼容,`initialized` 不再是导航 gate |