Schemas / Media
rig.media.code
v0.31.0 · draft 3 fields 1 required
Fields
| Field | Type | Meaning | |
|---|---|---|---|
text |
string | required | Buffer content - the source of truth, not a cache of a file |
language |
string | optional | Optional. Lowercase grammar id (gcode, svg, python, fea); absent or empty = plain text |
readOnly |
bool | optional | Optional. Edit lock hint; absent = false |
Editable source buffer. A text document the app owns; editors edit it in place. Format when present.
Compose rig.meta.named for the label, and rig.media.asset_ref on the same entity when the buffer has an on-disk origin or export target.
Distinct from rig.media.text (positioned canvas run) and rig.story.flow (semantic editorial copy).
Editor state - caret, selection, undo history, modified flags, reload counters - stays in the host.
JSON Schema
Resolves at https://rig.works/schemas/rig.media.code.schema.json —
raw file.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://rig.works/schemas/rig.media.code.schema.json",
"title": "rig.media.code",
"type": "object",
"additionalProperties": false,
"properties": {
"text": {
"$ref": "./_defs.schema.json#/$defs/string"
},
"language": {
"$ref": "./_defs.schema.json#/$defs/string"
},
"readOnly": {
"$ref": "./_defs.schema.json#/$defs/bool"
}
},
"required": [
"text"
]
}