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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 0 additions & 5 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@
# Windows or hosted runner cannot report newline-only generated drift.
MiniApp/Demo/git-graph/source/** text eol=lf
src/crates/assembly/core/builtin_skills/miniapp-dev/references/examples/demo-git-graph/source/** text eol=lf
src/apps/mobile/**/*.json text eol=lf
src/apps/mobile/**/*.js text eol=lf
src/apps/mobile/**/*.ets text eol=lf
src/apps/mobile/**/*.kt text eol=lf
src/apps/mobile/**/*.swift text eol=lf

# The Product Operation Registry embeds and compares this generated JSON byte for byte.
src/crates/contracts/product-domains/src/generated/remote-surface-registry.json text eol=lf
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ jobs:

- name: Validate mobile-web build cache contract
if: needs.build-impact.outputs.frontend_required != 'false'
run: node --test scripts/mobile-web-build.test.mjs
run: node --test scripts/mobile-web-build.test.mjs scripts/mobile-client-build.contract.test.mjs

- name: Test mobile web account login and reload
if: needs.build-impact.outputs.frontend_required != 'false'
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/desktop-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1079,20 +1079,17 @@ jobs:
esac
gh release upload "${RELEASE_TAG}" --repo "${GITHUB_REPOSITORY}" \
--clobber release-upload-assets/*
MOBILE_VERSION="$(sed -nE 's/.*versionName = "([^"]+)".*/\1/p' \
src/apps/mobile/android/app/build.gradle.kts 2>/dev/null | head -n1 || true)"
MOBILE_VERSION="${MOBILE_VERSION:-$RELEASE_VERSION}"
gh release view "${RELEASE_TAG}" --repo "${GITHUB_REPOSITORY}" \
--json body --jq .body > release-notes.md
if ! grep -q '<!-- openbitfun-mobile-release -->' release-notes.md; then
cat >> release-notes.md <<EOF

<!-- openbitfun-mobile-release -->
### Android mobile
### Native mobile

Android mobile version **${MOBILE_VERSION}** is published separately as a prerelease:
[Download the Android prerelease](https://github.com/${GITHUB_REPOSITORY}/releases/tag/mobile-v${MOBILE_VERSION}).
The current APK uses the runner-generated debug signing key.
Native Android, iOS and HarmonyOS development and releases have moved to
[OpenBitFun-Mobile](https://github.com/openBitFun/OpenBitFun-Mobile).
[Mobile releases](https://github.com/openBitFun/OpenBitFun-Mobile/releases).
EOF
fi
gh release edit "${RELEASE_TAG}" --repo "${GITHUB_REPOSITORY}" \
Expand Down
133 changes: 0 additions & 133 deletions .github/workflows/mobile-package.yml

This file was deleted.

19 changes: 2 additions & 17 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -107,22 +107,7 @@ external/
.design/
.pnpm-store/

# KMP shared mobile core and the platform apps that include it (Gradle).
# Written per-directory rather than as a bare `local.properties` so the pattern
# cannot accidentally hide a checked-in file elsewhere in the repo. local.properties
# holds the machine's SDK path, which is exactly the kind of thing
# src/apps/mobile/AGENTS.md says stays out of the repository.
src/apps/mobile/shared/.gradle/
src/apps/mobile/shared/build/
src/apps/mobile/shared/*/build/
src/apps/mobile/shared/local.properties
src/apps/mobile/shared/.kotlin/
src/apps/mobile/android/.gradle/
src/apps/mobile/android/build/
src/apps/mobile/android/*/build/
src/apps/mobile/android/local.properties
src/apps/mobile/android/.kotlin/
/src/apps/mobile/ios/build/

.openbitfun/
.bitfun/

Expand All @@ -147,7 +132,7 @@ src/apps/mobile/android/.kotlin/
/src/apps/ohos/*/libs/
# hvigor writes a BuildProfile.ets next to each module during the build.
/src/apps/ohos/*/BuildProfile.ets
# Same policy as src/apps/mobile/harmonyos/.gitignore: signing credentials and
# Signing credentials and
# installable artifacts never leave the machine.
/src/apps/ohos/signing.local.json*
/src/apps/ohos/*.cer
Expand Down
6 changes: 6 additions & 0 deletions AGENTS-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,3 +191,9 @@ await api.invoke('your_command', { request: { ... } });
- 本文件只保留跨模块规则和稳定的仓库级入口。模块 ownership 细节、surface 或 crate 专属命令和 focused test 清单属于最近的指南;只有真实开发流程需要时才在那里补充命令。
- crate 清单由各层指南维护;不要在这里枚举 crate。
- `AGENTS.md` 与 `AGENTS-CN.md` 在同一次改动中同步更新。

## 原生移动端仓库

Android、iOS、HarmonyOS 应用及其 Kotlin 共享模块、原生 WebView 资源和移动端设计工具
已迁至 [OpenBitFun-Mobile](https://github.com/openBitFun/OpenBitFun-Mobile)。
`src/mobile-web` 和主机侧移动端/Relay 协议契约仍由本仓库维护。
6 changes: 6 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,3 +191,9 @@ Read the listed documents before editing in these areas. The sub-bullets are har
- Keep this file to cross-cutting rules and stable repository entry points. Module ownership details, surface- or crate-specific commands, and focused test lists belong in the nearest guide; add a command there only when a real workflow needs it.
- Layer guides own the crate tables; do not enumerate crates here.
- Update `AGENTS.md` and `AGENTS-CN.md` in the same change.

## Native mobile repository

Android, iOS and HarmonyOS apps, their Kotlin shared core, native WebView assets
and mobile design tooling are maintained in [OpenBitFun-Mobile](https://github.com/openBitFun/OpenBitFun-Mobile).
`src/mobile-web` and host-side mobile/Relay protocol contracts remain here.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,3 +165,9 @@ Core code is licensed under the [MIT License](./LICENSE). Third-party dependenci
<img alt="OpenBitFun Star History Chart" src="https://api.star-history.com/chart?repos=gcwing/openbitfun&amp;type=date&amp;legend=top-left" />
</picture>
</a>

### Native mobile development

Android, iOS and HarmonyOS source code and releases have moved to
[OpenBitFun-Mobile](https://github.com/openBitFun/OpenBitFun-Mobile).
The browser mobile-web client and Desktop/CLI/Relay host implementations remain in this repository.
6 changes: 6 additions & 0 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,9 @@ pnpm run desktop:dev
<img alt="OpenBitFun Star 历史图" src="https://api.star-history.com/chart?repos=gcwing/openbitfun&amp;type=date&amp;legend=top-left" />
</picture>
</a>

### 原生移动端开发

Android、iOS 和 HarmonyOS 的源码及发布已迁至
[OpenBitFun-Mobile](https://github.com/openBitFun/OpenBitFun-Mobile)。
浏览器版 mobile-web 以及 Desktop/CLI/Relay 主机实现仍在本仓库维护。
2 changes: 1 addition & 1 deletion docs/architecture/i18n.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ catalogs or making an extra request before first paint.
| Shared terms | `src/shared/i18n/resources/shared/<locale>/terms.json` | Generated into a small `shared.*` contract for each surface |
| Web UI | `src/web-ui/src/locales/<locale>/**/*.json` | Eagerly loads bootstrap namespaces only; route and feature copy loads lazily |
| Mobile Web | `src/mobile-web/src/i18n/messages.ts` | Owns mobile-only messages; no Web UI catalog imports |
| HarmonyOS phone | `src/apps/mobile/harmonyos/entry/src/main/ets/i18n` | Owns ArkTS catalogs for `zh-CN` and `en-US`; no Web UI or mobile-web catalog imports |
| HarmonyOS phone | [src/apps/mobile/harmonyos/entry/src/main/ets/i18n](https://github.com/openBitFun/OpenBitFun-Mobile/tree/main/src/apps/mobile/harmonyos/entry/src/main/ets/i18n) | Owns ArkTS catalogs for `zh-CN` and `en-US`; no Web UI or mobile-web catalog imports |
| Installer | `OpenBitFun-Installer/src/i18n/locales/*.json` | Owns installer-only messages; no app runtime catalog imports |
| Backend | `src/crates/assembly/core/locales/*.ftl` | Uses generated locale helpers and Fluent resources |
| Relay static homepage | `src/apps/relay-server/static/homepage` | Self-contained static resources plus generated page-scoped shared terms |
Expand Down
2 changes: 1 addition & 1 deletion docs/architecture/platform-portability-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ HarmonyOS PC 真实系统终端中安装并本地执行的原生 `openbitfun`:

- 在 HAP 内绘制终端风格界面;
- 只通过 `hdc shell` 推送、启动或操作二进制;
- 把现有 `src/apps/mobile/harmonyos` 手机 Remote App 改称为 PC 本地产品;
- 把现有 [src/apps/mobile/harmonyos](https://github.com/openBitFun/OpenBitFun-Mobile/tree/main/src/apps/mobile/harmonyos) 手机 Remote App 改称为 PC 本地产品;
- 在其他设备运行 Runtime,再由 HarmonyOS PC 远程控制。

完整的 HarmonyOS PC 支持同时包含本地 CLI/TUI 与 GUI。GUI 是另一项必需交付形态,但由独立产品专题设计和
Expand Down
2 changes: 1 addition & 1 deletion docs/architecture/product-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ block-beta
| Development area | Repository scope | Current modules |
|---|---|---|
| Apps | `src/apps/*` | `desktop`、`cli`、`server`、`relay-server`、`sdk-host`、`miniapp-shell`、`data-tools`、`miniapp-market-server`、`extension-host`(Bun Plugin Host 进程) |
| Web and delivery | product roots | `src/web-ui`、`src/mobile-web`、`src/miniapp-market-web`、`src/apps/mobile`、`OpenBitFun-Installer`、`website`、`tests/e2e` |
| Web and delivery | product roots | `src/web-ui`、`src/mobile-web`、`src/miniapp-market-web`、[OpenBitFun-Mobile](https://github.com/openBitFun/OpenBitFun-Mobile)、`OpenBitFun-Installer`、`website`、`tests/e2e` |
| SDK | `sdk/*` | `typescript` |
| Shared frontend | `src/shared`、`packages/flow-chat-presentation` | `shared`、`flow-chat-presentation` |
| Design system | `design-system/*` | `packages/design-tokens`、`packages/theme-openbitfun`、`packages/ui`、`tooling/package-contract`、`tooling/token-engine`、`apps/design-lab` |
Expand Down
2 changes: 1 addition & 1 deletion docs/architecture/theme-token-optimization.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ Native Mobile 预览的工具 chrome 消费 canonical `--openbitfun-*`;设备
### HarmonyOS / Android / iOS

原生移动端不加载 Web CSS,也不复制 `@openbitfun/theme-openbitfun`。它们的唯一跨平台视觉事实 owner 是
`src/apps/mobile/design-system/tokens/mobile-tokens.json`:
[src/apps/mobile/design-system/tokens/mobile-tokens.json](https://github.com/openBitFun/OpenBitFun-Mobile/tree/main/src/apps/mobile/design-system/tokens/mobile-tokens.json):

- 颜色名称按语义登记,例如 content、surface、status、scrim、media control 和 shadow;不得使用 `green`、
`red`、`white` 之类数值或外观名称充当公共 API。
Expand Down
7 changes: 0 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@
"theme:color-audit:installer": "node scripts/audit-frontend-colors.mjs --surface installer",
"theme:color-audit:cli": "node scripts/audit-frontend-colors.mjs --surface cli",
"theme:color-audit:desktop-bootstrap": "node scripts/audit-frontend-colors.mjs --surface desktop-bootstrap",
"theme:color-audit:mobile-preview": "node scripts/audit-frontend-colors.mjs --surface mobile-design-preview",
"theme:color-audit:native-mobile": "node scripts/audit-frontend-colors.mjs --kind native-mobile",
"theme:color-audit:miniapps": "node scripts/audit-frontend-colors.mjs --kind miniapp",
"theme:color-audit:all": "node scripts/audit-frontend-colors.mjs",
"theme:color-audit:test": "node --test scripts/audit-theme-colors.test.mjs scripts/audit-cli-theme-colors.test.mjs scripts/audit-frontend-colors.test.mjs",
Expand All @@ -68,11 +66,6 @@
"models-dev:check": "node scripts/update-models-dev-snapshot.mjs --check",
"models-dev:update": "node scripts/update-models-dev-snapshot.mjs",
"check:build-prereqs": "node scripts/check-build-prereqs.mjs",
"harmony:architecture": "node scripts/check-harmonyos-architecture.mjs",
"mobile:architecture": "node scripts/check-mobile-architecture.mjs && node --test scripts/mobile-client-build.contract.test.mjs",
"mobile:ui:generate": "node scripts/mobile-ui-design-system.mjs",
"mobile:ui:check": "node scripts/mobile-ui-design-system.mjs --check && node scripts/mobile-ui-preview.mjs --check",
"mobile:ui:preview": "node scripts/mobile-ui-design-system.mjs && node scripts/mobile-ui-preview.mjs",
"check:core-boundaries": "pnpm run agent-harness:check && node scripts/check-core-boundaries.mjs",
"check:core-boundaries:test": "node --test scripts/check-core-boundaries.test.mjs",
"check:github-config": "pnpm --dir src/web-ui exec node ../../scripts/check-github-config.mjs && node --test scripts/check-github-config.test.mjs",
Expand Down
4 changes: 0 additions & 4 deletions release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@
{
"type": "generic",
"path": "src/apps/relay-server/Cargo.toml"
},
{
"type": "generic",
"path": "src/apps/mobile/harmonyos/AppScope/app.json5"
}
]
}
Expand Down
1 change: 0 additions & 1 deletion scripts/audit-theme-colors.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ const SOURCE_OWNER_ROOTS = [
'OpenBitFun-Installer/src',
'design-system/packages/design-tokens/src',
'design-system/packages/theme-openbitfun/src',
'src/apps/mobile/design-system/preview',
'src/mobile-web/src',
'src/web-ui',
];
Expand Down
16 changes: 0 additions & 16 deletions scripts/build-mobile-terminal.mjs

This file was deleted.

21 changes: 3 additions & 18 deletions scripts/check-github-config.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1452,7 +1452,7 @@ test('stages unique release asset names before publishing', () => {
assert.match(steps[uploadIndex].run, /--clobber release-upload-assets\/\*/);
});

test('Desktop release notes link the separately published Android prerelease', () => {
test('Desktop release notes link the migrated native mobile repository', () => {
const workflow = yaml.parse(
readFileSync(
path.join(repoRoot, '.github/workflows/desktop-package.yml'),
Expand All @@ -1462,26 +1462,11 @@ test('Desktop release notes link the separately published Android prerelease', (
const uploadStep = workflow.jobs['upload-release-assets'].steps.find(
(step) => step.name === 'Upload to release',
);
assert.match(uploadStep.run, /mobile-v\$\{MOBILE_VERSION\}/);
assert.match(uploadStep.run, /runner-generated debug signing key/);
assert.match(uploadStep.run, /github\.com\/openBitFun\/OpenBitFun-Mobile\/releases/);
assert.doesNotMatch(uploadStep.run, /src\/apps\/mobile\//);
assert.match(uploadStep.run, /--notes-file release-notes\.md/);
});

test('Mobile Package publishes Android assets from mobile-v tags', () => {
const workflow = yaml.parse(
readFileSync(path.join(repoRoot, '.github/workflows/mobile-package.yml'), 'utf8'),
);
assert.ok(workflow.on.push.tags.includes('mobile-v*'));
assert.match(
workflow.jobs.android.steps.find((step) => step.name === 'Build signed Android package').run,
/:app:assembleRelease/,
);
assert.equal(workflow.jobs.publish.needs.includes('android'), true);
assert.match(
workflow.jobs.publish.steps.find((step) => step.name === 'Create mobile release').run,
/gh release create/,
);
});

test('Desktop packaging preserves old-tag source bytes before Windows checkout', () => {
const workflow = yaml.parse(
Expand Down
Loading
Loading