Files
artcraft/.github/workflows
Tanish Manku 59a7cc5fb4 mcp: scaffold Worker, environment guardrails, fake-upstream skeleton, CI
Cloudflare Worker scaffold for the MCP server (Hono, TypeScript strict,
pnpm 11 via corepack, wrangler 4, vitest 4 in workerd).

- wrangler.toml declares local/preview/production; production alone pins
  https://api.storyteller.ai. Binding types are generated by `wrangler types`.
- src/config.ts parses the bindings and asserts the upstream-host
  invariant per environment; src/index.ts fails every request with a 500
  naming the mismatch if the invariant is violated.
- Guardrail tests: config invariant, wrangler.toml environment mapping,
  MCP_ENVIRONMENT referenced only in config.ts and never branched on,
  /healthz through the Worker entry.
- fake-upstream/: separate Worker (artcraft-api-fake) that will hold the
  ported fake API routes; eslint forbids imports across the boundary in
  both directions.
- .github/workflows/mcp.yml: typecheck, lint, format, test on mcp/**;
  production deploy skips with a notice until Cloudflare secrets exist.

pnpm check: typecheck, eslint, prettier, 28 tests passing.

Claude-Session: https://claude.ai/code/session_01H3gfN2NCx3hBXSrZXYHUQ3
2026-08-24 19:50:00 -07:00
..