@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
@@ -1,311 +0,0 @@
1
- import {
2
- createJsonResult,
3
- createTextResult
4
- } from "./chunk-QJXXHOV7.js";
5
- import {
6
- DATA_DIR,
7
- DB_PATH
8
- } from "./chunk-VY3BLXBW.js";
9
-
10
- // src/mcp/tools/setup.ts
11
- import { z } from "zod";
12
- import { execSync } from "child_process";
13
- import { existsSync } from "fs";
14
- import { platform, homedir } from "os";
15
- var dependencies = [
16
- {
17
- name: "FFmpeg",
18
- command: "ffmpeg -version",
19
- versionPattern: /ffmpeg version (\d+\.\d+(?:\.\d+)?)/,
20
- required: true,
21
- description: "Video processing and export",
22
- installHint: "brew install ffmpeg (macOS) or apt install ffmpeg (Linux)"
23
- },
24
- {
25
- name: "Maestro CLI",
26
- command: "",
27
- // Special handling - check multiple paths
28
- versionPattern: /(\d+\.\d+\.\d+)/,
29
- required: false,
30
- description: "Mobile app testing automation",
31
- installHint: 'curl -Ls "https://get.maestro.mobile.dev" | bash'
32
- },
33
- {
34
- name: "Playwright",
35
- command: "npx playwright --version",
36
- versionPattern: /(\d+\.\d+\.\d+)/,
37
- required: false,
38
- description: "Web app testing and browser automation",
39
- installHint: "npm install -g playwright"
40
- },
41
- {
42
- name: "Xcode CLI Tools",
43
- command: "xcode-select -p",
44
- versionPattern: /.*/,
45
- required: false,
46
- description: "iOS Simulator access (macOS only)",
47
- installHint: "xcode-select --install"
48
- },
49
- {
50
- name: "ADB",
51
- command: "adb version",
52
- versionPattern: /Android Debug Bridge version (\d+\.\d+\.\d+)/,
53
- required: false,
54
- description: "Android Emulator access",
55
- installHint: "Install Android Studio or: brew install android-platform-tools"
56
- }
57
- ];
58
- function checkDependency(dep) {
59
- if (dep.name === "Maestro CLI") {
60
- return checkMaestro(dep);
61
- }
62
- try {
63
- const output = execSync(dep.command, { encoding: "utf-8", timeout: 5e3 }).trim();
64
- const match = output.match(dep.versionPattern);
65
- return {
66
- installed: true,
67
- version: match ? match[1] || "installed" : "installed"
68
- };
69
- } catch (error) {
70
- return {
71
- installed: false,
72
- version: null,
73
- error: error instanceof Error ? error.message : "Command failed"
74
- };
75
- }
76
- }
77
- function checkMaestro(dep) {
78
- const homeDir = homedir();
79
- const maestroPaths = [
80
- `${homeDir}/.maestro/bin/maestro`,
81
- "/usr/local/bin/maestro",
82
- "/opt/homebrew/bin/maestro"
83
- ];
84
- try {
85
- const output = execSync("maestro --version 2>/dev/null || maestro version 2>/dev/null", {
86
- encoding: "utf-8",
87
- timeout: 5e3,
88
- shell: "/bin/bash"
89
- }).trim();
90
- const match = output.match(dep.versionPattern);
91
- return {
92
- installed: true,
93
- version: match ? match[1] : "installed"
94
- };
95
- } catch {
96
- }
97
- for (const maestroPath of maestroPaths) {
98
- if (existsSync(maestroPath)) {
99
- try {
100
- const output = execSync(`"${maestroPath}" --version 2>/dev/null || "${maestroPath}" version 2>/dev/null`, {
101
- encoding: "utf-8",
102
- timeout: 5e3,
103
- shell: "/bin/bash"
104
- }).trim();
105
- const match = output.match(dep.versionPattern);
106
- return {
107
- installed: true,
108
- version: match ? match[1] : "installed"
109
- };
110
- } catch {
111
- return {
112
- installed: true,
113
- version: "installed"
114
- };
115
- }
116
- }
117
- }
118
- return {
119
- installed: false,
120
- version: null,
121
- error: "Maestro not found in PATH or common installation directories"
122
- };
123
- }
124
- var setupStatusTool = {
125
- name: "dlab.setup.status",
126
- description: "Check the status of DiscoveryLab setup and all dependencies.",
127
- inputSchema: z.object({}),
128
- handler: async () => {
129
- const results = [];
130
- let allRequiredInstalled = true;
131
- for (const dep of dependencies) {
132
- if (dep.name === "Xcode CLI Tools" && platform() !== "darwin") {
133
- continue;
134
- }
135
- const status = checkDependency(dep);
136
- results.push({
137
- name: dep.name,
138
- installed: status.installed,
139
- version: status.version,
140
- required: dep.required,
141
- description: dep.description,
142
- installHint: status.installed ? null : dep.installHint
143
- });
144
- if (dep.required && !status.installed) {
145
- allRequiredInstalled = false;
146
- }
147
- }
148
- const dataReady = existsSync(DATA_DIR);
149
- const dbReady = existsSync(DB_PATH);
150
- return createJsonResult({
151
- ready: allRequiredInstalled && dataReady,
152
- platform: platform(),
153
- dataDirectory: {
154
- path: DATA_DIR,
155
- exists: dataReady
156
- },
157
- database: {
158
- path: DB_PATH,
159
- exists: dbReady
160
- },
161
- dependencies: results,
162
- summary: {
163
- total: results.length,
164
- installed: results.filter((r) => r.installed).length,
165
- missing: results.filter((r) => !r.installed).length,
166
- requiredMissing: results.filter((r) => r.required && !r.installed).map((r) => r.name)
167
- }
168
- });
169
- }
170
- };
171
- var setupCheckTool = {
172
- name: "dlab.setup.check",
173
- description: "Quick check if a specific tool is installed.",
174
- inputSchema: z.object({
175
- tool: z.enum(["ffmpeg", "maestro", "playwright", "xcode", "adb"]).describe("Tool to check")
176
- }),
177
- handler: async (params) => {
178
- const toolMap = {
179
- ffmpeg: dependencies[0],
180
- maestro: dependencies[1],
181
- playwright: dependencies[2],
182
- xcode: dependencies[3],
183
- adb: dependencies[4]
184
- };
185
- const dep = toolMap[params.tool];
186
- if (!dep) {
187
- return createTextResult(`Unknown tool: ${params.tool}`);
188
- }
189
- const status = checkDependency(dep);
190
- if (status.installed) {
191
- return createTextResult(`${dep.name} is installed (version: ${status.version})`);
192
- } else {
193
- return createTextResult(`${dep.name} is NOT installed.
194
- Install with: ${dep.installHint}`);
195
- }
196
- }
197
- };
198
- var setupInitTool = {
199
- name: "dlab.setup.init",
200
- description: "Initialize DiscoveryLab data directories and database.",
201
- inputSchema: z.object({}),
202
- handler: async () => {
203
- try {
204
- const { getDatabase, DATA_DIR: DATA_DIR2, PROJECTS_DIR, EXPORTS_DIR, FRAMES_DIR } = await import("./db-IWIL65EX.js");
205
- getDatabase();
206
- return createJsonResult({
207
- message: "DiscoveryLab initialized successfully",
208
- directories: {
209
- data: DATA_DIR2,
210
- projects: PROJECTS_DIR,
211
- exports: EXPORTS_DIR,
212
- frames: FRAMES_DIR
213
- }
214
- });
215
- } catch (error) {
216
- const message = error instanceof Error ? error.message : "Initialization failed";
217
- return createTextResult(`Error: ${message}`);
218
- }
219
- }
220
- };
221
- var setupInstallTool = {
222
- name: "dlab.setup.install",
223
- description: "Get installation commands for missing DiscoveryLab dependencies. Claude should run these commands after user approval.",
224
- inputSchema: z.object({
225
- tool: z.enum(["all", "ffmpeg", "maestro", "playwright", "xcode", "adb"]).optional().describe("Specific tool to install (default: all missing)")
226
- }),
227
- handler: async (params) => {
228
- const toolToInstall = params.tool || "all";
229
- const installCommands = [];
230
- const isMac = platform() === "darwin";
231
- if (toolToInstall === "all" || toolToInstall === "ffmpeg") {
232
- const status = checkDependency(dependencies[0]);
233
- if (!status.installed) {
234
- installCommands.push({
235
- name: "FFmpeg",
236
- command: isMac ? "brew install ffmpeg" : "sudo apt install -y ffmpeg",
237
- description: "Required for video processing and export"
238
- });
239
- }
240
- }
241
- if (toolToInstall === "all" || toolToInstall === "maestro") {
242
- const status = checkDependency(dependencies[1]);
243
- if (!status.installed) {
244
- installCommands.push({
245
- name: "Maestro CLI",
246
- command: 'curl -Ls "https://get.maestro.mobile.dev" | bash',
247
- description: "Mobile app testing automation"
248
- });
249
- }
250
- }
251
- if (toolToInstall === "all" || toolToInstall === "playwright") {
252
- const status = checkDependency(dependencies[2]);
253
- if (!status.installed) {
254
- installCommands.push({
255
- name: "Playwright",
256
- command: "npm install -g playwright && npx playwright install",
257
- description: "Web app testing and browser automation"
258
- });
259
- }
260
- }
261
- if (isMac && (toolToInstall === "all" || toolToInstall === "xcode")) {
262
- const status = checkDependency(dependencies[3]);
263
- if (!status.installed) {
264
- installCommands.push({
265
- name: "Xcode CLI Tools",
266
- command: "xcode-select --install",
267
- description: "Required for iOS Simulator access"
268
- });
269
- }
270
- }
271
- if (toolToInstall === "all" || toolToInstall === "adb") {
272
- const status = checkDependency(dependencies[4]);
273
- if (!status.installed) {
274
- installCommands.push({
275
- name: "ADB (Android Debug Bridge)",
276
- command: isMac ? "brew install android-platform-tools" : "sudo apt install -y adb",
277
- description: "Required for Android Emulator access"
278
- });
279
- }
280
- }
281
- if (installCommands.length === 0) {
282
- return createTextResult(
283
- toolToInstall === "all" ? "\u2705 All dependencies are already installed!" : `\u2705 ${toolToInstall} is already installed!`
284
- );
285
- }
286
- const instructions = installCommands.map(
287
- (cmd, i) => `${i + 1}. **${cmd.name}** (${cmd.description})
288
- \`\`\`bash
289
- ${cmd.command}
290
- \`\`\``
291
- ).join("\n\n");
292
- return createTextResult(
293
- `## Missing Dependencies
294
-
295
- Please run the following commands to install missing dependencies:
296
-
297
- ` + instructions + `
298
-
299
- *Run these commands one at a time and verify each installation before proceeding.*`
300
- );
301
- }
302
- };
303
- var setupTools = [setupStatusTool, setupCheckTool, setupInitTool, setupInstallTool];
304
-
305
- export {
306
- setupStatusTool,
307
- setupCheckTool,
308
- setupInitTool,
309
- setupInstallTool,
310
- setupTools
311
- };