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
2 changes: 1 addition & 1 deletion .github/workflows/cli-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ concurrency:
jobs:
# ── Resolve version info (mirrors desktop-package.yml) ─────────────
prepare:
if: github.event_name != 'release' || !startsWith(github.event.release.tag_name, 'data-migrator-v')
if: github.event_name != 'release' || (!startsWith(github.event.release.tag_name, 'data-tools-v') && !startsWith(github.event.release.tag_name, 'data-migrator-v'))
name: Prepare
runs-on: ubuntu-latest
outputs:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
name: Data Migrator Package
name: Data Tools Package

on:
push:
tags: ['data-migrator-v*']
tags: ['data-tools-v*', 'data-migrator-v*']
workflow_dispatch:

permissions:
contents: read

concurrency:
group: data-migrator-package-${{ github.ref }}
group: data-tools-package-${{ github.ref }}
cancel-in-progress: false

jobs:
build:
name: Migrator (${{ matrix.platform }})
name: Data Tools (${{ matrix.platform }})
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
Expand Down Expand Up @@ -49,30 +49,32 @@ jobs:
targets: ${{ matrix.target }}
- uses: swatinem/rust-cache@v2
with:
shared-key: data-migrator-${{ matrix.platform }}
shared-key: data-tools-${{ matrix.platform }}
cache-bin: false
- name: Install Linux WebView build dependencies
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- run: pnpm install --frozen-lockfile --ignore-scripts
- name: Verify independent version and packaging contract
run: |
node scripts/data-migrator-release.mjs --check-version
node --test scripts/data-migrator-tauri-build.test.mjs
node scripts/data-tools-release.mjs --check-version
node --test scripts/data-tools-tauri-build.test.mjs
- name: Check offline data compatibility
run: cargo test --locked -p openbitfun-data-migrator -p openbitfun-legacy-migration-adapters -p openbitfun-legacy-migration -p openbitfun-config-contracts --lib --test migration_engine_contracts
run: |
cargo test --locked -p openbitfun-services-core --no-default-features --features session-recovery --lib session_recovery
cargo test --locked -p openbitfun-data-tools -p openbitfun-legacy-migration-adapters -p openbitfun-legacy-migration -p openbitfun-config-contracts --lib --test migration_engine_contracts
- name: Build independent package
run: pnpm run data-migrator:build -- --target ${{ matrix.target }} ${{ matrix.bundles }}
run: pnpm run data-tools:build -- --target ${{ matrix.target }} ${{ matrix.bundles }}
- name: Stage package and checksum
run: node scripts/data-migrator-release.mjs ${{ matrix.platform }}
run: node scripts/data-tools-release.mjs ${{ matrix.platform }}
- uses: actions/upload-artifact@v6
with:
name: data-migrator-${{ matrix.platform }}
path: target/data-migrator-release/${{ matrix.platform }}/*
name: data-tools-${{ matrix.platform }}
path: target/data-tools-release/${{ matrix.platform }}/*
if-no-files-found: error

draft-release:
if: startsWith(github.ref, 'refs/tags/data-migrator-v')
if: startsWith(github.ref, 'refs/tags/data-tools-v') || startsWith(github.ref, 'refs/tags/data-migrator-v')
needs: build
runs-on: ubuntu-latest
permissions:
Expand All @@ -86,29 +88,29 @@ jobs:
package-manager-cache: false
- uses: actions/download-artifact@v7
with:
pattern: data-migrator-*
path: migrator-release-assets
pattern: data-tools-*
path: data-tools-release-assets
merge-multiple: true
- name: Sign and verify with the independent migrator release key
- name: Sign and verify with the independent Data Tools release key
shell: bash
env:
OPENBITFUN_SIGNING_KEY: ${{ secrets.DATA_MIGRATOR_SIGNING_PRIVATE_KEY }}
OPENBITFUN_SIGNING_PASSWORD: ${{ secrets.DATA_MIGRATOR_SIGNING_PRIVATE_KEY_PASSWORD }}
OPENBITFUN_SIGNING_PUBKEY: ${{ secrets.DATA_MIGRATOR_SIGNING_PUBKEY }}
OPENBITFUN_SIGNING_KEY: ${{ secrets.DATA_TOOLS_SIGNING_PRIVATE_KEY }}
OPENBITFUN_SIGNING_PASSWORD: ${{ secrets.DATA_TOOLS_SIGNING_PRIVATE_KEY_PASSWORD }}
OPENBITFUN_SIGNING_PUBKEY: ${{ secrets.DATA_TOOLS_SIGNING_PUBKEY }}
run: |
set -euo pipefail
test -n "$OPENBITFUN_SIGNING_KEY"
test -n "$OPENBITFUN_SIGNING_PUBKEY"
cat migrator-release-assets/*.sha256 | sort -k2 > migrator-release-assets/SHA256SUMS
(cd migrator-release-assets && sha256sum --check SHA256SUMS)
bash scripts/sign-release-assets.sh migrator-release-assets/*
node scripts/write-minisign-public-key.mjs --out migrator-release-assets/data-migrator.minisign.pub
cat data-tools-release-assets/*.sha256 | sort -k2 > data-tools-release-assets/SHA256SUMS
(cd data-tools-release-assets && sha256sum --check SHA256SUMS)
bash scripts/sign-release-assets.sh data-tools-release-assets/*
node scripts/write-minisign-public-key.mjs --out data-tools-release-assets/data-tools.minisign.pub
- name: Create a separately reviewed release
uses: softprops/action-gh-release@v3
with:
tag_name: ${{ github.ref_name }}
name: OpenBitFun Data Migrator ${{ github.ref_name }}
name: OpenBitFun Data Tools ${{ github.ref_name }}
draft: true
make_latest: false
files: migrator-release-assets/*
body_path: src/apps/data-migrator/RELEASE.md
files: data-tools-release-assets/*
body_path: src/apps/data-tools/RELEASE.md
2 changes: 1 addition & 1 deletion .github/workflows/desktop-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ concurrency:
jobs:
# ── Resolve version info ───────────────────────────────────────────
prepare:
if: github.event_name != 'release' || !startsWith(github.event.release.tag_name, 'data-migrator-v')
if: github.event_name != 'release' || (!startsWith(github.event.release.tag_name, 'data-tools-v') && !startsWith(github.event.release.tag_name, 'data-migrator-v'))
name: Prepare
runs-on: ubuntu-latest
outputs:
Expand Down
5 changes: 3 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ members = [
"src/apps/cli",
"src/apps/sdk-host",
"src/apps/desktop",
"src/apps/data-migrator",
"src/apps/data-tools",
"src/apps/server",
"src/apps/relay-server",
"src/apps/miniapp-market-server",
Expand Down
2 changes: 1 addition & 1 deletion OpenBitFun-Installer/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ cargo test --manifest-path OpenBitFun-Installer/src-tauri/Cargo.toml --lib previ
For installer payload validation and the independent Data Migrator boundary, run:

```bash
node --test OpenBitFun-Installer/scripts/build-installer.test.cjs scripts/data-migrator-tauri-build.test.mjs
node --test OpenBitFun-Installer/scripts/build-installer.test.cjs scripts/data-tools-tauri-build.test.mjs
cargo test --manifest-path OpenBitFun-Installer/src-tauri/Cargo.toml --lib installer::commands::tests
```

Expand Down
2 changes: 1 addition & 1 deletion OpenBitFun-Installer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Instead of relying on the generic NSIS wizard UI from Tauri's built-in bundler,
## Legacy data migration

Data Migrator is distributed separately and is not included in this installer.
To import legacy data, download and run the [standalone Data Migrator](../src/apps/data-migrator/README.md) after closing both applications.
To import legacy data, download and run the [standalone Data Migrator](../src/apps/data-tools/README.md) after closing both applications.

## Common tasks

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ kinds of work, and major upgrades to cross-device collaboration and remote contr
tasks move smoothly across desktop, mobile, and browser.

**Migration note:** OpenBitFun 1.0.0 is not data-compatible with legacy 0.2.x releases. To migrate legacy data,
use the [OpenBitFun Data Migrator](src/apps/data-migrator/README.md), currently available
use the [OpenBitFun Data Tools](src/apps/data-tools/README.md), currently available
for stable releases 0.2.17–0.2.19.

---
Expand Down
2 changes: 1 addition & 1 deletion README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ OpenBitFun 1.0.0 带来全新界面、面向不同任务的四种 Agent Harness
多设备协同与远程控制,让任务在桌面、手机与浏览器之间顺畅接续。

**数据迁移提醒:** OpenBitFun 1.0.0 与 0.2.x 旧版数据不互通。需要迁移旧版数据时,请使用
[OpenBitFun 数据迁移器](src/apps/data-migrator/README.zh-CN.md),当前支持 0.2.17~0.2.19 正式版。
[OpenBitFun 数据工具](src/apps/data-tools/README.zh-CN.md),当前支持 0.2.17~0.2.19 正式版。

---

Expand Down
4 changes: 2 additions & 2 deletions docs/architecture/product-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,7 @@ Shared Agent Runtime 是第一方多实例的目标部署,不是上表新增

## 独立数据迁移工具的依赖边界

Data Migrator 是独立发布的本地离线工具,不依赖 Core、Product Assembly、Desktop 或 Web UI。
Data Tools 是独立发布的本地离线工具,不依赖 Core、Product Assembly、Desktop 或 Web UI。
主应用不检测、启动或捆绑迁移器。两者在同一源码工作区复用稳定的数据格式与存储实现:

- contracts/config-contracts:配置 DTO、默认值、版本校验及到共享模型 DTO 的纯转换;Core 原路径保留转发,ConfigProvider 仍在 Core。
Expand All @@ -912,7 +912,7 @@ Data Migrator 是独立发布的本地离线工具,不依赖 Core、Product As
WorkspaceInfo/WorkspaceIdentity 的运行操作由 Core 的 runtime extension traits 保留,稳定记录无需导入这些能力。
原 Core 存储入口保留错误映射;可选 legacy-migration facade 保留旧导入路径,但不再由 product-full 启用。
远程四种场景不提供迁移工具的执行入口;仅转换本机保存的连接记录,不连接远端。
使用与发行契约以 [独立迁移器说明](../../src/apps/data-migrator/README.zh-CN.md) 为准。
使用与发行契约以 [独立数据工具说明](../../src/apps/data-tools/README.zh-CN.md) 为准。


## Agent 身份与产品概念
Expand Down
4 changes: 2 additions & 2 deletions docs/architecture/product-customization-blueprint.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ i18n locale 集合和 key parity。
- 修改 schema、resolver 或 Desktop/CLI build adapter 行为时,再运行 `pnpm run product:test`;
- 打包和平台矩阵只在变更触及对应交付路径时运行,不作为产品定义的默认本地预检。

Data Migrator 已从产品 family 与 sibling binary 投影中移除,使用自己的版本、Tauri 身份、构建与发布工作流。
Data Tools 已从产品 family 与 sibling binary 投影中移除,使用自己的版本、Tauri 身份、构建与发布工作流。
它固定面向 OpenBitFun 数据格式;工具身份与目标数据身份分开。旧定制产品定义应移除 `members.dataMigrator`。
详见 [迁移器 README](../../src/apps/data-migrator/README.zh-CN.md)。
详见 [数据工具 README](../../src/apps/data-tools/README.zh-CN.md)。

## 1. 设计结论

Expand Down
4 changes: 2 additions & 2 deletions docs/architecture/rust-build-dependency-boundaries.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ cargo check -p <product> --timings

## 独立数据迁移工具的依赖边界

Data Migrator 是独立发布的本地离线工具,不依赖 Core、Product Assembly、Desktop 或 Web UI。
Data Tools 是独立发布的本地离线工具,不依赖 Core、Product Assembly、Desktop 或 Web UI。
主应用不检测、启动或捆绑迁移器。两者在同一源码工作区复用稳定的数据格式与存储实现:

- contracts/config-contracts:配置 DTO、默认值、版本校验及到共享模型 DTO 的纯转换;Core 原路径保留转发,ConfigProvider 仍在 Core。
Expand All @@ -262,4 +262,4 @@ Data Migrator 是独立发布的本地离线工具,不依赖 Core、Product As
WorkspaceInfo/WorkspaceIdentity 的运行操作由 Core 的 runtime extension traits 保留,稳定记录无需导入这些能力。
原 Core 存储入口保留错误映射;可选 legacy-migration facade 保留旧导入路径,但不再由 product-full 启用。
远程四种场景不提供迁移工具的执行入口;仅转换本机保存的连接记录,不连接远端。
使用与发行契约以 [独立迁移器说明](../../src/apps/data-migrator/README.zh-CN.md) 为准。
使用与发行契约以 [独立数据工具说明](../../src/apps/data-tools/README.zh-CN.md) 为准。
6 changes: 3 additions & 3 deletions docs/architecture/theme-token-optimization.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,9 @@ Mobile Web 直接消费 `@openbitfun/theme-openbitfun`。`ThemeProvider` 与首

### Desktop bootstrap 与 Native Mobile 预览

Data Migrator 的独立静态界面直接消费设计系统公开的字体、间距、控件和语义颜色 Token。
`generate-data-migrator-theme.mjs` 构建设计系统的 Token/主题包,并将公开 CSS 入口及其依赖打包为
`src/apps/data-migrator/ui/generated/design-system.css`,随迁移程序离线交付。原生控件只使用 canonical
Data Tools 的独立静态界面直接消费设计系统公开的字体、间距、控件和语义颜色 Token。
`generate-data-tools-theme.mjs` 构建设计系统的 Token/主题包,并将公开 CSS 入口及其依赖打包为
`src/apps/data-tools/ui/generated/design-system.css`,随迁移程序离线交付。原生控件只使用 canonical
Token;`theme.js` 在首屏绘制前选择系统浅色/深色和高对比模式,并监听系统设置变化。
仅独立迁移器打包刷新该资源,开发者也可显式运行生成命令;Desktop 开发和打包不依赖迁移器。
统一颜色审计同时检查源码和生成物漂移。
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,12 @@
"target:gc": "node scripts/cargo-target-gc.mjs",
"product:check": "node scripts/product-customization/cli.mjs check",
"product:explain": "node scripts/product-customization/cli.mjs explain",
"product:test": "node --test --test-concurrency=1 scripts/product-customization/*.test.mjs scripts/cli-product.test.mjs scripts/desktop-tauri-build.test.mjs scripts/data-migrator-tauri-build.test.mjs",
"data-migrator:dev": "cargo run -p openbitfun-data-migrator --bin openbitfun-data-migrator",
"data-migrator:check": "cargo check -p openbitfun-data-migrator",
"data-migrator:theme:generate": "node scripts/generate-data-migrator-theme.mjs",
"data-migrator:theme:check": "node scripts/generate-data-migrator-theme.mjs --check",
"data-migrator:build": "node scripts/data-migrator-tauri-build.mjs",
"product:test": "node --test --test-concurrency=1 scripts/product-customization/*.test.mjs scripts/cli-product.test.mjs scripts/desktop-tauri-build.test.mjs scripts/data-tools-tauri-build.test.mjs",
"data-tools:dev": "cargo run -p openbitfun-data-tools --bin openbitfun-data-tools",
"data-tools:check": "cargo check -p openbitfun-data-tools",
"data-tools:theme:generate": "node scripts/generate-data-tools-theme.mjs",
"data-tools:theme:check": "node scripts/generate-data-tools-theme.mjs --check",
"data-tools:build": "node scripts/data-tools-tauri-build.mjs",
"desktop:build": "node scripts/desktop-tauri-build.mjs",
"desktop:build:fast": "node scripts/desktop-tauri-build.mjs --debug --no-bundle",
"desktop:build:release-fast": "node scripts/desktop-tauri-build.mjs --no-bundle -- --profile release-fast --features devtools",
Expand Down
1 change: 1 addition & 0 deletions scripts/check-core-boundaries.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4153,6 +4153,7 @@ test('Services Core accepts only the reviewed feature-owned Tokio runtime graph'
'tokio/sync',
'tokio/time',
],
'session-recovery': ['local-storage', 'workspace-persistence', 'dep:anyhow'],
permission: ['dep:tokio', 'tokio/rt'],
'session-search': ['dep:tokio', 'tokio/rt'],
'process-runtime': [
Expand Down
2 changes: 2 additions & 0 deletions scripts/core-boundaries/cargo-dependency-boundaries.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ const SERVICES_CORE_TOKIO_FEATURES = new Map([
['filesystem', ['fs', 'rt', 'sync']],
['json-io', ['fs', 'rt', 'sync', 'time']],
['local-storage', ['fs', 'rt', 'sync', 'time']],
// Offline repair uses strict atomic storage writes; no processes or network.
['session-recovery', ['fs', 'rt', 'sync', 'time']],
['permission', ['rt']],
['process-runtime', ['io-util', 'process', 'rt', 'time']],
['session-search', ['rt']],
Expand Down
6 changes: 4 additions & 2 deletions scripts/core-boundaries/rules/feature-rules.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,16 @@ export const optionalDependencyFeatureOwnerRules = [
},
{
crateName: 'services-core',
reviewedAggregateFeatures: ['workspace-persistence'],
// Offline recovery composes only existing storage/identity contracts.
reviewedAggregateFeatures: ['workspace-persistence', 'session-recovery'],
reason:
'services-core optional implementation dependencies must stay behind their exact owner capability',
dependencies: [
{ depName: 'image', ownerFeatures: ['pet-packages'] },
{ depName: 'zip', ownerFeatures: ['pet-packages'] },
{ depName: 'uuid', ownerFeatures: ['pet-packages'] },
{ depName: 'aes-gcm', ownerFeatures: ['credential-vault'] },
{ depName: 'anyhow', ownerFeatures: ['credential-vault', 'dispatch-workspace', 'workspace-runtime', 'workspace-transfer'] },
{ depName: 'anyhow', ownerFeatures: ['credential-vault', 'dispatch-workspace', 'workspace-runtime', 'workspace-transfer', 'session-recovery'] },
{ depName: 'async-trait', ownerFeatures: ['permission', 'workspace-runtime'] },
{ depName: 'base64', ownerFeatures: ['pet-packages', 'credential-vault', 'filesystem'] },
{
Expand Down Expand Up @@ -507,6 +508,7 @@ export const capabilityContractDependencyRules = [
capabilityForwarder('workspace-transfer', 'workspace-ports'),
],
['permission', 'workspace-runtime', 'workspace-persistence', 'workspace-transfer'],
['session-recovery'],
)],
['openbitfun-services-integrations', capabilityConsumer(
[capabilityEdge([], { optional: true })],
Expand Down
Loading
Loading