@aelionsdk/capability 1.2.0-rc.1 → 1.2.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -9,7 +9,7 @@ AelionSDK.
9
9
  npm install @aelionsdk/capability@next
10
10
  ```
11
11
 
12
- `next` currently resolves to `1.2.0-rc.1`. Product applications should normally
12
+ `next` currently resolves to `1.2.0-rc.2`. Product applications should normally
13
13
  use the capability APIs exposed by `@aelionsdk/sdk`; this package is for custom
14
14
  preflight screens and execution hosts.
15
15
 
@@ -17,11 +17,14 @@ preflight screens and execution hosts.
17
17
 
18
18
  - browser capability probes;
19
19
  - capability reports and typed results;
20
+ - software codec capability descriptors (not an executable codec backend);
20
21
  - fail-closed gates for required features and export profiles.
21
22
 
22
23
  A declared browser API is not proof that a codec configuration works. Run the
23
24
  relevant gate with the actual dimensions, frame rate, sample rate and channel
24
25
  count before starting a job.
26
+ `CodecFallbackRegistry` records host-owned capabilities only; Aelion media and
27
+ export do not route work through registered descriptors.
25
28
 
26
29
  See the [capability preflight guide](https://foyonaczy.github.io/AelionSDK/production/capability-preflight/)
27
30
  and [API reference](https://foyonaczy.github.io/AelionSDK/api/aelionsdk/capability/overview/).
@@ -11,14 +11,14 @@ export interface CodecIdentity {
11
11
  readonly codec: string;
12
12
  }
13
13
  /**
14
- * Contract for a software codec fallback backend (e.g. a WASM decoder).
14
+ * Capability descriptor for a host-owned software codec implementation.
15
15
  *
16
- * The engine negotiates through this interface but ships no backend in 1.1:
17
- * an application registers one after the codec strategy is chosen. The
18
- * interface intentionally mirrors the WebCodecs lifecycle so a future WASM
19
- * adapter can implement it without reshaping the negotiation path.
16
+ * This descriptor does not execute decode or encode work. Aelion's media and
17
+ * export pipelines do not invoke registered descriptors in 1.2; hosts must
18
+ * wire their codec implementation separately. The distinction prevents a
19
+ * capability declaration from being mistaken for an operational fallback.
20
20
  */
21
- export interface CodecFallbackProvider {
21
+ export interface CodecFallbackDescriptor {
22
22
  /** Stable provider id, e.g. `wasm-h264`. */
23
23
  readonly id: string;
24
24
  /** True when the backend is loaded and ready to accept work. */
@@ -26,6 +26,8 @@ export interface CodecFallbackProvider {
26
26
  /** Whether this provider can execute the requested codec path. */
27
27
  supports(identity: CodecIdentity): boolean;
28
28
  }
29
+ /** @deprecated Use CodecFallbackDescriptor; this contract describes capability, not execution. */
30
+ export type CodecFallbackProvider = CodecFallbackDescriptor;
29
31
  /** Negotiated execution path for a single codec operation. */
30
32
  export type CodecExecutionPath = {
31
33
  readonly path: 'hardware';
@@ -48,14 +50,19 @@ export type CodecExecutionDecision = CodecExecutionPath & {
48
50
  * reports it, otherwise the first ready provider that supports the identity,
49
51
  * otherwise fail closed with a diagnostic.
50
52
  */
51
- export declare function selectCodecExecution(identity: CodecIdentity, hardwareSupported: boolean, providers: readonly CodecFallbackProvider[]): CodecExecutionDecision;
52
- /** Bounded registry of software codec fallback providers. */
53
+ export declare function selectCodecAvailability(identity: CodecIdentity, hardwareSupported: boolean, providers: readonly CodecFallbackDescriptor[]): CodecExecutionDecision;
54
+ /**
55
+ * @deprecated This selects a declared capability only; it does not route codec
56
+ * work. Use selectCodecAvailability and wire the chosen backend explicitly.
57
+ */
58
+ export declare function selectCodecExecution(identity: CodecIdentity, hardwareSupported: boolean, providers: readonly CodecFallbackDescriptor[]): CodecExecutionDecision;
59
+ /** Bounded registry of host-owned software codec capability descriptors. */
53
60
  export declare class CodecFallbackRegistry {
54
61
  #private;
55
- register(provider: CodecFallbackProvider): void;
62
+ register(provider: CodecFallbackDescriptor): void;
56
63
  unregister(id: string): void;
57
64
  clear(): void;
58
- providers(): readonly CodecFallbackProvider[];
65
+ providers(): readonly CodecFallbackDescriptor[];
59
66
  }
60
67
  /** The default process-wide registry used when no application instance is passed. */
61
68
  export declare const codecFallbackRegistry: CodecFallbackRegistry;
@@ -1 +1 @@
1
- {"version":3,"file":"fallback.d.ts","sourceRoot":"","sources":["../src/fallback.ts"],"names":[],"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AC;AAErC;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG,kBAAkB,GAAG;IACxD,QAAQ,CAAC,WAAW,EAAE,SAAS,UAAU,EAAE,CAAC;CAC7C,CAAC;AAWF;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,aAAa,EACvB,iBAAiB,EAAE,OAAO,EAC1B,SAAS,EAAE,SAAS,uBAAuB,EAAE,GAC5C,sBAAsB,CA4BxB;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,aAAa,EACvB,iBAAiB,EAAE,OAAO,EAC1B,SAAS,EAAE,SAAS,uBAAuB,EAAE,GAC5C,sBAAsB,CAExB;AAED,4EAA4E;AAC5E,qBAAa,qBAAqB;;IAGzB,QAAQ,CAAC,QAAQ,EAAE,uBAAuB,GAAG,IAAI;IAOjD,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAK5B,KAAK,IAAI,IAAI;IAIb,SAAS,IAAI,SAAS,uBAAuB,EAAE;CAGvD;AAED,qFAAqF;AACrF,eAAO,MAAM,qBAAqB,uBAA8B,CAAC"}
package/dist/fallback.js CHANGED
@@ -11,7 +11,7 @@ function decisionDiagnostic(code, message, recoverable) {
11
11
  * reports it, otherwise the first ready provider that supports the identity,
12
12
  * otherwise fail closed with a diagnostic.
13
13
  */
14
- export function selectCodecExecution(identity, hardwareSupported, providers) {
14
+ export function selectCodecAvailability(identity, hardwareSupported, providers) {
15
15
  if (hardwareSupported) {
16
16
  return { path: 'hardware', diagnostics: [] };
17
17
  }
@@ -21,7 +21,7 @@ export function selectCodecExecution(identity, hardwareSupported, providers) {
21
21
  path: 'fallback',
22
22
  providerId: provider.id,
23
23
  diagnostics: [
24
- decisionDiagnostic('CAPABILITY_CODEC_FALLBACK_USED', `${identity.class} ${identity.operation} for ${identity.codec} runs through the ${provider.id} software fallback`, true),
24
+ decisionDiagnostic('CAPABILITY_CODEC_FALLBACK_USED', `${identity.class} ${identity.operation} for ${identity.codec} has a declared ${provider.id} software fallback; the host must wire its execution path`, true),
25
25
  ],
26
26
  };
27
27
  }
@@ -32,7 +32,14 @@ export function selectCodecExecution(identity, hardwareSupported, providers) {
32
32
  ],
33
33
  };
34
34
  }
35
- /** Bounded registry of software codec fallback providers. */
35
+ /**
36
+ * @deprecated This selects a declared capability only; it does not route codec
37
+ * work. Use selectCodecAvailability and wire the chosen backend explicitly.
38
+ */
39
+ export function selectCodecExecution(identity, hardwareSupported, providers) {
40
+ return selectCodecAvailability(identity, hardwareSupported, providers);
41
+ }
42
+ /** Bounded registry of host-owned software codec capability descriptors. */
36
43
  export class CodecFallbackRegistry {
37
44
  #providers = [];
38
45
  register(provider) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aelionsdk/capability",
3
- "version": "1.2.0-rc.1",
3
+ "version": "1.2.0-rc.2",
4
4
  "description": "Browser media capability probing for AelionSDK",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -34,7 +34,7 @@
34
34
  "provenance": true
35
35
  },
36
36
  "dependencies": {
37
- "@aelionsdk/core": "1.2.0-rc.1"
37
+ "@aelionsdk/core": "1.2.0-rc.2"
38
38
  },
39
39
  "scripts": {
40
40
  "build": "tsc -b",