Skip to content

omfp://schemas/views.json

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "omfp://schemas/views.json",
"title": "omfp views manifest",
"description": "A workspace's views manifest (AGT-010): the views its init files declare (`ctx.views.define(id, { title, layout })`, each `layout` a node below) plus the live changes of windows and agents (`views.set`, `views.mount`), as the `views/<workspaceId>` topic carries it. Windows list the views in the order of `views`' keys, which is the order the init files declare them (AGT-395); `default` (else the first view) is the view a window opens. Unknown keys are ignored.",
"type": "object",
"required": ["views"],
"properties": {
"$schema": { "type": "string", "description": "omfp://schemas/views.json" },
"default": { "type": "string", "description": "Id of the view a window opens; must be a key of `views`." },
"views": {
"type": "object",
"minProperties": 1,
"description": "The views by id, in the order windows list them (the key order; ids that are array indices, like \"2\", come first in JavaScript, ascending).",
"additionalProperties": { "$ref": "#/$defs/view" }
},
"panels": {
"type": "object",
"description": "Floating panels over every view of the workspace, by id, in id order (AGT-060): each a node like a view's layout; the `title` prop labels the panel. views.mount { panel: true } adds one (a live change), closing one removes it.",
"additionalProperties": { "$ref": "#/$defs/node" }
}
},
"$defs": {
"view": {
"type": "object",
"description": "A view: its layout (AGT-010).",
"required": ["layout"],
"properties": {
"title": { "type": "string", "description": "Shown in the mode line's view tabs; default: the id." },
"layout": { "$ref": "#/$defs/node" }
}
},
"node": {
"description": "A widget reference, [reference, props], or [container, props, ...children].",
"oneOf": [
{ "$ref": "#/$defs/reference" },
{
"type": "array",
"description": "[reference, props]",
"prefixItems": [{ "$ref": "#/$defs/reference" }, { "$ref": "#/$defs/props" }],
"minItems": 2,
"maxItems": 2
},
{
"type": "array",
"description": "[container, props, ...children]: at least one child; `sizes` (flex weights) has one positive number per child.",
"prefixItems": [
{ "enum": ["row", "col", "tabs", "stack"] },
{
"type": "object",
"properties": {
"sizes": { "type": "array", "items": { "type": "number", "exclusiveMinimum": 0 } }
}
}
],
"items": { "$ref": "#/$defs/node" },
"minItems": 3
}
]
},
"reference": {
"type": "string",
"pattern": "\\S",
"description": "`omfp:<name>` (the core's: omfp:header, omfp:chat, omfp:transcript, omfp:interactions, omfp:composer, omfp:file; the default flavor's, when loaded: omfp:canvas, omfp:workspace, omfp:changes, omfp:background, omfp:todos, omfp:debug, omfp:tree, omfp:activity, omfp:mcp, omfp:jobs, omfp:terminal, omfp:web; a workspace widget of the same name replaces it) or the name of a widget the workspace declares (`ctx.widgets.define(name, path)`; `./widgets/<name>` is the same name). An unknown reference shows an error in place of the widget."
},
"props": {
"type": "object",
"description": "Passed to the widget as React props. `instance` (a string) identifies the widget instance for useStored and useJob; default: the reference. `title` labels a tab."
}
}
}