Skip to content

Commit ef359b9

Browse files
docs(design): plugin-distribution names esbuild, as os plugin build bundles (#27723)
Fixes #27700 Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:`docs/design/plugin-distribution.md` 两处把打包工具写成 `tsup` 的句子,改为 esbuild(树形注释一处,§5 第 1 步一处)。 - 为什么改:`os plugin build` 实际用 esbuild 打包入口到 `dist/index.mjs`,设计说明却指引读者去用 `tsup`。 - 风险与回滚:纯文档、不进任何包的发布内容,无运行时风险;回滚即 revert 这一个提交。 - 先看:`docs/design/plugin-distribution.md` 第 164 行起的 §5 第 1 步新句子是否与你对构建流程的理解一致。 - 两分钟验证:运行 `git grep -n -w tsup -- docs/design/plugin-distribution.md`,预期没有任何输出。 - 需要你做的:无,席位落地。 ## What changes Two sentences in `docs/design/plugin-distribution.md` named `tsup`; `os plugin build` bundles with esbuild. Each replacement is written from what `packages/cli/src/commands/plugin/build.ts` does, not by swapping the word: - Tree comment (`.osplugin` layout, L113): "pre-built ESM bundle (tsup)" becomes "pre-built ESM bundle (esbuild → dist/index.mjs)". The build writes the single `dist/index.mjs` (`outfile` and the staged archive entry). - §5 step 1 (L164): "run `tsup` (externalize `@objectstack/*`)" becomes "esbuild-bundle the entry to `dist/index.mjs` (externalize `@objectstack/*`, inline every other dependency)". In the code `external: ['@objectstack/*']` is the only external, so every other dependency is inlined; this agrees with §4.3 "Bundled only". Only those two places are edited. The ADR-0025 half of the original card is #27684 (triage re-scope), and `docs/adr/**` is untouched. ## Tests Docs-only change; no package test applies. <details> <summary>Gate readings</summary> - `git grep -n -w tsup -- docs/design/plugin-distribution.md` exits 1 with no output (0 hits), against 2 hits on `origin/main` `2feee8371a`. - `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` derived 15 families for this diff; all 15 were run locally and exited 0 (`--ran` reconciliation: 15 derived, 15 run, 0 NOT-MEASURED). The CI-side families are read from this PR's check-runs. - Raw control-character scan of the file: no hits. </details> ## Acceptance notes - `skip-changeset` is declared at creation: `docs/design/` is in no package's `files[]` (`git grep 'docs/design' -- 'packages/*/package.json'` has no hit), so the diff publishes nothing. - No out-of-scope findings. ## Verification `git grep -n -w tsup -- docs/design/plugin-distribution.md` prints nothing. --- _Generated by [Claude Code](https://claude.ai/code/session_01QSeKYmTYfaPbLQD4BJfomW)_ Co-authored-by: Claude <noreply@anthropic.com>
1 parent df0e1a0 commit ef359b9

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎docs/design/plugin-distribution.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ A `tar.gz`:
110110
```
111111
<id>-<version>.osplugin
112112
├── objectstack.plugin.json # compiled manifest (below)
113-
├── dist/ # pre-built ESM bundle (tsup); @objectstack/* externalized
113+
├── dist/ # pre-built ESM bundle (esbuild → dist/index.mjs); @objectstack/* externalized
114114
├── assets/ README LICENSE icon
115115
└── SIGNATURE # detached signature + publisher cert chain
116116
```
@@ -161,7 +161,8 @@ client-scoped `permissions` (data read/write via SDK, network → CSP, navigatio
161161
os plugin build → os plugin sign → os plugin publish
162162
```
163163

164-
1. **build** — run `tsup` (externalize `@objectstack/*`); validate the manifest
164+
1. **build** — esbuild-bundle the entry to `dist/index.mjs` (externalize `@objectstack/*`,
165+
inline every other dependency); validate the manifest
165166
(Zod + the new `permissions` schema); gate on protocol/engine compatibility;
166167
compute per-file `integrity`; emit `<id>-<version>.osplugin`.
167168
2. **sign** — sign with the publisher key (`PluginMetadata.signature`); may be

0 commit comments

Comments
 (0)