Files
Oleg Isonen be74d8d698 fix: Validate response headers and expose MCP rule edits (#6444)
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.
2026-09-25 23:37:07 +02:00
..

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.