@skyramp/mcp 0.4.4-rc.1 → 0.4.4
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/index.js +239 -210
- package/build/playwright/PlaywrightTraceService.d.ts +1 -1
- package/build/playwright/blueprintDigestStore.d.ts +1 -1
- package/build/playwright/registerPlaywrightTools.d.ts +1 -1
- package/build/playwright/traceRecordingPrompt.d.ts +1 -1
- package/build/playwright/traceRecordingPrompt.js +2 -2
- package/build/prompts/local-dev/local-dev-prompts.d.ts +1 -1
- package/build/prompts/local-dev/local-dev-prompts.js +2 -2
- package/build/prompts/startTraceCollectionPrompts.d.ts +1 -1
- package/build/prompts/startTraceCollectionPrompts.js +2 -3
- package/build/prompts/test-recommendation/registerRecommendTestsPrompt.d.ts +1 -1
- package/build/prompts/test-recommendation/registerRecommendTestsPrompt.js +2 -2
- package/build/prompts/testbot/testbot-prompts.d.ts +1 -1
- package/build/prompts/testbot/testbot-prompts.js +4 -7
- package/build/recommendation/answers.d.ts +17 -52
- package/build/recommendation/answers.js +29 -99
- package/build/recommendation/pullRequestText.d.ts +0 -2
- package/build/recommendation/pullRequestText.js +0 -16
- package/build/recommendation/registerPlan.d.ts +4 -7
- package/build/recommendation/registerPlan.js +11 -37
- package/build/recommendation/types.d.ts +4 -21
- package/build/recommendation/verifierContracts.d.ts +4 -4
- package/build/recommendation/verifierContracts.js +4 -4
- package/build/recommendation/verifiers/citedPath.d.ts +2 -2
- package/build/recommendation/verifiers/citedPath.js +2 -2
- package/build/recommendation/verifiers/issueTraceability.d.ts +5 -1
- package/build/recommendation/verifiers/issueTraceability.js +35 -4
- package/build/resources/analysisResources.d.ts +1 -1
- package/build/resources/analysisResources.js +1 -1
- package/build/resources/progressResource.d.ts +1 -1
- package/build/resources/sutSetupResource.d.ts +1 -1
- package/build/resources/sutSetupResource.js +1 -1
- package/build/resources/testbotResource.d.ts +1 -1
- package/build/resources/testbotResource.js +1 -1
- package/build/services/AnalyticsService.d.ts +1 -1
- package/build/services/FleetExecutionService.d.ts +130 -0
- package/build/services/FleetExecutionService.js +391 -0
- package/build/services/ModularizationService.d.ts +1 -1
- package/build/services/TestExecutionService.d.ts +7 -0
- package/build/services/TestExecutionService.js +21 -0
- package/build/services/TestGenerationService.d.ts +1 -1
- package/build/tool-phases.js +2 -0
- package/build/tools/auth/loginTool.d.ts +1 -1
- package/build/tools/auth/loginTool.js +2 -2
- package/build/tools/auth/logoutTool.d.ts +1 -1
- package/build/tools/auth/logoutTool.js +2 -2
- package/build/tools/code-refactor/alignAssertionsTool.d.ts +1 -1
- package/build/tools/code-refactor/alignAssertionsTool.js +1 -1
- package/build/tools/code-refactor/assertionSkillTools.d.ts +1 -1
- package/build/tools/code-refactor/assertionSkillTools.js +2 -2
- package/build/tools/code-refactor/codeReuseTool.d.ts +1 -1
- package/build/tools/code-refactor/codeReuseTool.js +2 -2
- package/build/tools/code-refactor/enhanceAssertionsTool.d.ts +1 -1
- package/build/tools/code-refactor/enhanceAssertionsTool.js +1 -1
- package/build/tools/code-refactor/modularizationTool.d.ts +1 -1
- package/build/tools/code-refactor/modularizationTool.js +2 -2
- package/build/tools/enrichTestWithMocksTool.d.ts +1 -1
- package/build/tools/enrichTestWithMocksTool.js +2 -2
- package/build/tools/executeFleetTool.d.ts +28 -0
- package/build/tools/executeFleetTool.js +107 -0
- package/build/tools/executeSkyrampTestTool.d.ts +8 -5
- package/build/tools/executeSkyrampTestTool.js +5 -5
- package/build/tools/fixErrorTool.d.ts +1 -1
- package/build/tools/fixErrorTool.js +1 -1
- package/build/tools/generate-tests/batchMockGenerationTool.d.ts +6 -57
- package/build/tools/generate-tests/batchMockGenerationTool.js +3 -3
- package/build/tools/generate-tests/generateBatchScenarioRestTool.d.ts +9 -45
- package/build/tools/generate-tests/generateBatchScenarioRestTool.js +29 -11
- package/build/tools/generate-tests/generateContractRestTool.d.ts +1 -2
- package/build/tools/generate-tests/generateContractRestTool.js +1 -1
- package/build/tools/generate-tests/generateE2ERestTool.d.ts +1 -2
- package/build/tools/generate-tests/generateE2ERestTool.js +1 -1
- package/build/tools/generate-tests/generateFuzzRestTool.d.ts +1 -1
- package/build/tools/generate-tests/generateFuzzRestTool.js +1 -1
- package/build/tools/generate-tests/generateIntegrationRestTool.d.ts +1 -2
- package/build/tools/generate-tests/generateIntegrationRestTool.js +1 -1
- package/build/tools/generate-tests/generateLoadRestTool.d.ts +1 -2
- package/build/tools/generate-tests/generateLoadRestTool.js +2 -1
- package/build/tools/generate-tests/generateMockRestTool.d.ts +1 -2
- package/build/tools/generate-tests/generateMockRestTool.js +3 -3
- package/build/tools/generate-tests/generateSmokeRestTool.d.ts +1 -1
- package/build/tools/generate-tests/generateSmokeRestTool.js +1 -1
- package/build/tools/generate-tests/generateUILoadRestTool.d.ts +64 -0
- package/build/tools/generate-tests/generateUILoadRestTool.js +512 -0
- package/build/tools/generate-tests/generateUIRestTool.d.ts +6 -7
- package/build/tools/generate-tests/generateUIRestTool.js +1 -1
- package/build/tools/generate-tests/loadTestSchema.d.ts +15 -15
- package/build/tools/generate-tests/trace-reuse-guard.d.ts +1 -1
- package/build/tools/generateEnrichedIntegrationTestTool.d.ts +1 -2
- package/build/tools/generateEnrichedIntegrationTestTool.js +1 -1
- package/build/tools/localDevWorkerComposeTool.d.ts +1 -1
- package/build/tools/localDevWorkerComposeTool.js +2 -2
- package/build/tools/one-click/oneClickTool.d.ts +1 -1
- package/build/tools/one-click/oneClickTool.js +1 -1
- package/build/tools/preflightMockCheckTool.d.ts +1 -1
- package/build/tools/preflightMockCheckTool.js +3 -3
- package/build/tools/queryProxyMocksTool.d.ts +1 -1
- package/build/tools/queryProxyMocksTool.js +3 -3
- package/build/tools/submitReportTool.d.ts +111 -414
- package/build/tools/submitReportTool.js +154 -138
- package/build/tools/test-management/actionsTool.d.ts +1 -1
- package/build/tools/test-management/actionsTool.js +7 -7
- package/build/tools/test-management/analyzeChangesTool.d.ts +22 -118
- package/build/tools/test-management/analyzeChangesTool.js +4 -4
- package/build/tools/test-management/analyzeTestHealthTool.d.ts +1 -1
- package/build/tools/test-management/analyzeTestHealthTool.js +4 -4
- package/build/tools/test-management/registerTestPlanTool.d.ts +111 -743
- package/build/tools/test-management/registerTestPlanTool.js +20 -36
- package/build/tools/test-management/resolveScreenTool.d.ts +1 -1
- package/build/tools/test-management/resolveScreenTool.js +6 -2
- package/build/tools/trace/startTraceCollectionTool.d.ts +1 -1
- package/build/tools/trace/startTraceCollectionTool.js +4 -4
- package/build/tools/trace/stopTraceCollectionTool.d.ts +1 -1
- package/build/tools/trace/stopTraceCollectionTool.js +2 -2
- package/build/tools/verifyTestDependenciesTool.d.ts +1 -1
- package/build/tools/verifyTestDependenciesTool.js +1 -1
- package/build/tools/workspace/initScanWorkspaceTool.d.ts +1 -1
- package/build/tools/workspace/initScanWorkspaceTool.js +1 -1
- package/build/tools/workspace/initializeWorkspaceTool.d.ts +1 -1
- package/build/tools/workspace/initializeWorkspaceTool.js +1 -1
- package/build/types/RepositoryAnalysis.d.ts +164 -1170
- package/build/types/RepositoryAnalysis.js +12 -10
- package/build/types/StepMethod.d.ts +24 -1
- package/build/types/StepMethod.js +1 -1
- package/build/types/TestTypes.d.ts +34 -133
- package/build/types/TestTypes.js +3 -3
- package/build/types/TestbotReport.d.ts +37 -0
- package/build/types/TestbotReport.js +22 -0
- package/build/types/index.d.ts +1 -1
- package/build/types/index.js +1 -1
- package/build/utils/docker.d.ts +29 -7
- package/build/utils/docker.js +83 -27
- package/build/utils/initAgent.d.ts +3 -3
- package/build/utils/initAgent.js +58 -26
- package/build/utils/progress.d.ts +3 -4
- package/build/utils/progress.js +4 -4
- package/build/utils/utils.d.ts +1 -1
- package/build/utils/versions.d.ts +3 -3
- package/build/utils/versions.js +1 -1
- package/build/workspace/workspace.d.ts +117 -538
- package/build/workspace/workspace.js +2 -2
- package/package.json +6 -5
- package/plugin/prompts/testbot-task1.md +1 -1
- package/plugin/skills/repair-staged-files/SKILL.md +17 -0
- package/build/recommendation/blockerProbes.d.ts +0 -13
- package/build/recommendation/blockerProbes.js +0 -91
- package/build/recommendation/blockers.d.ts +0 -65
- package/build/recommendation/blockers.js +0 -135
|
@@ -12,10 +12,7 @@ import { collectChangedRuns } from "../../utils/changedRuns.js";
|
|
|
12
12
|
import { LOCKFILE, NOT_SOURCE_DIR, } from "../../recommendation/verifiers/endpointGrounded.js";
|
|
13
13
|
import { hasUITestTypeLabel, isHTTPStep, } from "../../recommendation/subjectStep.js";
|
|
14
14
|
import { STEP_METHOD_DESCRIPTION, isUiStepVerb, normalizeStepMethod, stepMethodSchema, } from "../../types/StepMethod.js";
|
|
15
|
-
import { registerPlan
|
|
16
|
-
import { BLOCKER_DESCRIPTION } from "../../recommendation/answers.js";
|
|
17
|
-
import { probeBlockers, blockersIn, } from "../../recommendation/blockerProbes.js";
|
|
18
|
-
import { blockerSchema, verifyBlocker } from "../../recommendation/blockers.js";
|
|
15
|
+
import { registerPlan } from "../../recommendation/registerPlan.js";
|
|
19
16
|
import { targetElementSchema } from "../submitReportTool.js";
|
|
20
17
|
import { capturedBlueprintDigests } from "../../playwright/blueprintDigestStore.js";
|
|
21
18
|
import { pullRequestText } from "../../recommendation/pullRequestText.js";
|
|
@@ -92,7 +89,7 @@ const registerStepSchema = z
|
|
|
92
89
|
if (step[field] === undefined)
|
|
93
90
|
continue;
|
|
94
91
|
ctx.addIssue({
|
|
95
|
-
code:
|
|
92
|
+
code: "custom",
|
|
96
93
|
path: [field],
|
|
97
94
|
message: `\`${field}\` belongs to a step that sends a request; \`${step.method}\` is a page interaction, which sends none. Assert the page through \`declarations.elements\`, or write the request as its own step.`,
|
|
98
95
|
});
|
|
@@ -132,7 +129,7 @@ const plannedTestCitations = citationFields({
|
|
|
132
129
|
changesSubject: "test proves",
|
|
133
130
|
defectsSubject: "test proves",
|
|
134
131
|
changesExtra: " This test proves one behaviour: list the id of every change that the behaviour covers. The server checks that each declared change has a planned test that cites it, or an answer. The server does not check that the test exercises the change. CHECKED on a `requirement_conflict` test: at least one cited change must have been read from the pull request or a requirements file, never only from the diff.",
|
|
135
|
-
defectsExtra: " The server checks that each declared defect has a planned test that cites it and expects to fail. The server does not check that the test reaches the defect. CHECKED on a `requirement_conflict` test: it must cite at least one defect.",
|
|
132
|
+
defectsExtra: " The server checks that each declared defect has a planned test that cites it and expects to fail, or a blocker naming what stopped the test. The server does not check that the test reaches the defect. CHECKED on a `requirement_conflict` test: it must cite at least one defect.",
|
|
136
133
|
});
|
|
137
134
|
// The fields `declarations` accepts. Named on its own so one list of them can be
|
|
138
135
|
// derived from it — a hand-written second copy had already fallen behind.
|
|
@@ -249,7 +246,7 @@ const declarationsSchema = declarationFieldsSchema
|
|
|
249
246
|
if (identifies)
|
|
250
247
|
return;
|
|
251
248
|
ctx.addIssue({
|
|
252
|
-
code:
|
|
249
|
+
code: "custom",
|
|
253
250
|
path: ["elements", "items", index],
|
|
254
251
|
message: "every `elements.items` entry needs at least one of `accessibleName`, `testId` or `stableId` with a value in it — an entry with none names no element that can be looked up in a capture.",
|
|
255
252
|
});
|
|
@@ -341,7 +338,7 @@ const registerPlannedTestSchema = z.preprocess(hoistDeclarationFields, z
|
|
|
341
338
|
const isUILabel = hasUITestTypeLabel(plannedTest.testType);
|
|
342
339
|
if (plannedTest.steps.length === 0 && !isUILabel) {
|
|
343
340
|
ctx.addIssue({
|
|
344
|
-
code:
|
|
341
|
+
code: "custom",
|
|
345
342
|
path: ["steps"],
|
|
346
343
|
message: "steps must not be empty for a contract, integration or other non-UI planned test: the route, duplicate and existing-coverage checks all read the steps to find the endpoint this test is about. List the requests the test makes.",
|
|
347
344
|
});
|
|
@@ -355,7 +352,7 @@ const registerPlannedTestSchema = z.preprocess(hoistDeclarationFields, z
|
|
|
355
352
|
const url = typeof rawUrl === "string" ? rawUrl.trim() : "";
|
|
356
353
|
if (isUILabel && !hasHTTPStep && url.length === 0) {
|
|
357
354
|
ctx.addIssue({
|
|
358
|
-
code:
|
|
355
|
+
code: "custom",
|
|
359
356
|
path: ["declarations", "elements", "pageUrl"],
|
|
360
357
|
message: "a ui or e2e planned test whose steps make no HTTP call must set `declarations.elements.pageUrl` to the screen it opens: a planned test naming no request and no screen is not a plan the server can read.",
|
|
361
358
|
});
|
|
@@ -366,7 +363,7 @@ const registerPlannedTestSchema = z.preprocess(hoistDeclarationFields, z
|
|
|
366
363
|
// no page either could look up and drew no objection from either.
|
|
367
364
|
if (isUILabel && url.length > 0 && !namesAScreen(url)) {
|
|
368
365
|
ctx.addIssue({
|
|
369
|
-
code:
|
|
366
|
+
code: "custom",
|
|
370
367
|
path: ["declarations", "elements", "pageUrl"],
|
|
371
368
|
message: "`declarations.elements.pageUrl` is accepted in two spellings and no others: a route path starting with `/`, e.g. `/orders/1`, or an absolute `http` or `https` URL, e.g. `http://localhost:5173/orders/1`. Give the path when this run has no host to name.",
|
|
372
369
|
});
|
|
@@ -477,7 +474,7 @@ const registerTestPlanSchema = {
|
|
|
477
474
|
return;
|
|
478
475
|
}
|
|
479
476
|
ctx.addIssue({
|
|
480
|
-
code:
|
|
477
|
+
code: "custom",
|
|
481
478
|
path: [index, "id"],
|
|
482
479
|
message: `change id "${change.id}" is already used by change ${seen + 1}. Every change needs its own id — planned tests cite it by that id.`,
|
|
483
480
|
});
|
|
@@ -523,14 +520,14 @@ const registerTestPlanSchema = {
|
|
|
523
520
|
return;
|
|
524
521
|
}
|
|
525
522
|
ctx.addIssue({
|
|
526
|
-
code:
|
|
523
|
+
code: "custom",
|
|
527
524
|
path: [index, "id"],
|
|
528
525
|
message: `defect id "${defect.id}" is already used by defect ${seen + 1}. Every defect needs its own id — planned tests cite it by that id.`,
|
|
529
526
|
});
|
|
530
527
|
});
|
|
531
528
|
})
|
|
532
529
|
.default([])
|
|
533
|
-
.describe("The defects your code review found in the code that serves each change, whether or not the diff contains the line. Every defect closes one of
|
|
530
|
+
.describe("The defects your code review found in the code that serves each change, whether or not the diff contains the line. Every defect closes one of three ways: a planned test that cites it in `defects` and expects to fail, a `maintains` entry that cites it because your edit to an existing test covers it, or a blocker naming what stopped the test. A pre-existing defect in a file this pull request touches belongs on this list. An empty list says the review found none; the check asks you to confirm that in one line. A requirement conflict is a defect: list it here, and the `requirement_conflict` test cites it."),
|
|
534
531
|
// REQUIRED, not `.default([])`. The MCP SDK wraps this shape in a plain
|
|
535
532
|
// `z.object`, which STRIPS an undeclared top-level key, so with a default
|
|
536
533
|
// `planned test:` for `planned tests:` stored an EMPTY plan and counted the
|
|
@@ -555,7 +552,7 @@ const registerTestPlanSchema = {
|
|
|
555
552
|
return;
|
|
556
553
|
}
|
|
557
554
|
ctx.addIssue({
|
|
558
|
-
code:
|
|
555
|
+
code: "custom",
|
|
559
556
|
path: [index, "scenarioName"],
|
|
560
557
|
message: `scenarioName "${plannedTest.scenarioName}" is already used by planned test ${first + 1}. Every planned test needs its own name — the name is its id.`,
|
|
561
558
|
});
|
|
@@ -587,7 +584,10 @@ const registerTestPlanSchema = {
|
|
|
587
584
|
answer: z
|
|
588
585
|
.string()
|
|
589
586
|
.describe("Why the objection does not apply, or what you decided instead."),
|
|
590
|
-
blocker:
|
|
587
|
+
blocker: z
|
|
588
|
+
.string()
|
|
589
|
+
.optional()
|
|
590
|
+
.describe("What stopped this run from writing the test: a service that is not running, a paired branch that no longer exists, the one credential the run holds. An objection about a change or a defect with no test, or about a value a page and API change refuses that no UI test names, closes only with this. A reason the change is not worth testing is not a blocker."),
|
|
591
591
|
})
|
|
592
592
|
.strict())
|
|
593
593
|
.default([])
|
|
@@ -795,25 +795,10 @@ function recordedPullRequest() {
|
|
|
795
795
|
logger.warning("No pull request text was recorded before the plan was registered; the checks that read it will see an empty pull request.");
|
|
796
796
|
return { title: "", description: "" };
|
|
797
797
|
}
|
|
798
|
-
/**
|
|
799
|
-
|
|
800
|
-
* service that was down when it was accepted may be up now. */
|
|
801
|
-
export function blockersToProbe(registration, previous) {
|
|
802
|
-
return [
|
|
803
|
-
...blockersIn(registration.answers),
|
|
804
|
-
...blockersIn(previous?.answeredObjections ?? []),
|
|
805
|
-
...blockersIn(previous?.unverifiedCloses ?? []),
|
|
806
|
-
];
|
|
807
|
-
}
|
|
808
|
-
/** Every fact the verifiers check against, gathered once per registration. The
|
|
809
|
-
* blockers are probed HERE rather than inside a verifier: an HTTP request and a
|
|
810
|
-
* `git` call are both asynchronous and every verifier is not. */
|
|
811
|
-
export async function buildVerifyContext(state, blockers = []) {
|
|
798
|
+
/** Every fact the verifiers check against, gathered once per registration. */
|
|
799
|
+
export async function buildVerifyContext(state) {
|
|
812
800
|
const sections = repoSections(state);
|
|
813
|
-
const
|
|
814
|
-
Promise.all(sections.map((section) => changedFilesForVerification(section))),
|
|
815
|
-
probeBlockers(blockers),
|
|
816
|
-
]);
|
|
801
|
+
const listings = await Promise.all(sections.map((section) => changedFilesForVerification(section)));
|
|
817
802
|
// Per repository, so a planned test is checked against the one it names. Every
|
|
818
803
|
// planned test names one; a single-repository run names that one repository.
|
|
819
804
|
return {
|
|
@@ -836,7 +821,6 @@ export async function buildVerifyContext(state, blockers = []) {
|
|
|
836
821
|
citedFileExists: makeCitedFileCheck(state),
|
|
837
822
|
readSpecFile: makeSpecFileReader(state),
|
|
838
823
|
routesRenderingFile: makeScreenRouteResolver(state),
|
|
839
|
-
blockerVerdict: (blocker) => verifyBlocker(blocker, checks),
|
|
840
824
|
};
|
|
841
825
|
}
|
|
842
826
|
// ── Output ──────────────────────────────────────────────────────────────────
|
|
@@ -923,7 +907,7 @@ export function registerRegisterTestPlanTool(server) {
|
|
|
923
907
|
"An undeclared key is refused by name on a planned test and on `declarations`, so a declaration written one level too high is corrected rather than dropped in silence. " +
|
|
924
908
|
"Checks run against the stored plan and return objections. Fix one and register it again as often as you like, or answer it by id through `answers`. " +
|
|
925
909
|
"There is no fallback plan: if you never register, this run has no plan.",
|
|
926
|
-
inputSchema: registerTestPlanSchema,
|
|
910
|
+
inputSchema: z.object(registerTestPlanSchema),
|
|
927
911
|
}, async (params) => {
|
|
928
912
|
// The run's own state file, unless the agent named one. Outside a run there
|
|
929
913
|
// is no path to fall back to, and no analysis to check a plan against.
|
|
@@ -946,7 +930,7 @@ export function registerRegisterTestPlanTool(server) {
|
|
|
946
930
|
const registration = buildRegistration(params, registrationNumber);
|
|
947
931
|
// The previous registration's answers are already on the stored plan, which
|
|
948
932
|
// the write below replaces.
|
|
949
|
-
const result = registerPlan(registration, await buildVerifyContext(fullState
|
|
933
|
+
const result = registerPlan(registration, await buildVerifyContext(fullState), fullState.plan);
|
|
950
934
|
try {
|
|
951
935
|
const { metadata: _metadata, relatedRepos: _sections, ...rootData } = fullState;
|
|
952
936
|
await stateManager.appendData({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { McpServer } from "@modelcontextprotocol/
|
|
1
|
+
import { McpServer } from "@modelcontextprotocol/server";
|
|
2
2
|
import { ScreenRouteCandidate } from "../../utils/screenRoutes.js";
|
|
3
3
|
/** Where a bound route parameter came from. `unresolved` never carries a value. */
|
|
4
4
|
export type ParamSource = "currentUrl" | "blueprint" | "unresolved";
|
|
@@ -260,7 +260,7 @@ const outputSchema = {
|
|
|
260
260
|
.array(z.object({
|
|
261
261
|
url: z.string(),
|
|
262
262
|
routePattern: z.string(),
|
|
263
|
-
params: z.record(z.object({
|
|
263
|
+
params: z.record(z.string(), z.object({
|
|
264
264
|
value: z.string(),
|
|
265
265
|
from: z.enum(["currentUrl", "blueprint", "unresolved"]),
|
|
266
266
|
})),
|
|
@@ -282,7 +282,11 @@ const DESCRIPTION = "Answer which page of the running app renders a changed fron
|
|
|
282
282
|
"(skip the browser and say so), or 'unknown' when no route table could be read (find the page yourself). " +
|
|
283
283
|
"The current page is read from this server's own browser session — do not pass it.";
|
|
284
284
|
export function registerResolveScreenTool(server) {
|
|
285
|
-
server.registerTool(TOOL_RESOLVE_SCREEN, {
|
|
285
|
+
server.registerTool(TOOL_RESOLVE_SCREEN, {
|
|
286
|
+
description: DESCRIPTION,
|
|
287
|
+
inputSchema: z.object(inputSchema),
|
|
288
|
+
outputSchema: z.object(outputSchema),
|
|
289
|
+
}, async (params) => {
|
|
286
290
|
const repositoryPath = String(params.repositoryPath ?? "").trim();
|
|
287
291
|
const changedFile = String(params.changedFile ?? "").trim();
|
|
288
292
|
const location = lastKnownBrowserUrl();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { McpServer } from "@modelcontextprotocol/
|
|
1
|
+
import { McpServer } from "@modelcontextprotocol/server";
|
|
2
2
|
export declare function registerTraceTool(server: McpServer): void;
|
|
@@ -47,7 +47,7 @@ Pass \`sessionMode\` to declare what you want to do with the workspace's session
|
|
|
47
47
|
\`sessionMode: "auto"\` (default) — Use when the user does not signal an intent either way. If a session file already exists in \`outputDir\`, behaves like \`reuse\` (loads it, does not overwrite). If no session file exists, does **no** session handling — it neither loads nor saves. Storing a session is always opt-in: it only happens with \`sessionMode: "capture"\` or an explicit \`playwrightSaveStoragePath\`. Plain auto never writes credentials the user did not ask to store.
|
|
48
48
|
|
|
49
49
|
For detailed documentation visit: https://www.skyramp.dev/docs/load-test/advanced-generation#start-trace-collection`,
|
|
50
|
-
inputSchema: {
|
|
50
|
+
inputSchema: z.object({
|
|
51
51
|
playwright: z
|
|
52
52
|
.boolean()
|
|
53
53
|
.describe("Whether to enable Playwright for trace collection. Set to true for UI interactions, false for API-only tracing")
|
|
@@ -94,14 +94,14 @@ For detailed documentation visit: https://www.skyramp.dev/docs/load-test/advance
|
|
|
94
94
|
prompt: z
|
|
95
95
|
.string()
|
|
96
96
|
.describe("The prompt user provided to start trace collection"),
|
|
97
|
-
},
|
|
97
|
+
}),
|
|
98
98
|
_meta: {
|
|
99
99
|
keywords: ["start trace", "trace collection", "trace generation"],
|
|
100
100
|
},
|
|
101
|
-
}, async (params,
|
|
101
|
+
}, async (params, ctx) => {
|
|
102
102
|
let errorResult;
|
|
103
103
|
// Helper to send progress notifications to the MCP client
|
|
104
|
-
const sendProgress = makeProgressReporter(
|
|
104
|
+
const sendProgress = makeProgressReporter(ctx);
|
|
105
105
|
logger.info("Starting trace collection", {
|
|
106
106
|
playwright: params.playwright,
|
|
107
107
|
browser: params.browser,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { McpServer } from "@modelcontextprotocol/
|
|
1
|
+
import { McpServer } from "@modelcontextprotocol/server";
|
|
2
2
|
export declare function registerTraceStopTool(server: McpServer): void;
|
|
@@ -22,7 +22,7 @@ The generated trace and Playwright files can be used as inputs for:
|
|
|
22
22
|
- UI test generation (using Playwright files)
|
|
23
23
|
|
|
24
24
|
For detailed documentation visit: https://www.skyramp.dev/docs/load-test/advanced-generation#end-trace-collection`,
|
|
25
|
-
inputSchema: {
|
|
25
|
+
inputSchema: z.object({
|
|
26
26
|
traceOutputFile: z
|
|
27
27
|
.string()
|
|
28
28
|
.default("skyramp_traces.json")
|
|
@@ -38,7 +38,7 @@ For detailed documentation visit: https://www.skyramp.dev/docs/load-test/advance
|
|
|
38
38
|
prompt: z
|
|
39
39
|
.string()
|
|
40
40
|
.describe("The prompt user provided to stop trace collection"),
|
|
41
|
-
},
|
|
41
|
+
}),
|
|
42
42
|
_meta: {
|
|
43
43
|
keywords: ["stop trace", "collect generated trace"],
|
|
44
44
|
},
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { McpServer } from "@modelcontextprotocol/
|
|
1
|
+
import { McpServer } from "@modelcontextprotocol/server";
|
|
2
2
|
export declare const VERIFY_TEST_DEPENDENCIES_TOOL = "skyramp_verify_test_dependencies";
|
|
3
3
|
export declare function registerVerifyTestDependenciesTool(server: McpServer): void;
|
|
@@ -14,7 +14,7 @@ const schema = z.object({
|
|
|
14
14
|
export function registerVerifyTestDependenciesTool(server) {
|
|
15
15
|
server.registerTool(VERIFY_TEST_DEPENDENCIES_TOOL, {
|
|
16
16
|
description: "Verify that dependency changes made while fixing tests use only approved testing packages and development/test-only manifest scopes.",
|
|
17
|
-
inputSchema: schema
|
|
17
|
+
inputSchema: schema,
|
|
18
18
|
_meta: {
|
|
19
19
|
keywords: [
|
|
20
20
|
"dependencies",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { McpServer } from "@modelcontextprotocol/
|
|
1
|
+
import { McpServer } from "@modelcontextprotocol/server";
|
|
2
2
|
export declare function issueScanToken(): string;
|
|
3
3
|
export declare function validateAndConsumeScanToken(token: string): boolean;
|
|
4
4
|
export declare function registerInitScanWorkspaceTool(server: McpServer): void;
|
|
@@ -33,7 +33,7 @@ export function registerInitScanWorkspaceTool(server) {
|
|
|
33
33
|
"PREREQUISITE for skyramp_init_workspace. " +
|
|
34
34
|
"Scans a repository and returns instructions for discovering all services, along with a scanToken. " +
|
|
35
35
|
"Follow the instructions to build the services array, then pass both to skyramp_init_workspace to create the workspace config.",
|
|
36
|
-
inputSchema: initScanWorkspaceSchema
|
|
36
|
+
inputSchema: initScanWorkspaceSchema,
|
|
37
37
|
}, async (params) => {
|
|
38
38
|
let errorResult;
|
|
39
39
|
const recordParams = {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { McpServer } from "@modelcontextprotocol/
|
|
1
|
+
import { McpServer } from "@modelcontextprotocol/server";
|
|
2
2
|
export declare function registerInitializeWorkspaceTool(server: McpServer): void;
|
|
@@ -111,7 +111,7 @@ export function registerInitializeWorkspaceTool(server) {
|
|
|
111
111
|
"Then call this tool to write .skyramp/workspace.yml with the discovered services and scanToken. " +
|
|
112
112
|
"2. Edit existing workspace.yml: omit scanToken, set force: true, and pass the FULL updated services array (overwrite, not merge — fields not in the array are dropped). " +
|
|
113
113
|
"The services schema is strict: any field not in the schema (e.g. inventing `serverStopCommand` on `runtimeDetails`) fails validation and the call is rejected.",
|
|
114
|
-
inputSchema: initializeWorkspaceSchema
|
|
114
|
+
inputSchema: initializeWorkspaceSchema,
|
|
115
115
|
_meta: {
|
|
116
116
|
keywords: [
|
|
117
117
|
"initialize",
|