@ait-co/devtools 0.1.121 → 0.1.123

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 (86) hide show
  1. package/dist/{attach-orchestrator-DEJfLm7V.js → attach-orchestrator-CPMQWkGV.js} +3 -3
  2. package/dist/{attach-orchestrator-DEJfLm7V.js.map → attach-orchestrator-CPMQWkGV.js.map} +1 -1
  3. package/dist/{attach-orchestrator-qFEMBUwb.js → attach-orchestrator-CpE0dMew.js} +2 -2
  4. package/dist/{attach-orchestrator-qFEMBUwb.js.map → attach-orchestrator-CpE0dMew.js.map} +1 -1
  5. package/dist/{attach-orchestrator-CFotueL3.js → attach-orchestrator-RhOdO3DS.js} +2 -2
  6. package/dist/{attach-orchestrator-CFotueL3.js.map → attach-orchestrator-RhOdO3DS.js.map} +1 -1
  7. package/dist/{bundle-CA1TCXED.d.ts → bundle-Cb3GFuw6.d.ts} +1 -1
  8. package/dist/{bundle-CA1TCXED.d.ts.map → bundle-Cb3GFuw6.d.ts.map} +1 -1
  9. package/dist/{capture-BmK_cBqQ.d.ts → capture-B1zfGyTo.d.ts} +1 -1
  10. package/dist/{capture-BmK_cBqQ.d.ts.map → capture-B1zfGyTo.d.ts.map} +1 -1
  11. package/dist/{cdp-connection-DB2zgthr.d.ts → cdp-connection-Dxw_EY8s.d.ts} +1 -1
  12. package/dist/{cdp-connection-DB2zgthr.d.ts.map → cdp-connection-Dxw_EY8s.d.ts.map} +1 -1
  13. package/dist/{cell-Cv3e_qwn.js → cell-Ba9lCI3B.js} +3 -3
  14. package/dist/{cell-BPWZUm_X.js.map → cell-Ba9lCI3B.js.map} +1 -1
  15. package/dist/{cell-BPWZUm_X.js → cell-CX92lDI0.js} +3 -3
  16. package/dist/{cell-Cv3e_qwn.js.map → cell-CX92lDI0.js.map} +1 -1
  17. package/dist/{cell-nrWFeqvG.js → cell-D0dJSGHi.js} +3 -3
  18. package/dist/{cell-Cj-u6JTG.js.map → cell-D0dJSGHi.js.map} +1 -1
  19. package/dist/{debug-server-BhHVy3XT.js → debug-server-Bup2AJ5H.js} +7 -226
  20. package/dist/debug-server-Bup2AJ5H.js.map +1 -0
  21. package/dist/{debug-server-Buc8yoa7.js → debug-server-C0A_Kujq.js} +8 -945
  22. package/dist/debug-server-C0A_Kujq.js.map +1 -0
  23. package/dist/{debug-server-C_5ag9jj.js → debug-server-DywH5GU-.js} +5 -4
  24. package/dist/{debug-server-C_5ag9jj.js.map → debug-server-DywH5GU-.js.map} +1 -1
  25. package/dist/mcp/cli.js +8204 -4
  26. package/dist/mcp/cli.js.map +1 -1
  27. package/dist/mcp/server.js +1 -1
  28. package/dist/panel/index.js +1 -1
  29. package/dist/{pool-D5QH6Ydv.d.ts → pool-B9wSRPOU.d.ts} +3 -3
  30. package/dist/{pool-D5QH6Ydv.d.ts.map → pool-B9wSRPOU.d.ts.map} +1 -1
  31. package/dist/qr-http-server-CKbtqvKy.js +1505 -0
  32. package/dist/qr-http-server-CKbtqvKy.js.map +1 -0
  33. package/dist/qr-http-server-DDmFS7fX.js +1506 -0
  34. package/dist/qr-http-server-DDmFS7fX.js.map +1 -0
  35. package/dist/{relay-factory-DVI7TrX4.js → relay-factory-DnHMDxMA.js} +25 -5
  36. package/dist/relay-factory-DnHMDxMA.js.map +1 -0
  37. package/dist/{relay-secret-store-DNPJKHNs.js → relay-secret-store-DKxs7zwq.js} +1 -1
  38. package/dist/{relay-secret-store-DNPJKHNs.js.map → relay-secret-store-DKxs7zwq.js.map} +1 -1
  39. package/dist/{relay-secret-store-CmDDfZMh.js → relay-secret-store-DhzAnnj-.js} +3 -3
  40. package/dist/{relay-secret-store-CmDDfZMh.js.map → relay-secret-store-DhzAnnj-.js.map} +1 -1
  41. package/dist/{relay-url-store-CnL2zwbH.js → relay-url-store-CwKT7i04.js} +2 -2
  42. package/dist/{relay-url-store-CnL2zwbH.js.map → relay-url-store-CwKT7i04.js.map} +1 -1
  43. package/dist/{relay-url-store-Dv5HSzwb.js → relay-url-store-xmUuTjXA.js} +2 -2
  44. package/dist/{relay-url-store-Dv5HSzwb.js.map → relay-url-store-xmUuTjXA.js.map} +1 -1
  45. package/dist/{relay-worker-BBu1oEqC.d.ts → relay-worker-7biDlEjo.d.ts} +5 -5
  46. package/dist/{relay-worker-BBu1oEqC.d.ts.map → relay-worker-7biDlEjo.d.ts.map} +1 -1
  47. package/dist/{runtime-Bm_sT1C9.d.ts → runtime-ozyPnRbU.d.ts} +1 -1
  48. package/dist/{runtime-Bm_sT1C9.d.ts.map → runtime-ozyPnRbU.d.ts.map} +1 -1
  49. package/dist/test-runner/bin.d.ts +2 -0
  50. package/dist/{cli-RhzASQef.js → test-runner/bin.js} +50 -7
  51. package/dist/test-runner/bin.js.map +1 -0
  52. package/dist/test-runner/bundle.d.ts +1 -1
  53. package/dist/test-runner/capture.d.ts +1 -1
  54. package/dist/test-runner/config.d.ts +1 -1
  55. package/dist/test-runner/config.d.ts.map +1 -1
  56. package/dist/test-runner/config.js +1 -1
  57. package/dist/test-runner/pool.d.ts +1 -1
  58. package/dist/test-runner/relay-factory.d.ts.map +1 -1
  59. package/dist/test-runner/relay-factory.js +24 -4
  60. package/dist/test-runner/relay-factory.js.map +1 -1
  61. package/dist/test-runner/relay-worker.d.ts +1 -1
  62. package/dist/test-runner/report.d.ts +3 -3
  63. package/dist/test-runner/rpc.d.ts +2 -2
  64. package/dist/test-runner/runtime.d.ts +1 -1
  65. package/dist/test-runner/task-graph.d.ts +1 -1
  66. package/dist/totp-D1pulXLa.js +3 -0
  67. package/dist/{totp-0bvlo9Yb.js → totp-WY6l0ysP.js} +1 -1
  68. package/dist/{totp-0bvlo9Yb.js.map → totp-WY6l0ysP.js.map} +1 -1
  69. package/package.json +2 -2
  70. package/dist/attach-orchestrator-BTsEHXfq.js +0 -3
  71. package/dist/attach-orchestrator-DPMBN06p.js +0 -2797
  72. package/dist/attach-orchestrator-DPMBN06p.js.map +0 -1
  73. package/dist/cell-Bca_k5ne.js +0 -3
  74. package/dist/cell-Cj-u6JTG.js +0 -85
  75. package/dist/cell-nrWFeqvG.js.map +0 -1
  76. package/dist/cli-RhzASQef.js.map +0 -1
  77. package/dist/debug-server-BhHVy3XT.js.map +0 -1
  78. package/dist/debug-server-Buc8yoa7.js.map +0 -1
  79. package/dist/debug-server-m9lIC9YW.js +0 -5758
  80. package/dist/debug-server-m9lIC9YW.js.map +0 -1
  81. package/dist/relay-factory-DVI7TrX4.js.map +0 -1
  82. package/dist/relay-secret-store-BlFEhqwb.js +0 -3
  83. package/dist/test-runner/cli.d.ts +0 -547
  84. package/dist/test-runner/cli.d.ts.map +0 -1
  85. package/dist/test-runner/cli.js +0 -3
  86. package/dist/totp-zGIlDsZS.js +0 -3
@@ -93,4 +93,4 @@ interface BundleResult {
93
93
  declare function bundleTestFile(absPath: string, opts?: BundleOptions): Promise<BundleResult>;
94
94
  //#endregion
95
95
  export { BundleResult as n, bundleTestFile as r, BundleOptions as t };
96
- //# sourceMappingURL=bundle-CA1TCXED.d.ts.map
96
+ //# sourceMappingURL=bundle-Cb3GFuw6.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bundle-CA1TCXED.d.ts","names":[],"sources":["../src/test-runner/bundle.ts"],"mappings":";;AAqEA;;;;;AAmBA;;;;;AAqVA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAxWiB,aAAA;;;;;;;EAOf,cAAA;;;;;EAKA,UAAA;AAAA;;;;;UAOe,YAAA;EACf,IAAA;EACA,QAAA;AAAA;;;;;;;;;;;;;;;iBAmVoB,cAAA,CAAe,OAAA,UAAiB,IAAA,GAAO,aAAA,GAAgB,OAAA,CAAQ,YAAA"}
1
+ {"version":3,"file":"bundle-Cb3GFuw6.d.ts","names":[],"sources":["../src/test-runner/bundle.ts"],"mappings":";;AAqEA;;;;;AAmBA;;;;;AAqVA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAxWiB,aAAA;;;;;;;EAOf,cAAA;;;;;EAKA,UAAA;AAAA;;;;;UAOe,YAAA;EACf,IAAA;EACA,QAAA;AAAA;;;;;;;;;;;;;;;iBAmVoB,cAAA,CAAe,OAAA,UAAiB,IAAA,GAAO,aAAA,GAAgB,OAAA,CAAQ,YAAA"}
@@ -55,4 +55,4 @@ declare function parseCaptureLines(raw: ReadonlyArray<{
55
55
  }>): AitCaptureLine[];
56
56
  //#endregion
57
57
  export { parseCaptureLines as n, AitCaptureLine as t };
58
- //# sourceMappingURL=capture-BmK_cBqQ.d.ts.map
58
+ //# sourceMappingURL=capture-B1zfGyTo.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"capture-BmK_cBqQ.d.ts","names":[],"sources":["../src/test-runner/capture.ts"],"mappings":";;AA+BA;;;;;AAyBA;;;;;;;;;;;;;;;;;;;;;;;;UAzBiB,cAAA;;EAEf,QAAA;;EAEA,IAAA;AAAA;;;;;;;;;;;;;;;;iBAqBc,iBAAA,CAAkB,GAAA,EAAK,aAAA;EAAgB,IAAA;AAAA,KAAkB,cAAA"}
1
+ {"version":3,"file":"capture-B1zfGyTo.d.ts","names":[],"sources":["../src/test-runner/capture.ts"],"mappings":";;AA+BA;;;;;AAyBA;;;;;;;;;;;;;;;;;;;;;;;;UAzBiB,cAAA;;EAEf,QAAA;;EAEA,IAAA;AAAA;;;;;;;;;;;;;;;;iBAqBc,iBAAA,CAAkB,GAAA,EAAK,aAAA;EAAgB,IAAA;AAAA,KAAkB,cAAA"}
@@ -274,4 +274,4 @@ interface CdpConnection {
274
274
  }
275
275
  //#endregion
276
276
  export { CdpConnection as t };
277
- //# sourceMappingURL=cdp-connection-DB2zgthr.d.ts.map
277
+ //# sourceMappingURL=cdp-connection-Dxw_EY8s.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cdp-connection-DB2zgthr.d.ts","names":[],"sources":["../src/mcp/cdp-connection.ts"],"mappings":";;AAwBA;;;;;;;;;AAUA;;;;;;;;;;;AASA;;UAnBiB,SAAA;E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EAAS,WAAA,CAAY,CAAA;EA8C1D;;;;;EAvCX,IAAA,WAAe,cAAA,EACb,MAAA,EAAQ,CAAA,EACR,MAAA,GAAS,aAAA,CAAc,CAAA,cACtB,OAAA,CAAQ,aAAA,CAAc,CAAA;EAnBR;;;;;;EA2BjB,KAAA;EArB0C;;;;;;;;;EAgC1C,cAAA,KAAmB,OAAA,CAAQ,SAAA;EA7B0C;;;;;;;;;;;EA0CrE,kBAAA,EACE,QAAA,GAAW,OAAA,EAAS,SAAA,gBACpB,SAAA,WACA,cAAA,YACC,OAAA,CAAQ,SAAA;AAAA"}
@@ -1,4 +1,4 @@
1
- import { buildIndicatorExpression } from "./attach-orchestrator-DEJfLm7V.js";
1
+ import { buildIndicatorExpression } from "./attach-orchestrator-RhOdO3DS.js";
2
2
  //#region src/test-runner/cell.ts
3
3
  /**
4
4
  * Cell injection utility for the `devtools-test` CLI (issue #684 §4.1).
@@ -53,7 +53,7 @@ async function injectGlobals(conn, globals) {
53
53
  * its caller. Injection failure (e.g. page detached during inject, CSS not
54
54
  * supported) is swallowed and logged as `console.debug` — the badge is
55
55
  * informational UI and must never block attach success or test execution.
56
- * This is the same fire-and-forget spirit as the eruda mount in
56
+ * This is the same fire-and-forget spirit as the in-page console mount in
57
57
  * `src/in-app/attach.ts`.
58
58
  *
59
59
  * Call this ONLY on the manual debug paths (start_attach MCP, devtools-test
@@ -81,4 +81,4 @@ async function injectDebugIndicator(conn, opts) {
81
81
  //#endregion
82
82
  export { injectDebugIndicator, injectGlobals };
83
83
 
84
- //# sourceMappingURL=cell-Cv3e_qwn.js.map
84
+ //# sourceMappingURL=cell-Ba9lCI3B.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cell-BPWZUm_X.js","names":[],"sources":["../src/test-runner/cell.ts"],"sourcesContent":["/**\n * Cell injection utility for the `devtools-test` CLI (issue #684 §4.1).\n *\n * Injects arbitrary globals into the page via `Runtime.evaluate` BEFORE the\n * first test bundle is injected. The injected values are session-global — one\n * call covers all files in the run.\n *\n * The primary use-case is injecting `__AIT_CELL__` (sdkLine/platform) so\n * sdk-example's `aitCapture.ts` picks up the correct test-axis values instead\n * of falling back to `'2.x'`/`'mock'`.\n *\n * devtools does NOT know the shape of `__AIT_CELL__` — it only provides the\n * general injection mechanism. The caller (CLI or MCP auto-attach path) is\n * responsible for constructing the cell object.\n *\n * SECRET-HANDLING: cell values (sdkLine/platform) are not secrets and may be\n * logged at the caller's discretion. This module does NOT log them itself.\n *\n * Node-only. react-free. CdpConnection only.\n */\n\nimport { buildIndicatorExpression } from '../mcp/attach-orchestrator.js';\nimport type { CdpConnection } from '../mcp/cdp-connection.js';\n\n/**\n * Injects each key of `globals` into `globalThis` in the page via a single\n * `Runtime.evaluate` call. Must be called BEFORE the first `bundleTestFile`\n * inject — the cell is session-global and applies to all subsequent files.\n *\n * Throws if the CDP evaluate returns an exception.\n *\n * @param conn - The live CDP connection (relay-attached page).\n * @param globals - Plain-JSON-serialisable key→value map to assign onto `globalThis`.\n */\nexport async function injectGlobals(\n conn: CdpConnection,\n globals: Record<string, unknown>,\n): Promise<void> {\n // JSON.stringify is safe here: globals values are plain data (sdkLine/platform\n // strings or simple objects). If a value is not JSON-serialisable this throws\n // at call time, which surfaces the error early and clearly.\n const expr = `(() => { Object.assign(globalThis, ${JSON.stringify(globals)}); return true; })()`;\n const result = await conn.send('Runtime.evaluate', { expression: expr, returnByValue: true });\n if (result.exceptionDetails) {\n const msg =\n result.exceptionDetails.exception?.description ??\n result.exceptionDetails.text ??\n 'unknown error';\n throw new Error(`injectGlobals: Runtime.evaluate threw: ${msg}`);\n }\n}\n\n/**\n * Injects the \"Debugger Connected\" on-phone indicator via `Runtime.evaluate`.\n *\n * Uses the same CDP mechanism as {@link injectGlobals} — a single\n * `Runtime.evaluate` round-trip with the expression built by\n * {@link buildIndicatorExpression}. The indicator is a dismissible red badge\n * rendered at the bottom-left of the page (position:fixed, safe-area-aware).\n *\n * **Isolation**: unlike {@link injectGlobals}, this function NEVER throws to\n * its caller. Injection failure (e.g. page detached during inject, CSS not\n * supported) is swallowed and logged as `console.debug` — the badge is\n * informational UI and must never block attach success or test execution.\n * This is the same fire-and-forget spirit as the eruda mount in\n * `src/in-app/attach.ts`.\n *\n * Call this ONLY on the manual debug paths (start_attach MCP, devtools-test\n * CLI). Do NOT call on the `run_tests` auto-attach path — the red badge\n * would contaminate screenshots, measure_safe_area probes, and DOM snapshots\n * taken during automated measurement runs.\n *\n * SECRET-HANDLING: the injected expression contains no secrets, relay URLs,\n * wss addresses, or TOTP codes — it is pure DOM UI text built by\n * {@link buildIndicatorExpression}.\n *\n * @param conn - The live CDP connection (relay-attached page).\n * @param opts - Optional overrides forwarded to {@link buildIndicatorExpression}.\n */\nexport async function injectDebugIndicator(\n conn: CdpConnection,\n opts?: { label?: string },\n): Promise<void> {\n try {\n await conn.send('Runtime.evaluate', {\n expression: buildIndicatorExpression(opts),\n returnByValue: true,\n });\n } catch (err) {\n // Badge injection is informational UI — swallow and log; never propagate.\n console.debug('[@ait-co/devtools] debug indicator inject skipped:', err);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,eAAsB,cACpB,MACA,SACe;CAIf,MAAM,OAAO,sCAAsC,KAAK,UAAU,QAAQ,CAAC;CAC3E,MAAM,SAAS,MAAM,KAAK,KAAK,oBAAoB;EAAE,YAAY;EAAM,eAAe;EAAM,CAAC;AAC7F,KAAI,OAAO,kBAAkB;EAC3B,MAAM,MACJ,OAAO,iBAAiB,WAAW,eACnC,OAAO,iBAAiB,QACxB;AACF,QAAM,IAAI,MAAM,0CAA0C,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BpE,eAAsB,qBACpB,MACA,MACe;AACf,KAAI;AACF,QAAM,KAAK,KAAK,oBAAoB;GAClC,YAAY,yBAAyB,KAAK;GAC1C,eAAe;GAChB,CAAC;UACK,KAAK;AAEZ,UAAQ,MAAM,sDAAsD,IAAI"}
1
+ {"version":3,"file":"cell-Ba9lCI3B.js","names":[],"sources":["../src/test-runner/cell.ts"],"sourcesContent":["/**\n * Cell injection utility for the `devtools-test` CLI (issue #684 §4.1).\n *\n * Injects arbitrary globals into the page via `Runtime.evaluate` BEFORE the\n * first test bundle is injected. The injected values are session-global — one\n * call covers all files in the run.\n *\n * The primary use-case is injecting `__AIT_CELL__` (sdkLine/platform) so\n * sdk-example's `aitCapture.ts` picks up the correct test-axis values instead\n * of falling back to `'2.x'`/`'mock'`.\n *\n * devtools does NOT know the shape of `__AIT_CELL__` — it only provides the\n * general injection mechanism. The caller (CLI or MCP auto-attach path) is\n * responsible for constructing the cell object.\n *\n * SECRET-HANDLING: cell values (sdkLine/platform) are not secrets and may be\n * logged at the caller's discretion. This module does NOT log them itself.\n *\n * Node-only. react-free. CdpConnection only.\n */\n\nimport { buildIndicatorExpression } from '../mcp/attach-orchestrator.js';\nimport type { CdpConnection } from '../mcp/cdp-connection.js';\n\n/**\n * Injects each key of `globals` into `globalThis` in the page via a single\n * `Runtime.evaluate` call. Must be called BEFORE the first `bundleTestFile`\n * inject — the cell is session-global and applies to all subsequent files.\n *\n * Throws if the CDP evaluate returns an exception.\n *\n * @param conn - The live CDP connection (relay-attached page).\n * @param globals - Plain-JSON-serialisable key→value map to assign onto `globalThis`.\n */\nexport async function injectGlobals(\n conn: CdpConnection,\n globals: Record<string, unknown>,\n): Promise<void> {\n // JSON.stringify is safe here: globals values are plain data (sdkLine/platform\n // strings or simple objects). If a value is not JSON-serialisable this throws\n // at call time, which surfaces the error early and clearly.\n const expr = `(() => { Object.assign(globalThis, ${JSON.stringify(globals)}); return true; })()`;\n const result = await conn.send('Runtime.evaluate', { expression: expr, returnByValue: true });\n if (result.exceptionDetails) {\n const msg =\n result.exceptionDetails.exception?.description ??\n result.exceptionDetails.text ??\n 'unknown error';\n throw new Error(`injectGlobals: Runtime.evaluate threw: ${msg}`);\n }\n}\n\n/**\n * Injects the \"Debugger Connected\" on-phone indicator via `Runtime.evaluate`.\n *\n * Uses the same CDP mechanism as {@link injectGlobals} — a single\n * `Runtime.evaluate` round-trip with the expression built by\n * {@link buildIndicatorExpression}. The indicator is a dismissible red badge\n * rendered at the bottom-left of the page (position:fixed, safe-area-aware).\n *\n * **Isolation**: unlike {@link injectGlobals}, this function NEVER throws to\n * its caller. Injection failure (e.g. page detached during inject, CSS not\n * supported) is swallowed and logged as `console.debug` — the badge is\n * informational UI and must never block attach success or test execution.\n * This is the same fire-and-forget spirit as the in-page console mount in\n * `src/in-app/attach.ts`.\n *\n * Call this ONLY on the manual debug paths (start_attach MCP, devtools-test\n * CLI). Do NOT call on the `run_tests` auto-attach path — the red badge\n * would contaminate screenshots, measure_safe_area probes, and DOM snapshots\n * taken during automated measurement runs.\n *\n * SECRET-HANDLING: the injected expression contains no secrets, relay URLs,\n * wss addresses, or TOTP codes — it is pure DOM UI text built by\n * {@link buildIndicatorExpression}.\n *\n * @param conn - The live CDP connection (relay-attached page).\n * @param opts - Optional overrides forwarded to {@link buildIndicatorExpression}.\n */\nexport async function injectDebugIndicator(\n conn: CdpConnection,\n opts?: { label?: string },\n): Promise<void> {\n try {\n await conn.send('Runtime.evaluate', {\n expression: buildIndicatorExpression(opts),\n returnByValue: true,\n });\n } catch (err) {\n // Badge injection is informational UI — swallow and log; never propagate.\n console.debug('[@ait-co/devtools] debug indicator inject skipped:', err);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,eAAsB,cACpB,MACA,SACe;CAIf,MAAM,OAAO,sCAAsC,KAAK,UAAU,QAAQ,CAAC;CAC3E,MAAM,SAAS,MAAM,KAAK,KAAK,oBAAoB;EAAE,YAAY;EAAM,eAAe;EAAM,CAAC;AAC7F,KAAI,OAAO,kBAAkB;EAC3B,MAAM,MACJ,OAAO,iBAAiB,WAAW,eACnC,OAAO,iBAAiB,QACxB;AACF,QAAM,IAAI,MAAM,0CAA0C,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BpE,eAAsB,qBACpB,MACA,MACe;AACf,KAAI;AACF,QAAM,KAAK,KAAK,oBAAoB;GAClC,YAAY,yBAAyB,KAAK;GAC1C,eAAe;GAChB,CAAC;UACK,KAAK;AAEZ,UAAQ,MAAM,sDAAsD,IAAI"}
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { buildIndicatorExpression } from "./attach-orchestrator-qFEMBUwb.js";
2
+ import { buildIndicatorExpression } from "./attach-orchestrator-CpE0dMew.js";
3
3
  //#region src/test-runner/cell.ts
4
4
  /**
5
5
  * Cell injection utility for the `devtools-test` CLI (issue #684 §4.1).
@@ -54,7 +54,7 @@ async function injectGlobals(conn, globals) {
54
54
  * its caller. Injection failure (e.g. page detached during inject, CSS not
55
55
  * supported) is swallowed and logged as `console.debug` — the badge is
56
56
  * informational UI and must never block attach success or test execution.
57
- * This is the same fire-and-forget spirit as the eruda mount in
57
+ * This is the same fire-and-forget spirit as the in-page console mount in
58
58
  * `src/in-app/attach.ts`.
59
59
  *
60
60
  * Call this ONLY on the manual debug paths (start_attach MCP, devtools-test
@@ -82,4 +82,4 @@ async function injectDebugIndicator(conn, opts) {
82
82
  //#endregion
83
83
  export { injectDebugIndicator, injectGlobals };
84
84
 
85
- //# sourceMappingURL=cell-BPWZUm_X.js.map
85
+ //# sourceMappingURL=cell-CX92lDI0.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cell-Cv3e_qwn.js","names":[],"sources":["../src/test-runner/cell.ts"],"sourcesContent":["/**\n * Cell injection utility for the `devtools-test` CLI (issue #684 §4.1).\n *\n * Injects arbitrary globals into the page via `Runtime.evaluate` BEFORE the\n * first test bundle is injected. The injected values are session-global — one\n * call covers all files in the run.\n *\n * The primary use-case is injecting `__AIT_CELL__` (sdkLine/platform) so\n * sdk-example's `aitCapture.ts` picks up the correct test-axis values instead\n * of falling back to `'2.x'`/`'mock'`.\n *\n * devtools does NOT know the shape of `__AIT_CELL__` — it only provides the\n * general injection mechanism. The caller (CLI or MCP auto-attach path) is\n * responsible for constructing the cell object.\n *\n * SECRET-HANDLING: cell values (sdkLine/platform) are not secrets and may be\n * logged at the caller's discretion. This module does NOT log them itself.\n *\n * Node-only. react-free. CdpConnection only.\n */\n\nimport { buildIndicatorExpression } from '../mcp/attach-orchestrator.js';\nimport type { CdpConnection } from '../mcp/cdp-connection.js';\n\n/**\n * Injects each key of `globals` into `globalThis` in the page via a single\n * `Runtime.evaluate` call. Must be called BEFORE the first `bundleTestFile`\n * inject — the cell is session-global and applies to all subsequent files.\n *\n * Throws if the CDP evaluate returns an exception.\n *\n * @param conn - The live CDP connection (relay-attached page).\n * @param globals - Plain-JSON-serialisable key→value map to assign onto `globalThis`.\n */\nexport async function injectGlobals(\n conn: CdpConnection,\n globals: Record<string, unknown>,\n): Promise<void> {\n // JSON.stringify is safe here: globals values are plain data (sdkLine/platform\n // strings or simple objects). If a value is not JSON-serialisable this throws\n // at call time, which surfaces the error early and clearly.\n const expr = `(() => { Object.assign(globalThis, ${JSON.stringify(globals)}); return true; })()`;\n const result = await conn.send('Runtime.evaluate', { expression: expr, returnByValue: true });\n if (result.exceptionDetails) {\n const msg =\n result.exceptionDetails.exception?.description ??\n result.exceptionDetails.text ??\n 'unknown error';\n throw new Error(`injectGlobals: Runtime.evaluate threw: ${msg}`);\n }\n}\n\n/**\n * Injects the \"Debugger Connected\" on-phone indicator via `Runtime.evaluate`.\n *\n * Uses the same CDP mechanism as {@link injectGlobals} — a single\n * `Runtime.evaluate` round-trip with the expression built by\n * {@link buildIndicatorExpression}. The indicator is a dismissible red badge\n * rendered at the bottom-left of the page (position:fixed, safe-area-aware).\n *\n * **Isolation**: unlike {@link injectGlobals}, this function NEVER throws to\n * its caller. Injection failure (e.g. page detached during inject, CSS not\n * supported) is swallowed and logged as `console.debug` — the badge is\n * informational UI and must never block attach success or test execution.\n * This is the same fire-and-forget spirit as the eruda mount in\n * `src/in-app/attach.ts`.\n *\n * Call this ONLY on the manual debug paths (start_attach MCP, devtools-test\n * CLI). Do NOT call on the `run_tests` auto-attach path — the red badge\n * would contaminate screenshots, measure_safe_area probes, and DOM snapshots\n * taken during automated measurement runs.\n *\n * SECRET-HANDLING: the injected expression contains no secrets, relay URLs,\n * wss addresses, or TOTP codes — it is pure DOM UI text built by\n * {@link buildIndicatorExpression}.\n *\n * @param conn - The live CDP connection (relay-attached page).\n * @param opts - Optional overrides forwarded to {@link buildIndicatorExpression}.\n */\nexport async function injectDebugIndicator(\n conn: CdpConnection,\n opts?: { label?: string },\n): Promise<void> {\n try {\n await conn.send('Runtime.evaluate', {\n expression: buildIndicatorExpression(opts),\n returnByValue: true,\n });\n } catch (err) {\n // Badge injection is informational UI — swallow and log; never propagate.\n console.debug('[@ait-co/devtools] debug indicator inject skipped:', err);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,eAAsB,cACpB,MACA,SACe;CAIf,MAAM,OAAO,sCAAsC,KAAK,UAAU,QAAQ,CAAC;CAC3E,MAAM,SAAS,MAAM,KAAK,KAAK,oBAAoB;EAAE,YAAY;EAAM,eAAe;EAAM,CAAC;AAC7F,KAAI,OAAO,kBAAkB;EAC3B,MAAM,MACJ,OAAO,iBAAiB,WAAW,eACnC,OAAO,iBAAiB,QACxB;AACF,QAAM,IAAI,MAAM,0CAA0C,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BpE,eAAsB,qBACpB,MACA,MACe;AACf,KAAI;AACF,QAAM,KAAK,KAAK,oBAAoB;GAClC,YAAY,yBAAyB,KAAK;GAC1C,eAAe;GAChB,CAAC;UACK,KAAK;AAEZ,UAAQ,MAAM,sDAAsD,IAAI"}
1
+ {"version":3,"file":"cell-CX92lDI0.js","names":[],"sources":["../src/test-runner/cell.ts"],"sourcesContent":["/**\n * Cell injection utility for the `devtools-test` CLI (issue #684 §4.1).\n *\n * Injects arbitrary globals into the page via `Runtime.evaluate` BEFORE the\n * first test bundle is injected. The injected values are session-global — one\n * call covers all files in the run.\n *\n * The primary use-case is injecting `__AIT_CELL__` (sdkLine/platform) so\n * sdk-example's `aitCapture.ts` picks up the correct test-axis values instead\n * of falling back to `'2.x'`/`'mock'`.\n *\n * devtools does NOT know the shape of `__AIT_CELL__` — it only provides the\n * general injection mechanism. The caller (CLI or MCP auto-attach path) is\n * responsible for constructing the cell object.\n *\n * SECRET-HANDLING: cell values (sdkLine/platform) are not secrets and may be\n * logged at the caller's discretion. This module does NOT log them itself.\n *\n * Node-only. react-free. CdpConnection only.\n */\n\nimport { buildIndicatorExpression } from '../mcp/attach-orchestrator.js';\nimport type { CdpConnection } from '../mcp/cdp-connection.js';\n\n/**\n * Injects each key of `globals` into `globalThis` in the page via a single\n * `Runtime.evaluate` call. Must be called BEFORE the first `bundleTestFile`\n * inject — the cell is session-global and applies to all subsequent files.\n *\n * Throws if the CDP evaluate returns an exception.\n *\n * @param conn - The live CDP connection (relay-attached page).\n * @param globals - Plain-JSON-serialisable key→value map to assign onto `globalThis`.\n */\nexport async function injectGlobals(\n conn: CdpConnection,\n globals: Record<string, unknown>,\n): Promise<void> {\n // JSON.stringify is safe here: globals values are plain data (sdkLine/platform\n // strings or simple objects). If a value is not JSON-serialisable this throws\n // at call time, which surfaces the error early and clearly.\n const expr = `(() => { Object.assign(globalThis, ${JSON.stringify(globals)}); return true; })()`;\n const result = await conn.send('Runtime.evaluate', { expression: expr, returnByValue: true });\n if (result.exceptionDetails) {\n const msg =\n result.exceptionDetails.exception?.description ??\n result.exceptionDetails.text ??\n 'unknown error';\n throw new Error(`injectGlobals: Runtime.evaluate threw: ${msg}`);\n }\n}\n\n/**\n * Injects the \"Debugger Connected\" on-phone indicator via `Runtime.evaluate`.\n *\n * Uses the same CDP mechanism as {@link injectGlobals} — a single\n * `Runtime.evaluate` round-trip with the expression built by\n * {@link buildIndicatorExpression}. The indicator is a dismissible red badge\n * rendered at the bottom-left of the page (position:fixed, safe-area-aware).\n *\n * **Isolation**: unlike {@link injectGlobals}, this function NEVER throws to\n * its caller. Injection failure (e.g. page detached during inject, CSS not\n * supported) is swallowed and logged as `console.debug` — the badge is\n * informational UI and must never block attach success or test execution.\n * This is the same fire-and-forget spirit as the in-page console mount in\n * `src/in-app/attach.ts`.\n *\n * Call this ONLY on the manual debug paths (start_attach MCP, devtools-test\n * CLI). Do NOT call on the `run_tests` auto-attach path — the red badge\n * would contaminate screenshots, measure_safe_area probes, and DOM snapshots\n * taken during automated measurement runs.\n *\n * SECRET-HANDLING: the injected expression contains no secrets, relay URLs,\n * wss addresses, or TOTP codes — it is pure DOM UI text built by\n * {@link buildIndicatorExpression}.\n *\n * @param conn - The live CDP connection (relay-attached page).\n * @param opts - Optional overrides forwarded to {@link buildIndicatorExpression}.\n */\nexport async function injectDebugIndicator(\n conn: CdpConnection,\n opts?: { label?: string },\n): Promise<void> {\n try {\n await conn.send('Runtime.evaluate', {\n expression: buildIndicatorExpression(opts),\n returnByValue: true,\n });\n } catch (err) {\n // Badge injection is informational UI — swallow and log; never propagate.\n console.debug('[@ait-co/devtools] debug indicator inject skipped:', err);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,eAAsB,cACpB,MACA,SACe;CAIf,MAAM,OAAO,sCAAsC,KAAK,UAAU,QAAQ,CAAC;CAC3E,MAAM,SAAS,MAAM,KAAK,KAAK,oBAAoB;EAAE,YAAY;EAAM,eAAe;EAAM,CAAC;AAC7F,KAAI,OAAO,kBAAkB;EAC3B,MAAM,MACJ,OAAO,iBAAiB,WAAW,eACnC,OAAO,iBAAiB,QACxB;AACF,QAAM,IAAI,MAAM,0CAA0C,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BpE,eAAsB,qBACpB,MACA,MACe;AACf,KAAI;AACF,QAAM,KAAK,KAAK,oBAAoB;GAClC,YAAY,yBAAyB,KAAK;GAC1C,eAAe;GAChB,CAAC;UACK,KAAK;AAEZ,UAAQ,MAAM,sDAAsD,IAAI"}
@@ -1,4 +1,4 @@
1
- import { buildIndicatorExpression } from "./attach-orchestrator-CFotueL3.js";
1
+ import { buildIndicatorExpression } from "./attach-orchestrator-CPMQWkGV.js";
2
2
  //#region src/test-runner/cell.ts
3
3
  /**
4
4
  * Cell injection utility for the `devtools-test` CLI (issue #684 §4.1).
@@ -53,7 +53,7 @@ async function injectGlobals(conn, globals) {
53
53
  * its caller. Injection failure (e.g. page detached during inject, CSS not
54
54
  * supported) is swallowed and logged as `console.debug` — the badge is
55
55
  * informational UI and must never block attach success or test execution.
56
- * This is the same fire-and-forget spirit as the eruda mount in
56
+ * This is the same fire-and-forget spirit as the in-page console mount in
57
57
  * `src/in-app/attach.ts`.
58
58
  *
59
59
  * Call this ONLY on the manual debug paths (start_attach MCP, devtools-test
@@ -81,4 +81,4 @@ async function injectDebugIndicator(conn, opts) {
81
81
  //#endregion
82
82
  export { injectDebugIndicator, injectGlobals };
83
83
 
84
- //# sourceMappingURL=cell-nrWFeqvG.js.map
84
+ //# sourceMappingURL=cell-D0dJSGHi.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cell-Cj-u6JTG.js","names":[],"sources":["../src/test-runner/cell.ts"],"sourcesContent":["/**\n * Cell injection utility for the `devtools-test` CLI (issue #684 §4.1).\n *\n * Injects arbitrary globals into the page via `Runtime.evaluate` BEFORE the\n * first test bundle is injected. The injected values are session-global — one\n * call covers all files in the run.\n *\n * The primary use-case is injecting `__AIT_CELL__` (sdkLine/platform) so\n * sdk-example's `aitCapture.ts` picks up the correct test-axis values instead\n * of falling back to `'2.x'`/`'mock'`.\n *\n * devtools does NOT know the shape of `__AIT_CELL__` — it only provides the\n * general injection mechanism. The caller (CLI or MCP auto-attach path) is\n * responsible for constructing the cell object.\n *\n * SECRET-HANDLING: cell values (sdkLine/platform) are not secrets and may be\n * logged at the caller's discretion. This module does NOT log them itself.\n *\n * Node-only. react-free. CdpConnection only.\n */\n\nimport { buildIndicatorExpression } from '../mcp/attach-orchestrator.js';\nimport type { CdpConnection } from '../mcp/cdp-connection.js';\n\n/**\n * Injects each key of `globals` into `globalThis` in the page via a single\n * `Runtime.evaluate` call. Must be called BEFORE the first `bundleTestFile`\n * inject — the cell is session-global and applies to all subsequent files.\n *\n * Throws if the CDP evaluate returns an exception.\n *\n * @param conn - The live CDP connection (relay-attached page).\n * @param globals - Plain-JSON-serialisable key→value map to assign onto `globalThis`.\n */\nexport async function injectGlobals(\n conn: CdpConnection,\n globals: Record<string, unknown>,\n): Promise<void> {\n // JSON.stringify is safe here: globals values are plain data (sdkLine/platform\n // strings or simple objects). If a value is not JSON-serialisable this throws\n // at call time, which surfaces the error early and clearly.\n const expr = `(() => { Object.assign(globalThis, ${JSON.stringify(globals)}); return true; })()`;\n const result = await conn.send('Runtime.evaluate', { expression: expr, returnByValue: true });\n if (result.exceptionDetails) {\n const msg =\n result.exceptionDetails.exception?.description ??\n result.exceptionDetails.text ??\n 'unknown error';\n throw new Error(`injectGlobals: Runtime.evaluate threw: ${msg}`);\n }\n}\n\n/**\n * Injects the \"Debugger Connected\" on-phone indicator via `Runtime.evaluate`.\n *\n * Uses the same CDP mechanism as {@link injectGlobals} — a single\n * `Runtime.evaluate` round-trip with the expression built by\n * {@link buildIndicatorExpression}. The indicator is a dismissible red badge\n * rendered at the bottom-left of the page (position:fixed, safe-area-aware).\n *\n * **Isolation**: unlike {@link injectGlobals}, this function NEVER throws to\n * its caller. Injection failure (e.g. page detached during inject, CSS not\n * supported) is swallowed and logged as `console.debug` — the badge is\n * informational UI and must never block attach success or test execution.\n * This is the same fire-and-forget spirit as the eruda mount in\n * `src/in-app/attach.ts`.\n *\n * Call this ONLY on the manual debug paths (start_attach MCP, devtools-test\n * CLI). Do NOT call on the `run_tests` auto-attach path — the red badge\n * would contaminate screenshots, measure_safe_area probes, and DOM snapshots\n * taken during automated measurement runs.\n *\n * SECRET-HANDLING: the injected expression contains no secrets, relay URLs,\n * wss addresses, or TOTP codes — it is pure DOM UI text built by\n * {@link buildIndicatorExpression}.\n *\n * @param conn - The live CDP connection (relay-attached page).\n * @param opts - Optional overrides forwarded to {@link buildIndicatorExpression}.\n */\nexport async function injectDebugIndicator(\n conn: CdpConnection,\n opts?: { label?: string },\n): Promise<void> {\n try {\n await conn.send('Runtime.evaluate', {\n expression: buildIndicatorExpression(opts),\n returnByValue: true,\n });\n } catch (err) {\n // Badge injection is informational UI — swallow and log; never propagate.\n console.debug('[@ait-co/devtools] debug indicator inject skipped:', err);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,eAAsB,cACpB,MACA,SACe;CAIf,MAAM,OAAO,sCAAsC,KAAK,UAAU,QAAQ,CAAC;CAC3E,MAAM,SAAS,MAAM,KAAK,KAAK,oBAAoB;EAAE,YAAY;EAAM,eAAe;EAAM,CAAC;AAC7F,KAAI,OAAO,kBAAkB;EAC3B,MAAM,MACJ,OAAO,iBAAiB,WAAW,eACnC,OAAO,iBAAiB,QACxB;AACF,QAAM,IAAI,MAAM,0CAA0C,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BpE,eAAsB,qBACpB,MACA,MACe;AACf,KAAI;AACF,QAAM,KAAK,KAAK,oBAAoB;GAClC,YAAY,yBAAyB,KAAK;GAC1C,eAAe;GAChB,CAAC;UACK,KAAK;AAEZ,UAAQ,MAAM,sDAAsD,IAAI"}
1
+ {"version":3,"file":"cell-D0dJSGHi.js","names":[],"sources":["../src/test-runner/cell.ts"],"sourcesContent":["/**\n * Cell injection utility for the `devtools-test` CLI (issue #684 §4.1).\n *\n * Injects arbitrary globals into the page via `Runtime.evaluate` BEFORE the\n * first test bundle is injected. The injected values are session-global — one\n * call covers all files in the run.\n *\n * The primary use-case is injecting `__AIT_CELL__` (sdkLine/platform) so\n * sdk-example's `aitCapture.ts` picks up the correct test-axis values instead\n * of falling back to `'2.x'`/`'mock'`.\n *\n * devtools does NOT know the shape of `__AIT_CELL__` — it only provides the\n * general injection mechanism. The caller (CLI or MCP auto-attach path) is\n * responsible for constructing the cell object.\n *\n * SECRET-HANDLING: cell values (sdkLine/platform) are not secrets and may be\n * logged at the caller's discretion. This module does NOT log them itself.\n *\n * Node-only. react-free. CdpConnection only.\n */\n\nimport { buildIndicatorExpression } from '../mcp/attach-orchestrator.js';\nimport type { CdpConnection } from '../mcp/cdp-connection.js';\n\n/**\n * Injects each key of `globals` into `globalThis` in the page via a single\n * `Runtime.evaluate` call. Must be called BEFORE the first `bundleTestFile`\n * inject — the cell is session-global and applies to all subsequent files.\n *\n * Throws if the CDP evaluate returns an exception.\n *\n * @param conn - The live CDP connection (relay-attached page).\n * @param globals - Plain-JSON-serialisable key→value map to assign onto `globalThis`.\n */\nexport async function injectGlobals(\n conn: CdpConnection,\n globals: Record<string, unknown>,\n): Promise<void> {\n // JSON.stringify is safe here: globals values are plain data (sdkLine/platform\n // strings or simple objects). If a value is not JSON-serialisable this throws\n // at call time, which surfaces the error early and clearly.\n const expr = `(() => { Object.assign(globalThis, ${JSON.stringify(globals)}); return true; })()`;\n const result = await conn.send('Runtime.evaluate', { expression: expr, returnByValue: true });\n if (result.exceptionDetails) {\n const msg =\n result.exceptionDetails.exception?.description ??\n result.exceptionDetails.text ??\n 'unknown error';\n throw new Error(`injectGlobals: Runtime.evaluate threw: ${msg}`);\n }\n}\n\n/**\n * Injects the \"Debugger Connected\" on-phone indicator via `Runtime.evaluate`.\n *\n * Uses the same CDP mechanism as {@link injectGlobals} — a single\n * `Runtime.evaluate` round-trip with the expression built by\n * {@link buildIndicatorExpression}. The indicator is a dismissible red badge\n * rendered at the bottom-left of the page (position:fixed, safe-area-aware).\n *\n * **Isolation**: unlike {@link injectGlobals}, this function NEVER throws to\n * its caller. Injection failure (e.g. page detached during inject, CSS not\n * supported) is swallowed and logged as `console.debug` — the badge is\n * informational UI and must never block attach success or test execution.\n * This is the same fire-and-forget spirit as the in-page console mount in\n * `src/in-app/attach.ts`.\n *\n * Call this ONLY on the manual debug paths (start_attach MCP, devtools-test\n * CLI). Do NOT call on the `run_tests` auto-attach path — the red badge\n * would contaminate screenshots, measure_safe_area probes, and DOM snapshots\n * taken during automated measurement runs.\n *\n * SECRET-HANDLING: the injected expression contains no secrets, relay URLs,\n * wss addresses, or TOTP codes — it is pure DOM UI text built by\n * {@link buildIndicatorExpression}.\n *\n * @param conn - The live CDP connection (relay-attached page).\n * @param opts - Optional overrides forwarded to {@link buildIndicatorExpression}.\n */\nexport async function injectDebugIndicator(\n conn: CdpConnection,\n opts?: { label?: string },\n): Promise<void> {\n try {\n await conn.send('Runtime.evaluate', {\n expression: buildIndicatorExpression(opts),\n returnByValue: true,\n });\n } catch (err) {\n // Badge injection is informational UI — swallow and log; never propagate.\n console.debug('[@ait-co/devtools] debug indicator inject skipped:', err);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,eAAsB,cACpB,MACA,SACe;CAIf,MAAM,OAAO,sCAAsC,KAAK,UAAU,QAAQ,CAAC;CAC3E,MAAM,SAAS,MAAM,KAAK,KAAK,oBAAoB;EAAE,YAAY;EAAM,eAAe;EAAM,CAAC;AAC7F,KAAI,OAAO,kBAAkB;EAC3B,MAAM,MACJ,OAAO,iBAAiB,WAAW,eACnC,OAAO,iBAAiB,QACxB;AACF,QAAM,IAAI,MAAM,0CAA0C,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BpE,eAAsB,qBACpB,MACA,MACe;AACf,KAAI;AACF,QAAM,KAAK,KAAK,oBAAoB;GAClC,YAAY,yBAAyB,KAAK;GAC1C,eAAe;GAChB,CAAC;UACK,KAAK;AAEZ,UAAQ,MAAM,sDAAsD,IAAI"}
@@ -1,65 +1,18 @@
1
1
  import { n as buildRelayVerifyAuth, r as generateTotp, t as assertRelayAuthConfigured } from "./totp-DfekTBk3.js";
2
- import { runTestFilesOverRelay } from "./test-runner/relay-worker.js";
3
- import { t as createRelayConnectionFactory } from "./relay-factory-DVI7TrX4.js";
4
- import { writeCaptureArtifacts, writeReportArtifact } from "./test-runner/report.js";
5
- import { a as startTunnelHealthProbe, i as startQuickTunnel, n as makeTunnelStatus, o as logError, r as printAttachBanner, s as logInfo, t as generateAttachToken } from "./attach-orchestrator-CFotueL3.js";
6
- import "./cell-nrWFeqvG.js";
2
+ import "./test-runner/relay-factory.js";
3
+ import { a as startTunnelHealthProbe, i as startQuickTunnel, n as makeTunnelStatus, o as logError, r as printAttachBanner, s as logInfo, t as generateAttachToken } from "./attach-orchestrator-RhOdO3DS.js";
4
+ import "./cell-Ba9lCI3B.js";
5
+ import "./qr-http-server-BsWlOA85.js";
7
6
  import "./relay-secret-store-BcVrWwTq.js";
8
7
  import { createRequire } from "node:module";
9
- import { glob } from "node:fs/promises";
10
- import { isAbsolute, resolve } from "node:path";
11
8
  import "@modelcontextprotocol/sdk/server/index.js";
12
9
  import "@modelcontextprotocol/sdk/server/stdio.js";
13
10
  import "@modelcontextprotocol/sdk/types.js";
14
- import { parseArgs } from "node:util";
15
11
  import { EventEmitter } from "node:events";
16
12
  import { WebSocket, WebSocketServer } from "ws";
17
13
  import { createServer } from "node:http";
18
- //#region src/test-runner/discover.ts
19
- /**
20
- * Test-file discovery shared by the `devtools-test` CLI and the `run_tests`
21
- * MCP tool, so both expand glob patterns with identical semantics.
22
- *
23
- * Uses Node's built-in `fs/promises` `glob` (Node 22+) — no extra dependency,
24
- * which keeps the MCP daemon install graph lean (a plain glob lib would land in
25
- * the `npx … devtools-mcp` path for no benefit).
26
- *
27
- * Pure Node IO only (`node:fs/promises` + `node:path`) — react-free, so it is
28
- * safe to import from the MCP daemon graph.
29
- */
30
- /**
31
- * Expands `patterns` (globs or plain paths) into a sorted, de-duplicated list of
32
- * ABSOLUTE test file paths, resolved relative to `cwd`.
33
- *
34
- * A plain (non-glob) path passes through when it matches a real file; a glob
35
- * expands against `cwd`. Absolute matches are kept as-is; relative matches are
36
- * resolved against `cwd`. `bundleTestFile` requires an absolute path, so the
37
- * absolute output feeds it directly.
38
- *
39
- * @param patterns Glob patterns or file paths (e.g. `['src/**\/*.ait.test.ts']`).
40
- * @param cwd Base directory for relative patterns/results.
41
- * @returns Sorted, de-duplicated absolute file paths. Empty when nothing matches.
42
- */
43
- async function discoverTestFiles(patterns, cwd) {
44
- const out = /* @__PURE__ */ new Set();
45
- for await (const match of glob(patterns, { cwd })) out.add(isAbsolute(match) ? match : resolve(cwd, match));
46
- return [...out].sort();
47
- }
48
- //#endregion
49
- //#region src/test-runner/cli.ts
50
- /**
51
- * `devtools-test` CLI.
52
- *
53
- * Shares test-file discovery with the `run_tests` MCP tool (`discoverTestFiles`)
54
- * and exposes `runWithConnection` — the pure run core that bundles, injects, and
55
- * collects each file over a CDP connection. The CLI's `main()` performs a
56
- * standalone relay attach (boot relay → QR → phone scan → cell inject → run).
57
- *
58
- * NOTE: no shebang in this source file — the tsdown entry's `banner` option
59
- * injects `#!/usr/bin/env node` into the compiled output (same pattern as
60
- * `src/mcp/cli.ts`).
61
- */
62
- const USAGE = `
14
+ new RegExp(`^${"@apps-in-toss/web-framework".replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}`);
15
+ `
63
16
  devtools-test — run mini-app tests on a real device WebView over the CDP relay
64
17
 
65
18
  USAGE
@@ -106,178 +59,6 @@ EXAMPLE
106
59
  --timeout 60000
107
60
 
108
61
  `.trimStart();
109
- /**
110
- * Runs `files` over `connection` and returns the aggregate report.
111
- * This pure function is the testable core of the CLI (and is what the
112
- * `run_tests` MCP tool calls against the daemon's attached connection); it is
113
- * separate from `main()` so tests can call it without spawning a subprocess.
114
- */
115
- async function runWithConnection(connection, files, opts) {
116
- const report = await runTestFilesOverRelay(connection, files, opts);
117
- if (opts?.printSummary) {
118
- const { totals } = report;
119
- process.stdout.write(`\ndevtools-test: ${totals.passed} passed, ${totals.failed} failed, ${totals.skipped} skipped (${report.duration}ms)\n`);
120
- }
121
- return report;
122
- }
123
- /**
124
- * Decides whether to suppress the QR/attach block on stdout.
125
- *
126
- * Suppress when EITHER the user passed `--no-qr-stdout`, OR stdout is not a TTY
127
- * / `CI` is set / `AIT_NO_QR_STDOUT` is set (non-interactive — a captured stdout
128
- * must not leak the relay wss + TOTP `at=` code that the QR block encodes). The
129
- * suppression is whole-chunk: `attachUrl` AND `relayUrl` ride in the same block.
130
- *
131
- * Exported for unit testing.
132
- */
133
- function shouldSuppressQr(noQrFlag) {
134
- return noQrFlag || !process.stdout.isTTY || process.env.CI !== void 0 || process.env.AIT_NO_QR_STDOUT !== void 0;
135
- }
136
- /**
137
- * CLI entry point.
138
- *
139
- * Performs a standalone relay attach → run lifecycle, sharing the attach
140
- * assembly with the Vitest pool via `createRelayConnectionFactory` (single
141
- * source — no drift):
142
- *
143
- * 1. Parse args: globs, --timeout, --cell-sdk-line, --cell-platform,
144
- * --scheme-url (required for env3), --report-dir, --no-qr-stdout,
145
- * --headless, --project-root.
146
- * 2. Discover test files; exit 1 if none.
147
- * 3. factory.open() — boot relay → render QR (suppressed on non-interactive
148
- * stdout) → wait for phone → inject cell → enableDomains. Returns the conn.
149
- * 4. runWithConnection(conn, files, { timeoutMs, collectCaptures, printSummary }).
150
- * 5. With --report-dir: write the runner-agnostic report + capture files.
151
- * 6. factory.close(); process.exitCode = failed > 0 ? 1 : 0.
152
- *
153
- * The CLI is not a daemon — no lock, router, SSE, or tools_list is needed.
154
- * Attach timeout exits with code 1; test failures exit with code 1.
155
- *
156
- * SECRET-HANDLING: scheme_url / relay wssUrl / TOTP codes are never written to
157
- * stdout/stderr directly. The QR block (which encodes the TOTP `at=` code) is
158
- * printed only when stdout is interactive AND not suppressed.
159
- */
160
- async function main(argv = process.argv.slice(2)) {
161
- let parsed;
162
- try {
163
- parsed = parseArgs({
164
- args: argv,
165
- options: {
166
- help: {
167
- type: "boolean",
168
- short: "h"
169
- },
170
- timeout: { type: "string" },
171
- "scheme-url": { type: "string" },
172
- "cell-sdk-line": { type: "string" },
173
- "cell-platform": { type: "string" },
174
- "report-dir": { type: "string" },
175
- "no-qr-stdout": { type: "boolean" },
176
- headless: { type: "boolean" },
177
- "project-root": { type: "string" }
178
- },
179
- allowPositionals: true
180
- });
181
- } catch (e) {
182
- process.stderr.write(`devtools-test: ${e instanceof Error ? e.message : String(e)}\n`);
183
- process.exitCode = 1;
184
- return;
185
- }
186
- if (parsed.values.help || argv.length === 0) {
187
- process.stdout.write(USAGE);
188
- return;
189
- }
190
- const vals = parsed.values;
191
- const rawTimeout = typeof vals.timeout === "string" ? vals.timeout : void 0;
192
- const timeoutMs = rawTimeout !== void 0 ? parseInt(rawTimeout, 10) : 3e4;
193
- if (Number.isNaN(timeoutMs) || timeoutMs <= 0) {
194
- process.stderr.write(`devtools-test: --timeout must be a positive integer\n`);
195
- process.exitCode = 1;
196
- return;
197
- }
198
- const schemeUrl = typeof vals["scheme-url"] === "string" ? vals["scheme-url"] : "";
199
- if (schemeUrl === "") {
200
- process.stderr.write("devtools-test: --scheme-url is required for standalone relay attach.\n Pass the intoss-private:// URL from `ait deploy --scheme-only`.\n");
201
- process.exitCode = 1;
202
- return;
203
- }
204
- const headless = vals.headless === true;
205
- const projectRoot = typeof vals["project-root"] === "string" ? vals["project-root"] : process.cwd();
206
- const reportDir = typeof vals["report-dir"] === "string" ? vals["report-dir"] : void 0;
207
- const suppressQr = shouldSuppressQr(vals["no-qr-stdout"] === true);
208
- const cellSdkLine = typeof vals["cell-sdk-line"] === "string" ? vals["cell-sdk-line"] : void 0;
209
- const cellPlatform = typeof vals["cell-platform"] === "string" ? vals["cell-platform"] : process.env.AIT_CELL_PLATFORM;
210
- const hasCell = cellSdkLine !== void 0 || cellPlatform !== void 0;
211
- const cell = {
212
- sdkLine: cellSdkLine ?? "2.x",
213
- platform: cellPlatform ?? "mock"
214
- };
215
- const globs = parsed.positionals;
216
- if (globs.length === 0) {
217
- process.stderr.write(`devtools-test: at least one glob pattern is required\n`);
218
- process.stdout.write(USAGE);
219
- process.exitCode = 1;
220
- return;
221
- }
222
- const files = await discoverTestFiles(globs, process.cwd());
223
- if (files.length === 0) {
224
- process.stderr.write(`devtools-test: no test files matched ${globs.join(", ")}\n`);
225
- process.exitCode = 1;
226
- return;
227
- }
228
- process.stderr.write(`devtools-test: found ${files.length} test file(s)\n`);
229
- if (hasCell) process.stderr.write(`devtools-test: injecting __AIT_CELL__ = ${JSON.stringify(cell)}\n`);
230
- const factory = createRelayConnectionFactory({
231
- schemeUrl,
232
- projectRoot,
233
- timeoutMs,
234
- headless,
235
- cell: hasCell ? cell : void 0,
236
- onQrContent: (chunks) => {
237
- if (suppressQr) {
238
- process.stdout.write("QR suppressed (non-interactive)\n");
239
- return;
240
- }
241
- for (const chunk of chunks) process.stdout.write(`${chunk}\n`);
242
- }
243
- });
244
- let connection;
245
- try {
246
- connection = await factory.open();
247
- } catch (e) {
248
- process.stderr.write(`devtools-test: ${e instanceof Error ? e.message : String(e)}\n`);
249
- process.exitCode = 1;
250
- return;
251
- }
252
- let exitCode = 0;
253
- try {
254
- const report = await runWithConnection(connection, files, {
255
- timeoutMs,
256
- printSummary: true,
257
- collectCaptures: reportDir !== void 0
258
- });
259
- if (reportDir !== void 0) try {
260
- const reportPath = await writeReportArtifact(report, reportDir, {
261
- sdkLine: cell.sdkLine,
262
- platform: cell.platform,
263
- projectRoot
264
- });
265
- process.stderr.write(`devtools-test: wrote report ${reportPath}\n`);
266
- const capturePaths = await writeCaptureArtifacts(report.captures, `${reportDir}/.ait-capture`, cell);
267
- if (capturePaths.length > 0) process.stderr.write(`devtools-test: wrote ${capturePaths.length} capture file(s)\n`);
268
- } catch (e) {
269
- process.stderr.write(`devtools-test: failed to write report artifacts: ${e instanceof Error ? e.message : String(e)}\n`);
270
- }
271
- exitCode = report.totals.failed > 0 ? 1 : 0;
272
- } finally {
273
- await factory.close(connection);
274
- process.exitCode = exitCode;
275
- }
276
- }
277
- if (import.meta.url === new URL(process.argv[1], "file://").href) main().catch((e) => {
278
- process.stderr.write(`devtools-test: unexpected error: ${e instanceof Error ? e.message : String(e)}\n`);
279
- process.exitCode = 1;
280
- });
281
62
  //#endregion
282
63
  //#region src/shared/relay-auth-close.ts
283
64
  /**
@@ -1188,4 +969,4 @@ async function bootRelayFamily(options = {}) {
1188
969
  //#endregion
1189
970
  export { bootRelayFamily, buildRelayVerifyAuth };
1190
971
 
1191
- //# sourceMappingURL=debug-server-BhHVy3XT.js.map
972
+ //# sourceMappingURL=debug-server-Bup2AJ5H.js.map