Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"name": "BeatAPI"
},
"description": "Official BeatDesign plugins for Claude Code.",
"version": "0.2.3",
"version": "0.2.4",
"plugins": [
{
"name": "beatdesign",
"source": "./integrations/claude-code/beatdesign",
"description": "Operate a local BeatDesign Canvas and video Editor through MCP.",
"version": "0.2.3",
"version": "0.2.4",
"author": {
"name": "BeatAPI"
}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/quality.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,6 @@ jobs:
- run: pnpm typecheck
- run: pnpm test
- run: pnpm i18n:check
- run: pnpm exec playwright install --with-deps chromium
- run: pnpm test:e2e
- run: pnpm audit --prod --audit-level high
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ src/paraglide/
.idea
.vscode
.playwright-mcp/
/test-results/
/playwright-report/

# misc
.DS_Store
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,22 @@ All notable changes to BeatDesign are documented in this file.

### Changed

- First-time visitors to unprefixed workspace links now see the browser's
preferred supported language; an explicit `/zh` or `/ja` link and a saved
language choice take precedence.
- Simplified Chinese first-run navigation and project setup copy to use
“创作台、画布、素材库” instead of unexplained English surface names.
- Canvas UI autosave now uses revision-checked incremental commands with explicit
semantic conflict detection. Editor persistence uses incremental commands for
supported edits and retains guarded replacement for unsupported operations.
- Shared asset-first preflight, reference preparation, and submission across UI
and MCP; browser model metadata and requests now use logical model IDs.
- Added lightweight document revision polling, hidden-page suspension, local
generation status reads, SQLite WAL/busy timeout, and MCP version derivation.
- Added isolated browser/MCP integration coverage to CI and extracted Editor
persistence and timeline clip components.
- Corrected release status: npm WorkBuddy 0.2.3 exists; GitHub release and market
approval are separate gates. These Unreleased changes are not in that package.
- Delegated account-level generation concurrency entirely to the active Provider,
removing BeatDesign's cross-Project mutex and per-Project running-task limit.
- Updated the asset-first generation request to v2: image attachments remain
Expand Down
6 changes: 5 additions & 1 deletion docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ data directory through `BEATDESIGN_DATA_DIR`. This packaging changes startup
and installation only; it does not create a hosted workspace or another data
model.

Canvas layout persistence is the deliberate exception on the UI side: drag, resize, viewport, and the complete visual arrangement are saved as a revision-checked snapshot. Semantic Canvas operations are also exposed through `canvas.apply`, and external agents must use those operations rather than snapshot replacement.
Canvas UI persistence now derives incremental `canvas.apply` operations for cards, layout, camera, and workflow state. The layout snapshot endpoint remains a compatibility exception, not the active UI autosave path. CAS retries merge independent local and remote changes, while conflicting semantic edits fail visibly rather than silently overwriting either writer. External agents must use semantic operations rather than snapshot replacement.

Editor persistence selects `editor.apply` when applying supported operations reproduces the requested document exactly. Unsupported edits, imports, and undo may still use the revision-checked UI-only replacement command. The persistence hook owns autosave, conflict handling, and external revision refresh; external agents never receive replacement access.

Canvas and Editor poll the lightweight project revision endpoint before fetching documents and suspend document polling while hidden. Generation status endpoints read local task state; server-side synchronization throttles provider polling across callers using persisted sync timestamps. Local SQLite connections enable WAL and a five-second busy timeout. `src/config/db/schema.ts` is generated from `schema.sqlite.ts` by the database setup script, not a second hand-maintained schema.

## Persistence

Expand Down
13 changes: 11 additions & 2 deletions docs/PRODUCT_PLAN_AND_STATUS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,18 @@

- 文档用途:给新加入的开发者、Codex、Claude Code 和其他 AI Agent 提供统一产品上下文
- 当前基线:BeatDesign v0.2 Phase 1 本地实现
- 最后核对:2026-09-05
- 最后核对:2026-09-23
- 事实边界:只有代码、测试和本文“已完成”栏目共同证明的能力才算完成;规划项不等于已发布
- 发布状态:v0.2.2 已发布;v0.2.3 是面向 WorkBuddy 一键安装的候选版本,尚未发布到 npm、GitHub Release 或 WorkBuddy 市场。第三方市场审核仍按各自状态单独记录
- 发布状态:GitHub 最新正式 Release 为 v0.2.2;npm 最新版本仍为 `@beatapi/beatdesign-workbuddy@0.2.3`(2026-09-23 核验)。用户提供的 WorkBuddy 邮件显示 2026-09-05 提交的连接器已通过审核,并提示可前往平台发布;市场是否已上架尚未核验。当前工作区已标记为 v0.2.4 候选版,代码和连接器元信息尚未发布到 npm 或提交 WorkBuddy 新版审核。

### 当前未发布优化

- 中文或日文浏览器首次打开无语言前缀的本地工作台链接时,自动进入对应语言;显式语言链接和已保存的语言偏好优先。中文首屏与项目创建入口使用“创作台、画布、素材库”等常用名称。
- Canvas UI 通过 `canvas.apply` 保存增量操作;并发修改按三方合并处理,同字段语义冲突保留本地编辑并报错,不静默覆盖。
- Editor 已提取持久化 hook、命令选择器和轨道片段组件;可精确表达的编辑使用 `editor.apply`,导入、undo 等不支持的变化仍使用 UI 专属 revision-checked replacement。
- Canvas / Editor 先查询轻量 revision,发生变化才读取文档,隐藏页面暂停文档轮询。
- Studio / Canvas / Editor redo 与 MCP 共用 asset-first 服务端预检及提交;浏览器接口使用逻辑 model ID,Provider 状态同步集中到服务端。
- 本地 SQLite 启用 WAL 和 busy timeout;MCP 版本读取根 package 元数据。浏览器与 MCP 联动测试使用独立临时数据库,不调用付费 Provider。

## 1. BeatDesign 是什么

Expand Down
7 changes: 7 additions & 0 deletions docs/PROVIDERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ The adapter uses:

User-facing model capabilities are defined in `src/core/effects/effect-registry.ts`. Provider bindings live in `src/core/generation-providers/`; MCP and UI use the logical model id and capability schema, not BeatAPI `effectId` or raw upstream fields.

UI precheck and submission accept the asset-first generation contract. Studio,
Canvas, Editor redo, and MCP share the server-side preflight and submission
service. Preflight validates project ownership, readable references, model
parameters, and provider configuration without uploading files. Only the
subsequent confirmed submission prepares remote delivery URLs. Browser status
requests read local task state; provider synchronization runs server-side.

The built-in catalog includes the current BeatAPI GPT Image 2.5 Flare/Sunburst, Wan 3.0/Prime, HappyHorse 1.0/1.1, and MiniMax H3 Max/Max Turbo contracts. Their resolution casing, duration ranges, reference limits, required-image rules, seed support, and upstream request field names are preserved by the adapter.

Image attachments remain generic references in the shared BeatDesign request contract. Most first-frame and last-frame intent uses explicit prompt directives such as `Use @Image1 as the first frame.` and `Use @Image2 as the last frame.` The MiniMax H3 Max pair is an upstream exception: its dedicated two-slot media schema maps attachment order directly to first frame then last frame, matching BeatAPI's published contract.
Expand Down
17 changes: 14 additions & 3 deletions docs/RELEASE_SCOPE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,26 @@ Excluded: authentication, login, accounts, payments, subscriptions, credits, API

Release verification requires a clean install, schema creation, production build (which generates Paraglide and route types), typecheck, test, i18n check, MCP stdio handshake, and local route smoke test. A real paid BeatAPI generation is a separate credentialed end-to-end check.

## v0.2.4 WorkBuddy update candidate

- [x] Merge the current `origin/main` baseline into the local update branch.
- [x] Align application and integration metadata on `0.2.4`.
- [x] Run `pnpm typecheck`, `pnpm test` (417 passing), `pnpm i18n:check`, and `pnpm build`.
- [x] Validate the connector archive and install the runtime package in a clean directory; the package probe completed an MCP handshake, listed 29 tools, and checked the local `/api/ping` route. A production route smoke check confirmed Chinese first visit redirects to `/zh`, an explicit `/zh` link stays Chinese, and a saved English choice remains English.
- [ ] Publish `@beatapi/beatdesign-workbuddy@0.2.4` to npm and verify the public registry.
- [ ] Update the existing WorkBuddy Connector with the `0.2.4` archive and submit it for review.
- [ ] Record WorkBuddy approval and public marketplace availability separately.

## v0.2.3 release gate

- [x] Application, Codex, Claude Code, WorkBuddy, Claude marketplace, and LobeHub metadata agree on `0.2.3`.
- [x] The WorkBuddy Connector archive passes deterministic structure validation.
- [x] The packaged WorkBuddy runtime installs in an empty directory, starts the local workspace, completes an MCP handshake, exposes all 29 tools plus the bundled Skill catalog Resource, and keeps data outside the package directory.
- [x] Run `pnpm typecheck`, `pnpm test`, `pnpm i18n:check`, and `pnpm build` on the release candidate.
- [ ] Publish `@beatapi/beatdesign-workbuddy@0.2.3` to npm and verify the public registry artifact.
- [ ] Upload the Connector archive to the WorkBuddy Open Platform and submit it for review.
- [ ] Record WorkBuddy approval and public marketplace availability only after each state is independently verified.
- [x] Public registry lists `@beatapi/beatdesign-workbuddy@0.2.3`, published `2026-09-05T10:15:33.475Z` (registry rechecked 2026-09-15). This does not establish that the package contains the current working-tree changes.
- [x] Submit the Connector archive to the WorkBuddy Open Platform; the user's 2026-09-23 approval email identifies the 2026-09-05 submission.
- [x] WorkBuddy approved that submission, per the user's approval email.
- [ ] Independently verify public marketplace availability. The approval email says the Connector can now be published.
- [ ] Push the verified commit, tag `v0.2.3`, and publish the GitHub Release.

## v0.2.2 release gate
Expand Down
5 changes: 4 additions & 1 deletion drizzle.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import { defineConfig } from 'drizzle-kit';
import { resolve } from 'node:path';

export default defineConfig({
schema: './src/config/db/schema.ts',
out: './drizzle/sqlite',
dialect: 'sqlite',
dbCredentials: {
url: 'file:data/local.db',
url: process.env.BEATDESIGN_DATA_DIR?.trim()
? `file:${resolve(process.env.BEATDESIGN_DATA_DIR, 'local.db')}`
: 'file:data/local.db',
},
});
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "beatdesign",
"displayName": "BeatDesign",
"version": "0.2.3",
"version": "0.2.4",
"description": "Operate a local BeatDesign Canvas, shared Assets, generation workspace, and video Editor through MCP.",
"author": {
"name": "BeatAPI",
Expand Down
2 changes: 1 addition & 1 deletion integrations/codex/beatdesign/.codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "beatdesign",
"version": "0.2.3",
"version": "0.2.4",
"description": "Control a local BeatDesign Canvas, generation workspace, and video Editor through MCP.",
"author": {
"name": "BeatAPI"
Expand Down
6 changes: 3 additions & 3 deletions integrations/workbuddy/beatdesign/connector-meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
"description_en": "Operate a local BeatDesign Canvas, Assets, generation tasks, video timeline, and captions with natural language.",
"source": "beatapi-beatdesign",
"type": "mcp",
"version": "0.2.3",
"version": "0.2.4",
"minWorkbuddyVersion": "5.0.0",
"examples_zh": [
"打开我最近的 BeatDesign 项目并总结画布内容",
"把这些项目素材排成一条短视频粗剪时间线",
"导入这个 SRT 字幕并把编辑器停在第一条字幕",
"提取这段视频的尾帧并创建续写节点"
"把这个字幕文件导入视频,打开剪辑页面让我检查第一句",
"从这段视频的最后一个画面继续创作,先让我确认画面"
],
"examples_en": [
"Open my latest BeatDesign project and summarize its Canvas",
Expand Down
2 changes: 1 addition & 1 deletion integrations/workbuddy/beatdesign/mcp.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"beatdesign": {
"type": "stdio",
"command": "npx",
"args": ["--yes", "@beatapi/beatdesign-workbuddy@0.2.3"],
"args": ["--yes", "@beatapi/beatdesign-workbuddy@0.2.4"],
"runtime": {
"type": "node",
"version": "22"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,19 @@ BeatDesign MCP 是结构化控制层,浏览器中的 BeatDesign 是用户审

如果 WorkBuddy 可以打开网页,则打开返回的 `workspaceUrl`;否则把准确链接交给用户,不要声称页面已经打开。

## 面向中文用户的沟通

- 用户用中文交流时,使用中文说明步骤和结果。把 Canvas、Assets、Editor、SRT
分别称作“画布、素材库、剪辑页面、字幕文件”;只有用户需要识别文件格式时才补充 SRT。
- 用户第一次使用时,先说明项目和媒体保存在本机;整理素材、剪辑和预览不需要
BeatAPI 密钥。只有用户确认远程 AI 生成或分析后,才引导其配置密钥并提交。
- 打开 `workspaceUrl` 后,请用户在中文界面核对实际画面或字幕;如果浏览器语言未
自动匹配,可用页面右上角的语言切换器选择“中文”。不要把数据库写入成功当作用户已看见结果。
- 遇到 `Project not found`,用“没有找到这个项目,请先从项目列表选择”解释;
遇到 3020 端口冲突,用“另一个 BeatDesign 工作台正在运行”解释。缺少
`ffmpeg` 或 `ffprobe` 时,说明对应的尾帧提取或完整时间线渲染暂不可用,
再给有需要的用户安装路径提示,不要把原始报错直接当成最终答复。

## 安全修改

- 修改前读取当前 Canvas 或 Editor 状态。
Expand Down
2 changes: 1 addition & 1 deletion lhm.plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"identifier": "beatapi-beatdesign",
"name": "BeatDesign",
"version": "0.2.3",
"version": "0.2.4",
"description": "The open-source, local-first AI canvas for image and video creation and analysis.",
"homepage": "https://github.com/BeatAPI/BeatDesign"
}
Loading
Loading