You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(audiobook-curator): ship the CLI as <tool>.cli.ts projections of the curator tools (#734)
* refactor(audiobook-curator): ship the CLI as <tool>.cli.ts projections of the curator tools (#725)
* test(workbench): projected commands hang off their tool leaves
* chore: changeset PR number
* deslop: one-line schema note, annotate relaxed --report/--receipt
* examples(audiobook-curator): drop orphaned operation inputSchemas
* examples(audiobook-curator): schema judges regions after the split; drop dead imports; explicit confirm
* examples(audiobook-curator): drop orphaned JSDoc
Judge a projected command's `z.enum` choices with the canonical schema after `mapInput` runs when the `<tool>.cli.ts` projection exports `mapInput`, so a mapper can split a comma-separated enum list (`--regions us,uk`); a value outside the enum still exits 2 as `Invalid value for --<option>[<index>]`. The `audiobook-curator` example now ships its sixteen commands as `<tool>.cli.ts` projections of its sixteen curator tools instead of a parallel `src/cli/` tree and the bulk `routes.mcpCommands` group. (#734)
|`DataList`, `Field`, `Callout`, and `FileList`| Provide atomic report fields, prose callouts, and file-list blocks throughout the component library and directly in the catalog resource, curate prompt, cache route, and library audit | Provide the same primitives through the shared components and directly in `library-audit`|
104
-
|`FileCard` and `EditionCard`, fed by `view-models`| Render file and edition models in `audit_library`, shelf, and ranking views | Reached through the receipt-specific shelves and ranking components |
105
-
|`InspectionShelf`, `InventoryShelf`, and `SelectionShelf`| Compose receipt-specific inspection, inventory, and selection reports, each used directly by its MCP route; `audit_library` composes `AuditSummary` and `AuditFileCards` alongside the asynchronous `LibraryAnalysis` instead of a shelf |`InventoryShelf` and `SelectionShelf` compose `inventory` and `select`|
106
-
|`SearchRanking`, `IdentifyRanking`, and `SelectionRanking`| Render the statically typed ranking for `search_audible`, `identify_audible_sample`, and `select_audible_edition`|`SearchRanking` composes `audible-search`|
107
-
|`AcousticTrail`, `IdentifyTrail`, and `WhisperTrail`| Render the statically typed evidence for acoustic verification, acoustic identification, and Whisper verification | No authored rendered counterpart; those compatibility commands remain plain `.ts` routes |
108
-
|`MetadataMutation`, `ChapterMutation`, `ConversionMutation`, and `PrepareMutation`| Render each statically typed metadata, chapter, conversion, or preparation mutation |`ConversionMutation` composes `convert`|
109
-
|`ChapterOutline` with normalized `chapters` props | Composes integrity audit, conversion, and chapter application tools through receipt-specific mappers | Composes `audit` and `convert`|
110
-
|`IntegrityAuditReport`, `MetadataIntegrityReport`, `ChapterIntegrityReport`, and `ConversionIntegrityReport`| Render each statically typed integrity report |`IntegrityAuditReport` and `ConversionIntegrityReport` compose `audit` and `convert`|
|`LibraryAnalysis` and `CandidateGroupCallout`| Resolve asynchronous duplicate and multipart analysis in `audit_library` with shared atomic candidate prose and file lists | Resolve the same analysis and candidate-group presentation in `library-audit`|
104
+
The tool modules perform domain work and compose these report components once;
105
+
the same rendered document serves the MCP client as text content and the
106
+
command line as piped Markdown, so there is no second presenter to drift:
107
+
108
+
| Component | Composition |
109
+
| --- | --- |
110
+
|`DataList`, `Field`, `Callout`, and `FileList`| Atomic report fields, prose callouts, and file-list blocks throughout the component library and directly in the catalog resource, curate prompt, and cache route |
111
+
|`FileCard` and `EditionCard`, fed by `view-models`| File and edition models in `audit_library`, shelf, and ranking views |
112
+
|`InspectionShelf`, `InventoryShelf`, and `SelectionShelf`| Receipt-specific inspection, inventory, and selection reports for `inspect_sources`, `inventory_sources`, and `select_sources`; `audit_library` composes `AuditSummary` and `AuditFileCards` alongside the asynchronous `LibraryAnalysis` instead of a shelf |
113
+
|`SearchRanking`, `IdentifyRanking`, and `SelectionRanking`| The statically typed ranking for `search_audible`, `identify_audible_sample`, and `select_audible_edition`|
114
+
|`AcousticTrail`, `IdentifyTrail`, and `WhisperTrail`| The statically typed evidence for `verify_audible_sample`, `identify_audible_sample`, and `verify_with_whisper`|
115
+
|`MetadataMutation`, `ChapterMutation`, `ConversionMutation`, and `PrepareMutation`| Each statically typed metadata, chapter, conversion, or preparation mutation |
116
+
|`ChapterOutline` with normalized `chapters` props | Integrity audit, conversion, and chapter application through receipt-specific mappers |
117
+
|`IntegrityAuditReport`, `MetadataIntegrityReport`, `ChapterIntegrityReport`, and `ConversionIntegrityReport`| Each statically typed integrity report |
118
+
|`CurationShelf`| Shelf review, Audible edition selection, and metadata/chapter application |
119
+
|`LibraryAnalysis` and `CandidateGroupCallout`| Asynchronous duplicate and multipart analysis in `audit_library` with shared atomic candidate prose and file lists |
113
120
114
121
The catalog resource at `src/mcp/curator/resources/catalog.tsx` and the prompt at
115
122
`src/mcp/curator/prompts/curate.tsx` are compositions too: both return their
@@ -133,9 +140,9 @@ The conventional state module defines the workspace-durable
133
140
`mutationApplied`, and `shelfCleared`. `select_audible_edition` dispatches the
134
141
selection event; `apply_audiobook_metadata` and `apply_audiobook_chapters`
135
142
dispatch mutation records and render the updated shelf. The read-only
136
-
`review_curation_shelf`MCP tool and rendered `shelf`CLI command expose the
137
-
same mounted state. If state is not mounted, both surfaces return an empty
138
-
structured shelf and render an explicit unavailable notice.
143
+
`review_curation_shelf` tool — `shelf`on the command line — exposes the
144
+
mounted state. If state is not mounted, it returns an empty structured shelf
145
+
and renders an explicit unavailable notice on both surfaces.
139
146
140
147
### Suspense becomes MCP progress
141
148
@@ -146,27 +153,25 @@ node — and that node is the whole progress story: the generated MCP projector
146
153
turns the streamed fallback into `notifications/progress` for a client that
147
154
sent a progress token, then replaces it with the completed analysis without
148
155
changing the final structured `LibraryAuditReceipt`. No `progress.report()`
149
-
call repeats the fallback's message. The rendered `library-audit` CLI route
0 commit comments