Server description (copied; language not verified)
Publish a self-contained HTML(+JS) or Markdown page as an artifact: a live page at a private URL that can be shared with a team, an org, or publicly, and that updates in place when published again. Pass artifact_id (or reuse the same name) to publish a new version. Returns the artifact id, url, and version.
## Before you write the page
Load the skill for what you are about to build, with whichever skill tool this session has (`skill_get`, `skill_use`, or `belt skill use infsh/<name>`):
- `belt-artifact-design` — always. Treatment, the injected design tokens, the three theme states, the traps that fail silently.
- `belt-artifact-capabilities` — when the page takes input, remembers anything, knows who is viewing, or shows a file stored beside it.
- `belt-artifact-diagrams` — when it has a flow, an architecture, a timeline or a chart.
They are the current version at all times. This description is only the contract.
## When to use an artifact
Use one when terminal text is the wrong medium: a dashboard from data you already pulled, a walkthrough of a change with annotated diffs, several options side by side, sliders to tune values, a checklist you keep updating while a long task runs, or anything a person will look at, interact with, or send to a teammate as a link. Don't use one for a short answer, a code snippet, or advice the user will act on immediately in the terminal.
## Page contract
- Write the PAGE CONTENT only. It is wrapped at publish time in <!doctype html> + <head> (charset, viewport, <title>, favicon, a reset, and the inference.sh design tokens) + <body>. Put your own <style> and <script> at the top of the content. A full document (starting with <!doctype> or <html>) is accepted too and keeps its own <head>.
- Everything must be self-contained: inline all CSS and JS, embed images as data: URIs, draw diagrams as mermaid, inline SVG or HTML/CSS. There is no backend, no routes, no relative links; use in-page anchors.
- CSP allowlist (enforced, failures are silent): external scripts ONLY from https://cdnjs.cloudflare.com, https://cdn.jsdelivr.net/npm/, https://cdn.tailwindcss.com, https://code.jquery.com; external stylesheets ONLY from https://fonts.googleapis.com with the font files they pull from https://fonts.gstatic.com. Every other host is blocked, and so is fetch/XHR/WebSocket to anywhere. Load libraries as pinned UMD builds, e.g. <script src="https://cdnjs.cloudflare.com/ajax/libs/react/18.3.1/umd/react.production.min.js"></script>, placed BEFORE the inline script that uses them.
- Size: the source must be under 16 MiB. Prefer SVG and CSS over embedded raster images; summarize large datasets instead of inlining them.
- Markdown: set type "markdown" for a document-shaped page; it is rendered with GitHub-flavored markdown and a readable default typography.
- Diagrams: a flow, sequence, state or class diagram can be written as mermaid — a ```mermaid fence in Markdown, or <pre class="mermaid">...</pre> in HTML. The renderer adds mermaid 11.15.0 and themes it from the design tokens, and only for a page that has one. Everything else is inline SVG or CSS.
- Title: a short, distinctive noun phrase (2-4 words) that names the page, not a summary and not a category label. Favicon: one or two emoji. Keep both stable across updates.
## Runtime capabilities
A page is static by default and cannot reach the network at all. Declare a capability at publish time and the page gets a window.inferencesh object. Declare only what the page actually calls; a page gets nothing it did not declare. Every call goes through the viewer's own session, so a page can only ever act as the person looking at it, and every call returns a promise that may reject.
- "db" gives the page its own small store, so it remembers what people do on it: a poll, a checklist, a sign-up sheet, notes people leave.
- "user" tells the page who is viewing: whether they are signed in, their name, their avatar, and whether they may edit. Never an email, never a creden… [server-provided text truncated]
Input schema (server-provided preview — do not copy)
{
"properties": {
"artifact_id": {
"description": "Existing artifact id/ref to update in place",
"type": "string"
},
"capabilities": {
"description": "Runtime capabilities the page may use. \"db\" gives it a small store so it remembers what people do on it; \"user\" tells it who is viewing; \"assets\" lets it show images, video, fonts or PDFs stored beside it rather than inlined. A page gets only what it declares, and reaches them through window.inferencesh.",
"items": {
"enum": [
"db",
"user",
"assets"
],
"type": "string"
},
"type": "array"
},
"content": {
"description": "Page source: HTML content (or full document) or Markdown. Self-contained.",
"type": "string"
},
"content_encoding": {
"description": "Set to \"base64\" and base64-encode content. Required in practice: the edge firewall rejects request bodies containing raw HTML tags such as <script>.",
"enum": [
"base64"
],
"type": "string"
},
"description": {
"description": "One sentence shown under the title",
"type": "string"
},
"favicon": {
"description": "One or two emoji used as the tab icon",
"type": "string"
},
"image": {
"description": "URL of a cover image for the gallery card and viewer header",
"type": "string"
},
"label": {
"description": "Optional label for this version",
"type": "string"
},
"name": {
"description": "Optional URL slug; derived from title when omitted",
"type": "string"
},
"title": {
"description": "Short distinctive name for the page (2-4 words)",
"type": "string"
},
"type": {
"default": "html",
"enum": [
"html",
"markdown"
],
"type": "string"
},
"visibility": {
"description": "Who can open the page (default private). Only widen when asked.",
"enum": [
"private",
"team",
"org",
"unlisted",
"public"
],
"type": "string"
}
},
"required": [
"content",
"title"
],
"type": "object"
}