Add capability registry, pipeline-driven adapters, and expanded format matrix#1
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Description
packages/conversion-engine/src/capabilities.ts) that maps source/target pairs to apipeline(sharp|ffmpeg|libreoffice|pandoc|calibre|archive) and exportfindCapabilityandcapabilityRegistry.ExternalToolAdapter(packages/conversion-engine/src/adapters/externalToolAdapter.ts) as a placeholder adapter that reports planned but unconfigured pipelines anddisplayNamesfor nicer errors.BasicAdapterto consult the capability registry viafindCapability, tighten Sharp output checks, surface anerrorCodeon failures, and standardize metadata/pipeline reporting.packages/conversion-engine/src/index.ts), addfindAdapter, and makeexecuteConversionvalidate capabilities and returnUNSUPPORTED_PAIRorTOOLING_UNAVAILABLEwith contextual messages.formatMatrix(packages/shared/src/formats.ts) to include broad audio, video, document, spreadsheet, presentation, ebook, and archive formats and addgetCategoryForInput.types.tsand export new capabilities from the engine package, and add a new design docdocs/format-expansion-plan.mddescribing the roadmap and phases.Testing
node:testunit tests inpackages/conversion-engineandpackages/shared, includingindex.test.tsandformats.test.ts, which validate adapter discovery (findAdapter('png','jpg')), capability resolution (findCapability('mp4','mp3')), tooling-unavailable behavior for planned adapters, unsupported-pair rejection, and new format matrix assertions; all tests passed.TOOLING_UNAVAILABLEis returned for planned non-image adapters andUNSUPPORTED_PAIRis returned when no capability exists.Codex Task