@hyperframes/producer 0.8.230 → 0.9.0
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/dist/distributed.d.ts +6 -5
- package/dist/distributed.js +56 -96
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +70 -70
- package/dist/index.d.ts +1 -1
- package/dist/index.js +0 -22
- package/dist/regression-harness-distributed.d.ts +1 -1
- package/dist/regression-harness-lambda-local-types.d.ts +1 -5
- package/package.json +7 -8
- package/dist/plan-parity-analysis.d.ts +0 -4
- package/dist/plan-parity-contract.d.ts +0 -139
- package/dist/plan-parity-fixture.d.ts +0 -18
- package/dist/plan-parity-harness.d.ts +0 -82
package/dist/index.d.ts
CHANGED
|
@@ -27,4 +27,4 @@ export { FONT_FETCH_FAILED, FONT_FETCH_UNAVAILABLE, FontFetchError, FontFetchUna
|
|
|
27
27
|
export { quantizeTimeToFrame } from "./utils/parityContract.js";
|
|
28
28
|
export { resolveRenderPaths, type RenderPaths } from "./utils/paths.js";
|
|
29
29
|
export { prepareHyperframeLintBody, runHyperframeLint, type PreparedHyperframeLintInput, } from "./services/hyperframeLint.js";
|
|
30
|
-
export { assemble, assembleV2,
|
|
30
|
+
export { assemble, assembleV2, PLAN_PROTOCOL_V2, PLAN_PROTOCOL_UNSUPPORTED, PLAN_V2_ARTIFACT_LAYOUT, PLAN_V2_HASH_SCHEMA, PLAN_V2_INTEGRITY_UNRECOVERABLE, PLAN_V2_MATERIALIZATION_MARKER, PLAN_V2_SCHEMA_VERSION, createPlanV2FromExecutionPlan, getPlanV2ExecutionPlanHash, listPlanV2ArtifactsForTarget, materializePlanV2Target, planV2, planV2WithPublisher, PlanV2IntegrityError, PlanProtocolUnsupportedError, readPlanV2Manifest, publishPlanV2FromExecutionPlan, renderChunk, renderChunkV2, validatePlanV2MaterializedTarget, type AssembleResult, type ChunkRenderer, type ChunkResult, type EffectiveChunkResult, type DistributedRenderConfig, type PlanProtocolDescriptor, type PlanProtocolV2Descriptor, type PlanV2Artifact, type PlanV2Limitations, type PlanV2Manifest, type PlanV2MaterializationResult, type PlanV2MaterializationTarget, type PlanV2Result, type PlanV2WithPublisherOptions, type PlanV2ArtifactPublisher, type PlanV2PublishBlob, } from "./distributed.js";
|
package/dist/index.js
CHANGED
|
@@ -16412,7 +16412,6 @@ var PLAN_PROTOCOL_V1 = Object.freeze({
|
|
|
16412
16412
|
artifactLayout: PLAN_ARTIFACT_LAYOUT,
|
|
16413
16413
|
hashSchema: PLAN_HASH_SCHEMA
|
|
16414
16414
|
});
|
|
16415
|
-
var CURRENT_PLAN_PROTOCOL = PLAN_PROTOCOL_V1;
|
|
16416
16415
|
var PLAN_PROTOCOL_V2 = Object.freeze({
|
|
16417
16416
|
schemaVersion: PLAN_V2_SCHEMA_VERSION,
|
|
16418
16417
|
artifactLayout: PLAN_V2_ARTIFACT_LAYOUT,
|
|
@@ -16434,9 +16433,6 @@ var DISTRIBUTED_RENDER_CAPABILITIES = Object.freeze({
|
|
|
16434
16433
|
}),
|
|
16435
16434
|
chunkFrameRange: true
|
|
16436
16435
|
});
|
|
16437
|
-
function getDistributedRenderCapabilities() {
|
|
16438
|
-
return DISTRIBUTED_RENDER_CAPABILITIES;
|
|
16439
|
-
}
|
|
16440
16436
|
var PlanProtocolUnsupportedError = class extends Error {
|
|
16441
16437
|
// Public adapters inspect this typed code even though OSS producer does not.
|
|
16442
16438
|
// fallow-ignore-next-line unused-class-member
|
|
@@ -18522,9 +18518,6 @@ function createPlanV2FromExecutionPlan(executionPlanDir, planV2Dir) {
|
|
|
18522
18518
|
throw error;
|
|
18523
18519
|
}
|
|
18524
18520
|
}
|
|
18525
|
-
function createPlanV2FromV1(executionPlanDir, planV2Dir) {
|
|
18526
|
-
return createPlanV2FromExecutionPlan(executionPlanDir, planV2Dir);
|
|
18527
|
-
}
|
|
18528
18521
|
async function publishPlanV2FromExecutionPlan(executionPlanDir, publisher) {
|
|
18529
18522
|
return publishExecutionPlan(executionPlanDir, publisher, {});
|
|
18530
18523
|
}
|
|
@@ -18554,9 +18547,6 @@ async function publishExecutionPlan(executionPlanDir, publisher, { digests, log
|
|
|
18554
18547
|
throw error;
|
|
18555
18548
|
}
|
|
18556
18549
|
}
|
|
18557
|
-
async function publishPlanV2FromV1(executionPlanDir, publisher) {
|
|
18558
|
-
return publishPlanV2FromExecutionPlan(executionPlanDir, publisher);
|
|
18559
|
-
}
|
|
18560
18550
|
async function planV2WithPublisher(projectDir, config, publisher, options = {}) {
|
|
18561
18551
|
const stagingRoot = mkdtempSync6(join39(options.stagingParentDir ?? tmpdir3(), ".execution-plan-"));
|
|
18562
18552
|
const digests = /* @__PURE__ */ new Map();
|
|
@@ -21472,19 +21462,13 @@ var AUDIO_SIDECAR_MIN_BYTES = 32 * 1024 * 1024;
|
|
|
21472
21462
|
// src/services/distributed/probeFacts.ts
|
|
21473
21463
|
import { buildProbeFactsText } from "@hyperframes/engine";
|
|
21474
21464
|
export {
|
|
21475
|
-
CURRENT_PLAN_PROTOCOL,
|
|
21476
21465
|
DEFAULT_CONFIG2 as DEFAULT_CONFIG,
|
|
21477
|
-
DISTRIBUTED_RENDER_CAPABILITIES,
|
|
21478
21466
|
FONT_FETCH_FAILED,
|
|
21479
21467
|
FONT_FETCH_UNAVAILABLE,
|
|
21480
21468
|
FontFetchError,
|
|
21481
21469
|
FontFetchUnavailableError,
|
|
21482
|
-
PLAN_ARTIFACT_LAYOUT,
|
|
21483
|
-
PLAN_HASH_SCHEMA,
|
|
21484
21470
|
PLAN_PROTOCOL_UNSUPPORTED,
|
|
21485
|
-
PLAN_PROTOCOL_V1,
|
|
21486
21471
|
PLAN_PROTOCOL_V2,
|
|
21487
|
-
PLAN_SCHEMA_VERSION,
|
|
21488
21472
|
PLAN_V2_ARTIFACT_LAYOUT,
|
|
21489
21473
|
PLAN_V2_HASH_SCHEMA,
|
|
21490
21474
|
PLAN_V2_INTEGRITY_UNRECOVERABLE,
|
|
@@ -21509,7 +21493,6 @@ export {
|
|
|
21509
21493
|
createFileServer,
|
|
21510
21494
|
createOwnedRenderDir,
|
|
21511
21495
|
createPlanV2FromExecutionPlan,
|
|
21512
|
-
createPlanV2FromV1,
|
|
21513
21496
|
createProducerApp,
|
|
21514
21497
|
createRenderHandlers,
|
|
21515
21498
|
createRenderJob,
|
|
@@ -21521,7 +21504,6 @@ export {
|
|
|
21521
21504
|
extractSafeRenderErrorCode,
|
|
21522
21505
|
getCapturePerfSummary4 as getCapturePerfSummary,
|
|
21523
21506
|
getCompositionDuration2 as getCompositionDuration,
|
|
21524
|
-
getDistributedRenderCapabilities,
|
|
21525
21507
|
getPlanV2ExecutionPlanHash,
|
|
21526
21508
|
initializeSession11 as initializeSession,
|
|
21527
21509
|
injectDeterministicFontFaces2 as injectDeterministicFontFaces,
|
|
@@ -21535,7 +21517,6 @@ export {
|
|
|
21535
21517
|
mediaProfileMatchesElementType,
|
|
21536
21518
|
normalizeErrorMessage,
|
|
21537
21519
|
parseRenderRequest,
|
|
21538
|
-
plan,
|
|
21539
21520
|
planV2,
|
|
21540
21521
|
planV2WithPublisher,
|
|
21541
21522
|
prepareAnimatedGifInputs,
|
|
@@ -21543,10 +21524,7 @@ export {
|
|
|
21543
21524
|
prepareHeifImageInputs,
|
|
21544
21525
|
prepareHyperframeLintBody,
|
|
21545
21526
|
publishPlanV2FromExecutionPlan,
|
|
21546
|
-
publishPlanV2FromV1,
|
|
21547
21527
|
quantizeTimeToFrame,
|
|
21548
|
-
readPlanProtocol,
|
|
21549
|
-
readPlanProtocolV1,
|
|
21550
21528
|
readPlanV2Manifest,
|
|
21551
21529
|
renderChunk,
|
|
21552
21530
|
renderChunkV2,
|
|
@@ -72,7 +72,7 @@ export type DistributedSupportResult = {
|
|
|
72
72
|
* `{ num: 30000, den: 1001 }` (NTSC) trip the type system at the call
|
|
73
73
|
* site. We surface this gate in code rather than only in TS so the
|
|
74
74
|
* harness can skip the fixture cleanly instead of throwing.
|
|
75
|
-
* - hdr must not be `true`. Distributed mode is SDR-only
|
|
75
|
+
* - hdr must not be `true`. Distributed mode is SDR-only.
|
|
76
76
|
*
|
|
77
77
|
* Callers that want the structured reason can read it off the returned
|
|
78
78
|
* `reason` field; the message is intended to be log-friendly.
|
|
@@ -12,8 +12,6 @@ import type { DistributedFps } from "@hyperframes/core";
|
|
|
12
12
|
import type { DistributedFormat } from "./services/distributed/shared.js";
|
|
13
13
|
/** Inputs for {@link runLambdaLocalRender}. Same contract as `runDistributedSimulatedRender`. */
|
|
14
14
|
export interface RunLambdaLocalInput {
|
|
15
|
-
/** Explicit plan transport. Omitted only for legacy regression callers, where it defaults to v1. */
|
|
16
|
-
protocol?: "v1" | "v2";
|
|
17
15
|
projectDir: string;
|
|
18
16
|
tempRoot: string;
|
|
19
17
|
renderedOutputPath: string;
|
|
@@ -33,12 +31,10 @@ export interface RunLambdaLocalInput {
|
|
|
33
31
|
codec?: "h264" | "h265";
|
|
34
32
|
chunkSize?: number;
|
|
35
33
|
maxParallelChunks?: number;
|
|
36
|
-
/** Test-only low cap for exercising typed v1 PLAN_TOO_LARGE behavior. */
|
|
37
|
-
planDirSizeLimitBytes?: number;
|
|
38
34
|
variables?: Record<string, unknown>;
|
|
39
35
|
}
|
|
40
36
|
export interface LambdaLocalRenderResult {
|
|
41
|
-
protocol: "
|
|
37
|
+
protocol: "v2";
|
|
42
38
|
outputPath: string;
|
|
43
39
|
chunks: Array<{
|
|
44
40
|
index: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperframes/producer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "HTML-to-video rendering engine using Chrome's BeginFrame API",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
"postcss": "^8.4.0",
|
|
36
36
|
"puppeteer": "~25.11.0",
|
|
37
37
|
"puppeteer-core": "^25.11.0",
|
|
38
|
-
"@hyperframes/core": "0.
|
|
39
|
-
"@hyperframes/
|
|
40
|
-
"@hyperframes/
|
|
41
|
-
"@hyperframes/studio-server": "0.
|
|
42
|
-
"@hyperframes/
|
|
38
|
+
"@hyperframes/core": "0.9.0",
|
|
39
|
+
"@hyperframes/parsers": "0.9.0",
|
|
40
|
+
"@hyperframes/engine": "0.9.0",
|
|
41
|
+
"@hyperframes/studio-server": "0.9.0",
|
|
42
|
+
"@hyperframes/lint": "0.9.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/node": "^25.0.10",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"tsx": "^4.21.0",
|
|
49
49
|
"typescript": "^5.7.2",
|
|
50
50
|
"vitest": "^4.1.11",
|
|
51
|
-
"@hyperframes/aws-lambda": "0.
|
|
51
|
+
"@hyperframes/aws-lambda": "0.9.0"
|
|
52
52
|
},
|
|
53
53
|
"engines": {
|
|
54
54
|
"node": ">=22"
|
|
@@ -58,7 +58,6 @@
|
|
|
58
58
|
"build:hf-early-stub": "bun run scripts/build-hf-early-stub.ts",
|
|
59
59
|
"typecheck": "tsc --noEmit",
|
|
60
60
|
"parity:check": "tsx src/parity-harness.ts",
|
|
61
|
-
"parity:plans": "tsx src/plan-parity-harness.ts",
|
|
62
61
|
"parity:fixtures": "tsx src/parity-fixtures.ts",
|
|
63
62
|
"parity:fixtures:ci": "tsx src/parity-fixtures.ts",
|
|
64
63
|
"parity:check:ci": "tsx src/parity-harness.ts --preview-url \"http://127.0.0.1:4173/minimal-wysiwyg.html\" --producer-url \"http://127.0.0.1:4173/minimal-wysiwyg.html?mode=producer\" --checkpoints \"0,0.5,1,1.5\" --allow-mismatch-ratio 0 --emulate-producer-swap true --artifacts-dir \".debug/parity-harness-ci\"",
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { PlanParityDriverResult, PlanParityMeasurement, PlanParityStreamMetadata } from "./plan-parity-contract.js";
|
|
2
|
-
export declare function parseCanonicalFrameHashes(framemd5: string): string[];
|
|
3
|
-
export declare function normalizeFfprobeMetadata(value: unknown): PlanParityStreamMetadata;
|
|
4
|
-
export declare function analyzePlanParityDriverResult(driverName: string, result: PlanParityDriverResult): Promise<PlanParityMeasurement>;
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Protocol-neutral contract for comparing distributed render plans.
|
|
3
|
-
*
|
|
4
|
-
* The comparator intentionally has no `planHash` field. v1 and v2 use
|
|
5
|
-
* different artifact layouts and hash schemas, so their plan hashes are not
|
|
6
|
-
* expected to match even when they render identical output.
|
|
7
|
-
*/
|
|
8
|
-
import type { DistributedFps } from "@hyperframes/core";
|
|
9
|
-
export type PlanParityProtocol = "v1" | "v2";
|
|
10
|
-
export interface PlanParityRenderConfig {
|
|
11
|
-
fps: DistributedFps;
|
|
12
|
-
width: number;
|
|
13
|
-
height: number;
|
|
14
|
-
format: "mp4";
|
|
15
|
-
chunkSize?: number;
|
|
16
|
-
maxParallelChunks?: number;
|
|
17
|
-
}
|
|
18
|
-
export interface PlanParityDriverInput {
|
|
19
|
-
protocol: PlanParityProtocol;
|
|
20
|
-
projectDir: string;
|
|
21
|
-
outputDir: string;
|
|
22
|
-
renderConfig: PlanParityRenderConfig;
|
|
23
|
-
/**
|
|
24
|
-
* Test-only plan limit. The Lambda-local driver forwards this to v1 as
|
|
25
|
-
* `planDirSizeLimitBytes`; v2 ignores it because it does not materialize a
|
|
26
|
-
* monolithic plan directory.
|
|
27
|
-
*/
|
|
28
|
-
planSizeCapBytes?: number;
|
|
29
|
-
}
|
|
30
|
-
export interface PlanParityChunkArtifact {
|
|
31
|
-
index: number;
|
|
32
|
-
path: string;
|
|
33
|
-
/** Adapter-reported digest, retained for diagnostics. */
|
|
34
|
-
reportedSha256?: string;
|
|
35
|
-
}
|
|
36
|
-
export interface PlanParityDriverResult {
|
|
37
|
-
protocol: PlanParityProtocol;
|
|
38
|
-
outputPath: string;
|
|
39
|
-
chunks: PlanParityChunkArtifact[];
|
|
40
|
-
transferBytes: {
|
|
41
|
-
downloaded: number;
|
|
42
|
-
uploaded: number;
|
|
43
|
-
};
|
|
44
|
-
/**
|
|
45
|
-
* Maximum materialized bytes observed in the worker scratch directory.
|
|
46
|
-
* This is distinct from S3 storage and from process RSS.
|
|
47
|
-
*/
|
|
48
|
-
peakMaterializedBytes: number;
|
|
49
|
-
}
|
|
50
|
-
export interface PlanParityDriver {
|
|
51
|
-
readonly name: string;
|
|
52
|
-
render(input: PlanParityDriverInput): Promise<PlanParityDriverResult>;
|
|
53
|
-
}
|
|
54
|
-
export interface PlanParityStreamMetadata {
|
|
55
|
-
video: {
|
|
56
|
-
codecName: string | null;
|
|
57
|
-
width: number;
|
|
58
|
-
height: number;
|
|
59
|
-
pixelFormat: string | null;
|
|
60
|
-
averageFrameRate: string | null;
|
|
61
|
-
realFrameRate: string | null;
|
|
62
|
-
frameCount: number | null;
|
|
63
|
-
colorSpace: string | null;
|
|
64
|
-
colorTransfer: string | null;
|
|
65
|
-
colorPrimaries: string | null;
|
|
66
|
-
} | null;
|
|
67
|
-
audio: {
|
|
68
|
-
codecName: string | null;
|
|
69
|
-
sampleRate: number | null;
|
|
70
|
-
channels: number | null;
|
|
71
|
-
channelLayout: string | null;
|
|
72
|
-
} | null;
|
|
73
|
-
durationSeconds: number;
|
|
74
|
-
}
|
|
75
|
-
export interface PlanParityMediaMeasurement {
|
|
76
|
-
outputSha256: string;
|
|
77
|
-
outputBytes: number;
|
|
78
|
-
frameSha256: string[];
|
|
79
|
-
pcmAudio: {
|
|
80
|
-
sha256: string;
|
|
81
|
-
/**
|
|
82
|
-
* Interleaved audio frames after canonical decoding to signed 16-bit,
|
|
83
|
-
* 48 kHz, stereo PCM. One sample frame contains two channel samples.
|
|
84
|
-
*/
|
|
85
|
-
sampleCount: number;
|
|
86
|
-
bytes: number;
|
|
87
|
-
} | null;
|
|
88
|
-
metadata: PlanParityStreamMetadata;
|
|
89
|
-
}
|
|
90
|
-
export interface PlanParityChunkMeasurement {
|
|
91
|
-
index: number;
|
|
92
|
-
sha256: string;
|
|
93
|
-
bytes: number;
|
|
94
|
-
reportedSha256?: string;
|
|
95
|
-
}
|
|
96
|
-
export interface PlanParityMeasurement {
|
|
97
|
-
protocol: PlanParityProtocol;
|
|
98
|
-
driver: string;
|
|
99
|
-
media: PlanParityMediaMeasurement;
|
|
100
|
-
chunks: PlanParityChunkMeasurement[];
|
|
101
|
-
transferBytes: {
|
|
102
|
-
downloaded: number;
|
|
103
|
-
uploaded: number;
|
|
104
|
-
total: number;
|
|
105
|
-
};
|
|
106
|
-
peakMaterializedBytes: number;
|
|
107
|
-
}
|
|
108
|
-
export interface PlanParityComparisonOptions {
|
|
109
|
-
/** ffprobe duration tolerance. Defaults to 1 ms. */
|
|
110
|
-
durationToleranceSeconds?: number;
|
|
111
|
-
/**
|
|
112
|
-
* Encoded containers can contain non-semantic metadata. Default false:
|
|
113
|
-
* report output digest/size without requiring byte-identical containers.
|
|
114
|
-
*/
|
|
115
|
-
requireEncodedOutputEquality?: boolean;
|
|
116
|
-
/** Optional ceiling applied independently to the v2 run. */
|
|
117
|
-
maxV2TransferBytes?: number;
|
|
118
|
-
/** Optional ceiling applied independently to the v2 run. */
|
|
119
|
-
maxV2PeakMaterializedBytes?: number;
|
|
120
|
-
}
|
|
121
|
-
export interface PlanParityCheck {
|
|
122
|
-
name: string;
|
|
123
|
-
passed: boolean;
|
|
124
|
-
detail: string;
|
|
125
|
-
}
|
|
126
|
-
export interface PlanParityComparison {
|
|
127
|
-
passed: boolean;
|
|
128
|
-
checks: PlanParityCheck[];
|
|
129
|
-
v1: PlanParityMeasurement;
|
|
130
|
-
v2: PlanParityMeasurement;
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* Compare semantic render output plus transport/resource measurements.
|
|
134
|
-
*
|
|
135
|
-
* `outputBytes`, transfer bytes, and working-set bytes are always surfaced.
|
|
136
|
-
* They are not equality gates by default: v2 is expected to change artifact
|
|
137
|
-
* packaging, and encoded containers may carry non-semantic differences.
|
|
138
|
-
*/
|
|
139
|
-
export declare function comparePlanParityMeasurements(v1: PlanParityMeasurement, v2: PlanParityMeasurement, options?: PlanParityComparisonOptions): PlanParityComparison;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
interface GeneratedAudioConfig {
|
|
2
|
-
path: string;
|
|
3
|
-
durationSeconds: number;
|
|
4
|
-
frequencyHz: number;
|
|
5
|
-
sampleRate: number;
|
|
6
|
-
}
|
|
7
|
-
/** Generate a deterministic mono PCM WAV without relying on ffmpeg. */
|
|
8
|
-
export declare function generateToneWav(config: Omit<GeneratedAudioConfig, "path">): Buffer;
|
|
9
|
-
/** Deterministic xorshift bytes that do not collapse into a tiny gzip. */
|
|
10
|
-
export declare function generatePressureBytes(bytes: number, seed: number): Buffer;
|
|
11
|
-
/**
|
|
12
|
-
* Copy a checked-in fixture into a driver-owned project directory and
|
|
13
|
-
* materialize its generated binary assets. Source fixtures stay small and
|
|
14
|
-
* reviewable; size-pressure tests can vary their v1 cap without allocating
|
|
15
|
-
* multi-gigabyte files.
|
|
16
|
-
*/
|
|
17
|
-
export declare function preparePlanParityFixture(sourceDir: string, projectDir: string): void;
|
|
18
|
-
export {};
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { type PlanParityComparison, type PlanParityComparisonOptions, type PlanParityDriver, type PlanParityDriverResult, type PlanParityMeasurement, type PlanParityRenderConfig } from "./plan-parity-contract.js";
|
|
2
|
-
export type PlanParityTarget = "lambda-local" | `aws:${string}`;
|
|
3
|
-
export interface RunPlanProtocolParityOptions {
|
|
4
|
-
fixtureDir: string;
|
|
5
|
-
artifactsDir: string;
|
|
6
|
-
v1Driver: PlanParityDriver;
|
|
7
|
-
v2Driver: PlanParityDriver;
|
|
8
|
-
renderConfig: PlanParityRenderConfig;
|
|
9
|
-
v1PlanSizeCapBytes?: number;
|
|
10
|
-
comparison?: PlanParityComparisonOptions;
|
|
11
|
-
}
|
|
12
|
-
export interface PlanParityCliOptions {
|
|
13
|
-
fixtureDir: string;
|
|
14
|
-
artifactsDir: string;
|
|
15
|
-
v1Target: PlanParityTarget;
|
|
16
|
-
v2Target: PlanParityTarget;
|
|
17
|
-
renderConfig: PlanParityRenderConfig;
|
|
18
|
-
v1PlanSizeCapBytes?: number;
|
|
19
|
-
expectV1PlanTooLarge: boolean;
|
|
20
|
-
comparison: PlanParityComparisonOptions;
|
|
21
|
-
}
|
|
22
|
-
export interface RunPlanV2SizePressureOptions {
|
|
23
|
-
fixtureDir: string;
|
|
24
|
-
artifactsDir: string;
|
|
25
|
-
driver: PlanParityDriver;
|
|
26
|
-
renderConfig: PlanParityRenderConfig;
|
|
27
|
-
v1PlanSizeCapBytes: number;
|
|
28
|
-
/**
|
|
29
|
-
* Test seam for the post-render media analyzer. Production callers use
|
|
30
|
-
* the canonical ffmpeg/ffprobe analyzer.
|
|
31
|
-
*/
|
|
32
|
-
analyzeDriverResult?: (driverName: string, result: PlanParityDriverResult) => Promise<PlanParityMeasurement>;
|
|
33
|
-
}
|
|
34
|
-
export type PlanTooLargeProbeOutcome = {
|
|
35
|
-
status: "expected-failure";
|
|
36
|
-
code: "PLAN_TOO_LARGE";
|
|
37
|
-
message: string;
|
|
38
|
-
sizeBytes: number | null;
|
|
39
|
-
limitBytes: number | null;
|
|
40
|
-
} | {
|
|
41
|
-
status: "unexpected-success";
|
|
42
|
-
message: string;
|
|
43
|
-
} | {
|
|
44
|
-
status: "unexpected-failure";
|
|
45
|
-
code: string | null;
|
|
46
|
-
message: string;
|
|
47
|
-
};
|
|
48
|
-
export type PlanV2PressureOutcome = {
|
|
49
|
-
status: "success";
|
|
50
|
-
measurement: PlanParityMeasurement;
|
|
51
|
-
} | {
|
|
52
|
-
status: "failure";
|
|
53
|
-
message: string;
|
|
54
|
-
};
|
|
55
|
-
export interface PlanV2SizePressureReport {
|
|
56
|
-
passed: boolean;
|
|
57
|
-
checks: Array<{
|
|
58
|
-
name: "v1-plan-too-large" | "v2-render-success";
|
|
59
|
-
passed: boolean;
|
|
60
|
-
detail: string;
|
|
61
|
-
}>;
|
|
62
|
-
v1: PlanTooLargeProbeOutcome;
|
|
63
|
-
v2: PlanV2PressureOutcome;
|
|
64
|
-
}
|
|
65
|
-
export declare function parsePlanParityArgs(argv: string[]): PlanParityCliOptions;
|
|
66
|
-
export declare function classifyPlanTooLargeProbeFailure(error: unknown): PlanTooLargeProbeOutcome;
|
|
67
|
-
/**
|
|
68
|
-
* Prove the migration boundary directly:
|
|
69
|
-
*
|
|
70
|
-
* 1. explicit v1 with a deliberately low cap must fail PLAN_TOO_LARGE;
|
|
71
|
-
* 2. explicit v2 must still run to completion for the same prepared fixture.
|
|
72
|
-
*
|
|
73
|
-
* Unlike semantic parity mode, this API does not compare v1/v2 output because
|
|
74
|
-
* the expected v1 run never produces output. Its durable report records both
|
|
75
|
-
* the typed failure and the fully analyzed v2 success.
|
|
76
|
-
*/
|
|
77
|
-
export declare function runPlanV2SizePressure(options: RunPlanV2SizePressureOptions): Promise<PlanV2SizePressureReport>;
|
|
78
|
-
/**
|
|
79
|
-
* Run the same prepared project through explicit v1 and v2 drivers, analyze
|
|
80
|
-
* their artifacts, and persist a machine-readable comparison report.
|
|
81
|
-
*/
|
|
82
|
-
export declare function runPlanProtocolParity(options: RunPlanProtocolParityOptions): Promise<PlanParityComparison>;
|