@cubis/foundry 0.3.75 → 0.3.76

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 (115) hide show
  1. package/README.md +98 -76
  2. package/dist/cli/commands/register.js +1 -1
  3. package/dist/cli/commands/register.js.map +1 -1
  4. package/dist/cli/core.js +348 -216
  5. package/dist/cli/core.js.map +1 -1
  6. package/dist/cli/init/execute.js +5 -7
  7. package/dist/cli/init/execute.js.map +1 -1
  8. package/dist/cli/workflows/commands.js +2 -2
  9. package/dist/cli/workflows/commands.js.map +1 -1
  10. package/package.json +4 -3
  11. package/src/cli/commands/register.ts +1 -1
  12. package/src/cli/core.ts +429 -267
  13. package/src/cli/init/execute.ts +5 -9
  14. package/src/cli/workflows/commands.ts +2 -2
  15. package/workflows/skills/_schema/skill-platform-attributes.json +7 -0
  16. package/workflows/skills/generated/skill-audit.json +11 -2
  17. package/workflows/skills/generated/skill-catalog.json +30 -4
  18. package/workflows/skills/skills_index.json +26 -0
  19. package/workflows/skills/stitch/SKILL.md +79 -0
  20. package/workflows/skills/stitch/evals/assertions.md +45 -0
  21. package/workflows/skills/stitch/evals/evals.json +68 -0
  22. package/workflows/skills/stitch/examples/01-new-screen.md +13 -0
  23. package/workflows/skills/stitch/examples/02-update-existing-screen.md +13 -0
  24. package/workflows/skills/stitch/examples/03-mobile-handoff.md +13 -0
  25. package/workflows/skills/stitch/examples/04-prompt-enhancement.md +21 -0
  26. package/workflows/skills/stitch/examples/05-design-sync-loop.md +16 -0
  27. package/workflows/skills/stitch/references/implementation-patterns.md +20 -0
  28. package/workflows/skills/stitch/references/platform-setup.md +46 -0
  29. package/workflows/skills/stitch/references/update-diff-workflow.md +23 -0
  30. package/workflows/workflows/agent-environment-setup/generated/route-manifest.json +15 -7
  31. package/workflows/workflows/agent-environment-setup/manifest.json +5 -0
  32. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/frontend-specialist.md +10 -2
  33. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/mobile-developer.md +6 -2
  34. package/workflows/workflows/agent-environment-setup/platforms/antigravity/rules/GEMINI.md +1 -0
  35. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/stitch/SKILL.md +87 -0
  36. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/stitch/evals/assertions.md +45 -0
  37. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/stitch/evals/evals.json +68 -0
  38. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/stitch/examples/01-new-screen.md +13 -0
  39. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/stitch/examples/02-update-existing-screen.md +13 -0
  40. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/stitch/examples/03-mobile-handoff.md +13 -0
  41. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/stitch/examples/04-prompt-enhancement.md +21 -0
  42. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/stitch/examples/05-design-sync-loop.md +16 -0
  43. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/stitch/references/implementation-patterns.md +20 -0
  44. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/stitch/references/platform-setup.md +46 -0
  45. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/stitch/references/update-diff-workflow.md +23 -0
  46. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/create.md +3 -2
  47. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/mobile.md +4 -3
  48. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/frontend-specialist.md +10 -2
  49. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/mobile-developer.md +6 -2
  50. package/workflows/workflows/agent-environment-setup/platforms/claude/rules/CLAUDE.md +1 -0
  51. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/skills_index.json +26 -0
  52. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/stitch/SKILL.md +93 -0
  53. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/stitch/evals/assertions.md +45 -0
  54. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/stitch/evals/evals.json +68 -0
  55. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/stitch/examples/01-new-screen.md +13 -0
  56. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/stitch/examples/02-update-existing-screen.md +13 -0
  57. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/stitch/examples/03-mobile-handoff.md +13 -0
  58. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/stitch/examples/04-prompt-enhancement.md +21 -0
  59. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/stitch/examples/05-design-sync-loop.md +16 -0
  60. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/stitch/references/implementation-patterns.md +20 -0
  61. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/stitch/references/platform-setup.md +46 -0
  62. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/stitch/references/update-diff-workflow.md +23 -0
  63. package/workflows/workflows/agent-environment-setup/platforms/claude/workflows/create.md +3 -2
  64. package/workflows/workflows/agent-environment-setup/platforms/claude/workflows/mobile.md +4 -3
  65. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/frontend-specialist.md +10 -2
  66. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/mobile-developer.md +6 -2
  67. package/workflows/workflows/agent-environment-setup/platforms/codex/rules/AGENTS.md +1 -0
  68. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/stitch/SKILL.md +87 -0
  69. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/stitch/evals/assertions.md +45 -0
  70. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/stitch/evals/evals.json +68 -0
  71. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/stitch/examples/01-new-screen.md +13 -0
  72. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/stitch/examples/02-update-existing-screen.md +13 -0
  73. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/stitch/examples/03-mobile-handoff.md +13 -0
  74. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/stitch/examples/04-prompt-enhancement.md +21 -0
  75. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/stitch/examples/05-design-sync-loop.md +16 -0
  76. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/stitch/references/implementation-patterns.md +20 -0
  77. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/stitch/references/platform-setup.md +46 -0
  78. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/stitch/references/update-diff-workflow.md +23 -0
  79. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/create.md +3 -2
  80. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/mobile.md +4 -3
  81. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/frontend-specialist.md +6 -2
  82. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/mobile-developer.md +6 -2
  83. package/workflows/workflows/agent-environment-setup/platforms/copilot/rules/copilot-instructions.md +1 -0
  84. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/skills_index.json +26 -0
  85. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/stitch/SKILL.md +92 -0
  86. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/stitch/evals/assertions.md +45 -0
  87. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/stitch/evals/evals.json +68 -0
  88. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/stitch/examples/01-new-screen.md +13 -0
  89. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/stitch/examples/02-update-existing-screen.md +13 -0
  90. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/stitch/examples/03-mobile-handoff.md +13 -0
  91. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/stitch/examples/04-prompt-enhancement.md +21 -0
  92. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/stitch/examples/05-design-sync-loop.md +16 -0
  93. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/stitch/references/implementation-patterns.md +20 -0
  94. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/stitch/references/platform-setup.md +46 -0
  95. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/stitch/references/update-diff-workflow.md +23 -0
  96. package/workflows/workflows/agent-environment-setup/platforms/copilot/workflows/create.md +3 -2
  97. package/workflows/workflows/agent-environment-setup/platforms/copilot/workflows/mobile.md +4 -3
  98. package/workflows/workflows/agent-environment-setup/platforms/gemini/rules/GEMINI.md +1 -0
  99. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/stitch/SKILL.md +87 -0
  100. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/stitch/evals/assertions.md +45 -0
  101. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/stitch/evals/evals.json +68 -0
  102. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/stitch/examples/01-new-screen.md +13 -0
  103. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/stitch/examples/02-update-existing-screen.md +13 -0
  104. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/stitch/examples/03-mobile-handoff.md +13 -0
  105. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/stitch/examples/04-prompt-enhancement.md +21 -0
  106. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/stitch/examples/05-design-sync-loop.md +16 -0
  107. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/stitch/references/implementation-patterns.md +20 -0
  108. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/stitch/references/platform-setup.md +46 -0
  109. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/stitch/references/update-diff-workflow.md +23 -0
  110. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/create.md +3 -2
  111. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/mobile.md +4 -3
  112. package/workflows/workflows/agent-environment-setup/shared/agents/frontend-specialist.md +10 -2
  113. package/workflows/workflows/agent-environment-setup/shared/agents/mobile-developer.md +6 -2
  114. package/workflows/workflows/agent-environment-setup/shared/workflows/create.md +3 -2
  115. package/workflows/workflows/agent-environment-setup/shared/workflows/mobile.md +4 -3
package/README.md CHANGED
@@ -16,7 +16,7 @@ Official install targets: `codex`, `antigravity`, `copilot`, `claude`, `gemini`.
16
16
 
17
17
  Skill install default is profile-based:
18
18
 
19
- - default profile: `core`
19
+ - default profile: `full`
20
20
  - add `--skill-profile web-backend` for broader web/backend stack
21
21
  - add `--all-skills` for full workflow + MCP catalog install
22
22
 
@@ -27,8 +27,8 @@ Skill install default is profile-based:
27
27
  - [Guided Init Wizard (`cbx init`)](#guided-init-wizard-cbx-init)
28
28
  - [Quickstarts](#quickstarts)
29
29
  - [Scope Model (Global vs Project)](#scope-model-global-vs-project)
30
- - [Credential Model (`cbx_config.json` only)](#credential-model-cbx_configjson-only)
31
- - [Postman and Stitch Setup Flows](#postman-and-stitch-setup-flows)
30
+ - [Credential Model (Metadata + Machine Vault)](#credential-model-metadata--machine-vault)
31
+ - [MCP Setup Flows](#mcp-setup-flows)
32
32
  - [MCP Placement Matrix](#mcp-placement-matrix)
33
33
  - [Command Reference](#command-reference)
34
34
  - [Full Cleanup (`cbx remove all`)](#full-cleanup-cbx-remove-all)
@@ -43,7 +43,7 @@ Skill install default is profile-based:
43
43
  - Codex callable wrapper skills ($workflow-_, $agent-_)
44
44
  - Platform rule files (`AGENTS.md`, `GEMINI.md`, etc.)
45
45
  - Engineering artifacts in workspace (`ENGINEERING_RULES.md`, `TECH.md`)
46
- - Managed MCP config for Postman and Stitch
46
+ - Managed MCP config for Postman, Stitch, and Playwright
47
47
 
48
48
  Generated rule files are intentionally route-first and lazy about skill loading:
49
49
 
@@ -76,7 +76,7 @@ Recommended environment setup:
76
76
 
77
77
  ```bash
78
78
  export POSTMAN_API_KEY_DEFAULT="<your-postman-api-key>"
79
- export STITCH_API_KEY_DEFAULT="<your-stitch-api-key>" # Antigravity StitchMCP only
79
+ export STITCH_API_KEY_DEFAULT="<your-stitch-api-key>"
80
80
  cbx workflows config keys persist-env --service all --scope global
81
81
  ```
82
82
 
@@ -94,8 +94,8 @@ Wizard flow:
94
94
  - Bundle selection
95
95
  - Multi-platform selection (`codex`, `antigravity`, `copilot`, `claude`, `gemini`)
96
96
  - Skills profile selection (`core`, `web-backend`, `full`)
97
- - MCP selection (`Cubis Foundry`, `Postman`, `Stitch`)
98
- - Separate scope selection for Skills and MCP (`project` or `global`)
97
+ - MCP selection (`Cubis Foundry`, `Postman`, `Stitch`, `Playwright`)
98
+ - Workspace-oriented install defaults (legacy `--skills-scope` / `--mcp-scope` flags are accepted for compatibility)
99
99
  - MCP runtime selection (`cbx mcp serve` local, Docker pull, Docker local build) when any MCP integration is enabled
100
100
  - Conditional Postman mode/key/workspace and Stitch key prompts
101
101
  - Final summary + confirmation
@@ -117,9 +117,7 @@ cbx init \
117
117
  --bundle agent-environment-setup \
118
118
  --platforms codex,antigravity,gemini \
119
119
  --skill-profile web-backend \
120
- --skills-scope project \
121
- --mcps cubis-foundry,postman,stitch \
122
- --mcp-scope global \
120
+ --mcps cubis-foundry,postman,stitch,playwright \
123
121
  --postman-mode minimal \
124
122
  --postman-workspace-id null \
125
123
  --mcp-runtime local
@@ -151,7 +149,7 @@ Important:
151
149
  cbx workflows install --platform antigravity --scope global --bundle agent-environment-setup --postman --postman-mode full
152
150
  ```
153
151
 
154
- This also manages default `StitchMCP` wiring for Antigravity.
152
+ Postman and Stitch both route through the Cubis Foundry MCP gateway on this platform as well.
155
153
 
156
154
  ### Copilot
157
155
 
@@ -173,13 +171,12 @@ cbx workflows install --platform gemini --scope global --bundle agent-environmen
173
171
 
174
172
  ## Scope Model (Global vs Project)
175
173
 
176
- Default install scope is `global`.
174
+ `cbx workflows install` defaults to `project`.
177
175
 
178
176
  Behavior:
179
177
 
180
- - Skills are installed in global platform skill directories.
181
- - Workflows and agents are installed in project paths for active workspace behavior.
182
- - Rule files remain workspace-oriented for current repo context.
178
+ - `--scope global` is accepted for compatibility on install, but workflow and rule placement is normalized to workspace-oriented behavior.
179
+ - `cbx workflows config`, `cbx mcp`, and credential/profile commands still support explicit global scope where applicable.
183
180
  - Engineering files (`ENGINEERING_RULES.md`, `TECH.md`) are workspace files.
184
181
 
185
182
  ### Where files go
@@ -213,19 +210,22 @@ Gemini CLI:
213
210
  - Project rules: `<workspace>/.gemini/GEMINI.md`
214
211
  - Global rules: `~/.gemini/GEMINI.md`
215
212
 
216
- ## Credential Model (`cbx_config.json` only)
213
+ ## Credential Model (Metadata + Machine Vault)
217
214
 
218
- `cbx_config.json` is the single supported credentials/config source.
215
+ Secrets are now machine-scoped only.
216
+
217
+ - `cbx_config.json` stores non-secret metadata such as active profile name, env-var alias, Postman workspace id, MCP URL, and runtime preferences.
218
+ - `~/.cbx/credentials.env` stores the actual Postman/Stitch API key values managed by the CLI.
219
+ - Generated runtime configs must never contain raw Postman bearer tokens or raw Stitch `X-Goog-Api-Key` values.
219
220
 
220
221
  Paths:
221
222
 
222
- - Global: `~/.cbx/cbx_config.json`
223
- - Project: `<workspace>/cbx_config.json`
223
+ - Global metadata: `~/.cbx/cbx_config.json`
224
+ - Project metadata: `<workspace>/cbx_config.json`
225
+ - Machine credential vault: `~/.cbx/credentials.env`
224
226
 
225
227
  ### Profile schema
226
228
 
227
- Postman and Stitch now support multiple named profiles with active selection.
228
-
229
229
  ```json
230
230
  {
231
231
  "postman": {
@@ -250,6 +250,7 @@ Postman and Stitch now support multiple named profiles with active selection.
250
250
  "mcpUrl": "https://stitch.googleapis.com/mcp"
251
251
  },
252
252
  "mcp": {
253
+ "server": "cubis-foundry",
253
254
  "runtime": "docker",
254
255
  "fallback": "local",
255
256
  "docker": {
@@ -263,7 +264,7 @@ Postman and Stitch now support multiple named profiles with active selection.
263
264
  }
264
265
  ```
265
266
 
266
- Inline keys are no longer allowed. Use env-var aliases only.
267
+ Inline keys are rejected on new writes and scrubbed during migration.
267
268
 
268
269
  ### List/Add/Use/Remove profiles
269
270
 
@@ -287,7 +288,7 @@ cbx workflows config keys migrate-inline --scope global --redact
287
288
  # Doctor check for inline keys / unsafe headers
288
289
  cbx workflows config keys doctor --scope global
289
290
 
290
- # Persist selected env aliases to ~/.cbx/credentials.env (mode 600)
291
+ # Persist selected env values into ~/.cbx/credentials.env (mode 600)
291
292
  cbx workflows config keys persist-env --service all --scope global
292
293
  ```
293
294
 
@@ -295,7 +296,7 @@ Alias commands are also available:
295
296
 
296
297
  - None. Use canonical `cbx workflows config keys ...` commands only.
297
298
 
298
- ## Postman and Stitch Setup Flows
299
+ ## MCP Setup Flows
299
300
 
300
301
  ### Interactive Postman workspace selection
301
302
 
@@ -305,21 +306,17 @@ cbx workflows install --platform codex --scope global --bundle agent-environment
305
306
 
306
307
  If active Postman env var (for example `POSTMAN_API_KEY_DEFAULT`) is available and `--yes` is not used, installer can show workspace chooser and save selected `workspaceId` in active Postman profile.
307
308
 
308
- `--postman` now installs side-by-side MCP topology by default:
309
+ `--postman` and `--stitch` now install gateway-backed MCP topology by default:
309
310
 
310
- - direct Postman MCP server (`postman`)
311
- - direct Stitch MCP server where applicable (`StitchMCP` for Antigravity)
312
- - local Foundry MCP command server (`cubis-foundry` via `cbx mcp serve --transport stdio --scope global`)
311
+ - register `cubis-foundry` as the client-facing MCP server for the selected platform
312
+ - expose `postman.*`, `stitch.*`, and status/catalog passthrough tools through that gateway
313
+ - remove legacy direct Postman/Stitch MCP entries and generated `.cbx/mcp/*/{postman,stitch}.json` artifacts when present
313
314
 
314
- `--postman` also installs the `postman` skill. Managed platform rules then treat Postman intent as route-first with optional skill priming:
315
+ `--postman` still installs the `postman` skill. `--stitch` now installs the canonical `stitch` skill. Managed platform rules route through those skills first when the prompt clearly targets those domains.
315
316
 
316
- - validate or search for the `postman` skill only when Postman intent is explicit or the route still needs domain context
317
- - load `skill_get "postman"` before execution only when that context is actually needed
318
- - use direct `postman` server tools for actual Postman collection/workspace/environment/run actions
319
- - keep Foundry `postman_*` tools limited to mode/status/default-workspace config
320
- - never auto-fallback from `runCollection` to `runMonitor`
321
- - recommend Postman CLI as the default secondary path after direct MCP execution fails
322
- - use monitor execution only when the user explicitly asks for monitor-based cloud execution
317
+ - `postman.*` and `stitch.*` execution should happen through Foundry passthrough tools, not direct standalone client wiring
318
+ - `cbx workflows config keys doctor` scans `cbx_config.json`, generated artifacts, and client runtime configs for leaked inline credentials
319
+ - `cbx workflows config keys migrate-inline` scrubs leaked inline keys, rewrites profiles to env aliases, and reapplies secure Foundry MCP wiring
323
320
 
324
321
  Quota-safe execution facts:
325
322
 
@@ -327,12 +324,6 @@ Quota-safe execution facts:
327
324
  - monitor usage is plan/billing usage and is consumed by request count, region count, and auth requests
328
325
  - monitor runtime caps are separate from monitor quota and do not imply quota is still available
329
326
 
330
- To opt out of Foundry MCP registration during install:
331
-
332
- ```bash
333
- cbx workflows install --platform codex --scope global --bundle agent-environment-setup --postman --postman-mode full --no-foundry-mcp
334
- ```
335
-
336
327
  ### Manual workspace ID
337
328
 
338
329
  ```bash
@@ -351,35 +342,37 @@ If config already exists and you want to overwrite saved values:
351
342
  cbx workflows install --platform codex --scope global --bundle agent-environment-setup --postman --postman-mode full --overwrite --yes
352
343
  ```
353
344
 
354
- ### StitchMCP (Antigravity)
345
+ ### Stitch on All Platforms
355
346
 
356
- Antigravity includes managed Stitch MCP support using active Stitch profile from `cbx_config.json`.
347
+ Stitch is supported on all active Foundry platforms: `codex`, `claude`, `copilot`, `gemini`, and `antigravity`.
357
348
 
358
- Default managed command template:
349
+ ```bash
350
+ cbx workflows install --platform codex --bundle agent-environment-setup --stitch --yes
351
+ cbx workflows install --platform claude --bundle agent-environment-setup --stitch --yes
352
+ cbx workflows install --platform copilot --bundle agent-environment-setup --stitch --yes
353
+ cbx workflows install --platform gemini --bundle agent-environment-setup --stitch --yes
354
+ cbx workflows install --platform antigravity --bundle agent-environment-setup --stitch --yes
355
+ ```
359
356
 
360
- ```json
361
- {
362
- "StitchMCP": {
363
- "$typeName": "exa.cascade_plugins_pb.CascadePluginCommandTemplate",
364
- "command": "npx",
365
- "args": [
366
- "-y",
367
- "mcp-remote",
368
- "https://stitch.googleapis.com/mcp",
369
- "--header",
370
- "X-Goog-Api-Key: ${STITCH_API_KEY_DEFAULT}"
371
- ],
372
- "env": {}
373
- }
374
- }
357
+ The selected client receives `cubis-foundry` MCP wiring, and Stitch access flows through the Foundry gateway plus the `stitch` skill. See `docs/stitch_mcp.md` for the platform details and workflow guidance.
358
+
359
+ ### Playwright
360
+
361
+ `--playwright` patches a `PlaywrightMCP` entry into the selected platform runtime target without requiring Postman credentials or a generated Postman MCP definition file.
362
+
363
+ ```bash
364
+ cbx workflows install --platform codex --bundle agent-environment-setup --playwright
375
365
  ```
376
366
 
377
- ## MCP Placement Matrix
367
+ Default managed URL:
378
368
 
379
- Managed MCP definition files (`.cbx/mcp/...`):
369
+ ```text
370
+ http://localhost:8931/mcp
371
+ ```
372
+
373
+ Playwright MCP patching is supported for Codex, Antigravity, Gemini CLI, Copilot, and Claude runtime targets.
380
374
 
381
- - Global scope: `~/.cbx/mcp/<platform>/postman.json`
382
- - Project scope: `<workspace>/.cbx/mcp/<platform>/postman.json`
375
+ ## MCP Placement Matrix
383
376
 
384
377
  Runtime target patching:
385
378
 
@@ -387,7 +380,7 @@ Codex:
387
380
 
388
381
  - Global MCP runtime target: `~/.codex/config.toml` (via `codex mcp add/remove`)
389
382
  - Project MCP runtime target: `<workspace>/.vscode/mcp.json`
390
- - Foundry side-by-side server id: `cubis-foundry` (command: `cbx mcp serve --transport stdio --scope <global|project>`)
383
+ - Foundry gateway server id: `cubis-foundry` (command: `cbx mcp serve --transport stdio --scope <global|project>`)
391
384
  - Install now pins scope explicitly (`global` or `project`) in this command.
392
385
  - When MCP runtime is set to `docker`, install points `cubis-foundry` at the local Docker endpoint (`http://127.0.0.1:3310/mcp`) instead of the stdio command.
393
386
 
@@ -395,16 +388,30 @@ Antigravity:
395
388
 
396
389
  - Global runtime target: `~/.gemini/settings.json` (`mcpServers`)
397
390
  - Project runtime target: `<workspace>/.gemini/settings.json` (`mcpServers`)
398
- - Foundry side-by-side server id: `cubis-foundry` (command template)
391
+ - Foundry gateway server id: `cubis-foundry` (command template)
399
392
  - Install now pins scope explicitly (`global` or `project`) in this command.
400
393
 
401
394
  Copilot:
402
395
 
403
396
  - Global runtime target: `~/.copilot/mcp-config.json` (`servers`)
404
397
  - Project runtime target: `<workspace>/.vscode/mcp.json` (`servers`)
405
- - Foundry side-by-side server id: `cubis-foundry` (stdio command server)
398
+ - Foundry gateway server id: `cubis-foundry` (stdio command server)
406
399
  - Install now pins scope explicitly (`global` or `project`) in this command.
407
400
 
401
+ Claude:
402
+
403
+ - Global runtime target: `~/.claude/mcp.json` (`mcpServers`)
404
+ - Project runtime target: `<workspace>/.mcp.json` (`mcpServers`)
405
+ - Foundry gateway server id: `cubis-foundry`
406
+
407
+ Gemini CLI:
408
+
409
+ - Global runtime target: `~/.gemini/settings.json` (`mcpServers`)
410
+ - Project runtime target: `<workspace>/.gemini/settings.json` (`mcpServers`)
411
+ - Foundry gateway server id: `cubis-foundry`
412
+
413
+ Legacy direct Postman/Stitch definitions under `.cbx/mcp/<platform>/` are cleanup targets only and are no longer the default install model.
414
+
408
415
  ## Command Reference
409
416
 
410
417
  ### Install / Remove / Doctor / Rule Sync
@@ -413,7 +420,7 @@ Copilot:
413
420
  cbx workflows install --platform <codex|antigravity|copilot|claude|gemini> --bundle agent-environment-setup
414
421
  cbx workflows remove <bundle-or-workflow> --platform <platform>
415
422
  cbx workflows remove-all --scope <project|global|all> --platform <platform|all>
416
- cbx workflows prune-skills --platform <platform> --scope <project|global> --skill-profile <core|web-backend|full> [--include-mcp] [--dry-run]
423
+ cbx workflows prune-skills --platform <platform> --scope <project|global> --skill-profile <core|web-backend|full> [--dry-run]
417
424
  cbx workflows doctor --platform <platform> --scope <project|global>
418
425
  cbx workflows sync-rules --platform <platform> --scope <project|global>
419
426
  ```
@@ -542,16 +549,13 @@ Context budget reporting (from MCP skill tools):
542
549
  Install profile flags:
543
550
 
544
551
  ```bash
545
- # default core profile (workflow skills only)
552
+ # default full profile
546
553
  cbx workflows install --platform codex --bundle agent-environment-setup
547
554
 
548
555
  # expanded workflow profile
549
556
  cbx workflows install --platform codex --bundle agent-environment-setup --skill-profile web-backend
550
557
 
551
- # include MCP catalog with profile
552
- cbx workflows install --platform codex --bundle agent-environment-setup --skill-profile web-backend --include-mcp
553
-
554
- # full workflow + MCP catalogs
558
+ # explicit full profile
555
559
  cbx workflows install --platform codex --bundle agent-environment-setup --all-skills
556
560
  ```
557
561
 
@@ -627,8 +631,8 @@ What it removes (by scope/platform selection):
627
631
 
628
632
  - Generated workflows/agents/skills wrappers.
629
633
  - Managed rule blocks and generated engineering docs (`AGENTS.md`, `ENGINEERING_RULES.md`, `TECH.md`) where applicable.
630
- - Managed MCP definition files and runtime target entries.
631
- - Project/global `.cbx` state/config artifacts created by installer flows.
634
+ - Managed runtime target entries plus any legacy direct Postman/Stitch MCP definition files.
635
+ - Project/global `.cbx` metadata artifacts created by installer flows.
632
636
  - Optional global credentials file (`~/.cbx/credentials.env`) when `--include-credentials` is provided.
633
637
 
634
638
  To keep generated artifacts out of git in app repositories, add these ignore entries:
@@ -663,6 +667,17 @@ cbx workflows config --scope global --show
663
667
 
664
668
  Then confirm `status.postman.effectiveSource` is `env`.
665
669
 
670
+ ### `Stitch or Postman key leaked into cbx_config.json or client config`
671
+
672
+ Use the credential doctor and migration flow:
673
+
674
+ ```bash
675
+ cbx workflows config keys doctor --scope project
676
+ cbx workflows config keys migrate-inline --scope project
677
+ ```
678
+
679
+ This scans `cbx_config.json`, generated `.cbx/mcp` artifacts, `.vscode/mcp.json`, `.mcp.json`, `.gemini/settings.json`, `~/.copilot/mcp-config.json`, and `~/.codex/config.toml`, then scrubs inline keys and reapplies secure Foundry MCP wiring.
680
+
666
681
  ### `apiKeySource` looks unset even after export
667
682
 
668
683
  Use:
@@ -753,10 +768,12 @@ cbx workflows config --scope global --clear-workspace-id
753
768
 
754
769
  ### Behavior changes in this release
755
770
 
756
- - `cbx_config.json` is now the only supported config source for Postman/Stitch credentials.
771
+ - `cbx_config.json` is now metadata-only for Postman/Stitch; persisted secrets belong in `~/.cbx/credentials.env`.
757
772
  - Multi-profile key model added (`profiles[]` + `activeProfileName`).
758
773
  - `config keys` commands added (`list/add/use/remove`).
774
+ - `config keys doctor`, `migrate-inline`, and `persist-env` now enforce secure credential storage and cleanup.
759
775
  - `config --show` now reports stored vs effective auth source.
776
+ - Postman and Stitch client wiring now default to Cubis Foundry MCP gateway registration on every supported platform.
760
777
  - Install now defaults to indexed top-level all-skill install.
761
778
  - Nested duplicate skill directories are auto-cleaned during install.
762
779
  - Legacy aliases were removed (`skills`, root `install/init/platforms`, `workflows init`).
@@ -776,4 +793,9 @@ cbx workflows config --scope global --show
776
793
 
777
794
  - Postman API keys: <https://learning.postman.com/docs/developer/postman-api/authentication/>
778
795
  - Postman MCP setup: <https://learning.postman.com/docs/developer/postman-api/postman-mcp-server/set-up-postman-mcp-server>
796
+ - Stitch MCP upstream: <https://github.com/davideast/stitch-mcp>
797
+ - Codex MCP docs: <https://developers.openai.com/codex/mcp/>
798
+ - Claude Code MCP docs: <https://docs.anthropic.com/en/docs/claude-code/mcp>
799
+ - Gemini CLI MCP docs: <https://github.com/google-gemini/gemini-cli/blob/main/docs/tools/mcp-server.md>
800
+ - VS Code / Copilot MCP docs: <https://code.visualstudio.com/docs/copilot/chat/mcp-servers>
779
801
  - Google Stitch MCP: <https://developers.google.com/stitch>
@@ -20,7 +20,7 @@ export function registerCommands(deps) {
20
20
  .option("--skill-profile <profile>", "skills profile: core|web-backend|full")
21
21
  .option("--skills-scope <scope>", "deprecated for init: installs are workspace-only")
22
22
  .option("--mcp-scope <scope>", "deprecated for init: MCP config installs in workspace scope")
23
- .option("--mcps <items>", "comma-separated MCP selections: cubis-foundry,postman,stitch")
23
+ .option("--mcps <items>", "comma-separated MCP selections: cubis-foundry,postman,stitch,playwright")
24
24
  .option("--postman-mode <mode>", "Postman mode: full|minimal")
25
25
  .option("--postman-workspace-id <id|null>", "optional: set default Postman workspace ID (use 'null' for no default)")
26
26
  .option("--mcp-runtime <runtime>", "MCP runtime: docker|local")
@@ -1 +1 @@
1
- {"version":3,"file":"register.js","sourceRoot":"","sources":["../../../src/cli/commands/register.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOpC,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AA4B7D,MAAM,UAAU,gBAAgB,CAAC,IAAyB;IACxD,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;IAC9B,OAAO;SACJ,IAAI,CAAC,KAAK,CAAC;SACX,WAAW,CAAC,4DAA4D,CAAC;SACzE,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAE5B,OAAO;SACJ,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,uCAAuC,CAAC;SACpD,MAAM,CAAC,WAAW,EAAE,gDAAgD,CAAC;SACrE,MAAM,CAAC,WAAW,EAAE,gDAAgD,CAAC;SACrE,MAAM,CAAC,aAAa,EAAE,0CAA0C,CAAC;SACjE,MAAM,CAAC,iBAAiB,EAAE,sCAAsC,CAAC;SACjE,MAAM,CAAC,qBAAqB,EAAE,oBAAoB,CAAC;SACnD,MAAM,CACL,qBAAqB,EACrB,oEAAoE,CACrE;SACA,MAAM,CACL,2BAA2B,EAC3B,uCAAuC,CACxC;SACA,MAAM,CACL,wBAAwB,EACxB,kDAAkD,CACnD;SACA,MAAM,CACL,qBAAqB,EACrB,6DAA6D,CAC9D;SACA,MAAM,CACL,gBAAgB,EAChB,8DAA8D,CAC/D;SACA,MAAM,CAAC,uBAAuB,EAAE,4BAA4B,CAAC;SAC7D,MAAM,CACL,kCAAkC,EAClC,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