simplify3x-connect 0.31.9 → 0.31.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -0
- package/assets/tessdata/eng.traineddata +0 -0
- package/dist/adapters/remoteMcp/adapter.d.ts +1 -1
- package/dist/adapters/remoteMcp/adapter.d.ts.map +1 -1
- package/dist/adapters/remoteMcp/adapter.js +6 -5
- package/dist/adapters/remoteMcp/adapter.js.map +1 -1
- package/dist/adapters/simplifyqa/adapter.d.ts +46 -2
- package/dist/adapters/simplifyqa/adapter.d.ts.map +1 -1
- package/dist/adapters/simplifyqa/adapter.js +434 -23
- package/dist/adapters/simplifyqa/adapter.js.map +1 -1
- package/dist/adapters/simplifyqa/appProfile.d.ts +25 -0
- package/dist/adapters/simplifyqa/appProfile.d.ts.map +1 -0
- package/dist/adapters/simplifyqa/appProfile.js +137 -0
- package/dist/adapters/simplifyqa/appProfile.js.map +1 -0
- package/dist/adapters/simplifyqa/executionFailures.d.ts +53 -11
- package/dist/adapters/simplifyqa/executionFailures.d.ts.map +1 -1
- package/dist/adapters/simplifyqa/executionFailures.js +289 -46
- package/dist/adapters/simplifyqa/executionFailures.js.map +1 -1
- package/dist/adapters/simplifyqa/executionSources.d.ts +64 -0
- package/dist/adapters/simplifyqa/executionSources.d.ts.map +1 -0
- package/dist/adapters/simplifyqa/executionSources.js +138 -0
- package/dist/adapters/simplifyqa/executionSources.js.map +1 -0
- package/dist/adapters/simplifyqa/failureAnalysis.d.ts +18 -1
- package/dist/adapters/simplifyqa/failureAnalysis.d.ts.map +1 -1
- package/dist/adapters/simplifyqa/failureAnalysis.js +182 -10
- package/dist/adapters/simplifyqa/failureAnalysis.js.map +1 -1
- package/dist/adapters/simplifyqa/failureAnalysisCard.d.ts.map +1 -1
- package/dist/adapters/simplifyqa/failureAnalysisCard.js +45 -19
- package/dist/adapters/simplifyqa/failureAnalysisCard.js.map +1 -1
- package/dist/adapters/simplifyqa/failureAnalysisRun.d.ts +8 -1
- package/dist/adapters/simplifyqa/failureAnalysisRun.d.ts.map +1 -1
- package/dist/adapters/simplifyqa/failureAnalysisRun.js +108 -4
- package/dist/adapters/simplifyqa/failureAnalysisRun.js.map +1 -1
- package/dist/adapters/simplifyqa/failureAnalysisTypes.d.ts +65 -1
- package/dist/adapters/simplifyqa/failureAnalysisTypes.d.ts.map +1 -1
- package/dist/adapters/simplifyqa/failureAnalysisTypes.js +12 -1
- package/dist/adapters/simplifyqa/failureAnalysisTypes.js.map +1 -1
- package/dist/adapters/simplifyqa/failureHistory.d.ts +64 -20
- package/dist/adapters/simplifyqa/failureHistory.d.ts.map +1 -1
- package/dist/adapters/simplifyqa/failureHistory.js +88 -30
- package/dist/adapters/simplifyqa/failureHistory.js.map +1 -1
- package/dist/adapters/simplifyqa/failurePatterns.d.ts +11 -0
- package/dist/adapters/simplifyqa/failurePatterns.d.ts.map +1 -1
- package/dist/adapters/simplifyqa/failurePatterns.js +4 -3
- package/dist/adapters/simplifyqa/failurePatterns.js.map +1 -1
- package/dist/adapters/simplifyqa/failureReport.d.ts.map +1 -1
- package/dist/adapters/simplifyqa/failureReport.js +8 -0
- package/dist/adapters/simplifyqa/failureReport.js.map +1 -1
- package/dist/adapters/simplifyqa/failureReportModel.d.ts +125 -1
- package/dist/adapters/simplifyqa/failureReportModel.d.ts.map +1 -1
- package/dist/adapters/simplifyqa/failureReportModel.js +324 -4
- package/dist/adapters/simplifyqa/failureReportModel.js.map +1 -1
- package/dist/adapters/simplifyqa/failureReview.d.ts +1 -1
- package/dist/adapters/simplifyqa/failureReview.d.ts.map +1 -1
- package/dist/adapters/simplifyqa/failureReview.js +44 -8
- package/dist/adapters/simplifyqa/failureReview.js.map +1 -1
- package/dist/adapters/simplifyqa/failureSuggest.d.ts +4 -2
- package/dist/adapters/simplifyqa/failureSuggest.d.ts.map +1 -1
- package/dist/adapters/simplifyqa/failureSuggest.js +44 -14
- package/dist/adapters/simplifyqa/failureSuggest.js.map +1 -1
- package/dist/adapters/simplifyqa/failureTypes.d.ts +19 -0
- package/dist/adapters/simplifyqa/failureTypes.d.ts.map +1 -1
- package/dist/adapters/simplifyqa/heal/apply.d.ts +3 -1
- package/dist/adapters/simplifyqa/heal/apply.d.ts.map +1 -1
- package/dist/adapters/simplifyqa/heal/apply.js +5 -1
- package/dist/adapters/simplifyqa/heal/apply.js.map +1 -1
- package/dist/adapters/simplifyqa/heal/diagnose.d.ts.map +1 -1
- package/dist/adapters/simplifyqa/heal/diagnose.js +14 -0
- package/dist/adapters/simplifyqa/heal/diagnose.js.map +1 -1
- package/dist/adapters/simplifyqa/heal/plan.d.ts +2 -0
- package/dist/adapters/simplifyqa/heal/plan.d.ts.map +1 -1
- package/dist/adapters/simplifyqa/heal/plan.js +43 -0
- package/dist/adapters/simplifyqa/heal/plan.js.map +1 -1
- package/dist/adapters/simplifyqa/networkErrors.d.ts +11 -0
- package/dist/adapters/simplifyqa/networkErrors.d.ts.map +1 -0
- package/dist/adapters/simplifyqa/networkErrors.js +108 -0
- package/dist/adapters/simplifyqa/networkErrors.js.map +1 -0
- package/dist/adapters/simplifyqa/outage.d.ts +41 -0
- package/dist/adapters/simplifyqa/outage.d.ts.map +1 -0
- package/dist/adapters/simplifyqa/outage.js +108 -0
- package/dist/adapters/simplifyqa/outage.js.map +1 -0
- package/dist/adapters/simplifyqa/patternSplit.d.ts +32 -0
- package/dist/adapters/simplifyqa/patternSplit.d.ts.map +1 -0
- package/dist/adapters/simplifyqa/patternSplit.js +79 -0
- package/dist/adapters/simplifyqa/patternSplit.js.map +1 -0
- package/dist/adapters/simplifyqa/screenText.d.ts +84 -0
- package/dist/adapters/simplifyqa/screenText.d.ts.map +1 -0
- package/dist/adapters/simplifyqa/screenText.js +497 -0
- package/dist/adapters/simplifyqa/screenText.js.map +1 -0
- package/dist/adapters/simplifyqa/searchRegistry.d.ts.map +1 -1
- package/dist/adapters/simplifyqa/searchRegistry.js +22 -0
- package/dist/adapters/simplifyqa/searchRegistry.js.map +1 -1
- package/dist/adapters/types.d.ts +4 -1
- package/dist/adapters/types.d.ts.map +1 -1
- package/dist/cli.js +7 -1
- package/dist/cli.js.map +1 -1
- package/dist/domain/heal.d.ts +10 -0
- package/dist/domain/heal.d.ts.map +1 -1
- package/dist/domain/heal.js.map +1 -1
- package/dist/domain/types.d.ts +56 -0
- package/dist/domain/types.d.ts.map +1 -1
- package/dist/export/html.d.ts +26 -0
- package/dist/export/html.d.ts.map +1 -0
- package/dist/export/html.js +842 -0
- package/dist/export/html.js.map +1 -0
- package/dist/export/labelCompare.d.ts +36 -0
- package/dist/export/labelCompare.d.ts.map +1 -0
- package/dist/export/labelCompare.js +96 -0
- package/dist/export/labelCompare.js.map +1 -0
- package/dist/export/layout.d.ts +19 -10
- package/dist/export/layout.d.ts.map +1 -1
- package/dist/export/layout.js +40 -9
- package/dist/export/layout.js.map +1 -1
- package/dist/export/pdf.d.ts +31 -1
- package/dist/export/pdf.d.ts.map +1 -1
- package/dist/export/pdf.js +170 -34
- package/dist/export/pdf.js.map +1 -1
- package/dist/export/xlsx.d.ts +1 -1
- package/dist/export/xlsx.js +2 -2
- package/dist/export/xlsx.js.map +1 -1
- package/dist/initAgents.d.ts.map +1 -1
- package/dist/initAgents.js +28 -8
- package/dist/initAgents.js.map +1 -1
- package/dist/integration/actions.d.ts +85 -0
- package/dist/integration/actions.d.ts.map +1 -0
- package/dist/integration/actions.js +391 -0
- package/dist/integration/actions.js.map +1 -0
- package/dist/integration/apply.d.ts +105 -0
- package/dist/integration/apply.d.ts.map +1 -0
- package/dist/integration/apply.js +345 -0
- package/dist/integration/apply.js.map +1 -0
- package/dist/integration/clients.d.ts +129 -0
- package/dist/integration/clients.d.ts.map +1 -0
- package/dist/integration/clients.js +332 -0
- package/dist/integration/clients.js.map +1 -0
- package/dist/integration/defaults.d.ts +14 -0
- package/dist/integration/defaults.d.ts.map +1 -0
- package/dist/integration/defaults.js +61 -0
- package/dist/integration/defaults.js.map +1 -0
- package/dist/integration/dummyData.d.ts +11 -0
- package/dist/integration/dummyData.d.ts.map +1 -0
- package/dist/integration/dummyData.js +112 -0
- package/dist/integration/dummyData.js.map +1 -0
- package/dist/integration/normalize.d.ts +71 -0
- package/dist/integration/normalize.d.ts.map +1 -0
- package/dist/integration/normalize.js +194 -0
- package/dist/integration/normalize.js.map +1 -0
- package/dist/integration/setupCommand.d.ts +17 -0
- package/dist/integration/setupCommand.d.ts.map +1 -0
- package/dist/integration/setupCommand.js +126 -0
- package/dist/integration/setupCommand.js.map +1 -0
- package/dist/integration/types.d.ts +84 -0
- package/dist/integration/types.d.ts.map +1 -0
- package/dist/integration/types.js +2 -0
- package/dist/integration/types.js.map +1 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +15 -2
- package/dist/server.js.map +1 -1
- package/dist/tools/desktopRecordingMode.d.ts +27 -0
- package/dist/tools/desktopRecordingMode.d.ts.map +1 -0
- package/dist/tools/desktopRecordingMode.js +40 -0
- package/dist/tools/desktopRecordingMode.js.map +1 -0
- package/dist/tools/discovery.tools.d.ts.map +1 -1
- package/dist/tools/discovery.tools.js +159 -16
- package/dist/tools/discovery.tools.js.map +1 -1
- package/dist/tools/executionPlan.tools.d.ts.map +1 -1
- package/dist/tools/executionPlan.tools.js +9 -6
- package/dist/tools/executionPlan.tools.js.map +1 -1
- package/dist/tools/failure.tools.d.ts +10 -0
- package/dist/tools/failure.tools.d.ts.map +1 -1
- package/dist/tools/failure.tools.js +140 -18
- package/dist/tools/failure.tools.js.map +1 -1
- package/dist/tools/failureExport.tools.d.ts +1 -1
- package/dist/tools/failureExport.tools.d.ts.map +1 -1
- package/dist/tools/failureExport.tools.js +69 -26
- package/dist/tools/failureExport.tools.js.map +1 -1
- package/dist/tools/heal.tools.js +1 -1
- package/dist/tools/heal.tools.js.map +1 -1
- package/dist/tools/integration.tools.d.ts +16 -0
- package/dist/tools/integration.tools.d.ts.map +1 -0
- package/dist/tools/integration.tools.js +704 -0
- package/dist/tools/integration.tools.js.map +1 -0
- package/dist/tools/recording.tools.d.ts.map +1 -1
- package/dist/tools/recording.tools.js +12 -4
- package/dist/tools/recording.tools.js.map +1 -1
- package/dist/tools/recordingNames.d.ts +16 -0
- package/dist/tools/recordingNames.d.ts.map +1 -1
- package/dist/tools/recordingNames.js +31 -0
- package/dist/tools/recordingNames.js.map +1 -1
- package/dist/tools/storySync.tools.d.ts.map +1 -1
- package/dist/tools/storySync.tools.js +2 -1
- package/dist/tools/storySync.tools.js.map +1 -1
- package/dist/tools/testcase.tools.d.ts +13 -1
- package/dist/tools/testcase.tools.d.ts.map +1 -1
- package/dist/tools/testcase.tools.js +80 -13
- package/dist/tools/testcase.tools.js.map +1 -1
- package/dist/tools/verdictMemory.d.ts +55 -0
- package/dist/tools/verdictMemory.d.ts.map +1 -0
- package/dist/tools/verdictMemory.js +117 -0
- package/dist/tools/verdictMemory.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +6 -2
package/dist/initAgents.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { mkdirSync, writeFileSync, existsSync, readFileSync } from 'node:fs';
|
|
2
2
|
import { dirname, join } from 'node:path';
|
|
3
|
+
import { DESKTOP_MODE_PERSONA_LINE, DESKTOP_MODE_SETUP_CLAUSE } from './tools/desktopRecordingMode.js';
|
|
3
4
|
/** Nothing is scoped until a project is chosen, and the project is NOT in the MCP config — so the
|
|
4
5
|
* agent resolves it at runtime and ASKS when unsure, never assuming one. */
|
|
5
6
|
const PROJECT_NOTE = `
|
|
6
7
|
|
|
7
8
|
## Project first — never assume one
|
|
8
9
|
Every test case, run, and recording lives inside a **project**, and the project is NOT preconfigured. Before any project-scoped action (including web/android/... — the recording is saved into the active project, and the AI model is resolved per project):
|
|
9
|
-
- If the user named a project, resolve it
|
|
10
|
-
- If NO project is selected (a tool replies "No project selected" / "select a project", or you're starting fresh and the user hasn't said which),
|
|
10
|
+
- If the user named a project, resolve it, then \`qa_switch_project({ projectId })\`. On **SimplifyQA** resolve it with \`sqa_query({ op:"search", collection:"projects", where:[{ field:"name", op:"contains", value:"<name>" }] })\` (\`list_projects\` does not exist there); on **Walnut** with \`list_projects\`.
|
|
11
|
+
- If NO project is selected (a tool replies "No project selected" / "select a project", or you're starting fresh and the user hasn't said which), list the projects (\`sqa_query({ op:"search", collection:"projects" })\` on SimplifyQA, \`list_projects\` on Walnut) and **ASK the user which project** — then \`qa_switch_project\`. Do NOT guess.
|
|
11
12
|
The choice persists for the rest of the session once set.`;
|
|
12
13
|
/** SimplifyQA read surface: ONE tool. The per-collection reads are not registered there, so the
|
|
13
14
|
* agent must never reach for tc_list/story_list/defect_list/etc. Walnut keeps its normal reads. */
|
|
@@ -15,10 +16,11 @@ const FAILURE_NOTE = `
|
|
|
15
16
|
|
|
16
17
|
## Failure analysis — evidence, then your verdict
|
|
17
18
|
When runs fail, call \`failure_analysis({ code: 'TC-123' | 'SU-123' | 'PL-123' })\` to analyse its latest execution (PL = execution plan), \`executionId\` to analyse it inside only that execution (or \`executionId\` alone for the whole execution), or \`codes:[…]\` / \`executionIds:[…]\` to analyse several together. It returns an \`analysisId\` and a card — failures by category (counts and %), patterns, failed test cases — followed by evidence per pattern. Then:
|
|
19
|
+
0. Start your first response by stating the application domain you infer from the application profile (name, confidence, flows, terms) — never guess silently — and pass it as \`domain\` in classify. Optional analyse inputs: \`context\` ({ plannedChanges, knownOutages }) from what the user tells you; \`screenText:false\` to skip reading screenshot text.
|
|
18
20
|
1. Read the card and the evidence.
|
|
19
21
|
2. If a "Next:" line is present, page the remaining patterns with \`failure_analysis({ analysisId, pattern:[…] })\` as it says, until you have read every pattern's evidence.
|
|
20
|
-
3. Review EVERY failed test case with \`failure_analysis({ analysisId, review: true })\`, following its "Next:" line until done: compare the failed, baseline and last-passed screenshots and both steps' data.
|
|
21
|
-
4. Call \`failure_analysis_classify({ analysisId, verdicts })\` ONCE with a verdict for EVERY pattern (pattern name, rootCause, category APP_DEFECT |
|
|
22
|
+
3. Review EVERY failed test case with \`failure_analysis({ analysisId, review: true })\`, following its "Next:" line until done: compare the failed, baseline and last-passed screenshots and both steps' data. A client that can run parallel agents may split the review pages across them: each worker calls \`failure_analysis({ analysisId, review: true, page: n })\` for its own page numbers and returns one line per test case (screen shows · changed vs last pass · category · confidence · reason); the coordinator then classifies once.
|
|
23
|
+
4. Call \`failure_analysis_classify({ analysisId, verdicts })\` ONCE with a verdict for EVERY pattern (pattern name, rootCause, category APP_DEFECT (Application Failures; includes application/service down, HTTP 404/5xx = subtype environment) | AUTOMATION_DATA (Automation Script / Test Data Failures; includes an intended application change that outdated the test = subtype intended change) | UNCLASSIFIED (Investigation Required; rootCause = the reason / missing evidence; e.g. element not found with no other evidence), confidence, optional subtype and recommendedAction); a verdict shown as "(not reviewed)" is low confidence; use \`splitOut\` for test cases whose review shows a different cause and \`mergeInto\` for groups that share one.
|
|
22
24
|
5. Start your reply with the classified card exactly as returned (same tables, rows and columns; never summarise or reword it), then add **Why** and **Fix** per pattern from the evidence.
|
|
23
25
|
Do NOT assert a root cause the returned evidence does not support; a "suggested:" category is a rule hint, not a verdict. Write Why / Fix from the FLOW, failed steps, logs and screenshots: what failed, the actual vs expected, the error text — and cite the evidence.
|
|
24
26
|
Re-view a stored analysis with \`analysisId\` plus \`view\` / \`suiteId\` / \`pattern\` / \`category\` / \`page\` (no re-fetch). For Excel / PDF files call \`failure_analysis_export({ analysisId, format: ['xlsx','pdf'] })\`.`;
|
|
@@ -31,7 +33,7 @@ On **SimplifyQA**, \`sqa_query\` is the ONLY read tool. Use it for EVERY fetch /
|
|
|
31
33
|
3. Custom fields: \`op:"custom_fields"\` returns label → key → \`customFields.<key>\`; then pass the label as \`field\` with \`custom:true\`.
|
|
32
34
|
Rules: deleted rows are always filtered out; the active project is always applied; unknown fields are rejected locally. Test cases have **no priority/status** — use \`reviewApproveStatus\` or a custom field.
|
|
33
35
|
|
|
34
|
-
The old 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 on SimplifyQA** — never call them and never invent a read tool.
|
|
36
|
+
The old 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 on SimplifyQA** — never call them and never invent a read tool. \`list_projects\` is not registered on SimplifyQA either: read projects with \`sqa_query\` (collection \`projects\`, works with no project selected). Only \`project_info\` remains, for the active project.
|
|
35
37
|
On **Walnut**, use the normal read tools.`;
|
|
36
38
|
/** Provider (Walnut vs SimplifyQA) has to be checked before any recording flow is chosen —
|
|
37
39
|
* the two products expose fundamentally different recording surfaces (Walnut ships bundled
|
|
@@ -114,6 +116,7 @@ const COMMON_QA_AGENT = {
|
|
|
114
116
|
'defect_list', 'task_list',
|
|
115
117
|
// Analysis / catalog lookups.
|
|
116
118
|
'gap_analysis', 'impact_analysis', 'actions_catalog',
|
|
119
|
+
'integration_config', 'integration_lookup', 'integration_sync', 'integration_logs',
|
|
117
120
|
// Technology sub-agents — each a SINGLE delegated tool (granular browser/terminal/recording tools
|
|
118
121
|
// live inside them). web and mainframe are NON-BLOCKING: each returns a sessionId, then you poll
|
|
119
122
|
// its own status tool (web_status / mainframe_status) until the recording is done.
|
|
@@ -185,7 +188,7 @@ The SimplifyQA local agent does NOT expose \`web\` / \`mainframe\` / \`android\`
|
|
|
185
188
|
Common shape for ALL technologies (WEB / MAINFRAME / ANDROID / IOS / API / DATABASE / DESKTOP):
|
|
186
189
|
|
|
187
190
|
1. **\`qa_connection_status\`** — verify connected + note the projectId. If disconnected, \`qa_connect\` first.
|
|
188
|
-
2. **Ask the technology-specific setup questions BEFORE \`core_activate_technology\`** (see per-tech blocks below — **WEB needs the AI-only vs AI + Manual recording mode, asked on EVERY recording and never reused from an earlier one**; mainframe needs a route + \`app_path\`; **android/ios need the platform (\`Android or iOS?\`) plus a \`deviceId\` when more than one is present**; API needs nothing; DATABASE needs the connection details, asked from the user; DESKTOP needs the application's full \`.exe\` path, with the application closed first).
|
|
191
|
+
2. **Ask the technology-specific setup questions BEFORE \`core_activate_technology\`** (see per-tech blocks below — **WEB needs the AI-only vs AI + Manual recording mode, asked on EVERY recording and never reused from an earlier one**; mainframe needs a route + \`app_path\`; **android/ios need the platform (\`Android or iOS?\`) plus a \`deviceId\` when more than one is present**; API needs nothing; DATABASE needs the connection details, asked from the user; DESKTOP needs the application's full \`.exe\` path, with the application closed first${DESKTOP_MODE_SETUP_CLAUSE}).
|
|
189
192
|
**Privileges are checked for you — do not pre-check.** \`core_activate_technology\` itself refuses (nothing launched, nothing created) when the user's role in the project cannot create test cases / parameters / objects, and names the exact missing keys. Relay that refusal verbatim and stop; do not retry, do not try another technology, do not record anyway. \`qa_privileges({ projectId?, technology? })\` is the read-only version of the same check — use it only when the user asks whether they may record somewhere, or to explain a refusal.
|
|
190
193
|
3. **\`core_activate_technology({ technology: "<WEB|MAINFRAME|ANDROID|IOS|API|DATABASE|DESKTOP>", testcaseName, ...tech-specific args })\`** — ONCE per technology, at the start of each technology's steps. For a SINGLE-technology test case that is one call, at the very start. For a **multi-technology (hybrid) test case** — steps from more than one technology in ONE test case — you call it AGAIN each time you switch technology, keeping the SAME \`testcaseName\`; see the **Multi-technology (hybrid)** block below. Launches the recorder session and opens the SimplifyQA recorder UI. API and DATABASE also stream their steps into that window (see their blocks). The response's \`structuredContent.sessionId\` is the recording session id. If a test case with the same \`testcaseName\` already exists **and is already saved** the call is REFUSED — ASK the user for another name, or retry with \`allowDuplicateName: true\` only when they explicitly want a second TC with that same name. (A hybrid switch does NOT trip this — the in-progress TC is not saved yet, so re-activating under the same name to add a second technology is allowed.)
|
|
191
194
|
4. **\`<tech>_launch_application({ ... })\`** — ALWAYS the FIRST action call after activation for WEB / MAINFRAME / ANDROID / IOS / DESKTOP. **API has no launch verb** — its first action is \`api_send_request\`. **DATABASE has no launch verb** — its first action is \`db_connect\` (or \`db_connect_mongo\`). NO \`<tech>_snapshot\` / verify / save before it.
|
|
@@ -203,7 +206,7 @@ Common shape for ALL technologies (WEB / MAINFRAME / ANDROID / IOS / API / DATAB
|
|
|
203
206
|
**The switch — do this at each technology change:**
|
|
204
207
|
1. Finish the current technology's steps as usual (snapshot + verbs). Do NOT \`core_close_session\` — closing ends the WHOLE test case.
|
|
205
208
|
2. **\`core_activate_technology({ technology: "<next tech>", testcaseName: "<SAME name as the first activation>", ...that tech's setup args })\`** again. Keep the SAME \`testcaseName\` — it is still ONE test case, and nothing is saved yet, so the duplicate-name guard does NOT fire (do NOT pass \`allowDuplicateName\` — that is for genuinely wanting a second saved TC, not for this). Keep the \`sessionId\` the activation returns.
|
|
206
|
-
3. **Ask THAT technology's own setup questions before the re-activation**, exactly as a fresh recording would — they are per-activation and the tool refuses without them: WEB needs \`recordingMode\` + \`recordingModeAskedUser\` (AI-only vs AI + Manual), ANDROID/IOS need \`platformAskedUser\` + \`deviceId\`, MAINFRAME needs its route, DATABASE needs the connection details, DESKTOP needs the application's \`.exe\` path, API needs nothing. This re-prompt on the switch is CORRECT, not a bug — only ask what the NEW segment needs.
|
|
209
|
+
3. **Ask THAT technology's own setup questions before the re-activation**, exactly as a fresh recording would — they are per-activation and the tool refuses without them: WEB needs \`recordingMode\` + \`recordingModeAskedUser\` (AI-only vs AI + Manual), ANDROID/IOS need \`platformAskedUser\` + \`deviceId\`, MAINFRAME needs its route, DATABASE needs the connection details, DESKTOP needs the application's \`.exe\` path${DESKTOP_MODE_SETUP_CLAUSE}, API needs nothing. This re-prompt on the switch is CORRECT, not a bug — only ask what the NEW segment needs.
|
|
207
210
|
4. Run that technology's FIRST action right after activating — \`web_launch_application\` / \`mainframe_launch_application\` / \`android_launch_app\` / \`ios_launch_app\` / \`desktop_launch_application\` for the launch-based techs, \`api_send_request\` for API, \`db_connect\` for DATABASE — then its snapshot (where it has one) + verbs. Same per-tech rules as the blocks below.
|
|
208
211
|
5. Repeat for each further technology change.
|
|
209
212
|
|
|
@@ -274,7 +277,7 @@ Common shape for ALL technologies (WEB / MAINFRAME / ANDROID / IOS / API / DATAB
|
|
|
274
277
|
|
|
275
278
|
### DESKTOP (Windows desktop applications)
|
|
276
279
|
- No device, no browser. The agent drives the application through UI Automation with the REAL mouse and keyboard.
|
|
277
|
-
- ASK for the application's full \`.exe\` path unless the user gave it — never search the filesystem. If the application is already open, ASK the user to close it first: a second launch is refused and there is no attach.
|
|
280
|
+
${DESKTOP_MODE_PERSONA_LINE}- ASK for the application's full \`.exe\` path unless the user gave it — never search the filesystem. If the application is already open, ASK the user to close it first: a second launch is refused and there is no attach.
|
|
278
281
|
- \`core_activate_technology({ technology: "DESKTOP", testcaseName })\` → \`desktop_launch_application({ app_path })\` is the FIRST step. Then tell the user NOT to touch the mouse or keyboard until you finish.
|
|
279
282
|
- \`desktop_snapshot()\` returns an outline with refs (\`e1\`, \`e2\`, …) → \`desktop_click\` / \`desktop_enter_text\` / \`desktop_set_text\` / \`desktop_select_item_from_dropdown\` / \`desktop_set_checkbox\` / \`desktop_invoke_menu_item\` / \`desktop_validate_text\` / … with \`{ ref }\`. Take a new snapshot after a step that changes the window; a ref that can only be found by its position is refused once the window may have changed.
|
|
280
283
|
- 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\`.
|
|
@@ -286,6 +289,9 @@ Common shape for ALL technologies (WEB / MAINFRAME / ANDROID / IOS / API / DATAB
|
|
|
286
289
|
- In a hybrid test case, switching back to DESKTOP reuses the open application: do NOT launch it again, take a \`desktop_snapshot()\`.
|
|
287
290
|
- **Reuse a saved desktop function:** \`core_reuse_function({ function, params })\` runs it live and records one function step. A function that starts with Launch Application launches the application itself: call it right after \`core_activate_technology\`, INSTEAD of \`desktop_launch_application\` (after a launch it is refused).
|
|
288
291
|
- **SAVE:** the recorder window's **Save Testcase** button, or \`tc_save({ sessionId })\` when the user explicitly asks you to save from chat (step 9 above).
|
|
292
|
+
- **A MANUAL desktop test case** (no automation) is not recorded: \`tc_draft_create({ category: "manual", technologyType: "DESKTOP", title, steps, data })\` then \`tc_save({ draftId })\`. Nothing is launched and no \`.exe\` path is needed; it is saved as a DESKTOP manual test case.
|
|
293
|
+
- **Automate a manual desktop test case:** \`tc_automate({ tcId, app_path })\`, then follow the DESKTOP guide it returns. A DESKTOP recording is AI-only: never ask the "AI-only or AI + Manual?" question.
|
|
294
|
+
- **Heal a failed desktop test case:** ask the user to close the application and keep hands off (the replay relaunches it and uses the real mouse), then \`heal_plan({ tcId, runId })\`, show the plan, and \`heal_apply({ planId })\` once the user agrees.
|
|
289
295
|
|
|
290
296
|
### Automate an EXISTING manual test case (any technology)
|
|
291
297
|
Use **\`tc_automate({ tcId, url, extra? })\`** first — it returns a recording guide built from the manual steps (with \`testcaseName\` + numeric \`userstoryId\` / \`moduleId\` already derived); ASK the user for URL / credentials / assertions and pass as \`url\` + \`extra\`. Then run the same technology-appropriate chain above. Same save story — the recorder UI's **Save Testcase** button (or an explicit \`tc_save({ sessionId })\`) creates the new automated TC; the source manual TC stays untouched.
|
|
@@ -387,6 +393,20 @@ Rules the tools enforce — state them, never work around them:
|
|
|
387
393
|
- If the plan is stale ("test case moved to a different version"), re-run \`heal_plan\` instead of forcing the old one.
|
|
388
394
|
- \`tc_heal\` is the one-shot alias: \`mode:'suggest'\` is the default and writes nothing; use \`apply\` / \`apply_and_verify\` only on an explicit instruction.
|
|
389
395
|
|
|
396
|
+
## Set up a Jira or Azure DevOps integration (SimplifyQA)
|
|
397
|
+
Configure the integration of the ACTIVE SimplifyQA project with four tools: \`integration_config\` (status, prepare, apply, webhook, delete), \`integration_lookup\` (Jira / Azure DevOps projects, sub project configurations, fields, values), \`integration_sync\` (sync, two-way test) and \`integration_logs\`. Read SimplifyQA data ONLY with \`sqa_query\`: projects (\`collection: 'projects'\`), sub projects (\`'subProjects'\`), users (\`'users'\`, e.g. for a user default), releases, sprints and modules; never \`list_projects\`, \`list_users\` or other list tools for this. The tools give you facts and safe writes; YOU propose. Never invent a module, type, field or value that a lookup did not return. Every write is TWO STEPS: call without confirmToken, show the preview, and call again with the token only after the user explicitly agrees.
|
|
398
|
+
When the user asks to map a SimplifyQA project to a Jira or Azure DevOps project (e.g. "map SQA project X to Jira project new jira_1" or "… to Azure project P"), first tell them the steps below in a few lines, then work through them:
|
|
399
|
+
1. \`integration_config({ action: 'status' })\`. If the tool's credentials are not configured (or the user wants to change tokens), call \`integration_config({ action: 'setup', tool })\`: it opens a terminal window on the user's computer where THEY type the site, email and Jira / Azure token (hidden); it checks them and saves the credentials file. No SimplifyQA token is needed: saving a configuration creates one for the user (the apply preview says so). Tell the user to answer there and say "done" when it prints Saved, then call status again; no reconnect is needed. **Never ask for a token or password in chat**; if the user pastes one, tell them to revoke it.
|
|
400
|
+
2. Projects: find the SimplifyQA project with \`sqa_query({ op: 'search', collection: 'projects', where: [{ field: 'name', op: 'contains', value: '<words>' }] })\` and make it active (\`qa_switch_project\`), then \`integration_lookup({ what: 'projects', tool })\` and match the Jira project the user named (by name or key); if it is ambiguous, ASK. A project can have only one integration (Jira or Azure DevOps); if the other exists, say so and stop. When the user mentions sub projects (or the project has them), call \`integration_lookup({ what: 'subprojects', tool })\`: for Jira each SimplifyQA sub project syncs with its OWN Jira project, so work the pairing out yourself instead of asking open questions: pick the SimplifyQA project whose name matches the user's words exactly (case-insensitive; "mcp" is MCP, not mcp 2) and switch to it, list its sub projects with \`sqa_query({ op: 'search', collection: 'subProjects' })\`, see which sub project ids already have a configuration with \`integration_lookup({ what: 'subprojects', tool })\`, and pick the Jira project from \`integration_lookup({ what: 'projects', tool })\` whose name or key matches the sub project name or the user's words. Then ask ONE question that proposes the full pairing (SimplifyQA project → sub project → Jira project) for the user to confirm or correct; ask open questions only when nothing matches. After the user confirms, pass \`subProject\` to \`integration_lookup({ what: 'fields', tool, externalProject, subProject })\`; every later prepare / apply / webhook / test / sync / logs / delete works on that sub project's configuration until another fields lookup. For Azure DevOps there is one configuration per project: map the SimplifyQA field Sub project to Area Path or Team instead.
|
|
401
|
+
3. \`integration_lookup({ what: 'fields', tool, externalProject })\` and ask which SimplifyQA modules to map.
|
|
402
|
+
4. Fields: for each Jira / Azure DevOps field worth syncing, find its SimplifyQA counterpart. When a counterpart EXISTS, suggest the pair. When it is MISSING, propose creating it with \`integration_config({ action: 'prepare', prepare })\`: \`customFields\` (when the user asks for a Jira / Azure DevOps field, pass \`{ module, fromField: '<field name or key>' }\` and it is created to match that field, LIST with its values or TEXT, then add the pair it names to the mapping), \`listValues\` (Jira statuses / priorities / options missing in a SimplifyQA list, by name), and \`ensureReleaseSprint: true\` so a project without a release or sprint gets "Release 1" / "Sprint 1"; use the release and sprint it reports as the Release / Sprint defaults in apply. The preview marks what already exists (reused) and lists similar names as suggestions; show it, and create only after the user agrees. Fields and values are re-read after creating, so they can be mapped right away.
|
|
403
|
+
5. Propose the mapping (module → type, SimplifyQA field → Jira field) with a short reason per pair; never map a field whose sync type is "not supported". Release, Sprint, Module, Team, State, Priority and Label are saved with create enabled, so values Jira has and SimplifyQA lacks are created during sync (for Azure DevOps the sync creates missing Releases and Sprints); say so. Mandatory SimplifyQA fields with no Jira counterpart need a \`default\` (ask the user for each; never invent one).
|
|
404
|
+
6. \`integration_config({ action: 'apply', mappings })\` without a token: show the preview and blocking items, fix them, and save only on the user's explicit "save" with the SAME mappings and the confirmToken. Then tell the user to hard-refresh Marketplace → Jira / Azure DevOps.
|
|
405
|
+
7. \`integration_config({ action: 'webhook' })\` checks that Jira (webhook) or Azure DevOps (service hooks for work item created / updated / deleted / commented) sends changes to SimplifyQA and offers to register it (Jira needs an admin token; Azure needs a project administrator PAT with the Service Hooks scope; otherwise give the user the manual steps it returns). Without it, changes only arrive through a manual sync.
|
|
406
|
+
8. \`integration_sync({ type, test: true })\` runs the TWO-WAY TEST after the user agrees: a marked test issue / work item with a dummy value in every mapped field must arrive in SimplifyQA with those values, and a test Defect with dummy values must arrive on the other side with them; all test records are deleted afterwards, and when both directions pass the full sync starts by itself (do not call integration_sync again). If a direction fails, read \`integration_logs\`, explain the cause with the record and field, fix it (prepare, apply with changed mappings or defaults, or webhook), and run the test again until it passes or the cause needs the user (e.g. Jira permissions). Report the per-field result it returns.
|
|
407
|
+
9. To remove modules, use apply with \`type: null\` for each. To clear the whole configuration, \`integration_config({ action: 'delete', tool })\`; records already synced stay.
|
|
408
|
+
Never call the sync, save, create or delete endpoints any other way, and never ask the user to paste a token: an expired SimplifyQA session means the MCP server must be reconnected (an API token in the credentials avoids the 30-minute expiry).
|
|
409
|
+
|
|
390
410
|
## Always
|
|
391
411
|
- **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 ("unknown tool", "not connected", "tool not found", etc.) REPORT the error and STOP. Do not synthesize a workaround, do not curl \`127.0.0.1:4040/mcp\`, do not probe the agent by hand — the user will fix the config. You have MCP tools, and only MCP tools.
|
|
392
412
|
- **NEVER save on your own - \`tc_save\` is an EXPLICIT user action ONLY.** A test case (recorded draft OR manual draft) is persisted only when the user EXPLICITLY says so (e.g. "save this test case", "save it", "persist it", "okay save"). **An instruction to RECORD / CREATE / AUTOMATE a test case is an instruction to produce the DRAFT - NOT to save it; recording/drafting and saving are SEPARATE steps.** After a recording finishes or a draft is authored, STOP at the draft, show it, and ask - do not chain into \`tc_save\`. Finishing a recording, or the user approving the CONTENT ("looks good", "nice", "correct"), is NOT a save instruction - if unsure whether a reply meant save, ASK rather than saving. The user may instead save it themselves in the Walnut UI; then do NOT also \`tc_save\` (it would duplicate). **ONE EXCEPTION: an API recording auto-saves ONCE at the end** - after the LAST \`api_send_request\`, call \`tc_save({ sessionId })\` (see the API section) so the recorded test case is in the backend and searchable immediately, without the user clicking Send and Save.
|
package/dist/initAgents.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initAgents.js","sourceRoot":"","sources":["../src/initAgents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"initAgents.js","sourceRoot":"","sources":["../src/initAgents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,yBAAyB,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAuBvG;6EAC6E;AAC7E,MAAM,YAAY,GAAG;;;;;;0DAMqC,CAAC;AAE3D;oGACoG;AACpG,MAAM,YAAY,GAAG;;;;;;;;;;;iOAW4M,CAAC;AAElO,MAAM,UAAU,GAAG;;;;;;;;;;0CAUuB,CAAC;AAE3C;;;gGAGgG;AAChG,MAAM,aAAa,GAAG;;;;;;;;;yDASmC,CAAC;AAE1D;gGACgG;AAChG,MAAM,eAAe,GAAa;IAChC,IAAI,EAAE,iBAAiB;IACvB,WAAW,EACT,kGAAkG;QAClG,qGAAqG;QACrG,mGAAmG;QACnG,qEAAqE;IACvE,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE;QACL,kGAAkG;QAClG,sBAAsB,EAAE,YAAY,EAAE,eAAe;QACrD,oCAAoC;QACpC,eAAe,EAAE,mBAAmB,EAAE,cAAc;QACpD,eAAe;QACf,WAAW;QACX,SAAS,EAAE,QAAQ,EAA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AC,MAAM,CAAC,KAAK,CAAC,gBAAgB,IAAI,YAAY,MAAM,IAAI,CAAC,CAAC;YACjE,eAAe,GAAG,IAAI,CAAC;YACvB,SAAS;QACX,CAAC;QACD,KAAK,MAAM,CAAC,IAAI,MAAM,EAAE,CAAC;YACvB,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,EAAE,UAAU,CAAC,CAAC;YACvD,SAAS,CAAC,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;QACtC,CAAC;IACH,CAAC;IAED,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,oGAAoG;QAClG,8GAA8G;QAC9G,qEAAqE,CACxE,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type { ExternalClient, SqaIntegrationClient } from './clients.js';
|
|
2
|
+
import type { ConfigRecord, ExtDiscovery, IntegrationTool, QaModule, RawQaField, RawQaModule } from './types.js';
|
|
3
|
+
export type PrepareInput = {
|
|
4
|
+
customFields?: Array<{
|
|
5
|
+
module: string;
|
|
6
|
+
label?: string | undefined;
|
|
7
|
+
type?: 'TEXT' | 'LIST' | undefined;
|
|
8
|
+
values?: string[] | undefined;
|
|
9
|
+
fromField?: string | undefined;
|
|
10
|
+
}> | undefined;
|
|
11
|
+
listValues?: Array<{
|
|
12
|
+
module: string;
|
|
13
|
+
field: string;
|
|
14
|
+
values: string[];
|
|
15
|
+
}> | undefined;
|
|
16
|
+
releases?: string[] | undefined;
|
|
17
|
+
sprints?: Array<{
|
|
18
|
+
name: string;
|
|
19
|
+
release: string;
|
|
20
|
+
}> | undefined;
|
|
21
|
+
ensureReleaseSprint?: boolean | undefined;
|
|
22
|
+
};
|
|
23
|
+
export type PrepareItem = {
|
|
24
|
+
what: string;
|
|
25
|
+
status: 'create' | 'exists' | 'blocked';
|
|
26
|
+
note?: string;
|
|
27
|
+
run?: () => Promise<void>;
|
|
28
|
+
};
|
|
29
|
+
export declare const digestOf: (value: unknown) => string;
|
|
30
|
+
export declare function planPrepare(args: {
|
|
31
|
+
input: PrepareInput;
|
|
32
|
+
qa: QaModule[];
|
|
33
|
+
raw: Record<string, RawQaModule>;
|
|
34
|
+
sqa: SqaIntegrationClient;
|
|
35
|
+
projectId: number;
|
|
36
|
+
customerId: number;
|
|
37
|
+
userId: number | null;
|
|
38
|
+
ext?: ExtDiscovery | null;
|
|
39
|
+
toolName?: string;
|
|
40
|
+
}): Promise<PrepareItem[]>;
|
|
41
|
+
export declare const AZURE_HOOK_EVENTS: string[];
|
|
42
|
+
export declare const azureHookUrl: (sqaBaseUrl: string) => string;
|
|
43
|
+
export declare const azureHookInstructions: (url: string, project: string) => string;
|
|
44
|
+
export declare const WEBHOOK_EVENTS: string[];
|
|
45
|
+
export declare const webhookUrl: (sqaBaseUrl: string, customerId: number, projectKey: string) => string;
|
|
46
|
+
export declare const webhookInstructions: (url: string, projectKey: string) => string;
|
|
47
|
+
export type TestStep = {
|
|
48
|
+
direction: string;
|
|
49
|
+
ok: boolean;
|
|
50
|
+
detail: string;
|
|
51
|
+
};
|
|
52
|
+
export type TestTarget = {
|
|
53
|
+
name: string;
|
|
54
|
+
linkField: string;
|
|
55
|
+
pairKey: 'jiraKey' | 'azureKey';
|
|
56
|
+
create: (type: string, title: string, text: string, extra: Record<string, unknown>) => Promise<{
|
|
57
|
+
ref: string;
|
|
58
|
+
match: string | number;
|
|
59
|
+
}>;
|
|
60
|
+
read: (ref: string) => Promise<Record<string, unknown>>;
|
|
61
|
+
remove: (ref: string) => Promise<void>;
|
|
62
|
+
label: (ref: string) => string;
|
|
63
|
+
};
|
|
64
|
+
export declare function jiraTarget(ext: ExternalClient, projectKey: string): TestTarget;
|
|
65
|
+
export declare function azureTarget(ext: ExternalClient, project: string): TestTarget;
|
|
66
|
+
export declare function runTwoWayTest(args: {
|
|
67
|
+
target: TestTarget;
|
|
68
|
+
tool: IntegrationTool;
|
|
69
|
+
sqa: SqaIntegrationClient;
|
|
70
|
+
extDiscovery: ExtDiscovery;
|
|
71
|
+
rawFields: RawQaField[];
|
|
72
|
+
config: ConfigRecord;
|
|
73
|
+
projectId: number;
|
|
74
|
+
type: string;
|
|
75
|
+
modKey: string;
|
|
76
|
+
stamp: string;
|
|
77
|
+
timeoutMs: number;
|
|
78
|
+
intervalMs: number;
|
|
79
|
+
wait: (ms: number) => Promise<void>;
|
|
80
|
+
userId?: number | null;
|
|
81
|
+
}): Promise<{
|
|
82
|
+
steps: TestStep[];
|
|
83
|
+
cleanup: string[];
|
|
84
|
+
}>;
|
|
85
|
+
//# sourceMappingURL=actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/integration/actions.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAIzE,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAY,eAAe,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE3H,MAAM,MAAM,YAAY,GAAG;IACzB,YAAY,CAAC,EAAE,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC,GAAG,SAAS,CAAC;IACpL,UAAU,CAAC,EAAE,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC,GAAG,SAAS,CAAC;IACpF,QAAQ,CAAC,EAAE,MAAM,EAAE,G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