retestkit 1.4.1 → 1.5.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 +59 -40
- package/dist/config.js +8 -8
- package/dist/config.js.map +1 -1
- package/dist/logger.js +1 -1
- package/dist/logger.js.map +1 -1
- package/dist/prompts/index.d.ts +1 -1
- package/dist/prompts/index.d.ts.map +1 -1
- package/dist/prompts/index.js +21 -21
- package/dist/prompts/index.js.map +1 -1
- package/dist/prompts/templates/mcp/retest-crawl.md +7 -0
- package/{src/prompts/templates/mcp/webtest-discover-flows.md → dist/prompts/templates/mcp/retest-discover-flows.md} +1 -1
- package/{src/prompts/templates/mcp/webtest-discover.md → dist/prompts/templates/mcp/retest-discover.md} +2 -2
- package/dist/prompts/templates/mcp/retest-full-workflow.md +12 -0
- package/{src/prompts/templates/mcp/webtest-generate-tests.md → dist/prompts/templates/mcp/retest-generate-tests.md} +1 -1
- package/{src/prompts/templates/mcp/webtest-run-test.md → dist/prompts/templates/mcp/retest-run-test.md} +1 -1
- package/{src/prompts/templates/mcp/webtest-start.md → dist/prompts/templates/mcp/retest-start.md} +1 -1
- package/{src → dist}/prompts/templates/sampling/system-prefix.md +1 -1
- package/dist/resources/index.js +7 -7
- package/dist/resources/index.js.map +1 -1
- package/dist/schemas/config.js +2 -2
- package/dist/schemas/config.js.map +1 -1
- package/dist/security/index.js +1 -1
- package/dist/security/index.js.map +1 -1
- package/dist/server.js +3 -3
- package/dist/server.js.map +1 -1
- package/dist/test-utils/mock-context.js +22 -22
- package/dist/test-utils/mock-context.js.map +1 -1
- package/dist/tools/index.d.ts +1 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +5 -5
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/retest/crawl.d.ts.map +1 -0
- package/dist/tools/{webtest → retest}/crawl.js +7 -7
- package/dist/tools/retest/crawl.js.map +1 -0
- package/dist/tools/retest/discover-features.d.ts.map +1 -0
- package/dist/tools/{webtest → retest}/discover-features.js +6 -6
- package/dist/tools/retest/discover-features.js.map +1 -0
- package/dist/tools/retest/discover-flows.d.ts.map +1 -0
- package/dist/tools/{webtest → retest}/discover-flows.js +6 -6
- package/dist/tools/retest/discover-flows.js.map +1 -0
- package/dist/tools/retest/generate-tests.d.ts.map +1 -0
- package/dist/tools/{webtest → retest}/generate-tests.js +5 -5
- package/dist/tools/retest/generate-tests.js.map +1 -0
- package/dist/tools/retest/index.d.ts.map +1 -0
- package/dist/tools/retest/index.js.map +1 -0
- package/dist/tools/retest/run-test-case.d.ts.map +1 -0
- package/dist/tools/{webtest → retest}/run-test-case.js +3 -3
- package/dist/tools/retest/run-test-case.js.map +1 -0
- package/dist/tools/retest/schemas.d.ts.map +1 -0
- package/dist/tools/retest/schemas.js.map +1 -0
- package/dist/tools/retest/start-analysis.d.ts.map +1 -0
- package/dist/tools/{webtest → retest}/start-analysis.js +5 -5
- package/dist/tools/retest/start-analysis.js.map +1 -0
- package/dist/workspace/index.js +8 -8
- package/dist/workspace/index.js.map +1 -1
- package/dist/workspace/types.d.ts +2 -2
- package/dist/workspace/types.d.ts.map +1 -1
- package/package.json +6 -2
- package/.claude/commands/openspec/apply.md +0 -23
- package/.claude/commands/openspec/archive.md +0 -27
- package/.claude/commands/openspec/proposal.md +0 -28
- package/.gemini/commands/openspec/apply.toml +0 -21
- package/.gemini/commands/openspec/archive.toml +0 -25
- package/.gemini/commands/openspec/proposal.toml +0 -26
- package/.github/prompts/openspec-apply.prompt.md +0 -22
- package/.github/prompts/openspec-archive.prompt.md +0 -26
- package/.github/prompts/openspec-proposal.prompt.md +0 -27
- package/.github/workflows/release.yml +0 -33
- package/.kilocode/workflows/openspec-apply.md +0 -17
- package/.kilocode/workflows/openspec-archive.md +0 -21
- package/.kilocode/workflows/openspec-proposal.md +0 -22
- package/.mcp.json +0 -23
- package/.opencode/command/openspec-apply.md +0 -25
- package/.opencode/command/openspec-archive.md +0 -28
- package/.opencode/command/openspec-proposal.md +0 -30
- package/.roo/commands/openspec-apply.md +0 -20
- package/.roo/commands/openspec-archive.md +0 -24
- package/.roo/commands/openspec-proposal.md +0 -25
- package/.vscode/mcp.json +0 -23
- package/AGENTS.md +0 -18
- package/CLAUDE.md +0 -18
- package/dist/tools/webtest/crawl.d.ts.map +0 -1
- package/dist/tools/webtest/crawl.js.map +0 -1
- package/dist/tools/webtest/discover-features.d.ts.map +0 -1
- package/dist/tools/webtest/discover-features.js.map +0 -1
- package/dist/tools/webtest/discover-flows.d.ts.map +0 -1
- package/dist/tools/webtest/discover-flows.js.map +0 -1
- package/dist/tools/webtest/generate-tests.d.ts.map +0 -1
- package/dist/tools/webtest/generate-tests.js.map +0 -1
- package/dist/tools/webtest/index.d.ts.map +0 -1
- package/dist/tools/webtest/index.js.map +0 -1
- package/dist/tools/webtest/run-test-case.d.ts.map +0 -1
- package/dist/tools/webtest/run-test-case.js.map +0 -1
- package/dist/tools/webtest/schemas.d.ts.map +0 -1
- package/dist/tools/webtest/schemas.js.map +0 -1
- package/dist/tools/webtest/start-analysis.d.ts.map +0 -1
- package/dist/tools/webtest/start-analysis.js.map +0 -1
- package/openspec/AGENTS.md +0 -456
- package/openspec/changes/archive/2025-12-18-add-hybrid-artifact-paths/proposal.md +0 -33
- package/openspec/changes/archive/2025-12-18-add-hybrid-artifact-paths/specs/webtest-resources/spec.md +0 -27
- package/openspec/changes/archive/2025-12-18-add-hybrid-artifact-paths/specs/webtest-tools/spec.md +0 -304
- package/openspec/changes/archive/2025-12-18-add-hybrid-artifact-paths/tasks.md +0 -43
- package/openspec/changes/archive/2025-12-18-add-mcp-server-foundation/design.md +0 -209
- package/openspec/changes/archive/2025-12-18-add-mcp-server-foundation/proposal.md +0 -41
- package/openspec/changes/archive/2025-12-18-add-mcp-server-foundation/specs/mcp-server-core/spec.md +0 -183
- package/openspec/changes/archive/2025-12-18-add-mcp-server-foundation/tasks.md +0 -112
- package/openspec/changes/archive/2025-12-18-add-webtest-orchestrator/design.md +0 -333
- package/openspec/changes/archive/2025-12-18-add-webtest-orchestrator/proposal.md +0 -66
- package/openspec/changes/archive/2025-12-18-add-webtest-orchestrator/specs/mcp-server-core/spec.md +0 -129
- package/openspec/changes/archive/2025-12-18-add-webtest-orchestrator/specs/webtest-lifecycle/spec.md +0 -138
- package/openspec/changes/archive/2025-12-18-add-webtest-orchestrator/specs/webtest-logging/spec.md +0 -211
- package/openspec/changes/archive/2025-12-18-add-webtest-orchestrator/specs/webtest-prompts/spec.md +0 -157
- package/openspec/changes/archive/2025-12-18-add-webtest-orchestrator/specs/webtest-resources/spec.md +0 -213
- package/openspec/changes/archive/2025-12-18-add-webtest-orchestrator/specs/webtest-sampling/spec.md +0 -257
- package/openspec/changes/archive/2025-12-18-add-webtest-orchestrator/specs/webtest-tools/spec.md +0 -501
- package/openspec/changes/archive/2025-12-18-add-webtest-orchestrator/tasks.md +0 -264
- package/openspec/changes/archive/2025-12-18-allow-analysis-of-incomplete-crawls/proposal.md +0 -24
- package/openspec/changes/archive/2025-12-18-allow-analysis-of-incomplete-crawls/specs/webtest-tools/spec.md +0 -80
- package/openspec/changes/archive/2025-12-18-allow-analysis-of-incomplete-crawls/tasks.md +0 -8
- package/openspec/changes/archive/2025-12-18-fix-crawl-loop-stability/design.md +0 -90
- package/openspec/changes/archive/2025-12-18-fix-crawl-loop-stability/proposal.md +0 -28
- package/openspec/changes/archive/2025-12-18-fix-crawl-loop-stability/specs/webtest-sampling/spec.md +0 -90
- package/openspec/changes/archive/2025-12-18-fix-crawl-loop-stability/tasks.md +0 -33
- package/openspec/changes/archive/2025-12-18-use-markdown-artifacts/design.md +0 -558
- package/openspec/changes/archive/2025-12-18-use-markdown-artifacts/proposal.md +0 -119
- package/openspec/changes/archive/2025-12-18-use-markdown-artifacts/specs/webtest-resources/spec.md +0 -109
- package/openspec/changes/archive/2025-12-18-use-markdown-artifacts/specs/webtest-tools/spec.md +0 -121
- package/openspec/changes/archive/2025-12-18-use-markdown-artifacts/tasks.md +0 -133
- package/openspec/changes/extract-prompts-to-markdown/design.md +0 -86
- package/openspec/changes/extract-prompts-to-markdown/proposal.md +0 -50
- package/openspec/changes/extract-prompts-to-markdown/specs/webtest-prompts/spec.md +0 -74
- package/openspec/changes/extract-prompts-to-markdown/tasks.md +0 -40
- package/openspec/changes/refactor-webtest-naming/design.md +0 -95
- package/openspec/changes/refactor-webtest-naming/proposal.md +0 -66
- package/openspec/changes/refactor-webtest-naming/specs/webtest-prompts/spec.md +0 -79
- package/openspec/changes/refactor-webtest-naming/specs/webtest-resources/spec.md +0 -80
- package/openspec/changes/refactor-webtest-naming/specs/webtest-sampling/spec.md +0 -122
- package/openspec/changes/refactor-webtest-naming/specs/webtest-tools/spec.md +0 -113
- package/openspec/changes/refactor-webtest-naming/tasks.md +0 -119
- package/openspec/changes/rename-package-to-retest/proposal.md +0 -52
- package/openspec/changes/rename-package-to-retest/specs/mcp-server-core/spec.md +0 -53
- package/openspec/changes/rename-package-to-retest/specs/retest-lifecycle/spec.md +0 -68
- package/openspec/changes/rename-package-to-retest/specs/retest-logging/spec.md +0 -35
- package/openspec/changes/rename-package-to-retest/specs/retest-prompts/spec.md +0 -159
- package/openspec/changes/rename-package-to-retest/specs/retest-resources/spec.md +0 -251
- package/openspec/changes/rename-package-to-retest/specs/retest-sampling/spec.md +0 -99
- package/openspec/changes/rename-package-to-retest/specs/retest-tools/spec.md +0 -295
- package/openspec/changes/rename-package-to-retest/tasks.md +0 -71
- package/openspec/project.md +0 -31
- package/openspec/specs/mcp-server-core/spec.md +0 -178
- package/openspec/specs/webtest-lifecycle/spec.md +0 -136
- package/openspec/specs/webtest-logging/spec.md +0 -209
- package/openspec/specs/webtest-prompts/spec.md +0 -155
- package/openspec/specs/webtest-resources/spec.md +0 -248
- package/openspec/specs/webtest-sampling/spec.md +0 -344
- package/openspec/specs/webtest-tools/spec.md +0 -282
- package/release.config.js +0 -9
- package/src/config.test.ts +0 -96
- package/src/config.ts +0 -32
- package/src/elicitation/index.test.ts +0 -399
- package/src/elicitation/index.ts +0 -171
- package/src/elicitation/types.ts +0 -68
- package/src/index.ts +0 -83
- package/src/lifecycle/index.test.ts +0 -260
- package/src/lifecycle/index.ts +0 -101
- package/src/logger.redaction.test.ts +0 -322
- package/src/logger.test.ts +0 -123
- package/src/logger.ts +0 -229
- package/src/playwright-client/index.ts +0 -392
- package/src/playwright-client/types.ts +0 -99
- package/src/progress/index.test.ts +0 -327
- package/src/progress/index.ts +0 -170
- package/src/progress/types.ts +0 -25
- package/src/prompts/index.test.ts +0 -451
- package/src/prompts/index.ts +0 -246
- package/src/prompts/loader.test.ts +0 -100
- package/src/prompts/loader.ts +0 -59
- package/src/prompts/templates/mcp/webtest-crawl.md +0 -7
- package/src/prompts/templates/mcp/webtest-full-workflow.md +0 -12
- package/src/resources/index.ts +0 -250
- package/src/resources/subscriptions.ts +0 -37
- package/src/sampling/index.test.ts +0 -414
- package/src/sampling/index.ts +0 -286
- package/src/sampling/prompts.ts +0 -194
- package/src/sampling/types.ts +0 -60
- package/src/schemas/config.ts +0 -39
- package/src/security/index.test.ts +0 -441
- package/src/security/index.ts +0 -361
- package/src/security/security-scenarios.test.ts +0 -468
- package/src/server.ts +0 -211
- package/src/test-utils/index.ts +0 -6
- package/src/test-utils/mock-context.ts +0 -426
- package/src/test-utils/mock-playwright-client.ts +0 -422
- package/src/tools/index.ts +0 -11
- package/src/tools/webtest/crawl.test.ts +0 -834
- package/src/tools/webtest/crawl.ts +0 -901
- package/src/tools/webtest/discover-features.ts +0 -412
- package/src/tools/webtest/discover-flows.ts +0 -408
- package/src/tools/webtest/generate-tests.test.ts +0 -532
- package/src/tools/webtest/generate-tests.ts +0 -425
- package/src/tools/webtest/index.ts +0 -7
- package/src/tools/webtest/integration.test.ts +0 -536
- package/src/tools/webtest/run-test-case.test.ts +0 -659
- package/src/tools/webtest/run-test-case.ts +0 -508
- package/src/tools/webtest/schemas.ts +0 -201
- package/src/tools/webtest/start-analysis.test.ts +0 -151
- package/src/tools/webtest/start-analysis.ts +0 -158
- package/src/transports/http.ts +0 -19
- package/src/transports/index.ts +0 -30
- package/src/transports/stdio.ts +0 -7
- package/src/types/capabilities.test.ts +0 -193
- package/src/types/capabilities.ts +0 -50
- package/src/types/context.ts +0 -21
- package/src/types/tool.ts +0 -11
- package/src/workspace/index.ts +0 -945
- package/src/workspace/markdown.ts +0 -272
- package/src/workspace/types.ts +0 -186
- package/tests/integration/server.test.ts +0 -89
- package/tests/integration/tools.test.ts +0 -99
- package/tsconfig.json +0 -20
- package/vitest.config.ts +0 -9
- package/vitest.integration.config.ts +0 -10
- /package/{src → dist}/prompts/templates/sampling/crawl-action.md +0 -0
- /package/{src → dist}/prompts/templates/sampling/feature-discovery.md +0 -0
- /package/{src → dist}/prompts/templates/sampling/flow-discovery.md +0 -0
- /package/{src → dist}/prompts/templates/sampling/page-content-wrapper.md +0 -0
- /package/{src → dist}/prompts/templates/sampling/test-evaluation.md +0 -0
- /package/{src → dist}/prompts/templates/sampling/test-generation.md +0 -0
- /package/dist/tools/{webtest → retest}/crawl.d.ts +0 -0
- /package/dist/tools/{webtest → retest}/discover-features.d.ts +0 -0
- /package/dist/tools/{webtest → retest}/discover-flows.d.ts +0 -0
- /package/dist/tools/{webtest → retest}/generate-tests.d.ts +0 -0
- /package/dist/tools/{webtest → retest}/index.d.ts +0 -0
- /package/dist/tools/{webtest → retest}/index.js +0 -0
- /package/dist/tools/{webtest → retest}/run-test-case.d.ts +0 -0
- /package/dist/tools/{webtest → retest}/schemas.d.ts +0 -0
- /package/dist/tools/{webtest → retest}/schemas.js +0 -0
- /package/dist/tools/{webtest → retest}/start-analysis.d.ts +0 -0
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
# Proposal: Rename Package to Retest
|
|
2
|
-
|
|
3
|
-
## Why
|
|
4
|
-
|
|
5
|
-
The current naming (`testing-mcp`, `webtest_*` tools, `webtest://` resources) is verbose and inconsistent. A unified "retest" brand simplifies the user experience, makes the CLI and tool names more memorable, and establishes a clear product identity.
|
|
6
|
-
|
|
7
|
-
## What Changes
|
|
8
|
-
|
|
9
|
-
- **BREAKING**: Rename npm package from `@jan-beranek/testing-mcp` to `@jan-beranek/retest`
|
|
10
|
-
- **BREAKING**: Reset version to `0.0.1` (fresh start for the new brand)
|
|
11
|
-
- **BREAKING**: Rename all tool prefixes from `webtest_*` to `retest_*`
|
|
12
|
-
- **BREAKING**: Rename all prompt names from `webtest-*` to `retest-*`
|
|
13
|
-
- **BREAKING**: Rename resource URI scheme from `webtest://` to `retest://`
|
|
14
|
-
- **BREAKING**: Rename environment variable from `WEBTEST_WORKSPACE_DIR` to `RETEST_WORKSPACE_DIR`
|
|
15
|
-
- **BREAKING**: Rename system prefix token from `[WEBTEST-SYSTEM]:` to `[RETEST-SYSTEM]:`
|
|
16
|
-
- Rename source directory from `src/tools/webtest/` to `src/tools/retest/`
|
|
17
|
-
- Rename prompt template files from `webtest-*.md` to `retest-*.md`
|
|
18
|
-
- Rename default workspace directory from `webtest-workspaces` to `retest-workspaces`
|
|
19
|
-
- Update CLI binary name from `testing-mcp` to `retest`
|
|
20
|
-
- Update MCP server name to `retest`
|
|
21
|
-
- Rename all OpenSpec specs from `webtest-*` to `retest-*`
|
|
22
|
-
|
|
23
|
-
## Impact
|
|
24
|
-
|
|
25
|
-
### Specifications Affected
|
|
26
|
-
- `webtest-tools` → `retest-tools` (all tool definitions)
|
|
27
|
-
- `webtest-prompts` → `retest-prompts` (all prompt definitions)
|
|
28
|
-
- `webtest-resources` → `retest-resources` (URI scheme and resource patterns)
|
|
29
|
-
- `webtest-sampling` → `retest-sampling` (system prefix token)
|
|
30
|
-
- `webtest-logging` → `retest-logging` (logger name)
|
|
31
|
-
- `webtest-lifecycle` → `retest-lifecycle` (workspace directory)
|
|
32
|
-
- `mcp-server-core` (package name, binary, server name)
|
|
33
|
-
|
|
34
|
-
### Code Files Affected
|
|
35
|
-
- `package.json` - name, version, bin
|
|
36
|
-
- `src/server.ts` - server name, imports
|
|
37
|
-
- `src/tools/webtest/` → `src/tools/retest/` - directory and all files
|
|
38
|
-
- `src/tools/index.ts` - import path
|
|
39
|
-
- `src/prompts/index.ts` - function names, prompt names
|
|
40
|
-
- `src/prompts/templates/mcp/webtest-*.md` → `retest-*.md`
|
|
41
|
-
- `src/prompts/templates/sampling/system-prefix.md`
|
|
42
|
-
- `src/resources/index.ts` - URI scheme
|
|
43
|
-
- `src/config.ts` - environment variable
|
|
44
|
-
- `src/schemas/config.ts` - default directory
|
|
45
|
-
- `src/security/index.ts` - system prefix regex
|
|
46
|
-
- `src/sampling/index.ts` - system prefix references
|
|
47
|
-
- `src/workspace/types.ts` - comments
|
|
48
|
-
- `src/logger.ts` - logger name
|
|
49
|
-
- `src/test-utils/mock-context.ts` - test directory
|
|
50
|
-
- All test files with hardcoded tool/prompt names
|
|
51
|
-
- `README.md` - documentation
|
|
52
|
-
- `.gitignore` - workspace directory pattern
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
# mcp-server-core Specification Delta
|
|
2
|
-
|
|
3
|
-
## MODIFIED Requirements
|
|
4
|
-
|
|
5
|
-
### Requirement: MCP Server Initialization
|
|
6
|
-
|
|
7
|
-
The system SHALL provide an MCP server that initializes with proper identification and connects to the configured transport.
|
|
8
|
-
|
|
9
|
-
#### Scenario: Server starts with stdio transport
|
|
10
|
-
|
|
11
|
-
- **GIVEN** the environment variable `TRANSPORT` is set to `stdio` or not set
|
|
12
|
-
- **WHEN** the server entry point is executed
|
|
13
|
-
- **THEN** it SHALL identify itself with name "retest" and version from package.json
|
|
14
|
-
- **AND** it SHALL connect to stdio transport for communication
|
|
15
|
-
|
|
16
|
-
#### Scenario: Server starts with HTTP transport
|
|
17
|
-
|
|
18
|
-
- **GIVEN** the environment variable `TRANSPORT` is set to `http`
|
|
19
|
-
- **AND** the environment variable `PORT` is set to a valid port number
|
|
20
|
-
- **WHEN** the server entry point is executed
|
|
21
|
-
- **THEN** it SHALL start a Streamable HTTP server on the specified port
|
|
22
|
-
- **AND** it SHALL accept MCP protocol connections over HTTP
|
|
23
|
-
|
|
24
|
-
#### Scenario: Server handles graceful shutdown
|
|
25
|
-
|
|
26
|
-
- **GIVEN** the server is running
|
|
27
|
-
- **WHEN** the process receives SIGINT or SIGTERM
|
|
28
|
-
- **THEN** the server SHALL disconnect gracefully
|
|
29
|
-
- **AND** the process SHALL exit with code 0
|
|
30
|
-
|
|
31
|
-
### Requirement: Project Build Configuration
|
|
32
|
-
|
|
33
|
-
The system SHALL be buildable to JavaScript for production deployment using TypeScript compiler.
|
|
34
|
-
|
|
35
|
-
#### Scenario: Project builds successfully
|
|
36
|
-
|
|
37
|
-
- **GIVEN** the source code is valid TypeScript
|
|
38
|
-
- **WHEN** `npm run build` is executed
|
|
39
|
-
- **THEN** compiled JavaScript SHALL be output to `dist/` directory
|
|
40
|
-
- **AND** the build SHALL complete without errors
|
|
41
|
-
|
|
42
|
-
#### Scenario: Development mode runs with hot-reload
|
|
43
|
-
|
|
44
|
-
- **GIVEN** the development dependencies are installed
|
|
45
|
-
- **WHEN** `npm run dev` is executed
|
|
46
|
-
- **THEN** the server SHALL start with file watching enabled
|
|
47
|
-
- **AND** changes to source files SHALL trigger automatic restart
|
|
48
|
-
|
|
49
|
-
#### Scenario: Package is executable as CLI
|
|
50
|
-
|
|
51
|
-
- **GIVEN** the project is built
|
|
52
|
-
- **WHEN** `npx @jan-beranek/retest` is executed (or the bin entry is invoked)
|
|
53
|
-
- **THEN** the server SHALL start with default configuration
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
# retest-lifecycle Specification Delta
|
|
2
|
-
|
|
3
|
-
## RENAMED Requirements
|
|
4
|
-
|
|
5
|
-
- **FROM**: `webtest-lifecycle` specification
|
|
6
|
-
- **TO**: `retest-lifecycle` specification
|
|
7
|
-
|
|
8
|
-
## MODIFIED Requirements
|
|
9
|
-
|
|
10
|
-
### Requirement: Client Capability Negotiation
|
|
11
|
-
|
|
12
|
-
The system SHALL query and record client capabilities during initialization and adapt behavior accordingly.
|
|
13
|
-
|
|
14
|
-
#### Scenario: Server records sampling capability
|
|
15
|
-
|
|
16
|
-
- **GIVEN** a client connects with `capabilities.sampling` present
|
|
17
|
-
- **WHEN** initialization completes
|
|
18
|
-
- **THEN** the server SHALL record that sampling is available
|
|
19
|
-
- **AND** retest tools SHALL use `sampling/createMessage` for LLM reasoning
|
|
20
|
-
|
|
21
|
-
#### Scenario: Server records elicitation capability
|
|
22
|
-
|
|
23
|
-
- **GIVEN** a client connects with `capabilities.elicitation` present
|
|
24
|
-
- **WHEN** initialization completes
|
|
25
|
-
- **THEN** the server SHALL record that elicitation is available
|
|
26
|
-
- **AND** retest tools SHALL use `elicitation/create` for user decisions
|
|
27
|
-
|
|
28
|
-
#### Scenario: Server records logging capability
|
|
29
|
-
|
|
30
|
-
- **GIVEN** a client connects with `capabilities.logging` present
|
|
31
|
-
- **WHEN** initialization completes
|
|
32
|
-
- **THEN** the server SHALL record that logging notifications are supported
|
|
33
|
-
- **AND** the logger SHALL emit `notifications/message` to the client
|
|
34
|
-
|
|
35
|
-
#### Scenario: Server records progress capability
|
|
36
|
-
|
|
37
|
-
- **GIVEN** a client connects with MCP progress support
|
|
38
|
-
- **WHEN** initialization completes
|
|
39
|
-
- **THEN** the server SHALL record that progress notifications are supported
|
|
40
|
-
- **AND** long-running tools SHALL emit `notifications/progress`
|
|
41
|
-
|
|
42
|
-
#### Scenario: Server records resources listChanged capability
|
|
43
|
-
|
|
44
|
-
- **GIVEN** a client connects with `capabilities.resources.listChanged` present
|
|
45
|
-
- **WHEN** initialization completes
|
|
46
|
-
- **THEN** the server SHALL record that resource list change notifications are supported
|
|
47
|
-
- **AND** resource creation SHALL emit `notifications/resources/list_changed`
|
|
48
|
-
|
|
49
|
-
#### Scenario: Server records resources subscribe capability
|
|
50
|
-
|
|
51
|
-
- **GIVEN** a client connects with `capabilities.resources.subscribe` present
|
|
52
|
-
- **WHEN** initialization completes
|
|
53
|
-
- **THEN** the server SHALL record that resource subscriptions are supported
|
|
54
|
-
- **AND** resource updates SHALL emit `notifications/resources/updated` to subscribers
|
|
55
|
-
|
|
56
|
-
#### Scenario: Fallback when sampling not supported
|
|
57
|
-
|
|
58
|
-
- **GIVEN** a client connects without `capabilities.sampling`
|
|
59
|
-
- **WHEN** a retest tool requires LLM reasoning
|
|
60
|
-
- **THEN** the tool SHALL return a prompt resource for manual execution
|
|
61
|
-
- **AND** the tool output SHALL include `needsManualInput: true`
|
|
62
|
-
|
|
63
|
-
#### Scenario: Fallback when elicitation not supported
|
|
64
|
-
|
|
65
|
-
- **GIVEN** a client connects without `capabilities.elicitation`
|
|
66
|
-
- **WHEN** a retest tool needs user decision
|
|
67
|
-
- **THEN** the tool SHALL include questions in its output
|
|
68
|
-
- **AND** the tool output SHALL include `needsInput: true` with question details
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
# retest-logging Specification Delta
|
|
2
|
-
|
|
3
|
-
## RENAMED Requirements
|
|
4
|
-
|
|
5
|
-
- **FROM**: `webtest-logging` specification
|
|
6
|
-
- **TO**: `retest-logging` specification
|
|
7
|
-
|
|
8
|
-
## MODIFIED Requirements
|
|
9
|
-
|
|
10
|
-
### Requirement: MCP Logging Notifications
|
|
11
|
-
|
|
12
|
-
The system SHALL emit structured logs as MCP logging notifications when the client supports it.
|
|
13
|
-
|
|
14
|
-
#### Scenario: Log emitted as MCP notification
|
|
15
|
-
|
|
16
|
-
- **GIVEN** the client supports MCP logging (`capabilities.logging` present)
|
|
17
|
-
- **WHEN** a log event occurs
|
|
18
|
-
- **THEN** it SHALL emit `notifications/message` with:
|
|
19
|
-
- `level`: one of "debug", "info", "warning", "error"
|
|
20
|
-
- `logger`: "retest"
|
|
21
|
-
- `data`: structured log payload
|
|
22
|
-
|
|
23
|
-
#### Scenario: Fallback to stderr when logging unsupported
|
|
24
|
-
|
|
25
|
-
- **GIVEN** the client does not support MCP logging
|
|
26
|
-
- **WHEN** a log event occurs
|
|
27
|
-
- **THEN** it SHALL write to stderr as JSON
|
|
28
|
-
- **AND** not attempt MCP notification
|
|
29
|
-
|
|
30
|
-
#### Scenario: Log level is respected
|
|
31
|
-
|
|
32
|
-
- **GIVEN** client log level is set to "warning"
|
|
33
|
-
- **WHEN** an "info" level log is generated
|
|
34
|
-
- **THEN** it SHALL NOT be emitted
|
|
35
|
-
- **AND** "warning" and "error" logs SHALL be emitted
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
# retest-prompts Specification Delta
|
|
2
|
-
|
|
3
|
-
## RENAMED Requirements
|
|
4
|
-
|
|
5
|
-
- **FROM**: `webtest-prompts` specification
|
|
6
|
-
- **TO**: `retest-prompts` specification
|
|
7
|
-
|
|
8
|
-
## MODIFIED Requirements
|
|
9
|
-
|
|
10
|
-
### Requirement: Prompt Template Registration
|
|
11
|
-
|
|
12
|
-
The system SHALL register prompt templates with the MCP server for client discovery.
|
|
13
|
-
|
|
14
|
-
#### Scenario: Prompts are listed on prompts/list
|
|
15
|
-
|
|
16
|
-
- **GIVEN** a client calls `prompts/list`
|
|
17
|
-
- **WHEN** the response is returned
|
|
18
|
-
- **THEN** it SHALL include prompts:
|
|
19
|
-
- `retest-start` (Start web testing analysis)
|
|
20
|
-
- `retest-crawl` (Crawl to satisfy focus)
|
|
21
|
-
- `retest-discover` (Discover features and flows)
|
|
22
|
-
- `retest-generate-tests` (Generate test cases)
|
|
23
|
-
- `retest-run-test` (Run a test case)
|
|
24
|
-
- `retest-full-workflow` (Full testing workflow)
|
|
25
|
-
|
|
26
|
-
### Requirement: Start Analysis Prompt
|
|
27
|
-
|
|
28
|
-
The system SHALL provide a prompt template to initiate a web testing analysis.
|
|
29
|
-
|
|
30
|
-
#### Scenario: Start analysis prompt is invoked
|
|
31
|
-
|
|
32
|
-
- **GIVEN** client invokes `prompts/get` with name `retest-start`
|
|
33
|
-
- **WHEN** the prompt is returned
|
|
34
|
-
- **THEN** it SHALL include:
|
|
35
|
-
- Description: "Start a new web testing analysis for a URL"
|
|
36
|
-
- Arguments: `url` (required), `focus` (required), `maxSteps` (optional), `maxPages` (optional)
|
|
37
|
-
|
|
38
|
-
#### Scenario: Start analysis prompt generates tool call
|
|
39
|
-
|
|
40
|
-
- **GIVEN** client invokes the prompt with arguments
|
|
41
|
-
- **WHEN** the prompt messages are returned
|
|
42
|
-
- **THEN** it SHALL include a user message instructing to call `retest_init`
|
|
43
|
-
- **AND** include the provided arguments in the instruction
|
|
44
|
-
|
|
45
|
-
### Requirement: Crawl Prompt
|
|
46
|
-
|
|
47
|
-
The system SHALL provide a prompt template to start or continue a crawl.
|
|
48
|
-
|
|
49
|
-
#### Scenario: Crawl prompt is invoked
|
|
50
|
-
|
|
51
|
-
- **GIVEN** client invokes `prompts/get` with name `retest-crawl`
|
|
52
|
-
- **WHEN** the prompt is returned
|
|
53
|
-
- **THEN** it SHALL include:
|
|
54
|
-
- Description: "Crawl a web application to explore and achieve a goal"
|
|
55
|
-
- Arguments: `analysisId` (required), `goal` (optional), `strategy` (optional)
|
|
56
|
-
|
|
57
|
-
#### Scenario: Crawl prompt uses analysis goal by default
|
|
58
|
-
|
|
59
|
-
- **GIVEN** client invokes crawl prompt with only `analysisId`
|
|
60
|
-
- **WHEN** the prompt messages are returned
|
|
61
|
-
- **THEN** it SHALL instruct to use the original focus as the crawl goal
|
|
62
|
-
|
|
63
|
-
### Requirement: Discover Prompt
|
|
64
|
-
|
|
65
|
-
The system SHALL provide a prompt template to discover features and flows.
|
|
66
|
-
|
|
67
|
-
#### Scenario: Discover prompt is invoked
|
|
68
|
-
|
|
69
|
-
- **GIVEN** client invokes `prompts/get` with name `retest-discover`
|
|
70
|
-
- **WHEN** the prompt is returned
|
|
71
|
-
- **THEN** it SHALL include:
|
|
72
|
-
- Description: "Discover features and flows from crawled data"
|
|
73
|
-
- Arguments: `analysisId` (required), `crawlId` (optional)
|
|
74
|
-
|
|
75
|
-
#### Scenario: Discover prompt lists available crawls
|
|
76
|
-
|
|
77
|
-
- **GIVEN** client invokes discover prompt with only `analysisId`
|
|
78
|
-
- **WHEN** the prompt messages are returned
|
|
79
|
-
- **THEN** it SHALL include context about available crawls for that analysis
|
|
80
|
-
|
|
81
|
-
### Requirement: Generate Tests Prompt
|
|
82
|
-
|
|
83
|
-
The system SHALL provide a prompt template to generate test cases.
|
|
84
|
-
|
|
85
|
-
#### Scenario: Generate tests prompt is invoked
|
|
86
|
-
|
|
87
|
-
- **GIVEN** client invokes `prompts/get` with name `retest-generate-tests`
|
|
88
|
-
- **WHEN** the prompt is returned
|
|
89
|
-
- **THEN** it SHALL include:
|
|
90
|
-
- Description: "Generate test cases from application analysis"
|
|
91
|
-
- Arguments: `analysisId` (required), `count` (optional), `types` (optional)
|
|
92
|
-
|
|
93
|
-
#### Scenario: Generate tests prompt offers strategy options
|
|
94
|
-
|
|
95
|
-
- **GIVEN** client invokes generate tests prompt
|
|
96
|
-
- **WHEN** the prompt messages are returned
|
|
97
|
-
- **THEN** it SHALL mention available test types: "smoke", "negative", "boundary", "integration"
|
|
98
|
-
|
|
99
|
-
### Requirement: Run Test Prompt
|
|
100
|
-
|
|
101
|
-
The system SHALL provide a prompt template to execute a test case.
|
|
102
|
-
|
|
103
|
-
#### Scenario: Run test prompt is invoked
|
|
104
|
-
|
|
105
|
-
- **GIVEN** client invokes `prompts/get` with name `retest-run-test`
|
|
106
|
-
- **WHEN** the prompt is returned
|
|
107
|
-
- **THEN** it SHALL include:
|
|
108
|
-
- Description: "Execute a test case and capture results"
|
|
109
|
-
- Arguments: `analysisId` (required), `testCaseId` (required)
|
|
110
|
-
|
|
111
|
-
#### Scenario: Run test prompt lists available tests
|
|
112
|
-
|
|
113
|
-
- **GIVEN** client invokes run test prompt with only `analysisId`
|
|
114
|
-
- **WHEN** the prompt messages are returned
|
|
115
|
-
- **THEN** it SHALL include context about available test cases for that analysis
|
|
116
|
-
|
|
117
|
-
### Requirement: Prompt Argument Validation
|
|
118
|
-
|
|
119
|
-
The system SHALL validate prompt arguments and return helpful errors.
|
|
120
|
-
|
|
121
|
-
#### Scenario: Missing required argument returns error
|
|
122
|
-
|
|
123
|
-
- **GIVEN** client invokes `retest-start` without `url`
|
|
124
|
-
- **WHEN** validation occurs
|
|
125
|
-
- **THEN** it SHALL return error indicating `url` is required
|
|
126
|
-
|
|
127
|
-
#### Scenario: Invalid analysisId returns error
|
|
128
|
-
|
|
129
|
-
- **GIVEN** client invokes a prompt with non-existent `analysisId`
|
|
130
|
-
- **WHEN** validation occurs
|
|
131
|
-
- **THEN** it SHALL return error indicating analysis not found
|
|
132
|
-
|
|
133
|
-
### Requirement: Prompt Chaining Guidance
|
|
134
|
-
|
|
135
|
-
The system SHALL include guidance in prompt outputs for the recommended workflow sequence.
|
|
136
|
-
|
|
137
|
-
#### Scenario: Start analysis prompt suggests next step
|
|
138
|
-
|
|
139
|
-
- **GIVEN** client uses start analysis prompt
|
|
140
|
-
- **WHEN** the prompt messages are returned
|
|
141
|
-
- **THEN** they SHALL include guidance: "After analysis starts, use retest-crawl to explore the application"
|
|
142
|
-
|
|
143
|
-
#### Scenario: Crawl prompt suggests next step
|
|
144
|
-
|
|
145
|
-
- **GIVEN** client uses crawl prompt
|
|
146
|
-
- **WHEN** the prompt messages are returned
|
|
147
|
-
- **THEN** they SHALL include guidance: "After crawl completes, use retest-discover to identify features and flows"
|
|
148
|
-
|
|
149
|
-
#### Scenario: Discover prompt suggests next step
|
|
150
|
-
|
|
151
|
-
- **GIVEN** client uses discover prompt
|
|
152
|
-
- **WHEN** the prompt messages are returned
|
|
153
|
-
- **THEN** they SHALL include guidance: "After discovery, use retest-generate-tests to create test cases"
|
|
154
|
-
|
|
155
|
-
#### Scenario: Generate tests prompt suggests next step
|
|
156
|
-
|
|
157
|
-
- **GIVEN** client uses generate tests prompt
|
|
158
|
-
- **WHEN** the prompt messages are returned
|
|
159
|
-
- **THEN** they SHALL include guidance: "After test generation, use retest-run-test to execute individual test cases"
|
|
@@ -1,251 +0,0 @@
|
|
|
1
|
-
# retest-resources Specification Delta
|
|
2
|
-
|
|
3
|
-
## RENAMED Requirements
|
|
4
|
-
|
|
5
|
-
- **FROM**: `webtest-resources` specification
|
|
6
|
-
- **TO**: `retest-resources` specification
|
|
7
|
-
|
|
8
|
-
## MODIFIED Requirements
|
|
9
|
-
|
|
10
|
-
### Requirement: Resource URI Scheme
|
|
11
|
-
|
|
12
|
-
The system SHALL expose all retest artifacts using a `retest://` URI scheme with hierarchical paths, using markdown format for all human-readable artifacts.
|
|
13
|
-
|
|
14
|
-
#### Scenario: Analysis root resource is accessible
|
|
15
|
-
|
|
16
|
-
- **GIVEN** an analysis has been started with analysisId "abc123"
|
|
17
|
-
- **WHEN** client requests resource `retest://abc123/`
|
|
18
|
-
- **THEN** it SHALL return the analysis `index.md` metadata as markdown with YAML frontmatter
|
|
19
|
-
|
|
20
|
-
#### Scenario: Crawl index resource is accessible
|
|
21
|
-
|
|
22
|
-
- **GIVEN** a crawl has completed with crawlId "crawl-001"
|
|
23
|
-
- **WHEN** client requests resource `retest://abc123/crawls/crawl-001/index.md`
|
|
24
|
-
- **THEN** it SHALL return the crawl index as markdown with YAML frontmatter containing page list and metadata
|
|
25
|
-
|
|
26
|
-
#### Scenario: Page artifacts are accessible by type
|
|
27
|
-
|
|
28
|
-
- **GIVEN** a page was captured with pageId "page-001"
|
|
29
|
-
- **WHEN** client requests `retest://abc123/crawls/crawl-001/pages/page-001/screenshot.png`
|
|
30
|
-
- **THEN** it SHALL return the screenshot image
|
|
31
|
-
- **AND** `snapshot.md` returns accessibility tree as formatted markdown with YAML frontmatter
|
|
32
|
-
- **AND** `dom.html` returns HTML content
|
|
33
|
-
|
|
34
|
-
#### Scenario: Crawl checkpoint is accessible
|
|
35
|
-
|
|
36
|
-
- **GIVEN** a crawl is in progress with checkpoint saved
|
|
37
|
-
- **WHEN** client requests `retest://abc123/crawls/crawl-001/checkpoint.md`
|
|
38
|
-
- **THEN** it SHALL return the checkpoint as markdown with YAML frontmatter containing crawl state
|
|
39
|
-
|
|
40
|
-
#### Scenario: Features report is accessible
|
|
41
|
-
|
|
42
|
-
- **GIVEN** discover_features has completed
|
|
43
|
-
- **WHEN** client requests `retest://abc123/features.md`
|
|
44
|
-
- **THEN** it SHALL return the markdown features report
|
|
45
|
-
|
|
46
|
-
#### Scenario: Feature flows are accessible
|
|
47
|
-
|
|
48
|
-
- **GIVEN** discover_flows has completed for a feature
|
|
49
|
-
- **WHEN** client requests `retest://abc123/features/{featureSlug}/flows.md`
|
|
50
|
-
- **THEN** it SHALL return user flows as markdown with YAML frontmatter containing structured flow definitions
|
|
51
|
-
|
|
52
|
-
#### Scenario: Tests are accessible
|
|
53
|
-
|
|
54
|
-
- **GIVEN** generate_tests has completed
|
|
55
|
-
- **WHEN** client requests `retest://abc123/tests/tests.md`
|
|
56
|
-
- **THEN** it SHALL return the test cases as markdown with YAML frontmatter containing structured test definitions
|
|
57
|
-
|
|
58
|
-
#### Scenario: Test run report is accessible
|
|
59
|
-
|
|
60
|
-
- **GIVEN** a test run has completed with runId "run-001"
|
|
61
|
-
- **WHEN** client requests `retest://abc123/runs/run-001/report.md`
|
|
62
|
-
- **THEN** it SHALL return the test execution report as markdown with YAML frontmatter containing structured results
|
|
63
|
-
|
|
64
|
-
#### Scenario: Test step snapshot is accessible
|
|
65
|
-
|
|
66
|
-
- **GIVEN** a test step has captured evidence
|
|
67
|
-
- **WHEN** client requests `retest://abc123/runs/run-001/steps/1/snapshot.md`
|
|
68
|
-
- **THEN** it SHALL return the accessibility snapshot as formatted markdown with YAML frontmatter
|
|
69
|
-
|
|
70
|
-
### Requirement: Resource Template Registration
|
|
71
|
-
|
|
72
|
-
The system SHALL register resource templates with the MCP server for discovery, using markdown extensions for all index and report resources.
|
|
73
|
-
|
|
74
|
-
#### Scenario: Templates are listed on resources/list
|
|
75
|
-
|
|
76
|
-
- **GIVEN** a client calls `resources/list`
|
|
77
|
-
- **WHEN** the response is returned
|
|
78
|
-
- **THEN** it SHALL include templates for:
|
|
79
|
-
- `retest://{analysisId}/index.md` (Analysis index)
|
|
80
|
-
- `retest://{analysisId}/crawls/{crawlId}/index.md` (Crawl index)
|
|
81
|
-
- `retest://{analysisId}/crawls/{crawlId}/checkpoint.md` (Crawl checkpoint)
|
|
82
|
-
- `retest://{analysisId}/crawls/{crawlId}/pages/{pageId}/snapshot.md` (Page snapshot)
|
|
83
|
-
- `retest://{analysisId}/crawls/{crawlId}/pages/{pageId}/screenshot.png` (Page screenshot)
|
|
84
|
-
- `retest://{analysisId}/crawls/{crawlId}/pages/{pageId}/dom.html` (Page DOM)
|
|
85
|
-
- `retest://{analysisId}/features.md` (Features report)
|
|
86
|
-
- `retest://{analysisId}/features/{featureSlug}/flows.md` (Feature flows)
|
|
87
|
-
- `retest://{analysisId}/tests/tests.md` (Test definitions)
|
|
88
|
-
- `retest://{analysisId}/runs/{runId}/report.md` (Test run report)
|
|
89
|
-
- `retest://{analysisId}/runs/{runId}/steps/{stepNumber}/snapshot.md` (Step snapshot)
|
|
90
|
-
- `retest://{analysisId}/runs/{runId}/steps/{stepNumber}/screenshot.png` (Step screenshot)
|
|
91
|
-
|
|
92
|
-
### Requirement: Resource Content Types
|
|
93
|
-
|
|
94
|
-
The system SHALL return appropriate MIME types for different artifact types.
|
|
95
|
-
|
|
96
|
-
#### Scenario: Markdown resources have correct type
|
|
97
|
-
|
|
98
|
-
- **GIVEN** client reads a `.md` resource
|
|
99
|
-
- **WHEN** response is returned
|
|
100
|
-
- **THEN** mimeType SHALL be `text/markdown`
|
|
101
|
-
|
|
102
|
-
#### Scenario: Screenshot resources have correct type
|
|
103
|
-
|
|
104
|
-
- **GIVEN** client reads a `.png` resource
|
|
105
|
-
- **WHEN** response is returned
|
|
106
|
-
- **THEN** mimeType SHALL be `image/png`
|
|
107
|
-
- **AND** content SHALL be base64 encoded
|
|
108
|
-
|
|
109
|
-
#### Scenario: HTML resources have correct type
|
|
110
|
-
|
|
111
|
-
- **GIVEN** client reads a `.html` resource
|
|
112
|
-
- **WHEN** response is returned
|
|
113
|
-
- **THEN** mimeType SHALL be `text/html`
|
|
114
|
-
|
|
115
|
-
### Requirement: Resource Listing by Analysis
|
|
116
|
-
|
|
117
|
-
The system SHALL support listing all resources within an analysis.
|
|
118
|
-
|
|
119
|
-
#### Scenario: List all resources for analysis
|
|
120
|
-
|
|
121
|
-
- **GIVEN** an analysis with multiple crawls and runs
|
|
122
|
-
- **WHEN** client calls `resources/list` with `retest://abc123/` prefix
|
|
123
|
-
- **THEN** it SHALL return all resources within that analysis
|
|
124
|
-
- **AND** each resource SHALL include URI, name, and mimeType
|
|
125
|
-
|
|
126
|
-
#### Scenario: List crawl resources
|
|
127
|
-
|
|
128
|
-
- **GIVEN** a crawl with multiple pages
|
|
129
|
-
- **WHEN** client calls `resources/list` with `retest://abc123/crawls/crawl-001/` prefix
|
|
130
|
-
- **THEN** it SHALL return all resources within that crawl
|
|
131
|
-
|
|
132
|
-
### Requirement: Resource Change Signaling
|
|
133
|
-
|
|
134
|
-
The system SHALL support resource change notifications to surface new artifacts in real-time during long-running operations.
|
|
135
|
-
|
|
136
|
-
#### Scenario: Server emits listChanged when new resource created
|
|
137
|
-
|
|
138
|
-
- **GIVEN** client capability includes `resources.listChanged`
|
|
139
|
-
- **WHEN** a crawl captures a new page artifact
|
|
140
|
-
- **THEN** server SHALL emit `notifications/resources/list_changed`
|
|
141
|
-
- **AND** client can re-fetch `resources/list` to discover new resources
|
|
142
|
-
|
|
143
|
-
#### Scenario: Server emits listChanged during test execution
|
|
144
|
-
|
|
145
|
-
- **GIVEN** client capability includes `resources.listChanged`
|
|
146
|
-
- **WHEN** a test run completes a step and writes evidence
|
|
147
|
-
- **THEN** server SHALL emit `notifications/resources/list_changed`
|
|
148
|
-
|
|
149
|
-
#### Scenario: Fallback when listChanged not supported
|
|
150
|
-
|
|
151
|
-
- **GIVEN** client does not support `resources.listChanged`
|
|
152
|
-
- **WHEN** new resources are created
|
|
153
|
-
- **THEN** server SHALL NOT emit notifications
|
|
154
|
-
- **AND** client must poll `resources/list` to discover new resources
|
|
155
|
-
|
|
156
|
-
### Requirement: Resource Subscription
|
|
157
|
-
|
|
158
|
-
The system SHALL support resource subscriptions for live updates during operations when client supports it.
|
|
159
|
-
|
|
160
|
-
#### Scenario: Client subscribes to crawl index
|
|
161
|
-
|
|
162
|
-
- **GIVEN** client supports `resources/subscribe`
|
|
163
|
-
- **AND** client subscribes to `retest://abc123/crawls/crawl-001/index.md`
|
|
164
|
-
- **WHEN** crawl adds a new page
|
|
165
|
-
- **THEN** server SHALL emit `notifications/resources/updated` with the resource URI
|
|
166
|
-
|
|
167
|
-
#### Scenario: Client subscribes to analysis status
|
|
168
|
-
|
|
169
|
-
- **GIVEN** client supports `resources/subscribe`
|
|
170
|
-
- **AND** client subscribes to `retest://abc123/index.md`
|
|
171
|
-
- **WHEN** analysis phase changes (crawl -> discover -> generate)
|
|
172
|
-
- **THEN** server SHALL emit `notifications/resources/updated`
|
|
173
|
-
|
|
174
|
-
#### Scenario: Subscription request when unsupported
|
|
175
|
-
|
|
176
|
-
- **GIVEN** client does not support `resources/subscribe`
|
|
177
|
-
- **WHEN** server attempts to notify
|
|
178
|
-
- **THEN** server SHALL skip notification without error
|
|
179
|
-
- **AND** client must poll resources for updates
|
|
180
|
-
|
|
181
|
-
### Requirement: Workspace Persistence
|
|
182
|
-
|
|
183
|
-
The system SHALL persist all resources to the filesystem for durability.
|
|
184
|
-
|
|
185
|
-
#### Scenario: Resources survive server restart
|
|
186
|
-
|
|
187
|
-
- **GIVEN** an analysis has been created
|
|
188
|
-
- **WHEN** server restarts
|
|
189
|
-
- **THEN** all previously created resources SHALL be accessible
|
|
190
|
-
- **AND** resource URIs SHALL resolve to the same content
|
|
191
|
-
|
|
192
|
-
#### Scenario: Workspace directory is configurable
|
|
193
|
-
|
|
194
|
-
- **GIVEN** environment variable `RETEST_WORKSPACE_DIR` is set to `/data/retests`
|
|
195
|
-
- **WHEN** analysis is created
|
|
196
|
-
- **THEN** workspace SHALL be created under `/data/retests/{analysisId}/`
|
|
197
|
-
|
|
198
|
-
#### Scenario: Default workspace location
|
|
199
|
-
|
|
200
|
-
- **GIVEN** `RETEST_WORKSPACE_DIR` is not set
|
|
201
|
-
- **WHEN** analysis is created
|
|
202
|
-
- **THEN** workspace SHALL be created under `./retest-workspaces/{analysisId}/`
|
|
203
|
-
|
|
204
|
-
### Requirement: Resource Error Handling
|
|
205
|
-
|
|
206
|
-
The system SHALL return appropriate errors for invalid resource requests.
|
|
207
|
-
|
|
208
|
-
#### Scenario: Unknown analysis returns not found
|
|
209
|
-
|
|
210
|
-
- **GIVEN** client requests `retest://unknown-id/`
|
|
211
|
-
- **WHEN** URI is resolved
|
|
212
|
-
- **THEN** it SHALL return error with code "ResourceNotFound"
|
|
213
|
-
|
|
214
|
-
#### Scenario: Invalid URI format returns error
|
|
215
|
-
|
|
216
|
-
- **GIVEN** client requests resource with invalid URI format
|
|
217
|
-
- **WHEN** URI is parsed
|
|
218
|
-
- **THEN** it SHALL return error with code "InvalidResourceUri"
|
|
219
|
-
|
|
220
|
-
#### Scenario: Missing artifact returns not found
|
|
221
|
-
|
|
222
|
-
- **GIVEN** client requests `retest://abc123/crawls/crawl-001/pages/page-999/screenshot.png`
|
|
223
|
-
- **AND** page-999 does not exist
|
|
224
|
-
- **WHEN** URI is resolved
|
|
225
|
-
- **THEN** it SHALL return error with code "ResourceNotFound"
|
|
226
|
-
|
|
227
|
-
### Requirement: Hybrid Artifact Access
|
|
228
|
-
|
|
229
|
-
The system SHALL provide both filesystem paths and MCP resource URIs for all artifacts, enabling direct file access alongside MCP resource reads.
|
|
230
|
-
|
|
231
|
-
#### Scenario: Workspace manager returns both path and URI
|
|
232
|
-
|
|
233
|
-
- **GIVEN** a workspace method saves an artifact (analysis, tests, pages, evidence)
|
|
234
|
-
- **WHEN** the save operation completes
|
|
235
|
-
- **THEN** it SHALL return both the absolute filesystem path and the `retest://` URI
|
|
236
|
-
- **AND** the filesystem path SHALL be absolute (not relative)
|
|
237
|
-
- **AND** the path SHALL point to the actual file on disk
|
|
238
|
-
|
|
239
|
-
#### Scenario: File path resolves to same content as resource URI
|
|
240
|
-
|
|
241
|
-
- **GIVEN** an artifact has been saved
|
|
242
|
-
- **WHEN** the file is read directly via filesystem path
|
|
243
|
-
- **AND** the resource is read via MCP `resources/read` with the URI
|
|
244
|
-
- **THEN** both SHALL return identical content
|
|
245
|
-
|
|
246
|
-
#### Scenario: Workspace root path is accessible
|
|
247
|
-
|
|
248
|
-
- **GIVEN** a workspace has been created
|
|
249
|
-
- **WHEN** the workspace manager is queried
|
|
250
|
-
- **THEN** it SHALL provide the absolute path to the workspace root directory
|
|
251
|
-
- **AND** this path SHALL be used as the base for all artifact file paths
|