@condorinst/mobile-bridge

中文文档
0.27.0发布于 2026/11/04SEE LICENSE IN LICENSETypeScriptESM + CJS近 30 天下载 2321

TypeScript SDK for the JS↔Native bridge of the Condor white-label mobile app.

原始使用文档
文档目录7 节
  1. Building a Home — person or AI agent
  2. Installation
  3. The CLI
  4. Versioning policy (semver)
  5. Shell side (Condor)
  6. Local development (SDK contributors)
  7. License

@condorinst/mobile-bridge

The SDK for the Home of the Condor Canvas app: a self-contained web page that the app shows inside a sandboxed iframe after login. The page talks to the app — device list, live light readings, history, permissions, language, and a cache on the phone for what must survive a restart — with BridgeClient, and the package's CLI builds, checks, tests and publishes it.

Building a Home — person or AI agent

Start at AGENTS.md: the rules, the boot sequence to copy, the browser harness, the validation loop, and which document owns each subject. It is written once for both audiences.

Everything ships inside the npm tarball, so after npm install it is on disk at node_modules/@condorinst/mobile-bridge/, readable with no network. Over the network, every document is plain text at a pinned, unauthenticated URL; llms.txt is the index and llms-full.txt has every document in one file:

https://cdn.jsdelivr.net/npm/@condorinst/[email protected]/llms.txt
https://cdn.jsdelivr.net/npm/@condorinst/[email protected]/llms-full.txt

The machine-readable contract — keys, commands, limits, capability matrix — is contract/bridge-contract.json, importable as @condorinst/mobile-bridge/contract.

Note for fetchers: the Bitbucket repository landing page is a JavaScript application and returns no readable text. Use the jsDelivr URLs above, or Bitbucket's raw/ file URLs.

Installation

npm install @condorinst/mobile-bridge@^0.27.0

The package ships a prebuilt dist/ (ESM + CJS + type declarations); no build toolchain of ours is needed on your side.

The CLI

CommandDoesDocumented in
npx condor-mobile-bridge dev -i dist/index.htmlruns your page in a browser harness that behaves like the app, inside a phone or tablet frame (--device)docs/device-testing.md
npx condor-mobile-bridge build -i dist/index.html -o dist/bundle.zipinlines your build into one index.html and zips itdocs/device-testing.md
npx condor-mobile-bridge validate -i dist/bundle.zip --strictapplies the app's gates and lints for blocked APIsdocs/device-testing.md
npx condor-mobile-bridge canvas publish | list | revokepublishes your bundle to your company (interactive login)docs/device-testing.md

Versioning policy (semver)

  • PATCH (0.23.x): bugfix with no API change.
  • MINOR (0.x.0): new observable key, new command, backward-compatible API.

    While on 0.x, a minor bump may carry breaking changes (semver treats pre-1.0 minors as breaking). Pin ^0.27.0 to stay on safe patches.

  • MAJOR (x.0.0): incompatible schema change (key rename, payload shape change, public API change). 1.0.0 marks the production-stable contract.

The native side declares nativeVersion in the handshake; the client declares clientVersion. This release does not enforce hard semver validation — the native side accepts any clientVersion. Real validation will land once there are 2+ versions in the field.

Shell side (Condor)

BridgeShell, the legacy Bridge singleton, mock mode and the dev panel are for Condor's app shell, not for client bundles: docs/shell-integration.md.

Local development (SDK contributors)

npm install          # installs deps + runs prepare (build)
npm run typecheck    # tsc --noEmit
npm run lint         # biome check
npm run format       # biome format --write
npm run test         # vitest run
npm run build        # tsup (ESM + CJS + types in dist/)

License

Proprietary — Condor Instruments. See LICENSE.

版本与发布记录

@condorinst/mobile-bridge 共发布 35 个版本,首次发布于 2026/06/24;过去 12 个月发布了 35 个版本。

版本发布日期距今
0.27.0latest2026/11/046 天前
0.26.22026/11/047 天前
0.26.12026/11/047 天前
0.26.02026/11/037 天前
0.25.22026/10/3011 天前
0.25.12026/10/3012 天前

关于 @condorinst/mobile-bridge 的常见问题

@condorinst/mobile-bridge 是什么?

TypeScript SDK for the JS↔Native bridge of the Condor white-label mobile app.

如何安装 @condorinst/mobile-bridge?

在项目目录运行 npm install @condorinst/mobile-bridge,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 condor-mobile-bridge,可以用 npx condor-mobile-bridge 直接运行。

@condorinst/mobile-bridge 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@condorinst/mobile-bridge 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@condorinst/mobile-bridge 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=18。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@condorinst/mobile-bridge 可以商用吗?

@condorinst/mobile-bridge 使用 SEE LICENSE IN LICENSE 许可。许可条款写在包内的独立文件中,请阅读该文件确认可否商用。以上为概括,不构成法律意见,请以许可原文为准。

@condorinst/mobile-bridge 的下载量有多少?

根据 npm 官方下载统计,@condorinst/mobile-bridge 在 2026/10/11 – 2026/11/09 这 30 天内被下载 2,321 次,日均约 77 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@condorinst/mobile-bridge 还在维护吗?

最新版本 0.27.0 发布于 2026/11/04(6 天前);至今共发布 35 个版本,其中过去 12 个月发布了 35 个;首次发布于 2026/06/24。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。