@stackwright-pro/mcp 0.2.0-alpha.95 → 0.2.0-alpha.97

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/dist/server.mjs CHANGED
@@ -2705,7 +2705,8 @@ var MANIFEST_NAME_TO_PHASE = {
2705
2705
  "stackwright-pro-form-wizard-otter": "workflow",
2706
2706
  "stackwright-pro-geo-otter": "geo",
2707
2707
  "stackwright-pro-polish-otter": "polish",
2708
- "stackwright-services-otter": "services"
2708
+ "stackwright-services-otter": "services",
2709
+ "stackwright-pro-qa-otter": "qa"
2709
2710
  };
2710
2711
  function manifestNameToPhase(name) {
2711
2712
  return MANIFEST_NAME_TO_PHASE[name] ?? null;
@@ -2922,7 +2923,8 @@ var PHASE_ORDER = [
2922
2923
  "services",
2923
2924
  "pages",
2924
2925
  "dashboard",
2925
- "polish"
2926
+ "polish",
2927
+ "qa"
2926
2928
  ];
2927
2929
  var PHASE_ARTIFACT = {
2928
2930
  designer: "design-language.json",
@@ -2936,7 +2938,8 @@ var PHASE_ARTIFACT = {
2936
2938
  workflow: "workflow-config.json",
2937
2939
  services: "services-config.json",
2938
2940
  polish: "polish-manifest.json",
2939
- geo: "geo-manifest.json"
2941
+ geo: "geo-manifest.json",
2942
+ qa: "qa-findings.json"
2940
2943
  };
2941
2944
  var PHASE_TO_OTTER2 = {
2942
2945
  designer: "stackwright-pro-designer-otter",
@@ -2950,7 +2953,8 @@ var PHASE_TO_OTTER2 = {
2950
2953
  workflow: "stackwright-pro-form-wizard-otter",
2951
2954
  services: "stackwright-services-otter",
2952
2955
  polish: "stackwright-pro-polish-otter",
2953
- geo: "stackwright-pro-geo-otter"
2956
+ geo: "stackwright-pro-geo-otter",
2957
+ qa: "stackwright-pro-qa-otter"
2954
2958
  };
2955
2959
  function isValidPhase2(phase) {
2956
2960
  return PHASE_ORDER.includes(phase);
@@ -3494,7 +3498,10 @@ var PHASE_REQUIRED_KEYS = {
3494
3498
  workflow: ["version", "generatedBy"],
3495
3499
  services: ["version", "generatedBy", "flows"],
3496
3500
  polish: ["version", "generatedBy"],
3497
- geo: ["version", "generatedBy", "geoCollections"]
3501
+ geo: ["version", "generatedBy", "geoCollections"],
3502
+ // qa: skipped=true path only needs version+generatedBy+skipped;
3503
+ // skipped=false path also needs summary+findings — Zod validator enforces the conditional.
3504
+ qa: ["version", "generatedBy", "skipped"]
3498
3505
  };
3499
3506
  var PHASE_ARTIFACT_SCHEMA = {
3500
3507
  designer: JSON.stringify(
@@ -3784,6 +3791,41 @@ var PHASE_ARTIFACT_SCHEMA = {
3784
3791
  },
3785
3792
  null,
3786
3793
  2
3794
+ ),
3795
+ qa: JSON.stringify(
3796
+ {
3797
+ version: "1.0",
3798
+ generatedBy: "stackwright-pro-qa-otter",
3799
+ // skipped: true path — when dev server is unreachable at audit time
3800
+ // skipped: false path — full audit completed
3801
+ skipped: false,
3802
+ skipReason: null,
3803
+ wcagLevel: "<AA|AAA>",
3804
+ summary: {
3805
+ routesAudited: 3,
3806
+ serious: 0,
3807
+ moderate: 1,
3808
+ minor: 0
3809
+ },
3810
+ findings: [
3811
+ {
3812
+ id: "qa-001",
3813
+ route: "/dashboard",
3814
+ severity: "<serious|moderate|minor>",
3815
+ category: "<visual|a11y|design-contract|runtime>",
3816
+ finding: "Human-readable description of what was observed",
3817
+ evidence: {
3818
+ screenshot: ".stackwright/qa/screenshots/dashboard-light.png",
3819
+ consoleErrors: [],
3820
+ axeViolations: []
3821
+ },
3822
+ suggested_otters: ["stackwright-pro-theme-otter"],
3823
+ suggested_fix: "Specific, concrete next step the repair otter should take"
3824
+ }
3825
+ ]
3826
+ },
3827
+ null,
3828
+ 2
3787
3829
  )
3788
3830
  };
3789
3831
  function handleValidateArtifact(input) {
@@ -3924,6 +3966,40 @@ function handleValidateArtifact(input) {
3924
3966
  };
3925
3967
  }
3926
3968
  return { success: true };
3969
+ },
3970
+ // qa artifact — permissive validator: requires version + generatedBy + skipped.
3971
+ // When skipped=true: skipReason must be a string.
3972
+ // When skipped=false: findings must be an array and summary must be an object.
3973
+ qa: (artifact2) => {
3974
+ const skipped = artifact2["skipped"];
3975
+ if (typeof skipped !== "boolean") {
3976
+ return {
3977
+ success: false,
3978
+ error: { message: '"skipped" must be a boolean (true or false).' }
3979
+ };
3980
+ }
3981
+ if (skipped === true) {
3982
+ if (typeof artifact2["skipReason"] !== "string") {
3983
+ return {
3984
+ success: false,
3985
+ error: { message: 'When skipped=true, "skipReason" must be a string.' }
3986
+ };
3987
+ }
3988
+ return { success: true };
3989
+ }
3990
+ if (!Array.isArray(artifact2["findings"])) {
3991
+ return {
3992
+ success: false,
3993
+ error: { message: 'When skipped=false, "findings" must be an array.' }
3994
+ };
3995
+ }
3996
+ if (typeof artifact2["summary"] !== "object" || artifact2["summary"] === null) {
3997
+ return {
3998
+ success: false,
3999
+ error: { message: 'When skipped=false, "summary" must be an object.' }
4000
+ };
4001
+ }
4002
+ return { success: true };
3927
4003
  }
3928
4004
  };
3929
4005
  const zodValidator = PHASE_ZOD_VALIDATORS[phase];
@@ -4211,6 +4287,25 @@ var OTTER_WRITE_ALLOWLISTS = {
4211
4287
  { prefix: ".stackwright/artifacts/", suffix: ".json", description: "Polish artifact" },
4212
4288
  { prefix: "README.md", suffix: "", description: "Project README rewrite" }
4213
4289
  ],
4290
+ // QA otter writes ONLY to the qa/ directory and the qa-findings artifact.
4291
+ // It never writes .tsx, .ts, .yml, or .json outside these paths.
4292
+ "stackwright-pro-qa-otter": [
4293
+ {
4294
+ prefix: ".stackwright/artifacts/qa-findings.json",
4295
+ suffix: "",
4296
+ description: "QA findings artifact"
4297
+ },
4298
+ {
4299
+ prefix: ".stackwright/qa/",
4300
+ suffix: ".md",
4301
+ description: "QA report markdown"
4302
+ },
4303
+ {
4304
+ prefix: ".stackwright/qa/screenshots/",
4305
+ suffix: ".png",
4306
+ description: "Route screenshots for evidence"
4307
+ }
4308
+ ],
4214
4309
  // domain-expert-otter is a reader/answerer only — it writes via stackwright_pro_save_phase_answers,
4215
4310
  // not via safe_write. Entry required here because the MCP tool availability guard boilerplate
4216
4311
  // in its system prompt mentions stackwright_pro_safe_write (triggering the coherence test).
@@ -5481,7 +5576,7 @@ var _checksums = /* @__PURE__ */ new Map([
5481
5576
  ],
5482
5577
  [
5483
5578
  "stackwright-pro-dashboard-otter.json",
5484
- "e3b82555fcffbd77285bd304828814e9f9f7257130797c9de3785de97527668c"
5579
+ "19268b1ab423bfbb628ebfbc9f6767d5c0bfedd03963c6d445a2724a8bb78f9c"
5485
5580
  ],
5486
5581
  [
5487
5582
  "stackwright-pro-data-otter.json",
@@ -5505,19 +5600,23 @@ var _checksums = /* @__PURE__ */ new Map([
5505
5600
  ],
5506
5601
  [
5507
5602
  "stackwright-pro-geo-otter.json",
5508
- "ac440da786d8c5ab1feddbf861449c3be3a433a04370578e1b2d35bf6ae7a601"
5603
+ "eef152e5b58947c8eb1ffec2c37acffc39f84b61be4c6cb827310f052221935b"
5509
5604
  ],
5510
5605
  [
5511
5606
  "stackwright-pro-page-otter.json",
5512
- "b70bd6e5d2a40230f7c24ff4a6113585a1614e5b6a215ece2bd47ff053c30f58"
5607
+ "ddfa497a4d4980080fa2918aec4d6dfd78d5c28ec6426b4b52f4f26fccaddabb"
5513
5608
  ],
5514
5609
  [
5515
5610
  "stackwright-pro-polish-otter.json",
5516
- "48ef3cf7f29ac6b5e8ab2004d4d41e2fb899e781689178d3905993241c84095a"
5611
+ "5e6532c1fe0737ed83b1f46dd55642e1076adb6ef23d4de636523eb3d88d3087"
5612
+ ],
5613
+ [
5614
+ "stackwright-pro-qa-otter.json",
5615
+ "ecb1e76170723fce43f515044e304d9da32253dadecbf29bf08c90bb8f375f77"
5517
5616
  ],
5518
5617
  [
5519
5618
  "stackwright-pro-scaffold-otter.json",
5520
- "e8662b63bbc9ce38851d94f9656bbebefdb7843d038862adb9fde2c23f9e77c2"
5619
+ "96ac7754b54c15732206cd4d8043b558d0c465757a0bc70fae6b498d6f02f22a"
5521
5620
  ],
5522
5621
  [
5523
5622
  "stackwright-pro-theme-otter.json",
@@ -5538,6 +5637,7 @@ for (const [name, digest] of CANONICAL_CHECKSUMS) {
5538
5637
  );
5539
5638
  }
5540
5639
  }
5640
+ var CANONICAL_OTTERS = Object.freeze([...CANONICAL_CHECKSUMS.keys()]);
5541
5641
  var MAX_OTTER_BYTES = 1 * 1024 * 1024;
5542
5642
  function computeSha256(data) {
5543
5643
  return createHash4("sha256").update(data).digest("hex");
@@ -6973,6 +7073,7 @@ var package_default = {
6973
7073
  "@stackwright-pro/openapi": "workspace:*",
6974
7074
  "@stackwright-pro/pulse": "workspace:*",
6975
7075
  "@stackwright-pro/types": "workspace:*",
7076
+ "@stackwright/mcp": "0.6.0-alpha.1",
6976
7077
  "@types/js-yaml": "^4.0.9",
6977
7078
  "js-yaml": "^4.2.0",
6978
7079
  zod: "^4.4.3"
@@ -6992,7 +7093,7 @@ var package_default = {
6992
7093
  "test:coverage": "vitest run --coverage"
6993
7094
  },
6994
7095
  name: "@stackwright-pro/mcp",
6995
- version: "0.2.0-alpha.95",
7096
+ version: "0.2.0-alpha.97",
6996
7097
  description: "MCP tools for Stackwright Pro - Data Explorer, Security, ISR, and Dashboard generation",
6997
7098
  license: "SEE LICENSE IN LICENSE",
6998
7099
  main: "./dist/server.js",
@@ -7016,6 +7117,11 @@ var package_default = {
7016
7117
  types: "./dist/tools/type-schemas.d.ts",
7017
7118
  import: "./dist/tools/type-schemas.mjs",
7018
7119
  require: "./dist/tools/type-schemas.js"
7120
+ },
7121
+ "./pipeline-constants": {
7122
+ types: "./dist/pipeline-constants.d.ts",
7123
+ import: "./dist/pipeline-constants.mjs",
7124
+ require: "./dist/pipeline-constants.js"
7019
7125
  }
7020
7126
  },
7021
7127
  files: [
@@ -7027,6 +7133,20 @@ var package_default = {
7027
7133
  };
7028
7134
 
7029
7135
  // src/server.ts
7136
+ import {
7137
+ registerContentTypeTools,
7138
+ registerPageTools,
7139
+ registerSiteTools,
7140
+ registerProjectTools,
7141
+ registerGitOpsTools,
7142
+ registerBoardTools,
7143
+ registerCollectionTools,
7144
+ registerIntegrationTools,
7145
+ registerComposeTools,
7146
+ registerRenderTools,
7147
+ registerA11yTools,
7148
+ closeBrowser
7149
+ } from "@stackwright/mcp/register";
7030
7150
  var server = new McpServer({
7031
7151
  name: "stackwright-pro",
7032
7152
  version: package_default.version
@@ -7051,6 +7171,29 @@ registerGetSchemaTool(server);
7051
7171
  registerScaffoldCleanupTools(server);
7052
7172
  registerContrastTools(server);
7053
7173
  registerCompileTools(server);
7174
+ registerContentTypeTools(server);
7175
+ registerPageTools(server);
7176
+ registerSiteTools(server);
7177
+ registerProjectTools(server);
7178
+ registerGitOpsTools(server);
7179
+ registerBoardTools(server);
7180
+ registerCollectionTools(server);
7181
+ registerIntegrationTools(server);
7182
+ registerComposeTools(server);
7183
+ registerRenderTools(server);
7184
+ registerA11yTools(server);
7185
+ process.on("SIGINT", async () => {
7186
+ const forceExit = setTimeout(() => process.exit(1), 3e3);
7187
+ forceExit.unref();
7188
+ await closeBrowser();
7189
+ process.exit(0);
7190
+ });
7191
+ process.on("SIGTERM", async () => {
7192
+ const forceExit = setTimeout(() => process.exit(1), 3e3);
7193
+ forceExit.unref();
7194
+ await closeBrowser();
7195
+ process.exit(0);
7196
+ });
7054
7197
  async function main() {
7055
7198
  const pipelineGraph = loadPipelineGraph();
7056
7199
  const phasePosition = new Map(PHASE_ORDER.map((p, i) => [p, i]));