playhead-cli 0.1.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.
Files changed (119) hide show
  1. package/Dockerfile +24 -0
  2. package/LICENSE +21 -0
  3. package/README.md +184 -0
  4. package/action.yml +71 -0
  5. package/dist/audio/mux.d.ts +29 -0
  6. package/dist/audio/mux.d.ts.map +1 -0
  7. package/dist/audio/timing.d.ts +6 -0
  8. package/dist/audio/timing.d.ts.map +1 -0
  9. package/dist/audio/tts.d.ts +23 -0
  10. package/dist/audio/tts.d.ts.map +1 -0
  11. package/dist/authoring/author.d.ts +40 -0
  12. package/dist/authoring/author.d.ts.map +1 -0
  13. package/dist/authoring/catalog.d.ts +31 -0
  14. package/dist/authoring/catalog.d.ts.map +1 -0
  15. package/dist/authoring/explore.d.ts +30 -0
  16. package/dist/authoring/explore.d.ts.map +1 -0
  17. package/dist/authoring/serialize.d.ts +26 -0
  18. package/dist/authoring/serialize.d.ts.map +1 -0
  19. package/dist/authoring/validate.d.ts +31 -0
  20. package/dist/authoring/validate.d.ts.map +1 -0
  21. package/dist/beforeafter.d.ts +25 -0
  22. package/dist/beforeafter.d.ts.map +1 -0
  23. package/dist/bundle/hash.d.ts +3 -0
  24. package/dist/bundle/hash.d.ts.map +1 -0
  25. package/dist/bundle/reader.d.ts +6 -0
  26. package/dist/bundle/reader.d.ts.map +1 -0
  27. package/dist/bundle/types.d.ts +54 -0
  28. package/dist/bundle/types.d.ts.map +1 -0
  29. package/dist/bundle/writer.d.ts +35 -0
  30. package/dist/bundle/writer.d.ts.map +1 -0
  31. package/dist/capture/driver-api.d.ts +190 -0
  32. package/dist/capture/driver-api.d.ts.map +1 -0
  33. package/dist/capture/events.d.ts +78 -0
  34. package/dist/capture/events.d.ts.map +1 -0
  35. package/dist/capture/executor.d.ts +19 -0
  36. package/dist/capture/executor.d.ts.map +1 -0
  37. package/dist/capture/playwright-driver.d.ts +122 -0
  38. package/dist/capture/playwright-driver.d.ts.map +1 -0
  39. package/dist/cli/index.d.ts +3 -0
  40. package/dist/cli/index.d.ts.map +1 -0
  41. package/dist/cli/index.js +6648 -0
  42. package/dist/cli/index.js.map +1 -0
  43. package/dist/compose/camera/interpolate.d.ts +9 -0
  44. package/dist/compose/camera/interpolate.d.ts.map +1 -0
  45. package/dist/compose/camera/planner.d.ts +19 -0
  46. package/dist/compose/camera/planner.d.ts.map +1 -0
  47. package/dist/compose/captions.d.ts +22 -0
  48. package/dist/compose/captions.d.ts.map +1 -0
  49. package/dist/compose/cursor/path.d.ts +17 -0
  50. package/dist/compose/cursor/path.d.ts.map +1 -0
  51. package/dist/compose/cursor/render.d.ts +10 -0
  52. package/dist/compose/cursor/render.d.ts.map +1 -0
  53. package/dist/compose/index.d.ts +25 -0
  54. package/dist/compose/index.d.ts.map +1 -0
  55. package/dist/compose/kinds.d.ts +27 -0
  56. package/dist/compose/kinds.d.ts.map +1 -0
  57. package/dist/compose/overlays/build.d.ts +7 -0
  58. package/dist/compose/overlays/build.d.ts.map +1 -0
  59. package/dist/compose/overlays/draw.d.ts +12 -0
  60. package/dist/compose/overlays/draw.d.ts.map +1 -0
  61. package/dist/compose/overlays/text.d.ts +18 -0
  62. package/dist/compose/overlays/text.d.ts.map +1 -0
  63. package/dist/compose/render/encoder.d.ts +13 -0
  64. package/dist/compose/render/encoder.d.ts.map +1 -0
  65. package/dist/compose/render/frameStore.d.ts +27 -0
  66. package/dist/compose/render/frameStore.d.ts.map +1 -0
  67. package/dist/compose/render/renderer.d.ts +5 -0
  68. package/dist/compose/render/renderer.d.ts.map +1 -0
  69. package/dist/compose/timeline/pacing.d.ts +36 -0
  70. package/dist/compose/timeline/pacing.d.ts.map +1 -0
  71. package/dist/compose/types.d.ts +236 -0
  72. package/dist/compose/types.d.ts.map +1 -0
  73. package/dist/index.d.ts +25 -0
  74. package/dist/index.d.ts.map +1 -0
  75. package/dist/index.js +4963 -0
  76. package/dist/index.js.map +1 -0
  77. package/dist/integrations/jira.d.ts +44 -0
  78. package/dist/integrations/jira.d.ts.map +1 -0
  79. package/dist/mcp/bin.d.ts +3 -0
  80. package/dist/mcp/bin.d.ts.map +1 -0
  81. package/dist/mcp/bin.js +5749 -0
  82. package/dist/mcp/bin.js.map +1 -0
  83. package/dist/mcp/server.d.ts +10 -0
  84. package/dist/mcp/server.d.ts.map +1 -0
  85. package/dist/shared/easing.d.ts +9 -0
  86. package/dist/shared/easing.d.ts.map +1 -0
  87. package/dist/shared/exit.d.ts +32 -0
  88. package/dist/shared/exit.d.ts.map +1 -0
  89. package/dist/shared/ffmpeg.d.ts +19 -0
  90. package/dist/shared/ffmpeg.d.ts.map +1 -0
  91. package/dist/shared/geometry.d.ts +47 -0
  92. package/dist/shared/geometry.d.ts.map +1 -0
  93. package/dist/shared/log.d.ts +10 -0
  94. package/dist/shared/log.d.ts.map +1 -0
  95. package/dist/shared/version.d.ts +4 -0
  96. package/dist/shared/version.d.ts.map +1 -0
  97. package/dist/spec/locators.d.ts +62 -0
  98. package/dist/spec/locators.d.ts.map +1 -0
  99. package/dist/spec/parse.d.ts +16 -0
  100. package/dist/spec/parse.d.ts.map +1 -0
  101. package/dist/spec/schema.d.ts +365 -0
  102. package/dist/spec/schema.d.ts.map +1 -0
  103. package/dist/theme/index.d.ts +23 -0
  104. package/dist/theme/index.d.ts.map +1 -0
  105. package/dist/verify/checks.d.ts +27 -0
  106. package/dist/verify/checks.d.ts.map +1 -0
  107. package/dist/verify/contact-sheet.d.ts +7 -0
  108. package/dist/verify/contact-sheet.d.ts.map +1 -0
  109. package/dist/verify/media.d.ts +42 -0
  110. package/dist/verify/media.d.ts.map +1 -0
  111. package/dist/verify/report.d.ts +12 -0
  112. package/dist/verify/report.d.ts.map +1 -0
  113. package/dist/verify/runner.d.ts +13 -0
  114. package/dist/verify/runner.d.ts.map +1 -0
  115. package/dist/verify/types.d.ts +63 -0
  116. package/dist/verify/types.d.ts.map +1 -0
  117. package/dist/verify/vision.d.ts +19 -0
  118. package/dist/verify/vision.d.ts.map +1 -0
  119. package/package.json +74 -0
@@ -0,0 +1,54 @@
1
+ import type { EventLog } from '../capture/events.js';
2
+ export interface FrameIndexEntry {
3
+ /** Filename within frames/. */
4
+ f: string;
5
+ /** Capture-relative ms. */
6
+ t: number;
7
+ }
8
+ export interface MaskSample {
9
+ t: number;
10
+ rects: {
11
+ style: 'solid' | 'blur';
12
+ x: number;
13
+ y: number;
14
+ w: number;
15
+ h: number;
16
+ }[];
17
+ }
18
+ export interface BundleManifest {
19
+ schema: 'playhead/bundle@1';
20
+ playheadVersion: string;
21
+ specHash: string;
22
+ appUrl: string;
23
+ viewport: {
24
+ w: number;
25
+ h: number;
26
+ };
27
+ dpr: number;
28
+ frameW: number;
29
+ frameH: number;
30
+ clockOffsetMs: number;
31
+ frameCount: number;
32
+ durationMs: number;
33
+ createdAtIso: string;
34
+ captureFormat: 'jpeg' | 'png';
35
+ hashes: {
36
+ events: string;
37
+ framesIndex: string;
38
+ };
39
+ /** True when the capture failed mid-run: the bundle holds everything up to the failure. */
40
+ partial?: boolean;
41
+ /** Which step failed and why (present iff partial). */
42
+ failure?: {
43
+ stepRef: string;
44
+ message: string;
45
+ };
46
+ }
47
+ export interface BundleData {
48
+ dir: string;
49
+ manifest: BundleManifest;
50
+ events: EventLog;
51
+ frames: FrameIndexEntry[];
52
+ maskSamples: MaskSample[];
53
+ }
54
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/bundle/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAErD,MAAM,WAAW,eAAe;IAC9B,+BAA+B;IAC/B,CAAC,EAAE,MAAM,CAAC;IACV,2BAA2B;IAC3B,CAAC,EAAE,MAAM,CAAC;CACX;AAED,MAAM,WAAW,UAAU;IACzB,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE;QAAE,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAClF;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,mBAAmB,CAAC;IAC5B,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,GAAG,KAAK,CAAC;IAC9B,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC;IAChD,2FAA2F;IAC3F,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,uDAAuD;IACvD,OAAO,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CAChD;AAED,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,cAAc,CAAC;IACzB,MAAM,EAAE,QAAQ,CAAC;IACjB,MAAM,EAAE,eAAe,EAAE,CAAC;IAC1B,WAAW,EAAE,UAAU,EAAE,CAAC;CAC3B"}
@@ -0,0 +1,35 @@
1
+ import type { Spec } from '../spec/schema.js';
2
+ import type { EventLog } from '../capture/events.js';
3
+ import type { BundleManifest, MaskSample } from './types.js';
4
+ export declare class BundleWriter {
5
+ private readonly dir;
6
+ private readonly captureFormat;
7
+ private frames;
8
+ private pendingWrites;
9
+ private maskSamples;
10
+ private counter;
11
+ private ready;
12
+ constructor(dir: string, captureFormat: 'jpeg' | 'png');
13
+ /** Queue a frame write. `t` is capture-relative ms. */
14
+ addFrame(data: Buffer, t: number): void;
15
+ addMaskSample(sample: MaskSample): void;
16
+ frameCount(): number;
17
+ finish(meta: {
18
+ spec: Spec;
19
+ events: EventLog;
20
+ appUrl: string;
21
+ viewport: {
22
+ w: number;
23
+ h: number;
24
+ };
25
+ dpr: number;
26
+ clockOffsetMs: number;
27
+ durationMs: number;
28
+ partial?: boolean;
29
+ failure?: {
30
+ stepRef: string;
31
+ message: string;
32
+ };
33
+ }): Promise<BundleManifest>;
34
+ }
35
+ //# sourceMappingURL=writer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"writer.d.ts","sourceRoot":"","sources":["../../src/bundle/writer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EAAE,cAAc,EAAmB,UAAU,EAAE,MAAM,YAAY,CAAC;AAK9E,qBAAa,YAAY;IAQrB,OAAO,CAAC,QAAQ,CAAC,GAAG;IACpB,OAAO,CAAC,QAAQ,CAAC,aAAa;IARhC,OAAO,CAAC,MAAM,CAAyB;IACvC,OAAO,CAAC,aAAa,CAA0B;IAC/C,OAAO,CAAC,WAAW,CAAoB;IACvC,OAAO,CAAC,OAAO,CAAK;IACpB,OAAO,CAAC,KAAK,CAAgB;IAE7B,YACmB,GAAG,EAAE,MAAM,EACX,aAAa,EAAE,MAAM,GAAG,KAAK,EAG/C;IAED,uDAAuD;IACvD,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAOtC;IAED,aAAa,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAEtC;IAED,UAAU,IAAI,MAAM,CAEnB;IAEK,MAAM,CAAC,IAAI,EAAE;QACjB,IAAI,EAAE,IAAI,CAAC;QACX,MAAM,EAAE,QAAQ,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE;YAAE,CAAC,EAAE,MAAM,CAAC;YAAC,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;QACnC,GAAG,EAAE,MAAM,CAAC;QACZ,aAAa,EAAE,MAAM,CAAC;QACtB,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,OAAO,CAAC,EAAE;YAAE,OAAO,EAAE,MAAM,CAAC;YAAC,OAAO,EAAE,MAAM,CAAA;SAAE,CAAC;KAChD,GAAG,OAAO,CAAC,cAAc,CAAC,CA+C1B;CACF"}
@@ -0,0 +1,190 @@
1
+ import type { ParsedLocator } from '../spec/locators.js';
2
+ import type { Point } from '../shared/geometry.js';
3
+ import type { TargetInfo, CursorWaypoint } from './events.js';
4
+ /**
5
+ * The in-house browser-driving interface. Everything above this line of the stack
6
+ * (executor, event log, bundle, compose, verify) depends only on these types;
7
+ * `playwright-driver.ts` is the sole module that imports Playwright. Swapping in a
8
+ * raw-CDP driver later is a one-module replacement.
9
+ *
10
+ * All timestamps returned by a Driver are Node epoch milliseconds; the executor
11
+ * normalizes them to the capture clock.
12
+ */
13
+ export interface DriverLaunchOptions {
14
+ viewport: {
15
+ w: number;
16
+ h: number;
17
+ };
18
+ dpr: number;
19
+ storageStatePath?: string;
20
+ headless?: boolean;
21
+ /** Determinism controls: same spec → same pixels, regardless of where/when it runs. */
22
+ environment?: {
23
+ /** IANA timezone, e.g. "UTC", "America/New_York". */
24
+ timezone?: string;
25
+ /** BCP-47 locale, e.g. "en-US". */
26
+ locale?: string;
27
+ colorScheme?: 'light' | 'dark';
28
+ /** Freeze Date/"now" at this ISO timestamp (relative times like "3 minutes ago" stop drifting). */
29
+ fixedTime?: string;
30
+ /** prefers-reduced-motion: reduce — calms animations the capture rate can't sample. */
31
+ reducedMotion?: boolean;
32
+ };
33
+ /** Request interception: deterministic data and no third-party noise on film. */
34
+ network?: {
35
+ /** URL globs to block (fulfilled with 204): analytics, chat widgets, session replay. */
36
+ block?: string[];
37
+ /** URL globs answered with a canned response. */
38
+ stub?: {
39
+ url: string;
40
+ status?: number;
41
+ body?: string;
42
+ contentType?: string;
43
+ }[];
44
+ /** Playwright HAR file to replay (unmatched requests fall through to the network). */
45
+ har?: string;
46
+ };
47
+ /** What to do with window.confirm()/alert() dialogs. Default 'accept' — Playwright's silent
48
+ * auto-dismiss makes confirm-guarded flows film the CANCEL branch, which is worse than wrong. */
49
+ dialogs?: 'accept' | 'dismiss';
50
+ }
51
+ /** A console/pageerror/dialog/popup record captured during the run (bug-repro evidence). */
52
+ export interface ConsoleRecord {
53
+ /** Node epoch ms. */
54
+ t: number;
55
+ type: string;
56
+ text: string;
57
+ }
58
+ export interface ScreencastFrame {
59
+ data: Buffer;
60
+ /** Node epoch ms at which these pixels were captured. */
61
+ tNodeMs: number;
62
+ }
63
+ export interface ScreencastOptions {
64
+ format: 'jpeg' | 'png';
65
+ quality: number;
66
+ /** Raster scale relative to CSS pixels (2 = capture at 2x for zoom headroom). */
67
+ scale: number;
68
+ /** Target capture rate; the loop paces to at most this many frames per second. */
69
+ fps: number;
70
+ }
71
+ export interface MaskInstruction {
72
+ loc: ParsedLocator;
73
+ style: 'solid' | 'blur';
74
+ }
75
+ /** A raw interactable element discovered while exploring a page, used to author grounded specs. */
76
+ export interface RawInteractable {
77
+ tag: string;
78
+ role: string | null;
79
+ accessibleName: string | null;
80
+ label: string | null;
81
+ placeholder: string | null;
82
+ testId: string | null;
83
+ text: string | null;
84
+ /** Viewport-relative CSS px. */
85
+ bbox: {
86
+ x: number;
87
+ y: number;
88
+ w: number;
89
+ h: number;
90
+ };
91
+ /** True for elements that are on screen right now. */
92
+ visible: boolean;
93
+ /** input/textarea type, or select/none. */
94
+ inputType: string | null;
95
+ /** Landmark region the element lives in: nav | header | sidebar | main | dialog | footer | page. */
96
+ region?: string;
97
+ /** When set, the element lives inside this iframe — every locator must be prefixed with it. */
98
+ framePrefix?: string;
99
+ /** For <select>: its option labels. */
100
+ options?: string[];
101
+ }
102
+ export interface Driver {
103
+ launch(opts: DriverLaunchOptions): Promise<void>;
104
+ close(): Promise<void>;
105
+ /** Median (browser epoch − node epoch) in ms. */
106
+ measureClockOffset(): Promise<number>;
107
+ goto(url: string): Promise<void>;
108
+ onNavigation(cb: (url: string, nodeEpochMs: number) => void): void;
109
+ /** ARIA accessibility snapshot of the page (Playwright's YAML tree) — grounding for authoring. */
110
+ ariaSnapshot(): Promise<string>;
111
+ /** Every interactable element currently in the DOM, for building an authoring catalog. */
112
+ collectInteractables(): Promise<RawInteractable[]>;
113
+ /** Count how many elements a locator matches (uniqueness check while authoring). */
114
+ countMatches(loc: ParsedLocator): Promise<number>;
115
+ currentTitle(): Promise<string>;
116
+ /** Wait for the locator to be visible and stable, then measure geometry + accessibility. Throws on timeout. */
117
+ resolveTarget(loc: ParsedLocator, timeoutMs: number): Promise<TargetInfo>;
118
+ /** Measure without waiting; null when the element is gone or hidden. */
119
+ tryMeasure(loc: ParsedLocator): Promise<TargetInfo | null>;
120
+ cursorPos(): Point;
121
+ /** Move the cursor along an eased human-like path; returns timestamped waypoints (node epoch ms). */
122
+ moveCursor(to: Point, durationMs: number): Promise<CursorWaypoint[]>;
123
+ /** Press+release at a point (raw coordinates — fast paths only; filmed clicks use actClick). */
124
+ clickAt(p: Point, opts?: {
125
+ double?: boolean;
126
+ }): Promise<{
127
+ tDown: number;
128
+ tUp: number;
129
+ }>;
130
+ /** The real click: actionability + hit-target verification + retry via the locator. */
131
+ actClick(loc: ParsedLocator, opts?: {
132
+ double?: boolean;
133
+ timeoutMs?: number;
134
+ }): Promise<{
135
+ tDown: number;
136
+ tUp: number;
137
+ }>;
138
+ /** Console messages, page errors, dialogs, and popups recorded so far (bug-repro evidence). */
139
+ consoleLog(): ConsoleRecord[];
140
+ typeText(text: string, delayMs: number): Promise<{
141
+ tFirst: number;
142
+ tLast: number;
143
+ }>;
144
+ press(keys: string): Promise<{
145
+ tDown: number;
146
+ }>;
147
+ selectOption(loc: ParsedLocator, value: string): Promise<void>;
148
+ scrollIntoView(loc: ParsedLocator): Promise<void>;
149
+ scrollBy(by: {
150
+ x: number;
151
+ y: number;
152
+ }): Promise<void>;
153
+ /** Wait until the page scroll position stops changing (smooth-scroll finished), or timeout. */
154
+ waitForScrollSettle(timeoutMs: number): Promise<void>;
155
+ /** Assert a UI state; throws with a readable message on timeout. */
156
+ expectState(loc: ParsedLocator, opts: {
157
+ visible?: boolean;
158
+ text?: string;
159
+ count?: number;
160
+ }, timeoutMs: number): Promise<void>;
161
+ /** Wait for network idle + two stable layout samples. Resolves at the settle moment. */
162
+ settle(opts: {
163
+ idleMs: number;
164
+ capMs: number;
165
+ }): Promise<void>;
166
+ /** Persist the browser context's storage state (cookies, localStorage) to a JSON file —
167
+ * the login-once pattern for authed captures. */
168
+ saveStorageState(path: string): Promise<void>;
169
+ /** Tag current matches of each rule so the injected overlay layer covers them; returns each tagged element's style + measured box. */
170
+ /** Install CSS-expressible mask rules for continuous in-page tagging (mid-step appearances covered). */
171
+ installMaskRules(rules: MaskInstruction[]): Promise<void>;
172
+ applyMasks(rules: MaskInstruction[]): Promise<{
173
+ style: 'solid' | 'blur';
174
+ x: number;
175
+ y: number;
176
+ w: number;
177
+ h: number;
178
+ }[]>;
179
+ /** Temporarily mask one element (used while typing secrets). Pass null to clear. */
180
+ setTypingMask(loc: ParsedLocator | null): Promise<void>;
181
+ /** Begin the frame-capture loop (2x screenshots on a paced timer). */
182
+ startCapture(onFrame: (f: ScreencastFrame) => void, opts: ScreencastOptions): Promise<void>;
183
+ stopCapture(): Promise<void>;
184
+ /** Timestamp (node epoch ms) of the most recent captured frame, or 0. */
185
+ lastFrameAt(): number;
186
+ /** Capture one frame immediately, outside the paced loop (used to guarantee post-action footage). */
187
+ captureNow(): Promise<void>;
188
+ currentUrl(): string;
189
+ }
190
+ //# sourceMappingURL=driver-api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"driver-api.d.ts","sourceRoot":"","sources":["../../src/capture/driver-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE9D;;;;;;;;GAQG;AAEH,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uFAAuF;IACvF,WAAW,CAAC,EAAE;QACZ,qDAAqD;QACrD,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,mCAAmC;QACnC,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,WAAW,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;QAC/B,mGAAmG;QACnG,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,uFAAuF;QACvF,aAAa,CAAC,EAAE,OAAO,CAAC;KACzB,CAAC;IACF,iFAAiF;IACjF,OAAO,CAAC,EAAE;QACR,wFAAwF;QACxF,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;QACjB,iDAAiD;QACjD,IAAI,CAAC,EAAE;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,MAAM,CAAC,EAAE,MAAM,CAAC;YAAC,IAAI,CAAC,EAAE,MAAM,CAAC;YAAC,WAAW,CAAC,EAAE,MAAM,CAAA;SAAE,EAAE,CAAC;QAC/E,sFAAsF;QACt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.js';
2
+ /** All event/frame times are milliseconds relative to capture start, on one normalized clock. */
3
+ export interface TargetInfo {
4
+ role: string | null;
5
+ accessibleName: string | null;
6
+ /** Viewport-relative (client) CSS px — exactly the space the captured frames show. */
7
+ bbox: Rect;
8
+ /** Window scroll offsets at measure time, CSS px. */
9
+ scroll: Point;
10
+ }
11
+ export interface CursorWaypoint {
12
+ x: number;
13
+ y: number;
14
+ t: number;
15
+ }
16
+ export type ActionKind = 'goto' | 'click' | 'dblclick' | 'hover' | 'type' | 'press' | 'select' | 'scroll' | 'expect' | 'wait';
17
+ export interface ActionEvent {
18
+ type: 'action';
19
+ kind: ActionKind;
20
+ sceneId: string;
21
+ stepIndex: number;
22
+ /** Global 1-based step number across the whole spec. */
23
+ ordinal: number;
24
+ locator?: string;
25
+ targetPre?: TargetInfo | null;
26
+ targetPost?: TargetInfo | null;
27
+ cursorPath: CursorWaypoint[];
28
+ /** Redacted to bullets when masked — the real string never enters any artifact. */
29
+ typedText?: string;
30
+ masked?: boolean;
31
+ /** Caption override from the spec, carried through for the compositor. */
32
+ caption?: string;
33
+ /** Spoken-line override from the spec (TTS narration), carried as a record — the live spec
34
+ * wins at compose time. */
35
+ narration?: string;
36
+ /** Camera-shot boundary control from the spec ('cut' | 'continue'). */
37
+ shot?: string;
38
+ /** Camera hint from the spec: 'target' | 'wide' | a locator string. */
39
+ focus?: string;
40
+ /** When `focus` names a locator, its measured geometry at the settled moment — the payoff
41
+ * rect the camera should frame ("click here, look there"). */
42
+ focusTarget?: TargetInfo | null;
43
+ tStart: number;
44
+ /** Moment the action lands (mouse-down, first keystroke, key chord). */
45
+ tAction: number;
46
+ /** Action fully delivered (mouse-up, last keystroke). */
47
+ tActionEnd: number;
48
+ /** UI settled after the action (network idle + layout stable). */
49
+ tSettled: number;
50
+ }
51
+ export interface NavigationEvent {
52
+ type: 'navigation';
53
+ url: string;
54
+ t: number;
55
+ }
56
+ export type CaptureEvent = ActionEvent | NavigationEvent;
57
+ export interface EventLogMeta {
58
+ viewport: {
59
+ w: number;
60
+ h: number;
61
+ };
62
+ dpr: number;
63
+ /** Actual pixel dimensions of captured frames (source of truth for frame-space scale). */
64
+ frameW: number;
65
+ frameH: number;
66
+ clockOffsetMs: number;
67
+ startedAtIso: string;
68
+ durationMs: number;
69
+ appUrl: string;
70
+ }
71
+ export interface EventLog {
72
+ schema: 'playhead/events@1';
73
+ meta: EventLogMeta;
74
+ events: CaptureEvent[];
75
+ }
76
+ export declare function actionEvents(log: EventLog): ActionEvent[];
77
+ export declare function navigationEvents(log: EventLog): NavigationEvent[];
78
+ //# sourceMappingURL=events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/capture/events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAEzD,iGAAiG;AAEjG,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,sFAAsF;IACtF,IAAI,EAAE,IAAI,CAAC;IACX,qDAAqD;IACrD,MAAM,EAAE,KAAK,CAAC;CACf;AAED,MAAM,WAAW,cAAc;IAC7B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,MAAM,MAAM,UAAU,GAClB,MAAM,GACN,OAAO,GACP,UAAU,GACV,OAAO,GACP,MAAM,GACN,OAAO,GACP,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,MAAM,CAAC;AAEX,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,wDAAwD;IACxD,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,M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BAAmB,CAAC;IAC5B,IAAI,EAAE,YAAY,CAAC;IACnB,MAAM,EAAE,YAAY,EAAE,CAAC;CACxB;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,QAAQ,GAAG,WAAW,EAAE,CAEzD;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,QAAQ,GAAG,eAAe,EAAE,CAEjE"}
@@ -0,0 +1,19 @@
1
+ import type { Spec } from '../spec/schema.js';
2
+ import type { Driver } from './driver-api.js';
3
+ export interface CaptureOptions {
4
+ outDir: string;
5
+ headless?: boolean;
6
+ captureFormat?: 'jpeg' | 'png';
7
+ quality?: number;
8
+ driver?: Driver;
9
+ /**
10
+ * Iteration accelerator: steps BEFORE this scene run fast (no cursor choreography, no
11
+ * filming, no events) purely to build app state; capture starts at this scene. The bundle
12
+ * is a partial covering only the filmed scenes — for iterating on one scene, not shipping.
13
+ */
14
+ fromScene?: string;
15
+ }
16
+ export declare function capture(spec: Spec, opts: CaptureOptions): Promise<{
17
+ bundleDir: string;
18
+ }>;
19
+ //# sourceMappingURL=executor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../src/capture/executor.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAiB,MAAM,mBAAmB,CAAC;AAG7D,OAAO,KAAK,EAAE,MAAM,EAAmB,MAAM,iBAAiB,CAAC;AAQ/D,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAaD,wBAAsB,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,CA4N9F"}
@@ -0,0 +1,122 @@
1
+ import type { Driver, DriverLaunchOptions, MaskInstruction, RawInteractable, ScreencastFrame, ScreencastOptions } from './driver-api.js';
2
+ import type { ParsedLocator } from '../spec/locators.js';
3
+ import type { TargetInfo, CursorWaypoint } from './events.js';
4
+ import type { Point } from '../shared/geometry.js';
5
+ export declare class PlaywrightDriver implements Driver {
6
+ private browser;
7
+ private context;
8
+ private page;
9
+ private cdp;
10
+ /** Dedicated CDP session for the capture loop so its screenshots never contend with the
11
+ * executor's accessibility/geometry lookups on the main session (which could deadlock). */
12
+ private captureCdp;
13
+ private cursor;
14
+ private navCallbacks;
15
+ private captureActive;
16
+ private captureLoop;
17
+ private captureOnFrame;
18
+ private captureOpts;
19
+ private inflightGrab;
20
+ private lastFrameNodeMs;
21
+ private clockOffset;
22
+ private tagCounter;
23
+ private typingMaskLoc;
24
+ launch(opts: DriverLaunchOptions): Promise<void>;
25
+ private consoleBuf;
26
+ private pushConsole;
27
+ consoleLog(): {
28
+ t: number;
29
+ type: string;
30
+ text: string;
31
+ }[];
32
+ close(): Promise<void>;
33
+ measureClockOffset(): Promise<number>;
34
+ goto(url: string): Promise<void>;
35
+ onNavigation(cb: (url: string, t: number) => void): void;
36
+ currentUrl(): string;
37
+ currentTitle(): Promise<string>;
38
+ ariaSnapshot(): Promise<string>;
39
+ countMatches(loc: ParsedLocator): Promise<number>;
40
+ collectInteractables(): Promise<RawInteractable[]>;
41
+ private toLocator;
42
+ resolveTarget(loc: ParsedLocator, timeoutMs: number): Promise<TargetInfo>;
43
+ /** Wait for the page to paint one frame, bounded — a concurrent screenshot must never let this hang. */
44
+ private nextFrame;
45
+ tryMeasure(loc: ParsedLocator): Promise<TargetInfo | null>;
46
+ private measure;
47
+ cursorPos(): Point;
48
+ moveCursor(to: Point, durationMs: number): Promise<CursorWaypoint[]>;
49
+ clickAt(p: Point, opts?: {
50
+ double?: boolean;
51
+ }): Promise<{
52
+ tDown: number;
53
+ tUp: number;
54
+ }>;
55
+ typeText(text: string, delayMs: number): Promise<{
56
+ tFirst: number;
57
+ tLast: number;
58
+ }>;
59
+ press(keys: string): Promise<{
60
+ tDown: number;
61
+ }>;
62
+ /**
63
+ * The REAL click: Playwright's locator.click with actionability + hit-target verification and
64
+ * retry. The cosmetic cursor has already animated to the target; this dispatches the action
65
+ * through the checks a raw coordinate click bypasses (a toast/sticky header drifting under
66
+ * the point between measure and click silently redirects a coordinate click).
67
+ */
68
+ actClick(loc: ParsedLocator, opts?: {
69
+ double?: boolean;
70
+ timeoutMs?: number;
71
+ }): Promise<{
72
+ tDown: number;
73
+ tUp: number;
74
+ }>;
75
+ selectOption(loc: ParsedLocator, value: string): Promise<void>;
76
+ scrollIntoView(loc: ParsedLocator): Promise<void>;
77
+ scrollBy(by: {
78
+ x: number;
79
+ y: number;
80
+ }): Promise<void>;
81
+ waitForScrollSettle(timeoutMs: number): Promise<void>;
82
+ expectState(loc: ParsedLocator, opts: {
83
+ visible?: boolean;
84
+ text?: string;
85
+ count?: number;
86
+ }, timeoutMs: number): Promise<void>;
87
+ /** Open requests → their start time. Long-lived streams (HMR sockets, SSE, long-polls) stop
88
+ * counting after LONG_REQUEST_MS so a dev server can't pin the settle at its cap forever. */
89
+ private pending;
90
+ private lastNetActivity;
91
+ private netTrackingInstalled;
92
+ private installNetTracking;
93
+ private static readonly LONG_REQUEST_MS;
94
+ settle(opts: {
95
+ idleMs: number;
96
+ capMs: number;
97
+ }): Promise<void>;
98
+ saveStorageState(path: string): Promise<void>;
99
+ /**
100
+ * Install CSS-expressible mask rules for continuous in-page tagging (see MASK_INIT_SCRIPT).
101
+ * Rules that can't be expressed as CSS (role/label/text) return false and stay Node-tagged.
102
+ */
103
+ installMaskRules(rules: MaskInstruction[]): Promise<void>;
104
+ applyMasks(rules: MaskInstruction[]): Promise<{
105
+ style: 'solid' | 'blur';
106
+ x: number;
107
+ y: number;
108
+ w: number;
109
+ h: number;
110
+ }[]>;
111
+ setTypingMask(loc: ParsedLocator | null): Promise<void>;
112
+ startCapture(onFrame: (f: ScreencastFrame) => void, opts: ScreencastOptions): Promise<void>;
113
+ /** Grab a frame, coalescing on any in-flight grab (so callers can await the current one). */
114
+ private grabFrame;
115
+ private grabFailures;
116
+ private doGrab;
117
+ private readScroll;
118
+ stopCapture(): Promise<void>;
119
+ lastFrameAt(): number;
120
+ captureNow(): Promise<void>;
121
+ }
122
+ //# sourceMappingURL=playwright-driver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"playwright-driver.d.ts","sourceRoot":"","sources":["../../src/capture/playwright-driver.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,MAAM,EACN,mBAAmB,EACnB,eAAe,EACf,eAAe,EACf,eAAe,EACf,iBAAiB,EAClB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,aAAa,EAAa,MAAM,qBAAqB,CAAC;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAqMnD,qBAAa,gBAAiB,YAAW,MAAM;IAC7C,OAAO,CAAC,OAAO,CAAW;IAC1B,OAAO,CAAC,OAAO,CAAkB;IACjC,OAAO,CAAC,IAAI,CAAQ;IACpB,OAAO,CAAC,GAAG,CAAc;IACzB;gGAC4F;IAC5F,OAAO,CAAC,UAAU,CAAc;IAChC,OAAO,CAAC,MAAM,CAAyB;IACvC,OAAO,CAAC,YAAY,CAA4C;IAChE,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,WAAW,CAA8B;IACjD,OAAO,CAAC,cAAc,CAA+C;IACrE,OAAO,CAAC,WAAW,CAAkC;IACrD,OAAO,CAAC,YAAY,CAA8B;IAClD,OAAO,CAAC,eAAe,CAAK;IAC5B,OAAO,CAAC,WAAW,CAAK;IACxB,OAAO,CAAC,UAAU,CAAK;IACv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