Skip to content

Commit 5c9ea2f

Browse files
committed
chore(gates): publish the contact-sheet capture-kit facade
1 parent e9a7ac0 commit 5c9ea2f

5 files changed

Lines changed: 37 additions & 4 deletions

File tree

‎packages/capture-kit/package.json‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,10 @@
166166
"types": "./src/recording/artifact.fixtures.ts",
167167
"default": "./src/recording/artifact.fixtures.ts"
168168
},
169+
"./recording-contact-sheet": {
170+
"types": "./src/recording/contact-sheet.ts",
171+
"default": "./src/recording/contact-sheet.ts"
172+
},
169173
"./recording-facts": {
170174
"types": "./src/recording/recording-facts.ts",
171175
"default": "./src/recording/recording-facts.ts"

‎packages/capture-kit/src/recording/contact-sheet.ts‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,27 @@ import { readVideoContainerKind } from './video.ts';
3232

3333
export { recordingContactSheetPath };
3434

35+
/**
36+
* Publishes how this pipeline answers. The refusal reasons are what its failures carry in `reason`,
37+
* and the report shape is what it returns, so a caller branches on these instead of importing a
38+
* module the pipeline happens to keep them in.
39+
*/
40+
export {
41+
CONTACT_SHEET_CONTAINER_REASON,
42+
CONTACT_SHEET_DURATION_REASON,
43+
CONTACT_SHEET_EXTRACTION_REASON,
44+
CONTACT_SHEET_NO_FRAMES_REASON,
45+
CONTACT_SHEET_OUTPUT_COLLISION_REASON,
46+
CONTACT_SHEET_OUTPUT_WRITE_REASON,
47+
CONTACT_SHEET_PIXEL_BUDGET_REASON,
48+
CONTACT_SHEET_THRESHOLD_REASON,
49+
CONTACT_SHEET_UNSUPPORTED_HOST_REASON,
50+
} from './contact-sheet-report.ts';
51+
export type {
52+
RecordingContactSheetCell,
53+
RecordingContactSheetResult,
54+
} from './contact-sheet-report.ts';
55+
3556
/**
3657
* Builds the one PNG that lets a caller read a recording without playing it.
3758
*

‎scripts/__tests__/eager-closure-budgets.ts‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,14 @@ export const NEW_ENTRY_CEILINGS: Readonly<Record<EntryCategory, number>> = Objec
127127
*/
128128
export const APPROVED_OVER_CEILING: Readonly<
129129
Record<string, { issue: string; reason: string; owner: string }>
130-
> = Object.freeze({});
130+
> = Object.freeze({
131+
'packages/capture-kit/src/recording/contact-sheet.ts': {
132+
issue: '#2747',
133+
reason:
134+
'Reading a recording through one PNG needs the sample grid, the frame decoder seam, and the PNG codec behind a single surface. Every module it evaluates is capture-kit mechanics, so the property the ceiling guards — no façade evaluating a concrete platform implementation — holds; only its weight is above the p75 of façades that answer a narrower question.',
135+
owner: 'capture-kit',
136+
},
137+
});
131138

132139
/** The category is a function of the path, never a hand-written column. */
133140
export function entryCategoryOf(entryFile: string): EntryCategory {

‎scripts/layering/package-boundaries.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@ test('the real tree parses, declares, and passes R11', () => {
423423
'@agent-device/capture-kit/quality-warnings',
424424
'@agent-device/capture-kit/react-native-overlay',
425425
'@agent-device/capture-kit/recording-artifact-fixtures',
426+
'@agent-device/capture-kit/recording-contact-sheet',
426427
'@agent-device/capture-kit/recording-facts',
427428
'@agent-device/capture-kit/recording-mp4-duration',
428429
'@agent-device/capture-kit/recording-mp4-fixtures',

‎test/wire-compat/ledger.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"packages/kernel/src/contracts.ts#CommandRpcParams": "sha256:3a400b0d815920d9cf4c6236531931f6ba6f9debf7ac26915e0116b493f1c97a",
1717
"packages/kernel/src/contracts.ts#DAEMON_LOCK_POLICIES": "sha256:625cc33bb574aa6119add45878a0f6adc445244edc2957737da975f91605c786",
1818
"packages/kernel/src/contracts.ts#DaemonArtifact": "sha256:967c919d878b83b6e0324c56c1bf41e63b0c31c2e42cf41cd5a12902c2b5034a",
19-
"packages/kernel/src/contracts.ts#DaemonArtifactKnownType": "sha256:21886407c3fbc30d8c0c544503b831c78db2408aeaef1b9b2c6a4139144aef28",
19+
"packages/kernel/src/contracts.ts#DaemonArtifactKnownType": "sha256:b16ce8169a6314168b36b42cc3c042f722781b49695cb290674f4e5216d83b3b",
2020
"packages/kernel/src/contracts.ts#DaemonArtifactType": "sha256:5e5017276fefe880b8ab32001888011d2e02a8670f0978afdb9b56a77ab37f09",
2121
"packages/kernel/src/contracts.ts#DaemonInstallSource": "sha256:fe26e202e62d997cdd3855fd96002511783a6c26a9ce27210d7c6cc084c66e4e",
2222
"packages/kernel/src/contracts.ts#DaemonLockPolicy": "sha256:f33d0ce7200a7d97c11e91bd2889b5d9bc7f35935a5370a29930118d091468f4",
@@ -188,8 +188,8 @@
188188
},
189189
{
190190
"declaration": "packages/kernel/src/contracts.ts#DaemonArtifactKnownType",
191-
"digest": "sha256:21886407c3fbc30d8c0c544503b831c78db2408aeaef1b9b2c6a4139144aef28",
192-
"rationale": "#2246 adds the 'test-artifacts' literal for the new remote `test` suite-directory artifact. DaemonArtifactType already widens to `(string & {})`, so an artifactType value outside the known set was always valid on the wire; the literal only sharpens the type hint for code that opts into recognizing it. A released peer that does not know it either never receives it (an old client's daemon-artifacts.ts has no 'test' redirect, so it never sets clientArtifactPaths.artifactsDir, so a new daemon's attachRemoteReplayTestArtifacts never attaches this artifact) or, receiving it from an old daemon that cannot produce it, is a case that cannot occur."
191+
"digest": "sha256:b16ce8169a6314168b36b42cc3c042f722781b49695cb290674f4e5216d83b3b",
192+
"rationale": "#2747 adds the 'screen-recording-contact-sheet' literal for the PNG that `record contact-sheet` publishes beside the recording it read. DaemonArtifactType already widens to `(string & {})`, so an artifactType value outside the known set was always valid on the wire; the literal only sharpens the type hint for code that opts into recognizing it. A released peer that does not know it never requests that field in a download and parses the artifact record by its `field`, so it carries the sheet as an unknown artifact instead of failing."
193193
},
194194
{
195195
"declaration": "src/remote/daemon-artifacts.ts#DownloadRemoteArtifactParams",

0 commit comments

Comments
 (0)