@skyramp/mcp 0.4.4 → 0.5.0-rc.10
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/build/entitlements/entitlementGate.d.ts +8 -0
- package/build/entitlements/entitlementGate.js +57 -0
- package/build/entitlements/runCodes.d.ts +18 -0
- package/build/entitlements/runCodes.js +16 -0
- package/build/index.js +32 -6
- package/build/playwright/PlaywrightTraceService.d.ts +17 -0
- package/build/playwright/PlaywrightTraceService.js +29 -1
- package/build/playwright/dataSafetyConfig.d.ts +74 -0
- package/build/playwright/dataSafetyConfig.js +109 -0
- package/build/playwright/essentialTools.d.ts +1 -0
- package/build/playwright/essentialTools.js +44 -0
- package/build/playwright/registerPlaywrightTools.d.ts +36 -1
- package/build/playwright/registerPlaywrightTools.js +87 -43
- package/build/playwright/safeResolveDataSafety.d.ts +24 -0
- package/build/playwright/safeResolveDataSafety.js +33 -0
- package/build/prompts/initialize-workspace/initializeWorkspacePrompt.d.ts +17 -0
- package/build/prompts/initialize-workspace/initializeWorkspacePrompt.js +46 -177
- package/build/prompts/modularization/ui-test-modularization.d.ts +1 -0
- package/build/prompts/modularization/ui-test-modularization.js +9 -2
- package/build/prompts/test-maintenance/driftAnalysisShared.js +1 -1
- package/build/services/FleetExecutionService.d.ts +87 -16
- package/build/services/FleetExecutionService.js +487 -48
- package/build/services/FleetRunRegistry.d.ts +49 -0
- package/build/services/FleetRunRegistry.js +178 -0
- package/build/services/containerEnv.js +8 -2
- package/build/services/fleetLimitConfirmation.d.ts +19 -0
- package/build/services/fleetLimitConfirmation.js +126 -0
- package/build/tool-phases.d.ts +14 -8
- package/build/tool-phases.js +88 -43
- package/build/tools/code-refactor/assertion-state.js +3 -1
- package/build/tools/code-refactor/codeReuseTool.js +2 -1
- package/build/tools/code-refactor/utils-verify-gates.js +1 -1
- package/build/tools/executeFleetTool.d.ts +6 -4
- package/build/tools/executeFleetTool.js +67 -23
- package/build/tools/fixErrorTool.js +2 -1
- package/build/tools/fleetLifecycleTools.d.ts +20 -0
- package/build/tools/fleetLifecycleTools.js +124 -0
- package/build/tools/generate-tests/generateIntegrationRestTool.d.ts +38 -0
- package/build/tools/generate-tests/generateIntegrationRestTool.js +7 -1
- package/build/tools/generate-tests/generateUILoadRestTool.d.ts +19 -1
- package/build/tools/generate-tests/generateUILoadRestTool.js +316 -50
- package/build/tools/submitReportTool.js +4 -122
- package/build/tools/test-management/registerTestPlanTool.js +22 -6
- package/build/tools/workspace/initScanWorkspaceTool.d.ts +11 -1
- package/build/tools/workspace/initScanWorkspaceTool.js +111 -9
- package/build/tools/workspace/initializeWorkspaceTool.js +40 -4
- package/build/types/AssertionOutcome.d.ts +3 -0
- package/build/types/TestbotReport.d.ts +0 -37
- package/build/types/TestbotReport.js +0 -22
- package/build/types/index.d.ts +1 -1
- package/build/types/index.js +1 -1
- package/build/utils/assertion-verify/created-add-guard.d.ts +12 -0
- package/build/utils/assertion-verify/created-add-guard.js +173 -0
- package/build/utils/assertion-verify/index.d.ts +1 -0
- package/build/utils/assertion-verify/index.js +1 -0
- package/build/utils/assertion-verify/verify.d.ts +7 -3
- package/build/utils/assertion-verify/verify.js +9 -3
- package/build/utils/featureFlags.js +6 -3
- package/build/utils/repositorySlug.d.ts +14 -0
- package/build/utils/repositorySlug.js +46 -1
- package/build/utils/telemetry.d.ts +2 -0
- package/build/utils/telemetry.js +12 -0
- package/build/utils/utils-verify/action-key.d.ts +59 -2
- package/build/utils/utils-verify/action-key.js +162 -6
- package/build/utils/utils-verify/action-sites.d.ts +7 -0
- package/build/utils/utils-verify/action-sites.js +277 -35
- package/build/utils/utils-verify/call-sites.d.ts +8 -2
- package/build/utils/utils-verify/language-spec.js +1 -1
- package/build/utils/utils-verify/parse.d.ts +4 -0
- package/build/utils/utils-verify/parse.js +2 -1
- package/build/utils/versions.d.ts +3 -3
- package/build/utils/versions.js +1 -1
- package/build/workspace/workspace.d.ts +63 -121
- package/build/workspace/workspace.js +45 -48
- package/build/workspace/workspaceVerifier.d.ts +22 -0
- package/build/workspace/workspaceVerifier.js +65 -0
- package/node_modules/playwright/lib/dom-analyzer/blueprint.js +7 -6
- package/node_modules/playwright/lib/dom-analyzer/dynamicId.js +5 -4
- package/node_modules/playwright/lib/dom-analyzer/dynamicId.test.js +12 -0
- package/node_modules/playwright/lib/mcp/skyramp/dataSafetyGuard.js +822 -0
- package/node_modules/playwright/lib/mcp/skyramp/dataSafetySession.js +372 -0
- package/node_modules/playwright/lib/mcp/skyramp/exportTool.js +101 -8
- package/node_modules/playwright/lib/mcp/skyramp/finishTestSetupTool.js +45 -0
- package/node_modules/playwright/lib/mcp/skyramp/index.js +16 -0
- package/node_modules/playwright/lib/mcp/skyramp/recordingPhase.js +65 -0
- package/node_modules/playwright/lib/mcp/skyramp/skyRampImport.js +1 -0
- package/node_modules/playwright/lib/mcp/skyramp/traceRecordingBackend.js +598 -127
- package/node_modules/playwright/lib/mcp/test/skyRampExport.js +85 -31
- package/node_modules/playwright/lib/mcp/test/skyRampExport.test.js +132 -5
- package/node_modules/playwright/node_modules/playwright-core/lib/cli/program.js +2 -0
- package/node_modules/playwright/node_modules/playwright-core/lib/client/browserContext.js +4 -2
- package/node_modules/playwright/node_modules/playwright-core/lib/generated/injectedScriptSource.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/lib/generated/pollingRecorderSource.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/lib/protocol/validator.js +2 -1
- package/node_modules/playwright/node_modules/playwright-core/lib/server/browserContext.js +17 -1
- package/node_modules/playwright/node_modules/playwright-core/lib/server/codegen/skyramp/jsonlReader.js +1 -0
- package/node_modules/playwright/node_modules/playwright-core/lib/server/har/harRecorder.js +1 -0
- package/node_modules/playwright/node_modules/playwright-core/lib/server/har/harTracer.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/lib/server/recorder/recorderRunner.js +2 -1
- package/node_modules/playwright/node_modules/playwright-core/lib/server/recorder/recorderSignalProcessor.js +2 -1
- package/node_modules/playwright/node_modules/playwright-core/lib/server/recorder/skyramp/clickExpandedState.js +75 -0
- package/node_modules/playwright/node_modules/playwright-core/lib/server/recorder.js +4 -2
- package/node_modules/playwright/node_modules/playwright-core/lib/utils/isomorphic/volatileDate.js +85 -0
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/assets/{codeMirrorModule-Bou8kKzE.js → codeMirrorModule-BuhAdckO.js} +1 -1
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-COAHN430.js +809 -0
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/{index.0MJW0uG7.js → index.7AU8h0PZ.js} +1 -1
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/index.html +2 -2
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/{uiMode.GLqsx5cI.js → uiMode.Dl7smBJn.js} +1 -1
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/uiMode.html +2 -2
- package/node_modules/playwright/node_modules/playwright-core/package.json +1 -1
- package/node_modules/playwright/node_modules/playwright-core/src/cli/program.ts +5 -0
- package/node_modules/playwright/node_modules/playwright-core/src/client/browserContext.ts +3 -1
- package/node_modules/playwright/node_modules/playwright-core/src/client/types.ts +2 -0
- package/node_modules/playwright/node_modules/playwright-core/src/generated/injectedScriptSource.ts +1 -1
- package/node_modules/playwright/node_modules/playwright-core/src/generated/pollingRecorderSource.ts +1 -1
- package/node_modules/playwright/node_modules/playwright-core/src/protocol/validator.ts +1 -0
- package/node_modules/playwright/node_modules/playwright-core/src/server/browserContext.ts +25 -1
- package/node_modules/playwright/node_modules/playwright-core/src/server/codegen/skyramp/jsonlReader.ts +2 -0
- package/node_modules/playwright/node_modules/playwright-core/src/server/har/harRecorder.ts +1 -0
- package/node_modules/playwright/node_modules/playwright-core/src/server/har/harTracer.ts +3 -1
- package/node_modules/playwright/node_modules/playwright-core/src/server/recorder/recorderRunner.ts +3 -1
- package/node_modules/playwright/node_modules/playwright-core/src/server/recorder/recorderSignalProcessor.ts +1 -0
- package/node_modules/playwright/node_modules/playwright-core/src/server/recorder/skyramp/clickExpandedState.ts +82 -0
- package/node_modules/playwright/node_modules/playwright-core/src/server/recorder.ts +2 -0
- package/node_modules/playwright/node_modules/playwright-core/src/utils/isomorphic/volatileDate.ts +137 -1
- package/node_modules/playwright/package.json +1 -1
- package/package.json +4 -4
- package/plugin/prompts/plan-tests.md +2 -2
- package/plugin/prompts/testbot-task1.md +1 -1
- package/plugin/skills/enhance-assertions/reference/integration.md +1 -0
- package/plugin/skills/setup-testbot-target-sut/SKILL.md +60 -0
- package/plugin/skills/setup-testbot-target-sut/reference/ci-workflow.md +26 -0
- package/plugin/skills/setup-testbot-target-sut/reference/deployed-environment.md +105 -0
- package/plugin/skills/setup-testbot-target-sut/reference/existing-tests.md +14 -0
- package/plugin/skills/setup-testbot-target-sut/reference/troubleshooting.md +20 -0
- package/build/prompts/sut-setup/modes/adaptWorkflowPrompt.d.ts +0 -2
- package/build/prompts/sut-setup/modes/adaptWorkflowPrompt.js +0 -178
- package/build/prompts/sut-setup/modes/dockerComposePrompt.d.ts +0 -2
- package/build/prompts/sut-setup/modes/dockerComposePrompt.js +0 -311
- package/build/prompts/sut-setup/shared.d.ts +0 -62
- package/build/prompts/sut-setup/shared.js +0 -196
- package/build/resources/sutSetupResource.d.ts +0 -2
- package/build/resources/sutSetupResource.js +0 -63
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-DTp2-8Si.js +0 -809
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Docker from "dockerode";
|
|
2
|
+
import { Writable } from "stream";
|
|
2
3
|
/**
|
|
3
4
|
* Where the mounted pieces live inside the executor, per container platform.
|
|
4
5
|
*
|
|
@@ -11,8 +12,12 @@ export type ContainerPlatform = "linux" | "windows";
|
|
|
11
12
|
interface Layout {
|
|
12
13
|
work: string;
|
|
13
14
|
certs: string;
|
|
14
|
-
/** The directory a branch-built library jar is mounted from. */
|
|
15
|
+
/** The directory a branch-built library jar or package is mounted from. */
|
|
15
16
|
overrideDir: string;
|
|
17
|
+
/** The native library the image's SDKs load. */
|
|
18
|
+
nativeLib: string;
|
|
19
|
+
/** Where a branch-built npm SDK is installed, ahead of the image's on NODE_PATH. */
|
|
20
|
+
npmOverride: string;
|
|
16
21
|
/** The directory a credential pool outside the work directory is mounted from. */
|
|
17
22
|
poolDir: string;
|
|
18
23
|
imageClasses: string;
|
|
@@ -49,11 +54,20 @@ export interface FleetExecutionOptions {
|
|
|
49
54
|
executorImage?: string;
|
|
50
55
|
platform?: ContainerPlatform;
|
|
51
56
|
entryClass?: string;
|
|
52
|
-
|
|
57
|
+
/** Required only when the fleet deploys on a remote engine, which is mTLS. */
|
|
58
|
+
certsDir?: string;
|
|
59
|
+
/** Opt-in: the mounted daemon socket gives the fleet root-level access to this host. */
|
|
60
|
+
localDocker?: boolean;
|
|
53
61
|
credentials?: string;
|
|
54
62
|
libraryJar?: string;
|
|
63
|
+
/** A branch-built pip (.whl, .tar.gz) or npm (.tgz) SDK for a Python, TS or JS fleet. */
|
|
64
|
+
libraryPackage?: string;
|
|
55
65
|
timeoutSec?: number;
|
|
56
66
|
env?: Record<string, string>;
|
|
67
|
+
/** Internal live-output sink, fed whole lines; never supplied through a tool's JSON schema. */
|
|
68
|
+
onOutput?: (chunk: string) => void;
|
|
69
|
+
/** Internal: aborting it interrupts the run, then kills it after CANCEL_GRACE_MS. */
|
|
70
|
+
signal?: AbortSignal;
|
|
57
71
|
}
|
|
58
72
|
export interface FleetExecutionResult {
|
|
59
73
|
passed: boolean;
|
|
@@ -62,17 +76,47 @@ export interface FleetExecutionResult {
|
|
|
62
76
|
entryClass: string;
|
|
63
77
|
exitCode: number | null;
|
|
64
78
|
report: string;
|
|
79
|
+
/** Only the last MAX_BUFFERED_OUTPUT characters; the complete run is at outputLog. */
|
|
65
80
|
output: string;
|
|
66
81
|
result?: unknown;
|
|
67
82
|
timedOut?: boolean;
|
|
83
|
+
cancelled?: boolean;
|
|
84
|
+
/** The run's complete output on the host, when it could be written. */
|
|
85
|
+
outputLog?: string;
|
|
68
86
|
}
|
|
69
|
-
/**
|
|
70
|
-
export declare const
|
|
87
|
+
/** How long an interrupted fleet gets to cancel its workers before it is killed. */
|
|
88
|
+
export declare const CANCEL_GRACE_MS = 20000;
|
|
71
89
|
/**
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
|
|
90
|
+
* A sink for one of the container's streams that passes on whole lines only. Docker
|
|
91
|
+
* interleaves stdout and stderr frames, so a line is only whole within its own stream:
|
|
92
|
+
* one shared sink could split a SKYRAMP_LIMIT line around a stderr frame.
|
|
93
|
+
*/
|
|
94
|
+
export declare function lineSink(emit: (line: string) => void): {
|
|
95
|
+
sink: Writable;
|
|
96
|
+
flush: () => void;
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* A simple Java class name, or a Python, TypeScript or JavaScript fleet script's file name.
|
|
100
|
+
*
|
|
101
|
+
* No `$`: the name is interpolated unquoted into the `sh`/PowerShell command built below, and
|
|
102
|
+
* `$` there is a variable sigil, not a literal character.
|
|
103
|
+
*/
|
|
104
|
+
export declare const FLEET_ENTRY_NAME: RegExp;
|
|
105
|
+
export type FleetLanguage = "java" | "python" | "typescript" | "javascript";
|
|
106
|
+
/** The language a fleet entry is written in: a script by its extension, else a Java class. */
|
|
107
|
+
export declare function fleetLanguage(entry: string): FleetLanguage;
|
|
108
|
+
/**
|
|
109
|
+
* The SDK a branch-built package replaces: a pip sdist or wheel for Python, an npm tarball
|
|
110
|
+
* for TypeScript and JavaScript. Java takes a jar through libraryJar instead.
|
|
111
|
+
*/
|
|
112
|
+
export declare function packageLanguages(pkg: string): FleetLanguage[];
|
|
113
|
+
/** The file an entry lives in, relative to the fleet directory. */
|
|
114
|
+
export declare function fleetFileName(entry: string): string;
|
|
115
|
+
/**
|
|
116
|
+
* The generated fleet manager: the JUnit class (Java) or the script (Python, TypeScript)
|
|
117
|
+
* the run starts. The journey and the load file travel with it because they sit beside it
|
|
118
|
+
* -- the journey is an input the fleet ships to the worker, and the load file only supplies
|
|
119
|
+
* the scenario.
|
|
76
120
|
*/
|
|
77
121
|
export declare function findEntryClass(directory: string, explicit?: string): string;
|
|
78
122
|
/**
|
|
@@ -84,12 +128,25 @@ export declare function findEntryClass(directory: string, explicit?: string): st
|
|
|
84
128
|
*/
|
|
85
129
|
export declare function assertNoPinnedImage(fleetFile: string): void;
|
|
86
130
|
/**
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
131
|
+
* Which Docker daemons the fleet deploys its workers through, read off its hosts.
|
|
132
|
+
*
|
|
133
|
+
* `remote`: a host names a tcp or http(s) engine. That connection is mTLS, so the run needs
|
|
134
|
+
* the client certificates.
|
|
135
|
+
*
|
|
136
|
+
* `local`: a host deploys with no remote engine, which is the daemon this tool runs the
|
|
137
|
+
* executor on. The fleet reaches it through the daemon's socket and needs no certificates:
|
|
138
|
+
* the way to try a fleet on one's own machine.
|
|
139
|
+
*
|
|
140
|
+
* A host that carries an address drives a worker that already runs and deploys nothing, so
|
|
141
|
+
* it counts as neither. Throws when no host, a non-literal dockerHost, or a host built from a
|
|
142
|
+
* spread or a bare variable leaves the engine unknown -- the last of those would otherwise
|
|
143
|
+
* read as local with no dockerHost found, mounting the daemon's socket for a host that may
|
|
144
|
+
* actually be remote.
|
|
91
145
|
*/
|
|
92
|
-
export declare function
|
|
146
|
+
export declare function fleetDaemons(fleetFile: string): {
|
|
147
|
+
remote: boolean;
|
|
148
|
+
local: boolean;
|
|
149
|
+
};
|
|
93
150
|
/**
|
|
94
151
|
* The image the run happens in.
|
|
95
152
|
*
|
|
@@ -105,10 +162,24 @@ export interface ContainerCommand {
|
|
|
105
162
|
/** The shell script argv ends with -- named, because its index differs per platform. */
|
|
106
163
|
script: string;
|
|
107
164
|
}
|
|
108
|
-
/**
|
|
109
|
-
|
|
110
|
-
|
|
165
|
+
/**
|
|
166
|
+
* Java: javac, then the JUnit console runner, both against the image's classpath. Python,
|
|
167
|
+
* TypeScript and JavaScript: the fleet script, run from the work directory so its imports
|
|
168
|
+
* of the load file resolve beside it -- after installing a branch-built SDK package over
|
|
169
|
+
* the image's own, when one is mounted.
|
|
170
|
+
*/
|
|
171
|
+
export declare function buildCommand(entryClass: string, overrideJar: string | undefined, platform?: ContainerPlatform, overridePackage?: string): ContainerCommand;
|
|
172
|
+
/**
|
|
173
|
+
* The lines the fleet printed, which is what a reader wants out of the JUnit noise: the
|
|
174
|
+
* one-line digest, or the report blocks (name in column one, continuation lines indented).
|
|
175
|
+
*/
|
|
111
176
|
export declare function extractReport(output: string): string;
|
|
177
|
+
/**
|
|
178
|
+
* The report the library rendered itself, carried in the structured result as `report`.
|
|
179
|
+
* Preferred over the stdout filter: it is the complete text, not whatever survived the
|
|
180
|
+
* JUnit runner's console, and it is the same text every SDK prints.
|
|
181
|
+
*/
|
|
182
|
+
export declare function embeddedReport(result: unknown): string | undefined;
|
|
112
183
|
/**
|
|
113
184
|
* Where a path inside the container lands on the host.
|
|
114
185
|
*
|