feat: add live Neovim checkpoint views

This commit is contained in:
user
2026-07-16 18:18:52 +02:00
parent 1c06ca35d6
commit fc357bc190
4 changed files with 3035 additions and 5 deletions
+351
View File
@@ -28,6 +28,9 @@
"generated": {
"$ref": "#/$defs/generated"
},
"debug_checkpoints": {
"$ref": "#/$defs/debugCheckpoints"
},
"template": {
"type": "string",
"minLength": 1
@@ -617,6 +620,323 @@
},
"additionalProperties": false
},
"umlSnapshotRegister": {
"type": "object",
"required": ["name", "value"],
"properties": {
"name": { "type": "string", "minLength": 1 },
"value": { "type": "string", "minLength": 1 },
"note": { "type": "string" }
},
"additionalProperties": false
},
"umlSnapshotFrameField": {
"type": "object",
"required": ["name", "address", "value", "state"],
"properties": {
"name": { "type": "string", "minLength": 1 },
"address": { "type": "string", "minLength": 1 },
"value": { "type": "string", "minLength": 1 },
"size_bytes": { "type": "integer", "minimum": 1 },
"state": { "enum": ["initialised", "uninitialised", "saved"] },
"note": { "type": "string" }
},
"additionalProperties": false
},
"umlSnapshotFrame": {
"type": "object",
"required": ["name", "sp", "fp", "size_bytes", "fields"],
"properties": {
"name": { "type": "string", "minLength": 1 },
"sp": { "type": "string", "minLength": 1 },
"fp": { "type": "string", "minLength": 1 },
"stack_top": { "type": "string", "minLength": 1 },
"size_bytes": { "type": "integer", "minimum": 0 },
"fields": {
"type": "array",
"items": { "$ref": "#/$defs/umlSnapshotFrameField" }
}
},
"additionalProperties": false
},
"umlSnapshotMemoryItem": {
"type": "object",
"required": ["name", "address", "value"],
"properties": {
"name": { "type": "string", "minLength": 1 },
"address": { "type": "string", "minLength": 1 },
"value": { "type": "string", "minLength": 1 },
"note": { "type": "string" }
},
"additionalProperties": false
},
"umlSnapshotArena": {
"type": "object",
"required": ["base", "size_bytes", "cursor", "offset", "bytes"],
"properties": {
"base": { "type": "string", "minLength": 1 },
"size_bytes": { "type": "integer", "minimum": 1 },
"cursor": { "type": "string", "minLength": 1 },
"offset": {
"oneOf": [
{ "type": "integer", "minimum": 0 },
{ "type": "null" }
]
},
"bytes": { "type": "string", "minLength": 1 }
},
"additionalProperties": false
},
"umlSnapshot": {
"type": "object",
"required": ["pc", "registers", "frame", "memory", "description"],
"properties": {
"target": { "type": "string", "minLength": 1 },
"captured_at": { "type": "string", "minLength": 1 },
"captured_with": { "type": "string", "minLength": 1 },
"elf": { "type": "string", "minLength": 1 },
"pc": { "type": "string", "minLength": 1 },
"registers": {
"type": "array",
"minItems": 1,
"items": { "$ref": "#/$defs/umlSnapshotRegister" }
},
"frame": { "$ref": "#/$defs/umlSnapshotFrame" },
"memory": {
"type": "object",
"required": ["items"],
"properties": {
"items": {
"type": "array",
"items": { "$ref": "#/$defs/umlSnapshotMemoryItem" }
},
"arena": { "$ref": "#/$defs/umlSnapshotArena" }
},
"additionalProperties": false
},
"code": {
"type": "object",
"required": ["source", "assembly"],
"properties": {
"source": { "type": "string", "minLength": 1 },
"source_ref": { "type": "string" },
"assembly": { "type": "string", "minLength": 1 },
"note": { "type": "string" }
},
"additionalProperties": false
},
"description": { "type": "string", "minLength": 1 }
},
"additionalProperties": false
},
"umlSnapshotContext": {
"type": "object",
"required": ["target", "captured_at"],
"properties": {
"target": { "type": "string", "minLength": 1 },
"captured_at": { "type": "string", "minLength": 1 },
"captured_with": { "type": "string", "minLength": 1 },
"elf": { "type": "string", "minLength": 1 },
"stack_top": { "type": "string", "minLength": 1 }
},
"additionalProperties": false
},
"nvimAnnotationAnchor": {
"type": "object",
"required": ["kind"],
"properties": {
"kind": { "enum": ["screen-text", "grid-range"] },
"text": { "type": "string", "minLength": 1 },
"occurrence": { "type": "integer", "minimum": 1 },
"row": { "type": "integer", "minimum": 0 },
"column": { "type": "integer", "minimum": 0 },
"rows": { "type": "integer", "minimum": 1 },
"columns": { "type": "integer", "minimum": 1 },
"padding_cells": { "type": "integer", "minimum": 0, "maximum": 8 }
},
"allOf": [
{
"if": { "properties": { "kind": { "const": "screen-text" } } },
"then": { "required": ["text"] }
},
{
"if": { "properties": { "kind": { "const": "grid-range" } } },
"then": { "required": ["row", "column", "rows", "columns"] }
}
],
"additionalProperties": false
},
"nvimAnnotation": {
"type": "object",
"required": ["id", "anchor"],
"properties": {
"id": { "type": "string", "minLength": 1 },
"anchor_ref": {
"type": "string",
"minLength": 1,
"description": "Semantyczna kotwica rozwiązywana przez adapter Neovima; anchor jest fallbackiem dla nagranego gridu."
},
"label": { "type": "string", "minLength": 1 },
"tone": { "enum": ["danger", "info", "success", "warning"] },
"shape": { "enum": ["outline", "underline"] },
"anchor": { "$ref": "#/$defs/nvimAnnotationAnchor" }
},
"additionalProperties": false
},
"nvimStepView": {
"type": "object",
"properties": {
"connection_ref": {
"type": "string",
"minLength": 1,
"description": "Logiczny profil/adapter celu, nigdy ID procesu, bufora ani kontenera."
},
"layout": { "type": "string", "minLength": 1 },
"recorded_grid_ref": {
"type": "string",
"minLength": 1,
"description": "Wersjonowany fallback ekranu używany, gdy kontener jest offline."
},
"reveal": {
"type": "object",
"properties": {
"anchor_ref": { "type": "string", "minLength": 1 },
"align": { "enum": ["top", "center", "bottom"] }
},
"additionalProperties": false
},
"annotations": {
"type": "array",
"items": { "$ref": "#/$defs/nvimAnnotation" }
}
},
"additionalProperties": false
},
"debugCheckpointExpression": {
"type": "object",
"required": ["expr", "equals"],
"properties": {
"expr": { "type": "string", "minLength": 1 },
"equals": { "type": "integer" }
},
"additionalProperties": false
},
"debugCheckpointRecipe": {
"type": "object",
"required": ["stop"],
"properties": {
"stop": {
"type": "object",
"required": ["symbol", "offset"],
"properties": {
"symbol": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" },
"offset": { "type": "integer", "minimum": 0 },
"condition": { "type": "string", "minLength": 1 }
},
"additionalProperties": false
},
"verify": {
"type": "object",
"properties": {
"expressions": {
"type": "array",
"maxItems": 16,
"items": { "$ref": "#/$defs/debugCheckpointExpression" }
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"debugCheckpoints": {
"type": "object",
"required": ["schema", "semantics", "artifact", "targets", "items"],
"properties": {
"schema": { "const": "stem-debug-checkpoints.v1" },
"semantics": { "const": "deterministic-replay" },
"recorded_grid_pattern": {
"type": "string",
"pattern": "^[A-Za-z0-9._/-]*\\{snapshot_ref\\}[A-Za-z0-9._/-]*$"
},
"artifact": {
"type": "object",
"required": ["source", "elf"],
"properties": {
"source": { "type": "string", "minLength": 1 },
"source_git_blob": { "type": "string", "pattern": "^[0-9a-f]{40}$" },
"repository_revision": { "type": "string", "pattern": "^[0-9a-f]{40}$" },
"elf": { "type": "string", "minLength": 1 },
"hazard3_elf_sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" }
},
"additionalProperties": false
},
"targets": {
"type": "object",
"minProperties": 1,
"additionalProperties": {
"type": "object",
"required": ["adapter", "baseline"],
"properties": {
"adapter": { "type": "string", "minLength": 1 },
"baseline": { "type": "string", "minLength": 1 },
"clean_ram": { "type": "boolean" },
"requires_probe_lease": { "type": "boolean" },
"persistent_flash": { "type": "boolean" }
},
"additionalProperties": false
}
},
"items": {
"type": "object",
"minProperties": 1,
"propertyNames": { "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$" },
"additionalProperties": { "$ref": "#/$defs/debugCheckpointRecipe" }
}
},
"additionalProperties": false
},
"umlSequenceStep": {
"type": "object",
"required": ["id", "number", "label", "description", "snapshot"],
"properties": {
"id": { "type": "string", "minLength": 1 },
"number": { "type": "integer", "minimum": 1 },
"label": { "type": "string", "minLength": 1 },
"description": { "type": "string", "minLength": 1 },
"code_ref": { "type": "string" },
"progress_id": { "type": "string", "minLength": 1 },
"snapshot_ref": {
"type": "string",
"minLength": 1,
"description": "Kanoniczny stan wykonania; wiele kroków dydaktycznych może współdzielić jeden snapshot."
},
"view": { "$ref": "#/$defs/nvimStepView" },
"svg_label": {
"type": "string",
"minLength": 1,
"description": "Dokładny numer lub etykieta wiadomości PlantUML wybieranej w inline SVG."
},
"snapshot": { "$ref": "#/$defs/umlSnapshot" }
},
"additionalProperties": false
},
"umlSequencePhase": {
"type": "object",
"required": ["id", "label", "steps"],
"properties": {
"id": { "type": "string", "minLength": 1 },
"label": { "type": "string", "minLength": 1 },
"description": { "type": "string" },
"svg_label": { "type": "string", "minLength": 1 },
"steps": {
"type": "array",
"minItems": 1,
"items": { "$ref": "#/$defs/umlSequenceStep" }
}
},
"additionalProperties": false
},
"interactiveAsset": {
"type": "object",
"required": ["kind"],
@@ -628,6 +948,32 @@
"type": "string",
"minLength": 1
},
"title": {
"type": "string",
"minLength": 1
},
"block": {
"type": "object",
"required": ["id", "label"],
"properties": {
"id": { "type": "string", "minLength": 1 },
"label": { "type": "string", "minLength": 1 },
"description": { "type": "string" }
},
"additionalProperties": false
},
"snapshot_context": { "$ref": "#/$defs/umlSnapshotContext" },
"terminal_view": {
"type": "object",
"required": ["path", "alt"],
"properties": {
"path": { "type": "string", "minLength": 1 },
"title": { "type": "string", "minLength": 1 },
"alt": { "type": "string", "minLength": 1 },
"caption": { "type": "string" }
},
"additionalProperties": false
},
"arena_size": {
"type": "integer",
"minimum": 1
@@ -677,6 +1023,11 @@
},
"additionalProperties": false
}
},
"phases": {
"type": "array",
"minItems": 1,
"items": { "$ref": "#/$defs/umlSequencePhase" }
}
},
"additionalProperties": false