quest'n'click 4.5.0 · r1

Built for quest'n'click 4.5.0, revision r1. Whether it is published, and which one is current, is recorded at publication.json.

Studio API

Français · Type: reference · Audience: author, contributor · Context: local Studio · Status: ready · Applies from: 4.4.0

The local Studio · contract: stable · verified by CI (support matrix of 4.4.0, 2026-10-23): Chromium end to end (the Studio's checks); Windows: the unit suite only · automated checks: jobs e2e, windows; CI plan e2e, windows; 2 test files · people's passes: studio-hero-matrix not run (#238) · known limits: hosted-only-routes

The Studio Server (hosted team Studio) · contract: experimental · verified by CI (support matrix of 4.4.0, 2026-10-23): Postgres, S3 and Keycloak in CI; Chromium and Firefox (job studio-hosted); WebKit on macOS, by hand only · automated checks: jobs studio-hosted, studio-install-smoke; CI plan studioHosted; 3 test files · people's passes: studio-hosted not run (#149), studio-collab not run (#150), studio-preview not run (#166), studio-assets-hosted not run (#167), studio-mcp-remote not run (#196), studio-oidc-generic not run (#197) · known limits: hosted-only-routes

The JSON API the Studio's page talks to: read the game, edit a room, run the checks. Each route below has its own section; link to it as studio.api.md#put-room-id-layout (the method and the path in lowercase, - between words).

Overview

The same operations as functions

The routes call the plain functions of studio-server/src/ops/core.ts, which the Vite plugin, the tests and the MCP server use too: gameInfo(), getRoom(id), setLayout(id, layout), setText(id, path, value), addEntity(id, e), getStoryboard(), setStoryboard(sb), exportStoryboardMarkdown(), getNotes(), addNote(n), editNote(id, { text, about? }), deleteNote(id), validate(), solve(from?), screenshot(room, checkpoint, devServerUrl) for the current game, and createStudio({ gameDir, root, importFresh }) for any other game folder.

Limit · hosted-only-routes This page covers the table both servers share and the dev server's own routes. The Studio Server's own routes (sessions and login, members and invitations, comments, builds and previews, its Assets routes, the journal's cursor /api/ops, the engine upgrade, the probes, /mcp) are not described here: see the hosted Studio's pages.

Texts

A string literal under defineRoom({...}) is a text, addressed by its JSON path, when the path ends in name, topic, toast, lines[n], say[1], shout[1], guide.say, choice[n].text, look.<id> or look.<id>[n], or when it is a bare string in a command list (do, once, then, else, cutscene, after, onEnter, or a branch of nth, cycle, random, parallel): those are hero lines. kind says which (name, look, say, hero, topic, hint, toast, choice, guide); who is the speaker of a say.

Serving

The Studio page is studio.html at the root of the engine (entry src/studio/main.ts). Any dev server serves it at /__studio/ (npm run dev too); npm run studio also opens it. A production build leaves it out unless STUDIO=1 (the demo mode). The Rooms tab shows /?edit=<room>&at=<checkpoint> in an iframe and talks to the editor through postMessage (placement editor). The Studio page ignores Vite's full reloads caused by the game's files: the engine view reloads, the Studio keeps what you are typing and follows the change through GET /events.

The game and its rooms

Read the game, read a room, and write a room's layout, texts, entities and structured values. Every write is one operation of the game's journal, guarded on the game as it would be after it.

GET /game

GET /room/:id

PUT /room/:id/layout

PUT /room/:id/text

POST /room/:id/add

PUT /room/:id/value

PUT /room/@game/value

Revisions and undo

What changed between two revisions of the journal, the rooms it names drawn at both, and the undo and redo of the Studio's own edits.

GET /diff/:from..:to

GET /diff/:from..:to/captures

POST /undo

POST /redo

GET /history

Storyboard, scenario map and notes

The storyboard (storyboard.json), the groupings of the scenario map (groupings.json) and the shared notes (notes.json) of the game folder.

GET /storyboard

PUT /storyboard

POST /storyboard/markdown

GET /groupings

PUT /groupings

GET /map

GET /notes

POST /notes

PUT /notes/:id

DELETE /notes/:id

Checks and views

The validator, the solver, the lint, the playtests, the coverage of the storyboard, the profiler, the world map, the puzzle graph and the game's IR: read-only, the game reloaded on each call. On the Studio Server, validate, solve, lint and playtests run on the processing worker.

POST /validate

POST /report

GET /graph

POST /puzzle

POST /coverage

POST /playtests

POST /lint

POST /solve

GET /ir

Voices and heroes

The voice table of each language (voices.json) and the hero × language matrix.

GET /voices[/:lang]

PUT /voices/:lang/:id

GET /voices/:lang/csv

GET /hero-matrix

Change feed and screenshots

The dev server's server-sent events and the room screenshots it renders.

POST /screenshot

GET /screenshots/:name

GET /events

Assets tab

Every image and sound of the game with where it is used, the art prompts per sheet, and the uploads. Nothing is ever deleted: a replaced file is first kept as <name>_v<N>.<ext> beside it. Since 4.2.1 every upload is one operation of the journal: the backups, the new files and the cells a tool cut are written together or not at all. A JSON body is 96 MiB at most (413 above). The Studio Server serves its own Assets routes (studio-server/src/server/hosted-assets.ts), not described here.

GET /assets

GET /assets/file/:path

GET /assets/prompts

POST /assets/sheet

POST /assets/cell

POST /assets/sound

POST /assets/decor

POST /assets/prepare

Assistant

The Studio's Assistant on the dev server: a conversation relayed to a chat model, and a task for an MCP-connected agent.

POST /assistant/chat

POST /assistant/task


Edit the source of this page · Report an error