simplify3x-connect 0.0.0-stage β 0.28.1
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 -4
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { WEB_ACTION_SIGNATURES } from '../../vendor/actionSignatures.js';
|
|
2
|
+
/**
|
|
3
|
+
* Static per-technology action-type catalogs. Used as the whole `actionsCatalog()`
|
|
4
|
+
* answer for android/api/database/mainframe (there is no live/per-org source for
|
|
5
|
+
* those) and as the `web` fallback when the live per-org `GET /api/actions` catalog
|
|
6
|
+
* is unavailable (see `WalnutAdapter.actionsCatalog` in adapter.ts).
|
|
7
|
+
*
|
|
8
|
+
* Source (copied verbatim -- do not invent action names):
|
|
9
|
+
* - web: walnut-mcp/modules/config/action_types.py, VALID_ACTION_TYPES (lines 12-36)
|
|
10
|
+
* -- the 41 canonical action types mirroring the agent's registered Playwright
|
|
11
|
+
* tool handlers.
|
|
12
|
+
* - android: walnut-mcp/modules/config/platform_action_types.py,
|
|
13
|
+
* ANDROID_ACTION_TYPES (lines 44-91) -- 75 Appium actions.
|
|
14
|
+
* - api: walnut-mcp/modules/config/platform_action_types.py,
|
|
15
|
+
* API_ACTION_TYPES (line 148).
|
|
16
|
+
* - database: walnut-mcp/modules/config/platform_action_types.py,
|
|
17
|
+
* DATABASE_ACTION_TYPES (line 220).
|
|
18
|
+
* - ios: NOT from platform_action_types.py, which has no iOS frozenset. Derived from the AGENT's
|
|
19
|
+
* own IOS_TOOL_REGISTRY (walnut-agent src/mcp/ios/toolRegistry.ts) -- every entry with
|
|
20
|
+
* `recordable: true`, its `actionType` prefixed `ios_`. That registry is what decides which tool
|
|
21
|
+
* calls become steps, so it is the only honest source: an action the recorder can emit but this
|
|
22
|
+
* list omits blocks tc_save, and one listed here that the recorder never emits is dead weight.
|
|
23
|
+
* The `ios_` prefix is the established convention, not a guess -- the agent's toolAliases.ts maps
|
|
24
|
+
* catalog action_types to tools in exactly this form (`ios_start_app` -> `ios_launch_app`).
|
|
25
|
+
* - mainframe: no frozenset for this platform exists in either source file --
|
|
26
|
+
* left empty rather than guessed (spec Β§6A documents a Walnut-only mainframe
|
|
27
|
+
* step_type, but platform_action_types.py has no corresponding action-type set).
|
|
28
|
+
*
|
|
29
|
+
* WHY AN EMPTY LIST IS NOT A SAFE DEFAULT (the bug that motivated the iOS entry): validate.ts gates
|
|
30
|
+
* on `catalog.size &&`, so an unknown platform falls to `?? new Set()` and every step passes
|
|
31
|
+
* unvalidated. iOS was worse than that -- it had no platform at all, so the agent stamped its steps
|
|
32
|
+
* `stepType: 'web'` and they were validated against the WEB catalog, which has no app-launch action
|
|
33
|
+
* of any kind. `ios_start_app` was therefore rejected outright and the only way to save an iOS
|
|
34
|
+
* recording was to DELETE its launch step, losing the bundle id from the saved test case.
|
|
35
|
+
*/
|
|
36
|
+
/**
|
|
37
|
+
* The walnut-mcp copy of the web catalog (41 types). Kept verbatim as its own const
|
|
38
|
+
* because it is a COPY of an external source; the live web catalog below unions it
|
|
39
|
+
* with the agent's own signature table instead of editing this list by hand.
|
|
40
|
+
*/
|
|
41
|
+
const WALNUT_MCP_WEB_ACTIONS = [
|
|
42
|
+
// Navigation
|
|
43
|
+
'navigate', 'navigate_back', 'go_forward', 'reload', 'close', 'tabs',
|
|
44
|
+
// Input
|
|
45
|
+
'click', 'dblclick', 'type', 'fill_form', 'select_option',
|
|
46
|
+
'press_key', 'tap', 'hover', 'focus', 'blur',
|
|
47
|
+
// Mouse coordinate
|
|
48
|
+
'mouse_click_xy', 'mouse_drag_xy', 'mouse_move_xy',
|
|
49
|
+
// Drag & Drop
|
|
50
|
+
'drag',
|
|
51
|
+
// File
|
|
52
|
+
'file_upload',
|
|
53
|
+
// Verification
|
|
54
|
+
'verify_element_visible', 'verify_text_visible', 'verify_value',
|
|
55
|
+
'verify_url_contains', 'verify_list_visible', 'verify_navigation',
|
|
56
|
+
// Wait
|
|
57
|
+
'wait_for_visible', 'wait_for_hidden', 'wait_for_navigation',
|
|
58
|
+
'wait_for_url', 'wait_for_attached', 'wait_for_detached', 'wait_timeout',
|
|
59
|
+
// Advanced
|
|
60
|
+
'evaluate', 'run_code', 'handle_dialog',
|
|
61
|
+
// Layout
|
|
62
|
+
'scroll', 'resize', 'pdf_save',
|
|
63
|
+
// API
|
|
64
|
+
'api_call',
|
|
65
|
+
];
|
|
66
|
+
/**
|
|
67
|
+
* The web catalog the validator and `actions_catalog` both answer from: the
|
|
68
|
+
* walnut-mcp copy UNIONED with every actionType the agent itself can bake
|
|
69
|
+
* (WEB_ACTION_SIGNATURES -- the same table the recorder fills descriptions from).
|
|
70
|
+
*
|
|
71
|
+
* Why the union rather than a longer hand-kept list: the copy above froze at 41
|
|
72
|
+
* types and the agent has since grown 12 more, so a recording that used any of
|
|
73
|
+
* them was reported as INVALID by our own validator -- `verify_compare` and
|
|
74
|
+
* `store_run_variable` are exposed MCP tools, and every draft containing one came
|
|
75
|
+
* back `validation β -- actionType "verify_compare" not in catalog`. Deriving from
|
|
76
|
+
* the signature table means a future action the agent learns to bake is valid here
|
|
77
|
+
* the moment it has a signature, with no second list to remember.
|
|
78
|
+
*/
|
|
79
|
+
const WEB_ACTIONS = [
|
|
80
|
+
...new Set([...WALNUT_MCP_WEB_ACTIONS, ...Object.keys(WEB_ACTION_SIGNATURES)]),
|
|
81
|
+
];
|
|
82
|
+
export const WALNUT_ACTIONS = {
|
|
83
|
+
web: WEB_ACTIONS,
|
|
84
|
+
android: [
|
|
85
|
+
// App lifecycle
|
|
86
|
+
'android_start_app', 'android_close_app', 'android_reset_app',
|
|
87
|
+
'android_install_app', 'android_uninstall_app', 'android_switch_app',
|
|
88
|
+
'android_is_app_installed',
|
|
89
|
+
// Interaction
|
|
90
|
+
'android_click', 'android_tap', 'android_longpress', 'android_type',
|
|
91
|
+
'android_clear', 'android_click_by_text', 'android_click_by_image',
|
|
92
|
+
'android_click_if_present', 'android_drag_drop',
|
|
93
|
+
'android_hide_keyboard', 'android_press_key',
|
|
94
|
+
'android_pinch_in', 'android_pinch_out',
|
|
95
|
+
// Scroll & Swipe
|
|
96
|
+
'android_scroll_to_element', 'android_scroll_to_text',
|
|
97
|
+
'android_scroll_to_top', 'android_scroll_to_bottom',
|
|
98
|
+
'android_scroll_left', 'android_scroll_right',
|
|
99
|
+
'android_scroll_to_element_and_click',
|
|
100
|
+
'android_scroll_until_element_gone', 'android_scroll_until_text_gone',
|
|
101
|
+
'android_swipe', 'android_swipe_by_direction',
|
|
102
|
+
// Navigation
|
|
103
|
+
'android_back', 'android_home', 'android_recent_apps',
|
|
104
|
+
'android_open_notification', 'android_switch_context',
|
|
105
|
+
'android_get_contexts', 'android_get_current_context',
|
|
106
|
+
// Verification
|
|
107
|
+
'android_validate_text', 'android_validate_partial_text',
|
|
108
|
+
'android_validate_by_text', 'android_validate_by_image',
|
|
109
|
+
'android_wait_for_element', 'android_wait_for_element_gone',
|
|
110
|
+
'android_wait_for_text', 'android_wait_for_text_gone',
|
|
111
|
+
'android_is_element_visible', 'android_is_element_enabled',
|
|
112
|
+
'android_is_element_checked', 'android_is_element_clickable',
|
|
113
|
+
'android_is_element_disabled', 'android_is_element_selected',
|
|
114
|
+
'android_is_element_not_visible', 'android_is_element_not_checked',
|
|
115
|
+
'android_is_element_not_selected',
|
|
116
|
+
// Data retrieval
|
|
117
|
+
'android_get_text', 'android_get_attribute',
|
|
118
|
+
// Device controls
|
|
119
|
+
'android_take_screenshot', 'android_snapshot',
|
|
120
|
+
'android_rotate_screen', 'android_device_info',
|
|
121
|
+
'android_lock', 'android_unlock', 'android_is_locked',
|
|
122
|
+
// Network
|
|
123
|
+
'android_wifi_status', 'android_toggle_wifi',
|
|
124
|
+
'android_data_status', 'android_toggle_data',
|
|
125
|
+
'android_bluetooth_status', 'android_toggle_bluetooth',
|
|
126
|
+
'android_airplane_mode_status',
|
|
127
|
+
// File operations
|
|
128
|
+
'android_push_file', 'android_pull_file',
|
|
129
|
+
// ADB
|
|
130
|
+
'android_adb_command', 'android_type_adb',
|
|
131
|
+
],
|
|
132
|
+
// iOS β the 36 recordable entries of the agent's IOS_TOOL_REGISTRY, `ios_`-prefixed. Grouped the
|
|
133
|
+
// way the registry groups them so the two can be diffed by eye.
|
|
134
|
+
ios: [
|
|
135
|
+
// App lifecycle. ios_start_app is the one that matters most: it carries the BUNDLE ID, and
|
|
136
|
+
// without it in this list an iOS recording cannot be saved with its launch step intact.
|
|
137
|
+
'ios_start_app', 'ios_close_app', 'ios_switch_app',
|
|
138
|
+
// Interaction
|
|
139
|
+
'ios_click', 'ios_double_tap', 'ios_touch_and_hold', 'ios_type', 'ios_clear', 'ios_submit',
|
|
140
|
+
'ios_swipe', 'ios_swipe_by_direction',
|
|
141
|
+
// Scroll & find
|
|
142
|
+
'ios_scroll_to_element', 'ios_scroll_to_element_and_click', 'ios_scroll_to_text',
|
|
143
|
+
'ios_scroll_until_element_gone', 'ios_scroll_until_text_gone',
|
|
144
|
+
// Verifications β the assertions that make a recording a test
|
|
145
|
+
'ios_verify_visible', 'ios_verify_not_visible', 'ios_verify_text', 'ios_verify_partial_text',
|
|
146
|
+
'ios_verify_enabled', 'ios_verify_disabled', 'ios_verify_selected', 'ios_verify_not_selected',
|
|
147
|
+
'ios_verify_screen_lock', 'ios_validate_by_image', 'ios_wait_for_element',
|
|
148
|
+
// Reads that still record a step (get_text/get_attribute are recordable in the registry)
|
|
149
|
+
'ios_get_text', 'ios_get_attribute',
|
|
150
|
+
// Device & system. Back and App Switcher are GESTURES on iOS, not buttons, but they record as
|
|
151
|
+
// ordinary steps.
|
|
152
|
+
'ios_home', 'ios_back', 'ios_app_switcher', 'ios_press_button', 'ios_rotate_screen',
|
|
153
|
+
'ios_hide_keyboard', 'ios_alert',
|
|
154
|
+
],
|
|
155
|
+
api: ['api_call'],
|
|
156
|
+
database: ['database_query'],
|
|
157
|
+
mainframe: [],
|
|
158
|
+
};
|
|
159
|
+
/** Flattens a per-platform action-type catalog into `ActionDef[]`, tagging every entry. */
|
|
160
|
+
export function actionDefsFrom(catalog) {
|
|
161
|
+
return Object.entries(catalog).flatMap(([platform, actionTypes]) => actionTypes.map((actionType) => ({ actionType, platform })));
|
|
162
|
+
}
|
|
163
|
+
// Precomputed once at module load -- every draft-tool validation call shares
|
|
164
|
+
// these Sets rather than rebuilding them per call.
|
|
165
|
+
const CATALOG_SETS = Object.fromEntries(Object.entries(WALNUT_ACTIONS).map(([platform, list]) => [platform, new Set(list)]));
|
|
166
|
+
/**
|
|
167
|
+
* The single shared `catalogFor` callback every offline draft tool passes to
|
|
168
|
+
* `validateTestCase` -- no network, no adapter, just the static WALNUT_ACTIONS
|
|
169
|
+
* table above. Maps a neutral `Step.stepType` to its WALNUT_ACTIONS bucket;
|
|
170
|
+
* `control_flow` is exempted by `validateTestCase` itself before this is ever
|
|
171
|
+
* consulted, and a stepType with no offline vocabulary (`function`) yields an
|
|
172
|
+
* empty Set, which `validateTestCase` treats as "nothing to check" rather than
|
|
173
|
+
* "nothing is valid".
|
|
174
|
+
*/
|
|
175
|
+
export function offlineCatalogFor(step) {
|
|
176
|
+
return CATALOG_SETS[step.stepType] ?? new Set();
|
|
177
|
+
}
|
|
178
|
+
//# sourceMappingURL=actionTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actionTypes.js","sourceRoot":"","sources":["../../../src/adapters/walnut/actionTypes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAIzE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH;;;;GAIG;AACH,MAAM,sBAAsB,GAAa;IACrC,aAAa;IACb,UAAU,EAAE,eAAe,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM;IACpE,QAAQ;IACR,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,eAAe;IACzD,WAAW,EAAE,KAAK,E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,mBAAmB;QACnC,8FAA8F;QAC9F,kBAAkB;QAClB,UAAU,EAAE,UAAU,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,mBAAmB;QACnF,mBAAmB,EAAE,WAAW;KACjC;IACD,GAAG,EAAE,CAAC,UAAU,CAAC;IACjB,QAAQ,EAAE,CAAC,gBAAgB,CAAC;IAC5B,SAAS,EAAE,EAAE;CACd,CAAC;AAEF,2FAA2F;AAC3F,MAAM,UAAU,cAAc,CAAC,OAAyC;IACtE,OAAQ,MAAM,CAAC,OAAO,CAAC,OAAO,CAAuC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE,WAAW,CAAC,EAAE,EAAE,CACxG,WAAW,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC,CAAC,CAC5D,CAAC;AACJ,CAAC;AAED,6EAA6E;AAC7E,mDAAmD;AACnD,MAAM,YAAY,GAAwC,MAAM,CAAC,WAAW,CACzE,MAAM,CAAC,OAAO,CAAC,cAAc,CAAuC,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,QAAQ,EAAE,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CACpF,CAAC;AAEzC;;;;;;;;GAQG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAAU;IAC1C,OAAO,YAAY,CAAC,IAAI,CAAC,QAA0B,CAAC,IAAI,IAAI,GAAG,EAAE,CAAC;AACpE,CAAC"}
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import type { ConnectedQaConfig } from '../../config.js';
|
|
2
|
+
import type { MakeClientOptions } from '../http.js';
|
|
3
|
+
import type { ProjectInfo } from '../types.js';
|
|
4
|
+
import type { ActionDef, CloudRunner, EntityRef, JournalOp, JournalView, LocalAgent, MemberOp, ObjectQuery, ProjectSummary, QaObject, RunOptions, RunRef, RunStatus, RunTarget, ScheduleAction, ScheduleInfo, ScheduleOptions, ScheduleRef, ScheduleUpdate, SavedRef, Story, StoryQuery, StorySummary, Suite, SuiteSummary, TcQuery, TcSummary, TestCase } from '../../domain/types.js';
|
|
5
|
+
/**
|
|
6
|
+
* Transport-only injection seam for tests: swap the underlying fetch implementation
|
|
7
|
+
* instead of mutating `globalThis`. The adapter still builds its own `QaHttp` via
|
|
8
|
+
* `makeClient` (so its real `headers()` logic always runs, jwt vs key mode included)
|
|
9
|
+
* -- only the network transport is replaceable.
|
|
10
|
+
*/
|
|
11
|
+
export type WalnutTransport = Pick<MakeClientOptions, 'fetchImpl' | 'FormDataImpl' | 'BlobImpl'>;
|
|
12
|
+
/**
|
|
13
|
+
* WalnutAdapter β DIRECT-to-backend REST driver for Walnut (design note Β§3/Β§4). Every data op
|
|
14
|
+
* (discover / author / save / run-dispatch / triage) hits the Walnut backend REST directly via a
|
|
15
|
+
* `QaHttp` bound to `cfg.baseUrl` (the BACKEND base, `QA_BASE_URL`) β so a cloud editor with no local
|
|
16
|
+
* agent can drive the whole lifecycle. The ONLY agent-bound surface is recording + save-with-editor,
|
|
17
|
+
* which hops to the LOCAL AGENT's `/mcp` (`cfg.url`, `QA_MCP_URL`) via a lazily-built RemoteMcpAdapter
|
|
18
|
+
* (see `callRaw`/`listAgentTools`); when `cfg.url` is unset, recording is gracefully unavailable.
|
|
19
|
+
*
|
|
20
|
+
* This class deliberately does not `implements ProviderAdapter` β it ports only the direct-REST subset
|
|
21
|
+
* (journal, objects, environments, suite create/delete are out of scope here); the factory casts it,
|
|
22
|
+
* and no registered tool calls the unported methods.
|
|
23
|
+
*/
|
|
24
|
+
export declare class WalnutAdapter {
|
|
25
|
+
private readonly cfg;
|
|
26
|
+
private readonly http;
|
|
27
|
+
/** Lazily-built hop to the LOCAL AGENT's /mcp (cfg.url) for the agent-bound recording surface. Only
|
|
28
|
+
* ever built when cfg.url is set; direct REST never uses it. */
|
|
29
|
+
private agentHop;
|
|
30
|
+
constructor(cfg: ConnectedQaConfig, transport?: WalnutTransport);
|
|
31
|
+
private headers;
|
|
32
|
+
/** Validates baseUrl+token+project (`GET /api/projects/:id`). */
|
|
33
|
+
info(): Promise<ProjectInfo>;
|
|
34
|
+
/** Projects visible to the token (`GET /api/projects`). Tolerant of both an array body and a
|
|
35
|
+
* `{ projects: [...] }` wrapper. */
|
|
36
|
+
listProjects(): Promise<ProjectSummary[]>;
|
|
37
|
+
listTestCases(q: TcQuery): Promise<TcSummary[]>;
|
|
38
|
+
/** Neutral, steps included. `id` accepts either a Mongo ObjectId or a `TC_xxx` business key. */
|
|
39
|
+
getTestCase(id: string, _versionId?: string): Promise<TestCase>;
|
|
40
|
+
/** List the project's test suites (`GET /api/test-suites`). `skip_filters=true` skips the faceted
|
|
41
|
+
* filter-metadata queries we don't need. Excludes ad-hoc suites server-side. `id` is the Mongo
|
|
42
|
+
* `_id` (what getSuite resolves by). */
|
|
43
|
+
listSuites(): Promise<SuiteSummary[]>;
|
|
44
|
+
/** Read one suite with its ordered members (`GET /api/test-suites/:id`). `id` is the Mongo `_id`
|
|
45
|
+
* (the route does NOT accept the `SU_` business key). */
|
|
46
|
+
getSuite(id: string): Promise<Suite>;
|
|
47
|
+
/** List the project's USER STORIES (`GET /api/stories?type=story`), for the story-driven authoring
|
|
48
|
+
* flow. `search` is a case-insensitive regex over key/title/description/AC (backend SEC-07 escaped).
|
|
49
|
+
* `id` on each row is the Mongo `_id` (what a test case links to via story_id). */
|
|
50
|
+
listStories(q: StoryQuery): Promise<StorySummary[]>;
|
|
51
|
+
/** Read one user story with its acceptance criteria. `GET /api/stories/:id` resolves by Mongo `_id`
|
|
52
|
+
* ONLY (no business-key route), so a `US_123`/Jira key is resolved first via the list `search`
|
|
53
|
+
* endpoint, matching key/walnut_key. */
|
|
54
|
+
getStory(id: string): Promise<Story>;
|
|
55
|
+
/** Resolve a story reference to its Mongo `_id`. A 24-hex id passes straight through; a business key
|
|
56
|
+
* (US_123 / an external Jira key) is looked up via `GET /api/stories?search=` and matched on
|
|
57
|
+
* key/walnut_key (there is no GET-by-key route). Throws a clear error when nothing matches. */
|
|
58
|
+
private resolveStoryMongoId;
|
|
59
|
+
searchObjects(q: ObjectQuery): Promise<QaObject[]>;
|
|
60
|
+
/** Read one object with its full locator bag (`GET /api/objects/:id`). */
|
|
61
|
+
getObject(id: string): Promise<QaObject>;
|
|
62
|
+
deleteObject(id: string): Promise<void>;
|
|
63
|
+
/** Delete a test case (`DELETE /api/test-cases/:id`; recoverable via the product recycle bin). Like
|
|
64
|
+
* the update PUT, the route resolves ONLY by Mongo _id, so a business key is resolved first. */
|
|
65
|
+
deleteTestCase(id: string): Promise<void>;
|
|
66
|
+
/**
|
|
67
|
+
* Add / remove suite members (`PATCH /api/test-suites/:id/test-cases`, one action per call). The
|
|
68
|
+
* neutral op names a `tcId`, but the two backend actions speak different keys:
|
|
69
|
+
* β’ add β `testCaseIds[]` of MONGO _ids (the route casts them to ObjectId), so each tcId is
|
|
70
|
+
* resolved from a business key when needed. The backend appends with fresh instanceIds
|
|
71
|
+
* and rejects mixing test-case categories (manual vs automated) in one suite (409).
|
|
72
|
+
* β’ remove β a single `instanceId`. The suite stores instanceIds, not tcIds, so we map each
|
|
73
|
+
* requested tcId (business key OR Mongo _id) to the instanceId(s) it occupies in the
|
|
74
|
+
* CURRENT membership and remove each. Removing a tcId drops every instance of it.
|
|
75
|
+
* Returns the resulting neutral Suite. (reorder ops aren't surfaced as a tool; ignored here.)
|
|
76
|
+
*/
|
|
77
|
+
updateSuiteMembers(id: string, ops: MemberOp[]): Promise<Suite>;
|
|
78
|
+
/**
|
|
79
|
+
* Persist a NEW test case (`POST /api/test-cases`). The body mirrors the product's create schema:
|
|
80
|
+
* the category field is `test_category` (NOT `category`); `status` defaults to 'draft' server-side
|
|
81
|
+
* so we omit it; steps go through `toWalnutStep`. project comes from the x-project-id header and
|
|
82
|
+
* the creator from the JWT, so neither is in the body.
|
|
83
|
+
*
|
|
84
|
+
* Two-step, exactly like the UI: create the test case (the backend auto-creates a dataset with a
|
|
85
|
+
* column per `${param}` token and an EMPTY datarow), then fill that datarow via the SAME
|
|
86
|
+
* /api/test-data endpoint the Test Data tab uses. This keeps web value-handling in the MCP (no
|
|
87
|
+
* backend change) β walnut stores web values as `${param}` + datarow, never inline on the step.
|
|
88
|
+
*/
|
|
89
|
+
createTestCase(tc: TestCase): Promise<SavedRef>;
|
|
90
|
+
/**
|
|
91
|
+
* Populate the datarow(s) of the dataset Walnut auto-creates from a test case's `${param}` tokens
|
|
92
|
+
* β the same second step the UI's Test Data tab performs (create leaves the columns empty). Values
|
|
93
|
+
* are keyed by PARAM NAME (the `${...}` token), which is how walnut stores them
|
|
94
|
+
* (prepareRowValuesForDb). No dataset linked (the test case had no `${param}` tokens) β no-op.
|
|
95
|
+
* Writes every seeded row (the create route makes one per project environment), merging over
|
|
96
|
+
* whatever the row already holds so nothing existing is clobbered.
|
|
97
|
+
*/
|
|
98
|
+
private writeDefaultTestData;
|
|
99
|
+
/** Update an EXISTING test case, full-document (`PUT /api/test-cases/:id`). Sends the neutral
|
|
100
|
+
* `version` for optimistic concurrency when present. */
|
|
101
|
+
updateTestCase(id: string, tc: TestCase): Promise<SavedRef>;
|
|
102
|
+
/** Neutral SavedRef from a create/update response, tolerant of the doc being bare or wrapped
|
|
103
|
+
* (`{ testCase }` / `{ data }`). Prefers the business id (`test_case_id`) for the deep link. */
|
|
104
|
+
private savedRefFrom;
|
|
105
|
+
/**
|
|
106
|
+
* The credential of the ONLINE local agent for this project β the SAME one the UI's Run modal
|
|
107
|
+
* dispatches to. Sourced from the live roster (`GET /api/agent-credentials/project-agents`). The
|
|
108
|
+
* roster reflects real Redis/heartbeat presence, so `is_online` always targets a live poller.
|
|
109
|
+
* Returns null when the acting user has no online agent, OR when the roster endpoint is unreachable
|
|
110
|
+
* (e.g. the `ai-agents` feature flag is off) β the caller then surfaces a clear "no local agent"
|
|
111
|
+
* error. (The agent's cached-credential fallback is agent-only and intentionally not ported here.)
|
|
112
|
+
*/
|
|
113
|
+
private resolveLocalAgentCredential;
|
|
114
|
+
/**
|
|
115
|
+
* Persist recorded elements into the Object Repository so a saved test case is EXECUTABLE.
|
|
116
|
+
*
|
|
117
|
+
* A recorded step carries `objectRef.locators` (real captured selectors) but no `objectRef.id` β
|
|
118
|
+
* it's a NEW object not yet in the repository. Walnut binds a step to its element via `object_id`
|
|
119
|
+
* (a repository row); it does NOT store locators inline on the step. So without this, the save
|
|
120
|
+
* drops every locator (object_id stays null) and the test case can't find its elements at run time.
|
|
121
|
+
*
|
|
122
|
+
* For each such step we POST /api/objects (description = the element name, attributes = the recorded
|
|
123
|
+
* locators verbatim β the executor reads them by name: `playwright` primary, `xpath_*` fallbacks)
|
|
124
|
+
* and stamp the returned `_id` onto `objectRef.id` so `toWalnutStep` then emits `object_id`. Runs
|
|
125
|
+
* BEFORE the test-case create, so a failure aborts cleanly with nothing half-saved (any objects
|
|
126
|
+
* already minted are just unlinked repository rows).
|
|
127
|
+
*/
|
|
128
|
+
private ensureRecordedObjects;
|
|
129
|
+
/** A neutral tcId may be a business key (`TC_123`) or a Mongo `_id`; the executions API wants the
|
|
130
|
+
* `_id`. 24-hex β pass through; otherwise resolve via the test-case read. */
|
|
131
|
+
private resolveTestcaseMongoId;
|
|
132
|
+
/**
|
|
133
|
+
* Start a run of ONE test case (`POST /api/executions/reserve`; reserve-first is the only path for
|
|
134
|
+
* cloud, and the modern path for local). mode:'local' dispatches to THIS agent's own queue (its
|
|
135
|
+
* cached agent credential); mode:'cloud' dispatches to the chosen online cloud runner. The backend
|
|
136
|
+
* mints the execution + enqueues; per-step driving happens on the agent/runner. `environment` is
|
|
137
|
+
* used only when it is already a Mongo id β otherwise the backend applies the project default env.
|
|
138
|
+
*/
|
|
139
|
+
startRun(target: RunTarget, opts: RunOptions): Promise<RunRef>;
|
|
140
|
+
/**
|
|
141
|
+
* Start a SUITE run (`POST /api/executions/reserve` in suite mode β `testcase_ids[]` present).
|
|
142
|
+
* Fetches the suite's ordered members to build the parallel `testcase_ids`/`instance_ids` the
|
|
143
|
+
* reserve expects, then dispatches: mode:'local' β THIS agent's own queue (its online credential,
|
|
144
|
+
* which the backend requires for a local suite); mode:'cloud' β the chosen/auto-picked online
|
|
145
|
+
* runner. Returns the suite-run id (`SR_xxx`) as runId β getRun/stopRun route it back to the suite
|
|
146
|
+
* endpoints by that prefix.
|
|
147
|
+
*/
|
|
148
|
+
private startSuiteRun;
|
|
149
|
+
/**
|
|
150
|
+
* Create a SCHEDULE β a deferred / recurring run β instead of dispatching now (`POST /api/schedules`,
|
|
151
|
+
* the same route the Scheduler UI uses). Maps the neutral target + ScheduleOptions to the backend's
|
|
152
|
+
* createScheduleSchema: schedule_target ('test_case' when a tcId is given, else 'suite'); tc_id /
|
|
153
|
+
* suite_id (the backend resolves a tc_id business key OR _id, but a suite_id must be a Mongo _id);
|
|
154
|
+
* execution_target ('local' | 'cloud_runner' from opts.mode); assigned_agent_credential_id (the
|
|
155
|
+
* picked local agent for local, or the picked cloud runner for cloud β omit to let the backend
|
|
156
|
+
* auto-pick a VM); scheduled_for (REQUIRED ISO); schedule_type (default 'once'); end_date; timezone
|
|
157
|
+
* (default 'UTC'); environment_id (only when a 24-hex id, mirroring startRun). MANUAL test cases are
|
|
158
|
+
* rejected server-side (MANUAL_NOT_SCHEDULABLE_CODE); unwrapApiError surfaces that message verbatim.
|
|
159
|
+
*/
|
|
160
|
+
createSchedule(target: RunTarget, opts: ScheduleOptions): Promise<ScheduleRef>;
|
|
161
|
+
/** Map one raw schedule row (`GET /api/schedules`) to a neutral ScheduleInfo β human target + cadence
|
|
162
|
+
* + status + pinned agent NAME (never the credential_id) + the update_version an edit must echo. */
|
|
163
|
+
private toScheduleInfo;
|
|
164
|
+
/** List the project's schedules for management (`GET /api/schedules`). */
|
|
165
|
+
listSchedules(): Promise<ScheduleInfo[]>;
|
|
166
|
+
/** Fetch one raw schedule row (via the list) β needed for its update_version before an edit. */
|
|
167
|
+
private fetchScheduleRaw;
|
|
168
|
+
/** Edit a schedule (`PUT /api/schedules/:id`). Reads the current update_version itself (optimistic
|
|
169
|
+
* concurrency) so the caller passes only what changes. Re-pins via mode+agentId (local β also sets
|
|
170
|
+
* execution_mode:'manual') or mode+cloudRunnerCredentialId (cloud), mirroring createSchedule. */
|
|
171
|
+
updateSchedule(scheduleId: string, changes: ScheduleUpdate): Promise<ScheduleRef>;
|
|
172
|
+
/** Pause / resume / cancel a schedule. pauseβ`POST /:id/pause`, resumeβ`POST /:id/resume`,
|
|
173
|
+
* cancelβ`PATCH /:id/cancel` (all bodyless). */
|
|
174
|
+
controlSchedule(scheduleId: string, action: ScheduleAction): Promise<ScheduleRef>;
|
|
175
|
+
/** Delete a schedule permanently (`DELETE /api/schedules/:id`; the backend also tears down any live run). */
|
|
176
|
+
deleteSchedule(scheduleId: string): Promise<void>;
|
|
177
|
+
/** Neutral status of a run (`GET /api/executions/:id`, id = Mongo `_id`). Progress is derived from
|
|
178
|
+
* the per-status step counters; a UI deep link stands in for a report URL. */
|
|
179
|
+
getRun(runId: string): Promise<RunStatus>;
|
|
180
|
+
/** Neutral status of a SUITE run (`GET /api/executions/suite/:suiteRunId/summary`). `progress`
|
|
181
|
+
* counts TEST CASES (not steps); `children` is the per-testcase rollup. A 404 right after reserve
|
|
182
|
+
* (child execution docs not materialized yet) reads as 'queued', not an error. No reportUrl: the
|
|
183
|
+
* `/reports/:id` deep link is keyed by a single execution's Mongo id, not a suite-run `SR_` id. */
|
|
184
|
+
private getSuiteRun;
|
|
185
|
+
/** Signal a running execution to stop. Suite runs (`SR_...`) stop via the suite endpoint
|
|
186
|
+
* (`POST /api/executions/suite/:id/stop`); single executions via `POST /api/executions/:id/stop`.
|
|
187
|
+
* No body either way. */
|
|
188
|
+
stopRun(runId: string): Promise<void>;
|
|
189
|
+
/** Cloud runner VMs registered to the project + live online status
|
|
190
|
+
* (`GET /api/compute-configs/runners?live=1`). `online` already folds status online|busy. */
|
|
191
|
+
listCloudRunners(): Promise<CloudRunner[]>;
|
|
192
|
+
/**
|
|
193
|
+
* LOCAL agents registered to the project + live online status
|
|
194
|
+
* (`GET /api/agent-credentials/project-agents`) β the same live roster resolveLocalAgentCredential
|
|
195
|
+
* reads, exposed so a client can list + pick an agent (`id` = credential_id) before a LOCAL run.
|
|
196
|
+
* A shared project lists EVERY member's agent; `owner`/`online` let the user pick the right one.
|
|
197
|
+
*/
|
|
198
|
+
listLocalAgents(): Promise<LocalAgent[]>;
|
|
199
|
+
/**
|
|
200
|
+
* Valid action vocabulary per technology. android/api/database/mainframe always
|
|
201
|
+
* come from the static `WALNUT_ACTIONS` (there is no live/per-org source for
|
|
202
|
+
* them); `web` is replaced by the live per-org `GET /api/actions` catalog when
|
|
203
|
+
* that call succeeds and returns at least one action, else falls back to the
|
|
204
|
+
* static list. No retry, no caching.
|
|
205
|
+
*/
|
|
206
|
+
actionsCatalog(platform?: string): Promise<ActionDef[]>;
|
|
207
|
+
/** The internal hop to the local agent's /mcp, built lazily and ONLY when cfg.url is set. */
|
|
208
|
+
private hop;
|
|
209
|
+
/** The local agent's advertised tools (web/mainframe/β¦), mirrored so the recording passthrough can
|
|
210
|
+
* register them. No agent configured (cloud editor) β `[]`, so no recording tools get registered
|
|
211
|
+
* and recording is gracefully unavailable. */
|
|
212
|
+
listAgentTools(): Promise<Array<{
|
|
213
|
+
name: string;
|
|
214
|
+
description?: string;
|
|
215
|
+
inputSchema?: Record<string, unknown>;
|
|
216
|
+
}>>;
|
|
217
|
+
/** Forward an agent-bound tool call (recording) to the local agent's /mcp. Without a configured
|
|
218
|
+
* agent /mcp (cloud editor) there is nothing to forward to, so this fails with a clear instruction. */
|
|
219
|
+
callRaw(name: string, args: Record<string, unknown>): Promise<unknown>;
|
|
220
|
+
readJournal(tcId: string): Promise<JournalView>;
|
|
221
|
+
editJournal(tcId: string, ops: JournalOp[]): Promise<JournalView>;
|
|
222
|
+
/** Deep link into the product UI (e.g. `/test-cases/:id`, `/reports/:id`). These routes are served
|
|
223
|
+
* by walnut-frontend, NOT the API host, so this must use the FRONTEND origin. */
|
|
224
|
+
productUrlFor(entity: EntityRef): string;
|
|
225
|
+
/** Frontend origin for deep links, resolved (and trailing-slash-trimmed) as:
|
|
226
|
+
* 1. `walnutUiOrigin` (env `QA_MCP_WALNUT_UI`) -- the explicit override; point it at the local
|
|
227
|
+
* frontend dev server now, and the deployed frontend once shipped.
|
|
228
|
+
* 2. else the BACKEND base (`cfg.baseUrl` / `QA_BASE_URL`) with a trailing `/api` stripped --
|
|
229
|
+
* correct for a single-host deploy (https://app.walnutai.ai/api -> https://app.walnutai.ai), so
|
|
230
|
+
* production Just Works with no override. A split local dev host (backend :8080, Vite :5173)
|
|
231
|
+
* can't be derived, so it needs (1). NOTE: derived from `baseUrl`, NOT `cfg.url` β `cfg.url` is
|
|
232
|
+
* now the agent /mcp endpoint, not a web origin. */
|
|
233
|
+
private resolveUiOrigin;
|
|
234
|
+
}
|
|
235
|
+
//# sourceMappingURL=adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../src/adapters/walnut/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,EAAE,iBAAiB,EAAU,MAAM,YAAY,CAAC;AAE5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EACV,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,cAAc,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EACrJ,SAAS,EAAE,cAAc,EAAE,YAAY,EAAE,eAAe,EAAE,WAAW,EAAE,cAAc,EAAE,QAAQ,EAAQ,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,EA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