Interface: EngineRegistry
Defined in: src/batteries/media/registry.ts:117
Ordered capability-filtered dispatch over the pipeline's engines.
Extends
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
engines | readonly | readonly MediaEngine[] | The resolved engines, in supply order (inspection/debugging). | src/batteries/media/registry.ts:119 |
Methods
convert()
convert(request: ConvertRequest): Promise<ConvertResult>;Defined in: src/batteries/media/registry.ts:135
Convert via the shortest capable path (direct edge = one hop). The selection rule picks the engine for each executed hop; options are forwarded to every hop (engines ignore keys they don't understand).
Parameters
| Parameter | Type | Description |
|---|---|---|
request | ConvertRequest | The input bytes, target token, and options. |
Returns
Promise<ConvertResult>
The final hop's outputs.
convertTargets()
convertTargets(fromMime: string): readonly string[];Defined in: src/batteries/media/registry.ts:126
Every format token reachable from fromMime — directly or through a computed path of up to three hops. Drives "supported targets" error messages.
Parameters
| Parameter | Type | Description |
|---|---|---|
fromMime | string | The input MIME type. |
Returns
readonly string[]
edit()
edit(request: EditRequest): Promise<EditResult>;Defined in: src/batteries/media/registry.ts:153
Apply one structural document operation. Candidates are engines whose over matches the input and whose ops include the requested op; the selection rule arbitrates between engines of differing fidelity (supply order wins by default).
Parameters
| Parameter | Type | Description |
|---|---|---|
request | EditRequest | The op, its args, and the input bytes. |
Returns
Promise<EditResult>
The restructured bytes plus optional change counts.
hasConvert()
hasConvert(from?: string, to?: string): boolean;Defined in: src/batteries/media/validate.ts:34
true when some engine declares a matching convert edge (omit either side for "any").
Parameters
| Parameter | Type |
|---|---|
from? | string |
to? | string |
Returns
boolean
Inherited from
hasEdit()?
optional hasEdit(mime?: string, op?: string): boolean;Defined in: src/batteries/media/validate.ts:41
true when some engine declares a matching edit capability (omit both for "any"). Optional so existing probe stubs stay valid; absent means "no edit engines".
Parameters
| Parameter | Type |
|---|---|
mime? | string |
op? | string |
Returns
boolean
Inherited from
hasMutate()
hasMutate(): boolean;Defined in: src/batteries/media/validate.ts:36
true when some engine declares a mutate capability.
Returns
boolean
Inherited from
mutate()
mutate(request: MutateRequest): Promise<EngineBytesResult>;Defined in: src/batteries/media/registry.ts:144
Apply a fused same-format transform. Candidates are engines whose over matches the input, whose ops cover the requested operations, and — when a re-encode is requested — whose encodes include the target.
Parameters
| Parameter | Type | Description |
|---|---|---|
request | MutateRequest | The fused operations and input bytes. |
Returns
Promise<EngineBytesResult>
The transformed bytes.