@veolab/discoverylab 1.2.2 → 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 (172) hide show
  1. package/.mcp.json +2 -2
  2. package/README.md +182 -0
  3. package/dist/{chunk-YEZ26ENO.js → chunk-3QRQEDWR.js} +313 -192
  4. package/dist/{chunk-E3N3P2AG.js → chunk-4L76GPRC.js} +1124 -51
  5. package/dist/{chunk-I6YD3QFM.js → chunk-FIL7IWEL.js} +5 -3
  6. package/dist/{chunk-G524UVBK.js → chunk-FNUN7EPB.js} +5 -5
  7. package/dist/chunk-GAKEFJ5T.js +481 -0
  8. package/dist/chunk-LB3RNE3O.js +109 -0
  9. package/dist/chunk-N6JJ2RGV.js +2680 -0
  10. package/dist/{chunk-7HZEDTS7.js → chunk-VRM42PML.js} +3471 -848
  11. package/dist/{chunk-TJ3H23LL.js → chunk-VVIOB362.js} +3 -1
  12. package/dist/{chunk-W3WJGYR6.js → chunk-XFVDP332.js} +8 -2
  13. package/dist/cli.js +397 -9
  14. package/dist/{db-ADBEBNH6.js → db-6WLEVKUV.js} +3 -1
  15. package/dist/esvp-GSISVXLC.js +52 -0
  16. package/dist/esvp-mobile-GC7MAGMI.js +20 -0
  17. package/dist/index.d.ts +123 -1
  18. package/dist/index.html +11689 -8690
  19. package/dist/index.js +67 -12
  20. package/dist/{ocr-UTWC7537.js → ocr-QDYNCSPE.js} +1 -1
  21. package/dist/{playwright-R7Y5HREH.js → playwright-VZ7PXDC5.js} +2 -2
  22. package/dist/runtime/esvp-host-runtime/darwin-arm64/esvp-host-runtime +0 -0
  23. package/dist/runtime/esvp-host-runtime/manifest.json +10 -0
  24. package/dist/server-FO3UVUZU.js +22 -0
  25. package/dist/{setup-B5YPNUE4.js → setup-2SQC5UHJ.js} +2 -2
  26. package/dist/{tools-YS4QHOTQ.js → tools-OCRMOQ4U.js} +61 -6
  27. package/package.json +36 -5
  28. package/dist/chunk-22OCFYHG.js +0 -6283
  29. package/dist/chunk-24VARQVO.js +0 -7818
  30. package/dist/chunk-2OGZX6C4.js +0 -588
  31. package/dist/chunk-2WCNIFRO.js +0 -6191
  32. package/dist/chunk-43U6UYV7.js +0 -590
  33. package/dist/chunk-4H2E3K2G.js +0 -7638
  34. package/dist/chunk-4KLG6DDE.js +0 -334
  35. package/dist/chunk-4MS6YW2B.js +0 -6490
  36. package/dist/chunk-4NNTRJOI.js +0 -7791
  37. package/dist/chunk-5F76VWME.js +0 -6397
  38. package/dist/chunk-5NEFN42O.js +0 -7791
  39. package/dist/chunk-63MEQ6UH.js +0 -7673
  40. package/dist/chunk-6H3NXFX3.js +0 -6861
  41. package/dist/chunk-7DOG2W4O.js +0 -6428
  42. package/dist/chunk-7IDQLLBW.js +0 -311
  43. package/dist/chunk-7NP64TGJ.js +0 -6822
  44. package/dist/chunk-AATLY4KT.js +0 -6505
  45. package/dist/chunk-C7QUR7XX.js +0 -6397
  46. package/dist/chunk-CGKCE6MC.js +0 -6279
  47. package/dist/chunk-D25V6IWE.js +0 -6487
  48. package/dist/chunk-EQOZSXAT.js +0 -6822
  49. package/dist/chunk-FPHD7HSQ.js +0 -6812
  50. package/dist/chunk-GGJJUCFK.js +0 -7160
  51. package/dist/chunk-GLHOY3NN.js +0 -7805
  52. package/dist/chunk-GML5MKQA.js +0 -6398
  53. package/dist/chunk-GOL6FUJL.js +0 -6045
  54. package/dist/chunk-GSWHWEYC.js +0 -1346
  55. package/dist/chunk-HDKEQOF5.js +0 -7788
  56. package/dist/chunk-HZGSWVVS.js +0 -7111
  57. package/dist/chunk-IGZ5TICZ.js +0 -334
  58. package/dist/chunk-IRKQG33A.js +0 -7054
  59. package/dist/chunk-JFTBF4JR.js +0 -6040
  60. package/dist/chunk-JVLVBPUJ.js +0 -6180
  61. package/dist/chunk-JY3KC67R.js +0 -6504
  62. package/dist/chunk-KUFBCBNJ.js +0 -6815
  63. package/dist/chunk-KV7KDJ43.js +0 -7639
  64. package/dist/chunk-L4SA5F5W.js +0 -6397
  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-QJXXHOV7.js +0 -205
  81. package/dist/chunk-RDZDSOAL.js +0 -7750
  82. package/dist/chunk-RLW2OI2L.js +0 -6383
  83. package/dist/chunk-RUGHHO4K.js +0 -6395
  84. package/dist/chunk-SIOQVM2E.js +0 -6819
  85. package/dist/chunk-SR67SRIT.js +0 -1336
  86. package/dist/chunk-SSRXIO2V.js +0 -6822
  87. package/dist/chunk-SWSEKFON.js +0 -6487
  88. package/dist/chunk-TAODYZ52.js +0 -1393
  89. package/dist/chunk-TBG76CYG.js +0 -6395
  90. package/dist/chunk-V3CBINLD.js +0 -6812
  91. package/dist/chunk-VPYSLEGM.js +0 -6710
  92. package/dist/chunk-VY3BLXBW.js +0 -329
  93. package/dist/chunk-WTFOGVJQ.js +0 -6365
  94. package/dist/chunk-X64SFUT5.js +0 -6099
  95. package/dist/chunk-XIBF5LBD.js +0 -6395
  96. package/dist/chunk-XUKWS2CE.js +0 -7805
  97. package/dist/chunk-XZZKFF5V.js +0 -7787
  98. package/dist/chunk-Y5VDMSYC.js +0 -6701
  99. package/dist/chunk-YUBL36H4.js +0 -6605
  100. package/dist/chunk-YWVXFVSW.js +0 -6456
  101. package/dist/chunk-ZJFWMSZF.js +0 -7883
  102. package/dist/chunk-ZXZACOLD.js +0 -6822
  103. package/dist/db-IWIL65EX.js +0 -33
  104. package/dist/gridCompositor-ENKLFPWR.js +0 -409
  105. package/dist/playwright-A3OGSDRG.js +0 -38
  106. package/dist/playwright-ATDC4NYW.js +0 -38
  107. package/dist/playwright-E6EUFIJG.js +0 -38
  108. package/dist/server-2DXLKLFM.js +0 -13
  109. package/dist/server-2ICEWJVK.js +0 -13
  110. package/dist/server-2MQV3FNY.js +0 -13
  111. package/dist/server-2NGD7GE3.js +0 -13
  112. package/dist/server-2VKO76UK.js +0 -14
  113. package/dist/server-3BK2VFU7.js +0 -13
  114. package/dist/server-3FBHBA7L.js +0 -15
  115. package/dist/server-4LDOB3NX.js +0 -13
  116. package/dist/server-4YI44KDR.js +0 -13
  117. package/dist/server-64XMXA5P.js +0 -13
  118. package/dist/server-6IPHVUYT.js +0 -14
  119. package/dist/server-73ORHMJN.js +0 -13
  120. package/dist/server-73P7M3QB.js +0 -14
  121. package/dist/server-BPVRW5LJ.js +0 -14
  122. package/dist/server-BW4RKZIX.js +0 -13
  123. package/dist/server-CFS5SM5K.js +0 -13
  124. package/dist/server-DX7VYHHM.js +0 -13
  125. package/dist/server-F3YPX6ET.js +0 -13
  126. package/dist/server-FUXTR33I.js +0 -13
  127. package/dist/server-G2SY3DOS.js +0 -13
  128. package/dist/server-G32U7VOQ.js +0 -13
  129. package/dist/server-HKRIY7FP.js +0 -14
  130. package/dist/server-HON66OES.js +0 -15
  131. package/dist/server-IOOZK4NP.js +0 -14
  132. package/dist/server-IZEO7OJJ.js +0 -14
  133. package/dist/server-J52LMTBT.js +0 -13
  134. package/dist/server-JG7UKFGK.js +0 -14
  135. package/dist/server-JSCHEBOD.js +0 -13
  136. package/dist/server-K6KC4ZOM.js +0 -13
  137. package/dist/server-KJVRGWFE.js +0 -13
  138. package/dist/server-LCPB2L4U.js +0 -13
  139. package/dist/server-M7LDYKAJ.js +0 -13
  140. package/dist/server-MKVK6ZQQ.js +0 -13
  141. package/dist/server-MU52LCXT.js +0 -13
  142. package/dist/server-NM5CKDUU.js +0 -13
  143. package/dist/server-NPZN3FWO.js +0 -14
  144. package/dist/server-O5FIAHSY.js +0 -14
  145. package/dist/server-OESJUEYC.js +0 -13
  146. package/dist/server-ONSKQO4W.js +0 -13
  147. package/dist/server-P27BZXBL.js +0 -14
  148. package/dist/server-Q4FBWQUA.js +0 -13
  149. package/dist/server-RNQ7VUAL.js +0 -13
  150. package/dist/server-S6B5WUBT.js +0 -14
  151. package/dist/server-SRYNSGSP.js +0 -14
  152. package/dist/server-SUN3W2YK.js +0 -13
  153. package/dist/server-UA62LHZB.js +0 -13
  154. package/dist/server-UJB44EW5.js +0 -13
  155. package/dist/server-X3TLP6DX.js +0 -14
  156. package/dist/server-YT2UGEZK.js +0 -13
  157. package/dist/server-ZBPQ33V6.js +0 -14
  158. package/dist/setup-27CQAX6K.js +0 -17
  159. package/dist/setup-AQX4JQVR.js +0 -17
  160. package/dist/setup-EQTU7FI6.js +0 -17
  161. package/dist/tools-2KPB37GK.js +0 -178
  162. package/dist/tools-3H6IOWXV.js +0 -178
  163. package/dist/tools-3KYHPDCJ.js +0 -178
  164. package/dist/tools-75BAPCUM.js +0 -177
  165. package/dist/tools-BUVCUCRL.js +0 -178
  166. package/dist/tools-HDNODRS6.js +0 -178
  167. package/dist/tools-HP5MNY3D.js +0 -177
  168. package/dist/tools-L6PKKQPY.js +0 -179
  169. package/dist/tools-N5N2IO7V.js +0 -178
  170. package/dist/tools-NFJEZ2FF.js +0 -177
  171. package/dist/tools-OPULIER6.js +0 -178
  172. package/dist/tools-TLCKABUW.js +0 -178
@@ -1,334 +0,0 @@
1
- import {
2
- DATA_DIR,
3
- DB_PATH
4
- } from "./chunk-TJ3H23LL.js";
5
- import {
6
- createJsonResult,
7
- createTextResult
8
- } from "./chunk-QJXXHOV7.js";
9
-
10
- // src/mcp/tools/setup.ts
11
- import { z } from "zod";
12
- import { execSync } from "child_process";
13
- import { existsSync, readFileSync } from "fs";
14
- import { createRequire } from "module";
15
- import { platform, homedir } from "os";
16
- var requireFromHere = createRequire(import.meta.url);
17
- var dependencies = [
18
- {
19
- name: "FFmpeg",
20
- command: "ffmpeg -version",
21
- versionPattern: /ffmpeg version (\d+\.\d+(?:\.\d+)?)/,
22
- required: true,
23
- description: "Video processing and export",
24
- installHint: "brew install ffmpeg (macOS) or apt install ffmpeg (Linux)"
25
- },
26
- {
27
- name: "Maestro CLI",
28
- command: "",
29
- // Special handling - check multiple paths
30
- versionPattern: /(\d+\.\d+\.\d+)/,
31
- required: false,
32
- description: "Mobile app testing automation",
33
- installHint: 'curl -Ls "https://get.maestro.mobile.dev" | bash'
34
- },
35
- {
36
- name: "Playwright",
37
- command: "",
38
- // Special handling - avoid npx auto-install false positives
39
- versionPattern: /(\d+\.\d+\.\d+)/,
40
- required: false,
41
- description: "Web app testing and browser automation",
42
- installHint: "npm install -g playwright"
43
- },
44
- {
45
- name: "Xcode CLI Tools",
46
- command: "xcode-select -p",
47
- versionPattern: /.*/,
48
- required: false,
49
- description: "iOS Simulator access (macOS only)",
50
- installHint: "xcode-select --install"
51
- },
52
- {
53
- name: "ADB",
54
- command: "adb version",
55
- versionPattern: /Android Debug Bridge version (\d+\.\d+\.\d+)/,
56
- required: false,
57
- description: "Android Emulator access",
58
- installHint: "Install Android Studio or: brew install android-platform-tools"
59
- }
60
- ];
61
- function checkDependency(dep) {
62
- if (dep.name === "Maestro CLI") {
63
- return checkMaestro(dep);
64
- }
65
- if (dep.name === "Playwright") {
66
- return checkPlaywright(dep);
67
- }
68
- try {
69
- const output = execSync(dep.command, { encoding: "utf-8", timeout: 5e3 }).trim();
70
- const match = output.match(dep.versionPattern);
71
- return {
72
- installed: true,
73
- version: match ? match[1] || "installed" : "installed"
74
- };
75
- } catch (error) {
76
- return {
77
- installed: false,
78
- version: null,
79
- error: error instanceof Error ? error.message : "Command failed"
80
- };
81
- }
82
- }
83
- function checkPlaywright(dep) {
84
- try {
85
- const pkgPath = requireFromHere.resolve("playwright/package.json");
86
- const raw = readFileSync(pkgPath, "utf-8");
87
- const pkg = JSON.parse(raw);
88
- return {
89
- installed: true,
90
- version: typeof pkg.version === "string" && pkg.version.trim() ? pkg.version.trim() : "installed"
91
- };
92
- } catch (error) {
93
- return {
94
- installed: false,
95
- version: null,
96
- error: error instanceof Error ? error.message : "Playwright package not found"
97
- };
98
- }
99
- }
100
- function checkMaestro(dep) {
101
- const homeDir = homedir();
102
- const maestroPaths = [
103
- `${homeDir}/.maestro/bin/maestro`,
104
- "/usr/local/bin/maestro",
105
- "/opt/homebrew/bin/maestro"
106
- ];
107
- try {
108
- const output = execSync("maestro --version 2>/dev/null || maestro version 2>/dev/null", {
109
- encoding: "utf-8",
110
- timeout: 5e3,
111
- shell: "/bin/bash"
112
- }).trim();
113
- const match = output.match(dep.versionPattern);
114
- return {
115
- installed: true,
116
- version: match ? match[1] : "installed"
117
- };
118
- } catch {
119
- }
120
- for (const maestroPath of maestroPaths) {
121
- if (existsSync(maestroPath)) {
122
- try {
123
- const output = execSync(`"${maestroPath}" --version 2>/dev/null || "${maestroPath}" version 2>/dev/null`, {
124
- encoding: "utf-8",
125
- timeout: 5e3,
126
- shell: "/bin/bash"
127
- }).trim();
128
- const match = output.match(dep.versionPattern);
129
- return {
130
- installed: true,
131
- version: match ? match[1] : "installed"
132
- };
133
- } catch {
134
- return {
135
- installed: true,
136
- version: "installed"
137
- };
138
- }
139
- }
140
- }
141
- return {
142
- installed: false,
143
- version: null,
144
- error: "Maestro not found in PATH or common installation directories"
145
- };
146
- }
147
- var setupStatusTool = {
148
- name: "dlab.setup.status",
149
- description: "Check the status of DiscoveryLab setup and all dependencies.",
150
- inputSchema: z.object({}),
151
- handler: async () => {
152
- const results = [];
153
- let allRequiredInstalled = true;
154
- for (const dep of dependencies) {
155
- if (dep.name === "Xcode CLI Tools" && platform() !== "darwin") {
156
- continue;
157
- }
158
- const status = checkDependency(dep);
159
- results.push({
160
- name: dep.name,
161
- installed: status.installed,
162
- version: status.version,
163
- required: dep.required,
164
- description: dep.description,
165
- installHint: status.installed ? null : dep.installHint
166
- });
167
- if (dep.required && !status.installed) {
168
- allRequiredInstalled = false;
169
- }
170
- }
171
- const dataReady = existsSync(DATA_DIR);
172
- const dbReady = existsSync(DB_PATH);
173
- return createJsonResult({
174
- ready: allRequiredInstalled && dataReady,
175
- platform: platform(),
176
- dataDirectory: {
177
- path: DATA_DIR,
178
- exists: dataReady
179
- },
180
- database: {
181
- path: DB_PATH,
182
- exists: dbReady
183
- },
184
- dependencies: results,
185
- summary: {
186
- total: results.length,
187
- installed: results.filter((r) => r.installed).length,
188
- missing: results.filter((r) => !r.installed).length,
189
- requiredMissing: results.filter((r) => r.required && !r.installed).map((r) => r.name)
190
- }
191
- });
192
- }
193
- };
194
- var setupCheckTool = {
195
- name: "dlab.setup.check",
196
- description: "Quick check if a specific tool is installed.",
197
- inputSchema: z.object({
198
- tool: z.enum(["ffmpeg", "maestro", "playwright", "xcode", "adb"]).describe("Tool to check")
199
- }),
200
- handler: async (params) => {
201
- const toolMap = {
202
- ffmpeg: dependencies[0],
203
- maestro: dependencies[1],
204
- playwright: dependencies[2],
205
- xcode: dependencies[3],
206
- adb: dependencies[4]
207
- };
208
- const dep = toolMap[params.tool];
209
- if (!dep) {
210
- return createTextResult(`Unknown tool: ${params.tool}`);
211
- }
212
- const status = checkDependency(dep);
213
- if (status.installed) {
214
- return createTextResult(`${dep.name} is installed (version: ${status.version})`);
215
- } else {
216
- return createTextResult(`${dep.name} is NOT installed.
217
- Install with: ${dep.installHint}`);
218
- }
219
- }
220
- };
221
- var setupInitTool = {
222
- name: "dlab.setup.init",
223
- description: "Initialize DiscoveryLab data directories and database.",
224
- inputSchema: z.object({}),
225
- handler: async () => {
226
- try {
227
- const { getDatabase, DATA_DIR: DATA_DIR2, PROJECTS_DIR, EXPORTS_DIR, FRAMES_DIR } = await import("./db-ADBEBNH6.js");
228
- getDatabase();
229
- return createJsonResult({
230
- message: "DiscoveryLab initialized successfully",
231
- directories: {
232
- data: DATA_DIR2,
233
- projects: PROJECTS_DIR,
234
- exports: EXPORTS_DIR,
235
- frames: FRAMES_DIR
236
- }
237
- });
238
- } catch (error) {
239
- const message = error instanceof Error ? error.message : "Initialization failed";
240
- return createTextResult(`Error: ${message}`);
241
- }
242
- }
243
- };
244
- var setupInstallTool = {
245
- name: "dlab.setup.install",
246
- description: "Get installation commands for missing DiscoveryLab dependencies. Claude should run these commands after user approval.",
247
- inputSchema: z.object({
248
- tool: z.enum(["all", "ffmpeg", "maestro", "playwright", "xcode", "adb"]).optional().describe("Specific tool to install (default: all missing)")
249
- }),
250
- handler: async (params) => {
251
- const toolToInstall = params.tool || "all";
252
- const installCommands = [];
253
- const isMac = platform() === "darwin";
254
- if (toolToInstall === "all" || toolToInstall === "ffmpeg") {
255
- const status = checkDependency(dependencies[0]);
256
- if (!status.installed) {
257
- installCommands.push({
258
- name: "FFmpeg",
259
- command: isMac ? "brew install ffmpeg" : "sudo apt install -y ffmpeg",
260
- description: "Required for video processing and export"
261
- });
262
- }
263
- }
264
- if (toolToInstall === "all" || toolToInstall === "maestro") {
265
- const status = checkDependency(dependencies[1]);
266
- if (!status.installed) {
267
- installCommands.push({
268
- name: "Maestro CLI",
269
- command: 'curl -Ls "https://get.maestro.mobile.dev" | bash',
270
- description: "Mobile app testing automation"
271
- });
272
- }
273
- }
274
- if (toolToInstall === "all" || toolToInstall === "playwright") {
275
- const status = checkDependency(dependencies[2]);
276
- if (!status.installed) {
277
- installCommands.push({
278
- name: "Playwright",
279
- command: "npm install -g playwright && npx playwright install",
280
- description: "Web app testing and browser automation"
281
- });
282
- }
283
- }
284
- if (isMac && (toolToInstall === "all" || toolToInstall === "xcode")) {
285
- const status = checkDependency(dependencies[3]);
286
- if (!status.installed) {
287
- installCommands.push({
288
- name: "Xcode CLI Tools",
289
- command: "xcode-select --install",
290
- description: "Required for iOS Simulator access"
291
- });
292
- }
293
- }
294
- if (toolToInstall === "all" || toolToInstall === "adb") {
295
- const status = checkDependency(dependencies[4]);
296
- if (!status.installed) {
297
- installCommands.push({
298
- name: "ADB (Android Debug Bridge)",
299
- command: isMac ? "brew install android-platform-tools" : "sudo apt install -y adb",
300
- description: "Required for Android Emulator access"
301
- });
302
- }
303
- }
304
- if (installCommands.length === 0) {
305
- return createTextResult(
306
- toolToInstall === "all" ? "\u2705 All dependencies are already installed!" : `\u2705 ${toolToInstall} is already installed!`
307
- );
308
- }
309
- const instructions = installCommands.map(
310
- (cmd, i) => `${i + 1}. **${cmd.name}** (${cmd.description})
311
- \`\`\`bash
312
- ${cmd.command}
313
- \`\`\``
314
- ).join("\n\n");
315
- return createTextResult(
316
- `## Missing Dependencies
317
-
318
- Please run the following commands to install missing dependencies:
319
-
320
- ` + instructions + `
321
-
322
- *Run these commands one at a time and verify each installation before proceeding.*`
323
- );
324
- }
325
- };
326
- var setupTools = [setupStatusTool, setupCheckTool, setupInitTool, setupInstallTool];
327
-
328
- export {
329
- setupStatusTool,
330
- setupCheckTool,
331
- setupInitTool,
332
- setupInstallTool,
333
- setupTools
334
- };