Files
webstudio/packages/http-client
Oleg Isonen 2808f06808 feat: Improve MCP validation errors with actionable guidance (#5881)
## What changed

- Return structured validation issues with stable codes, complete field
paths, constraints, and minimal correction examples.
- Preserve validation details through the Builder API, CLI, MCP, local
project sessions, and tRPC errors.
- Explain invalid expressions, JSX fragments, page selectors, component
inputs, asset updates, and project settings in terms an agent can act
on.
- Remove stack frames and credentials from parser details before
exposing them.
- Keep concise human-readable errors while making the complete
structured issues available to agents.

## Why

Agents previously received vague errors without enough information to
repair a request. They could repeat the same invalid call or require
manual intervention.

## User impact

CLI and MCP agents can now identify the exact invalid field, understand
the constraint, see a valid example, and retry with a corrected request.

## Validation

- Focused runtime, MCP, CLI, API, and tRPC validation tests.
- Structured error propagation tests across local and server execution.
- Typechecks and generated contract verification.
2026-07-15 11:33:36 +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.