From c79f8c364404bab3e936c1c80a55954c72e21bdd Mon Sep 17 00:00:00 2001 From: ScriptedAlchemy Date: Mon, 31 Aug 2026 07:18:54 +0000 Subject: [PATCH 1/2] chore(examples): canonicalize defineConfig imports, drop --json from user-facing scripts, align check chains MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The examples split on three cosmetic conventions the audit called out. Canonicalizes the defineConfig import to 'agent-bundle/config' — the root README quick start already teaches that path — across the three examples still importing from 'agent-bundle'. Drops --json from example build and validate package scripts so pnpm build/validate speak the post-#52 human writers instead of dumping machine JSON (CI examples:check consumes exit codes only). Reorders the rsc example's check to the canonical validate && build && typecheck && test chain. Also renames the deleted src/cli-entry.ts self-executing pattern to src/cli.ts with the exported-main envelope teaching in the rsc-runtime package README and its test fixture strings. --- examples/audiobook-curator/package.json | 4 ++-- examples/hooks-and-scripts/agent-bundle.config.ts | 2 +- examples/hooks-and-scripts/package.json | 4 ++-- examples/mcp-app/agent-bundle.config.ts | 2 +- examples/mcp-app/package.json | 4 ++-- examples/rsc-agent-runtime/package.json | 2 +- examples/skills-starter/agent-bundle.config.ts | 2 +- examples/skills-starter/package.json | 4 ++-- packages/rsc-runtime/README.md | 9 +++++---- packages/rsc-runtime/tests/plugin-app.test.ts | 4 ++-- 10 files changed, 19 insertions(+), 18 deletions(-) diff --git a/examples/audiobook-curator/package.json b/examples/audiobook-curator/package.json index 681802341..001482500 100644 --- a/examples/audiobook-curator/package.json +++ b/examples/audiobook-curator/package.json @@ -21,12 +21,12 @@ } }, "scripts": { - "build": "agent-bundle build --json --output artifact", + "build": "agent-bundle build --output artifact", "check": "pnpm validate && pnpm build && pnpm typecheck && pnpm test", "dev": "agent-bundle dev", "test": "rstest tests", "typecheck": "tsc -p tsconfig.json --noEmit", - "validate": "agent-bundle validate --json" + "validate": "agent-bundle validate" }, "dependencies": { "@agent-bundle/rsc-runtime": "workspace:*", diff --git a/examples/hooks-and-scripts/agent-bundle.config.ts b/examples/hooks-and-scripts/agent-bundle.config.ts index 2df50f572..302a7706d 100644 --- a/examples/hooks-and-scripts/agent-bundle.config.ts +++ b/examples/hooks-and-scripts/agent-bundle.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'agent-bundle'; +import { defineConfig } from 'agent-bundle/config'; export default defineConfig({ assets: ['release/*.json'], diff --git a/examples/hooks-and-scripts/package.json b/examples/hooks-and-scripts/package.json index 5fba88cbd..48935f0bc 100644 --- a/examples/hooks-and-scripts/package.json +++ b/examples/hooks-and-scripts/package.json @@ -3,10 +3,10 @@ "private": true, "type": "module", "scripts": { - "build": "agent-bundle build --json", + "build": "agent-bundle build", "check": "pnpm validate && pnpm build", "dev": "agent-bundle dev", - "validate": "agent-bundle validate --json" + "validate": "agent-bundle validate" }, "devDependencies": { "agent-bundle": "workspace:*" diff --git a/examples/mcp-app/agent-bundle.config.ts b/examples/mcp-app/agent-bundle.config.ts index 2072b0928..50d2328ff 100644 --- a/examples/mcp-app/agent-bundle.config.ts +++ b/examples/mcp-app/agent-bundle.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'agent-bundle'; +import { defineConfig } from 'agent-bundle/config'; export default defineConfig({ assets: ['evals/fixtures/status/result.json'], diff --git a/examples/mcp-app/package.json b/examples/mcp-app/package.json index 51ba6e27e..49508a1c7 100644 --- a/examples/mcp-app/package.json +++ b/examples/mcp-app/package.json @@ -3,10 +3,10 @@ "private": true, "type": "module", "scripts": { - "build": "agent-bundle build --json", + "build": "agent-bundle build", "check": "pnpm validate && pnpm build", "dev": "agent-bundle dev", - "validate": "agent-bundle validate --json" + "validate": "agent-bundle validate" }, "devDependencies": { "@modelcontextprotocol/ext-apps": "1.7.5", diff --git a/examples/rsc-agent-runtime/package.json b/examples/rsc-agent-runtime/package.json index dd41d5234..42e3526b6 100644 --- a/examples/rsc-agent-runtime/package.json +++ b/examples/rsc-agent-runtime/package.json @@ -8,7 +8,7 @@ "test": "rstest --config rstest.config.ts", "typecheck": "tsc -p tsconfig.json --noEmit", "validate": "agent-bundle validate", - "check": "pnpm build && pnpm test && pnpm typecheck", + "check": "pnpm validate && pnpm build && pnpm typecheck && pnpm test", "eval:hosts": "node scripts/eval-hosts.mjs", "capture:widget": "node scripts/capture-widget.mjs" }, diff --git a/examples/skills-starter/agent-bundle.config.ts b/examples/skills-starter/agent-bundle.config.ts index d6e7a2de1..da0b4bafd 100644 --- a/examples/skills-starter/agent-bundle.config.ts +++ b/examples/skills-starter/agent-bundle.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from 'agent-bundle'; +import { defineConfig } from 'agent-bundle/config'; export default defineConfig({ plugin: { diff --git a/examples/skills-starter/package.json b/examples/skills-starter/package.json index 1ad63fe66..46aefce62 100644 --- a/examples/skills-starter/package.json +++ b/examples/skills-starter/package.json @@ -3,10 +3,10 @@ "private": true, "type": "module", "scripts": { - "build": "agent-bundle build --json", + "build": "agent-bundle build", "check": "pnpm validate && pnpm build", "dev": "agent-bundle dev", - "validate": "agent-bundle validate --json" + "validate": "agent-bundle validate" }, "devDependencies": { "agent-bundle": "workspace:*" diff --git a/packages/rsc-runtime/README.md b/packages/rsc-runtime/README.md index 5565e2b0c..cc42da6d6 100644 --- a/packages/rsc-runtime/README.md +++ b/packages/rsc-runtime/README.md @@ -79,7 +79,7 @@ const status = defineOperation({ export const application = defineRscAgentBundle( -