11 Commits
Author SHA1 Message Date
Oleg Isonen d291e4b671 feat: Builder api runtime contracts guardrails for MCP (#5857)
This PR expands Webstudio MCP and CLI into a more complete agent
authoring interface. Agents can discover project capabilities, edit real
Webstudio content, use data/resources, verify visual output, and report
useful issues when workflows fail.

## MCP User Capabilities

- Create, update, duplicate, reorder, and delete pages.
- Create pages from templates and manage reusable page templates.
- Inspect project pages, instances, props, styles, assets, variables,
resources, and metadata.
- Insert Webstudio components and authored JSX fragments into pages.
- Edit text, props, styles, breakpoints, design tokens, and CSS
variables.
- Update page metadata, SEO fields, redirects, marketplace metadata, and
project settings.
- Create and use static data variables.
- Create and use dynamic resources fetched over HTTP.
- Use REST, GraphQL, and built-in system resources in authored pages.
- Bind data variables and resources to visible page content.
- Create resource-backed pages such as sitemap XML, structured SEO data,
and API-driven content sections.
- Preview current project state without requiring a publish step.
- Capture screenshots for visual verification.
- Verify responsive designs across desktop, tablet, and mobile
breakpoints.
- Use screenshot diff and OCR-style checks to inspect rendered output.
- Reset and refresh local MCP project state when needed.
- Discover available CLI/MCP commands from generated manuals.
- Use clearer examples for resources, data variables, JSX authoring,
previewing, and visual checks.
- Read marketplace product metadata without requiring a full project
snapshot.
- Get safer guidance when using low-level patch tools.
- Get a ready-to-copy Discord report template when MCP/CLI behavior is
confusing or broken.
2026-07-10 02:13:22 +02:00
Oleg Isonen 1ddf6b02c9 feat: API and CLI for everything (#5838)
Closes #5287
2026-07-01 01:20:50 +02:00
Bogdan Chadkin d61945402c build: upgrade to typescript 5.6 (#4345)
Only some apis added to types.
2024-10-28 12:17:43 +03:00
Bogdan Chadkin 3ba82579bc refactor: simplify placeholders in CLI templates (#3663)
Here improved replacing placeholders in our templates. Before used some
relative path to stubs. Now use explicitly named placeholders like
`__CLIENT__`, `__SERVER__`, `__CSS__` and `__SITEMAP__`.

This will give more flexibility when support other frameworks, for
example vike.
2024-07-03 20:01:50 +03:00
Ivan Starkov ef81ccfafd fix: Resolve issue with script tag compilation in self-hosted Project Settings (#3483)
## Description

Corresponding SAAS PR
https://github.com/webstudio-is/webstudio-saas/pull/298
(Must be renamed to "release.staging" on release to allow testing)

closes #3378 

## Steps for reproduction

See fixtures now have working scripts.
Publish see saas supports script and language
https://rewrites.staging.webstudio.is/builder/f30da574-8022-433e-9a15-050792747b6f
.

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env` file
2024-06-05 09:53:43 +03:00
Bogdan Chadkin a9584b8435 refactor: drop tsconfig paths (#3256)
We use tsconfig paths option only to resolve single constants module. It
requires additional plugin in vite and all other tools. At least in
generated published sites it can be just dropped.

Moved __templates__/route-template.tsx to app/routes/template.tsx
2024-04-29 23:51:38 +04:00
Bogdan Chadkin bf0f4ae776 refactor: replace env.d.ts with tsconfig types (#3121)
Latest remix template stopped generating additional file for types.
2024-04-09 19:50:33 +07:00
Ivan Starkov 98c2226a8e Use eval to parse shared consts during prebuild, add windows support (#2315)
## Description

Read constants.mjs during prebuild step and use that constants. (need
for saas and other templates)

Fixes windows version of cli. Now everything works on windows platform
too.
Changes:
using `execa` instead of `exec`
using `import { fileURLToPath } from "node:url";` instead of
url.pathname
do not using `join` for import generation


<img width="975" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/761cd741-d609-48ef-a54a-027fe3f0d49f">
<img width="975" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/52c9f2d7-4389-4bb6-8fa7-5329a4b6d9c8">
<img width="972" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/cb5d2c1d-34d9-412d-942e-c78276c9dd6c">


## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-09-14 10:15:57 +03:00
Ivan Starkov 4b1ed5fc73 Make route-templates typeable (#2296)
## Description

Now route-templates is normal ts file. And can be typechecked

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-09-11 18:53:11 +03:00
Jaya Krishna Namburu fb60ff5d04 Add typecript typechecking for the cli (#2227)
## Description

This PR adds, typescript type checking for the cli, which runs in the CI
pipeline too.

## Code Review

- [ ] hi @TrySound , I need you to do
  - detailed review (read every line)
 
## Before requesting a review

- [x] made a self-review
2023-09-01 10:43:01 +02:00
Jaya Krishna Namburu 0e64ee80c8 Moving cli from apps folder into packages folder (#2198)
## Description

This PR moves the cli from `apps/cli` into `packages` folder. It was
initially started under `app/cli` from this
[comment](https://github.com/webstudio-is/webstudio-cli/pull/6#issuecomment-1657212350).
But looks like, `packages` is the good place for it.
2023-08-28 09:55:08 +02:00