@testingbot/mcp-server 1.1.6 → 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 (67) hide show
  1. package/README.md +140 -6
  2. package/dist/console-to-stderr.d.ts +2 -0
  3. package/dist/console-to-stderr.d.ts.map +1 -0
  4. package/dist/console-to-stderr.js +11 -0
  5. package/dist/console-to-stderr.js.map +1 -0
  6. package/dist/index.d.ts +1 -0
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +4 -0
  9. package/dist/index.js.map +1 -1
  10. package/dist/lib/tunnel-manager.d.ts +50 -0
  11. package/dist/lib/tunnel-manager.d.ts.map +1 -0
  12. package/dist/lib/tunnel-manager.js +106 -0
  13. package/dist/lib/tunnel-manager.js.map +1 -0
  14. package/dist/lib/types.d.ts +10 -3
  15. package/dist/lib/types.d.ts.map +1 -1
  16. package/dist/lib/utils.d.ts +2 -0
  17. package/dist/lib/utils.d.ts.map +1 -1
  18. package/dist/lib/utils.js +35 -0
  19. package/dist/lib/utils.js.map +1 -1
  20. package/dist/prompts.d.ts +30 -0
  21. package/dist/prompts.d.ts.map +1 -0
  22. package/dist/prompts.js +105 -0
  23. package/dist/prompts.js.map +1 -0
  24. package/dist/resources.d.ts +24 -0
  25. package/dist/resources.d.ts.map +1 -0
  26. package/dist/resources.js +110 -0
  27. package/dist/resources.js.map +1 -0
  28. package/dist/server-factory.d.ts +14 -0
  29. package/dist/server-factory.d.ts.map +1 -1
  30. package/dist/server-factory.js +74 -16
  31. package/dist/server-factory.js.map +1 -1
  32. package/dist/tools/accessibility.d.ts +45 -0
  33. package/dist/tools/accessibility.d.ts.map +1 -0
  34. package/dist/tools/accessibility.js +153 -0
  35. package/dist/tools/accessibility.js.map +1 -0
  36. package/dist/tools/ai-analysis.d.ts +19 -0
  37. package/dist/tools/ai-analysis.d.ts.map +1 -0
  38. package/dist/tools/ai-analysis.js +128 -0
  39. package/dist/tools/ai-analysis.js.map +1 -0
  40. package/dist/tools/app-automate.js +1 -1
  41. package/dist/tools/app-automate.js.map +1 -1
  42. package/dist/tools/cdp.js +1 -1
  43. package/dist/tools/cdp.js.map +1 -1
  44. package/dist/tools/live.d.ts +6 -1
  45. package/dist/tools/live.d.ts.map +1 -1
  46. package/dist/tools/live.js +185 -37
  47. package/dist/tools/live.js.map +1 -1
  48. package/dist/tools/maestro.d.ts.map +1 -1
  49. package/dist/tools/maestro.js +8 -1
  50. package/dist/tools/maestro.js.map +1 -1
  51. package/dist/tools/screenshots.d.ts.map +1 -1
  52. package/dist/tools/screenshots.js +21 -2
  53. package/dist/tools/screenshots.js.map +1 -1
  54. package/dist/tools/storage.d.ts.map +1 -1
  55. package/dist/tools/storage.js +10 -4
  56. package/dist/tools/storage.js.map +1 -1
  57. package/dist/tools/team.js +16 -16
  58. package/dist/tools/team.js.map +1 -1
  59. package/dist/tools/tunnels.d.ts +2 -1
  60. package/dist/tools/tunnels.d.ts.map +1 -1
  61. package/dist/tools/tunnels.js +126 -5
  62. package/dist/tools/tunnels.js.map +1 -1
  63. package/dist/tools/visual.d.ts +41 -0
  64. package/dist/tools/visual.d.ts.map +1 -0
  65. package/dist/tools/visual.js +165 -0
  66. package/dist/tools/visual.js.map +1 -0
  67. package/package.json +7 -5
package/README.md CHANGED
@@ -10,7 +10,7 @@ TestingBot's official Model Context Protocol (MCP) server implementation. This s
10
10
 
11
11
  [![Install in VS Code](https://img.shields.io/badge/Install-VS_Code-007ACC?style=for-the-badge&logo=visualstudiocode&logoColor=white)](https://testingbot.com/mcp/install?client=vscode) [![Install in Cursor](https://img.shields.io/badge/Install-Cursor-000000?style=for-the-badge&logo=cursor&logoColor=white)](https://testingbot.com/mcp/install?client=cursor)
12
12
 
13
- **Claude Desktop**: download `mcp-server.mcpb` from the [releases page](https://github.com/testingbot/mcp-server/releases) and double-click it. Claude will set up the TestingBot MCP server automatically.
13
+ **Claude Desktop**: download `testingbot-mcp-server-<version>.mcpb` from the [latest release](https://github.com/testingbot/mcp-server/releases/latest) and double-click it. Claude will set up the TestingBot MCP server automatically.
14
14
 
15
15
  After install, set your credentials from [TestingBot account settings](https://testingbot.com/members/user/security).
16
16
 
@@ -26,7 +26,7 @@ After install, set your credentials from [TestingBot account settings](https://t
26
26
  - 👤 **User Account** - View and update account information
27
27
  - 👥 **Team Management** - Manage team settings and team members
28
28
  - 🔌 **Chrome DevTools Protocol** - Create CDP sessions for advanced browser automation
29
- - 🚇 **Tunnel Management** - Manage TestingBot tunnels for local testing
29
+ - 🚇 **Tunnel Management** - Start, stop and manage TestingBot tunnels to test localhost and private sites
30
30
 
31
31
  ## Prerequisites
32
32
 
@@ -183,21 +183,42 @@ Just ask:
183
183
 
184
184
  The agent will call `tb_openBrowser`, `tb_navigate`, `tb_snapshot`, `tb_click` — and surface a **live-view URL** so you can watch it in real time. For real iOS / Android devices, the bundled [`appium-mcp`](https://github.com/appium/appium-mcp) child gives the agent the full `appium_*` toolbelt (`appium_session_management`, `appium_gesture`, `appium_set_value`, `appium_screenshot`, ~30 more) — no separate install or config required. Just ask: _"Open an iPhone 15 Pro on iOS 17 on TestingBot, tap the login button, take a screenshot."_ See the [`@testingbot/automation-mcp` README](https://github.com/testingbot/automation-mcp#readme) for the full tool list, caveats (sessions are metered), and configuration options.
185
185
 
186
+ ## 🚇 Testing localhost and private sites
187
+
188
+ TestingBot's browsers and devices run in the cloud, so they can't open `localhost`, private IPs (`10.x`, `192.168.x`, …) or intranet hosts directly. To reach them, they need a [TestingBot Tunnel](https://testingbot.com/support/tunnel) running on your machine. Just ask:
189
+
190
+ > Start a tunnel and open http://localhost:3000 in Chrome on Windows 11.
191
+
192
+ The agent calls `startTunnel`, which needs **Java 17+**. The tool returns the tunnel's identifier and ID, and the agent passes them on:
193
+
194
+ | Run | How it uses the tunnel |
195
+ | --- | --- |
196
+ | `tb_openBrowser` (agent-driven browser) | `tunnelIdentifier` (**required**: sessions without it go direct). Or set `TESTINGBOT_TUNNEL_IDENTIFIER` |
197
+ | `appium_session_management` (native apps) | `"tb:options": {"tunnel-identifier": "…"}` in the capabilities |
198
+ | `startLiveSession` / `startDesktopLiveSession` / `startMobileLiveSession` | `tunnelId` (the numeric ID) |
199
+ | `runMaestroTest` | `tunnelIdentifier`. Without it, the account's newest running tunnel is used |
200
+ | `takeScreenshot`, `runAppAutomateTest` (Espresso / XCUITest) | The account's newest running tunnel is used automatically |
201
+
202
+ **Android apps and flows:** Android never sends `localhost` / `127.0.0.1` through a proxy, so on an Android device or emulator those URLs reach the device itself, not your machine. Use a hostname that resolves to 127.0.0.1 on your side instead, such as `http://myapp.localtest.me:3000`. The tunnel resolves it on your machine.
203
+
204
+ `stopTunnel` stops the tunnel. Tunnels started by the server are also stopped when the server exits. If you'd rather run the tunnel yourself, start it with `--tunnel-identifier <name>` and give the agent that name.
205
+
186
206
  ## Available Tools
187
207
 
188
208
  ### Live Testing
189
209
 
190
210
  #### `startLiveSession`
191
- Start an interactive live testing session on TestingBot. Opens a real browser or mobile device for manual testing.
211
+ Start an interactive live testing session on TestingBot. Returns a link that opens the session in your TestingBot dashboard, where you confirm it with Start. Mobile sessions run on emulators/simulators; real-device live sessions are started from the dashboard.
192
212
 
193
213
  **Parameters:**
194
214
  - `platformType`: "desktop" or "mobile"
195
215
  - `desiredURL`: The URL to open
196
216
  - `desiredOS`: Operating system (Windows, Mac, Linux for desktop; android, ios for mobile)
197
- - `desiredOSVersion`: OS version
217
+ - `desiredOSVersion`: OS version: Windows `11`/`10`/`8.1`/`8`; macOS by name (`Sonoma`) or number (`14`); or a platform code like `WIN11`
198
218
  - `desiredBrowser` (desktop only): Browser name (chrome, firefox, safari, edge, ie)
199
219
  - `desiredBrowserVersion` (desktop only): Browser version or "latest"
200
220
  - `desiredDevice` (mobile only): Device name (e.g., "iPhone 14", "Galaxy S23")
221
+ - `tunnelId` (optional): Numeric ID of a running tunnel, needed for localhost / private URLs (see [Testing localhost and private sites](#-testing-localhost-and-private-sites))
201
222
 
202
223
  **Example prompts:**
203
224
  > "Start a live testing session on Chrome latest with Windows 11 for https://example.com"
@@ -212,6 +233,7 @@ Convenience tool to start a desktop browser live testing session.
212
233
  - `desiredOSVersion`: OS version
213
234
  - `desiredBrowser`: chrome, firefox, safari, edge, or ie
214
235
  - `desiredBrowserVersion` (optional): Browser version or "latest" (default: latest)
236
+ - `tunnelId` (optional): Numeric ID of a running tunnel, for localhost / private URLs
215
237
 
216
238
  **Example prompt:**
217
239
  > "Start desktop live session on Firefox 120 with Mac Monterey for https://example.com"
@@ -224,6 +246,7 @@ Convenience tool to start a mobile device live testing session.
224
246
  - `desiredOS`: android or ios
225
247
  - `desiredOSVersion`: OS version
226
248
  - `desiredDevice`: Device name
249
+ - `tunnelId` (optional): Numeric ID of a running tunnel, for localhost / private URLs
227
250
 
228
251
  **Example prompt:**
229
252
  > "Start mobile live session on Galaxy S23 with Android 13 for https://example.com"
@@ -308,6 +331,27 @@ Stop a running test by session ID.
308
331
  **Example prompt:**
309
332
  > "Stop test abc123"
310
333
 
334
+ ### AI Failure Analysis
335
+
336
+ Explanations from [TestingBot AI Insights](https://testingbot.com/support/ai/insights): summary, root cause, timeline, log evidence, suggested fixes, a failure category, the likely owner and a confidence score. The account owner must first enable **AI Analysis** in Account Settings, which records consent to sending curated, secret-masked test logs to TestingBot's AI provider; until then both tools say how to turn it on and nothing is sent.
337
+
338
+ #### `analyzeTestFailure`
339
+ Start (or reuse) an AI failure analysis of a finished test and wait for the result. A current analysis is returned without extra cost.
340
+
341
+ **Parameters:**
342
+ - `sessionId`: Session ID (or numeric test ID)
343
+ - `force` (optional): Run a fresh analysis even if one exists
344
+ - `waitSeconds` (optional): How long to wait for the result (default 90, 0 returns immediately)
345
+
346
+ **Example prompt:**
347
+ > "Why did test abc123 fail?"
348
+
349
+ #### `getAiFailureAnalysis`
350
+ Read an existing analysis. Never starts one.
351
+
352
+ **Parameters:**
353
+ - `sessionId`: Session ID (or numeric test ID)
354
+
311
355
  ### Build Management
312
356
 
313
357
  #### `getBuilds`
@@ -414,6 +458,7 @@ Start a Maestro run. Returns immediately with the run ID — poll with `getMaest
414
458
  - `includeTags` / `excludeTags` (optional): Filter flows by Maestro tags
415
459
  - `shardSplit` (optional): Split flows across parallel devices
416
460
  - `otherApps` (optional): Up to 4 companion app URLs to install alongside the app
461
+ - `tunnelIdentifier` (optional): Run through this tunnel, so the app can reach localhost / private backends
417
462
 
418
463
  **Example prompt:**
419
464
  > "Run my Maestro flows on a real Pixel 8 with Android 14"
@@ -479,6 +524,44 @@ Start a run. Returns immediately with the run ID.
479
524
  #### `getAppAutomateRunStatus` / `getAppAutomateRunResults`
480
525
  Poll run progress, then fetch per-run outcomes and the JUnit XML report. Each run's Appium session ID is surfaced, so `getTestDetails` / `getFailureLogs` work for logs and video.
481
526
 
527
+ ### Visual Testing Review
528
+
529
+ Review [hosted visual tests](https://testingbot.com/support/visual-testing/ci#review-api): find failed runs, see what changed, approve or reject. When the account owner has turned on AI region names, each changed region carries a one-line AI description of the change; reading a run never sends anything to an AI provider.
530
+
531
+ #### `getVisualTests`
532
+ List hosted visual tests. **Parameters:** `offset`, `limit` (optional)
533
+
534
+ #### `getVisualRuns`
535
+ List visual runs, newest first. **Parameters:** `testId`, `state` (`failed`, `unreviewed`, `passed`), `offset`, `limit` (all optional)
536
+
537
+ #### `explainVisualRun`
538
+ What changed in a run: regions with names, AI change descriptions, text and CSS changes, and image links. **Parameters:** `runId`
539
+
540
+ **Example prompt:**
541
+ > "Which visual tests failed today, and what changed on the pricing page?"
542
+
543
+ #### `reviewVisualRun`
544
+ Approve or reject a run. **Parameters:** `runId`, `decision` (`approve`/`reject`), `makeBaseline` (optional, with approve)
545
+
546
+ ### Accessibility Testing
547
+
548
+ Results of scheduled [accessibility scans](https://testingbot.com/support/accessibility), scored like the dashboard: WCAG A/AA violations decide pass/fail; needs-review items and best-practice recommendations do not. Automated checks cover only part of WCAG.
549
+
550
+ #### `getAccessibilityTests`
551
+ Scheduled accessibility tests with their latest result. **Parameters:** `offset`, `limit` (optional)
552
+
553
+ #### `getAccessibilityRuns`
554
+ Scans of one test, newest first. **Parameters:** `testId`, `offset`, `limit`
555
+
556
+ #### `getAccessibilityFindings`
557
+ Failing rules with the elements (selector, HTML, how to fix) and what is new or resolved since the previous scan. **Parameters:** `runId`, `elementsPerRule` (optional, default 5)
558
+
559
+ **Example prompt:**
560
+ > "What accessibility issues does our checkout page have, and which are new since the last scan?"
561
+
562
+ #### `runAccessibilityTest`
563
+ Start a scan now. **Parameters:** `testId`
564
+
482
565
  ### Screenshot Testing
483
566
 
484
567
  #### `takeScreenshot`
@@ -494,6 +577,8 @@ Take screenshots of a URL across multiple browsers and platforms.
494
577
  - `waitTime` (optional): Seconds to wait before screenshot (default: 5, max: 60)
495
578
  - `fullPage` (optional): Capture full page or viewport (default: false)
496
579
 
580
+ For a localhost / private URL, the screenshots go through the account's newest running tunnel. If no tunnel is running, the tool says so instead of taking the screenshots.
581
+
497
582
  **Example prompt:**
498
583
  > "Take a screenshot of https://example.com on Chrome and Firefox"
499
584
  > "Screenshot my homepage on mobile devices"
@@ -540,11 +625,12 @@ Update user account information.
540
625
  ### Team Management
541
626
 
542
627
  #### `getTeam`
543
- Get team information including concurrency limits, allowed parallel VMs, and mobile concurrency.
628
+ Get team information including concurrency: parallel sessions allowed, running right now and queued (waiting for a free slot), for VMs and physical devices. Counts are team-wide and match the dashboard.
544
629
 
545
630
  **Example prompt:**
546
631
  > "Show my team information"
547
632
  > "What are my team's concurrency limits?"
633
+ > "How many of my tests are running or queued right now?"
548
634
 
549
635
  #### `getUsersInTeam`
550
636
  List all users in your team with their roles and access levels.
@@ -585,8 +671,29 @@ Create a Chrome DevTools Protocol session for advanced browser automation. Retur
585
671
 
586
672
  ### Tunnel Management
587
673
 
674
+ TestingBot's browsers and devices run in the cloud. To test `localhost`, private IPs or intranet sites, they need a [TestingBot Tunnel](https://testingbot.com/support/tunnel) running on your machine. These tools can start one for you.
675
+
676
+ #### `startTunnel`
677
+ Starts a TestingBot Tunnel on the machine running the MCP server and waits until it is ready. Returns the tunnel's identifier and numeric ID. The tunnel stops with `stopTunnel` or when the MCP server exits. On first use the tunnel is downloaded, and it needs **Java 17 or newer**.
678
+
679
+ **Parameters:**
680
+ - `tunnelIdentifier` (optional): Name for the tunnel. If you don't give one, a unique one is generated.
681
+ - `shared` (optional): Share the tunnel with your team
682
+ - `noBump` (optional): Do not re-sign HTTPS traffic (for certificate pinning or client certificates)
683
+ - `noCache` (optional): Disable caching in the tunnel
684
+
685
+ **Example prompt:**
686
+ > "Start a tunnel and open http://localhost:3000 in Chrome on Windows 11"
687
+
688
+ #### `stopTunnel`
689
+ Stops a tunnel started with `startTunnel`.
690
+
691
+ **Parameters:**
692
+ - `tunnelIdentifier` (optional): The tunnel to stop. Can be left out when only one tunnel is running.
693
+ - `all` (optional): Stop every tunnel this server started
694
+
588
695
  #### `getTunnelList`
589
- Get a list of all active TestingBot tunnels. Tunnels allow testing websites behind firewalls or on your local machine.
696
+ Get a list of all active TestingBot tunnels on your account, with their identifiers. Tunnels allow testing websites behind firewalls or on your local machine.
590
697
 
591
698
  **Example prompt:**
592
699
  > "Show me all active tunnels"
@@ -601,6 +708,27 @@ Delete an active TestingBot tunnel by ID. This terminates the tunnel connection.
601
708
  **Example prompt:**
602
709
  > "Delete tunnel 12345"
603
710
 
711
+ ## Prompts, Resources and Agent Skills
712
+
713
+ Besides tools, the server offers MCP **prompts**: task recipes your client can show as slash commands:
714
+
715
+ | Prompt | Arguments | What it does |
716
+ | --- | --- | --- |
717
+ | `why-did-my-test-fail` | `sessionId` | Test status, AI failure analysis when enabled, failing log lines, likely cause and fixes |
718
+ | `summarise-build` | `buildId` | Pass/fail counts, failures grouped by shared cause, what to fix first |
719
+ | `find-flaky-tests` | `timeRange` (optional, default `30d`) | Tests that both passed and failed, and why each is unstable |
720
+
721
+ and read-only **resources** a client can attach to a conversation:
722
+
723
+ | URI | Content |
724
+ | --- | --- |
725
+ | `testingbot://tests/{sessionId}` | Test details (JSON) |
726
+ | `testingbot://tests/{sessionId}/logs/{logType}` | One log file, last 200 KB (`selenium`, `browser`, `chrome`, `vm`, `appium`) |
727
+ | `testingbot://builds/{buildId}` | Tests in a build (JSON) |
728
+ | `testingbot://insights/flaky-tests` | Flaky tests over the last 30 days; `?time_range=7d` to change it |
729
+
730
+ The same recipes ship as agent skills in [`skills/`](skills/) (one `SKILL.md` per task) for agents that load skills from files.
731
+
604
732
  ## Usage Examples
605
733
 
606
734
  ### Example 1: Running Cross-Browser Tests
@@ -668,6 +796,12 @@ Assistant: [Lists all users in the team]
668
796
 
669
797
  User: "Show me all active tunnels"
670
798
  Assistant: [Lists active TestingBot tunnels]
799
+
800
+ User: "Start a tunnel and check that http://localhost:3000 loads in Safari on macOS"
801
+ Assistant: [Starts a tunnel, opens Safari with that tunnel, loads the page]
802
+
803
+ User: "Stop the tunnel"
804
+ Assistant: [Stops the tunnel it started]
671
805
  ```
672
806
 
673
807
  ### Example 6: CDP Automation
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=console-to-stderr.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"console-to-stderr.d.ts","sourceRoot":"","sources":["../src/console-to-stderr.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ // Side-effect module: route console.log/info/debug to stderr.
2
+ //
3
+ // A stdio MCP server owns stdout for JSON-RPC framing; a stray console.log from a
4
+ // dependency (testingbot-tunnel-launcher prints "Tunnel is ready", for one) makes
5
+ // the client fail with "Unexpected token ... is not valid JSON". The MCP SDK
6
+ // writes to process.stdout directly, so it is unaffected.
7
+ for (const method of ["log", "info", "debug"]) {
8
+ console[method] = (...args) => console.error(...args);
9
+ }
10
+ export {};
11
+ //# sourceMappingURL=console-to-stderr.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"console-to-stderr.js","sourceRoot":"","sources":["../src/console-to-stderr.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,EAAE;AACF,kFAAkF;AAClF,kFAAkF;AAClF,6EAA6E;AAC7E,0DAA0D;AAC1D,KAAK,MAAM,MAAM,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAU,EAAE,CAAC;IACvD,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,IAAe,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;AACnE,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  #!/usr/bin/env node
2
2
  import "./silence-wdio.js";
3
+ import "./console-to-stderr.js";
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAKA,OAAO,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAKA,OAAO,mBAAmB,CAAC;AAI3B,OAAO,wBAAwB,CAAC"}
package/dist/index.js CHANGED
@@ -3,6 +3,10 @@
3
3
  // would otherwise log to stdout and corrupt the stdio JSON-RPC stream. See the
4
4
  // module for why a plain top-level assignment here is too late (ESM hoisting).
5
5
  import "./silence-wdio.js";
6
+ // Also before anything else: stdout carries the JSON-RPC stream, so any library
7
+ // that calls console.log (the tunnel launcher does, e.g. "Tunnel is ready") would
8
+ // corrupt it. Send console output to stderr instead.
9
+ import "./console-to-stderr.js";
6
10
  import { getConfig } from "./config.js";
7
11
  import { TestingBotMcpServer } from "./server-factory.js";
8
12
  import logger from "./lib/logger.js";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,mFAAmF;AACnF,+EAA+E;AAC/E,+EAA+E;AAC/E,OAAO,mBAAmB,CAAC;AAE3B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,C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K,EAAE,EAAE;QACxC,MAAM,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,EAAE,oBAAoB,CAAC,CAAC;QAC9C,KAAK,QAAQ,CAAC,mBAAmB,EAAE,CAAC,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;IAEH,MAAM,SAAS,CAAC,GAAG,EAAE,CAAC;AACxB,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,MAAM,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,EAAE,wBAAwB,CAAC,CAAC;IAClD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,50 @@
1
+ export interface TunnelProcessLike {
2
+ pid?: number;
3
+ exitCode: number | null;
4
+ signalCode: NodeJS.Signals | null;
5
+ close(callback?: () => void): void;
6
+ }
7
+ export interface TunnelLauncherLike {
8
+ downloadAndRunAsync(options: Record<string, unknown>): Promise<TunnelProcessLike>;
9
+ }
10
+ export interface StartTunnelOptions {
11
+ apiKey: string;
12
+ apiSecret: string;
13
+ tunnelIdentifier?: string;
14
+ shared?: boolean;
15
+ noBump?: boolean;
16
+ noCache?: boolean;
17
+ timeoutSeconds?: number;
18
+ }
19
+ export interface ManagedTunnel {
20
+ identifier: string;
21
+ startedAt: Date;
22
+ process: TunnelProcessLike;
23
+ }
24
+ export declare function generateTunnelIdentifier(): string;
25
+ /**
26
+ * Tracks the TestingBot Tunnels this MCP server process started, keyed by
27
+ * tunnel identifier, so they can be stopped by name and are always torn down
28
+ * when the server shuts down.
29
+ */
30
+ export declare class TunnelManager {
31
+ private readonly load;
32
+ private tunnels;
33
+ private starting;
34
+ constructor(load?: () => Promise<TunnelLauncherLike>);
35
+ list(): ManagedTunnel[];
36
+ get(identifier: string): ManagedTunnel | undefined;
37
+ /**
38
+ * Start a tunnel, or return the one this process already runs under the same
39
+ * identifier. Resolves once the tunnel reports ready.
40
+ */
41
+ start(options: StartTunnelOptions): Promise<{
42
+ tunnel: ManagedTunnel;
43
+ reused: boolean;
44
+ }>;
45
+ /** Stop a tunnel this process started. Returns false if there is none by that identifier. */
46
+ stop(identifier: string): Promise<boolean>;
47
+ stopAll(): Promise<void>;
48
+ }
49
+ export declare const tunnelManager: TunnelManager;
50
+ //# sourceMappingURL=tunnel-manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tunnel-manager.d.ts","sourceRoot":"","sources":["../../src/lib/tunnel-manager.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,iBAAiB;IAChC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC;IAClC,KAAK,CAAC,QAAQ,CAAC,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC;CACpC;AAED,MAAM,WAAW,kBAAkB;IACjC,mBAAmB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;CACnF;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,IAAI,CAAC;IAChB,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAID,wBAAgB,wBAAwB,IAAI,MAAM,CAEjD;AAaD;;;;GAIG;AACH,qBAAa,aAAa;IAIZ,OAAO,CAAC,QAAQ,CAAC,IAAI;IAHjC,OAAO,CAAC,OAAO,CAAoC;IACnD,OAAO,CAAC,QAAQ,CAA6C;gBAEhC,IAAI,GAAE,MAAM,OAAO,CAAC,kBAAkB,CAAgB;IAEnF,IAAI,IAAI,aAAa,EAAE;IAOvB,GAAG,CAAC,UAAU,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS;IAIlD;;;OAGG;IACG,KAAK,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC;QAAE,MAAM,EAAE,aAAa,CAAC;QAAC,MAAM,EAAE,OAAO,CAAA;KAAE,CAAC;IAqC7F,6FAA6F;IACvF,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAiB1C,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAM/B;AAED,eAAO,MAAM,aAAa,eAAsB,CAAC"}
@@ -0,0 +1,106 @@
1
+ import { randomUUID } from "crypto";
2
+ import logger from "./logger.js";
3
+ const CLOSE_TIMEOUT_MS = 15_000;
4
+ export function generateTunnelIdentifier() {
5
+ return `mcp-${randomUUID().slice(0, 8)}`;
6
+ }
7
+ async function loadLauncher() {
8
+ // Loaded lazily: the launcher is CommonJS and registers process exit hooks, and
9
+ // most sessions never start a tunnel.
10
+ const mod = await import("testingbot-tunnel-launcher");
11
+ return (mod.default ?? mod);
12
+ }
13
+ function isRunning(proc) {
14
+ return proc.exitCode === null && proc.signalCode === null;
15
+ }
16
+ /**
17
+ * Tracks the TestingBot Tunnels this MCP server process started, keyed by
18
+ * tunnel identifier, so they can be stopped by name and are always torn down
19
+ * when the server shuts down.
20
+ */
21
+ export class TunnelManager {
22
+ load;
23
+ tunnels = new Map();
24
+ starting = new Map();
25
+ constructor(load = loadLauncher) {
26
+ this.load = load;
27
+ }
28
+ list() {
29
+ for (const [id, t] of this.tunnels) {
30
+ if (!isRunning(t.process))
31
+ this.tunnels.delete(id);
32
+ }
33
+ return [...this.tunnels.values()];
34
+ }
35
+ get(identifier) {
36
+ return this.list().find((t) => t.identifier === identifier);
37
+ }
38
+ /**
39
+ * Start a tunnel, or return the one this process already runs under the same
40
+ * identifier. Resolves once the tunnel reports ready.
41
+ */
42
+ async start(options) {
43
+ const identifier = options.tunnelIdentifier?.trim() || generateTunnelIdentifier();
44
+ const existing = this.get(identifier);
45
+ if (existing)
46
+ return { tunnel: existing, reused: true };
47
+ const pending = this.starting.get(identifier);
48
+ if (pending)
49
+ return { tunnel: await pending, reused: true };
50
+ const launch = (async () => {
51
+ const launcher = await this.load();
52
+ const launcherOptions = {
53
+ apiKey: options.apiKey,
54
+ apiSecret: options.apiSecret,
55
+ tunnelIdentifier: identifier,
56
+ };
57
+ if (options.shared)
58
+ launcherOptions.shared = true;
59
+ if (options.noBump)
60
+ launcherOptions.noBump = true;
61
+ if (options.noCache)
62
+ launcherOptions.noCache = true;
63
+ if (options.timeoutSeconds)
64
+ launcherOptions.timeout = options.timeoutSeconds;
65
+ logger.info({ identifier }, "Starting TestingBot Tunnel");
66
+ const proc = await launcher.downloadAndRunAsync(launcherOptions);
67
+ const tunnel = { identifier, startedAt: new Date(), process: proc };
68
+ this.tunnels.set(identifier, tunnel);
69
+ logger.info({ identifier, pid: proc.pid }, "TestingBot Tunnel ready");
70
+ return tunnel;
71
+ })();
72
+ this.starting.set(identifier, launch);
73
+ try {
74
+ return { tunnel: await launch, reused: false };
75
+ }
76
+ finally {
77
+ this.starting.delete(identifier);
78
+ }
79
+ }
80
+ /** Stop a tunnel this process started. Returns false if there is none by that identifier. */
81
+ async stop(identifier) {
82
+ const tunnel = this.tunnels.get(identifier);
83
+ if (!tunnel)
84
+ return false;
85
+ this.tunnels.delete(identifier);
86
+ if (!isRunning(tunnel.process))
87
+ return true;
88
+ logger.info({ identifier }, "Stopping TestingBot Tunnel");
89
+ await new Promise((resolve) => {
90
+ const timer = setTimeout(resolve, CLOSE_TIMEOUT_MS);
91
+ tunnel.process.close(() => {
92
+ clearTimeout(timer);
93
+ resolve();
94
+ });
95
+ });
96
+ return true;
97
+ }
98
+ async stopAll() {
99
+ // Let in-flight starts settle so a tunnel that becomes ready during shutdown
100
+ // is not left running.
101
+ await Promise.allSettled([...this.starting.values()]);
102
+ await Promise.allSettled([...this.tunnels.keys()].map((id) => this.stop(id)));
103
+ }
104
+ }
105
+ export const tunnelManager = new TunnelManager();
106
+ //# sourceMappingURL=tunnel-manager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tunnel-manager.js","sourceRoot":"","sources":["../../src/lib/tunnel-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,MAAM,MAAM,aAAa,CAAC;AAgCjC,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAEhC,MAAM,UAAU,wBAAwB;IACtC,OAAO,OAAO,UAAU,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;AAC3C,CAAC;AAED,KAAK,UAAU,YAAY;IACzB,gFAAgF;IAChF,sCAAsC;IACtC,MAAM,GAAG,GAAQ,MAAM,MAAM,CAAC,4BAA4B,CAAC,CAAC;IAC5D,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,GAAG,CAAuB,CAAC;AACpD,CAAC;AAED,SAAS,SAAS,CAAC,IAAuB;IACxC,OAAO,IAAI,CAAC,QAAQ,KAAK,IAAI,IAAI,IAAI,CAAC,UAAU,KAAK,IAAI,CAAC;AAC5D,CAAC;AAED;;;;GAIG;AACH,MAAM,OAAO,aAAa;IAIK;IAHrB,OAAO,GAAG,IAAI,GAAG,EAAyB,CAAC;IAC3C,QAAQ,GAAG,IAAI,GAAG,EAAkC,CAAC;IAE7D,YAA6B,OAA0C,YAAY;QAAtD,SAAI,GAAJ,IAAI,CAAkD;IAAG,CAAC;IAEvF,IAAI;QACF,KAAK,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACnC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAA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,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,EAAE,4BAA4B,CAAC,CAAC;QAC1D,MAAM,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE;YAClC,MAAM,KAAK,GAAG,UAAU,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;YACpD,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE;gBACxB,YAAY,CAAC,KAAK,CAAC,CAAC;gBACpB,OAAO,EAAE,CAAC;YACZ,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,OAAO;QACX,6EAA6E;QAC7E,uBAAuB;QACvB,MAAM,OAAO,CAAC,UAAU,CAAC,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;QACtD,MAAM,OAAO,CAAC,UAAU,CAAC,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAChF,CAAC;CACF;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,aAAa,EAAE,CAAC"}
@@ -62,9 +62,16 @@ export interface Screenshot {
62
62
  [key: string]: any;
63
63
  }
64
64
  export interface StorageFile {
65
+ id: number;
65
66
  app_url: string;
66
- name: string;
67
- size: number;
68
- uploaded_at: string;
67
+ url?: string;
68
+ filename: string;
69
+ type?: string;
70
+ version?: string;
71
+ min_device_version?: string | null;
72
+ sim_only?: boolean | null;
73
+ state?: string;
74
+ thumb?: string | null;
75
+ created_at: string;
69
76
  }
70
77
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/lib/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG;IA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SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC,CAAC;IACH,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAGD,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,QAAQ,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;CACpB"}
@@ -8,5 +8,7 @@ export declare function handleMCPError(toolName: string, error: unknown): {
8
8
  isError: boolean;
9
9
  };
10
10
  export declare function validateUrl(url: string): boolean;
11
+ export declare function isPrivateUrl(url: string): boolean;
12
+ export declare const PRIVATE_URL_HINT = "This URL is on localhost or a private network, which TestingBot's cloud can only reach through a TestingBot Tunnel. Start one with startTunnel (or check getTunnelList).";
11
13
  export declare function sleep(ms: number): Promise<void>;
12
14
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAEA,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAE3D;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAKlD;AAED,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,OAAO,GACb;IACD,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/C,OAAO,EAAE,OAAO,CAAC;CAClB,CAkBA;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAOhD;AAED,wBAAgB,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE/C"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAEA,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAE3D;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAKlD;AAED,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,OAAO,GACb;IACD,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/C,OAAO,EAAE,OAAO,CAAC;CAClB,CAkBA;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAOhD;AAMD,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAgCjD;AAED,eAAO,MAAM,gBAAgB,6KAC+I,CAAC;AAE7K,wBAAgB,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE/C"}
package/dist/lib/utils.js CHANGED
@@ -34,6 +34,41 @@ export function validateUrl(url) {
34
34
  return false;
35
35
  }
36
36
  }
37
+ // True when a URL points somewhere TestingBot's cloud cannot reach directly:
38
+ // localhost, loopback, private/link-local IPv4 ranges, IPv6 loopback/ULA/link-local,
39
+ // mDNS/intranet-style suffixes and single-label hostnames. Such URLs only load
40
+ // through a TestingBot Tunnel.
41
+ export function isPrivateUrl(url) {
42
+ let host;
43
+ try {
44
+ host = new URL(url).hostname.toLowerCase();
45
+ }
46
+ catch {
47
+ return false;
48
+ }
49
+ host = host.replace(/^\[|\]$/g, "");
50
+ if (host === "localhost" || host.endsWith(".localhost"))
51
+ return true;
52
+ if (/\.(local|internal|lan|home|corp|intranet|test)$/.test(host))
53
+ return true;
54
+ const v4 = host.match(/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/);
55
+ if (v4) {
56
+ const [a, b] = [Number(v4[1]), Number(v4[2])];
57
+ return (a === 10 ||
58
+ a === 127 ||
59
+ a === 0 ||
60
+ (a === 172 && b >= 16 && b <= 31) ||
61
+ (a === 192 && b === 168) ||
62
+ (a === 169 && b === 254) ||
63
+ (a === 100 && b >= 64 && b <= 127));
64
+ }
65
+ if (host.includes(":")) {
66
+ return host === "::1" || /^f[cd]/.test(host) || /^fe[89ab]/.test(host);
67
+ }
68
+ // Single-label names ("intranet", "devbox") only resolve on a local network.
69
+ return !host.includes(".");
70
+ }
71
+ export const PRIVATE_URL_HINT = "This URL is on localhost or a private network, which TestingBot's cloud can only reach through a TestingBot Tunnel. Start one with startTunnel (or check getTunnelList).";
37
72
  export function sleep(ms) {
38
73
  return new Promise((resolve) => setTimeout(resolve, ms));
39
74
  }
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,MAAM,UAAU,iBAAiB,CAAC,SAAiB;IACjD,OAAO,SAAS,CAAC,OAAO,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC;AAClD,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,KAAc;IACxC,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;QAC3B,OAAO,KAAK,CAAC,OAAO,CAAC;IACvB,CAAC;IACD,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AAED,MAAM,UAAU,cAAc,CAC5B,QAAgB,EAChB,KAAc;IAKd,MAAM,YAAY,GAAG,WAAW,CAAC,KAAK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;IACtE,IAAI,EAAE,EAAE,CAAC;QACP,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC9C,OAAO,CACL,CAAC,KAAK,EAAE;YACR,CAAC,KAAK,GAAG;YACT,CAAC,KAAK,CAAC;YACP,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;YACjC,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,GAAG,CAAC;YACxB,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,GAAG,CAAC;YACxB,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,GAAG,CAAC,CACnC,CAAC;IACJ,CAAC;IAED,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QACvB,OAAO,IAAI,KAAK,KAAK,IAAI,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACzE,CAAC;IAED,6EAA6E;IAC7E,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AAC7B,CAAC;AAED,MAAM,CAAC,MAAM,gBAAgB,GAC3B,0KAA0K,CAAC;AAE7K,MAAM,UAAU,KAAK,CAAC,EAAU;IAC9B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AAC3D,CAAC"}
@@ -0,0 +1,30 @@
1
+ export interface PromptArgument {
2
+ name: string;
3
+ description: string;
4
+ required: boolean;
5
+ }
6
+ export interface PromptDefinition {
7
+ name: string;
8
+ title: string;
9
+ description: string;
10
+ arguments: PromptArgument[];
11
+ build: (args: Record<string, string>) => string;
12
+ }
13
+ export declare const PROMPTS: PromptDefinition[];
14
+ export declare function listPrompts(): {
15
+ name: string;
16
+ title: string;
17
+ description: string;
18
+ arguments: PromptArgument[];
19
+ }[];
20
+ export declare function getPrompt(name: string, args?: Record<string, string>): {
21
+ description: string;
22
+ messages: {
23
+ role: "user";
24
+ content: {
25
+ type: "text";
26
+ text: string;
27
+ };
28
+ }[];
29
+ };
30
+ //# sourceMappingURL=prompts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,cAAc,EAAE,CAAC;IAC5B,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,MAAM,CAAC;CACjD;AAOD,eAAO,MAAM,OAAO,EAAE,gBAAgB,EA0ErC,CAAC;AAEF,wBAAgB,WAAW;;;;;IAO1B;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM;;;;;;;;;EAcxE"}