vibesketch.server

The FastAPI application behind vibe-sketch serve.

The API (/api): version and liveness, the document JSON schema and validation, the revisioned document store with import, report, render and export (vibesketch.server.documents), and the input writers. Each route mirrors an SDK call and a CLI command (AGENTS.md, ground rule 4). OpenAPI is served at /openapi.json, so a client can read the contract instead of guessing it. Everything else is the browser shell, served from its built bundle.

Functions

create_app([store, web_root])

Build the application.

web_bundle()

The built browser shell: VIBESKETCH_WEB_DIST, the package, or the checkout.

Classes

InputFileOut(*, name, media_type, content)

InputRequest(*, document[, job, species, ...])

Which input to write: a job of the document, or a species and a writer.

InputResponse(*, program, species, files)

ValidationReport(*, valid, errors)

Whether a document is valid, and every problem when it is not.

WriterInfo(*, name, description, tasks, fields)

vibesketch.server.create_app(store=None, *, web_root=None)

Build the application. One instance per server process.

store holds the documents (a fresh one by default); web_root is the built browser shell (found with web_bundle() by default).

Parameters:
  • store (Store | None)

  • web_root (Path | None)

Return type:

FastAPI

vibesketch.server.web_bundle()

The built browser shell: VIBESKETCH_WEB_DIST, the package, or the checkout.

Return type:

Path | None

Modules

documents

Document routes: create, read, edit, import, report, render, export, save.

store

The server's documents: in memory, revisioned, optionally backed by a file.