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
31 changes: 31 additions & 0 deletions examples/audiobook-curator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,24 @@ including each host's plugin metadata, Skill, bundled CLI script, and bundled MC
server. The example uses only public `agent-bundle` and
`@agent-bundle/rsc-runtime` exports with `workspace:*` dependencies.

## Source layout

- `src/application.tsx` — composition only: merges the feature modules'
defaults and declares the `<AgentBundle>` tree (Skill, CLI Script, MCP
server, operations).
- `src/operations/` — the operation catalog, grouped by workflow stage:
`discovery` (inspect/inventory/library-audit/select), `audible`
(search/select/cache), `evidence` (acoustic/whisper), `media-mutation`
(apply-metadata/apply-chapters), and `output` (convert/prepare/audit), with
shared `cli-arguments.ts` and `schemas.ts`.
- Domain logic lives beside them in `src/` (`library.ts`, `audible.ts`,
`evidence.ts`, `conversion.ts`, `media-mutation.ts`, `integrity-audit.ts`,
`curator-core.ts`) over the shared `foundation.ts` and `media-process.ts`
primitives; `result.tsx` renders every receipt for MCP.
- `src/cli.ts`, `src/cli-entry.ts`, `src/mcp-server.ts`, and
`bin/audiobook-curator.js` are the entry shims for the CLI (test-injectable
runner, bundled `<Script>` entry, npm bin) and the stdio MCP server.

## Complete workflow

The original thirteen commands are present:
Expand Down Expand Up @@ -77,3 +95,16 @@ signal rather than hidden deadlines.

The completion contract and real-volume checklist are in
[`docs/parity-ledger.md`](docs/parity-ledger.md).

## Maintainer notes

This example carries two bundler configs: `agent-bundle.config.ts` (the
application, consumed by `agent-bundle build` for the `artifact/` host
outputs) and `rslib.config.ts` (a hand-written second build producing
`dist/` for the npm `bin`/`exports`, plus its `tsconfig.build.json`). The
duplication is a known framework gap — `agent-bundle build` does not yet emit
a node-consumable package build, so the same CLI is bundled twice from two
configs. When the framework owns the package build, delete `rslib.config.ts`,
`tsconfig.build.json`, and the `build:cli` script; `bin/audiobook-curator.js`
should then point at the framework's output. See the note at the top of
`rslib.config.ts`.
8 changes: 8 additions & 0 deletions examples/audiobook-curator/rslib.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
// FRAMEWORK GAP: this second bundler config exists only because `agent-bundle
// build` emits host artifacts (artifact/{claude,codex}) but no node-consumable
// dist/ for the package's own `bin` and `exports`. The CLI is therefore built
// twice — once here into dist/cli.js for bin/audiobook-curator.js, and once by
// `agent-bundle build` into artifact/*/scripts/audiobook-curator.mjs — from
// two configs driving the same bundler family. Once agent-bundle owns the
// package build ("one config, agent-bundle owns the build"), this file and
// tsconfig.build.json should be deleted. See the maintainer notes in README.md.
import { defineConfig } from '@rslib/core';

export default defineConfig({
Expand Down
Loading
Loading