Compose — run scripts in a page

A Vancetope page can run things, not just hold text. Drop a compose block into a page, write a script, and run it — it executes server-side in a fresh workspace and the result lands right back in the page. No terminal, no setup. And it’s the same block whatever the language: swap the task type and you’re running Shell, Python, JavaScript, R, LaTeX or an LLM call.

Shell

The simplest case: an exec task running a plain shell command.

Shell — 2 steps
A compose block holding a bash command
Step 1A tiny manifest: a scratch workspace and one exec task. Anything you'd type in a terminal goes here.
The shell block after running, showing its output
Step 2Hit Run. The command runs server-side in a fresh workspace and the output streams back — here the text it wrote to report.txt. Nothing ran in your browser.

Python

Same block, type: python — inline code (or a workspace file), the standard library, files it writes surfaced as outputs.

Python — 2 steps
A compose block holding Python code
Step 1Switch the task to python and write code — here a quick latency stat over a handful of samples.
The Python block after running, showing computed stats
Step 2Run it. Python executes in the workspace; the mean and standard deviation it wrote to stats.txt come back into the page.

LaTeX

type: tex-task imports a .tex document, typesets it, and hands back a PDF — rendered inline, right in the page.

LaTeX — 2 steps
A compose block that compiles LaTeX
Step 1Import a .tex file (vance:/hello.tex), a tex-task to compile it, and an export for the PDF.
The compiled PDF rendered in the page
Step 2Run it. LaTeX compiles server-side and the finished PDF renders inline in a viewer — no local TeX install.

An agent

The block can also hand a prompt to an agent: add a session (recipe arthur) and a type: agent task. The page kicks off a real agent turn and its answer comes back in place.

Agent — 2 steps
A compose block with a session and an agent task
Step 1A session (recipe arthur) plus a type: agent task with a prompt.
The agent's answer rendered in the page
Step 2Run it. A real agent turn runs in a fresh session; its answer lands back in the block.

Same idea, still more: the block also runs JavaScript (with a session, for tool calls) and R, and can carry state across runs. More to come.