@ait-co/devtools 0.1.128 → 0.1.131

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 (113) hide show
  1. package/dist/{attach-orchestrator-CPMQWkGV.js → attach-orchestrator-BiaYiNOr.js} +34 -107
  2. package/dist/attach-orchestrator-BiaYiNOr.js.map +1 -0
  3. package/dist/{attach-orchestrator-RhOdO3DS.js → attach-orchestrator-Cjdhir2U.js} +31 -13
  4. package/dist/{attach-orchestrator-RhOdO3DS.js.map → attach-orchestrator-Cjdhir2U.js.map} +1 -1
  5. package/dist/{attach-orchestrator-CpE0dMew.js → attach-orchestrator-ca34r46y.js} +33 -106
  6. package/dist/attach-orchestrator-ca34r46y.js.map +1 -0
  7. package/dist/{bundle-Cb3GFuw6.d.ts → bundle-BKqyhEK9.d.ts} +1 -1
  8. package/dist/{bundle-Cb3GFuw6.d.ts.map → bundle-BKqyhEK9.d.ts.map} +1 -1
  9. package/dist/{capture-B1zfGyTo.d.ts → capture-ltuV0gZa.d.ts} +1 -1
  10. package/dist/{capture-B1zfGyTo.d.ts.map → capture-ltuV0gZa.d.ts.map} +1 -1
  11. package/dist/{cdp-connection-Dxw_EY8s.d.ts → cdp-connection-D7AYQck2.d.ts} +1 -1
  12. package/dist/{cdp-connection-Dxw_EY8s.d.ts.map → cdp-connection-D7AYQck2.d.ts.map} +1 -1
  13. package/dist/{cell-D0dJSGHi.js → cell-Bi8MAPA8.js} +11 -7
  14. package/dist/cell-Bi8MAPA8.js.map +1 -0
  15. package/dist/{cell-Ba9lCI3B.js → cell-Cw4fVOl2.js} +11 -7
  16. package/dist/cell-Cw4fVOl2.js.map +1 -0
  17. package/dist/{cell-CX92lDI0.js → cell-rr6gL9AT.js} +11 -7
  18. package/dist/cell-rr6gL9AT.js.map +1 -0
  19. package/dist/debug-server-BSbfnFR5.js +436 -0
  20. package/dist/debug-server-BSbfnFR5.js.map +1 -0
  21. package/dist/debug-server-CD4zYBq4.js +379 -0
  22. package/dist/{debug-server-BzzNkETg.js.map → debug-server-CD4zYBq4.js.map} +1 -1
  23. package/dist/{debug-server-Dctc9GAh.js → debug-server-qRSRG7YZ.js} +68 -65
  24. package/dist/debug-server-qRSRG7YZ.js.map +1 -0
  25. package/dist/in-app/auto.js +15 -0
  26. package/dist/in-app/auto.js.map +1 -1
  27. package/dist/in-app/index.d.ts +27 -0
  28. package/dist/in-app/index.d.ts.map +1 -1
  29. package/dist/in-app/index.js +15 -0
  30. package/dist/in-app/index.js.map +1 -1
  31. package/dist/log-CUik_tHp.js +95 -0
  32. package/dist/log-CUik_tHp.js.map +1 -0
  33. package/dist/mcp/cli.js +1272 -1111
  34. package/dist/mcp/cli.js.map +1 -1
  35. package/dist/mcp/server.js +1 -1
  36. package/dist/panel/index.js +11 -1
  37. package/dist/panel/index.js.map +1 -1
  38. package/dist/{pool-DBLKNeRC.d.ts → pool-BaSCZALv.d.ts} +12 -4
  39. package/dist/{pool-DBLKNeRC.d.ts.map → pool-BaSCZALv.d.ts.map} +1 -1
  40. package/dist/{qr-http-server-Bo8LMOJQ.js → qr-http-server-BdNGPRoL.js} +76 -6
  41. package/dist/qr-http-server-BdNGPRoL.js.map +1 -0
  42. package/dist/{qr-http-server-CrGohOwC.js → qr-http-server-Bq9zR7-z.js} +76 -6
  43. package/dist/qr-http-server-Bq9zR7-z.js.map +1 -0
  44. package/dist/{qr-http-server-Bt_RAxFn.cjs → qr-http-server-BxoRp2w7.cjs} +76 -6
  45. package/dist/qr-http-server-BxoRp2w7.cjs.map +1 -0
  46. package/dist/{qr-http-server-DM2R25jP.cjs → qr-http-server-CV6TA9ZN.cjs} +76 -6
  47. package/dist/qr-http-server-CV6TA9ZN.cjs.map +1 -0
  48. package/dist/{qr-http-server-s1iW_5VQ.js → qr-http-server-DCbjORFa.js} +76 -6
  49. package/dist/qr-http-server-DCbjORFa.js.map +1 -0
  50. package/dist/{qr-http-server-BH0UFeUn.js → qr-http-server-cKbciY5k.js} +76 -6
  51. package/dist/qr-http-server-cKbciY5k.js.map +1 -0
  52. package/dist/{relay-factory-Dug7W6Ao.js → relay-factory-Cloog1jb.js} +34 -14
  53. package/dist/relay-factory-Cloog1jb.js.map +1 -0
  54. package/dist/{relay-secret-store-DKxs7zwq.js → relay-secret-store-DzxDsK6S.js} +1 -1
  55. package/dist/{relay-secret-store-DKxs7zwq.js.map → relay-secret-store-DzxDsK6S.js.map} +1 -1
  56. package/dist/{relay-url-store-xmUuTjXA.js → relay-url-store-D3rY-GJJ.js} +2 -2
  57. package/dist/{relay-url-store-xmUuTjXA.js.map → relay-url-store-D3rY-GJJ.js.map} +1 -1
  58. package/dist/{debug-server-BzzNkETg.js → relay-worker-CCAHLC4a.js} +220 -350
  59. package/dist/relay-worker-CCAHLC4a.js.map +1 -0
  60. package/dist/{relay-worker-TReZtzGl.d.ts → relay-worker-o0M2ndyJ.d.ts} +7 -7
  61. package/dist/relay-worker-o0M2ndyJ.d.ts.map +1 -0
  62. package/dist/{runtime-ozyPnRbU.d.ts → runtime-9xhN9pr8.d.ts} +1 -1
  63. package/dist/{runtime-ozyPnRbU.d.ts.map → runtime-9xhN9pr8.d.ts.map} +1 -1
  64. package/dist/test-runner/bin.js +744 -25
  65. package/dist/test-runner/bin.js.map +1 -1
  66. package/dist/test-runner/bundle.d.ts +1 -1
  67. package/dist/test-runner/capture.d.ts +1 -1
  68. package/dist/test-runner/config.d.ts +15 -9
  69. package/dist/test-runner/config.d.ts.map +1 -1
  70. package/dist/test-runner/config.js +1 -1
  71. package/dist/test-runner/pool.d.ts +1 -1
  72. package/dist/test-runner/pool.js +1 -1
  73. package/dist/test-runner/pool.js.map +1 -1
  74. package/dist/test-runner/relay-factory.d.ts +23 -9
  75. package/dist/test-runner/relay-factory.d.ts.map +1 -1
  76. package/dist/test-runner/relay-factory.js +32 -12
  77. package/dist/test-runner/relay-factory.js.map +1 -1
  78. package/dist/test-runner/relay-worker.d.ts +1 -1
  79. package/dist/test-runner/relay-worker.js +1 -187
  80. package/dist/test-runner/report.d.ts +3 -3
  81. package/dist/test-runner/rpc.d.ts +2 -2
  82. package/dist/test-runner/runtime.d.ts +1 -1
  83. package/dist/test-runner/task-graph.d.ts +1 -1
  84. package/dist/{tunnel-DyEV6WwL.cjs → tunnel-B2UCKAc7.cjs} +4 -3
  85. package/dist/{tunnel-DyEV6WwL.cjs.map → tunnel-B2UCKAc7.cjs.map} +1 -1
  86. package/dist/{tunnel-BFwOSwT4.js → tunnel-C-rQ34dM.js} +4 -3
  87. package/dist/{tunnel-BFwOSwT4.js.map → tunnel-C-rQ34dM.js.map} +1 -1
  88. package/dist/unplugin/index.cjs +1 -1
  89. package/dist/unplugin/index.js +1 -1
  90. package/dist/unplugin/tunnel.cjs +3 -2
  91. package/dist/unplugin/tunnel.cjs.map +1 -1
  92. package/dist/unplugin/tunnel.d.cts.map +1 -1
  93. package/dist/unplugin/tunnel.d.ts.map +1 -1
  94. package/dist/unplugin/tunnel.js +3 -2
  95. package/dist/unplugin/tunnel.js.map +1 -1
  96. package/package.json +1 -1
  97. package/dist/attach-orchestrator-CPMQWkGV.js.map +0 -1
  98. package/dist/attach-orchestrator-CpE0dMew.js.map +0 -1
  99. package/dist/cell-Ba9lCI3B.js.map +0 -1
  100. package/dist/cell-CX92lDI0.js.map +0 -1
  101. package/dist/cell-D0dJSGHi.js.map +0 -1
  102. package/dist/debug-server-1dhDA3aw.js +0 -980
  103. package/dist/debug-server-1dhDA3aw.js.map +0 -1
  104. package/dist/debug-server-Dctc9GAh.js.map +0 -1
  105. package/dist/qr-http-server-BH0UFeUn.js.map +0 -1
  106. package/dist/qr-http-server-Bo8LMOJQ.js.map +0 -1
  107. package/dist/qr-http-server-Bt_RAxFn.cjs.map +0 -1
  108. package/dist/qr-http-server-CrGohOwC.js.map +0 -1
  109. package/dist/qr-http-server-DM2R25jP.cjs.map +0 -1
  110. package/dist/qr-http-server-s1iW_5VQ.js.map +0 -1
  111. package/dist/relay-factory-Dug7W6Ao.js.map +0 -1
  112. package/dist/relay-worker-TReZtzGl.d.ts.map +0 -1
  113. package/dist/test-runner/relay-worker.js.map +0 -1
@@ -1,8 +1,8 @@
1
1
  import { n as buildRelayVerifyAuth, r as generateTotp, t as assertRelayAuthConfigured } from "./totp-DfekTBk3.js";
2
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-CrGohOwC.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-Cjdhir2U.js";
4
+ import "./cell-Cw4fVOl2.js";
5
+ import "./qr-http-server-cKbciY5k.js";
6
6
  import "./relay-secret-store-BcVrWwTq.js";
7
7
  import { createRequire } from "node:module";
8
8
  import "@modelcontextprotocol/sdk/server/index.js";
@@ -11,63 +11,6 @@ import "@modelcontextprotocol/sdk/types.js";
11
11
  import { EventEmitter } from "node:events";
12
12
  import { WebSocket, WebSocketServer } from "ws";
13
13
  import { createServer } from "node:http";
14
- new RegExp(`^${"@apps-in-toss/web-framework".replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}`);
15
- `
16
- devtools-test — run mini-app tests on a real device WebView over the CDP relay
17
-
18
- USAGE
19
- devtools-test <glob> [<glob> ...] [options]
20
-
21
- OPTIONS
22
- --scheme-url <url> intoss-private:// URL from \`ait deploy --scheme-only\`
23
- (required for standalone relay attach / env3)
24
- --timeout <ms> Per-file evaluate timeout in ms (default: 30000).
25
- Controls how long a single test file is allowed to run
26
- before it is considered hung. Does NOT affect how long
27
- the CLI waits for a human to scan the QR code — use
28
- --attach-timeout for that.
29
- --attach-timeout <ms> How long to wait for a human to scan the QR code with
30
- their phone (default: 600000 — 10 minutes). Omit to
31
- use the relay factory's generous default. Decrease for
32
- CI environments where a scan should arrive quickly.
33
- --cell-sdk-line <line> SDK line to inject as __AIT_CELL__.sdkLine (2.x|3.x)
34
- --cell-platform <plat> Platform to inject as __AIT_CELL__.platform
35
- (mock|ios|android, default: AIT_CELL_PLATFORM env)
36
- --report-dir <dir> Persist a runner-agnostic report + captures to <dir>
37
- (report: <sdkLine>.<platform>.json; captures:
38
- <dir>/.ait-capture/<category>.<sdkLine>.<platform>.json).
39
- Omitted = nothing saved. Enables console capture.
40
- --no-qr-stdout Suppress the QR/attach block on stdout (auto-on for
41
- non-interactive stdout / CI / AIT_NO_QR_STDOUT)
42
- --headless Disable browser auto-open (text QR only)
43
- --project-root <dir> Project root for .ait_relay secret lookup
44
- (default: current working directory)
45
- --help, -h Show this help message
46
-
47
- DESCRIPTION
48
- Boots a Chii relay + cloudflared tunnel, renders a QR code, waits for a real
49
- device to scan and attach, injects the cell globals (__AIT_CELL__), bundles
50
- each matched test file with esbuild (SDK imports redirected to window.__sdk),
51
- injects the bundle into the attached WebView via Runtime.evaluate, and prints
52
- a summary.
53
-
54
- With --report-dir, also harvests __AIT_CAPTURE__ console lines and writes a
55
- runner-agnostic report + per-category capture files so 2.x↔3.0 runs can be
56
- compared offline.
57
-
58
- The test files run against the live relay connection started by this process;
59
- no separate MCP daemon is required.
60
-
61
- EXAMPLE
62
- devtools-test 'src/**/*.ait.test.ts' \\
63
- --scheme-url "intoss-private://..." \\
64
- --cell-sdk-line 3.x \\
65
- --cell-platform ios \\
66
- --report-dir .ait-report \\
67
- --timeout 60000
68
-
69
- `.trimStart();
70
- //#endregion
71
14
  //#region src/shared/relay-auth-close.ts
72
15
  /**
73
16
  * Shared constants for the relay's named TOTP-auth rejection (issue #478).
@@ -281,7 +224,11 @@ var ChiiCdpConnection = class {
281
224
  * EventEmitter is missed (defensive belt-and-suspenders).
282
225
  *
283
226
  * @param filterFn - Predicate that the returned targets must satisfy.
284
- * @param timeoutMs - Reject after this many ms (default 90 000).
227
+ * @param timeoutMs - Reject after this many ms (default 90 000). Pass a
228
+ * non-finite value (`Infinity`) to disable the rejection timer entirely —
229
+ * used by the test-runner's unbounded QR-attach wait (devtools#735). Node
230
+ * clamps `setTimeout(fn, Infinity)` to ~1ms, so a non-finite value MUST
231
+ * skip arming the timer rather than pass it through.
285
232
  * @param pollIntervalMs - Fallback poll interval (default 500ms).
286
233
  */
287
234
  waitForFirstTarget(filterFn, timeoutMs = 9e4, pollIntervalMs = 500) {
@@ -293,7 +240,7 @@ var ChiiCdpConnection = class {
293
240
  const settle = (targets) => {
294
241
  if (settled) return;
295
242
  settled = true;
296
- clearTimeout(timeoutHandle);
243
+ if (timeoutHandle !== null) clearTimeout(timeoutHandle);
297
244
  if (pollHandle !== null) {
298
245
  clearInterval(pollHandle);
299
246
  pollHandle = null;
@@ -304,7 +251,7 @@ var ChiiCdpConnection = class {
304
251
  const onAttach = (targets) => {
305
252
  if (filterFn(targets)) settle(targets);
306
253
  };
307
- const timeoutHandle = setTimeout(() => {
254
+ const timeoutHandle = Number.isFinite(timeoutMs) ? setTimeout(() => {
308
255
  if (settled) return;
309
256
  settled = true;
310
257
  if (pollHandle !== null) {
@@ -313,7 +260,7 @@ var ChiiCdpConnection = class {
313
260
  }
314
261
  this.emitter.off("target:attached", onAttach);
315
262
  reject(/* @__PURE__ */ new Error(`waitForFirstTarget: 타임아웃 (${timeoutMs}ms) — 폰이 relay에 attach되지 않았습니다.`));
316
- }, timeoutMs);
263
+ }, timeoutMs) : null;
317
264
  this.emitter.on("target:attached", onAttach);
318
265
  pollHandle = setInterval(() => {
319
266
  this.refreshTargets().then((targets) => {
@@ -612,6 +559,62 @@ var ChiiCdpConnection = class {
612
559
  ws?.close();
613
560
  }
614
561
  };
562
+ new RegExp(`^${"@apps-in-toss/web-framework".replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}`);
563
+ `
564
+ devtools-test — run mini-app tests on a real device WebView over the CDP relay
565
+
566
+ USAGE
567
+ devtools-test <glob> [<glob> ...] [options]
568
+
569
+ OPTIONS
570
+ --scheme-url <url> intoss-private:// URL from \`ait deploy --scheme-only\`
571
+ (required for standalone relay attach / env3)
572
+ --timeout <ms> Per-file evaluate timeout in ms (default: 60000).
573
+ Controls how long a single test file is allowed to run
574
+ before it is considered hung. Does NOT affect how long
575
+ the CLI waits for a human to scan the QR code — use
576
+ --attach-timeout for that.
577
+ --attach-timeout <ms> How long to wait for a human to scan the QR code with
578
+ their phone. Omit (default) to wait indefinitely — the
579
+ runner stays up until you stop it (Ctrl-C/SIGTERM).
580
+ Pass a value to bound the wait for CI/headless runs.
581
+ --cell-sdk-line <line> SDK line to inject as __AIT_CELL__.sdkLine (2.x|3.x)
582
+ --cell-platform <plat> Platform to inject as __AIT_CELL__.platform
583
+ (mock|ios|android, default: AIT_CELL_PLATFORM env)
584
+ --report-dir <dir> Persist a runner-agnostic report + captures to <dir>
585
+ (report: <sdkLine>.<platform>.json; captures:
586
+ <dir>/.ait-capture/<category>.<sdkLine>.<platform>.json).
587
+ Omitted = nothing saved. Enables console capture.
588
+ --no-qr-stdout Suppress the QR/attach block on stdout (auto-on for
589
+ non-interactive stdout / CI / AIT_NO_QR_STDOUT)
590
+ --headless Disable browser auto-open (text QR only)
591
+ --project-root <dir> Project root for .ait_relay secret lookup
592
+ (default: current working directory)
593
+ --help, -h Show this help message
594
+
595
+ DESCRIPTION
596
+ Boots a Chii relay + cloudflared tunnel, renders a QR code, waits for a real
597
+ device to scan and attach, injects the cell globals (__AIT_CELL__), bundles
598
+ each matched test file with esbuild (SDK imports redirected to window.__sdk),
599
+ injects the bundle into the attached WebView via Runtime.evaluate, and prints
600
+ a summary.
601
+
602
+ With --report-dir, also harvests __AIT_CAPTURE__ console lines and writes a
603
+ runner-agnostic report + per-category capture files so 2.x↔3.0 runs can be
604
+ compared offline.
605
+
606
+ The test files run against the live relay connection started by this process;
607
+ no separate MCP daemon is required.
608
+
609
+ EXAMPLE
610
+ devtools-test 'src/**/*.ait.test.ts' \\
611
+ --scheme-url "intoss-private://..." \\
612
+ --cell-sdk-line 3.x \\
613
+ --cell-platform ios \\
614
+ --report-dir .ait-report \\
615
+ --timeout 60000
616
+
617
+ `.trimStart();
615
618
  //#endregion
616
619
  //#region src/mcp/chii-relay.ts
617
620
  /**
@@ -977,4 +980,4 @@ async function bootRelayFamily(options = {}) {
977
980
  //#endregion
978
981
  export { bootRelayFamily, buildRelayVerifyAuth };
979
982
 
980
- //# sourceMappingURL=debug-server-Dctc9GAh.js.map
983
+ //# sourceMappingURL=debug-server-qRSRG7YZ.js.map