# streamline.schema.json

> One personal streamline, as the app stores, imports and shares it (config-schema §10.1): the device file and the private file as one flat object, because on a personal device the person owns the instructions.

One personal streamline, as the app stores, imports and shares it (config-schema §10.1): the device file and the private file as one flat object, because on a personal device the person owns the instructions.

Raw file: https://streamliner.work/schema/v1/streamline.schema.json

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://streamliner.work/schema/v1/streamline.schema.json",
  "title": "*.streamline.json",
  "description": "One personal streamline, as the app stores, imports and shares it (config-schema §10.1): the device file and the private file as one flat object, because on a personal device the person owns the instructions. It never contains a key or a sign-in: the import refuses a file that looks like it holds one.",
  "type": "object",
  "required": ["name"],
  "additionalProperties": false,
  "properties": {
    "$schema": { "$ref": "defs.schema.json#/$defs/schemaRef" },
    "schema": { "const": "streamline.personal/1", "description": "`streamline.personal/1`. Another `streamline.personal/*` major is refused." },
    "id": { "$ref": "defs.schema.json#/$defs/kindId", "description": "`[a-z0-9_]{2,32}`; made from the name when absent. Importing a file with an existing id replaces that streamline (its key and chats stay)." },
    "name": { "type": "string", "minLength": 1, "maxLength": 60, "description": "Sidebar and chat header. The only required field." },
    "description": { "type": "string", "maxLength": 200, "description": "One line under the name." },
    "category": { "$ref": "defs.schema.json#/$defs/category", "title": "Category", "description": "Where the Library groups it (2026-10-20; config-schema §4): one of the ten Discover categories. Unset: Other. Information for owners and admins; it changes nothing in a chat." },
    "keywords": { "type": "array", "maxItems": 16, "uniqueItems": true, "items": { "type": "string", "minLength": 1, "maxLength": 40 }, "title": "Keywords", "description": "Words people use for this streamline (2026-10-16; config-schema §4, docs/plans/operator.md §7): a company, a system, a task, a nickname (Verizon, the POS, returns). The Operator matches on them, without regard to case. At most 16, each 1-40 characters. Public: they only describe the streamline. A keyword two streamlines share is allowed (the Operator asks which one; configcheck warns)." },
    "operatorAccess": { "type": "boolean", "default": true, "title": "Operator can ask this streamline", "description": "Whether the Operator may ask this streamline for the person (2026-10-16; config-schema §4). Default true: unset means it may. false: people open it themselves, with its full context; the Operator can still point to it, and the relay refuses a child request for it (403 operator_not_allowed). Not a security boundary: the person can open it with the same access, and the APIs remain the lock. false → true is a widening change." },
    "audience": { "enum": ["staff", "customers"], "default": "staff", "title": "Made for", "description": "Carried from an organization's streamline (config-schema §4, §10; 2026-10-13): `customers` when the organization made it for its customers. Information only on this device (a Discover listing says *Made for customers*); it changes nothing in personal mode." },
    "icon": { "$ref": "defs.schema.json#/$defs/sfSymbol" },
    "logo": { "type": "string", "maxLength": 350000, "pattern": "^data:image/(png|jpeg);base64,[A-Za-z0-9+/]+={0,2}$", "patternErrorMessage": "a data:image/png;base64,… (or jpeg) address", "description": "The streamline's logo, inline so the file stays one file (2026-10-11): a square PNG or JPEG (64–1024 px, ≤ 256 KB decoded). Drawn in full color wherever the `icon` would be; `icon` stays the fallback." },
    "color": { "$ref": "defs.schema.json#/$defs/colorPair", "description": "Outgoing bubbles and the avatar, `{light, dark}`." },
    "theme": { "$ref": "defs.schema.json#/$defs/streamlineTheme", "description": "What this streamline's streams, card and overview wear (§3.6): a theme id (that theme whole; it must have both appearances), or `{ base?, accent? }` (base default the account's theme; accent replaces its accent). Absent: the account's theme with `color` as the accent. `color` stays required for app builds before themes; configcheck warns when it differs from the resolved accent." },
    "instructions": { "type": "string", "description": "The system prompt, sent as is (cached). Never business rules (law 3) and never secrets." },
    "briefs": { "$ref": "defs.schema.json#/$defs/briefs", "description": "Personal briefs this streamline includes (`personal/briefs/<id>.md` beside the streamline files on this device), composed in this order before its own instructions. A brief this device doesn't have is skipped and the editor says so." },
    "model": {
      "type": "object",
      "description": "The model, called straight from the device with the key in the vault (`vault:<id>` if set, else `vault:default`, within the model's provider).",
      "required": ["id"],
      "additionalProperties": false,
      "properties": {
        "provider": { "enum": ["anthropic", "openai", "openai-compatible"], "description": "`anthropic` (the default), `openai`, or `openai-compatible` (any chat-completions server: Groq, Mistral, Gemini's OpenAI endpoint, a gateway, or a model on your own computer or network such as Ollama or LM Studio). Added 2026-10-18 (docs/plans/model-agnostic.md); the app speaks the last two from the build that ships session 4 of that plan." },
        "id": { "$ref": "defs.schema.json#/$defs/modelId", "description": "The provider's model id. Default `claude-sonnet-5-5`; an Anthropic id starts with `claude-`." },
        "baseURL": { "type": "string", "pattern": "^(https://[^\\s/?#@]+[^\\s?#]*|http://(localhost|127(\\.[0-9]{1,3}){3}|\\[::1\\]|10(\\.[0-9]{1,3}){3}|192\\.168(\\.[0-9]{1,3}){2}|172\\.(1[6-9]|2[0-9]|3[01])(\\.[0-9]{1,3}){2}|[A-Za-z0-9-]+(\\.[A-Za-z0-9-]+)*\\.local)(:[0-9]{1,5})?(/[^\\s?#]*)?)$", "patternErrorMessage": "an https:// address, or http:// only for this computer or your own network (localhost, 10.x, 172.16-31.x, 192.168.x, *.local)", "description": "The chat-completions endpoint without `/chat/completions`: required for `openai-compatible`, optional for `openai`. https, or http only for a model on this computer or your own network (Ollama: http://localhost:11434/v1). No query or fragment." },
        "vendor": { "$ref": "defs.schema.json#/$defs/modelVendor" },
        "capabilities": { "$ref": "defs.schema.json#/$defs/modelCapabilities" },
        "effort": { "enum": ["none", "low", "medium", "high", "xhigh", "max"], "description": "→ `output_config.effort` (Anthropic) or the nearest `reasoning_effort` the model takes." },
        "maxTokens": { "type": "integer", "minimum": 1, "maximum": 128000, "description": "Output ceiling per call. Default 32000." }
      },
      "allOf": [
        { "if": { "properties": { "provider": { "const": "openai-compatible" } }, "required": ["provider"] }, "then": { "required": ["baseURL"] } },
        { "if": { "anyOf": [{ "not": { "required": ["provider"] } }, { "properties": { "provider": { "const": "anthropic" } } }] }, "then": { "properties": { "id": { "pattern": "^claude-[a-z0-9.-]+$", "patternErrorMessage": "an Anthropic model id (claude-sonnet-5-5)" } } } }
      ]
    },
    "mcp": {
      "type": "array",
      "description": "The MCP servers. Every tool a server lists is allowed unless `hidden`.",
      "items": { "$ref": "#/$defs/server" }
    },
    "templates": {
      "type": "object",
      "description": "Card designs, `{id: template}`, in §6's template language (`{root: node}` or a bare node). Checked on import by the loop's static check; a failing template is left out and its tools get the automatic card.",
      "propertyNames": { "$ref": "defs.schema.json#/$defs/templateId" },
      "additionalProperties": { "$ref": "template.schema.json#/$defs/body" }
    },
    "cards": { "type": "array", "uniqueItems": true, "maxItems": 50, "items": { "$ref": "defs.schema.json#/$defs/partId" }, "title": "Shared cards", "description": "Shared cards this streamline uses (config-schema §10.2, 2026-10-19): `personal/cards/<id>.json` beside the streamline files on this device, shared by every personal streamline that lists it. A server's `renderers` may name one of these as well as this file's own `templates` (its own card wins on the same id). Shared or exported alone, the file carries copies of them in `templates`." },
    "forms": { "type": "array", "uniqueItems": true, "maxItems": 50, "items": { "$ref": "defs.schema.json#/$defs/partId" }, "title": "Shared forms", "description": "Shared sealed forms this streamline may open (config-schema §10.2, §5; 2026-10-19): `personal/forms/<id>.json` on this device. A server opens one with the sealed-form directive (§7.3); what is typed is posted from the device straight to the form's `submit.url` (https), never to the model. Moved into an organization, they become that streamline's own forms." },
    "archive": { "enum": ["whenDone", "anytime", "never"], "description": "When its chats may be archived (decision 70). Default `anytime`." },
    "attachments": { "$ref": "defs.schema.json#/$defs/attachments", "description": "Paperclip and camera, as an organization's streamline (§4.2): the files go straight from the device to the model with the person's key, never to manolab." },
    "imageHosts": { "type": "array", "uniqueItems": true, "items": { "$ref": "defs.schema.json#/$defs/hostName" }, "description": "Host names the cards may load images from (https; `localhost` over http in Debug builds only). Any other image URL draws the placeholder." },
    "welcome": { "type": "string", "description": "Local bubbles at the start of every new chat, never sent to the model; paragraphs split on a blank line." },
    "placeholder": { "type": "string", "description": "Composer hint." },
    "composer": {
      "type": "object",
      "description": "The chips above the composer after the first message (config-schema §4, §10.1; decision 77). The hint and quick phrases stay top-level (`placeholder`, `quickPhrases`).",
      "additionalProperties": false,
      "properties": {
        "suggestions": { "$ref": "defs.schema.json#/$defs/suggestions" },
        "modelSuggestions": { "type": "boolean", "description": "Personal streamlines only (default false): the model may end a reply with up to three short things the person might say next, shown as send-chips only when no rule holds and no server directive came this turn. About 60 prompt and 30 output tokens a turn, on the person's own key. Model chips are words only (never a tool, insert or scan) and never reach the transcript." }
      }
    },
    "scan": { "$ref": "defs.schema.json#/$defs/scan", "description": "The scan button (config-schema §4.2a, §10.1): the same object as an organization streamline's. A fast-path `action.tool` must be one the loop may run without the model here (annotated read-only, or listed in `direct`)." },
    "formPresentation": { "$ref": "defs.schema.json#/$defs/formPresentation", "description": "How forms show in its chats (config-schema §10.1, added 2026-10-13): `server` (MCP server forms, default `inline`; `sheet` for the full page) and `sealed` (how the shared forms it lists show, §10.2; default `sheet`). What is typed in a form goes to the server only, never to the model, whatever the presentation." },
    "quickPhrases": {
      "type": "array",
      "description": "Quick phrases; the first four are also the new chat's starter chips.",
      "items": {
        "type": "object",
        "required": ["label", "text"],
        "additionalProperties": false,
        "properties": {
          "label": { "type": "string", "minLength": 1, "description": "The chip's label." },
          "text": { "type": "string", "minLength": 1, "description": "The text it sends or inserts." },
          "send": { "type": "boolean", "description": "Default true: send at once." }
        }
      }
    }
  },
  "$defs": {
    "server": {
      "type": "object",
      "description": "One MCP server with its tool policy, renderers and session-error codes.",
      "required": ["id", "url", "auth"],
      "additionalProperties": false,
      "properties": {
        "id": { "$ref": "defs.schema.json#/$defs/serverId" },
        "name": { "type": "string", "description": "Display name; default the URL's host." },
        "url": { "type": "string", "pattern": "^(https://[^\\s/?#]+[^\\s]*|http://(localhost|127\\.0\\.0\\.1)(:[0-9]+)?(/[^\\s]*)?)$", "patternErrorMessage": "must be https:// (http://localhost only in Debug builds)", "description": "The Streamable HTTP endpoint: https; `http://localhost` in Debug builds only." },
        "auth": { "enum": ["oauth", "none", "password", "api-key"], "description": "`oauth` and `none` are built; `password` and `api-key` are designed." },
        "formPresentation": { "$ref": "defs.schema.json#/$defs/presentation", "title": "Its forms", "description": "This server's forms (elicitation) only: `inline` or `sheet`, over the streamline's `formPresentation.server`. Added 2026-10-13." },
        "tools": {
          "type": "object",
          "description": "The tool policy (names with `*` globs). Precedence: `hidden` > `confirm` > `confirmWhenArgs` > `readOnly` > the tool's MCP annotations (only `readOnlyHint: true` without `destructiveHint` runs untapped) > a tap. The server's own API is still the lock (law 3).",
          "additionalProperties": false,
          "properties": {
            "allow": { "type": "array", "uniqueItems": true, "minItems": 1, "items": { "$ref": "defs.schema.json#/$defs/toolGlob" }, "description": "Inclusion (added 2026-10-12): only tools matching one of these exist for this streamline; `hidden` still subtracts. Without it every tool the server lists is allowed (unless hidden)." },
            "readOnly": { "type": "array", "uniqueItems": true, "items": { "$ref": "defs.schema.json#/$defs/toolGlob" }, "description": "Run without a tap." },
            "confirm": { "type": "array", "uniqueItems": true, "items": { "$ref": "defs.schema.json#/$defs/toolGlob" }, "description": "Always wait for the tap (law 5)." },
            "confirmWhenArgs": { "type": "array", "uniqueItems": true, "items": { "$ref": "defs.schema.json#/$defs/toolGlob" }, "description": "Wait for the tap only when called with any argument (reads with none, writes with some)." },
            "hidden": { "type": "array", "uniqueItems": true, "items": { "$ref": "defs.schema.json#/$defs/toolGlob" }, "description": "Never offered to the model; refused if called." },
            "direct": { "type": "array", "uniqueItems": true, "items": { "$ref": "defs.schema.json#/$defs/toolGlob" }, "description": "Tools a card's button may call itself (§6.5, the fast path). The gates still apply; an unlisted tool makes the button send its `fallback` text." },
            "quiet": { "type": "array", "uniqueItems": true, "items": { "$ref": "defs.schema.json#/$defs/toolGlob" }, "description": "Lookups that run without their activity row (added 2026-10-25): reads only (configcheck `quiet.gated` refuses one that waits for a tap); their cards still draw, and a failure still shows. For knowledge tools a streamline uses to answer as itself." }
          }
        },
        "renderers": {
          "type": "object",
          "description": "Tool → template id from this file's `templates`. The card binds `$` to `structuredContent`, or to `data` for an `{ok, data}` result.",
          "propertyNames": { "$ref": "defs.schema.json#/$defs/toolName" },
          "additionalProperties": { "$ref": "defs.schema.json#/$defs/templateId" }
        },
        "reauthOn": {
          "type": "array",
          "uniqueItems": true,
          "items": { "type": "string", "pattern": "^[A-Za-z0-9_.:-]{1,64}$" },
          "description": "`oauth` servers only: business error codes meaning the session behind the token has ended (`{ok:false, error:{code}}` instead of HTTP 401). The app drops the token, asks to sign in again and retries; neither the model nor the cards see the error."
        },
        "deniedOn": {
          "type": "array",
          "uniqueItems": true,
          "items": { "type": "string", "pattern": "^[A-Za-z0-9_.:-]{1,64}$" },
          "description": "Business error codes meaning *not allowed for you* (default `[\"FORBIDDEN\"]`; added 2026-10-12). A refusal with one, or an HTTP 403 without `insufficient_scope`, hides the tool from the model until you sign in again, the streamline changes or 24 hours pass. `[]` turns that off for this server."
        }
      }
    }
  }
}

```
