@cubis/foundry 0.3.69 → 0.3.70

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 (150) hide show
  1. package/dist/cli/core.js +95 -2
  2. package/dist/cli/core.js.map +1 -1
  3. package/dist/cli/init/execute.js +6 -4
  4. package/dist/cli/init/execute.js.map +1 -1
  5. package/dist/cli/init/prompts.js +5 -0
  6. package/dist/cli/init/prompts.js.map +1 -1
  7. package/mcp/src/cbxConfig/index.ts +6 -1
  8. package/mcp/src/cbxConfig/serviceConfig.ts +38 -3
  9. package/mcp/src/cbxConfig/types.ts +6 -0
  10. package/mcp/src/gateway/config.ts +69 -8
  11. package/mcp/src/gateway/manager.ts +17 -6
  12. package/mcp/src/gateway/types.ts +1 -1
  13. package/mcp/src/server.ts +7 -3
  14. package/mcp/src/tools/playwrightGetStatus.ts +60 -0
  15. package/mcp/src/tools/registry.test.ts +26 -8
  16. package/mcp/src/tools/registry.ts +27 -1
  17. package/mcp/src/upstream/passthrough.ts +29 -5
  18. package/package.json +1 -1
  19. package/src/cli/core.ts +100 -5
  20. package/src/cli/init/execute.ts +14 -5
  21. package/src/cli/init/prompts.ts +5 -0
  22. package/src/cli/init/types.ts +1 -1
  23. package/workflows/skills/generated/skill-catalog.json +806 -103
  24. package/workflows/skills/playwright-e2e/SKILL.md +21 -5
  25. package/workflows/skills/playwright-e2e/references/locator-trace-flake-checklist.md +28 -0
  26. package/workflows/skills/skills_index.json +802 -99
  27. package/workflows/workflows/agent-environment-setup/manifest.json +65 -9
  28. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/backend-specialist.md +6 -0
  29. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/code-archaeologist.md +7 -0
  30. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/database-architect.md +6 -0
  31. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/debugger.md +7 -0
  32. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/devops-engineer.md +6 -0
  33. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/documentation-writer.md +4 -0
  34. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/frontend-specialist.md +6 -0
  35. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/game-developer.md +1 -0
  36. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/mobile-developer.md +6 -0
  37. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/orchestrator.md +8 -0
  38. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/penetration-tester.md +4 -0
  39. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/performance-optimizer.md +4 -0
  40. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/product-manager.md +1 -0
  41. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/project-planner.md +8 -0
  42. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/qa-automation-engineer.md +1 -0
  43. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/researcher.md +5 -0
  44. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/security-auditor.md +6 -0
  45. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/seo-specialist.md +1 -0
  46. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/sre-engineer.md +6 -0
  47. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/test-engineer.md +5 -0
  48. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/validator.md +1 -0
  49. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/vercel-expert.md +1 -0
  50. package/workflows/workflows/agent-environment-setup/platforms/antigravity/rules/GEMINI.md +1 -1
  51. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/backend-specialist.md +6 -0
  52. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/code-archaeologist.md +7 -0
  53. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/database-architect.md +6 -0
  54. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/debugger.md +7 -0
  55. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/devops-engineer.md +6 -0
  56. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/documentation-writer.md +4 -0
  57. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/frontend-specialist.md +6 -0
  58. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/game-developer.md +1 -0
  59. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/mobile-developer.md +6 -0
  60. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/orchestrator.md +8 -0
  61. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/penetration-tester.md +4 -0
  62. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/performance-optimizer.md +4 -0
  63. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/product-manager.md +1 -0
  64. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/project-planner.md +8 -0
  65. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/qa-automation-engineer.md +1 -0
  66. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/researcher.md +5 -0
  67. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/security-auditor.md +6 -0
  68. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/seo-specialist.md +1 -0
  69. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/sre-engineer.md +6 -0
  70. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/test-engineer.md +5 -0
  71. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/validator.md +1 -0
  72. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/vercel-expert.md +1 -0
  73. package/workflows/workflows/agent-environment-setup/platforms/claude/rules/CLAUDE.md +77 -63
  74. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/playwright-e2e/SKILL.md +21 -5
  75. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/playwright-e2e/references/locator-trace-flake-checklist.md +28 -0
  76. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/skills_index.json +802 -99
  77. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/backend-specialist.md +6 -0
  78. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/code-archaeologist.md +7 -0
  79. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/database-architect.md +6 -0
  80. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/debugger.md +7 -0
  81. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/devops-engineer.md +6 -0
  82. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/documentation-writer.md +4 -0
  83. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/frontend-specialist.md +6 -0
  84. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/game-developer.md +1 -0
  85. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/mobile-developer.md +6 -0
  86. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/orchestrator.md +8 -0
  87. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/penetration-tester.md +4 -0
  88. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/performance-optimizer.md +4 -0
  89. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/product-manager.md +1 -0
  90. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/project-planner.md +8 -0
  91. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/qa-automation-engineer.md +1 -0
  92. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/researcher.md +5 -0
  93. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/security-auditor.md +6 -0
  94. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/seo-specialist.md +1 -0
  95. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/sre-engineer.md +6 -0
  96. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/test-engineer.md +5 -0
  97. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/validator.md +1 -0
  98. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/vercel-expert.md +1 -0
  99. package/workflows/workflows/agent-environment-setup/platforms/codex/rules/AGENTS.md +1 -1
  100. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/backend-specialist.md +5 -0
  101. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/code-archaeologist.md +5 -0
  102. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/database-architect.md +5 -0
  103. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/debugger.md +5 -0
  104. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/devops-engineer.md +5 -0
  105. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/documentation-writer.md +3 -0
  106. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/frontend-specialist.md +5 -0
  107. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/mobile-developer.md +5 -0
  108. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/orchestrator.md +6 -0
  109. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/penetration-tester.md +3 -0
  110. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/performance-optimizer.md +3 -0
  111. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/project-planner.md +6 -0
  112. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/researcher.md +3 -0
  113. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/security-auditor.md +5 -0
  114. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/sre-engineer.md +5 -0
  115. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/test-engineer.md +3 -0
  116. package/workflows/workflows/agent-environment-setup/platforms/copilot/rules/copilot-instructions.md +87 -82
  117. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/playwright-e2e/SKILL.md +21 -5
  118. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/playwright-e2e/references/locator-trace-flake-checklist.md +28 -0
  119. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/skills_index.json +802 -99
  120. package/workflows/workflows/agent-environment-setup/shared/agents/backend-specialist.md +6 -0
  121. package/workflows/workflows/agent-environment-setup/shared/agents/code-archaeologist.md +7 -0
  122. package/workflows/workflows/agent-environment-setup/shared/agents/database-architect.md +6 -0
  123. package/workflows/workflows/agent-environment-setup/shared/agents/debugger.md +7 -0
  124. package/workflows/workflows/agent-environment-setup/shared/agents/devops-engineer.md +6 -0
  125. package/workflows/workflows/agent-environment-setup/shared/agents/documentation-writer.md +4 -0
  126. package/workflows/workflows/agent-environment-setup/shared/agents/frontend-specialist.md +6 -0
  127. package/workflows/workflows/agent-environment-setup/shared/agents/game-developer.md +1 -0
  128. package/workflows/workflows/agent-environment-setup/shared/agents/mobile-developer.md +6 -0
  129. package/workflows/workflows/agent-environment-setup/shared/agents/orchestrator.md +8 -0
  130. package/workflows/workflows/agent-environment-setup/shared/agents/penetration-tester.md +4 -0
  131. package/workflows/workflows/agent-environment-setup/shared/agents/performance-optimizer.md +4 -0
  132. package/workflows/workflows/agent-environment-setup/shared/agents/product-manager.md +1 -0
  133. package/workflows/workflows/agent-environment-setup/shared/agents/project-planner.md +8 -0
  134. package/workflows/workflows/agent-environment-setup/shared/agents/qa-automation-engineer.md +1 -0
  135. package/workflows/workflows/agent-environment-setup/shared/agents/researcher.md +5 -0
  136. package/workflows/workflows/agent-environment-setup/shared/agents/security-auditor.md +6 -0
  137. package/workflows/workflows/agent-environment-setup/shared/agents/seo-specialist.md +1 -0
  138. package/workflows/workflows/agent-environment-setup/shared/agents/sre-engineer.md +6 -0
  139. package/workflows/workflows/agent-environment-setup/shared/agents/test-engineer.md +5 -0
  140. package/workflows/workflows/agent-environment-setup/shared/agents/validator.md +1 -0
  141. package/workflows/workflows/agent-environment-setup/shared/agents/vercel-expert.md +1 -0
  142. package/workflows/workflows/agent-environment-setup/shared/rules/STEERING.md +27 -4
  143. package/workflows/workflows/agent-environment-setup/shared/rules/overrides/antigravity.md +18 -3
  144. package/workflows/workflows/agent-environment-setup/shared/rules/overrides/claude.md +12 -4
  145. package/workflows/workflows/agent-environment-setup/shared/rules/overrides/codex.md +12 -2
  146. package/workflows/workflows/agent-environment-setup/shared/rules/overrides/copilot.md +13 -3
  147. package/workflows/skills/react-best-practices/docs/AGENTS.md +0 -2934
  148. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/react-best-practices/docs/AGENTS.md +0 -2934
  149. package/workflows/workflows/agent-environment-setup/platforms/copilot/rules/AGENTS.md +0 -25
  150. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/react-best-practices/docs/AGENTS.md +0 -2934
@@ -6,10 +6,11 @@ export function buildInitExecutionPlan({ selections, dryRun, overwrite, target,
6
6
  const wantsPostman = hasMcpSelection(selections.selectedMcps, "postman");
7
7
  const wantsStitch = hasMcpSelection(selections.selectedMcps, "stitch");
8
8
  const wantsFoundry = hasMcpSelection(selections.selectedMcps, "cubis-foundry");
9
+ const wantsPlaywright = hasMcpSelection(selections.selectedMcps, "playwright");
9
10
  for (const platform of selections.platforms) {
10
11
  const stitchSupported = platform === "antigravity";
11
12
  const stitchEnabled = wantsStitch && stitchSupported;
12
- const hasAnyMcp = wantsPostman || stitchEnabled || wantsFoundry;
13
+ const hasAnyMcp = wantsPostman || stitchEnabled || wantsFoundry || wantsPlaywright;
13
14
  const warnings = [];
14
15
  if (wantsStitch && !stitchSupported) {
15
16
  warnings.push(`Stitch is not supported on '${platform}'. It will be skipped for this platform.`);
@@ -26,10 +27,11 @@ export function buildInitExecutionPlan({ selections, dryRun, overwrite, target,
26
27
  target,
27
28
  postman: wantsPostman,
28
29
  stitch: stitchEnabled,
30
+ playwright: wantsPlaywright,
29
31
  stitchDefaultForAntigravity: false,
30
32
  mcpScope: selections.mcpScope,
31
33
  foundryMcp: wantsFoundry,
32
- mcpToolSync: wantsPostman || stitchEnabled,
34
+ mcpToolSync: wantsPostman || stitchEnabled || wantsPlaywright,
33
35
  mcpRuntime: hasAnyMcp ? selections.mcpRuntime : "local",
34
36
  mcpFallback: "local",
35
37
  mcpBuildLocal: hasAnyMcp ? selections.mcpBuildLocal : false,
@@ -58,10 +60,10 @@ export function formatInitSummary(selections) {
58
60
  `- Skill profile: ${selections.skillProfile}`,
59
61
  `- Skills scope: ${selections.skillsScope}`,
60
62
  `- MCP scope: ${selections.mcpScope}`,
61
- `- MCP runtime: ${selections.mcpRuntime}${selections.mcpRuntime === "docker" ? selections.mcpBuildLocal ? " (build local image)" : " (pull image)" : ""}`,
63
+ `- MCP runtime: ${selections.mcpRuntime}${selections.mcpRuntime === "docker" ? (selections.mcpBuildLocal ? " (build local image)" : " (pull image)") : ""}`,
62
64
  `- MCP selections: ${selections.selectedMcps.length > 0 ? selections.selectedMcps.join(", ") : "(none)"}`,
63
65
  `- Postman mode: ${postmanSelected ? selections.postmanMode : "(not selected)"}`,
64
- `- Postman workspace: ${postmanSelected ? selections.postmanWorkspaceId === null ? "null" : selections.postmanWorkspaceId : "(not selected)"}`,
66
+ `- Postman workspace: ${postmanSelected ? (selections.postmanWorkspaceId === null ? "null" : selections.postmanWorkspaceId) : "(not selected)"}`,
65
67
  ].join("\n");
66
68
  }
67
69
  //# sourceMappingURL=execute.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../src/cli/init/execute.ts"],"names":[],"mappings":"AAOA,SAAS,eAAe,CAAC,YAAyB,EAAE,KAAgB;IAClE,OAAO,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACtC,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,EACrC,UAAU,EACV,MAAM,EACN,SAAS,EACT,MAAM,GAMP;IACC,MAAM,SAAS,GAA4B,EAAE,CAAC;IAC9C,MAAM,YAAY,GAAG,eAAe,CAAC,UAAU,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;IACzE,MAAM,WAAW,GAAG,eAAe,CAAC,UAAU,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;IACvE,MAAM,YAAY,GAAG,eAAe,CAAC,UAAU,CAAC,YAAY,EAAE,eAAe,CAAC,CAAC;IAE/E,KAA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AAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE;QAC3J,qBAAqB,UAAU,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;QACzG,mBAAmB,eAAe,CAAC,CAAC,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC,gBAAgB,EAAE;QAChF,wBAAwB,eAAe,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,kBAAkB,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,gBAAgB,EAAE;KACjJ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
@@ -67,6 +67,11 @@ export async function promptInitMcpSelection(defaultMcps) {
67
67
  value: "stitch",
68
68
  checked: defaultMcps.includes("stitch"),
69
69
  },
70
+ {
71
+ name: "Playwright",
72
+ value: "playwright",
73
+ checked: defaultMcps.includes("playwright"),
74
+ },
70
75
  ],
71
76
  });
72
77
  }
@@ -1 +1 @@
1
- {"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../../src/cli/init/prompts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AASxE,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,EACrC,SAAS,EACT,aAAa,GAId;IACC,OAAO,MAAM,CAAC;QACZ,OAAO,EAAE,yBAAyB;QAClC,OAAO,EAAE,aAAa;QACtB,OAAO,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;YACpC,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,QAAQ;SAChB,CAAC,CAAC;KACJ,CAAC,CAAC;AACL,CAA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,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,OAAe;IACxD,MAAM,KAAK,GAAG,MAAM,QAAQ,CAAC;QAC3B,OAAO;QACP,IAAI,EAAE,GAAG;KACV,CAAC,CAAC;IACH,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IAC9C,OAAO,UAAU,IAAI,IAAI,CAAC;AAC5B,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAAC,OAAe;IAC/D,OAAO,OAAO,CAAC;QACb,OAAO,EAAE,GAAG,OAAO,mCAAmC;QACtD,OAAO,EAAE,IAAI;KACd,CAAC,CAAC;AACL,CAAC"}
@@ -5,6 +5,7 @@ export type {
5
5
  ConfigScope,
6
6
  PostmanConfig,
7
7
  StitchConfig,
8
+ PlaywrightConfig,
8
9
  CbxConfig,
9
10
  EffectiveConfig,
10
11
  } from "./types.js";
@@ -20,4 +21,8 @@ export {
20
21
  redactConfig,
21
22
  } from "./reader.js";
22
23
  export { writeConfigField, ensureConfigExists } from "./writer.js";
23
- export { parsePostmanState, parseStitchState } from "./serviceConfig.js";
24
+ export {
25
+ parsePostmanState,
26
+ parseStitchState,
27
+ parsePlaywrightState,
28
+ } from "./serviceConfig.js";
@@ -24,6 +24,8 @@ export interface CredentialServiceState {
24
24
 
25
25
  const DEFAULT_POSTMAN_URL = "https://mcp.postman.com/minimal";
26
26
  const DEFAULT_STITCH_URL = "https://stitch.googleapis.com/mcp";
27
+ const DEFAULT_PLAYWRIGHT_PORT = 8931;
28
+ const DEFAULT_PLAYWRIGHT_URL = `http://localhost:${DEFAULT_PLAYWRIGHT_PORT}/mcp`;
27
29
  const DEFAULT_PROFILE_NAME = "default";
28
30
  const DEFAULT_POSTMAN_ENV_VAR = "POSTMAN_API_KEY";
29
31
  const DEFAULT_STITCH_ENV_VAR = "STITCH_API_KEY";
@@ -33,7 +35,10 @@ function asRecord(value: unknown): Record<string, unknown> | null {
33
35
  return value as Record<string, unknown>;
34
36
  }
35
37
 
36
- function normalizeName(value: unknown, fallback = DEFAULT_PROFILE_NAME): string {
38
+ function normalizeName(
39
+ value: unknown,
40
+ fallback = DEFAULT_PROFILE_NAME,
41
+ ): string {
37
42
  const normalized = typeof value === "string" ? value.trim() : "";
38
43
  return normalized || fallback;
39
44
  }
@@ -114,7 +119,8 @@ export function parseStitchState(config: CbxConfig): CredentialServiceState {
114
119
  apiKeyEnvVar: normalizeEnvVar(profile.apiKeyEnvVar, fallbackEnvVar),
115
120
  url: normalizeOptionalString(profile.url),
116
121
  hasInlineApiKey:
117
- typeof profile.apiKey === "string" && profile.apiKey.trim().length > 0,
122
+ typeof profile.apiKey === "string" &&
123
+ profile.apiKey.trim().length > 0,
118
124
  });
119
125
  }
120
126
  } else if (asRecord(rawProfiles)) {
@@ -128,7 +134,8 @@ export function parseStitchState(config: CbxConfig): CredentialServiceState {
128
134
  apiKeyEnvVar: normalizeEnvVar(profile.apiKeyEnvVar, fallbackEnvVar),
129
135
  url: normalizeOptionalString(profile.url),
130
136
  hasInlineApiKey:
131
- typeof profile.apiKey === "string" && profile.apiKey.trim().length > 0,
137
+ typeof profile.apiKey === "string" &&
138
+ profile.apiKey.trim().length > 0,
132
139
  });
133
140
  }
134
141
  }
@@ -155,3 +162,31 @@ export function parseStitchState(config: CbxConfig): CredentialServiceState {
155
162
  useSystemGcloud: Boolean(section.useSystemGcloud),
156
163
  };
157
164
  }
165
+
166
+ export interface PlaywrightServiceState {
167
+ mcpUrl: string;
168
+ port: number;
169
+ }
170
+
171
+ export function parsePlaywrightState(
172
+ config: CbxConfig,
173
+ ): PlaywrightServiceState {
174
+ const section = asRecord(config.playwright) ?? {};
175
+ const portRaw =
176
+ typeof section.port === "number" ? section.port : DEFAULT_PLAYWRIGHT_PORT;
177
+ const port =
178
+ Number.isFinite(portRaw) && portRaw > 0 && portRaw < 65536
179
+ ? portRaw
180
+ : DEFAULT_PLAYWRIGHT_PORT;
181
+ const envPort = process.env.PLAYWRIGHT_MCP_PORT
182
+ ? Number(process.env.PLAYWRIGHT_MCP_PORT)
183
+ : undefined;
184
+ const effectivePort =
185
+ envPort && Number.isFinite(envPort) && envPort > 0 && envPort < 65536
186
+ ? envPort
187
+ : port;
188
+ const mcpUrl =
189
+ normalizeOptionalString(section.mcpUrl) ??
190
+ `http://localhost:${effectivePort}/mcp`;
191
+ return { mcpUrl, port: effectivePort };
192
+ }
@@ -31,9 +31,15 @@ export interface StitchConfig {
31
31
  profiles?: ServiceProfile[] | Record<string, ServiceProfile>;
32
32
  }
33
33
 
34
+ export interface PlaywrightConfig {
35
+ mcpUrl?: string;
36
+ port?: number;
37
+ }
38
+
34
39
  export interface CbxConfig {
35
40
  postman?: PostmanConfig;
36
41
  stitch?: StitchConfig;
42
+ playwright?: PlaywrightConfig;
37
43
  [key: string]: unknown;
38
44
  }
39
45
 
@@ -8,10 +8,12 @@ import type {
8
8
  ServiceProfile,
9
9
  PostmanConfig,
10
10
  StitchConfig,
11
+ PlaywrightConfig,
11
12
  } from "../cbxConfig/types.js";
12
13
  import type { UpstreamConfig, UpstreamProvider } from "./types.js";
13
14
 
14
15
  const STITCH_DEFAULT_MCP_URL = "https://stitch.googleapis.com/mcp";
16
+ const PLAYWRIGHT_DEFAULT_PORT = 8931;
15
17
 
16
18
  interface ResolvedGatewayConfig {
17
19
  scope: ConfigScope | null;
@@ -87,7 +89,11 @@ function buildPostmanConfig(
87
89
  const profiles = normalizeProfiles(postman?.profiles);
88
90
  const active = selectActiveProfile(profiles, postman?.activeProfileName);
89
91
 
90
- const mcpUrl = firstString(postman?.mcpUrl, active?.profile.mcpUrl, active?.profile.url);
92
+ const mcpUrl = firstString(
93
+ postman?.mcpUrl,
94
+ active?.profile.mcpUrl,
95
+ active?.profile.url,
96
+ );
91
97
  if (!mcpUrl) {
92
98
  warnings.push("Postman MCP URL is not configured (postman.mcpUrl).");
93
99
  }
@@ -101,11 +107,15 @@ function buildPostmanConfig(
101
107
 
102
108
  const rawApiKeySet = !!firstString(active?.profile.apiKey);
103
109
  if (rawApiKeySet) {
104
- warnings.push("Postman profile apiKey is ignored; configure apiKeyEnvVar/tokenEnvVar alias instead.");
110
+ warnings.push(
111
+ "Postman profile apiKey is ignored; configure apiKeyEnvVar/tokenEnvVar alias instead.",
112
+ );
105
113
  }
106
114
 
107
115
  if (!authEnvVar) {
108
- warnings.push("Postman auth env var alias is missing (active profile apiKeyEnvVar/tokenEnvVar).");
116
+ warnings.push(
117
+ "Postman auth env var alias is missing (active profile apiKeyEnvVar/tokenEnvVar).",
118
+ );
109
119
  return {
110
120
  provider: "postman",
111
121
  mcpUrl,
@@ -155,15 +165,22 @@ function buildStitchConfig(
155
165
  firstString(stitch?.mcpUrl, active?.profile.mcpUrl, active?.profile.url) ??
156
166
  STITCH_DEFAULT_MCP_URL;
157
167
 
158
- const authEnvVar = firstString(active?.profile.apiKeyEnvVar, stitch?.apiKeyEnvVar);
168
+ const authEnvVar = firstString(
169
+ active?.profile.apiKeyEnvVar,
170
+ stitch?.apiKeyEnvVar,
171
+ );
159
172
 
160
173
  const rawApiKeySet = !!firstString(active?.profile.apiKey);
161
174
  if (rawApiKeySet) {
162
- warnings.push("Stitch profile apiKey is ignored; configure apiKeyEnvVar alias instead.");
175
+ warnings.push(
176
+ "Stitch profile apiKey is ignored; configure apiKeyEnvVar alias instead.",
177
+ );
163
178
  }
164
179
 
165
180
  if (!authEnvVar) {
166
- warnings.push("Stitch auth env var alias is missing (active profile apiKeyEnvVar).");
181
+ warnings.push(
182
+ "Stitch auth env var alias is missing (active profile apiKeyEnvVar).",
183
+ );
167
184
  return {
168
185
  provider: "stitch",
169
186
  mcpUrl,
@@ -200,6 +217,36 @@ function buildStitchConfig(
200
217
  };
201
218
  }
202
219
 
220
+ function buildPlaywrightConfig(
221
+ playwright: PlaywrightConfig | undefined,
222
+ scope: ConfigScope | null,
223
+ configPath: string | null,
224
+ ): UpstreamConfig {
225
+ const warnings: string[] = [];
226
+ const portRaw = playwright?.port ?? PLAYWRIGHT_DEFAULT_PORT;
227
+ const envPort = process.env.PLAYWRIGHT_MCP_PORT
228
+ ? Number(process.env.PLAYWRIGHT_MCP_PORT)
229
+ : undefined;
230
+ const effectivePort =
231
+ envPort && Number.isFinite(envPort) && envPort > 0 && envPort < 65536
232
+ ? envPort
233
+ : Number.isFinite(portRaw) && portRaw > 0 && portRaw < 65536
234
+ ? portRaw
235
+ : PLAYWRIGHT_DEFAULT_PORT;
236
+ const mcpUrl =
237
+ firstString(playwright?.mcpUrl) ?? `http://localhost:${effectivePort}/mcp`;
238
+
239
+ return {
240
+ provider: "playwright",
241
+ mcpUrl,
242
+ authHeader: {},
243
+ authEnvVar: null,
244
+ scope,
245
+ configPath,
246
+ warnings,
247
+ };
248
+ }
249
+
203
250
  export function resolveGatewayConfig(
204
251
  scope: ConfigScope | "auto" = "auto",
205
252
  ): ResolvedGatewayConfig {
@@ -230,6 +277,7 @@ export function resolveGatewayConfig(
230
277
  configPath: null,
231
278
  warnings: [warning],
232
279
  },
280
+ playwright: buildPlaywrightConfig(undefined, null, null),
233
281
  },
234
282
  };
235
283
  }
@@ -238,8 +286,21 @@ export function resolveGatewayConfig(
238
286
  scope: effective.scope,
239
287
  configPath: effective.path,
240
288
  providers: {
241
- postman: buildPostmanConfig(effective.config.postman, effective.scope, effective.path),
242
- stitch: buildStitchConfig(effective.config.stitch, effective.scope, effective.path),
289
+ postman: buildPostmanConfig(
290
+ effective.config.postman,
291
+ effective.scope,
292
+ effective.path,
293
+ ),
294
+ stitch: buildStitchConfig(
295
+ effective.config.stitch,
296
+ effective.scope,
297
+ effective.path,
298
+ ),
299
+ playwright: buildPlaywrightConfig(
300
+ effective.config.playwright,
301
+ effective.scope,
302
+ effective.path,
303
+ ),
243
304
  },
244
305
  };
245
306
  }
@@ -11,7 +11,12 @@ import type {
11
11
  UpstreamClientFactory,
12
12
  UpstreamCallResult,
13
13
  } from "./upstreamClient.js";
14
- import type { GatewayStatus, UpstreamProvider, UpstreamState, UpstreamTool } from "./types.js";
14
+ import type {
15
+ GatewayStatus,
16
+ UpstreamProvider,
17
+ UpstreamState,
18
+ UpstreamTool,
19
+ } from "./types.js";
15
20
 
16
21
  export interface GatewayManagerOptions {
17
22
  clientFactory?: UpstreamClientFactory;
@@ -72,13 +77,16 @@ function normalizeArgs(args: unknown): Record<string, unknown> {
72
77
 
73
78
  export class GatewayManager {
74
79
  private readonly clientFactory: UpstreamClientFactory;
75
- private readonly providerRuntime: Record<UpstreamProvider, ProviderRuntime> = {
76
- postman: { mcpUrl: null, headers: null, authEnvVar: null },
77
- stitch: { mcpUrl: null, headers: null, authEnvVar: null },
78
- };
80
+ private readonly providerRuntime: Record<UpstreamProvider, ProviderRuntime> =
81
+ {
82
+ postman: { mcpUrl: null, headers: null, authEnvVar: null },
83
+ stitch: { mcpUrl: null, headers: null, authEnvVar: null },
84
+ playwright: { mcpUrl: null, headers: null, authEnvVar: null },
85
+ };
79
86
  private readonly providerState: Record<UpstreamProvider, UpstreamState> = {
80
87
  postman: emptyProviderState("postman"),
81
88
  stitch: emptyProviderState("stitch"),
89
+ playwright: emptyProviderState("playwright"),
82
90
  };
83
91
 
84
92
  private scope: GatewayStatus["scope"] = null;
@@ -86,7 +94,8 @@ export class GatewayManager {
86
94
  private catalogDir = resolveCatalogDir(null, null);
87
95
 
88
96
  constructor(options?: GatewayManagerOptions) {
89
- this.clientFactory = options?.clientFactory ?? new SdkUpstreamClientFactory();
97
+ this.clientFactory =
98
+ options?.clientFactory ?? new SdkUpstreamClientFactory();
90
99
  }
91
100
 
92
101
  async initialize(): Promise<void> {
@@ -98,6 +107,7 @@ export class GatewayManager {
98
107
  await Promise.all([
99
108
  this.syncProvider("postman", resolved.providers.postman),
100
109
  this.syncProvider("stitch", resolved.providers.stitch),
110
+ this.syncProvider("playwright", resolved.providers.playwright),
101
111
  ]);
102
112
  }
103
113
 
@@ -114,6 +124,7 @@ export class GatewayManager {
114
124
  providers: {
115
125
  postman: this.providerState.postman,
116
126
  stitch: this.providerState.stitch,
127
+ playwright: this.providerState.playwright,
117
128
  },
118
129
  };
119
130
  }
@@ -4,7 +4,7 @@
4
4
 
5
5
  import type { ConfigScope } from "../cbxConfig/types.js";
6
6
 
7
- export type UpstreamProvider = "postman" | "stitch";
7
+ export type UpstreamProvider = "postman" | "stitch" | "playwright";
8
8
 
9
9
  export interface UpstreamTool {
10
10
  name: string;
package/mcp/src/server.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * Cubis Foundry MCP Server – server factory.
3
3
  *
4
4
  * Creates and configures the McpServer instance with built-in tools
5
- * (via declarative registry) plus dynamic Postman/Stitch passthrough namespaces.
5
+ * (via declarative registry) plus dynamic Postman/Stitch/Playwright passthrough namespaces.
6
6
  */
7
7
 
8
8
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
@@ -31,7 +31,7 @@ function toolCallErrorResult({
31
31
  namespacedName,
32
32
  error,
33
33
  }: {
34
- service: "postman" | "stitch";
34
+ service: "postman" | "stitch" | "playwright";
35
35
  namespacedName: string;
36
36
  error: unknown;
37
37
  }) {
@@ -101,7 +101,11 @@ export async function createServer({
101
101
  const dynamicSchema = z.object({}).passthrough();
102
102
  const registeredDynamicToolNames = new Set<string>();
103
103
 
104
- for (const catalog of [upstreamCatalogs.postman, upstreamCatalogs.stitch]) {
104
+ for (const catalog of [
105
+ upstreamCatalogs.postman,
106
+ upstreamCatalogs.stitch,
107
+ upstreamCatalogs.playwright,
108
+ ]) {
105
109
  for (const tool of catalog.tools) {
106
110
  const registrationNames = [
107
111
  tool.namespacedName,
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Cubis Foundry MCP Server – playwright_get_status tool.
3
+ *
4
+ * Returns the Playwright MCP upstream configuration status.
5
+ */
6
+
7
+ import { z } from "zod";
8
+ import {
9
+ parsePlaywrightState,
10
+ readEffectiveConfig,
11
+ } from "../cbxConfig/index.js";
12
+ import type { ConfigScope } from "../cbxConfig/types.js";
13
+ import { configNotFound } from "../utils/errors.js";
14
+
15
+ export const playwrightGetStatusName = "playwright_get_status";
16
+
17
+ export const playwrightGetStatusDescription =
18
+ "Get Playwright MCP upstream configuration status including URL and port.";
19
+
20
+ export const playwrightGetStatusSchema = z.object({
21
+ scope: z
22
+ .enum(["global", "project", "auto"])
23
+ .optional()
24
+ .describe(
25
+ "Config scope to read. Default: auto (project if exists, else global)",
26
+ ),
27
+ });
28
+
29
+ export function handlePlaywrightGetStatus(
30
+ args: z.infer<typeof playwrightGetStatusSchema>,
31
+ ) {
32
+ const scope = args.scope ?? "auto";
33
+ const effective = readEffectiveConfig(scope as ConfigScope | "auto");
34
+
35
+ if (!effective) {
36
+ configNotFound();
37
+ }
38
+
39
+ const playwright = parsePlaywrightState(effective.config);
40
+
41
+ return {
42
+ content: [
43
+ {
44
+ type: "text" as const,
45
+ text: JSON.stringify(
46
+ {
47
+ configured: Boolean(playwright.mcpUrl),
48
+ mcpUrl: playwright.mcpUrl,
49
+ port: playwright.port,
50
+ scope: effective.scope,
51
+ configPath: effective.path,
52
+ note: "Playwright MCP runs locally — no authentication required. Start with: npx @playwright/mcp --port <port>",
53
+ },
54
+ null,
55
+ 2,
56
+ ),
57
+ },
58
+ ],
59
+ };
60
+ }
@@ -42,9 +42,18 @@ function createTestContext(): ToolRuntimeContext {
42
42
  primarySkills: ["flutter-expert"],
43
43
  supportingSkills: [],
44
44
  artifacts: {
45
- codex: { workflowFile: "mobile.md", compatibilityAlias: "$workflow-mobile" },
46
- copilot: { workflowFile: "mobile.md", promptFile: "workflow-mobile.prompt.md" },
47
- antigravity: { workflowFile: "mobile.md", commandFile: "mobile.toml" },
45
+ codex: {
46
+ workflowFile: "mobile.md",
47
+ compatibilityAlias: "$workflow-mobile",
48
+ },
49
+ copilot: {
50
+ workflowFile: "mobile.md",
51
+ promptFile: "workflow-mobile.prompt.md",
52
+ },
53
+ antigravity: {
54
+ workflowFile: "mobile.md",
55
+ commandFile: "mobile.toml",
56
+ },
48
57
  claude: { workflowFile: "mobile.md" },
49
58
  },
50
59
  },
@@ -77,10 +86,11 @@ describe("tool registry", () => {
77
86
  expect(names).toContain("stitch_get_mode");
78
87
  expect(names).toContain("stitch_set_profile");
79
88
  expect(names).toContain("stitch_get_status");
89
+ expect(names).toContain("playwright_get_status");
80
90
  });
81
91
 
82
- it("has exactly 14 built-in tools", () => {
83
- expect(TOOL_REGISTRY).toHaveLength(14);
92
+ it("has exactly 15 built-in tools", () => {
93
+ expect(TOOL_REGISTRY).toHaveLength(15);
84
94
  });
85
95
 
86
96
  it("has no duplicate tool names", () => {
@@ -94,7 +104,9 @@ describe("tool registry", () => {
94
104
  expect(entry.name).toBeTruthy();
95
105
  expect(entry.description).toBeTruthy();
96
106
  expect(entry.schema).toBeTruthy();
97
- expect(entry.category).toMatch(/^(skill|route|postman|stitch)$/);
107
+ expect(entry.category).toMatch(
108
+ /^(skill|route|postman|stitch|playwright)$/,
109
+ );
98
110
  expect(typeof entry.createHandler).toBe("function");
99
111
  }
100
112
  });
@@ -128,7 +140,11 @@ describe("tool registry", () => {
128
140
  (t) => t.name === "skill_list_categories",
129
141
  )!;
130
142
  const handler = entry.createHandler(ctx);
131
- const result = (await handler({})) as {
143
+ const result = (await (
144
+ handler as unknown as (
145
+ args: Record<string, never>,
146
+ ) => Promise<{ content: Array<{ text: string }> }>
147
+ )({})) as {
132
148
  content: Array<{ text: string }>;
133
149
  };
134
150
  const data = JSON.parse(result.content[0].text);
@@ -137,15 +153,17 @@ describe("tool registry", () => {
137
153
 
138
154
  it("buildRegistrySummary produces correct structure", () => {
139
155
  const summary = buildRegistrySummary();
140
- expect(summary.totalTools).toBe(14);
156
+ expect(summary.totalTools).toBe(15);
141
157
  expect(summary.categories).toHaveProperty("route");
142
158
  expect(summary.categories).toHaveProperty("skill");
143
159
  expect(summary.categories).toHaveProperty("postman");
144
160
  expect(summary.categories).toHaveProperty("stitch");
161
+ expect(summary.categories).toHaveProperty("playwright");
145
162
  expect(summary.categories.route.tools).toHaveLength(1);
146
163
  expect(summary.categories.skill.tools).toHaveLength(7);
147
164
  expect(summary.categories.postman.tools).toHaveLength(3);
148
165
  expect(summary.categories.stitch.tools).toHaveLength(3);
166
+ expect(summary.categories.playwright.tools).toHaveLength(1);
149
167
  });
150
168
 
151
169
  it("each schema has a valid .shape property", () => {
@@ -19,7 +19,12 @@ import type { ConfigScope } from "../cbxConfig/types.js";
19
19
 
20
20
  // ─── Core types ─────────────────────────────────────────────
21
21
 
22
- export type ToolCategory = "skill" | "route" | "postman" | "stitch";
22
+ export type ToolCategory =
23
+ | "skill"
24
+ | "route"
25
+ | "postman"
26
+ | "stitch"
27
+ | "playwright";
23
28
 
24
29
  export interface ToolRegistryEntry {
25
30
  /** Tool name exposed to MCP clients. */
@@ -147,6 +152,13 @@ import {
147
152
  handleStitchGetStatus,
148
153
  } from "./stitchGetStatus.js";
149
154
 
155
+ import {
156
+ playwrightGetStatusName,
157
+ playwrightGetStatusDescription,
158
+ playwrightGetStatusSchema,
159
+ handlePlaywrightGetStatus,
160
+ } from "./playwrightGetStatus.js";
161
+
150
162
  // ─── Scope helper ───────────────────────────────────────────
151
163
 
152
164
  function withDefaultScope(
@@ -336,6 +348,20 @@ export const TOOL_REGISTRY: readonly ToolRegistryEntry[] = [
336
348
  >,
337
349
  ),
338
350
  },
351
+
352
+ // ── Playwright tools ──────────────────────────────────────
353
+ {
354
+ name: playwrightGetStatusName,
355
+ description: playwrightGetStatusDescription,
356
+ schema: playwrightGetStatusSchema,
357
+ category: "playwright",
358
+ createHandler: (ctx) => async (args) =>
359
+ handlePlaywrightGetStatus(
360
+ withDefaultScope(args, ctx.defaultConfigScope) as z.infer<
361
+ typeof playwrightGetStatusSchema
362
+ >,
363
+ ),
364
+ },
339
365
  ];
340
366
 
341
367
  // ─── Helpers ────────────────────────────────────────────────