@gate-forge/pack-playwright 0.7.1 → 0.8.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 (202) hide show
  1. package/README.md +31 -0
  2. package/dist/constants.d.ts +13 -140
  3. package/dist/constants.d.ts.map +1 -1
  4. package/dist/constants.js +13 -148
  5. package/dist/constants.js.map +1 -1
  6. package/dist/cypress/plugin.d.ts +53 -0
  7. package/dist/cypress/plugin.d.ts.map +1 -0
  8. package/dist/cypress/plugin.js +369 -0
  9. package/dist/cypress/plugin.js.map +1 -0
  10. package/dist/cypress/spec-scan.d.ts +39 -0
  11. package/dist/cypress/spec-scan.d.ts.map +1 -0
  12. package/dist/cypress/spec-scan.js +301 -0
  13. package/dist/cypress/spec-scan.js.map +1 -0
  14. package/dist/diagnosis.d.ts +39 -0
  15. package/dist/diagnosis.d.ts.map +1 -0
  16. package/dist/diagnosis.js +63 -0
  17. package/dist/diagnosis.js.map +1 -0
  18. package/dist/discovery/adapter-projection.d.ts +13 -0
  19. package/dist/discovery/adapter-projection.d.ts.map +1 -0
  20. package/dist/discovery/adapter-projection.js +84 -0
  21. package/dist/discovery/adapter-projection.js.map +1 -0
  22. package/dist/discovery/config-locations.d.ts +5 -0
  23. package/dist/discovery/config-locations.d.ts.map +1 -0
  24. package/dist/discovery/config-locations.js +19 -0
  25. package/dist/discovery/config-locations.js.map +1 -0
  26. package/dist/discovery/cypress-runner-adapter.d.ts +112 -0
  27. package/dist/discovery/cypress-runner-adapter.d.ts.map +1 -0
  28. package/dist/discovery/cypress-runner-adapter.js +501 -0
  29. package/dist/discovery/cypress-runner-adapter.js.map +1 -0
  30. package/dist/discovery/discover.d.ts +53 -1
  31. package/dist/discovery/discover.d.ts.map +1 -1
  32. package/dist/discovery/discover.js +100 -3
  33. package/dist/discovery/discover.js.map +1 -1
  34. package/dist/discovery/git-ignore.d.ts +13 -0
  35. package/dist/discovery/git-ignore.d.ts.map +1 -0
  36. package/dist/discovery/git-ignore.js +62 -0
  37. package/dist/discovery/git-ignore.js.map +1 -0
  38. package/dist/discovery/index.d.ts +9 -0
  39. package/dist/discovery/index.d.ts.map +1 -1
  40. package/dist/discovery/index.js +9 -0
  41. package/dist/discovery/index.js.map +1 -1
  42. package/dist/discovery/playwright-runner-adapter.d.ts +108 -0
  43. package/dist/discovery/playwright-runner-adapter.d.ts.map +1 -0
  44. package/dist/discovery/playwright-runner-adapter.js +185 -0
  45. package/dist/discovery/playwright-runner-adapter.js.map +1 -0
  46. package/dist/discovery/prepare-barrier.d.ts +522 -0
  47. package/dist/discovery/prepare-barrier.d.ts.map +1 -0
  48. package/dist/discovery/prepare-barrier.js +739 -0
  49. package/dist/discovery/prepare-barrier.js.map +1 -0
  50. package/dist/discovery/pytest-adapter.d.ts.map +1 -1
  51. package/dist/discovery/pytest-adapter.js +6 -2
  52. package/dist/discovery/pytest-adapter.js.map +1 -1
  53. package/dist/discovery/pytest-runner-adapter.d.ts +124 -0
  54. package/dist/discovery/pytest-runner-adapter.d.ts.map +1 -0
  55. package/dist/discovery/pytest-runner-adapter.js +454 -0
  56. package/dist/discovery/pytest-runner-adapter.js.map +1 -0
  57. package/dist/discovery/reconcile.d.ts +80 -11
  58. package/dist/discovery/reconcile.d.ts.map +1 -1
  59. package/dist/discovery/reconcile.js +395 -78
  60. package/dist/discovery/reconcile.js.map +1 -1
  61. package/dist/discovery/runner-env.d.ts +88 -2
  62. package/dist/discovery/runner-env.d.ts.map +1 -1
  63. package/dist/discovery/runner-env.js +142 -4
  64. package/dist/discovery/runner-env.js.map +1 -1
  65. package/dist/discovery/static-discovery.d.ts +38 -3
  66. package/dist/discovery/static-discovery.d.ts.map +1 -1
  67. package/dist/discovery/static-discovery.js +454 -15
  68. package/dist/discovery/static-discovery.js.map +1 -1
  69. package/dist/discovery/supervised-run.d.ts +199 -10
  70. package/dist/discovery/supervised-run.d.ts.map +1 -1
  71. package/dist/discovery/supervised-run.js +350 -39
  72. package/dist/discovery/supervised-run.js.map +1 -1
  73. package/dist/discovery/trusted-config.d.ts +180 -6
  74. package/dist/discovery/trusted-config.d.ts.map +1 -1
  75. package/dist/discovery/trusted-config.js +279 -10
  76. package/dist/discovery/trusted-config.js.map +1 -1
  77. package/dist/discovery/vitest-runner-adapter.d.ts +172 -0
  78. package/dist/discovery/vitest-runner-adapter.d.ts.map +1 -0
  79. package/dist/discovery/vitest-runner-adapter.js +607 -0
  80. package/dist/discovery/vitest-runner-adapter.js.map +1 -0
  81. package/dist/fixture/consumer-runner.d.ts +4 -0
  82. package/dist/fixture/consumer-runner.d.ts.map +1 -0
  83. package/dist/fixture/consumer-runner.js +38 -0
  84. package/dist/fixture/consumer-runner.js.map +1 -0
  85. package/dist/fixture/evidence.d.ts +27 -0
  86. package/dist/fixture/evidence.d.ts.map +1 -1
  87. package/dist/fixture/evidence.js +12 -0
  88. package/dist/fixture/evidence.js.map +1 -1
  89. package/dist/fixture/fixture.d.ts +2 -1
  90. package/dist/fixture/fixture.d.ts.map +1 -1
  91. package/dist/fixture/fixture.js +1 -17
  92. package/dist/fixture/fixture.js.map +1 -1
  93. package/dist/fixture/witness-client.d.ts +6 -174
  94. package/dist/fixture/witness-client.d.ts.map +1 -1
  95. package/dist/fixture/witness-client.js +6 -267
  96. package/dist/fixture/witness-client.js.map +1 -1
  97. package/dist/index.d.ts +9 -6
  98. package/dist/index.d.ts.map +1 -1
  99. package/dist/index.js +5 -4
  100. package/dist/index.js.map +1 -1
  101. package/dist/json.d.ts +6 -12
  102. package/dist/json.d.ts.map +1 -1
  103. package/dist/json.js +6 -17
  104. package/dist/json.js.map +1 -1
  105. package/dist/reporter/project-graph-reporter.d.ts +92 -0
  106. package/dist/reporter/project-graph-reporter.d.ts.map +1 -0
  107. package/dist/reporter/project-graph-reporter.js +92 -0
  108. package/dist/reporter/project-graph-reporter.js.map +1 -0
  109. package/dist/reporter/reporter.cjs.map +1 -1
  110. package/dist/reporter/reporter.d.ts +93 -4
  111. package/dist/reporter/reporter.d.ts.map +1 -1
  112. package/dist/reporter/reporter.js +174 -18
  113. package/dist/reporter/reporter.js.map +1 -1
  114. package/dist/runner-claims.d.ts +13 -0
  115. package/dist/runner-claims.d.ts.map +1 -0
  116. package/dist/runner-claims.js +46 -0
  117. package/dist/runner-claims.js.map +1 -0
  118. package/dist/runner-resolution.d.ts +3 -0
  119. package/dist/runner-resolution.d.ts.map +1 -0
  120. package/dist/runner-resolution.js +14 -0
  121. package/dist/runner-resolution.js.map +1 -0
  122. package/dist/supervisor/client.d.ts +23 -1
  123. package/dist/supervisor/client.d.ts.map +1 -1
  124. package/dist/supervisor/client.js +49 -0
  125. package/dist/supervisor/client.js.map +1 -1
  126. package/dist/supervisor/drain.d.ts +65 -0
  127. package/dist/supervisor/drain.d.ts.map +1 -1
  128. package/dist/supervisor/drain.js +353 -9
  129. package/dist/supervisor/drain.js.map +1 -1
  130. package/dist/supervisor/index.d.ts +7 -3
  131. package/dist/supervisor/index.d.ts.map +1 -1
  132. package/dist/supervisor/index.js +7 -3
  133. package/dist/supervisor/index.js.map +1 -1
  134. package/dist/supervisor/spool.d.ts +65 -2
  135. package/dist/supervisor/spool.d.ts.map +1 -1
  136. package/dist/supervisor/spool.js +47 -0
  137. package/dist/supervisor/spool.js.map +1 -1
  138. package/dist/surface.d.ts +6 -207
  139. package/dist/surface.d.ts.map +1 -1
  140. package/dist/surface.js +6 -264
  141. package/dist/surface.js.map +1 -1
  142. package/dist/vitest/index.d.ts +23 -0
  143. package/dist/vitest/index.d.ts.map +1 -0
  144. package/dist/vitest/index.js +356 -0
  145. package/dist/vitest/index.js.map +1 -0
  146. package/dist/vitest/reporter.d.ts +83 -0
  147. package/dist/vitest/reporter.d.ts.map +1 -0
  148. package/dist/vitest/reporter.js +211 -0
  149. package/dist/vitest/reporter.js.map +1 -0
  150. package/dist/vitest/worker-slot.d.ts +36 -0
  151. package/dist/vitest/worker-slot.d.ts.map +1 -0
  152. package/dist/vitest/worker-slot.js +51 -0
  153. package/dist/vitest/worker-slot.js.map +1 -0
  154. package/dist/witness/adapter-registry.d.ts +6 -50
  155. package/dist/witness/adapter-registry.d.ts.map +1 -1
  156. package/dist/witness/adapter-registry.js +6 -257
  157. package/dist/witness/adapter-registry.js.map +1 -1
  158. package/dist/witness/behavior-request.d.ts +6 -76
  159. package/dist/witness/behavior-request.d.ts.map +1 -1
  160. package/dist/witness/behavior-request.js +6 -273
  161. package/dist/witness/behavior-request.js.map +1 -1
  162. package/dist/witness/behavior.d.ts +6 -48
  163. package/dist/witness/behavior.d.ts.map +1 -1
  164. package/dist/witness/behavior.js +6 -114
  165. package/dist/witness/behavior.js.map +1 -1
  166. package/dist/witness/bin.d.ts +6 -17
  167. package/dist/witness/bin.d.ts.map +1 -1
  168. package/dist/witness/bin.js +6 -168
  169. package/dist/witness/bin.js.map +1 -1
  170. package/dist/witness/browser.d.ts +14 -206
  171. package/dist/witness/browser.d.ts.map +1 -1
  172. package/dist/witness/browser.js +15 -654
  173. package/dist/witness/browser.js.map +1 -1
  174. package/dist/witness/classifications.d.ts +6 -38
  175. package/dist/witness/classifications.d.ts.map +1 -1
  176. package/dist/witness/classifications.js +6 -83
  177. package/dist/witness/classifications.js.map +1 -1
  178. package/dist/witness/env-attestation.d.ts +6 -94
  179. package/dist/witness/env-attestation.d.ts.map +1 -1
  180. package/dist/witness/env-attestation.js +6 -198
  181. package/dist/witness/env-attestation.js.map +1 -1
  182. package/dist/witness/fixture-provider.d.ts +6 -82
  183. package/dist/witness/fixture-provider.d.ts.map +1 -1
  184. package/dist/witness/fixture-provider.js +6 -105
  185. package/dist/witness/fixture-provider.js.map +1 -1
  186. package/dist/witness/loopback-pins.d.ts +6 -75
  187. package/dist/witness/loopback-pins.d.ts.map +1 -1
  188. package/dist/witness/loopback-pins.js +6 -240
  189. package/dist/witness/loopback-pins.js.map +1 -1
  190. package/dist/witness/server.d.ts +8 -26
  191. package/dist/witness/server.d.ts.map +1 -1
  192. package/dist/witness/server.js +24 -3761
  193. package/dist/witness/server.js.map +1 -1
  194. package/dist/witness/types.d.ts +6 -882
  195. package/dist/witness/types.d.ts.map +1 -1
  196. package/dist/witness/types.js +9 -1
  197. package/dist/witness/types.js.map +1 -1
  198. package/examples/overlay-proof.spec.js +75 -0
  199. package/package.json +8 -2
  200. package/python/__pycache__/gateforge_persistence_intents.cpython-312.pyc +0 -0
  201. package/python/__pycache__/gateforge_persistence_intents.cpython-314.pyc +0 -0
  202. package/python/gateforge_pytest_plugin.py +462 -0
@@ -0,0 +1,112 @@
1
+ import type { RunnerExecutionEnvelope } from '@gate-forge/core';
2
+ import type { RunnerAdapter, RunnerChildEnv, RunnerChildEnvContext, RunnerEnumeration, RunnerExecuteRequest, RunnerRawResults, RunnerSessionTag } from '@gate-forge/witness/adapter';
3
+ import { cypressSupportSource, registerGateforgeCypressPlugin, type CypressRunReport } from '../cypress/plugin.js';
4
+ export { cypressSupportSource, registerGateforgeCypressPlugin };
5
+ export type { CypressRunReport };
6
+ /** Per-test session variables a runner adapter publishes to the test. */
7
+ export declare const CYPRESS_ENV_SESSION_ID = "GATEFORGE_SESSION_ID";
8
+ export declare const CYPRESS_ENV_SESSION_TOKEN = "GATEFORGE_SESSION_TOKEN";
9
+ export declare const CYPRESS_ENV_SESSION_PROXY_URL = "GATEFORGE_SESSION_PROXY_URL";
10
+ /** The variables that carry ONE test's identity to its traffic. */
11
+ export declare const CYPRESS_IDENTITY_ENV: readonly string[];
12
+ /** Options the Cypress runner adapter accepts. */
13
+ export interface CypressRunnerAdapterOptions {
14
+ /**
15
+ * Run-scoped witness wiring for `execute` (the trusted caller's
16
+ * channel). Absent falls back to the ambient
17
+ * `GATEFORGE_WITNESS_URL`/`GATEFORGE_RUN_TOKEN`/`GATEFORGE_APP_BASE_URL`.
18
+ */
19
+ witness?: {
20
+ url?: string;
21
+ token?: string;
22
+ appBaseUrl?: string;
23
+ };
24
+ /** The browser Cypress runs (`electron` unless the project says otherwise). */
25
+ browser?: string;
26
+ }
27
+ /**
28
+ * The Cypress runner adapter.
29
+ *
30
+ * The CLI is resolved LOCAL FIRST (`<cwd>/node_modules/.bin/cypress`,
31
+ * the same rule the supervised Playwright run applies to its browser),
32
+ * and an absent CLI is `unavailable` — never a silent pass.
33
+ */
34
+ export declare class CypressRunnerAdapter implements RunnerAdapter<CypressRunReport | null> {
35
+ private readonly options;
36
+ readonly runner = "cypress";
37
+ readonly capabilities: {
38
+ readonly inventory: "available";
39
+ readonly resolveInstances: "available";
40
+ readonly execute: "available";
41
+ };
42
+ constructor(options?: CypressRunnerAdapterOptions);
43
+ /**
44
+ * Job 1: the expected set, fixed BEFORE the run, read from the spec
45
+ * sources (Cypress has no list mode that does not execute the suite).
46
+ *
47
+ * Args:
48
+ * cwd: absolute project root.
49
+ *
50
+ * Returns:
51
+ * Promise<RunnerEnumeration>: the enumerated tests, or an
52
+ * `unavailable` verdict with a single cause (no specs, a spec with
53
+ * non-literal titles, or a spec tree that declares no test).
54
+ */
55
+ enumerate(cwd: string): Promise<RunnerEnumeration>;
56
+ /**
57
+ * Job 2: the per-test tag. Cypress cannot carry per-test environment
58
+ * (one process serves the whole run), so the tag is issued at task
59
+ * time by the pack's plugin and delivered to the browser by the
60
+ * generated support file; these variables document the channel the
61
+ * fixture resolves.
62
+ *
63
+ * Args:
64
+ * _session: the test being tagged.
65
+ * context: run-scoped, non-secret witness wiring.
66
+ *
67
+ * Returns:
68
+ * RunnerChildEnv: the run identity plus the session-scoped tag.
69
+ */
70
+ childEnv(_session: RunnerSessionTag, context: RunnerChildEnvContext): RunnerChildEnv;
71
+ /**
72
+ * Job 3: runs the SELECTED spec files through the project's own
73
+ * Cypress CLI with a generated config that chains the project's
74
+ * config, wires the pack's plugin and support file, and forwards the
75
+ * run-scoped (never secret) wiring through the witnessed-session env
76
+ * allowlist.
77
+ *
78
+ * Args:
79
+ * request: the exact selection, run identity, and wall-clock bound.
80
+ *
81
+ * Returns:
82
+ * Promise<RunnerExecutionEnvelope>: the structured outcome envelope
83
+ * (a Cypress exit code alone is never a gate result).
84
+ */
85
+ execute(request: RunnerExecuteRequest): Promise<RunnerExecutionEnvelope>;
86
+ /**
87
+ * Job 4: the sealed run report, strictly mapped.
88
+ *
89
+ * Args:
90
+ * raw: the report text plus the runner exit status.
91
+ *
92
+ * Returns:
93
+ * RunnerExecutionEnvelope: reporter INPUT, never a verdict. An
94
+ * unreadable report, a zero-test run, and a report whose rows carry
95
+ * no attributable identity are all `complete: false`.
96
+ */
97
+ parseResults(raw: RunnerRawResults): RunnerExecutionEnvelope;
98
+ /**
99
+ * The runner's native parsed report (diagnostics surfaces).
100
+ *
101
+ * Args:
102
+ * raw: the report text plus the runner exit status.
103
+ *
104
+ * Returns:
105
+ * CypressRunReport | null: the parsed document, or null when the
106
+ * report is absent or unparsable (never a guess).
107
+ */
108
+ parseReport(raw: RunnerRawResults): CypressRunReport | null;
109
+ /** The Cypress CLI for a project (local-first), or null. */
110
+ private cypressCliOf;
111
+ }
112
+ //# sourceMappingURL=cypress-runner-adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cypress-runner-adapter.d.ts","sourceRoot":"","sources":["../../src/discovery/cypress-runner-adapter.ts"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EAAE,uBAAuB,EAAyB,MAAM,kBAAkB,CAAC;AACvF,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EACd,qBAAqB,EACrB,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,gBAAgB,EAEjB,MAAM,6BAA6B,CAAC;AAQrC,OAAO,EACL,oBAAoB,EACpB,8BAA8B,EAC9B,KAAK,gBAAgB,EACtB,MAAM,sBAAsB,CAAC;AAM9B,OAAO,EAAE,oBAAoB,EAAE,8BAA8B,EAAE,CAAC;AAChE,YAAY,EAAE,gBAAgB,EAAE,CAAC;AAEjC,yEAAyE;AACzE,eAAO,MAAM,sBAAsB,yBAAyB,CAAC;AAC7D,eAAO,MAAM,yBAAyB,4BAA4B,CAAC;AACnE,eAAO,MAAM,6BAA6B,gCAAgC,CAAC;AAE3E,mEAAmE;AACnE,eAAO,MAAM,oBAAoB,EAAE,SAAS,MAAM,EAIjD,CAAC;AAiBF,kDAAkD;AAClD,MAAM,WAAW,2BAA2B;IAC1C;;;;OAIG;IACH,OAAO,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAChE,+EAA+E;IAC/E,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;GAMG;AACH,qBAAa,oBAAqB,YAAW,aAAa,CAAC,gBAAgB,GAAG,IAAI,CAAC;IASrE,OAAO,CAAC,QAAQ,CAAC,OAAO;IARpC,QAAQ,CAAC,MAAM,aAAa;IAE5B,QAAQ,CAAC,YAAY;;;;MAIV;gBAEkB,OAAO,GAAE,2BAAgC;IAEtE;;;;;;;;;;;OAWG;IACG,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAsBxD;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,EAAE,OAAO,EAAE,qBAAqB,GAAG,cAAc;IAoBpF;;;;;;;;;;;;;OAaG;IACG,OAAO,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,uBAAuB,CAAC;IA0G9E;;;;;;;;;;OAUG;IACH,YAAY,CAAC,GAAG,EAAE,gBAAgB,GAAG,uBAAuB;IAiE5D;;;;;;;;;OASG;IACH,WAAW,CAAC,GAAG,EAAE,gBAAgB,GAAG,gBAAgB,GAAG,IAAI;IAY3D,4DAA4D;IAC5D,OAAO,CAAC,YAAY;CAIrB"}
@@ -0,0 +1,501 @@
1
+ /**
2
+ * The Cypress runner adapter behind the runner-neutral `RunnerAdapter`
3
+ * contract (plan 2026-09-25 phase 2).
4
+ *
5
+ * Cypress is the second witness-producing runner: same evidence rules
6
+ * as Playwright, same supervision, no new trust tier.
7
+ * - enumerate: Cypress cannot list tests without running them, so the
8
+ * expected set is read from the spec SOURCES (`cypress/spec-scan.ts`)
9
+ * and fixed BEFORE the run. A spec whose titles are not static
10
+ * literals enumerates `unavailable` — never a guessed half-set.
11
+ * - tag: the pack's Cypress plugin (`cypress/plugin.ts`) registers the
12
+ * lifecycle tasks the generated support file calls; the support file
13
+ * resolves THIS test's session and rewrites `cy.request` traffic at
14
+ * the app origin onto that session's proxy origin (the same
15
+ * `session-proxy` channel the Playwright fixture uses). Traffic that
16
+ * does not go through it (a raw browser `fetch`) stays unattributed
17
+ * and is credited to nothing.
18
+ * - execute: the project's own Cypress CLI, driven with a GENERATED
19
+ * config file that chains the project's config and adds the pack's
20
+ * plugin and support file. Selection granularity is the spec FILE.
21
+ * - parse: the report the plugin seals from mocha's own `after:run`
22
+ * results, strictly: a row with no spec file or no title path is
23
+ * never attributed, a zero-test run is incomplete, and more than one
24
+ * attempt for a test is a runner-assisted retry (required retries
25
+ * are zero) that blocks the run.
26
+ */
27
+ import { spawn } from 'node:child_process';
28
+ import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
29
+ import { fileURLToPath } from 'node:url';
30
+ import { join } from 'node:path';
31
+ import { ENV_APP_BASE_URL, ENV_RUN_ID, ENV_RUN_TOKEN, ENV_STATE_DIR, ENV_WITNESS_URL, } from '@gate-forge/witness/constants';
32
+ import { cypressSupportSource, registerGateforgeCypressPlugin, } from '../cypress/plugin.js';
33
+ import { scanCypressSpecs } from '../cypress/spec-scan.js';
34
+ import { buildWitnessedSessionRunnerEnv } from './runner-env.js';
35
+ // Public re-exports (the CLI supervised surface drives the adapter and
36
+ // needs the plugin registration plus the report type).
37
+ export { cypressSupportSource, registerGateforgeCypressPlugin };
38
+ /** Per-test session variables a runner adapter publishes to the test. */
39
+ export const CYPRESS_ENV_SESSION_ID = 'GATEFORGE_SESSION_ID';
40
+ export const CYPRESS_ENV_SESSION_TOKEN = 'GATEFORGE_SESSION_TOKEN';
41
+ export const CYPRESS_ENV_SESSION_PROXY_URL = 'GATEFORGE_SESSION_PROXY_URL';
42
+ /** The variables that carry ONE test's identity to its traffic. */
43
+ export const CYPRESS_IDENTITY_ENV = [
44
+ CYPRESS_ENV_SESSION_ID,
45
+ CYPRESS_ENV_SESSION_TOKEN,
46
+ CYPRESS_ENV_SESSION_PROXY_URL,
47
+ ];
48
+ /** The report document the plugin seals for one run. */
49
+ const REPORT_FILE = 'report.json';
50
+ /** Project config file names the generated config can chain. */
51
+ const PROJECT_CONFIG_NAMES = [
52
+ 'cypress.config.cjs',
53
+ 'cypress.config.js',
54
+ 'cypress.config.mjs',
55
+ 'cypress.config.ts',
56
+ 'cypress.config.mts',
57
+ ];
58
+ /** Cypress exit codes: 0 = all specs passed, 1 = tests failed. */
59
+ const CYPRESS_EXIT_TESTS_FAILED = 1;
60
+ /**
61
+ * The Cypress runner adapter.
62
+ *
63
+ * The CLI is resolved LOCAL FIRST (`<cwd>/node_modules/.bin/cypress`,
64
+ * the same rule the supervised Playwright run applies to its browser),
65
+ * and an absent CLI is `unavailable` — never a silent pass.
66
+ */
67
+ export class CypressRunnerAdapter {
68
+ options;
69
+ runner = 'cypress';
70
+ capabilities = {
71
+ inventory: 'available',
72
+ resolveInstances: 'available',
73
+ execute: 'available',
74
+ };
75
+ constructor(options = {}) {
76
+ this.options = options;
77
+ }
78
+ /**
79
+ * Job 1: the expected set, fixed BEFORE the run, read from the spec
80
+ * sources (Cypress has no list mode that does not execute the suite).
81
+ *
82
+ * Args:
83
+ * cwd: absolute project root.
84
+ *
85
+ * Returns:
86
+ * Promise<RunnerEnumeration>: the enumerated tests, or an
87
+ * `unavailable` verdict with a single cause (no specs, a spec with
88
+ * non-literal titles, or a spec tree that declares no test).
89
+ */
90
+ async enumerate(cwd) {
91
+ const scanned = scanCypressSpecs(cwd);
92
+ if (scanned.status === 'unavailable') {
93
+ return { status: 'unavailable', detail: scanned.detail, tests: [] };
94
+ }
95
+ const tests = scanned.tests.map((test) => ({
96
+ logicalKey: `${test.file}#${test.titlePath.join('>')}`,
97
+ project: null,
98
+ file: test.file,
99
+ titlePath: [...test.titlePath],
100
+ blockingAnnotations: [],
101
+ // The generated support file spools `<file>#<title path>` —
102
+ // registration must name the same id.
103
+ frameworkId: `${test.file}#${test.titlePath.join('>')}`,
104
+ }));
105
+ return {
106
+ status: 'discovered',
107
+ detail: `enumerated ${String(tests.length)} Cypress test(s) from the spec sources under ${cwd}`,
108
+ tests: tests.sort((a, b) => (a.logicalKey < b.logicalKey ? -1 : a.logicalKey > b.logicalKey ? 1 : 0)),
109
+ };
110
+ }
111
+ /**
112
+ * Job 2: the per-test tag. Cypress cannot carry per-test environment
113
+ * (one process serves the whole run), so the tag is issued at task
114
+ * time by the pack's plugin and delivered to the browser by the
115
+ * generated support file; these variables document the channel the
116
+ * fixture resolves.
117
+ *
118
+ * Args:
119
+ * _session: the test being tagged.
120
+ * context: run-scoped, non-secret witness wiring.
121
+ *
122
+ * Returns:
123
+ * RunnerChildEnv: the run identity plus the session-scoped tag.
124
+ */
125
+ childEnv(_session, context) {
126
+ return {
127
+ vars: {
128
+ [ENV_WITNESS_URL]: context.witnessUrl,
129
+ [ENV_RUN_TOKEN]: context.runToken,
130
+ [ENV_APP_BASE_URL]: context.appBaseUrl,
131
+ [ENV_STATE_DIR]: '<run-state dir>',
132
+ [ENV_RUN_ID]: '<run id>',
133
+ [CYPRESS_ENV_SESSION_ID]: context.sessionId,
134
+ [CYPRESS_ENV_SESSION_TOKEN]: context.sessionToken,
135
+ [CYPRESS_ENV_SESSION_PROXY_URL]: context.sessionProxyUrl,
136
+ },
137
+ tagChannel: 'session-proxy',
138
+ identityVars: CYPRESS_IDENTITY_ENV,
139
+ mechanism: 'the gateforge Cypress plugin resolves the supervisor session per started test and the ' +
140
+ "generated support file rewrites cy.request traffic at the app origin onto that session's proxy",
141
+ };
142
+ }
143
+ /**
144
+ * Job 3: runs the SELECTED spec files through the project's own
145
+ * Cypress CLI with a generated config that chains the project's
146
+ * config, wires the pack's plugin and support file, and forwards the
147
+ * run-scoped (never secret) wiring through the witnessed-session env
148
+ * allowlist.
149
+ *
150
+ * Args:
151
+ * request: the exact selection, run identity, and wall-clock bound.
152
+ *
153
+ * Returns:
154
+ * Promise<RunnerExecutionEnvelope>: the structured outcome envelope
155
+ * (a Cypress exit code alone is never a gate result).
156
+ */
157
+ async execute(request) {
158
+ const cli = this.cypressCliOf(request.cwd);
159
+ if (cli === null) {
160
+ return envelopeIncomplete(null, `cypress execution found no Cypress CLI under ${request.cwd} — install cypress in the project`);
161
+ }
162
+ const projectConfig = projectConfigOf(request.cwd);
163
+ if (projectConfig.unsupported !== null) {
164
+ return envelopeIncomplete(null, `cypress execution cannot chain the project config ${projectConfig.unsupported} — a config ` +
165
+ 'gateforge cannot load would silently change what the run exercises, so it fails closed');
166
+ }
167
+ const files = new Set();
168
+ for (const logicalKey of request.logicalKeys) {
169
+ const file = logicalKeyFileOf(logicalKey);
170
+ if (file === null) {
171
+ return envelopeIncomplete(null, `cypress execution cannot run '${logicalKey}': not a <spec file>#<title path> identity this adapter enumerated`);
172
+ }
173
+ files.add(file);
174
+ }
175
+ const runDir = join(request.stateDir, 'cypress', request.runId);
176
+ const appBaseUrl = this.options.witness?.appBaseUrl ?? process.env[ENV_APP_BASE_URL] ?? '';
177
+ let generated;
178
+ try {
179
+ mkdirSync(runDir, { recursive: true });
180
+ generated = writeGeneratedConfig(runDir, projectConfig.path, projectConfig.supportFile);
181
+ }
182
+ catch (error) {
183
+ return envelopeIncomplete(null, `cypress execution cannot write its generated config: ${error.message}`);
184
+ }
185
+ const argv = [
186
+ 'run',
187
+ '--project',
188
+ request.cwd,
189
+ '--config-file',
190
+ generated.configFile,
191
+ '--browser',
192
+ this.options.browser ?? 'electron',
193
+ '--quiet',
194
+ ...(files.size > 0 ? ['--spec', [...files].sort().join(',')] : []),
195
+ ];
196
+ const child = spawn(cli, argv, {
197
+ cwd: request.cwd,
198
+ env: buildWitnessedSessionRunnerEnv({
199
+ [ENV_WITNESS_URL]: this.options.witness?.url ?? process.env[ENV_WITNESS_URL] ?? '',
200
+ [ENV_RUN_TOKEN]: this.options.witness?.token ?? process.env[ENV_RUN_TOKEN] ?? '',
201
+ [ENV_STATE_DIR]: request.stateDir,
202
+ [ENV_RUN_ID]: request.runId,
203
+ [ENV_APP_BASE_URL]: appBaseUrl,
204
+ }, process.env),
205
+ // Cypress drives a browser process tree; the run is killed as a
206
+ // GROUP so no orphan browser survives a timeout.
207
+ detached: true,
208
+ stdio: ['ignore', 'pipe', 'pipe'],
209
+ });
210
+ const outcome = await new Promise((settle) => {
211
+ let timedOut = false;
212
+ const timer = setTimeout(() => {
213
+ timedOut = true;
214
+ killGroup(child);
215
+ }, request.timeoutMs);
216
+ child.stdout?.resume();
217
+ child.stderr?.resume();
218
+ child.once('error', (error) => {
219
+ clearTimeout(timer);
220
+ settle({ code: null, timedOut: false, error });
221
+ });
222
+ child.once('exit', (code) => {
223
+ clearTimeout(timer);
224
+ settle({ code, timedOut, error: null });
225
+ });
226
+ });
227
+ if (outcome.error !== null) {
228
+ return envelopeIncomplete(null, `cypress execution could not start (${cli}): ${outcome.error.message}`);
229
+ }
230
+ if (outcome.timedOut) {
231
+ return envelopeIncomplete(null, `cypress execution exceeded its ${String(request.timeoutMs)}ms bound and was killed — an incomplete run never grades complete`);
232
+ }
233
+ let report = '';
234
+ try {
235
+ report = readFileSync(join(runDir, REPORT_FILE), 'utf8');
236
+ }
237
+ catch {
238
+ report = '';
239
+ }
240
+ const envelope = this.parseResults({ processExit: outcome.code, report });
241
+ if (report === '') {
242
+ return {
243
+ ...envelope,
244
+ incompleteDetail: `cypress produced no run report in ${runDir} (exit ${String(outcome.code)}) — fail closed`,
245
+ };
246
+ }
247
+ return envelope;
248
+ }
249
+ /**
250
+ * Job 4: the sealed run report, strictly mapped.
251
+ *
252
+ * Args:
253
+ * raw: the report text plus the runner exit status.
254
+ *
255
+ * Returns:
256
+ * RunnerExecutionEnvelope: reporter INPUT, never a verdict. An
257
+ * unreadable report, a zero-test run, and a report whose rows carry
258
+ * no attributable identity are all `complete: false`.
259
+ */
260
+ parseResults(raw) {
261
+ if (raw.report.trim() === '') {
262
+ return envelopeIncomplete(raw.processExit, 'no Cypress run report — a missing report never proves anything');
263
+ }
264
+ let report;
265
+ try {
266
+ const parsed = JSON.parse(raw.report);
267
+ if (typeof parsed !== 'object' || parsed === null || Array.isArray(parsed)) {
268
+ throw new Error('the Cypress run report is not an object');
269
+ }
270
+ report = parsed;
271
+ }
272
+ catch (error) {
273
+ return envelopeIncomplete(raw.processExit, `unparsable Cypress run report — fail closed: ${error instanceof Error ? error.message : String(error)}`);
274
+ }
275
+ const rows = [];
276
+ let rowCount = 0;
277
+ for (const spec of report.specs ?? []) {
278
+ const file = typeof spec.file === 'string' ? spec.file : '';
279
+ for (const test of spec.tests ?? []) {
280
+ rowCount += 1;
281
+ const titlePath = Array.isArray(test.titlePath) ? test.titlePath : [];
282
+ // A row with no spec file or no title cannot be joined to an
283
+ // enumerated identity: it is attributed to NOTHING.
284
+ if (file === '' || titlePath.length === 0)
285
+ continue;
286
+ rows.push({ identity: { file, titlePath }, row: test });
287
+ }
288
+ }
289
+ if (rowCount > 0 && rows.length === 0) {
290
+ return envelopeIncomplete(raw.processExit, `the Cypress report carries ${String(rowCount)} row(s) with no attributable spec/title identity — ` +
291
+ 'an unidentified row is never attributed to a test');
292
+ }
293
+ if (rowCount === 0) {
294
+ return envelopeIncomplete(raw.processExit, 'the Cypress report covers zero tests — a zero-test run is incomplete');
295
+ }
296
+ const outcomes = rows.map((entry) => ({
297
+ logicalKey: `${entry.identity.file}#${entry.identity.titlePath.join('>')}`,
298
+ project: null,
299
+ frameworkId: `${entry.identity.file}::${entry.identity.titlePath.join('::')}`,
300
+ status: entry.row.state === 'passed' ? 'passed' : entry.row.state === 'pending' ? 'skipped' : 'failed',
301
+ attempt: entry.row.attempts >= 1 ? entry.row.attempts : 1,
302
+ }));
303
+ if (report.retriesDetected === true || outcomes.some((outcome) => outcome.attempt > 1)) {
304
+ return {
305
+ processExit: raw.processExit,
306
+ complete: false,
307
+ incompleteDetail: 'cypress runner-assisted retry detected (required retries are zero) — the run blocks',
308
+ outcomes,
309
+ fixtureOutcome: 'passed',
310
+ retriesDetected: true,
311
+ retriesDetail: 'mocha recorded more than one attempt for at least one Cypress test',
312
+ };
313
+ }
314
+ const exitDetail = cypressExitIncompleteDetail(raw.processExit);
315
+ if (exitDetail !== null)
316
+ return { ...envelopeIncomplete(raw.processExit, exitDetail), outcomes };
317
+ return { processExit: raw.processExit, complete: true, outcomes, fixtureOutcome: 'passed' };
318
+ }
319
+ /**
320
+ * The runner's native parsed report (diagnostics surfaces).
321
+ *
322
+ * Args:
323
+ * raw: the report text plus the runner exit status.
324
+ *
325
+ * Returns:
326
+ * CypressRunReport | null: the parsed document, or null when the
327
+ * report is absent or unparsable (never a guess).
328
+ */
329
+ parseReport(raw) {
330
+ if (raw.report.trim() === '')
331
+ return null;
332
+ try {
333
+ const parsed = JSON.parse(raw.report);
334
+ return typeof parsed === 'object' && parsed !== null && !Array.isArray(parsed)
335
+ ? parsed
336
+ : null;
337
+ }
338
+ catch {
339
+ return null;
340
+ }
341
+ }
342
+ /** The Cypress CLI for a project (local-first), or null. */
343
+ cypressCliOf(cwd) {
344
+ const local = join(cwd, 'node_modules', '.bin', 'cypress');
345
+ return existsSync(local) ? local : null;
346
+ }
347
+ }
348
+ /**
349
+ * Locates the project's Cypress config and its support file.
350
+ *
351
+ * @param cwd absolute project root.
352
+ * @returns the config path, the support file path (when the config
353
+ * declares one that exists), or the reason the config cannot be
354
+ * chained (ESM/TypeScript configs are refused rather than silently
355
+ * replaced by a config that would exercise something else).
356
+ */
357
+ function projectConfigOf(cwd) {
358
+ for (const name of PROJECT_CONFIG_NAMES) {
359
+ const path = join(cwd, name);
360
+ if (!existsSync(path))
361
+ continue;
362
+ if (!name.endsWith('.cjs') && !name.endsWith('.js')) {
363
+ return { path: null, supportFile: null, unsupported: name };
364
+ }
365
+ return { path, supportFile: supportFileOf(cwd), unsupported: null };
366
+ }
367
+ return { path: null, supportFile: supportFileOf(cwd), unsupported: null };
368
+ }
369
+ /**
370
+ * The project's own support file (the default locations Cypress itself
371
+ * probes), or null when the project declares/has none.
372
+ *
373
+ * @param cwd absolute project root.
374
+ * @returns the absolute support-file path, or null.
375
+ */
376
+ function supportFileOf(cwd) {
377
+ const candidates = [
378
+ 'cypress/support/e2e.js',
379
+ 'cypress/support/e2e.cjs',
380
+ 'cypress/support/e2e.ts',
381
+ 'cypress/support/index.js',
382
+ 'cypress/support/index.ts',
383
+ ];
384
+ for (const candidate of candidates) {
385
+ const path = join(cwd, candidate);
386
+ if (existsSync(path))
387
+ return path;
388
+ }
389
+ return null;
390
+ }
391
+ /**
392
+ * Writes the generated config and support file for one run.
393
+ *
394
+ * The generated config chains the project's own settings and pins the
395
+ * screenshot, video and download folders into `runDir`: Cypress writes
396
+ * them on any failing test, and inside the candidate they would enter
397
+ * the tree the evidence run is supposed to certify.
398
+ *
399
+ * @param runDir the run-scoped Cypress directory.
400
+ * @param projectConfigPath the project's chainable config, or null.
401
+ * @param projectSupportFile the project's own support file to chain first.
402
+ * @returns the generated file paths.
403
+ */
404
+ function writeGeneratedConfig(runDir, projectConfigPath, projectSupportFile) {
405
+ const pluginModule = cypressPluginModulePath();
406
+ if (pluginModule === null) {
407
+ throw new Error('the gateforge Cypress plugin module is not built — a run without it could not tag or ' +
408
+ 'report anything, so it fails closed');
409
+ }
410
+ const supportFile = join(runDir, 'support.cjs');
411
+ writeFileSync(supportFile, cypressSupportSource(projectSupportFile), 'utf8');
412
+ const configFile = join(runDir, 'gateforge.config.cjs');
413
+ const source = [
414
+ "// Generated by gateforge (plan 2026-09-25 phase 2). Do not edit.",
415
+ "'use strict';",
416
+ `const { registerGateforgeCypressPlugin } = require(${JSON.stringify(pluginModule)});`,
417
+ `const base = ${projectConfigPath === null ? '{}' : `require(${JSON.stringify(projectConfigPath)})`};`,
418
+ 'const e2e = Object.assign({}, base.e2e || {});',
419
+ `e2e.supportFile = ${JSON.stringify(supportFile)};`,
420
+ "// A failing Cypress run writes screenshots, videos and downloads",
421
+ '// under the project by default. Those files would enter the',
422
+ "// candidate's own tree and the fail-closed drift gate would then",
423
+ '// report the run changing its own inputs instead of the test',
424
+ '// failure. The run state directory is outside the candidate, so',
425
+ '// the three artifact folders are pinned there for this run and',
426
+ '// the project\'s other settings are chained unchanged.',
427
+ `e2e.screenshotsFolder = ${JSON.stringify(join(runDir, 'screenshots'))};`,
428
+ `e2e.videosFolder = ${JSON.stringify(join(runDir, 'videos'))};`,
429
+ `e2e.downloadsFolder = ${JSON.stringify(join(runDir, 'downloads'))};`,
430
+ 'const baseSetup = e2e.setupNodeEvents;',
431
+ '// setupNodeEvents lives under the testing type: that is where',
432
+ "// Cypress looks for it (config[testingType].setupNodeEvents).",
433
+ 'e2e.setupNodeEvents = function (on, config) {',
434
+ ' registerGateforgeCypressPlugin(on);',
435
+ ' if (typeof baseSetup === "function") baseSetup.call(this, on, config);',
436
+ '};',
437
+ 'module.exports = Object.assign({}, base, {',
438
+ ' e2e,',
439
+ '});',
440
+ '',
441
+ ].join('\n');
442
+ writeFileSync(configFile, source, 'utf8');
443
+ return { configFile, supportFile };
444
+ }
445
+ /**
446
+ * The built Cypress plugin module the generated config requires (the
447
+ * dist layout, or the monorepo's compiled dist when this module runs
448
+ * from source). Null when nothing is built.
449
+ *
450
+ * @returns the absolute module path, or null.
451
+ */
452
+ function cypressPluginModulePath() {
453
+ const candidates = [
454
+ fileURLToPath(new URL('../cypress/plugin.js', import.meta.url)),
455
+ fileURLToPath(new URL('../../dist/cypress/plugin.js', import.meta.url)),
456
+ ];
457
+ return candidates.find((candidate) => existsSync(candidate)) ?? null;
458
+ }
459
+ /**
460
+ * Kills a Cypress process GROUP (the CLI plus its browser children), so
461
+ * a timed-out run leaves no orphan browser behind.
462
+ *
463
+ * @param child the spawned Cypress CLI process.
464
+ * @returns void
465
+ */
466
+ function killGroup(child) {
467
+ if (child.pid === undefined) {
468
+ child.kill('SIGKILL');
469
+ return;
470
+ }
471
+ try {
472
+ process.kill(-child.pid, 'SIGKILL');
473
+ }
474
+ catch {
475
+ child.kill('SIGKILL');
476
+ }
477
+ }
478
+ /** The file part of a logical key, or null (never a wildcard). */
479
+ function logicalKeyFileOf(logicalKey) {
480
+ const hash = logicalKey.indexOf('#');
481
+ if (hash <= 0)
482
+ return null;
483
+ const file = logicalKey.slice(0, hash);
484
+ if (file === '' || logicalKey.slice(hash + 1).includes('#'))
485
+ return null;
486
+ return file;
487
+ }
488
+ /** Cypress exit codes, fail closed (0 passed, 1 test failures). */
489
+ function cypressExitIncompleteDetail(exit) {
490
+ if (exit === null)
491
+ return 'cypress ended without an exit status — incomplete';
492
+ if (exit !== 0 && exit !== CYPRESS_EXIT_TESTS_FAILED) {
493
+ return `cypress ended with status ${String(exit)} (fatal runner error) — incomplete`;
494
+ }
495
+ return null;
496
+ }
497
+ /** Single-cause incomplete envelope (no outcomes are ever invented). */
498
+ function envelopeIncomplete(processExit, detail) {
499
+ return { processExit, complete: false, incompleteDetail: detail, outcomes: [], fixtureOutcome: 'unknown' };
500
+ }
501
+ //# sourceMappingURL=cypress-runner-adapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cypress-runner-adapter.js","sourceRoot":"","sources":["../../src/discovery/cypress-runner-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EAAE,KAAK,EAAqB,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAYjC,OAAO,EACL,gBAAgB,EAChB,UAAU,EACV,aAAa,EACb,aAAa,EACb,eAAe,GAChB,MA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