@veolab/discoverylab 1.2.1 → 1.3.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 (160) hide show
  1. package/.mcp.json +2 -2
  2. package/README.md +182 -0
  3. package/dist/{chunk-TAODYZ52.js → chunk-3QRQEDWR.js} +510 -213
  4. package/dist/{chunk-L4SA5F5W.js → chunk-4L76GPRC.js} +1162 -58
  5. package/dist/chunk-6EGBXRDK.js +30 -0
  6. package/dist/{chunk-I6YD3QFM.js → chunk-FIL7IWEL.js} +5 -3
  7. package/dist/{chunk-4KLG6DDE.js → chunk-FNUN7EPB.js} +6 -6
  8. package/dist/chunk-GAKEFJ5T.js +481 -0
  9. package/dist/chunk-LB3RNE3O.js +109 -0
  10. package/dist/chunk-N6JJ2RGV.js +2680 -0
  11. package/dist/{chunk-XUKWS2CE.js → chunk-VRM42PML.js} +3546 -926
  12. package/dist/{chunk-TJ3H23LL.js → chunk-VVIOB362.js} +3 -1
  13. package/dist/{chunk-W3WJGYR6.js → chunk-XFVDP332.js} +8 -2
  14. package/dist/{chunk-QJXXHOV7.js → chunk-XKX6NBHF.js} +5 -1
  15. package/dist/cli.js +405 -11
  16. package/dist/{db-ADBEBNH6.js → db-6WLEVKUV.js} +3 -1
  17. package/dist/esvp-GSISVXLC.js +52 -0
  18. package/dist/esvp-mobile-GC7MAGMI.js +20 -0
  19. package/dist/index.d.ts +123 -1
  20. package/dist/index.html +11689 -8690
  21. package/dist/index.js +67 -11
  22. package/dist/{ocr-UTWC7537.js → ocr-QDYNCSPE.js} +1 -1
  23. package/dist/{playwright-R7Y5HREH.js → playwright-VZ7PXDC5.js} +2 -2
  24. package/dist/runtime/esvp-host-runtime/darwin-arm64/esvp-host-runtime +0 -0
  25. package/dist/runtime/esvp-host-runtime/manifest.json +10 -0
  26. package/dist/{server-3FBHBA7L.js → server-6N3KIEGP.js} +2 -1
  27. package/dist/server-FO3UVUZU.js +22 -0
  28. package/dist/{setup-27CQAX6K.js → setup-2SQC5UHJ.js} +4 -3
  29. package/dist/{tools-L6PKKQPY.js → tools-OCRMOQ4U.js} +63 -8
  30. package/package.json +36 -5
  31. package/dist/chunk-22OCFYHG.js +0 -6283
  32. package/dist/chunk-24VARQVO.js +0 -7818
  33. package/dist/chunk-2OGZX6C4.js +0 -588
  34. package/dist/chunk-2WCNIFRO.js +0 -6191
  35. package/dist/chunk-43U6UYV7.js +0 -590
  36. package/dist/chunk-4H2E3K2G.js +0 -7638
  37. package/dist/chunk-4MS6YW2B.js +0 -6490
  38. package/dist/chunk-4NNTRJOI.js +0 -7791
  39. package/dist/chunk-5F76VWME.js +0 -6397
  40. package/dist/chunk-5NEFN42O.js +0 -7791
  41. package/dist/chunk-63MEQ6UH.js +0 -7673
  42. package/dist/chunk-6H3NXFX3.js +0 -6861
  43. package/dist/chunk-7IDQLLBW.js +0 -311
  44. package/dist/chunk-7NP64TGJ.js +0 -6822
  45. package/dist/chunk-AATLY4KT.js +0 -6505
  46. package/dist/chunk-C7QUR7XX.js +0 -6397
  47. package/dist/chunk-CGKCE6MC.js +0 -6279
  48. package/dist/chunk-D25V6IWE.js +0 -6487
  49. package/dist/chunk-EQOZSXAT.js +0 -6822
  50. package/dist/chunk-FPHD7HSQ.js +0 -6812
  51. package/dist/chunk-GGJJUCFK.js +0 -7160
  52. package/dist/chunk-GLHOY3NN.js +0 -7805
  53. package/dist/chunk-GML5MKQA.js +0 -6398
  54. package/dist/chunk-GOL6FUJL.js +0 -6045
  55. package/dist/chunk-GSWHWEYC.js +0 -1346
  56. package/dist/chunk-HDKEQOF5.js +0 -7788
  57. package/dist/chunk-HZGSWVVS.js +0 -7111
  58. package/dist/chunk-IGZ5TICZ.js +0 -334
  59. package/dist/chunk-IRKQG33A.js +0 -7054
  60. package/dist/chunk-JFTBF4JR.js +0 -6040
  61. package/dist/chunk-JVLVBPUJ.js +0 -6180
  62. package/dist/chunk-JY3KC67R.js +0 -6504
  63. package/dist/chunk-KUFBCBNJ.js +0 -6815
  64. package/dist/chunk-KV7KDJ43.js +0 -7639
  65. package/dist/chunk-L5IJZV5F.js +0 -6822
  66. package/dist/chunk-MFFPQLU4.js +0 -7102
  67. package/dist/chunk-MJS2YKNR.js +0 -6397
  68. package/dist/chunk-MN6LCZHZ.js +0 -1320
  69. package/dist/chunk-NBAUZ7X2.js +0 -1336
  70. package/dist/chunk-NDBW6ELQ.js +0 -7638
  71. package/dist/chunk-O2HBSDI2.js +0 -6175
  72. package/dist/chunk-OFFIUYMG.js +0 -6341
  73. package/dist/chunk-OVCQGF2J.js +0 -1321
  74. package/dist/chunk-P4S7ZY6G.js +0 -7638
  75. package/dist/chunk-PBHUHSC3.js +0 -6002
  76. package/dist/chunk-PC4LR4ZI.js +0 -6359
  77. package/dist/chunk-PMTGGZ7R.js +0 -6397
  78. package/dist/chunk-PTXSB3UV.js +0 -497
  79. package/dist/chunk-PYUCY3U6.js +0 -1340
  80. package/dist/chunk-RDZDSOAL.js +0 -7750
  81. package/dist/chunk-RLW2OI2L.js +0 -6383
  82. package/dist/chunk-RUGHHO4K.js +0 -6395
  83. package/dist/chunk-SIOQVM2E.js +0 -6819
  84. package/dist/chunk-SR67SRIT.js +0 -1336
  85. package/dist/chunk-SSRXIO2V.js +0 -6822
  86. package/dist/chunk-SWSEKFON.js +0 -6487
  87. package/dist/chunk-TBG76CYG.js +0 -6395
  88. package/dist/chunk-V3CBINLD.js +0 -6812
  89. package/dist/chunk-VPYSLEGM.js +0 -6710
  90. package/dist/chunk-VY3BLXBW.js +0 -329
  91. package/dist/chunk-WTFOGVJQ.js +0 -6365
  92. package/dist/chunk-X64SFUT5.js +0 -6099
  93. package/dist/chunk-XIBF5LBD.js +0 -6395
  94. package/dist/chunk-Y5VDMSYC.js +0 -6701
  95. package/dist/chunk-YUBL36H4.js +0 -6605
  96. package/dist/chunk-YWVXFVSW.js +0 -6456
  97. package/dist/chunk-ZXZACOLD.js +0 -6822
  98. package/dist/db-IWIL65EX.js +0 -33
  99. package/dist/gridCompositor-ENKLFPWR.js +0 -409
  100. package/dist/playwright-A3OGSDRG.js +0 -38
  101. package/dist/playwright-ATDC4NYW.js +0 -38
  102. package/dist/playwright-E6EUFIJG.js +0 -38
  103. package/dist/server-2DXLKLFM.js +0 -13
  104. package/dist/server-2ICEWJVK.js +0 -13
  105. package/dist/server-2MQV3FNY.js +0 -13
  106. package/dist/server-2NGD7GE3.js +0 -13
  107. package/dist/server-2VKO76UK.js +0 -14
  108. package/dist/server-3BK2VFU7.js +0 -13
  109. package/dist/server-4LDOB3NX.js +0 -13
  110. package/dist/server-4YI44KDR.js +0 -13
  111. package/dist/server-64XMXA5P.js +0 -13
  112. package/dist/server-6IPHVUYT.js +0 -14
  113. package/dist/server-73ORHMJN.js +0 -13
  114. package/dist/server-73P7M3QB.js +0 -14
  115. package/dist/server-BPVRW5LJ.js +0 -14
  116. package/dist/server-BW4RKZIX.js +0 -13
  117. package/dist/server-CFS5SM5K.js +0 -13
  118. package/dist/server-DX7VYHHM.js +0 -13
  119. package/dist/server-F3YPX6ET.js +0 -13
  120. package/dist/server-FUXTR33I.js +0 -13
  121. package/dist/server-G2SY3DOS.js +0 -13
  122. package/dist/server-G32U7VOQ.js +0 -13
  123. package/dist/server-IOOZK4NP.js +0 -14
  124. package/dist/server-J52LMTBT.js +0 -13
  125. package/dist/server-JG7UKFGK.js +0 -14
  126. package/dist/server-JSCHEBOD.js +0 -13
  127. package/dist/server-K6KC4ZOM.js +0 -13
  128. package/dist/server-KJVRGWFE.js +0 -13
  129. package/dist/server-LCPB2L4U.js +0 -13
  130. package/dist/server-M7LDYKAJ.js +0 -13
  131. package/dist/server-MKVK6ZQQ.js +0 -13
  132. package/dist/server-MU52LCXT.js +0 -13
  133. package/dist/server-NM5CKDUU.js +0 -13
  134. package/dist/server-NPZN3FWO.js +0 -14
  135. package/dist/server-O5FIAHSY.js +0 -14
  136. package/dist/server-OESJUEYC.js +0 -13
  137. package/dist/server-ONSKQO4W.js +0 -13
  138. package/dist/server-P27BZXBL.js +0 -14
  139. package/dist/server-Q4FBWQUA.js +0 -13
  140. package/dist/server-RNQ7VUAL.js +0 -13
  141. package/dist/server-S6B5WUBT.js +0 -14
  142. package/dist/server-SRYNSGSP.js +0 -14
  143. package/dist/server-SUN3W2YK.js +0 -13
  144. package/dist/server-UA62LHZB.js +0 -13
  145. package/dist/server-UJB44EW5.js +0 -13
  146. package/dist/server-X3TLP6DX.js +0 -14
  147. package/dist/server-YT2UGEZK.js +0 -13
  148. package/dist/server-ZBPQ33V6.js +0 -14
  149. package/dist/setup-AQX4JQVR.js +0 -17
  150. package/dist/setup-EQTU7FI6.js +0 -17
  151. package/dist/tools-2KPB37GK.js +0 -178
  152. package/dist/tools-3H6IOWXV.js +0 -178
  153. package/dist/tools-3KYHPDCJ.js +0 -178
  154. package/dist/tools-75BAPCUM.js +0 -177
  155. package/dist/tools-BUVCUCRL.js +0 -178
  156. package/dist/tools-HDNODRS6.js +0 -178
  157. package/dist/tools-HP5MNY3D.js +0 -177
  158. package/dist/tools-N5N2IO7V.js +0 -178
  159. package/dist/tools-NFJEZ2FF.js +0 -177
  160. package/dist/tools-TLCKABUW.js +0 -178
package/.mcp.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "discoverylab": {
3
- "command": "npx",
4
- "args": ["-y", "@veolab/discoverylab@latest", "mcp"]
3
+ "command": "node",
4
+ "args": ["dist/index.js"]
5
5
  }
6
6
  }
package/README.md CHANGED
@@ -45,6 +45,9 @@ discoverylab install # configures Claude Code MCP
45
45
  discoverylab serve # opens web UI
46
46
  ```
47
47
 
48
+ `applab serve` works as an alias — both `discoverylab` and `applab` are interchangeable.
49
+ `serve` and `server` are also interchangeable.
50
+
48
51
  ## Features
49
52
 
50
53
  | Feature | Description |
@@ -55,6 +58,7 @@ discoverylab serve # opens web UI
55
58
  | **AI Analysis** | OCR, feature detection, smart summaries |
56
59
  | **Export** | PNG, GIF, MP4 with professional quality |
57
60
  | **Task Hub** | Jira, Notion, Figma, GitHub integration |
61
+ | **ESVP Client** | Connect to a shared ESVP control-plane for mobile sessions, replay, iOS Sim, and network traces |
58
62
 
59
63
  ## Skills
60
64
 
@@ -84,6 +88,184 @@ After installing, use these in Claude Code:
84
88
  | Web Recording | ✓ | ✓ | ✓ |
85
89
  | Apple Vision OCR | ✓ | — | — |
86
90
 
91
+ ## ESVP Integration
92
+
93
+ AppLab Discovery can act as an open-source client for a self-hosted ESVP control-plane. This integration is intentionally thin: it only calls the public HTTP contract and does not embed any private Entropy Lab runtime code.
94
+
95
+ Default behavior:
96
+
97
+ - if `ESVP_BASE_URL` is set, DiscoveryLab uses a remote/shared ESVP server
98
+ - if `ESVP_BASE_URL` is not set, DiscoveryLab tries to boot an embedded local OSS runtime (`esvp-local`)
99
+
100
+ For development, until `@entropylab/esvp-local` is published, point the local runtime module explicitly:
101
+
102
+ ```bash
103
+ export DISCOVERYLAB_ESVP_LOCAL_MODULE=/absolute/path/to/esvp-server-reference/server.js
104
+ ```
105
+
106
+ To force remote mode, set the control-plane URL:
107
+
108
+ ```bash
109
+ export ESVP_BASE_URL=http://your-esvp-host:8787
110
+ ```
111
+
112
+ Local `external-proxy` capture is now backed by a bundled host runtime. To ship the binary inside `dist/runtime/esvp-host-runtime/`, run:
113
+
114
+ ```bash
115
+ npm run build:host-runtime
116
+ ```
117
+
118
+ Regular `npm run build` attempts this step in best-effort mode so the JS build still succeeds on machines without Rust, but distributable builds that need local capture should include the runtime binary.
119
+
120
+ For a local distributable package that already contains the bundled runtime for the current host, run:
121
+
122
+ ```bash
123
+ npm run pack:local
124
+ ```
125
+
126
+ That produces the npm tarball with `dist/runtime/esvp-host-runtime/...` embedded, so the installed end-user package only needs `discoverylab serve` or `discoverylab server`.
127
+
128
+ Development vs packaged usage:
129
+
130
+ - local development can use `bun run dev`; when a bundled runtime is not present, App Lab falls back to `cargo run` if Rust is installed
131
+ - packaged/npm releases should be built with `npm run pack:local` or `npm publish`, which require the host runtime and embed it so end users only need `discoverylab serve` or `discoverylab server`
132
+ - the bundled runtime is currently host-target specific, so cross-platform distribution still needs a build matrix that produces binaries for each target you want to ship
133
+ - because App Lab is open source, the bundled runtime is intentionally limited to the local proxy/capture commodity path; it does not embed private Entropy Lab managed-proxy or protocol internals
134
+
135
+ Available MCP tools:
136
+
137
+ - `dlab.esvp.status`
138
+ - `dlab.esvp.devices`
139
+ - `dlab.esvp.sessions.list`
140
+ - `dlab.esvp.session.create`
141
+ - `dlab.esvp.session.get`
142
+ - `dlab.esvp.session.inspect`
143
+ - `dlab.esvp.session.transcript`
144
+ - `dlab.esvp.session.artifacts.list`
145
+ - `dlab.esvp.session.artifact.get`
146
+ - `dlab.esvp.session.actions`
147
+ - `dlab.esvp.session.checkpoint`
148
+ - `dlab.esvp.session.finish`
149
+ - `dlab.esvp.replay.run`
150
+ - `dlab.esvp.replay.validate`
151
+ - `dlab.esvp.session.network`
152
+ - `dlab.esvp.network.configure`
153
+ - `dlab.esvp.network.trace.attach`
154
+ - `dlab.project.esvp.current`
155
+ - `dlab.project.esvp.validate`
156
+ - `dlab.project.esvp.replay`
157
+ - `dlab.project.esvp.sync_network`
158
+ - `dlab.project.esvp.app_trace_bootstrap`
159
+
160
+ CLI surface:
161
+
162
+ - `discoverylab esvp status`
163
+ - `discoverylab esvp devices`
164
+ - `discoverylab esvp sessions`
165
+ - `discoverylab esvp create`
166
+ - `discoverylab esvp get <sessionId>`
167
+ - `discoverylab esvp inspect <sessionId>`
168
+ - `discoverylab esvp transcript <sessionId>`
169
+ - `discoverylab esvp artifacts <sessionId>`
170
+ - `discoverylab esvp artifact <sessionId> <artifactPath>`
171
+ - `discoverylab esvp actions <sessionId>`
172
+ - `discoverylab esvp checkpoint <sessionId>`
173
+ - `discoverylab esvp finish <sessionId>`
174
+ - `discoverylab esvp replay-run <sessionId>`
175
+ - `discoverylab esvp replay-validate <sessionId>`
176
+ - `discoverylab esvp replay-consistency <sessionId>`
177
+ - `discoverylab esvp network <sessionId>`
178
+ - `discoverylab esvp network-configure <sessionId>`
179
+ - `discoverylab esvp network-clear <sessionId>`
180
+ - `discoverylab esvp trace-attach <sessionId>`
181
+
182
+ Mobile recording bridge:
183
+
184
+ - App Lab mobile recordings can now sync `network_trace` artifacts from ESVP into the same `networkEntries` / segmented route tabs already used by web recordings.
185
+ - When ESVP traces include headers and request/response previews, the Analysis view now exposes a request inspector with segmented tabs for `Overview`, `Request`, `Response`, and `Headers`.
186
+ - Local MCP development can point `.mcp.json` at `node dist/index.js` so LLMs use the current branch build instead of `@latest`.
187
+ - App Lab exposes server routes for this bridge:
188
+ - `POST /api/testing/mobile/recordings/:id/esvp/validate`
189
+ - `POST /api/testing/mobile/recordings/:id/esvp/sync-network`
190
+ - Validation now uses the public executor that fits each platform:
191
+ - Android recordings validate through `adb`
192
+ - iOS recordings validate through `maestro-ios`
193
+ - `POST /api/testing/mobile/recordings/:id/esvp/validate` also accepts an optional `network` payload. If present, App Lab asks ESVP to configure the session before replaying the flow.
194
+ - App Lab local now prefers `network.mode=external-proxy`.
195
+ - In `external-proxy` mode, the proxy belongs to the App Lab client and App Lab only uses ESVP to persist `network_profile` / `network_trace`.
196
+ - If `network.mode` is omitted, App Lab defaults to `external-proxy`. `managed-proxy` remains available only when explicitly requested.
197
+ - If `external-proxy` is selected without an explicit `proxy.host` / `proxy.port`, App Lab now auto-starts a local HTTP proxy for the ESVP session and attaches the resulting `network_trace` when the session stops.
198
+ - Practical host rules for local proxying:
199
+ - iOS Simulator can use `127.0.0.1` when the proxy runs on the same macOS host.
200
+ - Android Emulator should use `10.0.2.2` to reach a proxy on the host.
201
+ - Physical Android devices need a host/LAN IP, not `127.0.0.1`.
202
+ - Optional env vars for the client-owned proxy:
203
+ - `DISCOVERYLAB_NETWORK_PROXY_PORT`
204
+ - `DISCOVERYLAB_NETWORK_PROXY_HOST`
205
+ - `DISCOVERYLAB_NETWORK_PROXY_BIND_HOST`
206
+ - `DISCOVERYLAB_NETWORK_PROXY_PROTOCOL`
207
+ - `DISCOVERYLAB_NETWORK_PROXY_BYPASS`
208
+ - `DISCOVERYLAB_NETWORK_PROXY_MAX_DURATION_MS`
209
+ - Host compatibility for local proxying:
210
+ - macOS host + iOS Simulator: supported. This is the only local iOS path, because Simulator / `maestro-ios` / `ios-sim` are macOS-only.
211
+ - macOS host + Android Emulator / physical Android: supported, as long as `adb` is installed and the device is reachable.
212
+ - Linux host + Android Emulator / physical Android: supported, as long as `adb` is installed and the device is reachable.
213
+ - Android local proxying is not tied to macOS. The local proxy is a Node.js HTTP proxy and the ESVP `adb` executor applies the proxy through ADB.
214
+ - Android prerequisites:
215
+ - `adb` must be installed and available on `PATH` before starting App Lab / ESVP flows.
216
+ - Android Emulator should use `10.0.2.2` to reach the host proxy.
217
+ - Physical Android devices must use a host/LAN IP reachable from the device.
218
+ - `DISCOVERYLAB_NETWORK_PROXY_BIND_HOST` can be used when the proxy must listen on a LAN-facing interface instead of loopback.
219
+ - Safety defaults for the local proxy:
220
+ - App Lab now auto-finalizes App-owned local proxies after `15m` by default to avoid leaving the host/device pointed at a stale proxy.
221
+ - Auto-finalization clears ESVP network state, stops the local proxy, attaches the captured `network_trace`, and finishes the session.
222
+ - App Lab Settings now expose an emergency lock for App-owned proxy autostart. Enabling it immediately finalizes active App-owned proxies and blocks new auto-started local proxies until you unlock it.
223
+ - App Lab Settings also expose a `Disable Active Proxy Now` panic button that forces cleanup without changing the lock state.
224
+ - Server shutdown always attempts the same cleanup path, so App-owned proxies are finalized automatically when the App Lab server exits normally.
225
+ - Set `DISCOVERYLAB_NETWORK_PROXY_MAX_DURATION_MS=0` only if you explicitly want to disable this guardrail.
226
+ - Current limitation:
227
+ - Automatic local proxying covers HTTP proxy setup and trace attach only. Advanced fault injection still requires explicit `managed-proxy`.
228
+ - `managed-proxy` is still useful for public-runtime validation and fault-injection experiments.
229
+
230
+ Example request body for ESVP-backed validation with external proxy:
231
+
232
+ ```json
233
+ {
234
+ "network": {
235
+ "mode": "external-proxy",
236
+ "profile": "applab-standard-capture",
237
+ "proxy": {
238
+ "host": "10.0.2.2",
239
+ "port": 8080
240
+ }
241
+ }
242
+ }
243
+ ```
244
+
245
+ Example prompts for Claude Code or other MCP clients:
246
+
247
+ - `Check my ESVP control-plane health`
248
+ - `Create an ios-sim ESVP session and take a screenshot`
249
+ - `Create a maestro-ios ESVP session and replay this iOS recording with an external proxy`
250
+ - `Configure a proxy on this ESVP session and attach the HTTP trace from ./trace.json`
251
+ - `Replay the failing Android session on the current emulator`
252
+
253
+ Programmatic usage:
254
+
255
+ ```ts
256
+ import { createESVPSession, runESVPActions } from '@veolab/discoverylab';
257
+
258
+ const created = await createESVPSession({
259
+ executor: 'ios-sim',
260
+ meta: { source: 'demo' },
261
+ });
262
+
263
+ await runESVPActions(created.session.id, {
264
+ actions: [{ name: 'screenshot' }],
265
+ finish: true,
266
+ });
267
+ ```
268
+
87
269
  ## License
88
270
 
89
271
  MIT