Shared building blocks for every streamline.config/1 file: colors, SF Symbol names, ids, URLs, CIDRs, models, network rules, the when language.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://streamliner.work/schema/v1/defs.schema.json",
"title": "Streamline shared definitions",
"description": "Shared building blocks for every streamline.config/1 file: colors, SF Symbol names, ids, URLs, CIDRs, models, network rules, the `when` language. Prose: docs/config-schema.md.",
"$defs": {
"attachments": {
"type": "object",
"description": "Paperclip and camera (config-schema §4.2). Absent = no attachments. Images go to the model downscaled and stripped of metadata, PDFs as documents, text files (CSV, JSON, Markdown, plain text) as text documents. Sensitive documents go through a sealed form's `image` field instead, never the paperclip.",
"additionalProperties": false,
"properties": {
"allowed": { "type": "boolean", "description": "Shows the paperclip (and camera, if `camera`)." },
"types": { "type": "array", "uniqueItems": true, "items": { "type": "string", "pattern": "^[A-Za-z0-9.-]+$" }, "description": "UTIs from the accepted list: `public.image` (or `public.jpeg`, `public.png`, `public.heic`, `com.compuserve.gif`, `org.webmproject.webp`, `public.tiff`), `com.adobe.pdf`, `public.plain-text`, `public.comma-separated-values-text`, `public.tab-separated-values-text`, `public.json`, `net.daringfireball.markdown`, `public.xml`, `public.yaml`. Anything else is refused by configcheck (`attachments.type`). Default: `public.image` and `com.adobe.pdf`." },
"camera": { "type": "boolean", "description": "Offer Take Photo (and Scan Document when PDFs are allowed) on iPhone and iPad." },
"maxCount": { "type": "integer", "minimum": 1, "maximum": 20, "description": "Files per message. Default 6." },
"maxBytes": { "type": "integer", "minimum": 1, "description": "Per file, after processing. Default 8 MB; capped by the account's `policy.attachmentsMaxBytes`." },
"maxPages": { "type": "integer", "minimum": 1, "maximum": 100, "description": "Per PDF. Default 20." },
"maxTextChars": { "type": "integer", "minimum": 1, "maximum": 400000, "description": "Per text file. Default 100000." },
"imageMaxEdge": { "type": "integer", "minimum": 512, "maximum": 2576, "description": "Long edge in pixels after the device downscales an image. Default 1568; 2576 for dense screenshots." },
"chatMaxBytes": { "type": "integer", "minimum": 1, "maximum": 33554432, "description": "All attachments in one stream together. Default 16 MB; an organization's streamline at most 24 MB." },
"toModel": { "type": "boolean", "deprecated": true, "description": "Deprecated and ignored (#16): every file attached in the chat reaches the model as content. A file kept from the model reaches a tool only through a form's file field. Still accepted so older files load; configcheck warns." }
}
},
"schemaRef": {
"type": "string",
"description": "Optional. The JSON Schema this file follows, so editors (VS Code) validate it and show these docs on hover. Ignored by the app and the back end."
},
"hex": {
"type": "string",
"pattern": "^#[0-9A-Fa-f]{6}$",
"patternErrorMessage": "a color is #RRGGBB (six hex digits, no alpha)",
"description": "A color as #RRGGBB. No alpha, no names."
},
"colorPair": {
"type": "object",
"description": "A color for light and dark appearance, each #RRGGBB.",
"required": [
"light",
"dark"
],
"additionalProperties": false,
"properties": {
"light": {
"$ref": "#/$defs/hex",
"description": "The color in light appearance, #RRGGBB."
},
"dark": {
"$ref": "#/$defs/hex",
"description": "The color in dark appearance, #RRGGBB."
}
}
},
"sfSymbol": {
"type": "string",
"pattern": "^[a-z0-9]+(\\.[a-z0-9]+)*$",
"patternErrorMessage": "an SF Symbol name, lower-case words joined by dots (bag.fill)",
"description": "An SF Symbol name (e.g. `bag.fill`). Validated at load against the symbols the OS has; an unknown name falls back to `bubble.left.and.bubble.right`."
},
"tenantId": {
"type": "string",
"pattern": "^[a-z0-9-]{3,40}$",
"patternErrorMessage": "an account id is 3-40 of a-z, 0-9 and -",
"description": "Account id, `[a-z0-9-]{3,40}` (a UID for new accounts; the demo keeps `meridian`). Equals the folder `t/<tenant>/`."
},
"kindId": {
"type": "string",
"pattern": "^[a-z0-9_]{2,32}$",
"patternErrorMessage": "a streamline id is 2-32 of a-z, 0-9 and _",
"description": "A streamline (agent kind) id, `[a-z0-9_]{2,32}`; equals the file name `agents/<kind>.json`."
},
"briefId": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9-]{1,47}$",
"patternErrorMessage": "a brief id is 2-48 of a-z, 0-9 and -, starting with a letter or digit",
"description": "A brief's id, `[a-z0-9][a-z0-9-]{1,47}`; equals its file name without `.md` (`private/briefs/<id>.md` for an organization, `personal/briefs/<id>.md` on this device)."
},
"briefs": {
"type": "array",
"uniqueItems": true,
"maxItems": 12,
"items": { "$ref": "#/$defs/briefId" },
"description": "Briefs this streamline includes (config-schema §4.7): account-level instruction files written once, composed **in this order before** the streamline's own instructions, so a change to one reaches every streamline that lists it on the next publish. Members never see them."
},
"partId": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9-]{1,47}$",
"patternErrorMessage": "a shared card's or form's id is 2-48 of a-z, 0-9 and -, starting with a letter or digit",
"description": "A personal shared card's or form's id (config-schema §10.2, 2026-10-19), `[a-z0-9][a-z0-9-]{1,47}` like a brief's; equals its file name without `.json` (`personal/cards/<id>.json`, `personal/forms/<id>.json`)."
},
"roleId": {
"type": "string",
"pattern": "^[A-Za-z0-9_.-]{1,64}$",
"patternErrorMessage": "a role id is 1-64 of letters, digits, _ . -",
"description": "A role id declared in `tenant.json` `roles[]`."
},
"userId": {
"type": "string",
"pattern": "^[A-Za-z0-9_.@-]{1,64}$",
"patternErrorMessage": "a user id is 1-64 of letters, digits, _ . @ -",
"description": "A user id: a demo user's `id`, or a directory user's id."
},
"templateId": {
"type": "string",
"pattern": "^[A-Za-z0-9_.-]{1,64}$",
"patternErrorMessage": "a template id is 1-64 of letters, digits, _ . -",
"description": "A template id: the file name `templates/<id>.json` (or a key of a personal file's `templates`)."
},
"formId": {
"type": "string",
"pattern": "^[A-Za-z0-9_.-]{1,64}$",
"patternErrorMessage": "a form id is 1-64 of letters, digits, _ . -",
"description": "A sealed form, hosted page or sealed view id: the file name `forms/<id>.json`."
},
"formPresentation": {
"type": "object",
"title": "Form presentation",
"description": "How forms are presented in this streamline's chats (config-schema §4, added 2026-10-13): `server`, the forms an MCP server asks for mid-call (elicitation, file fields included), default `inline`, a card in the chat; `sealed`, the account's sealed forms (§5: card and payment fields), default `sheet`, the full-page sheet. Either may be `inline` or `sheet`. Only where the form appears changes: what is typed goes to the server or the account's endpoint only, never to the model, the transcript or a log (law 4), whatever the presentation. A URL-mode request (a page to open) is always a sheet.",
"additionalProperties": false,
"properties": {
"server": { "$ref": "#/$defs/presentation", "title": "Server forms", "description": "MCP server forms (elicitation). Default `inline`. A server entry's own `formPresentation` wins for that server's forms." },
"sealed": { "$ref": "#/$defs/presentation", "title": "Sealed forms", "description": "Sealed forms (§5). Default `sheet`. On a personal streamline it is how its shared forms show (§10.2)." }
}
},
"presentation": {
"enum": ["inline", "sheet"],
"description": "`inline`: a card in the chat, kept the latest card while it waits; sending a message in the composer declines it. `sheet`: a full-page sheet that blocks the chat until it is answered."
},
"scan": {
"type": "object",
"description": "The scan button (config-schema §4.2a, decision 73). A scanned code is a tagged value (type, symbology, value), never a photo: a chip in the composer, or `action`. Absent = no scan button.",
"additionalProperties": false,
"anyOf": [ { "required": ["types"] }, { "required": ["symbologies"] } ],
"errorMessage": "scan needs types (e.g. [\"barcode\", \"qr\"])",
"properties": {
"types": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "$ref": "#/$defs/scanType" }, "description": "Which codes: the groups `barcode` (every 1D symbology) and `qr` (QR, Micro QR, Data Matrix, Aztec), or symbology ids. `pdf417` is refused (licenses are read only in sealed forms)." },
"symbologies": { "type": "array", "items": { "$ref": "#/$defs/scanType" }, "description": "Deprecated: the old name of `types` (still read; configcheck warns)." },
"mode": { "enum": ["single", "continuous", "both"], "description": "The old one-field form (still read; `modes` wins): `single` (default) closes after one code; `continuous` opens continuous, single offered too; `both` offers single and continuous." },
"modes": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "enum": ["single", "continuous", "sweep"] }, "description": "The scan modes offered, in the scanner bar's order (issue 15): `single` closes after the code under the line; `continuous` stays open, one code at a time, repeats suppressed; `sweep` takes every code in view while the person moves across a page or shelf, then a review list before they go as one batch (chips, or one fast-path call per code with a summary). Default [\"single\"]." },
"defaultMode": { "enum": ["single", "continuous", "sweep"], "description": "The mode a tap on Scan opens; must be in `modes`. Default: `single` when allowed, else the first of `modes`." },
"prompt": { "type": "string", "maxLength": 80, "description": "The line under the scanner's square. Default: Point at a barcode / QR code." },
"pattern": { "type": "string", "description": "A UX filter (ECMAScript regex, anchored by you): other values are skipped with a notice. The API still decides (law 3)." },
"repeatAfterSeconds": { "type": "number", "minimum": 0, "maximum": 60, "description": "Continuous: the same value is ignored this long (default 3), so a code held in view counts once." },
"action": {
"type": "object",
"description": "Where a scan goes instead of a chip: a `direct` tool (the fast path: no model), or text to insert or send. Strings interpolate `scan.value`, `scan.symbology`, `scan.label`, `scan.type`, `scan.gs1.<AI>`, `chat.*`, `user.*` (`{{ value }}` = `{{ scan.value }}`).",
"additionalProperties": false,
"properties": {
"tool": { "$ref": "#/$defs/toolName", "description": "A tool marked `direct` in the private allowlist; not one with `confirm` when the mode allows continuous scanning." },
"args": { "type": "object", "description": "Its arguments." },
"insert": { "type": "string", "description": "Text put in the composer (the scan rides along as a chip)." },
"send": { "type": "string", "description": "Text sent at once (the scan rides along as a chip)." }
},
"oneOf": [ { "required": ["tool"] }, { "required": ["insert"] }, { "required": ["send"] } ],
"errorMessage": "a scan action is one of {tool, args}, {insert} or {send}"
},
"keyboard": {
"description": "Hardware scanners that type like a keyboard, recognized by their keystroke burst. `false` turns it off; an object tunes it.",
"oneOf": [
{ "const": false },
{ "type": "object", "additionalProperties": false, "properties": {
"enabled": { "type": "boolean", "description": "False turns detection off (same as keyboard: false)." },
"prefix": { "type": "string", "maxLength": 8, "description": "Only bursts starting with it count; stripped." },
"suffix": { "type": "string", "maxLength": 8, "description": "Only bursts ending with it count; stripped." },
"terminator": { "enum": ["return", "tab", "none"], "description": "What ends a code (default return)." },
"minLength": { "type": "integer", "minimum": 1, "maximum": 64, "description": "Fewest characters (default 4)." },
"maxGapMs": { "type": "integer", "minimum": 5, "maximum": 200, "description": "Longest gap between keys of one code (default 30 ms)." }
} }
]
}
}
},
"scanType": {
"type": "string",
"pattern": "^[a-z0-9_]{2,24}$",
"description": "A group (`barcode`, `qr`) or a symbology id: ean13, ean8, upca, upce, code128, code39, code39mod43, code93, itf14, i2of5, codabar, gs1databar, gs1databar_expanded, gs1databar_limited, msiplessey, microqr, datamatrix, aztec, micropdf417 (configcheck: scan.type; pdf417 is refused, scan.pdf417)."
},
"toolName": {
"type": "string",
"pattern": "^[a-zA-Z0-9_-]{1,64}$",
"patternErrorMessage": "a tool name is 1-64 of letters, digits, _ and - (the strictest provider's rule)",
"description": "An exact MCP tool name, `[a-zA-Z0-9_-]{1,64}`."
},
"toolGlob": {
"type": "string",
"pattern": "^[a-zA-Z0-9_*-]{1,64}$",
"patternErrorMessage": "a tool name or glob is 1-64 of letters, digits, _ - and *",
"description": "A tool name where `*` matches any characters (`cart_*`)."
},
"networkId": {
"type": "string",
"pattern": "^[A-Za-z0-9_.@-]{1,64}$",
"patternErrorMessage": "a network id is 1-64 of letters, digits, _ . @ -",
"description": "A named network declared in `private/tenant.json` `networks` (or the pushed directory)."
},
"connectionId": {
"type": "string",
"pattern": "^[a-z0-9-]{2,32}$",
"patternErrorMessage": "a connection id is 2-32 of a-z, 0-9 and -",
"description": "A connection id, `[a-z0-9-]{2,32}`, declared in `tenant.json` `connections[]`."
},
"serverId": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{1,64}$",
"patternErrorMessage": "a server id is 1-64 of letters, digits, _ and -",
"description": "The id of one MCP server entry in a streamline's `mcp[]`; unique within the streamline."
},
"credentialRef": {
"type": "string",
"pattern": "^[A-Za-z0-9_.:-]{1,64}$",
"patternErrorMessage": "a credentialRef is a name (anthropic-main, vault:default), never a key",
"description": "Names the organization's own provider key, stored sealed per account by the back end (`PUT /v1/admin/<t>/credentials/<ref>`; absent = `default`), or `vault:default` / `vault:<streamline id>` in personal mode. Never the key itself (law 4)."
},
"httpsUrl": {
"type": "string",
"pattern": "^https://[^\\s/?#]+[^\\s]*$",
"patternErrorMessage": "must be an https:// URL",
"description": "An absolute https:// URL."
},
"configUrl": {
"type": "string",
"pattern": "^(https://[^\\s/?#]+[^\\s]*|/[^\\s]*|http://(localhost|127\\.0\\.0\\.1)(:[0-9]+)?(/[^\\s]*)?)$",
"patternErrorMessage": "must be https://…, a path starting with / (relative to the config host), or http://localhost (Debug builds only)",
"description": "A URL in config: absolute https://, or a path starting with `/` that resolves against the config host's origin (how the demo points at its mock backend). `http://` is refused except `http://localhost:*` in Debug builds."
},
"sealedUrl": {
"type": "string",
"pattern": "^(https://[^\\s/?#]+[^\\s]*|/[^\\s]*)$",
"patternErrorMessage": "must be https://… or a path starting with / (relative to the config host, for demo accounts)",
"description": "An organization's sensitive-data endpoint: https, or relative to the config host for demo accounts."
},
"assetPath": {
"type": "string",
"pattern": "^assets/[a-f0-9]{16,64}\\.(png|jpg|jpeg|pdf)$",
"patternErrorMessage": "an asset is assets/<sha256 hex>.png|jpg|jpeg|pdf (content-addressed)",
"description": "A content-addressed asset, `assets/<sha256>.<ext>`: PNG, JPEG or PDF, ≤ 2 MB, listed in the manifest."
},
"hostName": {
"type": "string",
"maxLength": 253,
"pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$",
"patternErrorMessage": "a host name in lower case, no scheme or path (img.example.com)",
"description": "A host name, lower case, no scheme, port or path."
},
"cidr": {
"type": "string",
"description": "An IPv4 or IPv6 CIDR (`203.0.113.0/24`, `2001:db8::/48`); a bare address means a single host.",
"anyOf": [
{
"pattern": "^((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])(/(3[0-2]|[12]?[0-9]))?$"
},
{
"pattern": "^[0-9A-Fa-f:.]*:[0-9A-Fa-f:.]*(/(12[0-8]|1[01][0-9]|[1-9]?[0-9]))?$"
}
],
"errorMessage": "is not an IPv4 or IPv6 CIDR (203.0.113.0/24, 2001:db8::/48)"
},
"base64url32": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{43}$",
"patternErrorMessage": "a 32-byte public key in base64url (43 characters, no padding)",
"description": "A 32-byte Ed25519 public key, base64url without padding (43 characters)."
},
"interpolated": {
"type": "string",
"description": "Text with `{{ path | formatter:arg }}` holes (config-schema §6.3). Text outside holes is literal."
},
"contextPath": {
"type": "string",
"pattern": "^(\\$|@|user|tenant|chat|context|now|value)([.\\[][^\\s]*)?$",
"patternErrorMessage": "a path starts with $, @, user, tenant, chat, context or now (config-schema §6.2)",
"description": "A path (config-schema §6.2): `$` the root object, `@` the current list element, or `user.*`, `tenant.*`, `chat.*`, `context.*`, `now`; `.key`, `[\"key\"]`, `[0]`."
},
"when": {
"description": "A condition (config-schema §6.4): a path string (truthy: not null, false, 0, \"\" or []), or `{path, eq|ne|in|gt|lt}`, or `{not}`, `{all: []}`, `{any: []}`. That is the whole language.",
"anyOf": [
{
"$ref": "#/$defs/contextPath"
},
{
"type": "object",
"additionalProperties": false,
"minProperties": 1,
"properties": {
"path": {
"$ref": "#/$defs/contextPath",
"description": "The value to test."
},
"eq": {
"description": "True when the value equals this."
},
"ne": {
"description": "True when the value does not equal this."
},
"in": {
"type": "array",
"description": "True when the value is one of these."
},
"gt": {
"type": "number",
"description": "True when the value is a number greater than this."
},
"lt": {
"type": "number",
"description": "True when the value is a number less than this."
},
"not": {
"$ref": "#/$defs/when",
"description": "Negates another condition."
},
"all": {
"type": "array",
"items": {
"$ref": "#/$defs/when"
},
"description": "True when every condition holds."
},
"any": {
"type": "array",
"items": {
"$ref": "#/$defs/when"
},
"description": "True when any condition holds."
}
}
}
]
},
"effort": {
"enum": [
"none",
"low",
"medium",
"high",
"xhigh",
"max"
],
"description": "One knob, mapped per provider by the relay: Anthropic → `output_config.effort` (`none` turns thinking off where allowed, otherwise `low`); `openai` and `openai-compatible` → `reasoning_effort` when the model's `capabilities.reasoning` is `effort` (or `supportsReasoning`), the nearest value its `capabilities.efforts` takes."
},
"modelCapabilities": {
"type": "object",
"description": "What the model and its server can do (config-schema §4.6, added 2026-10-18; docs/plans/model-agnostic.md §2). Every flag is optional: a flag not given comes from the model's row in the catalog (runtime/models.json), else from the provider's default. Each new quirk of a server is a flag, never a provider name in code.",
"additionalProperties": false,
"properties": {
"tools": { "type": "boolean", "description": "Default true. A streamline needs tools: false is refused by configcheck (`model.tools_off`)." },
"parallelToolCalls": { "type": "boolean", "description": "Sent as `parallel_tool_calls` only when set; some servers reject the parameter. The loop runs several tool calls from one answer in order either way." },
"vision": { "type": "boolean", "description": "Reads photos. Default true for `anthropic`, else false: a photo or scan attached to a model that can't see it is refused before the provider, with words." },
"pdf": { "type": "boolean", "description": "Reads PDFs. Default true for `anthropic`, else false: configcheck warns when the streamline's attachments allow PDFs (`attachments.pdf_unsupported`), and the relay refuses one (`400 attachment_unsupported`)." },
"reasoning": { "enum": ["none", "effort"], "description": "Whether `reasoning_effort` is sent (`effort`). Default `none` outside Anthropic; `supportsReasoning: true` means `effort`." },
"efforts": { "type": "array", "uniqueItems": true, "minItems": 1, "items": { "enum": ["none", "minimal", "low", "medium", "high", "xhigh", "max"] }, "description": "The effort values the model takes; `effort` maps to the nearest of them (`max` → `xhigh` → `high`, `none` → `minimal` → `low`). Default `[\"low\", \"medium\", \"high\"]` outside Anthropic." },
"reasoningWithTools": { "type": "boolean", "description": "Default true. false: the model takes tools over chat completions only with reasoning off, so `reasoning_effort` is sent as `none` whenever tools are in the request (OpenAI's GPT-6 Luna on 2026-10-18)." },
"maxTokensField": { "enum": ["max_tokens", "max_completion_tokens"], "description": "Which field carries `maxTokens`. Default `max_completion_tokens` for `openai`, `max_tokens` for `openai-compatible`." },
"maxOutputTokens": { "type": "integer", "minimum": 1, "description": "The model's own output ceiling: configcheck warns when `maxTokens` is above it (`model.max_tokens_over`)." },
"streamUsage": { "type": "boolean", "description": "Default true: `stream_options.include_usage` is sent. false for a server that refuses it; usage is then estimated from characters and marked estimated." },
"promptCacheKey": { "type": "boolean", "description": "Default false. true: the model takes OpenAI's `prompt_cache_key`, sent as a hash of the account and streamline so one streamline's calls share a cache." },
"auth": { "enum": ["bearer", "api-key", "none"], "description": "How the key is sent: `Authorization: Bearer` (default), `api-key` (Azure OpenAI), or `none` (a personal streamline's model on the person's own computer or network only)." },
"toolIds": { "enum": ["any", "alnum9"], "description": "Tool-call ids as they are (`any`, default), or rewritten to 9 letters and digits (`alnum9`, Mistral), the same way every time so a chat replays the same." }
}
},
"modelVendor": {
"type": "string",
"minLength": 1,
"maxLength": 60,
"description": "The company or product a person consents to (config-schema §4.6, added 2026-10-18): `Groq`, `Meridian's own model server`. Required for `openai-compatible` unless the model's catalog row names it (configcheck `model.vendor_required`); for `anthropic` and `openai` it comes from the catalog."
},
"modelId": {
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:/@-]{0,127}$",
"patternErrorMessage": "a provider model id (claude-haiku-5-5)",
"description": "The provider's model id, passed through unchanged. Anthropic on 2026-10-09: `claude-haiku-5-5` (the default for desks), `claude-sonnet-5-5`, `claude-opus-5-5`. Law 9: start on the cheapest model that can do the job."
},
"model": {
"type": "object",
"description": "Which model a streamline uses (config-schema §4.6). Pinned by the relay; the device never chooses.",
"required": [
"provider",
"id"
],
"additionalProperties": false,
"properties": {
"provider": {
"enum": [
"anthropic",
"openai",
"openai-compatible",
"demo"
],
"description": "Which adapter the relay uses. `openai-compatible` covers Groq, vLLM, llama.cpp and anything speaking chat completions. `demo` is the scripted agent (§11)."
},
"id": {
"$ref": "#/$defs/modelId"
},
"baseURL": {
"$ref": "#/$defs/httpsUrl",
"description": "The endpoint the chat-completions calls go to, without `/chat/completions`: required for `openai-compatible` (e.g. https://api.groq.com/openai/v1), optional for `openai` (Azure OpenAI's `/openai/v1`, a gateway, a regional endpoint; default https://api.openai.com/v1). https, no user name or password, no query or fragment, and not a private, loopback or link-local address, `localhost`, `*.local` or `*.internal` (configcheck `model.base_url_private`): the relay is on the public internet."
},
"vendor": {
"$ref": "#/$defs/modelVendor"
},
"capabilities": {
"$ref": "#/$defs/modelCapabilities"
},
"effort": {
"$ref": "#/$defs/effort"
},
"supportsReasoning": {
"type": "boolean",
"description": "`openai-compatible` only: send `reasoning_effort`. Kept as is; the same as `capabilities.reasoning: \"effort\"`."
},
"maxTokens": {
"type": "integer",
"minimum": 1,
"maximum": 200000,
"description": "Output ceiling per model call."
},
"credentialRef": {
"$ref": "#/$defs/credentialRef"
},
"inputPricePerMTok": {
"type": "number",
"minimum": 0,
"description": "Optional, USD per million input tokens, for models the relay has no price table for."
},
"outputPricePerMTok": {
"type": "number",
"minimum": 0,
"description": "Optional, USD per million output tokens."
}
},
"allOf": [
{
"if": {
"properties": {
"provider": {
"const": "anthropic"
}
}
},
"then": {
"properties": {
"id": {
"pattern": "^claude-",
"patternErrorMessage": "an Anthropic model id starts with claude-"
}
}
}
},
{
"if": {
"properties": {
"provider": {
"const": "openai-compatible"
}
}
},
"then": {
"required": [
"baseURL"
]
}
},
{
"if": {
"properties": {
"provider": {
"not": {
"const": "demo"
}
}
}
},
"then": {
"required": [
"credentialRef"
]
}
}
]
},
"networkRule": {
"type": "object",
"description": "Where a streamline may be used from (config-schema §3.3, §3.4): `{mode: \"user\"}` inside one of the caller's own networks; `{mode: \"named\", networks: [id]}` inside one of these; `{mode: \"none\"}` unrestricted; legacy `{allow: [cidr]}` (`[]` = unrestricted). Enforced by the relay, never by the app.",
"additionalProperties": false,
"properties": {
"mode": {
"enum": [
"user",
"named",
"none"
],
"description": "`user`: the caller's own networks (theirs + their roles'); `named`: one of `networks`; `none`: unrestricted."
},
"rule": {
"enum": [
"user",
"named",
"none"
],
"description": "A synonym of `mode`."
},
"networks": {
"type": "array",
"items": {
"$ref": "#/$defs/networkId"
},
"minItems": 1,
"uniqueItems": true,
"description": "`named` only: the networks that admit. An unknown id admits nobody."
},
"allow": {
"type": "array",
"items": {
"$ref": "#/$defs/cidr"
},
"uniqueItems": true,
"description": "Legacy: an anonymous CIDR list; `[]` = unrestricted."
}
},
"allOf": [
{
"if": {
"anyOf": [
{
"properties": {
"mode": {
"const": "named"
}
},
"required": [
"mode"
]
},
{
"properties": {
"rule": {
"const": "named"
}
},
"required": [
"rule"
]
}
]
},
"then": {
"required": [
"networks"
]
}
}
]
},
"phrase": {
"type": "object",
"description": "A quick phrase: puts `text` in the composer (`{{slot}}` markers are selected for typing), or sends it at once with `send: true`.",
"required": [
"label"
],
"additionalProperties": false,
"properties": {
"label": {
"type": "string",
"minLength": 1,
"description": "The menu item's label."
},
"text": {
"type": "string",
"description": "The text it inserts. `{{slot}}` markers are placeholders; with `send: true` there must be none."
},
"send": {
"type": "boolean",
"description": "`true`: send at once (no slots allowed); `false` (default): put in the composer."
},
"tool": {
"$ref": "#/$defs/toolName",
"description": "Instead of `text`: call this `direct` tool with no model (§6.5, the fast path)."
},
"args": {
"type": "object",
"description": "Arguments for `tool`; string values interpolate `chat.*` and `user.*`."
},
"fallback": {
"type": "string",
"description": "Text sent instead when `tool` is not direct for this user."
}
},
"anyOf": [
{
"required": [
"text"
]
},
{
"required": [
"tool"
]
}
],
"errorMessage": "a quick phrase needs `text` or a `tool`"
},
"rulePath": {
"type": "string",
"pattern": "^[A-Za-z_][A-Za-z0-9_]*([.\\[][^\\s]*)?$",
"patternErrorMessage": "a rule path starts with overview, chat, last, stream, user or tenant (config-schema §4, composer.suggestions)",
"description": "A path into the rule context (config-schema §4 `composer.suggestions`, §6.2): `overview.*` (the overview object), `chat.*` (chat state), `last.tool` / `last.result.*` (the latest successful tool call), `stream.messages` / `stream.status`, `user.*`, `tenant.*`; `.key`, `[\"key\"]`, `[0]`. configcheck checks the root (`suggestions.root`) and refuses `context.*` (`suggestions.context`)."
},
"ruleWhen": {
"description": "When a suggestion rule holds (config-schema §6.4's language over the rule context): a path string (truthy), or `{path, eq|ne|in|gt|lt}`, or `{not}`, `{all: []}`, `{any: []}`. A path that doesn't resolve is null, so the rule simply doesn't hold.",
"anyOf": [
{ "$ref": "#/$defs/rulePath" },
{
"type": "object",
"additionalProperties": false,
"minProperties": 1,
"properties": {
"path": { "$ref": "#/$defs/rulePath", "description": "The value to test." },
"eq": { "description": "True when the value equals this." },
"ne": { "description": "True when the value does not equal this." },
"in": { "type": "array", "description": "True when the value is one of these." },
"gt": { "type": "number", "description": "True when the value is a number greater than this." },
"lt": { "type": "number", "description": "True when the value is a number less than this." },
"not": { "$ref": "#/$defs/ruleWhen", "description": "Negates another condition." },
"all": { "type": "array", "items": { "$ref": "#/$defs/ruleWhen" }, "description": "True when every condition holds." },
"any": { "type": "array", "items": { "$ref": "#/$defs/ruleWhen" }, "description": "True when any condition holds." }
}
}
]
},
"suggestion": {
"type": "object",
"description": "One suggestion rule (config-schema §4 `composer.suggestions`, decision 77): a chip above the composer that shows while `when` holds over the rule context. Exactly one action: `text` (with `send`), `insert`, `tool` (with `args`, `fallback`) or `scan`.",
"required": ["label"],
"additionalProperties": false,
"properties": {
"when": { "$ref": "#/$defs/ruleWhen", "description": "When the chip shows. Absent: always (after the first message)." },
"label": { "type": "string", "minLength": 1, "maxLength": 120, "description": "The chip's words, interpolated over the rule context (`{{ overview.balance | money }}`); a label that doesn't resolve drops the chip. At most 40 characters once resolved (configcheck warns on a long literal)." },
"text": { "type": "string", "minLength": 1, "description": "The words it sends (`send: true`, no slots) or puts in the composer. Holes over the rule context are interpolated; any other `{{slot}}` is left for the employee. With `scan: true`, what it inserts where there is no scanner." },
"send": { "type": "boolean", "description": "With `text`: `true` sends at once (no slots allowed); `false` (default) puts it in the composer." },
"insert": { "type": "string", "minLength": 1, "description": "Text put in the composer with its first `{{slot}}` selected (§4.1)." },
"tool": { "$ref": "#/$defs/toolName", "description": "A `direct` tool called with no model (§6.5, the fast path): allowlisted and `direct`, through the same roles, confirm card and audit as a button. A tap never skips a confirm card." },
"args": { "type": "object", "description": "Arguments for `tool`; strings interpolate the rule context (a string that is one hole keeps its type)." },
"fallback": { "type": "string", "minLength": 1, "description": "Sent instead when `tool` isn't direct for this user; without it the chip is dropped." },
"scan": { "type": "boolean", "description": "`true`: the chip opens the scanner (the streamline must set `scan`)." }
},
"oneOf": [
{ "required": ["text"], "properties": { "scan": { "const": false, "description": "A text chip may say scan: false, never true." } }, "not": { "anyOf": [ { "required": ["insert"] }, { "required": ["tool"] }, { "required": ["args"] }, { "required": ["fallback"] } ] } },
{ "required": ["insert"], "not": { "anyOf": [ { "required": ["text"] }, { "required": ["send"] }, { "required": ["tool"] }, { "required": ["args"] }, { "required": ["fallback"] }, { "required": ["scan"] } ] } },
{ "required": ["tool"], "not": { "anyOf": [ { "required": ["text"] }, { "required": ["send"] }, { "required": ["insert"] }, { "required": ["scan"] } ] } },
{ "required": ["scan"], "properties": { "scan": { "const": true, "description": "The scan chip: opens the scanner." } }, "not": { "anyOf": [ { "required": ["send"] }, { "required": ["insert"] }, { "required": ["tool"] }, { "required": ["args"] }, { "required": ["fallback"] } ] } }
],
"errorMessage": "a suggestion is exactly one of: text (with send), insert, tool (with args, fallback) or scan: true (with an optional text)"
},
"suggestions": {
"type": "array",
"maxItems": 12,
"items": { "$ref": "#/$defs/suggestion" },
"description": "State rules for the chips above the composer after the first message (config-schema §4, decision 77): the first three that hold, in this order, show; they follow the data, not turns. A server's `suggestions` directive (§7.2) replaces them for that turn. At most 12."
},
"fallbackModel": {
"type": "object",
"description": "Used when the main model fails (config-schema §4.5): the shape of `model`, plus `when`.",
"required": [
"provider",
"id",
"when"
],
"additionalProperties": false,
"properties": {
"provider": {
"enum": [
"anthropic",
"openai",
"openai-compatible",
"demo"
],
"description": "Which adapter the relay uses. `openai-compatible` covers Groq, vLLM, llama.cpp and anything speaking chat completions. `demo` is the scripted agent (§11)."
},
"id": {
"$ref": "#/$defs/modelId"
},
"baseURL": {
"$ref": "#/$defs/httpsUrl",
"description": "The endpoint the chat-completions calls go to, without `/chat/completions`: required for `openai-compatible` (e.g. https://api.groq.com/openai/v1), optional for `openai` (Azure OpenAI's `/openai/v1`, a gateway, a regional endpoint; default https://api.openai.com/v1). https, no user name or password, no query or fragment, and not a private, loopback or link-local address, `localhost`, `*.local` or `*.internal` (configcheck `model.base_url_private`): the relay is on the public internet."
},
"vendor": {
"$ref": "#/$defs/modelVendor"
},
"capabilities": {
"$ref": "#/$defs/modelCapabilities"
},
"effort": {
"$ref": "#/$defs/effort"
},
"supportsReasoning": {
"type": "boolean",
"description": "`openai-compatible` only: send `reasoning_effort`. Kept as is; the same as `capabilities.reasoning: \"effort\"`."
},
"maxTokens": {
"type": "integer",
"minimum": 1,
"maximum": 200000,
"description": "Output ceiling per model call."
},
"credentialRef": {
"$ref": "#/$defs/credentialRef"
},
"inputPricePerMTok": {
"type": "number",
"minimum": 0,
"description": "Optional, USD per million input tokens, for models the relay has no price table for."
},
"outputPricePerMTok": {
"type": "number",
"minimum": 0,
"description": "Optional, USD per million output tokens."
},
"when": {
"type": "array",
"uniqueItems": true,
"items": {
"enum": [
"overloaded",
"refusal",
"timeout"
]
},
"description": "`overloaded` (provider 429/529/5xx after retries), `refusal`, `timeout`."
}
},
"allOf": [
{
"if": {
"properties": {
"provider": {
"const": "anthropic"
}
}
},
"then": {
"properties": {
"id": {
"pattern": "^claude-",
"patternErrorMessage": "an Anthropic model id starts with claude-"
}
}
}
},
{
"if": {
"properties": {
"provider": {
"const": "openai-compatible"
}
}
},
"then": {
"required": [
"baseURL"
]
}
},
{
"if": {
"properties": {
"provider": {
"not": {
"const": "demo"
}
}
}
},
"then": {
"required": [
"credentialRef"
]
}
}
]
},
"themeId": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9-]{0,39}$",
"patternErrorMessage": "a theme id is 1-40 of a-z, 0-9 and -, starting with a letter or digit",
"description": "A theme: one of the account's `themes[].id`, a preset (`base`, the default; `quiet`, `harbour`, `refined-calm`, `amber`, `paperwhite`, `nord`), or any shared dbo-contracts ColorTheme id (config-schema §3.6)."
},
"themeColor": {
"type": "string",
"pattern": "^#[0-9A-Fa-f]{6}([0-9A-Fa-f]{2})?$",
"patternErrorMessage": "a theme color is #RRGGBB or #RRGGBBAA",
"description": "A ColorTheme color, #RRGGBB or #RRGGBBAA (surfaces must be opaque; checked by configcheck)."
},
"colorTheme": {
"type": "object",
"description": "A dbo-contracts ColorTheme document as Streamline reads it (config-schema §3.6): `schema` 1 and up to five sections of colors. Any subset may be given; the rest is completed, then derived. Unknown keys and `typography` are dropped; a future `schema` is refused (the theme falls back).",
"required": [
"surfaces"
],
"properties": {
"schema": {
"const": 1,
"description": "The ColorTheme schema version; only 1 is read."
},
"name": {
"type": "string",
"maxLength": 60,
"description": "Display name."
},
"surfaces": {
"type": "object",
"description": "Grounds: bg (required), surface, surfaceLift, border, borderBright, input, … Opaque only.",
"required": [
"bg"
],
"additionalProperties": {
"$ref": "#/$defs/themeColor"
}
},
"accents": {
"type": "object",
"description": "accent, accentBright, accentDim, secondary, secondaryBright.",
"additionalProperties": {
"$ref": "#/$defs/themeColor"
}
},
"semantics": {
"type": "object",
"description": "success, warning, error, … (meaning, not decoration).",
"additionalProperties": {
"$ref": "#/$defs/themeColor"
}
},
"text": {
"type": "object",
"description": "primary, bright, secondary, muted, placeholder, …",
"additionalProperties": {
"$ref": "#/$defs/themeColor"
}
},
"actions": {
"type": "object",
"description": "add, edit, delete, view: all four or none.",
"additionalProperties": {
"$ref": "#/$defs/themeColor"
}
}
}
},
"themeSide": {
"description": "One appearance of an own theme: a shared ColorTheme id, or a ColorTheme document.",
"anyOf": [
{
"$ref": "#/$defs/themeId"
},
{
"$ref": "#/$defs/colorTheme"
}
],
"errorMessage": "a theme side is a theme id or a ColorTheme document"
},
"ownTheme": {
"type": "object",
"description": "An account's own theme: `{ id, name, light, dark? }`. No `dark`: one-sided, worn in both appearances (baseline only).",
"required": [
"id",
"name",
"light"
],
"additionalProperties": false,
"properties": {
"id": {
"$ref": "#/$defs/themeId",
"description": "Unique among the account's themes, and not a preset id."
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 40,
"description": "Shown in pickers."
},
"light": {
"$ref": "#/$defs/themeSide",
"description": "The light appearance (or the only one)."
},
"dark": {
"$ref": "#/$defs/themeSide",
"description": "The dark appearance."
}
}
},
"streamlineTheme": {
"description": "What a streamline wears: a theme id (that theme whole; it must have both appearances), or `{ base?, accent? }` (base default the account's theme; accent replaces its accent).",
"anyOf": [
{
"$ref": "#/$defs/themeId"
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"base": {
"$ref": "#/$defs/themeId",
"description": "The theme to start from. Default: the account's."
},
"accent": {
"$ref": "#/$defs/colorPair",
"description": "Replaces the base's accent, `{light, dark}` #RRGGBB."
}
}
}
],
"errorMessage": "a streamline theme is a theme id or { base, accent }"
},
"category": { "enum": ["travel", "shopping", "productivity", "business", "finance", "developer-tools", "lifestyle", "health", "education", "entertainment"], "title": "Category", "description": "Where the Library groups a streamline (2026-10-20, scale-and-speed Phase 3; config-schema §4): the same ten categories as a Discover listing's `category` (§8c). Unset: Other." }
}
}