@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.
Files changed (148) hide show
  1. package/build/index.js +239 -210
  2. package/build/playwright/PlaywrightTraceService.d.ts +1 -1
  3. package/build/playwright/blueprintDigestStore.d.ts +1 -1
  4. package/build/playwright/registerPlaywrightTools.d.ts +1 -1
  5. package/build/playwright/traceRecordingPrompt.d.ts +1 -1
  6. package/build/playwright/traceRecordingPrompt.js +2 -2
  7. package/build/prompts/local-dev/local-dev-prompts.d.ts +1 -1
  8. package/build/prompts/local-dev/local-dev-prompts.js +2 -2
  9. package/build/prompts/startTraceCollectionPrompts.d.ts +1 -1
  10. package/build/prompts/startTraceCollectionPrompts.js +2 -3
  11. package/build/prompts/test-recommendation/registerRecommendTestsPrompt.d.ts +1 -1
  12. package/build/prompts/test-recommendation/registerRecommendTestsPrompt.js +2 -2
  13. package/build/prompts/testbot/testbot-prompts.d.ts +1 -1
  14. package/build/prompts/testbot/testbot-prompts.js +4 -7
  15. package/build/recommendation/answers.d.ts +17 -52
  16. package/build/recommendation/answers.js +29 -99
  17. package/build/recommendation/pullRequestText.d.ts +0 -2
  18. package/build/recommendation/pullRequestText.js +0 -16
  19. package/build/recommendation/registerPlan.d.ts +4 -7
  20. package/build/recommendation/registerPlan.js +11 -37
  21. package/build/recommendation/types.d.ts +4 -21
  22. package/build/recommendation/verifierContracts.d.ts +4 -4
  23. package/build/recommendation/verifierContracts.js +4 -4
  24. package/build/recommendation/verifiers/citedPath.d.ts +2 -2
  25. package/build/recommendation/verifiers/citedPath.js +2 -2
  26. package/build/recommendation/verifiers/issueTraceability.d.ts +5 -1
  27. package/build/recommendation/verifiers/issueTraceability.js +35 -4
  28. package/build/resources/analysisResources.d.ts +1 -1
  29. package/build/resources/analysisResources.js +1 -1
  30. package/build/resources/progressResource.d.ts +1 -1
  31. package/build/resources/sutSetupResource.d.ts +1 -1
  32. package/build/resources/sutSetupResource.js +1 -1
  33. package/build/resources/testbotResource.d.ts +1 -1
  34. package/build/resources/testbotResource.js +1 -1
  35. package/build/services/AnalyticsService.d.ts +1 -1
  36. package/build/services/FleetExecutionService.d.ts +130 -0
  37. package/build/services/FleetExecutionService.js +391 -0
  38. package/build/services/ModularizationService.d.ts +1 -1
  39. package/build/services/TestExecutionService.d.ts +7 -0
  40. package/build/services/TestExecutionService.js +21 -0
  41. package/build/services/TestGenerationService.d.ts +1 -1
  42. package/build/tool-phases.js +2 -0
  43. package/build/tools/auth/loginTool.d.ts +1 -1
  44. package/build/tools/auth/loginTool.js +2 -2
  45. package/build/tools/auth/logoutTool.d.ts +1 -1
  46. package/build/tools/auth/logoutTool.js +2 -2
  47. package/build/tools/code-refactor/alignAssertionsTool.d.ts +1 -1
  48. package/build/tools/code-refactor/alignAssertionsTool.js +1 -1
  49. package/build/tools/code-refactor/assertionSkillTools.d.ts +1 -1
  50. package/build/tools/code-refactor/assertionSkillTools.js +2 -2
  51. package/build/tools/code-refactor/codeReuseTool.d.ts +1 -1
  52. package/build/tools/code-refactor/codeReuseTool.js +2 -2
  53. package/build/tools/code-refactor/enhanceAssertionsTool.d.ts +1 -1
  54. package/build/tools/code-refactor/enhanceAssertionsTool.js +1 -1
  55. package/build/tools/code-refactor/modularizationTool.d.ts +1 -1
  56. package/build/tools/code-refactor/modularizationTool.js +2 -2
  57. package/build/tools/enrichTestWithMocksTool.d.ts +1 -1
  58. package/build/tools/enrichTestWithMocksTool.js +2 -2
  59. package/build/tools/executeFleetTool.d.ts +28 -0
  60. package/build/tools/executeFleetTool.js +107 -0
  61. package/build/tools/executeSkyrampTestTool.d.ts +8 -5
  62. package/build/tools/executeSkyrampTestTool.js +5 -5
  63. package/build/tools/fixErrorTool.d.ts +1 -1
  64. package/build/tools/fixErrorTool.js +1 -1
  65. package/build/tools/generate-tests/batchMockGenerationTool.d.ts +6 -57
  66. package/build/tools/generate-tests/batchMockGenerationTool.js +3 -3
  67. package/build/tools/generate-tests/generateBatchScenarioRestTool.d.ts +9 -45
  68. package/build/tools/generate-tests/generateBatchScenarioRestTool.js +29 -11
  69. package/build/tools/generate-tests/generateContractRestTool.d.ts +1 -2
  70. package/build/tools/generate-tests/generateContractRestTool.js +1 -1
  71. package/build/tools/generate-tests/generateE2ERestTool.d.ts +1 -2
  72. package/build/tools/generate-tests/generateE2ERestTool.js +1 -1
  73. package/build/tools/generate-tests/generateFuzzRestTool.d.ts +1 -1
  74. package/build/tools/generate-tests/generateFuzzRestTool.js +1 -1
  75. package/build/tools/generate-tests/generateIntegrationRestTool.d.ts +1 -2
  76. package/build/tools/generate-tests/generateIntegrationRestTool.js +1 -1
  77. package/build/tools/generate-tests/generateLoadRestTool.d.ts +1 -2
  78. package/build/tools/generate-tests/generateLoadRestTool.js +2 -1
  79. package/build/tools/generate-tests/generateMockRestTool.d.ts +1 -2
  80. package/build/tools/generate-tests/generateMockRestTool.js +3 -3
  81. package/build/tools/generate-tests/generateSmokeRestTool.d.ts +1 -1
  82. package/build/tools/generate-tests/generateSmokeRestTool.js +1 -1
  83. package/build/tools/generate-tests/generateUILoadRestTool.d.ts +64 -0
  84. package/build/tools/generate-tests/generateUILoadRestTool.js +512 -0
  85. package/build/tools/generate-tests/generateUIRestTool.d.ts +6 -7
  86. package/build/tools/generate-tests/generateUIRestTool.js +1 -1
  87. package/build/tools/generate-tests/loadTestSchema.d.ts +15 -15
  88. package/build/tools/generate-tests/trace-reuse-guard.d.ts +1 -1
  89. package/build/tools/generateEnrichedIntegrationTestTool.d.ts +1 -2
  90. package/build/tools/generateEnrichedIntegrationTestTool.js +1 -1
  91. package/build/tools/localDevWorkerComposeTool.d.ts +1 -1
  92. package/build/tools/localDevWorkerComposeTool.js +2 -2
  93. package/build/tools/one-click/oneClickTool.d.ts +1 -1
  94. package/build/tools/one-click/oneClickTool.js +1 -1
  95. package/build/tools/preflightMockCheckTool.d.ts +1 -1
  96. package/build/tools/preflightMockCheckTool.js +3 -3
  97. package/build/tools/queryProxyMocksTool.d.ts +1 -1
  98. package/build/tools/queryProxyMocksTool.js +3 -3
  99. package/build/tools/submitReportTool.d.ts +111 -414
  100. package/build/tools/submitReportTool.js +154 -138
  101. package/build/tools/test-management/actionsTool.d.ts +1 -1
  102. package/build/tools/test-management/actionsTool.js +7 -7
  103. package/build/tools/test-management/analyzeChangesTool.d.ts +22 -118
  104. package/build/tools/test-management/analyzeChangesTool.js +4 -4
  105. package/build/tools/test-management/analyzeTestHealthTool.d.ts +1 -1
  106. package/build/tools/test-management/analyzeTestHealthTool.js +4 -4
  107. package/build/tools/test-management/registerTestPlanTool.d.ts +111 -743
  108. package/build/tools/test-management/registerTestPlanTool.js +20 -36
  109. package/build/tools/test-management/resolveScreenTool.d.ts +1 -1
  110. package/build/tools/test-management/resolveScreenTool.js +6 -2
  111. package/build/tools/trace/startTraceCollectionTool.d.ts +1 -1
  112. package/build/tools/trace/startTraceCollectionTool.js +4 -4
  113. package/build/tools/trace/stopTraceCollectionTool.d.ts +1 -1
  114. package/build/tools/trace/stopTraceCollectionTool.js +2 -2
  115. package/build/tools/verifyTestDependenciesTool.d.ts +1 -1
  116. package/build/tools/verifyTestDependenciesTool.js +1 -1
  117. package/build/tools/workspace/initScanWorkspaceTool.d.ts +1 -1
  118. package/build/tools/workspace/initScanWorkspaceTool.js +1 -1
  119. package/build/tools/workspace/initializeWorkspaceTool.d.ts +1 -1
  120. package/build/tools/workspace/initializeWorkspaceTool.js +1 -1
  121. package/build/types/RepositoryAnalysis.d.ts +164 -1170
  122. package/build/types/RepositoryAnalysis.js +12 -10
  123. package/build/types/StepMethod.d.ts +24 -1
  124. package/build/types/StepMethod.js +1 -1
  125. package/build/types/TestTypes.d.ts +34 -133
  126. package/build/types/TestTypes.js +3 -3
  127. package/build/types/TestbotReport.d.ts +37 -0
  128. package/build/types/TestbotReport.js +22 -0
  129. package/build/types/index.d.ts +1 -1
  130. package/build/types/index.js +1 -1
  131. package/build/utils/docker.d.ts +29 -7
  132. package/build/utils/docker.js +83 -27
  133. package/build/utils/initAgent.d.ts +3 -3
  134. package/build/utils/initAgent.js +58 -26
  135. package/build/utils/progress.d.ts +3 -4
  136. package/build/utils/progress.js +4 -4
  137. package/build/utils/utils.d.ts +1 -1
  138. package/build/utils/versions.d.ts +3 -3
  139. package/build/utils/versions.js +1 -1
  140. package/build/workspace/workspace.d.ts +117 -538
  141. package/build/workspace/workspace.js +2 -2
  142. package/package.json +6 -5
  143. package/plugin/prompts/testbot-task1.md +1 -1
  144. package/plugin/skills/repair-staged-files/SKILL.md +17 -0
  145. package/build/recommendation/blockerProbes.d.ts +0 -13
  146. package/build/recommendation/blockerProbes.js +0 -91
  147. package/build/recommendation/blockers.d.ts +0 -65
  148. 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, } from "../../recommendation/registerPlan.js";
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: z.ZodIssueCode.custom,
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: z.ZodIssueCode.custom,
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: z.ZodIssueCode.custom,
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: z.ZodIssueCode.custom,
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: z.ZodIssueCode.custom,
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: z.ZodIssueCode.custom,
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: z.ZodIssueCode.custom,
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 two ways: a planned test that cites it in `defects` and expects to fail, or a `maintains` entry that cites it because your edit to an existing test covers it. A service that is down does not stop the test: write it, and it runs once the service is back. 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."),
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: z.ZodIssueCode.custom,
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: blockerSchema.optional().describe(BLOCKER_DESCRIPTION),
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
- /** The blockers this registration is judged on: the ones it sends AND the ones the
799
- * stored plan carries. A carried close is re-probed on every registration — the
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 [listings, checks] = await Promise.all([
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, blockersToProbe(registration, fullState.plan)), fullState.plan);
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/sdk/server/mcp.js";
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, { description: DESCRIPTION, inputSchema, outputSchema }, async (params) => {
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/sdk/server/mcp.js";
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, extra) => {
101
+ }, async (params, ctx) => {
102
102
  let errorResult;
103
103
  // Helper to send progress notifications to the MCP client
104
- const sendProgress = makeProgressReporter(extra);
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/sdk/server/mcp.js";
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/sdk/server/mcp.js";
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.shape,
17
+ inputSchema: schema,
18
18
  _meta: {
19
19
  keywords: [
20
20
  "dependencies",
@@ -1,4 +1,4 @@
1
- import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
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.shape,
36
+ inputSchema: initScanWorkspaceSchema,
37
37
  }, async (params) => {
38
38
  let errorResult;
39
39
  const recordParams = {
@@ -1,2 +1,2 @@
1
- import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
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.shape,
114
+ inputSchema: initializeWorkspaceSchema,
115
115
  _meta: {
116
116
  keywords: [
117
117
  "initialize",