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
6 changes: 6 additions & 0 deletions .changeset/update-rslint-core.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"agent-bundle": patch
"create-agent-bundle": patch
---

Update `agent-bundle` to use `@rslint/core` 0.9.1 and pin generated React runtime peers to one compatible release (#777).
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"@rsbuild/core": "2.2.3",
"@rsbuild/plugin-react": "2.1.0",
"@rslib/core": "1.0.0",
"@rslint/core": "0.9.0",
"@rslint/core": "0.9.1",
"@rstest/adapter-rslib": "0.11.12",
"@rstest/core": "0.11.12",
"@rstest/playwright": "0.11.12",
Expand Down
2 changes: 1 addition & 1 deletion packages/agent-bundle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
"@rsbuild/core": "2.2.3",
"@rsbuild/plugin-react": "2.1.0",
"@rslib/core": "1.0.0",
"@rslint/core": "0.9.0",
"@rslint/core": "0.9.1",
"@rstackjs/load-config": "0.1.2",
"acorn": "8.18.0",
"ajv": "8.20.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"typescript": "7.0.2",
"@agent-bundle/runtime": "workspace:*",
"react": "19.2.8",
"react-dom": "19.2.8",
"zod": "4.4.3"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"@types/react": "19.2.18",
"@agent-bundle/runtime": "workspace:*",
"react": "19.2.8",
"react-dom": "19.2.8",
"zod": "4.4.3"
}
}
22 changes: 16 additions & 6 deletions packages/create-agent-bundle/tests/scaffold.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,14 +251,24 @@ layer(NodeServices.layer, { excludeTestServices: true })('scaffold (real filesys
// nothing (`agent-bundle prepack` reports a stray runtime dependency as AB7014).
it.effect('pins the paired runtime for the routed cli-tool template as a dev dependency', () => Effect.gen(function* () {
const path = yield* Path.Path;
const { frameworkSpec, root } = yield* scaffoldTemplate('cli-tool', { pluginName: 'greeter' });
const manifest = yield* readJson<{
const [cliTool, mcpServer] = yield* Effect.all([
scaffoldTemplate('cli-tool', { pluginName: 'greeter' }),
scaffoldTemplate('mcp-server', { pluginName: 'status-plugin' }),
], { concurrency: 'unbounded' });
const cliManifest = yield* readJson<{
readonly dependencies?: Record<string, string>;
readonly devDependencies: Record<string, string>;
}>(path.join(root, 'package.json'));
expect(manifest.dependencies).toBeUndefined();
expect(manifest.devDependencies['@agent-bundle/runtime']).toBe(runtimeSpecForFramework(frameworkSpec, testPairing));
expect(manifest.devDependencies['zod']).toBeDefined();
}>(path.join(cliTool.root, 'package.json'));
expect(cliManifest.dependencies).toBeUndefined();
expect(cliManifest.devDependencies['@agent-bundle/runtime'])
.toBe(runtimeSpecForFramework(cliTool.frameworkSpec, testPairing));
expect(cliManifest.devDependencies['react-dom']).toBe('19.2.8');
expect(cliManifest.devDependencies['zod']).toBeDefined();

const mcpManifest = yield* readJson<{
readonly devDependencies: Record<string, string>;
}>(path.join(mcpServer.root, 'package.json'));
expect(mcpManifest.devDependencies['react-dom']).toBe('19.2.8');
}));

it.effect('replaces every placeholder and pins the framework spec', () => Effect.gen(function* () {
Expand Down
108 changes: 41 additions & 67 deletions pnpm-lock.yaml

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

2 changes: 2 additions & 0 deletions scripts/run-packed-tests.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ try {
'--no-audit',
'--no-fund',
'--prefer-offline',
'react@19.2.8',
'react-dom@19.2.8',
...packedRecords.map((record) => record.tarball),
], { cwd: binConsumer, env: environment });
const executedBins = [];
Expand Down
3 changes: 3 additions & 0 deletions website/docs/en/guide/start/quick-start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ selection and the separately versioned compiler/runtime pairing used by released
| `mcp-server` | Conventional MCP tools with route/projection tests. The current starter also demonstrates an optional library export and an artifact script. |
| `cli-tool` | A standalone routed CLI, with a script and library example. |

The routed templates pin React and React DOM to the same release so a fresh install cannot select
an incompatible peer pair.

The scaffolder offers every target the compiler builds: `amp`, `portable`, `claude`, `codex`, and
`cursor`. One combination is refused — `amp` with this MCP starter, because Amp's skill-scoped MCP
contract rejects the starter's compiler-owned local `status` server
Expand Down
2 changes: 2 additions & 0 deletions website/docs/zh/guide/start/quick-start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ npm run check
| `mcp-server` | 约定式 MCP 工具及路由、投影测试;当前 starter 还演示了可选的库导出与产物脚本。 |
| `cli-tool` | 独立的路由式 CLI,附带脚本和库示例。 |

路由式模板将 React 与 React DOM 固定为同一版本,避免全新安装选中不兼容的 peer 组合。

脚手架提供编译器构建的每一个 target:`amp`、`portable`、`claude`、`codex` 和 `cursor`。
只有一种组合被拒绝——`amp` 与这个 MCP starter,因为 Amp 的 Skill 级 MCP 契约会拒绝 starter 中
由编译器拥有的本地 `status` 服务器(`amp.mcp.generated-local`)。创建项目时就会说明这一点,并
Expand Down
Loading