simplify3x-connect 0.0.0-stage → 0.28.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/LICENSE +21 -0
- package/README.md +117 -3
- package/dist/acText.d.ts +12 -0
- package/dist/acText.d.ts.map +1 -0
- package/dist/acText.js +44 -0
- package/dist/acText.js.map +1 -0
- package/dist/adapters/factory.d.ts +25 -0
- package/dist/adapters/factory.d.ts.map +1 -0
- package/dist/adapters/factory.js +55 -0
- package/dist/adapters/factory.js.map +1 -0
- package/dist/adapters/http.d.ts +62 -0
- package/dist/adapters/http.d.ts.map +1 -0
- package/dist/adapters/http.js +138 -0
- package/dist/adapters/http.js.map +1 -0
- package/dist/adapters/remoteMcp/adapter.d.ts +112 -0
- package/dist/adapters/remoteMcp/adapter.d.ts.map +1 -0
- package/dist/adapters/remoteMcp/adapter.js +259 -0
- package/dist/adapters/remoteMcp/adapter.js.map +1 -0
- package/dist/adapters/simplifyqa/adapter.d.ts +1390 -0
- package/dist/adapters/simplifyqa/adapter.d.ts.map +1 -0
- package/dist/adapters/simplifyqa/adapter.js +9126 -0
- package/dist/adapters/simplifyqa/adapter.js.map +1 -0
- package/dist/adapters/simplifyqa/apiFailureReason.d.ts +11 -0
- package/dist/adapters/simplifyqa/apiFailureReason.d.ts.map +1 -0
- package/dist/adapters/simplifyqa/apiFailureReason.js +35 -0
- package/dist/adapters/simplifyqa/apiFailureReason.js.map +1 -0
- package/dist/adapters/simplifyqa/desktopConditions.d.ts +50 -0
- package/dist/adapters/simplifyqa/desktopConditions.d.ts.map +1 -0
- package/dist/adapters/simplifyqa/desktopConditions.js +95 -0
- package/dist/adapters/simplifyqa/desktopConditions.js.map +1 -0
- package/dist/adapters/simplifyqa/executionFailures.d.ts +59 -0
- package/dist/adapters/simplifyqa/executionFailures.d.ts.map +1 -0
- package/dist/adapters/simplifyqa/executionFailures.js +641 -0
- package/dist/adapters/simplifyqa/executionFailures.js.map +1 -0
- package/dist/adapters/simplifyqa/failureCategory.d.ts +26 -0
- package/dist/adapters/simplifyqa/failureCategory.d.ts.map +1 -0
- package/dist/adapters/simplifyqa/failureCategory.js +208 -0
- package/dist/adapters/simplifyqa/failureCategory.js.map +1 -0
- package/dist/adapters/simplifyqa/failureReport.d.ts +50 -0
- package/dist/adapters/simplifyqa/failureReport.d.ts.map +1 -0
- package/dist/adapters/simplifyqa/failureReport.js +383 -0
- package/dist/adapters/simplifyqa/failureReport.js.map +1 -0
- package/dist/adapters/simplifyqa/failureTypes.d.ts +193 -0
- package/dist/adapters/simplifyqa/failureTypes.d.ts.map +1 -0
- package/dist/adapters/simplifyqa/failureTypes.js +8 -0
- package/dist/adapters/simplifyqa/failureTypes.js.map +1 -0
- package/dist/adapters/simplifyqa/flow.d.ts +58 -0
- package/dist/adapters/simplifyqa/flow.d.ts.map +1 -0
- package/dist/adapters/simplifyqa/flow.js +335 -0
- package/dist/adapters/simplifyqa/flow.js.map +1 -0
- package/dist/adapters/simplifyqa/functionMatch.d.ts +53 -0
- package/dist/adapters/simplifyqa/functionMatch.d.ts.map +1 -0
- package/dist/adapters/simplifyqa/functionMatch.js +110 -0
- package/dist/adapters/simplifyqa/functionMatch.js.map +1 -0
- package/dist/adapters/simplifyqa/heal/apply.d.ts +59 -0
- package/dist/adapters/simplifyqa/heal/apply.d.ts.map +1 -0
- package/dist/adapters/simplifyqa/heal/apply.js +213 -0
- package/dist/adapters/simplifyqa/heal/apply.js.map +1 -0
- package/dist/adapters/simplifyqa/heal/diagnose.d.ts +24 -0
- package/dist/adapters/simplifyqa/heal/diagnose.d.ts.map +1 -0
- package/dist/adapters/simplifyqa/heal/diagnose.js +211 -0
- package/dist/adapters/simplifyqa/heal/diagnose.js.map +1 -0
- package/dist/adapters/simplifyqa/heal/index.d.ts +37 -0
- package/dist/adapters/simplifyqa/heal/index.d.ts.map +1 -0
- package/dist/adapters/simplifyqa/heal/index.js +83 -0
- package/dist/adapters/simplifyqa/heal/index.js.map +1 -0
- package/dist/adapters/simplifyqa/heal/plan.d.ts +67 -0
- package/dist/adapters/simplifyqa/heal/plan.d.ts.map +1 -0
- package/dist/adapters/simplifyqa/heal/plan.js +338 -0
- package/dist/adapters/simplifyqa/heal/plan.js.map +1 -0
- package/dist/adapters/simplifyqa/heal/store.d.ts +10 -0
- package/dist/adapters/simplifyqa/heal/store.d.ts.map +1 -0
- package/dist/adapters/simplifyqa/heal/store.js +40 -0
- package/dist/adapters/simplifyqa/heal/store.js.map +1 -0
- package/dist/adapters/simplifyqa/mapLimit.d.ts +3 -0
- package/dist/adapters/simplifyqa/mapLimit.d.ts.map +1 -0
- package/dist/adapters/simplifyqa/mapLimit.js +14 -0
- package/dist/adapters/simplifyqa/mapLimit.js.map +1 -0
- package/dist/adapters/simplifyqa/mapper.d.ts +159 -0
- package/dist/adapters/simplifyqa/mapper.d.ts.map +1 -0
- package/dist/adapters/simplifyqa/mapper.js +1767 -0
- package/dist/adapters/simplifyqa/mapper.js.map +1 -0
- package/dist/adapters/simplifyqa/planTree.d.ts +31 -0
- package/dist/adapters/simplifyqa/planTree.d.ts.map +1 -0
- package/dist/adapters/simplifyqa/planTree.js +110 -0
- package/dist/adapters/simplifyqa/planTree.js.map +1 -0
- package/dist/adapters/simplifyqa/searchEngine.d.ts +254 -0
- package/dist/adapters/simplifyqa/searchEngine.d.ts.map +1 -0
- package/dist/adapters/simplifyqa/searchEngine.js +1248 -0
- package/dist/adapters/simplifyqa/searchEngine.js.map +1 -0
- package/dist/adapters/simplifyqa/searchRegistry.d.ts +117 -0
- package/dist/adapters/simplifyqa/searchRegistry.d.ts.map +1 -0
- package/dist/adapters/simplifyqa/searchRegistry.js +1664 -0
- package/dist/adapters/simplifyqa/searchRegistry.js.map +1 -0
- package/dist/adapters/simplifyqa/searchResolve.d.ts +84 -0
- package/dist/adapters/simplifyqa/searchResolve.d.ts.map +1 -0
- package/dist/adapters/simplifyqa/searchResolve.js +319 -0
- package/dist/adapters/simplifyqa/searchResolve.js.map +1 -0
- package/dist/adapters/simplifyqa/stepDiagnostics.d.ts +25 -0
- package/dist/adapters/simplifyqa/stepDiagnostics.d.ts.map +1 -0
- package/dist/adapters/simplifyqa/stepDiagnostics.js +89 -0
- package/dist/adapters/simplifyqa/stepDiagnostics.js.map +1 -0
- package/dist/adapters/simplifyqa/stepRules.d.ts +91 -0
- package/dist/adapters/simplifyqa/stepRules.d.ts.map +1 -0
- package/dist/adapters/simplifyqa/stepRules.js +228 -0
- package/dist/adapters/simplifyqa/stepRules.js.map +1 -0
- package/dist/adapters/types.d.ts +514 -0
- package/dist/adapters/types.d.ts.map +1 -0
- package/dist/adapters/types.js +2 -0
- package/dist/adapters/types.js.map +1 -0
- package/dist/adapters/walnut/actionTypes.d.ts +16 -0
- package/dist/adapters/walnut/actionTypes.d.ts.map +1 -0
- package/dist/adapters/walnut/actionTypes.js +178 -0
- package/dist/adapters/walnut/actionTypes.js.map +1 -0
- package/dist/adapters/walnut/adapter.d.ts +235 -0
- package/dist/adapters/walnut/adapter.d.ts.map +1 -0
- package/dist/adapters/walnut/adapter.js +1120 -0
- package/dist/adapters/walnut/adapter.js.map +1 -0
- package/dist/adapters/walnut/mapper.d.ts +55 -0
- package/dist/adapters/walnut/mapper.d.ts.map +1 -0
- package/dist/adapters/walnut/mapper.js +364 -0
- package/dist/adapters/walnut/mapper.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +38 -0
- package/dist/cli.js.map +1 -0
- package/dist/config.d.ts +109 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +272 -0
- package/dist/config.js.map +1 -0
- package/dist/connection.d.ts +105 -0
- package/dist/connection.d.ts.map +1 -0
- package/dist/connection.js +255 -0
- package/dist/connection.js.map +1 -0
- package/dist/domain/heal.d.ts +163 -0
- package/dist/domain/heal.d.ts.map +1 -0
- package/dist/domain/heal.js +55 -0
- package/dist/domain/heal.js.map +1 -0
- package/dist/domain/types.d.ts +1328 -0
- package/dist/domain/types.d.ts.map +1 -0
- package/dist/domain/types.js +8 -0
- package/dist/domain/types.js.map +1 -0
- package/dist/domain/validate.d.ts +3 -0
- package/dist/domain/validate.d.ts.map +1 -0
- package/dist/domain/validate.js +67 -0
- package/dist/domain/validate.js.map +1 -0
- package/dist/drafts/apiPatch.d.ts +9 -0
- package/dist/drafts/apiPatch.d.ts.map +1 -0
- package/dist/drafts/apiPatch.js +27 -0
- package/dist/drafts/apiPatch.js.map +1 -0
- package/dist/drafts/bulk.d.ts +24 -0
- package/dist/drafts/bulk.d.ts.map +1 -0
- package/dist/drafts/bulk.js +44 -0
- package/dist/drafts/bulk.js.map +1 -0
- package/dist/drafts/duplicate.d.ts +12 -0
- package/dist/drafts/duplicate.d.ts.map +1 -0
- package/dist/drafts/duplicate.js +59 -0
- package/dist/drafts/duplicate.js.map +1 -0
- package/dist/drafts/store.d.ts +91 -0
- package/dist/drafts/store.d.ts.map +1 -0
- package/dist/drafts/store.js +244 -0
- package/dist/drafts/store.js.map +1 -0
- package/dist/gateway.d.ts +37 -0
- package/dist/gateway.d.ts.map +1 -0
- package/dist/gateway.js +71 -0
- package/dist/gateway.js.map +1 -0
- package/dist/httpMain.d.ts +3 -0
- package/dist/httpMain.d.ts.map +1 -0
- package/dist/httpMain.js +20 -0
- package/dist/httpMain.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +46 -0
- package/dist/index.js.map +1 -0
- package/dist/initAgents.d.ts +2 -0
- package/dist/initAgents.d.ts.map +1 -0
- package/dist/initAgents.js +508 -0
- package/dist/initAgents.js.map +1 -0
- package/dist/log.d.ts +17 -0
- package/dist/log.d.ts.map +1 -0
- package/dist/log.js +49 -0
- package/dist/log.js.map +1 -0
- package/dist/mcpResult.d.ts +39 -0
- package/dist/mcpResult.d.ts.map +1 -0
- package/dist/mcpResult.js +19 -0
- package/dist/mcpResult.js.map +1 -0
- package/dist/mount.d.ts +33 -0
- package/dist/mount.d.ts.map +1 -0
- package/dist/mount.js +213 -0
- package/dist/mount.js.map +1 -0
- package/dist/paramTokens.d.ts +18 -0
- package/dist/paramTokens.d.ts.map +1 -0
- package/dist/paramTokens.js +50 -0
- package/dist/paramTokens.js.map +1 -0
- package/dist/projectStore.d.ts +5 -0
- package/dist/projectStore.d.ts.map +1 -0
- package/dist/projectStore.js +60 -0
- package/dist/projectStore.js.map +1 -0
- package/dist/requestConnection.d.ts +22 -0
- package/dist/requestConnection.d.ts.map +1 -0
- package/dist/requestConnection.js +50 -0
- package/dist/requestConnection.js.map +1 -0
- package/dist/serve.d.ts +10 -0
- package/dist/serve.d.ts.map +1 -0
- package/dist/serve.js +37 -0
- package/dist/serve.js.map +1 -0
- package/dist/server.d.ts +41 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +370 -0
- package/dist/server.js.map +1 -0
- package/dist/tools/actionCatalog.d.ts +24 -0
- package/dist/tools/actionCatalog.d.ts.map +1 -0
- package/dist/tools/actionCatalog.js +56 -0
- package/dist/tools/actionCatalog.js.map +1 -0
- package/dist/tools/attachment.tools.d.ts +15 -0
- package/dist/tools/attachment.tools.d.ts.map +1 -0
- package/dist/tools/attachment.tools.js +104 -0
- package/dist/tools/attachment.tools.js.map +1 -0
- package/dist/tools/backlog.tools.d.ts +13 -0
- package/dist/tools/backlog.tools.d.ts.map +1 -0
- package/dist/tools/backlog.tools.js +690 -0
- package/dist/tools/backlog.tools.js.map +1 -0
- package/dist/tools/connection.tools.d.ts +16 -0
- package/dist/tools/connection.tools.d.ts.map +1 -0
- package/dist/tools/connection.tools.js +120 -0
- package/dist/tools/connection.tools.js.map +1 -0
- package/dist/tools/defects.tools.d.ts +7 -0
- package/dist/tools/defects.tools.d.ts.map +1 -0
- package/dist/tools/defects.tools.js +108 -0
- package/dist/tools/defects.tools.js.map +1 -0
- package/dist/tools/discovery.tools.d.ts +23 -0
- package/dist/tools/discovery.tools.d.ts.map +1 -0
- package/dist/tools/discovery.tools.js +1746 -0
- package/dist/tools/discovery.tools.js.map +1 -0
- package/dist/tools/executionPlan.tools.d.ts +14 -0
- package/dist/tools/executionPlan.tools.d.ts.map +1 -0
- package/dist/tools/executionPlan.tools.js +184 -0
- package/dist/tools/executionPlan.tools.js.map +1 -0
- package/dist/tools/failure.tools.d.ts +14 -0
- package/dist/tools/failure.tools.d.ts.map +1 -0
- package/dist/tools/failure.tools.js +65 -0
- package/dist/tools/failure.tools.js.map +1 -0
- package/dist/tools/formulas.tools.d.ts +7 -0
- package/dist/tools/formulas.tools.d.ts.map +1 -0
- package/dist/tools/formulas.tools.js +84 -0
- package/dist/tools/formulas.tools.js.map +1 -0
- package/dist/tools/functionReuse.d.ts +77 -0
- package/dist/tools/functionReuse.d.ts.map +1 -0
- package/dist/tools/functionReuse.js +384 -0
- package/dist/tools/functionReuse.js.map +1 -0
- package/dist/tools/gapAnalysis.tools.d.ts +31 -0
- package/dist/tools/gapAnalysis.tools.d.ts.map +1 -0
- package/dist/tools/gapAnalysis.tools.js +287 -0
- package/dist/tools/gapAnalysis.tools.js.map +1 -0
- package/dist/tools/heal.tools.d.ts +20 -0
- package/dist/tools/heal.tools.d.ts.map +1 -0
- package/dist/tools/heal.tools.js +268 -0
- package/dist/tools/heal.tools.js.map +1 -0
- package/dist/tools/impactAnalysis.tools.d.ts +17 -0
- package/dist/tools/impactAnalysis.tools.d.ts.map +1 -0
- package/dist/tools/impactAnalysis.tools.js +352 -0
- package/dist/tools/impactAnalysis.tools.js.map +1 -0
- package/dist/tools/markdown.d.ts +13 -0
- package/dist/tools/markdown.d.ts.map +1 -0
- package/dist/tools/markdown.js +145 -0
- package/dist/tools/markdown.js.map +1 -0
- package/dist/tools/objects.tools.d.ts +7 -0
- package/dist/tools/objects.tools.d.ts.map +1 -0
- package/dist/tools/objects.tools.js +458 -0
- package/dist/tools/objects.tools.js.map +1 -0
- package/dist/tools/pipeline.tools.d.ts +11 -0
- package/dist/tools/pipeline.tools.d.ts.map +1 -0
- package/dist/tools/pipeline.tools.js +100 -0
- package/dist/tools/pipeline.tools.js.map +1 -0
- package/dist/tools/preference.tools.d.ts +15 -0
- package/dist/tools/preference.tools.d.ts.map +1 -0
- package/dist/tools/preference.tools.js +114 -0
- package/dist/tools/preference.tools.js.map +1 -0
- package/dist/tools/privileges.tools.d.ts +65 -0
- package/dist/tools/privileges.tools.d.ts.map +1 -0
- package/dist/tools/privileges.tools.js +186 -0
- package/dist/tools/privileges.tools.js.map +1 -0
- package/dist/tools/project.tools.d.ts +13 -0
- package/dist/tools/project.tools.d.ts.map +1 -0
- package/dist/tools/project.tools.js +199 -0
- package/dist/tools/project.tools.js.map +1 -0
- package/dist/tools/query.tools.d.ts +23 -0
- package/dist/tools/query.tools.d.ts.map +1 -0
- package/dist/tools/query.tools.js +368 -0
- package/dist/tools/query.tools.js.map +1 -0
- package/dist/tools/recording.tools.d.ts +58 -0
- package/dist/tools/recording.tools.d.ts.map +1 -0
- package/dist/tools/recording.tools.js +1050 -0
- package/dist/tools/recording.tools.js.map +1 -0
- package/dist/tools/recordingNames.d.ts +3 -0
- package/dist/tools/recordingNames.d.ts.map +1 -0
- package/dist/tools/recordingNames.js +16 -0
- package/dist/tools/recordingNames.js.map +1 -0
- package/dist/tools/report.tools.d.ts +12 -0
- package/dist/tools/report.tools.d.ts.map +1 -0
- package/dist/tools/report.tools.js +104 -0
- package/dist/tools/report.tools.js.map +1 -0
- package/dist/tools/run.tools.d.ts +25 -0
- package/dist/tools/run.tools.d.ts.map +1 -0
- package/dist/tools/run.tools.js +1295 -0
- package/dist/tools/run.tools.js.map +1 -0
- package/dist/tools/schemas.d.ts +860 -0
- package/dist/tools/schemas.d.ts.map +1 -0
- package/dist/tools/schemas.js +220 -0
- package/dist/tools/schemas.js.map +1 -0
- package/dist/tools/storySync.tools.d.ts +167 -0
- package/dist/tools/storySync.tools.d.ts.map +1 -0
- package/dist/tools/storySync.tools.js +678 -0
- package/dist/tools/storySync.tools.js.map +1 -0
- package/dist/tools/suiteManage.tools.d.ts +14 -0
- package/dist/tools/suiteManage.tools.d.ts.map +1 -0
- package/dist/tools/suiteManage.tools.js +112 -0
- package/dist/tools/suiteManage.tools.js.map +1 -0
- package/dist/tools/tasks.tools.d.ts +7 -0
- package/dist/tools/tasks.tools.d.ts.map +1 -0
- package/dist/tools/tasks.tools.js +101 -0
- package/dist/tools/tasks.tools.js.map +1 -0
- package/dist/tools/tcEditPublisher.d.ts +29 -0
- package/dist/tools/tcEditPublisher.d.ts.map +1 -0
- package/dist/tools/tcEditPublisher.js +61 -0
- package/dist/tools/tcEditPublisher.js.map +1 -0
- package/dist/tools/testCaseLint.d.ts +5 -0
- package/dist/tools/testCaseLint.d.ts.map +1 -0
- package/dist/tools/testCaseLint.js +112 -0
- package/dist/tools/testCaseLint.js.map +1 -0
- package/dist/tools/testPlan.tools.d.ts +12 -0
- package/dist/tools/testPlan.tools.d.ts.map +1 -0
- package/dist/tools/testPlan.tools.js +104 -0
- package/dist/tools/testPlan.tools.js.map +1 -0
- package/dist/tools/testcase.tools.d.ts +86 -0
- package/dist/tools/testcase.tools.d.ts.map +1 -0
- package/dist/tools/testcase.tools.js +1591 -0
- package/dist/tools/testcase.tools.js.map +1 -0
- package/dist/tools/testdata.tools.d.ts +7 -0
- package/dist/tools/testdata.tools.d.ts.map +1 -0
- package/dist/tools/testdata.tools.js +636 -0
- package/dist/tools/testdata.tools.js.map +1 -0
- package/dist/tools/xlsx.d.ts +8 -0
- package/dist/tools/xlsx.d.ts.map +1 -0
- package/dist/tools/xlsx.js +113 -0
- package/dist/tools/xlsx.js.map +1 -0
- package/dist/vendor/actionSignatures.d.ts +117 -0
- package/dist/vendor/actionSignatures.d.ts.map +1 -0
- package/dist/vendor/actionSignatures.js +420 -0
- package/dist/vendor/actionSignatures.js.map +1 -0
- package/dist/vendor/logger.d.ts +43 -0
- package/dist/vendor/logger.d.ts.map +1 -0
- package/dist/vendor/logger.js +184 -0
- package/dist/vendor/logger.js.map +1 -0
- package/dist/version.d.ts +10 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +10 -0
- package/dist/version.js.map +1 -0
- package/dist/versionName.d.ts +21 -0
- package/dist/versionName.d.ts.map +1 -0
- package/dist/versionName.js +48 -0
- package/dist/versionName.js.map +1 -0
- package/package.json +62 -6
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// Type-only imports above (erased at runtime), so this module has NO runtime dependency graph --
|
|
2
|
+
// it's a pure parser and can be unit-tested without pulling mount.ts's Electron/browser imports.
|
|
3
|
+
function firstHeader(req, name) {
|
|
4
|
+
const v = req.headers[name];
|
|
5
|
+
return Array.isArray(v) ? v[0] : v;
|
|
6
|
+
}
|
|
7
|
+
function firstQuery(req, name) {
|
|
8
|
+
const v = req.query[name];
|
|
9
|
+
if (Array.isArray(v))
|
|
10
|
+
return v[0] != null ? String(v[0]) : undefined;
|
|
11
|
+
return v != null ? String(v) : undefined;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Config-based connection (the no-chat setup path): an AI client's mcp.json can carry the
|
|
15
|
+
* connection in the transport itself instead of the user calling `qa_connect` in chat, e.g.
|
|
16
|
+
* { "url": "http://127.0.0.1:4050/mcp",
|
|
17
|
+
* "headers": { "Authorization": "Bearer <token>", "x-qa-product": "walnut",
|
|
18
|
+
* "x-qa-url": "http://localhost:8080", "x-project-id": "<id>" } }
|
|
19
|
+
*
|
|
20
|
+
* - token <- `Authorization: Bearer …` (scheme stripped; `x-qa-token` also accepted)
|
|
21
|
+
* - url <- `?url=` | `x-qa-url` | QA_MCP_URL (the MCP endpoint to hop to: agent /mcp for
|
|
22
|
+
* walnut recording, or the SQA /mcp)
|
|
23
|
+
* - baseUrl <- `?baseUrl=` | `x-qa-base-url` | QA_BASE_URL (the Walnut BACKEND REST base, for
|
|
24
|
+
* DIRECT data ops; a walnut session can connect with baseUrl alone)
|
|
25
|
+
* - product <- `?product=` | `x-qa-product` | QA_MCP_PROVIDER (default 'walnut')
|
|
26
|
+
* - projectId<- `?projectId=` | `x-project-id` | QA_MCP_PROJECT_ID
|
|
27
|
+
* - auth <- `?auth=` | `x-qa-auth` ('jwt' | 'key')
|
|
28
|
+
*
|
|
29
|
+
* Returns null when there is no usable token + (url|baseUrl), so the offline authoring path is untouched.
|
|
30
|
+
*/
|
|
31
|
+
export function connectionFromRequest(req) {
|
|
32
|
+
const authz = firstHeader(req, 'authorization') ?? '';
|
|
33
|
+
const token = ((authz.replace(/^Bearer\s+/i, '')) || firstHeader(req, 'x-qa-token') || '').trim();
|
|
34
|
+
if (!token)
|
|
35
|
+
return null;
|
|
36
|
+
// `url` = the MCP endpoint to hop to (agent /mcp for walnut recording, or the SQA /mcp).
|
|
37
|
+
// `baseUrl` = the Walnut BACKEND REST base for DIRECT data ops (QA_BASE_URL). Either one (with a
|
|
38
|
+
// token) is a usable connection; a walnut direct session needs only baseUrl.
|
|
39
|
+
const url = (firstQuery(req, 'url') ?? firstHeader(req, 'x-qa-url') ?? process.env['QA_MCP_URL'] ?? '').trim();
|
|
40
|
+
const baseUrl = (firstQuery(req, 'baseUrl') ?? firstHeader(req, 'x-qa-base-url') ?? process.env['QA_BASE_URL'] ?? '').trim();
|
|
41
|
+
if (!url && !baseUrl)
|
|
42
|
+
return null;
|
|
43
|
+
const productRaw = firstQuery(req, 'product') ?? firstHeader(req, 'x-qa-product') ?? process.env['QA_MCP_PROVIDER'] ?? '';
|
|
44
|
+
const product = productRaw === 'simplifyqa' ? 'simplifyqa' : 'walnut';
|
|
45
|
+
const projectId = (firstQuery(req, 'projectId') ?? firstHeader(req, 'x-project-id') ?? process.env['QA_MCP_PROJECT_ID'] ?? '').trim();
|
|
46
|
+
const authRaw = firstQuery(req, 'auth') ?? firstHeader(req, 'x-qa-auth') ?? '';
|
|
47
|
+
const auth = authRaw === 'key' ? 'key' : authRaw === 'jwt' ? 'jwt' : undefined;
|
|
48
|
+
return { token, product, ...(url ? { url } : {}), ...(baseUrl ? { baseUrl } : {}), ...(projectId ? { projectId } : {}), ...(auth ? { auth } : {}) };
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=requestConnection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requestConnection.js","sourceRoot":"","sources":["../src/requestConnection.ts"],"names":[],"mappings":"AAGA,iGAAiG;AACjG,iGAAiG;AAEjG,SAAS,WAAW,CAAC,GAAY,EAAE,IAAY;IAC7C,MAAM,CAAC,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5B,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACrC,CAAC;AACD,SAAS,UAAU,CAAC,GAAY,EAAE,IAAY;IAC5C,MAAM,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC1B,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAAE,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACrE,OAAO,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAC3C,CAAC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,qBAAqB,CAAC,GAAY;IAChD,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE,eAAe,CAAC,IAAI,EAAE,CAAC;IACtD,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC,IAAI,WAAW,CAAC,GAAG,EAAE,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IAClG,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IACxB,yFAAyF;IACzF,iGAAiG;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K,EAAE,OAAO,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;AACtJ,CAAC"}
|
package/dist/serve.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The PRODUCT stdio entry — what `simplify3x-connect` (or `simplify3x-connect serve`) runs when an AI client
|
|
3
|
+
* launches it over stdio (the npx path). Mirrors mount.ts's HTTP wiring (a live QaConnection so
|
|
4
|
+
* qa_connect works + a shared DraftStore so drafts survive across a session) but the transport is
|
|
5
|
+
* stdio and the connection is primed from the `QA_MCP_*` env the client passes in its mcp config —
|
|
6
|
+
* there are no HTTP headers over stdio. All logging goes to STDERR (log.ts); stdout is the MCP
|
|
7
|
+
* transport itself and must stay clean.
|
|
8
|
+
*/
|
|
9
|
+
export declare function startStdioServer(): Promise<void>;
|
|
10
|
+
//# sourceMappingURL=serve.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../src/serve.ts"],"names":[],"mappings":"AAQA;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAmBtD"}
|
package/dist/serve.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
2
|
+
import { buildServer } from './server.js';
|
|
3
|
+
import { QaConnection } from './connection.js';
|
|
4
|
+
import { DraftStore } from './drafts/store.js';
|
|
5
|
+
import { createAdapter } from './adapters/factory.js';
|
|
6
|
+
import { resolveConfig } from './config.js';
|
|
7
|
+
import { log, mask } from './log.js';
|
|
8
|
+
/**
|
|
9
|
+
* The PRODUCT stdio entry — what `simplify3x-connect` (or `simplify3x-connect serve`) runs when an AI client
|
|
10
|
+
* launches it over stdio (the npx path). Mirrors mount.ts's HTTP wiring (a live QaConnection so
|
|
11
|
+
* qa_connect works + a shared DraftStore so drafts survive across a session) but the transport is
|
|
12
|
+
* stdio and the connection is primed from the `QA_MCP_*` env the client passes in its mcp config —
|
|
13
|
+
* there are no HTTP headers over stdio. All logging goes to STDERR (log.ts); stdout is the MCP
|
|
14
|
+
* transport itself and must stay clean.
|
|
15
|
+
*/
|
|
16
|
+
export async function startStdioServer() {
|
|
17
|
+
const config = resolveConfig(process.env);
|
|
18
|
+
const connection = new QaConnection(config);
|
|
19
|
+
const server = buildServer({
|
|
20
|
+
adapter: createAdapter(config),
|
|
21
|
+
connection,
|
|
22
|
+
mode: config.mode,
|
|
23
|
+
drafts: new DraftStore(),
|
|
24
|
+
walnutUiOrigin: config.walnutUiOrigin,
|
|
25
|
+
agentUrl: config.agentUrl,
|
|
26
|
+
// No Electron window in the standalone CLI — tc_draft_open just returns the editor link.
|
|
27
|
+
openEditorWindow: async () => false,
|
|
28
|
+
});
|
|
29
|
+
await server.connect(new StdioServerTransport());
|
|
30
|
+
if (config.mode === 'offline') {
|
|
31
|
+
log('stdio server ready — offline (draft authoring only; set QA_MCP_URL / QA_MCP_TOKEN / QA_MCP_PROJECT_ID to connect)');
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
log(`stdio server ready — product=${config.provider ?? 'walnut'} url=${config.url} project=${config.projectId} token=${mask(config.token)}`);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=serve.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serve.js","sourceRoot":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,CAAC,EAAE,CAAC,CAAC;IAC/I,CAAC;AACH,CAAC"}
|
package/dist/server.d.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
import type { ProviderAdapter } from './adapters/types.js';
|
|
3
|
+
import type { QaConnection } from './connection.js';
|
|
4
|
+
import { DraftStore } from './drafts/store.js';
|
|
5
|
+
import { ok, err } from './mcpResult.js';
|
|
6
|
+
export { ok, err };
|
|
7
|
+
/**
|
|
8
|
+
* Common QA MCP -- the product-neutral core. This is the STANDALONE build: it carries the API
|
|
9
|
+
* lifecycle surface (connection, projects, discovery, drafts, save-orchestration) that routes to a
|
|
10
|
+
* product adapter -- Walnut over REST, SimplifyQA over its own MCP. The browser-recording + live
|
|
11
|
+
* editor tools are agent-bound (they need a real browser/Electron window) and live in the Walnut
|
|
12
|
+
* agent, which mounts this same core with those extra deps injected.
|
|
13
|
+
*
|
|
14
|
+
* `| undefined` on the optional fields is deliberate (exactOptionalPropertyTypes): callers thread
|
|
15
|
+
* them through from other optional values, e.g. `walnutUiOrigin: config.walnutUiOrigin`.
|
|
16
|
+
*/
|
|
17
|
+
export type ServerDeps = {
|
|
18
|
+
adapter: ProviderAdapter | null;
|
|
19
|
+
/** The LIVE connection (mount.ts supplies one); tools read it per call so runtime qa_connect /
|
|
20
|
+
* header-primed connections win over the startup adapter. */
|
|
21
|
+
connection?: QaConnection | undefined;
|
|
22
|
+
mode?: 'connected' | 'offline' | undefined;
|
|
23
|
+
drafts?: DraftStore | undefined;
|
|
24
|
+
walnutUiOrigin?: string | undefined;
|
|
25
|
+
agentUrl?: string | undefined;
|
|
26
|
+
openEditorWindow?: ((url: string, title: string) => Promise<boolean>) | undefined;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* MCP `initialize.instructions` — surfaced by every compliant client (Claude, VS Code, Cursor,
|
|
30
|
+
* Windsurf, Devin) into its LLM system prompt. Load-bearing for weaker orchestrators (Devin) that
|
|
31
|
+
* would otherwise freelance with shell/curl when a tool errors. Stays short — it complements, not
|
|
32
|
+
* replaces, per-tool descriptions (which the LLM also reads).
|
|
33
|
+
*
|
|
34
|
+
* Provider-aware: SimplifyQA record-from-scratch uses granular verbs orchestrated on the client
|
|
35
|
+
* (core_activate_technology → web_launch_application → web_snapshot + verbs → core_close_session),
|
|
36
|
+
* driven from `tc_record_append` which itself returns the numbered guide at call time. Walnut uses
|
|
37
|
+
* the bundled `web` sub-agent (single call, poll status). Unknown/offline gets a discovery hint.
|
|
38
|
+
*/
|
|
39
|
+
export declare function recordingInstructionsFor(provider: 'walnut' | 'simplifyqa' | 'unknown'): string;
|
|
40
|
+
export declare function buildServer(deps: ServerDeps): McpServer;
|
|
41
|
+
//# sourceMappingURL=server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AA2B/C,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAGzC,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC;AA0CnB;;;;;;;;;GASG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,OAAO,EAAE,eAAe,GAAG,IAAI,CAAC;IAChC;kEAC8D;IAC9D,UAAU,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;IACtC,IAAI,CAAC,EAAE,WAAW,GAAG,SAAS,GAAG,SAAS,CAAC;IAC3C,MAAM,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAChC,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,gBAAgB,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;CACnF,CAAC;AAIF;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,QAAQ,GAAG,YAAY,GAAG,SAAS,GAAG,MAAM,CA8F9F;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,UAAU,GAAG,SAAS,CAmOvD"}
|
package/dist/server.js
ADDED
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
import { DraftStore } from './drafts/store.js';
|
|
3
|
+
import { registerTestcaseTools } from './tools/testcase.tools.js';
|
|
4
|
+
import { registerConnectionTools } from './tools/connection.tools.js';
|
|
5
|
+
import { registerDiscoveryTools } from './tools/discovery.tools.js';
|
|
6
|
+
import { registerQueryTools } from './tools/query.tools.js';
|
|
7
|
+
import { registerPrivilegeTools, buildPrivilegeReport } from './tools/privileges.tools.js';
|
|
8
|
+
import { registerObjectTools } from './tools/objects.tools.js';
|
|
9
|
+
import { registerStorySyncTools } from './tools/storySync.tools.js';
|
|
10
|
+
import { registerBacklogTools } from './tools/backlog.tools.js';
|
|
11
|
+
import { registerRunTools } from './tools/run.tools.js';
|
|
12
|
+
import { registerSuiteManageTools } from './tools/suiteManage.tools.js';
|
|
13
|
+
import { registerExecutionPlanTools } from './tools/executionPlan.tools.js';
|
|
14
|
+
import { registerTestPlanTools } from './tools/testPlan.tools.js';
|
|
15
|
+
import { registerPipelineTools } from './tools/pipeline.tools.js';
|
|
16
|
+
import { registerFailureTools } from './tools/failure.tools.js';
|
|
17
|
+
import { registerTestdataTools } from './tools/testdata.tools.js';
|
|
18
|
+
import { registerPreferenceTools } from './tools/preference.tools.js';
|
|
19
|
+
import { registerAttachmentTools } from './tools/attachment.tools.js';
|
|
20
|
+
import { registerProjectTools } from './tools/project.tools.js';
|
|
21
|
+
import { registerFormulaTools } from './tools/formulas.tools.js';
|
|
22
|
+
import { registerDefectTools } from './tools/defects.tools.js';
|
|
23
|
+
import { registerTaskTools } from './tools/tasks.tools.js';
|
|
24
|
+
import { registerRecordingPassthrough } from './tools/recording.tools.js';
|
|
25
|
+
import { registerHealTools } from './tools/heal.tools.js';
|
|
26
|
+
import { registerReportTools } from './tools/report.tools.js';
|
|
27
|
+
import { registerGapAnalysisTools } from './tools/gapAnalysis.tools.js';
|
|
28
|
+
import { registerImpactAnalysisTools } from './tools/impactAnalysis.tools.js';
|
|
29
|
+
import { ok, err } from './mcpResult.js';
|
|
30
|
+
import { VERSION } from './version.js';
|
|
31
|
+
export { ok, err };
|
|
32
|
+
/**
|
|
33
|
+
* Collection READ tools superseded by `sqa_query` on SimplifyQA. They are not registered at all for
|
|
34
|
+
* SQA connections (the write/authoring/analysis tools with the same prefixes stay). `list_projects`
|
|
35
|
+
* is here too: `sqa_query` reads `projects` with no project selected (`member:true` = your own).
|
|
36
|
+
*/
|
|
37
|
+
const SQA_GENERIC_READ_TOOLS = new Set([
|
|
38
|
+
'list_projects',
|
|
39
|
+
'tc_list', 'tc_get', 'journal_grep',
|
|
40
|
+
'story_list', 'story_get',
|
|
41
|
+
'epic_list', 'epic_get', 'feature_list', 'feature_get',
|
|
42
|
+
'list_releases', 'list_sprints',
|
|
43
|
+
'list_modules', 'get_module',
|
|
44
|
+
'list_functions', 'get_function',
|
|
45
|
+
'suite_list', 'suite_get',
|
|
46
|
+
'list_users',
|
|
47
|
+
'object_list', 'object_get', 'tc_list_objects',
|
|
48
|
+
'defect_list', 'task_list',
|
|
49
|
+
// NOTE: tc_list_environments / tc_get_testdata / tc_list_formulas are deliberately NOT listed
|
|
50
|
+
// here. They are not generic collection reads — they are the testdata surface (env keys,
|
|
51
|
+
// parameter names + seeds with protected values masked, formula names), they are implemented in
|
|
52
|
+
// the SimplifyQA adapter, and tc_generate_testdata's own instructions tell the caller to use two
|
|
53
|
+
// of them. Skipping them left those instructions pointing at tools that did not exist.
|
|
54
|
+
]);
|
|
55
|
+
/** Proxy that silently drops registrations for `skip` — lets us keep the existing modules untouched. */
|
|
56
|
+
function skipTools(server, skip) {
|
|
57
|
+
const register = server.registerTool.bind(server);
|
|
58
|
+
return new Proxy(server, {
|
|
59
|
+
get(target, prop, receiver) {
|
|
60
|
+
if (prop === 'registerTool') {
|
|
61
|
+
return (name, ...rest) => {
|
|
62
|
+
if (skip.has(name))
|
|
63
|
+
return undefined;
|
|
64
|
+
return register(name, ...rest);
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
return Reflect.get(target, prop, receiver);
|
|
68
|
+
},
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
const OFFLINE_TOOLS = ['actions_catalog', 'tc_draft_create', 'tc_draft_update', 'tc_draft_get', 'tc_draft_discard', 'tc_draft_open'];
|
|
72
|
+
/**
|
|
73
|
+
* MCP `initialize.instructions` — surfaced by every compliant client (Claude, VS Code, Cursor,
|
|
74
|
+
* Windsurf, Devin) into its LLM system prompt. Load-bearing for weaker orchestrators (Devin) that
|
|
75
|
+
* would otherwise freelance with shell/curl when a tool errors. Stays short — it complements, not
|
|
76
|
+
* replaces, per-tool descriptions (which the LLM also reads).
|
|
77
|
+
*
|
|
78
|
+
* Provider-aware: SimplifyQA record-from-scratch uses granular verbs orchestrated on the client
|
|
79
|
+
* (core_activate_technology → web_launch_application → web_snapshot + verbs → core_close_session),
|
|
80
|
+
* driven from `tc_record_append` which itself returns the numbered guide at call time. Walnut uses
|
|
81
|
+
* the bundled `web` sub-agent (single call, poll status). Unknown/offline gets a discovery hint.
|
|
82
|
+
*/
|
|
83
|
+
export function recordingInstructionsFor(provider) {
|
|
84
|
+
const common = [
|
|
85
|
+
'You are driving Simplify3x Connect (simplify3x-connect), which fronts a QA product (Walnut or SimplifyQA).',
|
|
86
|
+
'',
|
|
87
|
+
'GROUND RULES (all providers, always):',
|
|
88
|
+
'- FIRST turn: call `qa_connection_status` to see what is connected and which project is active.',
|
|
89
|
+
' If not connected, call `qa_connect({ url, token, projectId })`.',
|
|
90
|
+
'- Project is NEVER assumed. If none is active, list the user\'s projects (SimplifyQA: `sqa_query({ op:"search", collection:"projects", where:[{ field:"member", value:true }] })`; Walnut: `list_projects`) and ASK the user which one, then `qa_switch_project`.',
|
|
91
|
+
'- NEVER save without an EXPLICIT user instruction ("save it" / "persist it"). A finished recording is a DRAFT - stop and show it. "Looks good" is approval of content, NOT permission to save. ONE EXCEPTION: an API recording auto-saves ONCE after its LAST api_send_request (see API below), so the recorded test case is searchable without clicking Send and Save.',
|
|
92
|
+
'- NEVER call an MCP endpoint directly with curl / Invoke-RestMethod / raw JSON-RPC. NEVER shell out to work around a failing tool. If a tool errors or is missing, REPORT the error and STOP — do not synthesize a workaround.',
|
|
93
|
+
'- Follow each tool\'s own description — many tools RETURN a numbered guide in their response (notably `tc_record_append`). Do exactly what the returned guide says.',
|
|
94
|
+
'- If the user asks for something this MCP does not expose (e.g. activity / audit / login logs), say plainly that it is not available here and stop. NEVER answer with a look-alike collection (scheduleHistory is scheduler runs, not an activity log).',
|
|
95
|
+
'- When a result carries a `visibility` note (SimplifyQA users / projects), the list is only what THIS user can see. Say so in the answer ("341 users who share a project with you"), never "all users" / "every project".',
|
|
96
|
+
'',
|
|
97
|
+
].join('\n');
|
|
98
|
+
if (provider === 'simplifyqa') {
|
|
99
|
+
return common + [
|
|
100
|
+
'RECORDING ON SIMPLIFYQA — THE DIRECT FLOW (all technologies: WEB / MAINFRAME / ANDROID / IOS / API / DATABASE / DESKTOP):',
|
|
101
|
+
'The SimplifyQA local agent does NOT expose bundled `web` / `mainframe` / `android` / `ios` / `db` sub-agent tools — calling them errors with "unknown tool". Recording is orchestrated by YOU (the LLM) through granular verbs.',
|
|
102
|
+
'',
|
|
103
|
+
'NO PRE-FLIGHT. Do NOT create a draft. Do NOT open anything. Do NOT call any `tc_*` tool before `core_activate_technology`. The recording session IS the entry point — `core_activate_technology` launches the recorder and creates the test-case shell itself. Save happens when the user clicks Save Testcase in the SimplifyQA recorder UI, or when they explicitly ask you to save from chat and you call `tc_save({ sessionId })` (that clicks the recorder window\'s own Save button).',
|
|
104
|
+
'',
|
|
105
|
+
'Common shape for every technology:',
|
|
106
|
+
' 1. `qa_connection_status` — verify connected + note the projectId.',
|
|
107
|
+
' 2. Ask the tech-specific setup questions BEFORE activation (WEB needs the AI-only vs AI + Manual recording mode AND `recordingModeAskedUser`, asked on EVERY recording — never reused; mainframe needs route + `app_path`; android/ios need the platform (`Android or iOS?` → `platformAskedUser`) plus `deviceId` when >1 device; desktop needs the application\'s full `.exe` path, with the application closed first).',
|
|
108
|
+
' 3. `core_activate_technology({ technology: "<WEB|MAINFRAME|ANDROID|IOS|API|DATABASE|DESKTOP>", testcaseName, ...tech args })` — ONCE, at start. response.structuredContent.sessionId is the recording id. A clashing `testcaseName` is REFUSED — ASK for another name, or pass `allowDuplicateName: true` only when the user explicitly wants a duplicate.',
|
|
109
|
+
' 4. `<tech>_launch_application({ ... })` — ALWAYS the FIRST action call. No snapshot / verify / save before it.',
|
|
110
|
+
' 5. `<tech>_snapshot()` to get element refs (web/android/ios/desktop only; mainframe has no snapshot). Reuse refs while the page/screen is unchanged. Pass a ref to the action verb — NEVER a raw locator.',
|
|
111
|
+
' 6. Per user intent: one snapshot ref + exactly ONE action verb + one narration line.',
|
|
112
|
+
' 7. On error inside recording: ONE fresh `<tech>_snapshot` + retry once (skip on mainframe), then STOP and report.',
|
|
113
|
+
' 8. `core_close_session()` when the flow is done. Unsaved steps make it REFUSE and return a one-shot `confirm: "<token>"` — ASK the user (SAVE / DISCARD / CLOSE ANYWAY) and only retry with the token when they explicitly choose to discard.',
|
|
114
|
+
' 9. STOP. Report the recording session id. Tell the user to review captured steps in the SimplifyQA recorder UI and click Save Testcase — the recorder UI persists it. If the user EXPLICITLY says save from chat, call `tc_save({ sessionId })` instead — it clicks the recorder window\'s own Save, so the saved TC is exactly what the window shows. Do NOT call `tc_save({ draftId })` / `tc_draft_from_journal` / `update_testcase` / `journal_modify` for a live recording, and never do BOTH (duplicate TC).',
|
|
115
|
+
'',
|
|
116
|
+
'WEB: `core_activate_technology({ technology: "WEB", testcaseName, recordingMode: "AI"|"HYBRID", recordingModeAskedUser: "ai"|"hybrid" })` → `web_launch_application({ url })` → `web_snapshot` + `web_click` / `web_enter_text` / `web_select_item_from_dropdown` / `web_validate_text` / `web_keyboard_action`. ASK "AI-only or AI + Manual?" on EVERY WEB recording (AI + Manual = HYBRID; if the user already named it, use that) and pass BOTH fields (they must match) — never reuse an earlier answer; the tool refuses without them. Tabs: `web_switch_to_tab` / `web_switch_to_parent_tab` / `web_close_tab`. Iframes: `web_switch_to_iframe({ ref })` / `web_switch_to_parent_iframe` / `web_switch_to_default_content`. Formulas: pass `formula: { name, args? }` (from `tc_list_formulas`) or `formula: { expression }` to `web_enter_text` / `web_keyboard_action` to generate a field\'s value instead of typing a literal — the recorder types a fresh value and the saved step regenerates per run; only when the user asks for a formula value.',
|
|
117
|
+
'',
|
|
118
|
+
'MAINFRAME: ASK the ROUTE first (never pick / never infer). Emulator route: `app_path` (Windows-only, one recording at a time). Direct route: `host` + `port` + `marker` (any OS, several in parallel). `core_activate_technology({ technology: "MAINFRAME", testcaseName, app_path? OR host? + port? + marker? })` → `mainframe_launch_application` is FIRST. NO snapshot — target fields by `{ by: "label" | "position", target }`. AID keys: `mainframe_keyboard_action({ keys: "ENTER" | "PF3" })`. A failed step ends the session. Formulas: pass `formula: { name, args? }` or `formula: { expression }` to `mainframe_enter_text` to generate a field\'s value instead of a literal — only when the user asks for a formula value.',
|
|
119
|
+
'',
|
|
120
|
+
'ANDROID: `android_list_devices` FIRST (never guess a device or a package id). Resolve the app the user names to its exact `package` from that list. ASK "Android or iOS?" on EVERY mobile recording and pass `platformAskedUser: "android"` (must match `technology`; the tool refuses without it). `deviceId`: omit only with exactly one device; ASK with several. `core_activate_technology({ technology: "ANDROID", testcaseName, platformAskedUser: "android", deviceId })` → `android_launch_app({ package, activity? })` is FIRST → `android_snapshot` returns refs (`e1`, `e2`, … tagged `id|desc|text|bounds|xpath`) → `android_click` / `android_enter_text` / `android_validate_text`. Do NOT add generic_wait pauses on android — the verbs already wait. Formulas: pass `formula: { name, args? }` or `formula: { expression }` to `android_enter_text` to generate a field\'s value instead of a literal — only when the user asks for a formula value.',
|
|
121
|
+
'',
|
|
122
|
+
'IOS: `ios_list_devices` FIRST — match user\'s app word against the DISPLAY NAME (bundleId is opaque). ASK "Android or iOS?" on EVERY mobile recording and pass `platformAskedUser: "ios"` (must match `technology`; the tool refuses without it). `deviceId` rules match android. `core_activate_technology({ technology: "IOS", testcaseName, platformAskedUser: "ios", bundleId, deviceId })` → `ios_launch_app` is FIRST → `ios_snapshot` + `ios_click` / `ios_enter_text` / `ios_validate_text`. Real device does NOT need macOS (go-ios drives it); simulator does. `projectId` is for WDA signing on real devices only. Formulas: pass `formula: { name, args? }` or `formula: { expression }` to `ios_enter_text` to generate a field\'s value instead of a literal — only when the user asks for a formula value.',
|
|
123
|
+
'',
|
|
124
|
+
'API: no device, no app_path, no snapshot. `core_activate_technology({ technology: "API", testcaseName })` returns `structuredContent.sessionId` — KEEP it (it is the journal id for the save step; `core_active_recordings({})` is the fallback). Then `api_send_request({ method, url, headers?, query?, body?: {type,data:{payload}}, auth?: {type,token|username+password|key+value}, assertions?: [{path,condition,expectedValue}], extract?: [{path,store_as}] })` one call per request. Bodies are JSON/XML/TEXT/NONE — FORM_DATA and X_WWW_FORM_URLENCODED are not wired to the plugin yet (rejected). Supports `{{var}}` interpolation across chained calls (extract $.token in call 1, use `{{token}}` in call 2\'s auth.token). API steps STREAM into the `/mcp-recorder` window (RECORDED_API_STEP). **AUTO-SAVE: after the LAST `api_send_request` of the recording, call `tc_save({ sessionId })` ONCE, without asking** — this is the one exception to the explicit-save rule, and only for API recordings. It persists the test case and its steps so they are searchable/viewable/executable immediately, without the user having to click Send and Save in the API popup. Save ONCE at the end; never save after each request (that creates duplicate test cases). If it fails with `recorder save request failed`, persist from the journal instead: `tc_draft_from_journal({ sessionId })` → optional `tc_draft_update` → `tc_save({ draftId })` (no `core_close_session` needed). Never do both — that creates a duplicate test case. Report the created TC id and tell the user it is already saved. To add assertions to a SAVED API step later, use `journal_modify({ tcId, ops:[{ op:"add_assertions", n, assertions:[{ path:"responseTime", condition:"LESSER_THAN", expectedValue:"3000" }] }] })` — it APPENDS to that step and leaves the request, object, action, parameters and existing assertions untouched. Never re-record a test case just to add an assertion.',
|
|
125
|
+
'',
|
|
126
|
+
'DATABASE: no device, no app_path, no snapshot; the recorder window opens on activation and streams each step. `core_activate_technology({ technology: "DATABASE", testcaseName })` → `db_connect({ dbType, host, port, user, password, database })` (or `connectionString`) is FIRST — ASK the user for the connection details, never invent them → `db_execute_query` / `db_update` / `db_read_data` / `db_insert_data` → `db_close` (MongoDB: `db_connect_mongo` + `db_insert_document` / `db_update_documents` / `db_read_documents`). Every call executes LIVE and is recorded only if it succeeds; a failure returns the plugin error and records nothing. `store_as` captures a result (required by `db_read_data` / `db_read_documents`), `from_runtime` reuses it. SAVE: the user clicks Save Testcase in the recorder window; if the user explicitly asks you to save from chat, call `tc_save({ sessionId })` — it clicks the window\'s own Save, so the recorded DB steps are saved exactly. Headless fallback only when the user does not want the UI or it is unavailable — `core_close_session()` → `tc_draft_from_journal({ sessionId })` → `tc_save({ draftId })` (explicit user save instruction only; never both).',
|
|
127
|
+
'',
|
|
128
|
+
'DESKTOP (Windows desktop applications): no device, no browser. ASK for the application\'s full `.exe` path unless the user gave it (never search the filesystem), and ASK the user to CLOSE the application if it is already open — a second launch is refused and there is no attach. `core_activate_technology({ technology: "DESKTOP", testcaseName })` → `desktop_launch_application({ app_path })` is FIRST → tell the user NOT to touch the mouse or keyboard until you finish (steps use the real mouse and keyboard) → `desktop_snapshot()` returns refs (`e1`, `e2`, …) → `desktop_click` / `desktop_enter_text` / `desktop_select_item_from_dropdown` / `desktop_set_checkbox` / `desktop_invoke_menu_item` / `desktop_validate_text` with `{ ref }`. Take a new `desktop_snapshot` after a step that changes the window. If the user names an element the outline does not show, call `desktop_snapshot({ all: true })`: every element gets a ref; on a ref marked `(hidden from the control view)`, prefer `desktop_click` and `desktop_enter_text`. Windows switch by themselves: every ref knows its window, and a step on a ref in another window (a dialog, a pop-up) records `desktop_switch_window` / `desktop_switch_to_root` first. Each step result names window changes in a `Windows:` line (a dialog opened, a window closed or was renamed); when it includes an outline, its refs replace the earlier ones — act on them without a new snapshot. A step on a window that a dialog blocks is refused, with the dialog\'s outline. Menu bar: `desktop_click` the menu ("File") to open it, then `desktop_invoke_menu_item` on its item (the outline marks such items `(open "File" first)`). A right-click menu or an open drop-down list is OUTSIDE the window: after opening it, call `desktop_snapshot({ scope: "popups" })` and act on those refs. A dialog that is not in the snapshot: `desktop_list_windows` → `desktop_switch_window({ window_name })` → `desktop_snapshot()`. Pass `xpath` instead of `ref` only when the user gives an exact XPath. Formulas: pass `formula: { name, args? }` or `formula: { expression }` to `desktop_enter_text` / `desktop_set_text` to generate a value instead of a literal — only when the user asks for a formula value. Reuse a saved desktop function with `core_reuse_function({ function, params })`: it runs live and records one function step. A function that starts with Launch Application launches the application itself — reuse it right after `core_activate_technology`, INSTEAD of `desktop_launch_application` (after a launch it is refused). SAVE: the user clicks Save Testcase in the recorder window; if the user explicitly asks you to save from chat, call `tc_save({ sessionId })` — it clicks the window\'s own Save.',
|
|
129
|
+
'',
|
|
130
|
+
'Automate an EXISTING manual test case (any tech): `tc_automate({ tcId, url, extra? })` first — returns a guide built from the manual steps (with testcaseName + userstoryId/moduleId already derived). Then run the same common-shape steps. Save is via the recorder UI\'s Save Testcase button, or `tc_save({ sessionId })` when the user explicitly asks you to save from chat. Do NOT call `tc_save({ draftId })`.',
|
|
131
|
+
'After that automated test case is SAVED, LINK it to the source manual TC: `tc_list_link_types` → SHOW the options → ASK the user which one → `tc_link({ fromTcId: <manual>, toTcId: <automation>, linkType: <chosen> })` (both directions by default). Never choose a link type yourself.',
|
|
132
|
+
'',
|
|
133
|
+
'READS / QUERIES: `sqa_query` is the ONLY read tool on SimplifyQA. Use it for EVERY fetch, query, list, search, get, read or count — the old per-collection reads (tc_list, tc_get, story_list, story_get, epic_list, feature_list, list_modules, list_functions, suite_list, list_users, object_list, defect_list, task_list, list_releases, list_sprints, journal_grep, …) are NOT registered. Do not look for them and do not invent one. This includes projects (works with no project selected): "how many projects" → `{ op:"count", collection:"projects" }` (an admin sees every project in the tenant); "my projects" → add `where:[{ field:"member", value:true }]`.',
|
|
134
|
+
' Flow: `sqa_query({ op:"catalog" })` (or `catalog` with a collection) → `{ op:"search", collection, where, sort, limit }` or `{ op:"get", collection, id }` → `{ op:"related", collection, id, relation }`. Any "show / list / find / get / fetch / count ..." request goes here.',
|
|
135
|
+
' It always filters `deleted:false`, scopes to the active project, rejects unknown fields locally, and resolves custom fields: `op:"custom_fields"` returns label → key → `customFields.<key>`; then pass the label with `custom:true` in `where`. Test cases have NO priority/status columns — use `reviewApproveStatus` or a custom field. The one exception is a FAILED run: analyse it with `failure_analysis` (below), not by reading its steps with `sqa_query`.',
|
|
136
|
+
'COLUMN PREFERENCES (user-level, per list view): `column_preference({ action:"set", lists:["epic","feature","userstory"], column:"Created On" })` shows that column in the SimplifyQA UI list view (the same write as ticking it in Column Preference); `enabled:false` hides it; `action:"get"` reports the current columns. It takes effect on the UI after a refresh.',
|
|
137
|
+
'ATTACHMENTS (epic / feature / user story): `attachment_add({ entityType:"epic"|"feature"|"userstory", itemId, filePath:"<absolute path>" })` uploads one file and reads the item\'s attachments back to confirm; the file appears in the UI\'s Attachments section. A screenshot pasted in chat has no local path — ASK for its absolute path (or accept base64 + fileName). `attachment_delete({ entityType, itemId, attachment })` removes a wrong upload.',
|
|
138
|
+
'WATCH LIST (the UI email button): `epic_create` / `feature_create` / `story_create` accept `watchList:["email-or-name-or-id", …]`; for an existing item use `watch_list_add({ entityType, itemId, users:[…] })`. Emails/names/ids resolve to user ids and the item is re-read to confirm. Never say you cannot set the Watch List.',
|
|
139
|
+
'LINKAGES (the UI Linkages section): `backlog_link({ sourceType:"epic"|"feature"|"userstory", sourceId, destType:"defect"|"epic"|"feature"|"userstory"|"task", destId, linkType:"Clones" })`. linkType is the displayed link-type name; it is matched to the project link-type config (unknown → refused with the list) and the link is read back from /pm/linkages.',
|
|
140
|
+
'PROJECTS: `project_create({ name, description?, users? })` creates a project (the admin Project screen form), reads it back and returns its id + PR code — then `qa_switch_project` to work in it. `project_delete` is TWO-STEP (preview, then confirm:true). Never say you cannot create a project.',
|
|
141
|
+
'',
|
|
142
|
+
'TEST EXECUTION (SimplifyQA): suites `suite_manage`, execution plans `execution_plan`, test plans `test_plan`, pipelines `pipeline`, schedules via `schedule_*` (and `tc_run` / `suite_run` with when:"schedule"; execution plans cannot be scheduled - the SimplifyQA Scheduler takes a test case or a suite). Every DELETE (a test case, a suite, a plan/folder, an execution plan) is TWO-STEP: the first call only previews - show it, and call again with confirm:true ONLY after the user explicitly says so. Start a run or create a schedule ONLY on an explicit instruction. SimplifyQA execution plans run LOCALLY only. SimplifyQA has no pause for a schedule (cancel it, or give it a new start time). Removing ONE test case from a test plan is a plain edit, not a delete: `test_plan({ action:"remove_testcase", testPlanId, tcId })` removes only that case, is re-read to confirm, and leaves the suites, other test cases and sub-folders alone (re-add it with action:"add").',
|
|
143
|
+
'',
|
|
144
|
+
'FAILED RUNS: call `failure_analysis({ code })` with TC-123 / SU-123 / PL-123 (PL = execution plan) for its latest execution, add `executionId` (or pass it alone) to analyse only that execution. It returns an ANALYSIS CARD (tables: "Why … failed" and "Failed test cases" with Report Step No. and Test case step) followed by evidence. START YOUR REPLY WITH THE CARD EXACTLY AS RETURNED — same tables, rows and columns, never summarised or reworded — then add Why and Fix for each cause # from the evidence. Do not assert a cause the evidence does not support.',
|
|
145
|
+
'',
|
|
146
|
+
'Rules while recording (all technologies):',
|
|
147
|
+
'- Record ONLY what the user asked for. Do NOT add extra verify/validate steps unless the user says "verify" / "assert" / "check".',
|
|
148
|
+
'- For a randomized value (e.g. random Indian name), use `generic_generate_random_alphanumeric({ count, store_as: "<name>" })` and reference later via `from_runtime: "<name>"` in the enter/select verb — NEVER pass `${name}` as a literal.',
|
|
149
|
+
'- Control flow: `core_if` / `core_else_if` / `core_else` / `core_end_if`; `core_loop({ count })` / `core_end_loop`; `core_reuse_function({ function, params })` to reuse a saved function. Balance every open with its close.',
|
|
150
|
+
'- Building a test case OUT OF saved functions ("use these functions and create a new tc"): draft ONE step per function, in run order, with `tc_draft_create({ title, steps: [{ description: "<narrative>", actionType: "function", stepType: "function", functionCall: { testCaseId: "FN-12" } }, …] })`, then `tc_save({ draftId })`. The matching FUNCTION_END is generated automatically and the function\'s newest version is pinned at save. Resolve the functions first with `sqa_query({ op: "search", collection: "functions" })`; pass the id or the FN-code (both work). NEVER author a `function_end` step yourself, and never fake a function call with ordinary click/type steps.',
|
|
151
|
+
'- **A test case made of EXISTING functions is NOT a recording — do NOT call `core_activate_technology` for it.** ("create a test case with all the MongoDB functions", "use these functions to make a tc" → list the functions, then `tc_draft_create` + `tc_save` as above.) Recording is only for capturing NEW steps. In particular `core_reuse_function` DRIVES the function live, which DATABASE/API sessions cannot do (it fails with "executeResolved is not supported by this technology") — for a functions-only test case that live drive is never needed.',
|
|
152
|
+
'- **Updating an EXISTING test case\'s test data / adding a formula there: `tc_update_testdata({ tcId, environmentType, cells: [{ param, value } | { param, formula: { expression } }] })`.** It writes the DEFAULT iteration (ITR-1) - the row a run actually uses - and leaves every other column alone. `tc_generate_testdata` APPENDS iterations and never becomes the default, so a formula saved there does NOT affect the next run. Formulas must come from `tc_list_formulas` (never invent names); TODAY takes a QUOTED offset like `=TODAY("d+365")`, not `ddmmyyyy`.',
|
|
153
|
+
'- **Suite-level test data is a SEPARATE store from the member test cases.** When the user says "SU-24 test data" / "suite level only", use `suite_get_testdata({ suiteId, environmentType })` to read it and `suite_copy_testdata({ suiteId, environmentType, from?, name? })` to copy a row (e.g. ITR-1 → ITR-2) — the copy is saved on the SUITE and NEVER touches the member test cases\' own test data; both tools read the rows back to confirm. Do NOT use tc_generate_testdata / tc_update_testdata on the member TCs for a suite-level request. To remove an iteration row created by mistake: `testdata_delete_iterations({ entityType:"TC"|"SU", tcId?|suiteId?, environmentType, iterations:["ITR-2"] })` — the DEFAULT row cannot be deleted.',
|
|
154
|
+
'- Never record a rejected step (intent count == recorded-step count). Always supply object_name / parameter_name / step_description.',
|
|
155
|
+
'- **THE MOMENT A RECORDING FINISHES, BEFORE ASKING TO SAVE: call `tc_suggest_function_groups({ sessionId })`.** It answers with two lists: `replace` — blocks of the recorded steps that ALREADY exist as a reusable function, and `create` — contiguous blocks worth extracting into a NEW function. Show BOTH and ASK the user per block: "create a new function (name?)", "replace with FN-x", or "keep as is" — never decide for them. APPLY AFTER the test case is saved (both need a saved tcId): `tc_steps_to_function({ tcId, stepSeqs, name, moduleId, replaceInSource: true })` for a create, `tc_replace_with_functions({ tcId, replace: [{ fnId, stepSeqs }] })` for a replace. If the lists are empty, say nothing and continue. This is a suggestion — it is NOT a save instruction.',
|
|
156
|
+
].join('\n');
|
|
157
|
+
}
|
|
158
|
+
if (provider === 'walnut') {
|
|
159
|
+
return common + [
|
|
160
|
+
'RECORDING A WEB TEST CASE (Walnut):',
|
|
161
|
+
'Walnut exposes bundled technology SUB-AGENT tools — one call starts a real browser recording driven by the agent\'s own LLM loop.',
|
|
162
|
+
' 1. `qa_technology_status` — confirm `web` is available.',
|
|
163
|
+
' 2. ASK the user about REUSE first: an existing Login as `nestStart`, Logout as `nestEnd`? Find ids via `tc_list`.',
|
|
164
|
+
' 3. `web({ task, url, nestStart?, nestEnd? })` — `task` is the complete goal ("Sign in at <url> as X/Y, then verify Z"). Returns immediately with `{ sessionId, status: "recording" }`. Call ONCE — do NOT retry it.',
|
|
165
|
+
' 4. POLL `web_status({ sessionId })` every ~15-20 seconds until `status: "done"`. It returns `{ draftId, tc, stepCount }`.',
|
|
166
|
+
' 5. Show the draft in plain language. Wait for an EXPLICIT save instruction, then `tc_save({ draftId })`.',
|
|
167
|
+
'',
|
|
168
|
+
'Mainframe / Android / iOS follow the same START → POLL `<tech>_status` → save shape; each has route/device questions to ask the user FIRST (see per-tool descriptions).',
|
|
169
|
+
].join('\n');
|
|
170
|
+
}
|
|
171
|
+
return common + [
|
|
172
|
+
'RECORDING: provider is not yet resolved. Call `qa_connection_status` first — the response names the product, and the per-tool descriptions from `tools/list` will guide the flow (SimplifyQA uses granular verbs orchestrated via `tc_record_append`; Walnut uses the bundled `web` sub-agent).',
|
|
173
|
+
].join('\n');
|
|
174
|
+
}
|
|
175
|
+
export function buildServer(deps) {
|
|
176
|
+
// Provider known at boot from the live connection, or env when standalone (no mount.ts wrap).
|
|
177
|
+
// Unknown = offline / no config yet — the instructions still steer the LLM to discover via
|
|
178
|
+
// `qa_connection_status` before recording.
|
|
179
|
+
const envProvider = (process.env['QA_MCP_PROVIDER'] ?? '').toLowerCase();
|
|
180
|
+
const provider = deps.connection?.config().provider
|
|
181
|
+
?? (envProvider === 'simplifyqa' || envProvider === 'walnut' ? envProvider : 'unknown');
|
|
182
|
+
const server = new McpServer({ name: 'simplify3x-connect', version: VERSION }, { instructions: recordingInstructionsFor(provider) });
|
|
183
|
+
const drafts = deps.drafts ?? new DraftStore();
|
|
184
|
+
// On SimplifyQA the collection reads are gone: ONE `sqa_query` tool replaces them. The write,
|
|
185
|
+
// authoring, analysis and run tools stay registered. Walnut keeps its existing read surface.
|
|
186
|
+
const toolServer = provider === 'simplifyqa' ? skipTools(server, SQA_GENERIC_READ_TOOLS) : server;
|
|
187
|
+
server.registerTool('project_info', {
|
|
188
|
+
description: 'Validate the configured connection and return provider, org/project and entity counts.',
|
|
189
|
+
inputSchema: {}, annotations: { readOnlyHint: true },
|
|
190
|
+
}, async () => {
|
|
191
|
+
// The live connection wins over startup state: the user may have connected/disconnected since
|
|
192
|
+
// boot (qa_connect or config headers), so reporting the boot-time mode would be wrong.
|
|
193
|
+
const live = deps.connection?.describe();
|
|
194
|
+
const adapter = deps.connection ? deps.connection.adapter() : deps.adapter;
|
|
195
|
+
const mode = live ? live.mode : deps.mode;
|
|
196
|
+
if (mode === 'offline') {
|
|
197
|
+
return ok('Offline: no backend connection, so nothing is persisted anywhere.\n\n' +
|
|
198
|
+
`Available offline: ${OFFLINE_TOOLS.join(', ')}.\n` +
|
|
199
|
+
'Author a draft with tc_draft_create / tc_draft_update and open it with tc_draft_open.\n\n' +
|
|
200
|
+
'To work with EXISTING test cases (list, read, modify, run), connect first:\n' +
|
|
201
|
+
' qa_connect({ url: "https://<your-product>", token: "<token>", projectId: "<id>" })', { mode: 'offline', availableTools: OFFLINE_TOOLS, ...(live ? { connection: live } : {}) });
|
|
202
|
+
}
|
|
203
|
+
if (!adapter)
|
|
204
|
+
return err('No provider configured. Use qa_connect, or set QA_MCP_URL/TOKEN/PROJECT_ID.');
|
|
205
|
+
try {
|
|
206
|
+
const info = await adapter.info();
|
|
207
|
+
// Best-effort: say up front whether this user can record here (the same gate
|
|
208
|
+
// core_activate_technology enforces). A provider without a role model, or a lookup hiccup,
|
|
209
|
+
// must never break project_info — it is a diagnostic, not the source of truth.
|
|
210
|
+
const privileges = adapter.getProjectPrivileges
|
|
211
|
+
? await adapter
|
|
212
|
+
.getProjectPrivileges()
|
|
213
|
+
.then((p) => buildPrivilegeReport(p))
|
|
214
|
+
.catch(() => null)
|
|
215
|
+
: null;
|
|
216
|
+
return ok(`Connected: ${info.provider} · project ${info.projectName} (${info.projectId})`
|
|
217
|
+
+ (live?.source === 'runtime-connect' ? ' · via qa_connect' : ' · from startup config')
|
|
218
|
+
+ (privileges ? `\nRecording: ${privileges.verdict === 'ok' ? 'allowed' : 'NOT allowed'} — role ${privileges.role?.name ?? 'none'}${privileges.missing.length ? ` (missing ${privileges.missing.join(', ')})` : ''}` : ''), { info, ...(live ? { connection: live } : {}), ...(privileges ? { privileges } : {}) });
|
|
219
|
+
}
|
|
220
|
+
catch (e) {
|
|
221
|
+
return err(e instanceof Error ? e.message : String(e));
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
// Runtime connect/disconnect/switch -- only when the host wired a live connection (mount.ts does).
|
|
225
|
+
if (deps.connection)
|
|
226
|
+
registerConnectionTools(toolServer, deps.connection);
|
|
227
|
+
registerTestcaseTools(toolServer, {
|
|
228
|
+
drafts,
|
|
229
|
+
walnutUiOrigin: deps.walnutUiOrigin,
|
|
230
|
+
agentUrl: deps.agentUrl,
|
|
231
|
+
openEditorWindow: deps.openEditorWindow,
|
|
232
|
+
// tc_save persists a draft to the product via the current provider adapter (create/update),
|
|
233
|
+
// forwarded across the hop — same live-connection-wins rule as discovery.
|
|
234
|
+
getAdapter: () => (deps.connection ? deps.connection.adapter() : deps.adapter),
|
|
235
|
+
// Draft validation must use the RIGHT action vocabulary. SimplifyQA's is the backend's own
|
|
236
|
+
// (e.g. `executerestapi`), so it must NEVER be checked against Walnut's static table — that is
|
|
237
|
+
// what falsely rejected valid SQA API/other steps as "not in catalog". Live connection wins;
|
|
238
|
+
// else the boot-time/env provider.
|
|
239
|
+
isSimplifyqa: () => (deps.connection?.config().provider
|
|
240
|
+
?? (envProvider === 'simplifyqa' ? 'simplifyqa' : undefined)) === 'simplifyqa',
|
|
241
|
+
});
|
|
242
|
+
// Read side of the shared lifecycle contract (list_projects / tc_list / tc_get). Reads the current
|
|
243
|
+
// provider adapter per call -- the live connection wins over the startup adapter, like project_info.
|
|
244
|
+
registerDiscoveryTools(toolServer, {
|
|
245
|
+
getAdapter: () => (deps.connection ? deps.connection.adapter() : deps.adapter),
|
|
246
|
+
// tc_save_as_new_version({ fromDraftId }) freezes an EDITED draft — read it from the same store
|
|
247
|
+
// the testcase tools write to. A missing/expired draft returns null (the tool reports it).
|
|
248
|
+
getDraft: (draftId) => {
|
|
249
|
+
try {
|
|
250
|
+
return { tc: drafts.get(draftId).tc };
|
|
251
|
+
}
|
|
252
|
+
catch {
|
|
253
|
+
return null;
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
});
|
|
257
|
+
// Generic SimplifyQA query surface: one tool (sqa_query) over every collection. It replaces the
|
|
258
|
+
// list/get reads above; those stay registered for compatibility while the migration lands.
|
|
259
|
+
registerQueryTools(toolServer, {
|
|
260
|
+
getAdapter: () => (deps.connection ? deps.connection.adapter() : deps.adapter),
|
|
261
|
+
});
|
|
262
|
+
// Recording preflight (qa_privileges): what this user may create in the selected project. The
|
|
263
|
+
// product agent enforces the same set in core_activate_technology; this is the readable surface.
|
|
264
|
+
registerPrivilegeTools(toolServer, {
|
|
265
|
+
getAdapter: () => (deps.connection ? deps.connection.adapter() : deps.adapter),
|
|
266
|
+
});
|
|
267
|
+
// Object Repository surface (object_list / object_get / object_delete) — same live-connection-wins
|
|
268
|
+
// rule as discovery/run tools.
|
|
269
|
+
registerObjectTools(toolServer, {
|
|
270
|
+
getAdapter: () => (deps.connection ? deps.connection.adapter() : deps.adapter),
|
|
271
|
+
});
|
|
272
|
+
// Story ↔ manual-testcase drift detection (report-only; agent applies via tc_draft_*).
|
|
273
|
+
registerStorySyncTools(toolServer, {
|
|
274
|
+
getAdapter: () => (deps.connection ? deps.connection.adapter() : deps.adapter),
|
|
275
|
+
});
|
|
276
|
+
// Backlog CRUD — epic / feature / story create+update plus epic/feature list+get.
|
|
277
|
+
// story_list / story_get stay in discovery.tools.ts (older).
|
|
278
|
+
registerBacklogTools(toolServer, {
|
|
279
|
+
getAdapter: () => (deps.connection ? deps.connection.adapter() : deps.adapter),
|
|
280
|
+
});
|
|
281
|
+
// Run surface (cloud_runners / tc_run / run_status / run_stop) -- same live-connection-wins rule;
|
|
282
|
+
// the run is forwarded to the product MCP (local dispatches to the agent, cloud to a runner VM).
|
|
283
|
+
// `getProjectId` keys the in-session "reuse last run config?" prompt to the connected project.
|
|
284
|
+
registerFailureTools(toolServer, {
|
|
285
|
+
getAdapter: () => (deps.connection ? deps.connection.adapter() : deps.adapter),
|
|
286
|
+
});
|
|
287
|
+
registerRunTools(toolServer, {
|
|
288
|
+
getAdapter: () => (deps.connection ? deps.connection.adapter() : deps.adapter),
|
|
289
|
+
getProjectId: () => {
|
|
290
|
+
const d = deps.connection?.describe();
|
|
291
|
+
return d && d.mode === 'connected' ? d.projectId || null : null;
|
|
292
|
+
},
|
|
293
|
+
});
|
|
294
|
+
// Suites: update / two-step delete; execution plans: create / update / delete / entries / run
|
|
295
|
+
// (SimplifyQA). The API checks the privileges; the adapter checks project ownership.
|
|
296
|
+
registerSuiteManageTools(toolServer, {
|
|
297
|
+
getAdapter: () => (deps.connection ? deps.connection.adapter() : deps.adapter),
|
|
298
|
+
});
|
|
299
|
+
registerExecutionPlanTools(toolServer, {
|
|
300
|
+
getAdapter: () => (deps.connection ? deps.connection.adapter() : deps.adapter),
|
|
301
|
+
});
|
|
302
|
+
registerTestPlanTools(toolServer, {
|
|
303
|
+
getAdapter: () => (deps.connection ? deps.connection.adapter() : deps.adapter),
|
|
304
|
+
});
|
|
305
|
+
registerPipelineTools(toolServer, {
|
|
306
|
+
getAdapter: () => (deps.connection ? deps.connection.adapter() : deps.adapter),
|
|
307
|
+
});
|
|
308
|
+
// Testdata generation (tc_generate_testdata) -- fetches the default iteration template from the
|
|
309
|
+
// product MCP, generates N rows client-side, and posts them back via save_generated_iterations.
|
|
310
|
+
registerTestdataTools(toolServer, {
|
|
311
|
+
getAdapter: () => (deps.connection ? deps.connection.adapter() : deps.adapter),
|
|
312
|
+
});
|
|
313
|
+
// Column preferences of the list views (epic/feature/userstory) — the UI's column-preference tick.
|
|
314
|
+
registerPreferenceTools(toolServer, {
|
|
315
|
+
getAdapter: () => (deps.connection ? deps.connection.adapter() : deps.adapter),
|
|
316
|
+
});
|
|
317
|
+
// File attachments on epics / features / user stories — uploads the same way the UI's save does.
|
|
318
|
+
registerAttachmentTools(toolServer, {
|
|
319
|
+
getAdapter: () => (deps.connection ? deps.connection.adapter() : deps.adapter),
|
|
320
|
+
});
|
|
321
|
+
// Project creation (project_create) — the admin Project screen's New Project form.
|
|
322
|
+
registerProjectTools(toolServer, {
|
|
323
|
+
getAdapter: () => (deps.connection ? deps.connection.adapter() : deps.adapter),
|
|
324
|
+
});
|
|
325
|
+
// Formula discovery (tc_list_formulas) — companion to tc_generate_testdata's `formulas` option, so
|
|
326
|
+
// the model can enumerate DEFAULT prefabs + CUSTOM formulas before picking one.
|
|
327
|
+
registerFormulaTools(toolServer, {
|
|
328
|
+
getAdapter: () => (deps.connection ? deps.connection.adapter() : deps.adapter),
|
|
329
|
+
});
|
|
330
|
+
// Defect tracker read surface (defect_list) — same live-connection-wins rule as discovery/run tools.
|
|
331
|
+
registerDefectTools(toolServer, {
|
|
332
|
+
getAdapter: () => (deps.connection ? deps.connection.adapter() : deps.adapter),
|
|
333
|
+
});
|
|
334
|
+
// Task tracker read surface (task_list) — same live-connection-wins rule as discovery/run tools.
|
|
335
|
+
registerTaskTools(toolServer, {
|
|
336
|
+
getAdapter: () => (deps.connection ? deps.connection.adapter() : deps.adapter),
|
|
337
|
+
});
|
|
338
|
+
// Heal surface (tc_heal) — product-neutral proxy. The real loop (replay + snapshot + propose +
|
|
339
|
+
// verify) lives in the product agent and is invoked via adapter.callRaw. Same live-connection-
|
|
340
|
+
// wins rule as run/discovery tools.
|
|
341
|
+
registerHealTools(toolServer, {
|
|
342
|
+
getAdapter: () => (deps.connection ? deps.connection.adapter() : deps.adapter),
|
|
343
|
+
});
|
|
344
|
+
registerReportTools(server, {
|
|
345
|
+
getAdapter: () => (deps.connection ? deps.connection.adapter() : deps.adapter),
|
|
346
|
+
});
|
|
347
|
+
// Coverage / gap aggregator across a scope (sprint / release / epic / feature / stories / project).
|
|
348
|
+
// Read-only; reuses computeDrift from storySync + the existing listStories/getStory/listTestCases reads.
|
|
349
|
+
registerGapAnalysisTools(toolServer, {
|
|
350
|
+
getAdapter: () => (deps.connection ? deps.connection.adapter() : deps.adapter),
|
|
351
|
+
});
|
|
352
|
+
// Blast-radius report from one anchor (defect / testcase / story / sprint / release). Read-only;
|
|
353
|
+
// walks the graph via existing adapter reads and reuses gap_analysis's per-story analyser.
|
|
354
|
+
registerImpactAnalysisTools(toolServer, {
|
|
355
|
+
getAdapter: () => (deps.connection ? deps.connection.adapter() : deps.adapter),
|
|
356
|
+
});
|
|
357
|
+
// Recording passthrough: mirror the product agent's browser-recording tools onto this server so
|
|
358
|
+
// the client records through the one door. Agent-bound + forwarded (see recording.tools.ts).
|
|
359
|
+
// Async + fire-and-forget: it waits for the connection, then registerTool emits list_changed.
|
|
360
|
+
registerRecordingPassthrough(toolServer, {
|
|
361
|
+
getAdapter: () => (deps.connection ? deps.connection.adapter() : deps.adapter),
|
|
362
|
+
isConnected: () => deps.connection ? deps.connection.describe().mode === 'connected' : deps.mode === 'connected',
|
|
363
|
+
// SimplifyQA-only: gates the granular-verb proxying + real-schema preservation. Walnut unaffected.
|
|
364
|
+
isSimplifyqa: () => deps.connection?.config().provider === 'simplifyqa',
|
|
365
|
+
// Shared with the draft/save tools so a recorded draft bridged here is the SAME store tc_save reads.
|
|
366
|
+
drafts,
|
|
367
|
+
});
|
|
368
|
+
return server;
|
|
369
|
+
}
|
|
370
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGpE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAA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