TinkerIndustries

Turret

An Electron application that hosts Claude Code sessions, with modes.

A mode is a plain object registered when the app boots. It contributes five things to a session, and a session's mode is fixed for the life of that session.

What a mode contributes

ContributionWhat it is
ToolsHandlers that run inside the app's own process, built fresh for each session
External serversMCP servers the session should connect to, keyed by the name the model sees
PanesThe surfaces the mode may mount, declared up front so an address can be checked at registration
Prompt fragmentText appended to the system prompt, describing the kind of session this is
Settings schemaOne schema, used both to validate the stored file and to draw the settings screen

Coding

Claude Code against a working directory, in a terminal-style session. It mounts no pane and registers no external server. The CLI's own tools are its real surface, and what makes it different from a bare terminal is the orchestration layer: a coding session can spawn another session, send it a message and read its reply.

CAD

A viewer pane running OpenCascade as WebAssembly, alongside print-pipeline's own CAD tools. A session opens on a repository folder. Which of the design packages in that folder is on screen is chosen in the pane itself, at any point in the session, so it is session state rather than an answer frozen at creation.

Geometry is streamed from print-pipeline over its API. Turret never reads print-pipeline's store. The user marks faces and annotates views, and the model acts on what was marked.

Designing a part in CAD mode.

Game

A built game binary run as a child process and driven through tools: load, set state, step, observe, reset, checkpoint, restore, record a run and replay it. The session opens on a working directory the same way a coding session does, and which binary it runs is named later, once it has been built.

Building a game or an effect for game mode.

Panes

A pane holds live state and exchanges it with the mode's tools in both directions. A tool can publish into a pane, and a pane can answer a request for what it is currently showing.

No pane touches an Electron or a Node API. A pane is handed a host interface and calls that, so Electron can supply an IPC implementation and a browser can supply one over HTTP. Panes ship as their own package with React as a peer dependency, which is what lets print-pipeline's web interface mount the same pane Turret does.