retestkit 1.15.0 → 1.16.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.
- package/README.md +46 -462
- package/dist/auth/index.d.ts +1 -1
- package/dist/auth/index.js +1 -1
- package/dist/errors/not-configured.js +2 -2
- package/dist/errors/not-configured.js.map +1 -1
- package/dist/prompts/index.d.ts.map +1 -1
- package/dist/prompts/index.js +5 -49
- package/dist/prompts/index.js.map +1 -1
- package/dist/prompts/templates/mcp/init.md +1 -1
- package/dist/prompts/templates/mcp/retest-cover.md +2 -2
- package/dist/prompts/templates/mcp/retest-describe.md +6 -6
- package/dist/prompts/templates/sampling/feature-discovery.md +1 -1
- package/dist/prompts/templates/sampling/flow-discovery.md +1 -1
- package/dist/resources/index.js +1 -1
- package/dist/tools/auth.js +1 -1
- package/dist/tools/init.js +3 -3
- package/dist/tools/retest/cover.js +3 -3
- package/dist/tools/retest/crawl.js +2 -2
- package/dist/tools/retest/crawl.js.map +1 -1
- package/dist/tools/retest/describe.d.ts +2 -2
- package/dist/tools/retest/describe.js +22 -22
- package/dist/tools/retest/describe.js.map +1 -1
- package/dist/workspace/index.js +3 -3
- package/dist/workspace/index.js.map +1 -1
- package/dist/workspace/types.d.ts +2 -2
- package/package.json +1 -1
- package/dist/prompts/templates/mcp/retest-discover-flows.md +0 -11
- package/dist/prompts/templates/mcp/retest-discover.md +0 -11
package/README.md
CHANGED
|
@@ -1,91 +1,27 @@
|
|
|
1
|
-
#
|
|
1
|
+
# retest:kit
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
> Use, copying, modification, or distribution is permitted **only** under a separate written agreement with the Licensor.
|
|
5
|
-
> See: **[LICENSE](./LICENSE)**
|
|
3
|
+
**AI-powered web testing that actually understands your app.**
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
`retest:kit` is an MCP server that brings intelligent, autonomous testing to your web applications. Point it at your app, tell it what to explore, and watch it identify features, generate tests, and catch regressions—all through natural conversation with your AI assistant.
|
|
8
6
|
|
|
9
|
-
This repository contains an **MCP server** for **AI-powered web application testing**. It provides tools for automated crawling, application analysis, test generation, and test execution using the Model Context Protocol (MCP).
|
|
10
7
|
|
|
11
|
-
|
|
12
|
-
- **MCP-compatible clients** (Claude Desktop, custom clients)
|
|
13
|
-
- **Playwright MCP** for browser automation
|
|
14
|
-
- **MCP Sampling** for AI-powered decision making
|
|
15
|
-
- **MCP Elicitation** for interactive user input
|
|
8
|
+
## What It Does
|
|
16
9
|
|
|
17
|
-
|
|
10
|
+
- **Explores your app** — AI navigates your application like a real user would
|
|
11
|
+
- **Identifies features** — Automatically finds and documents what your app can do
|
|
12
|
+
- **Generates tests** — Creates meaningful test cases based on real user flows
|
|
13
|
+
- **Catches regressions** — Runs tests and reports what broke (with screenshots)
|
|
18
14
|
|
|
19
|
-
You may use this Software **only** if:
|
|
20
|
-
- you have a **separate written agreement** with the Licensor, and
|
|
21
|
-
- you test only systems you are **authorized to test**.
|
|
22
15
|
|
|
23
|
-
|
|
16
|
+
## Quick Install
|
|
24
17
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
- **Goal-directed crawling** - AI navigates web applications to achieve specified goals
|
|
28
|
-
- **Application analysis** - Automatic discovery of entities, user flows, and assertions
|
|
29
|
-
- **Test generation** - AI-generated test cases based on application analysis
|
|
30
|
-
- **Test execution** - Automated test running with evidence capture
|
|
31
|
-
- **Progress tracking** - Real-time progress notifications with budget status
|
|
32
|
-
- **Checkpoint & resume** - Crawl checkpointing for resumable operations
|
|
33
|
-
- **Security features** - Domain allowlists, injection protection, exfiltration blocking
|
|
34
|
-
- **Resource management** - `retest://` URI scheme for artifact access
|
|
35
|
-
|
|
36
|
-
## Installation
|
|
37
|
-
|
|
38
|
-
```bash
|
|
39
|
-
npm install
|
|
40
|
-
npm run build
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## Testing
|
|
44
|
-
|
|
45
|
-
The project includes multiple test tiers:
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
# Unit tests (fast, uses mocks)
|
|
49
|
-
npm test
|
|
50
|
-
|
|
51
|
-
# Integration tests (MCP protocol, mock Playwright)
|
|
52
|
-
npm run test:integration
|
|
53
|
-
|
|
54
|
-
# E2E tests (real browser, real external sites)
|
|
55
|
-
npm run test:e2e
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
### E2E Testing
|
|
59
|
-
|
|
60
|
-
E2E tests exercise complete workflows with real Playwright MCP against external test sites (demo.playwright.dev/todomvc). They validate:
|
|
61
|
-
|
|
62
|
-
- **Init + Cover workflow**: Shortcut setup, workspace creation, crawl → describe → generate
|
|
63
|
-
- **Retest workflow**: Plan → run → summarize cycle
|
|
64
|
-
- **Error handling**: Budget limits, domain security, input validation
|
|
65
|
-
|
|
66
|
-
**Requirements for E2E tests:**
|
|
67
|
-
- Node.js 22+
|
|
68
|
-
- Network access to demo.playwright.dev
|
|
69
|
-
- Playwright browsers (installed automatically via @playwright/mcp)
|
|
70
|
-
|
|
71
|
-
**Run E2E tests:**
|
|
72
|
-
```bash
|
|
73
|
-
npm run test:e2e
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
E2E tests have extended timeouts (5 minutes per test) and run serially to avoid resource contention. They create isolated temporary workspaces that are cleaned up after each test.
|
|
77
|
-
|
|
78
|
-
## Quick Start
|
|
79
|
-
|
|
80
|
-
RetestKit is designed for **zero-configuration installation**. Just add the server to your MCP client and run `/init` to configure.
|
|
81
|
-
|
|
82
|
-
### Adding to MCP Clients
|
|
18
|
+
Add retest:kit to your MCP client. No configuration needed—just add the server and run `:init` command.
|
|
83
19
|
|
|
84
20
|
**VS Code / GitHub Copilot** (`.vscode/mcp.json`):
|
|
85
21
|
```json
|
|
86
22
|
{
|
|
87
23
|
"servers": {
|
|
88
|
-
"
|
|
24
|
+
"retest": {
|
|
89
25
|
"type": "stdio",
|
|
90
26
|
"command": "npx",
|
|
91
27
|
"args": ["retestkit"]
|
|
@@ -98,7 +34,7 @@ RetestKit is designed for **zero-configuration installation**. Just add the serv
|
|
|
98
34
|
```json
|
|
99
35
|
{
|
|
100
36
|
"mcpServers": {
|
|
101
|
-
"
|
|
37
|
+
"retest": {
|
|
102
38
|
"command": "npx",
|
|
103
39
|
"args": ["retestkit"]
|
|
104
40
|
}
|
|
@@ -106,11 +42,11 @@ RetestKit is designed for **zero-configuration installation**. Just add the serv
|
|
|
106
42
|
}
|
|
107
43
|
```
|
|
108
44
|
|
|
109
|
-
**Cursor / Cline** (settings):
|
|
45
|
+
**Cursor / Cline** (MCP settings):
|
|
110
46
|
```json
|
|
111
47
|
{
|
|
112
48
|
"mcpServers": {
|
|
113
|
-
"
|
|
49
|
+
"retest": {
|
|
114
50
|
"command": "npx",
|
|
115
51
|
"args": ["retestkit"]
|
|
116
52
|
}
|
|
@@ -118,416 +54,64 @@ RetestKit is designed for **zero-configuration installation**. Just add the serv
|
|
|
118
54
|
}
|
|
119
55
|
```
|
|
120
56
|
|
|
121
|
-
> **Note:** No `env` or `inputs` sections needed. All configuration happens via the `/init` prompt after the server starts.
|
|
122
|
-
|
|
123
|
-
### First-Time Setup
|
|
124
|
-
|
|
125
|
-
After adding the server to your MCP client:
|
|
126
|
-
|
|
127
|
-
1. **Run `/init`** - The init prompt guides you through configuration
|
|
128
|
-
2. **Provide target URL** - The URL of the web application to test
|
|
129
|
-
3. **Configuration saved** - Settings are stored in `.mcp/retestkit.json`
|
|
130
|
-
|
|
131
|
-
The `/init` prompt handles:
|
|
132
|
-
- Creating the config file (`.mcp/retestkit.json`)
|
|
133
|
-
- Setting up shortcuts (e.g., `/retest` command)
|
|
134
|
-
- Guiding you to start testing with `/cover`
|
|
135
57
|
|
|
136
|
-
##
|
|
58
|
+
## Your First Test
|
|
137
59
|
|
|
138
|
-
|
|
60
|
+
Once installed, getting started is three commands:
|
|
139
61
|
|
|
140
|
-
|
|
141
|
-
```json
|
|
142
|
-
{
|
|
143
|
-
"version": 1,
|
|
144
|
-
"targetUrl": "https://myapp.com",
|
|
145
|
-
"specsPath": "./specs",
|
|
146
|
-
"allowedDomains": ["myapp.com", "*.myapp.com"],
|
|
147
|
-
"transport": "stdio",
|
|
148
|
-
"port": 3000,
|
|
149
|
-
"workspaceDir": "./retest",
|
|
150
|
-
"limits": {
|
|
151
|
-
"maxSteps": 50,
|
|
152
|
-
"maxMinutes": 30,
|
|
153
|
-
"maxPages": 20
|
|
154
|
-
},
|
|
155
|
-
"logging": {
|
|
156
|
-
"level": "info"
|
|
157
|
-
},
|
|
158
|
-
"playwright": {
|
|
159
|
-
"command": "npx",
|
|
160
|
-
"args": ["@playwright/mcp@latest"]
|
|
161
|
-
},
|
|
162
|
-
"checkpointInterval": 5,
|
|
163
|
-
"screenshotFormat": "png",
|
|
164
|
-
"screenshotQuality": 80
|
|
165
|
-
}
|
|
62
|
+
### 1. Initialize
|
|
166
63
|
```
|
|
167
|
-
|
|
168
|
-
**Config file discovery order:**
|
|
169
|
-
1. CLI flag: `--config /path/to/config.json`
|
|
170
|
-
2. Environment: `RETESTKIT_CONFIG=/path/to/config.json`
|
|
171
|
-
3. Workspace: `./.mcp/retestkit.json`
|
|
172
|
-
4. User-level: `~/.config/retestkit/config.json`
|
|
173
|
-
5. Built-in defaults
|
|
174
|
-
|
|
175
|
-
> **Note:** Environment variables are **not supported** for configuration values. Only `RETESTKIT_CONFIG` is recognized (to specify the config file path for CI/CD pipelines).
|
|
176
|
-
|
|
177
|
-
## Authentication
|
|
178
|
-
|
|
179
|
-
RetestKit supports OAuth 2.0 Device Code Flow authentication for accessing protected features. Authentication is handled via the `auth` MCP tool.
|
|
180
|
-
|
|
181
|
-
### Quick Start
|
|
182
|
-
|
|
64
|
+
/retest:init
|
|
183
65
|
```
|
|
184
|
-
|
|
185
|
-
auth({ action: "status" })
|
|
66
|
+
Tell retest:kit your target URL and it sets everything up.
|
|
186
67
|
|
|
187
|
-
|
|
188
|
-
auth({ action: "login" })
|
|
189
|
-
|
|
190
|
-
# Log out
|
|
191
|
-
auth({ action: "logout" })
|
|
68
|
+
### 2. Explore & Generate
|
|
192
69
|
```
|
|
193
|
-
|
|
194
|
-
### How It Works
|
|
195
|
-
|
|
196
|
-
The device code flow is designed for STDIO-based tools that can't receive HTTP callbacks:
|
|
197
|
-
|
|
198
|
-
1. Call `auth({ action: "login" })` to start the flow
|
|
199
|
-
2. A browser window opens (or a URL is displayed) for authentication
|
|
200
|
-
3. Complete login in your browser
|
|
201
|
-
4. The tool polls for completion and stores tokens securely
|
|
202
|
-
|
|
203
|
-
### Tool Parameters
|
|
204
|
-
|
|
205
|
-
| Parameter | Type | Default | Description |
|
|
206
|
-
|-----------|------|---------|-------------|
|
|
207
|
-
| `action` | string | `"login"` | Action: `login`, `status`, `logout`, or `continue` |
|
|
208
|
-
| `wait` | boolean | `true` | Wait for login completion (login/continue only) |
|
|
209
|
-
| `waitSeconds` | number | `25` | Max seconds to wait before returning pending status |
|
|
210
|
-
|
|
211
|
-
### Actions
|
|
212
|
-
|
|
213
|
-
- **`login`** - Start device code flow. If already logged in, returns current status.
|
|
214
|
-
- **`status`** - Check current authentication status without starting a new flow.
|
|
215
|
-
- **`logout`** - Clear stored tokens and end the session.
|
|
216
|
-
- **`continue`** - Resume polling for a pending login (useful for short MCP timeouts).
|
|
217
|
-
|
|
218
|
-
### Example Responses
|
|
219
|
-
|
|
220
|
-
**Pending login:**
|
|
221
|
-
```json
|
|
222
|
-
{
|
|
223
|
-
"status": "pending",
|
|
224
|
-
"message": "Open the URL below to complete login...",
|
|
225
|
-
"deviceFlow": {
|
|
226
|
-
"verificationUri": "https://auth.retestkit.dev/device",
|
|
227
|
-
"verificationUriComplete": "https://auth.retestkit.dev/device?code=ABCD-1234",
|
|
228
|
-
"userCode": "ABCD-1234",
|
|
229
|
-
"expiresAt": "2025-01-15T10:15:00Z"
|
|
230
|
-
}
|
|
231
|
-
}
|
|
70
|
+
/retest:cover
|
|
232
71
|
```
|
|
72
|
+
The AI crawls your app, identifies features, and generates test cases.
|
|
233
73
|
|
|
234
|
-
|
|
235
|
-
```json
|
|
236
|
-
{
|
|
237
|
-
"status": "logged_in",
|
|
238
|
-
"message": "Logged in as user@example.com",
|
|
239
|
-
"user": {
|
|
240
|
-
"email": "user@example.com",
|
|
241
|
-
"name": "User Name"
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
```
|
|
245
|
-
|
|
246
|
-
### Token Storage
|
|
247
|
-
|
|
248
|
-
Tokens are stored securely using:
|
|
249
|
-
1. **OS Keychain** (preferred) - macOS Keychain, Windows Credential Manager, Linux libsecret
|
|
250
|
-
2. **Encrypted file** (fallback) - `~/.config/retestkit/tokens.enc` with 0600 permissions
|
|
251
|
-
|
|
252
|
-
### Auth Configuration
|
|
253
|
-
|
|
254
|
-
Optional auth configuration in `.mcp/retestkit.json`:
|
|
255
|
-
|
|
256
|
-
```json
|
|
257
|
-
{
|
|
258
|
-
"auth": {
|
|
259
|
-
"authentikBaseUrl": "https://auth.retestkit.dev",
|
|
260
|
-
"clientId": "retestkit-mcp",
|
|
261
|
-
"scopes": "openid profile email offline_access"
|
|
262
|
-
}
|
|
263
|
-
}
|
|
74
|
+
### 3. Run Tests
|
|
264
75
|
```
|
|
265
|
-
|
|
266
|
-
> **Note:** Default values work out of the box. Only customize if using a different authentication provider.
|
|
267
|
-
|
|
268
|
-
## Available Tools
|
|
269
|
-
|
|
270
|
-
### `auth`
|
|
271
|
-
|
|
272
|
-
Manage authentication for protected RetestKit features.
|
|
273
|
-
|
|
274
|
-
**Input:**
|
|
275
|
-
```json
|
|
276
|
-
{
|
|
277
|
-
"action": "login",
|
|
278
|
-
"wait": true,
|
|
279
|
-
"waitSeconds": 25
|
|
280
|
-
}
|
|
76
|
+
/retest
|
|
281
77
|
```
|
|
78
|
+
Execute your tests and get a summary of what passed (and what didn't).
|
|
282
79
|
|
|
283
|
-
|
|
80
|
+
That's it. You now have AI-powered tests for your web app.
|
|
284
81
|
|
|
285
|
-
**Output:** Status, user info (when logged in), device flow info (when pending)
|
|
286
82
|
|
|
287
|
-
|
|
83
|
+
## Learn More
|
|
288
84
|
|
|
289
|
-
|
|
85
|
+
| Topic | Link |
|
|
86
|
+
|-------|------|
|
|
87
|
+
| Full configuration options | [docs/configuration.md](docs/configuration.md) |
|
|
88
|
+
| All MCP tools | [docs/tools-reference.md](docs/tools-reference.md) |
|
|
89
|
+
| Authentication | [docs/authentication.md](docs/authentication.md) |
|
|
90
|
+
| Security | [docs/security.md](docs/security.md) |
|
|
91
|
+
| Contributing | [docs/development.md](docs/development.md) |
|
|
290
92
|
|
|
291
|
-
|
|
93
|
+
Full documentation: [docs/](docs/)
|
|
292
94
|
|
|
293
|
-
**Input:**
|
|
294
|
-
```json
|
|
295
|
-
{
|
|
296
|
-
"url": "https://example.com",
|
|
297
|
-
"focus": "User authentication flow",
|
|
298
|
-
"limits": {
|
|
299
|
-
"maxSteps": 50,
|
|
300
|
-
"maxMinutes": 30,
|
|
301
|
-
"maxPages": 20
|
|
302
|
-
},
|
|
303
|
-
"allowedDomains": ["example.com", "*.example.com"]
|
|
304
|
-
}
|
|
305
|
-
```
|
|
306
|
-
|
|
307
|
-
**Output:** `analysisId` (e.g., `2025-01-15_10-30`), `workspacePath`
|
|
308
|
-
|
|
309
|
-
### `retest_crawl`
|
|
310
|
-
|
|
311
|
-
Perform goal-directed crawling of a web application.
|
|
312
|
-
|
|
313
|
-
**Input:**
|
|
314
|
-
```json
|
|
315
|
-
{
|
|
316
|
-
"analysisId": "2025-01-15_10-30",
|
|
317
|
-
"goal": "Navigate to login page and explore authentication options",
|
|
318
|
-
"strategy": "goal_directed",
|
|
319
|
-
"limits": { "maxSteps": 30 },
|
|
320
|
-
"artifacts": { "captureScreenshots": true, "captureSnapshots": true, "captureDom": true },
|
|
321
|
-
"resume": false
|
|
322
|
-
}
|
|
323
|
-
```
|
|
324
|
-
|
|
325
|
-
**Features:**
|
|
326
|
-
- AI-powered navigation decisions via MCP Sampling
|
|
327
|
-
- Loop detection (DOM signatures, URL cycles, action repeats)
|
|
328
|
-
- Budget enforcement (steps, time, pages)
|
|
329
|
-
- Checkpointing every N steps (configurable)
|
|
330
|
-
- Elicitation for user decisions (cookie consent, modals, auth)
|
|
331
|
-
- Domain validation and security checks
|
|
332
|
-
|
|
333
|
-
**Output:** `crawlId` (e.g., `2025-01-15_10-30-45`), `crawlPath`, page artifacts
|
|
334
|
-
|
|
335
|
-
### `retest_describe`
|
|
336
|
-
|
|
337
|
-
Discover application features, modules, and user flows from crawl data.
|
|
338
|
-
|
|
339
|
-
**Input:**
|
|
340
|
-
```json
|
|
341
|
-
{
|
|
342
|
-
"analysisId": "2025-01-15_10-30",
|
|
343
|
-
"crawlId": "2025-01-15_10-30-45",
|
|
344
|
-
"discoverFlows": true
|
|
345
|
-
}
|
|
346
|
-
```
|
|
347
|
-
|
|
348
|
-
**Output:** `featuresUri`, `featuresFilePath` containing:
|
|
349
|
-
- Application purpose and type
|
|
350
|
-
- Discovered features with descriptions
|
|
351
|
-
- Entities and entry points per feature
|
|
352
|
-
- User flows within each feature
|
|
353
|
-
- Security and accessibility observations
|
|
354
|
-
|
|
355
|
-
### `retest_generate`
|
|
356
|
-
|
|
357
|
-
Generate test cases from application analysis.
|
|
358
|
-
|
|
359
|
-
**Input:**
|
|
360
|
-
```json
|
|
361
|
-
{
|
|
362
|
-
"analysisId": "2025-01-15_10-30",
|
|
363
|
-
"testStrategy": "comprehensive",
|
|
364
|
-
"maxTests": 20,
|
|
365
|
-
"focusFlows": ["checkout-flow", "login-flow"]
|
|
366
|
-
}
|
|
367
|
-
```
|
|
368
|
-
|
|
369
|
-
**Output:** `testsUri`, `testsFilePath` containing test cases with:
|
|
370
|
-
- ID, name, purpose, category
|
|
371
|
-
- Preconditions and steps
|
|
372
|
-
- Expected outcomes
|
|
373
|
-
|
|
374
|
-
### `retest_run_test`
|
|
375
|
-
|
|
376
|
-
Execute a generated test case.
|
|
377
|
-
|
|
378
|
-
**Input:**
|
|
379
|
-
```json
|
|
380
|
-
{
|
|
381
|
-
"analysisId": "2025-01-15_10-30",
|
|
382
|
-
"testCaseId": "TC-001",
|
|
383
|
-
"runOptions": {
|
|
384
|
-
"captureEvidence": true,
|
|
385
|
-
"stopOnFailure": true,
|
|
386
|
-
"retryFailedSteps": false
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
```
|
|
390
|
-
|
|
391
|
-
**Output:** `runId`, `reportUri`, step results with:
|
|
392
|
-
- Pass/fail status per step
|
|
393
|
-
- Evidence (screenshots, DOM state)
|
|
394
|
-
- Failure reasoning and discrepancies
|
|
395
|
-
|
|
396
|
-
## Resources
|
|
397
|
-
|
|
398
|
-
The server exposes resources via the `retest://` URI scheme:
|
|
399
|
-
|
|
400
|
-
- `retest://{analysisId}/index.md` - Workspace metadata and summary
|
|
401
|
-
- `retest://{analysisId}/crawls/{crawlId}/index.md` - Crawl index with action history
|
|
402
|
-
- `retest://{analysisId}/crawls/{crawlId}/checkpoint.md` - Crawl checkpoint state
|
|
403
|
-
- `retest://{analysisId}/crawls/{crawlId}/pages/{pageId}/snapshot.md` - Page accessibility snapshot
|
|
404
|
-
- `retest://{analysisId}/crawls/{crawlId}/pages/{pageId}/screenshot.png` - Page screenshot
|
|
405
|
-
- `retest://{analysisId}/crawls/{crawlId}/pages/{pageId}/dom.html` - Page DOM
|
|
406
|
-
- `retest://{analysisId}/features/features.md` - Discovered features
|
|
407
|
-
- `retest://{analysisId}/features/{featureSlug}/flows.md` - User flows for a feature
|
|
408
|
-
- `retest://{analysisId}/tests/tests.md` - Generated test cases
|
|
409
|
-
- `retest://{analysisId}/runs/{runId}/report.md` - Test run report
|
|
410
|
-
- `retest://{analysisId}/runs/{runId}/steps/{n}/snapshot.md` - Step evidence snapshot
|
|
411
|
-
|
|
412
|
-
### Artifact Format
|
|
413
|
-
|
|
414
|
-
All artifacts (except screenshots and DOM) use **Markdown with YAML frontmatter**:
|
|
415
|
-
|
|
416
|
-
```markdown
|
|
417
95
|
---
|
|
418
|
-
analysisId: "2025-01-15_10-30"
|
|
419
|
-
url: "https://example.com"
|
|
420
|
-
status: "active"
|
|
421
|
-
# ... structured data in YAML ...
|
|
422
|
-
---
|
|
423
|
-
|
|
424
|
-
# Human-Readable Content
|
|
425
|
-
|
|
426
|
-
This section contains formatted markdown for easy browsing.
|
|
427
|
-
```
|
|
428
|
-
|
|
429
|
-
**Benefits:**
|
|
430
|
-
- Human-readable without special tools
|
|
431
|
-
- Structured data accessible via frontmatter parsing
|
|
432
|
-
- Works with any markdown viewer or IDE
|
|
433
|
-
- Git-friendly diffs
|
|
434
|
-
|
|
435
|
-
**Parsing frontmatter programmatically:**
|
|
436
|
-
```typescript
|
|
437
|
-
import matter from "gray-matter";
|
|
438
|
-
|
|
439
|
-
const { data, content } = matter(markdownContent);
|
|
440
|
-
// data = parsed YAML frontmatter object
|
|
441
|
-
// content = markdown body
|
|
442
|
-
```
|
|
443
|
-
|
|
444
|
-
### Workspace Folder Naming
|
|
445
|
-
|
|
446
|
-
Workspaces use date-time based folder names for easy identification:
|
|
447
|
-
- **Workspace ID**: `YYYY-MM-DD_HH-mm` (e.g., `2025-01-15_10-30`)
|
|
448
|
-
- **Crawl ID**: `YYYY-MM-DD_HH-mm-ss` (e.g., `2025-01-15_10-30-45`)
|
|
449
|
-
|
|
450
|
-
Legacy UUID-format IDs are still supported for backwards compatibility.
|
|
451
|
-
|
|
452
|
-
## Prompts
|
|
453
|
-
|
|
454
|
-
The server provides prompts for guided workflows:
|
|
455
96
|
|
|
456
|
-
|
|
457
|
-
- **crawl** - Start or continue crawling
|
|
458
|
-
- **describe** - Discover features and flows (unified discovery)
|
|
459
|
-
- **discover** - Discover features, or flows for a specific feature
|
|
460
|
-
- **generate** - Generate test cases
|
|
461
|
-
- **init** - Initialize a new analysis or set up shortcuts
|
|
462
|
-
- **kit** - Complete testing workflow (plan, run, summarize, update)
|
|
463
|
-
- **plan** - Create a test plan based on changes
|
|
464
|
-
- **run** - Execute a test case
|
|
465
|
-
- **summarize** - Generate test result summary with suggestions
|
|
466
|
-
|
|
467
|
-
## Example Workflow
|
|
468
|
-
|
|
469
|
-
```
|
|
470
|
-
1. Start analysis:
|
|
471
|
-
retest_init({ url: "https://myapp.com", focus: "checkout flow" })
|
|
472
|
-
→ Returns analysisId
|
|
473
|
-
|
|
474
|
-
2. Crawl the application:
|
|
475
|
-
retest_crawl({ analysisId, goal: "Explore product catalog and checkout" })
|
|
476
|
-
→ Returns crawlId, artifacts
|
|
477
|
-
|
|
478
|
-
3. Describe features and flows:
|
|
479
|
-
retest_describe({ analysisId, crawlId, discoverFlows: true })
|
|
480
|
-
→ Returns discovered features and flows
|
|
481
|
-
|
|
482
|
-
4. Generate test cases:
|
|
483
|
-
retest_generate({ analysisId })
|
|
484
|
-
→ Returns test cases
|
|
485
|
-
|
|
486
|
-
5. Run tests:
|
|
487
|
-
retest_run_test({ analysisId, testCaseId })
|
|
488
|
-
→ Returns test results with evidence
|
|
489
|
-
```
|
|
490
|
-
|
|
491
|
-
## MCP Client Requirements
|
|
492
|
-
|
|
493
|
-
For full functionality, the MCP client should support:
|
|
97
|
+
## License
|
|
494
98
|
|
|
495
|
-
|
|
496
|
-
|------------|----------|----------|
|
|
497
|
-
| `sampling` | Recommended | AI-powered crawling, analysis, test generation |
|
|
498
|
-
| `elicitation` | Optional | User decisions during crawl (cookie consent, auth) |
|
|
499
|
-
| `logging` | Optional | Structured log delivery via MCP notifications |
|
|
500
|
-
| `resources.listChanged` | Optional | Real-time resource update notifications |
|
|
501
|
-
| `resources.subscribe` | Optional | Resource subscription support |
|
|
99
|
+
**Proprietary software.** Use requires a separate written agreement.
|
|
502
100
|
|
|
503
|
-
|
|
101
|
+
You may use this software only if:
|
|
102
|
+
- You have a written agreement with the Licensor
|
|
103
|
+
- You test only systems you are authorized to test
|
|
504
104
|
|
|
505
|
-
|
|
105
|
+
See [LICENSE](./LICENSE) for details.
|
|
506
106
|
|
|
507
|
-
|
|
107
|
+
---
|
|
508
108
|
|
|
509
|
-
|
|
510
|
-
- **Prompt injection protection** - Untrusted content demarcation in AI prompts
|
|
511
|
-
- **Data exfiltration blocking** - Prevents sensitive data leakage
|
|
512
|
-
- **Credential elicitation blocking** - Refuses to ask for passwords
|
|
513
|
-
- **Audit logging** - All AI inputs/outputs logged for review
|
|
514
|
-
- **Sensitive data redaction** - URL params, cookies, passwords redacted in logs
|
|
109
|
+
## Get Access
|
|
515
110
|
|
|
516
|
-
|
|
111
|
+
To request commercial access or licensing:
|
|
517
112
|
|
|
518
|
-
To request commercial access or a license agreement, contact:
|
|
519
113
|
**Ing. Jan Beránek** — honza@beranku.cz
|
|
520
114
|
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
If you discover a security issue, please report it privately to the contact above.
|
|
524
|
-
Do not open public issues containing sensitive details.
|
|
525
|
-
|
|
526
|
-
## Repository Status
|
|
527
|
-
|
|
528
|
-
Unless explicitly stated in a separate agreement, this repository is provided **without warranty** and **without support obligations**.
|
|
529
|
-
|
|
530
|
-
## License
|
|
115
|
+
---
|
|
531
116
|
|
|
532
|
-
|
|
533
|
-
All rights reserved. See **[LICENSE](./LICENSE)**.
|
|
117
|
+
<sub>Built with care for teams who believe testing should be intelligent, not tedious.</sub>
|
package/dist/auth/index.d.ts
CHANGED
package/dist/auth/index.js
CHANGED
|
@@ -61,9 +61,9 @@ function buildErrorMessage(missingFields, toolName) {
|
|
|
61
61
|
const fieldList = missingFields.join(", ");
|
|
62
62
|
const toolContext = toolName ? ` for ${toolName}` : "";
|
|
63
63
|
if (missingFields.length === 1) {
|
|
64
|
-
return `Configuration required${toolContext}: ${fieldList} is not set. Run the init tool to configure
|
|
64
|
+
return `Configuration required${toolContext}: ${fieldList} is not set. Run the init tool to configure retest:kit.`;
|
|
65
65
|
}
|
|
66
|
-
return `Configuration required${toolContext}: ${fieldList} are not set. Run the init tool to configure
|
|
66
|
+
return `Configuration required${toolContext}: ${fieldList} are not set. Run the init tool to configure retest:kit.`;
|
|
67
67
|
}
|
|
68
68
|
/**
|
|
69
69
|
* Guard that checks configuration and returns NOT_CONFIGURED error if missing.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"not-configured.js","sourceRoot":"","sources":["../../src/errors/not-configured.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAqB7C;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CACjC,cAA6B;IAE7B,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC;IAE/B,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC;IACxD,CAAC;IAED,MAAM,OAAO,GAAa,EAAE,CAAC;IAE7B,KAAK,MAAM,KAAK,IAAI,cAAc,EAAE,CAAC;QACnC,QAAQ,KAAK,EAAE,CAAC;YACd,KAAK,WAAW;gBACd,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;oBACtB,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;gBAC5B,CAAC;gBACD,MAAM;YACR,KAAK,WAAW;gBACd,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;oBACtB,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;gBAC5B,CAAC;gBACD,MAAM;YACR,KAAK,gBAAgB;gBACnB,IAAI,CAAC,MAAM,CAAC,cAAc,IAAI,MAAM,CAAC,cAAc,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;oBACjE,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;gBACjC,CAAC;gBACD,MAAM;QACV,CAAC;IACH,CAAC;IAED,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC;AACvD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,wBAAwB,CACtC,aAAuB,EACvB,QAAiB;IAEjB,MAAM,KAAK,GAAuB;QAChC,IAAI,EAAE,gBAAgB;QACtB,OAAO,EAAE,aAAa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AS,yDAAyD,CAAC;IACrH,CAAC;IAED,OAAO,yBAAyB,WAAW,KAAK,SAAS,0DAA0D,CAAC;AACtH,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,aAAa,CAC3B,cAA6B,EAC7B,QAAiB;IAEjB,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,mBAAmB,CAAC,cAAc,CAAC,CAAC;IAEpE,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,OAAO,wBAAwB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IACrD,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAczD,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,KAAK,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;KACpB,CAAC,CAAC;IACH,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC;QACvD,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;QAC3B,OAAO,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC;KACzC,CAAC,CAAC,CAAC;CACL;AAED,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,MAAM,aAAa,GAC9B,SAAS,EAAE,CA0Ub"}
|