mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-11-04 02:58:23 +09:00
Header rules previously accepted `null` values, which silently turned a rule into a header-removal instruction even though the settings UI only offers adding a string value or deleting a rule. Require a nonempty string throughout the SDK, Builder, CLI generator, and API contract. Expose configured rules to MCP through `list-response-headers`, `set-response-header`, and `delete-response-header`. Setting a rule adds or replaces the header for the same route and case-insensitive name; `/` and `/*` remain distinct. The Builder UI and MCP operations now share the same rule-key, edit, and Zod validation logic. The generated JSON Schema advertises the header-name pattern and nonempty value, while server-side Zod validation enforces route syntax, forbidden headers, duplicates, and total size. The generic `update-project-settings` operation still supports replacing the whole list. Validation: SDK, project-build runtime and MCP, CLI command and prebuild tests; SDK, Builder, project-build, CLI, and protocol typechecks; lint, package boundaries, generated API and docs checks. Local fixture sync against the development API is blocked by differing bundle versions; PR CI tests fixtures against its deployed Builder host.
Webstudio HTTP Client
Function-call client for Webstudio HTTP and TRPC APIs.
This package owns network details for Builder/project calls so callers do not need route URLs, TRPC procedure paths, auth header names, staged upload details, or response validation details.
- parsing Builder project URLs
- project bundle load/import helpers and sync bundle normalization
- staged uploads, asset uploads, and import-with-assets orchestration
- project API read/write helpers
- API compatibility headers and error messages
CLI command names, help text, manuals, and command-specific output formatting belong in the CLI package, not here.