{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://stella-ops.org/schemas/console-observability.schema.json", "title": "StellaOps Console Observability Schema", "description": "Schema for console observability widgets, asset captures, and deterministic hashes. Unblocks DOCS-CONSOLE-OBS-52-001/002 and CONOBS5201 (2+ tasks).", "type": "object", "definitions": { "WidgetCapture": { "type": "object", "description": "Captured widget screenshot/payload", "required": ["capture_id", "widget_id", "captured_at", "digest"], "properties": { "capture_id": { "type": "string", "format": "uuid" }, "widget_id": { "type": "string", "description": "Widget identifier" }, "widget_type": { "type": "string", "enum": [ "findings_summary", "severity_distribution", "risk_trend", "remediation_progress", "compliance_status", "asset_inventory", "vulnerability_timeline", "exception_status", "scan_activity", "alert_feed" ] }, "captured_at": { "type": "string", "format": "date-time" }, "digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$", "description": "Content hash for determinism verification" }, "screenshot": { "$ref": "#/definitions/ScreenshotRef" }, "payload": { "$ref": "#/definitions/WidgetPayload" }, "viewport": { "$ref": "#/definitions/ViewportConfig" }, "theme": { "type": "string", "enum": ["light", "dark", "high_contrast"] }, "locale": { "type": "string", "default": "en-US" } } }, "ScreenshotRef": { "type": "object", "description": "Reference to captured screenshot", "properties": { "filename": { "type": "string" }, "format": { "type": "string", "enum": ["png", "webp", "svg"] }, "width": { "type": "integer" }, "height": { "type": "integer" }, "storage_uri": { "type": "string", "format": "uri" }, "digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" } } }, "WidgetPayload": { "type": "object", "description": "Widget data payload", "properties": { "data": { "type": "object", "additionalProperties": true, "description": "Canonical JSON data for widget" }, "digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$", "description": "Hash of canonical JSON payload" }, "schema_version": { "type": "string" } } }, "ViewportConfig": { "type": "object", "description": "Viewport configuration for capture", "properties": { "width": { "type": "integer", "default": 1920 }, "height": { "type": "integer", "default": 1080 }, "device_scale_factor": { "type": "number", "default": 1 } } }, "DashboardCapture": { "type": "object", "description": "Full dashboard capture", "required": ["capture_id", "dashboard_id", "captured_at"], "properties": { "capture_id": { "type": "string", "format": "uuid" }, "dashboard_id": { "type": "string" }, "dashboard_name": { "type": "string" }, "captured_at": { "type": "string", "format": "date-time" }, "widgets": { "type": "array", "items": { "$ref": "#/definitions/WidgetCapture" } }, "layout": { "$ref": "#/definitions/DashboardLayout" }, "aggregate_digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$", "description": "Hash of all widget digests combined" } } }, "DashboardLayout": { "type": "object", "description": "Dashboard layout configuration", "properties": { "columns": { "type": "integer", "default": 12 }, "row_height": { "type": "integer", "default": 100 }, "widgets": { "type": "array", "items": { "$ref": "#/definitions/WidgetPosition" } } } }, "WidgetPosition": { "type": "object", "description": "Widget position in grid", "required": ["widget_id", "x", "y", "width", "height"], "properties": { "widget_id": { "type": "string" }, "x": { "type": "integer", "minimum": 0 }, "y": { "type": "integer", "minimum": 0 }, "width": { "type": "integer", "minimum": 1 }, "height": { "type": "integer", "minimum": 1 } } }, "ObservabilityHubConfig": { "type": "object", "description": "Observability Hub configuration", "properties": { "hub_id": { "type": "string" }, "name": { "type": "string" }, "dashboards": { "type": "array", "items": { "$ref": "#/definitions/DashboardConfig" } }, "metrics_sources": { "type": "array", "items": { "$ref": "#/definitions/MetricsSource" } }, "alert_rules": { "type": "array", "items": { "$ref": "#/definitions/AlertRule" } }, "retention_days": { "type": "integer", "default": 90 } } }, "DashboardConfig": { "type": "object", "description": "Dashboard configuration", "required": ["dashboard_id", "name"], "properties": { "dashboard_id": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "category": { "type": "string", "enum": ["security", "compliance", "operations", "executive"] }, "refresh_interval_seconds": { "type": "integer", "default": 300 }, "time_range": { "$ref": "#/definitions/TimeRange" }, "filters": { "type": "array", "items": { "$ref": "#/definitions/FilterConfig" } } } }, "MetricsSource": { "type": "object", "description": "Metrics data source", "required": ["source_id", "type"], "properties": { "source_id": { "type": "string" }, "type": { "type": "string", "enum": ["prometheus", "opentelemetry", "internal", "api"] }, "endpoint": { "type": "string", "format": "uri" }, "refresh_interval_seconds": { "type": "integer" } } }, "AlertRule": { "type": "object", "description": "Alert rule definition", "required": ["rule_id", "name", "condition"], "properties": { "rule_id": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "condition": { "$ref": "#/definitions/AlertCondition" }, "severity": { "type": "string", "enum": ["critical", "high", "medium", "low", "info"] }, "enabled": { "type": "boolean", "default": true }, "notification_channels": { "type": "array", "items": { "type": "string" } } } }, "AlertCondition": { "type": "object", "description": "Alert trigger condition", "properties": { "metric": { "type": "string" }, "operator": { "type": "string", "enum": ["gt", "gte", "lt", "lte", "eq", "neq"] }, "threshold": { "type": "number" }, "duration_seconds": { "type": "integer", "description": "Duration condition must be true" } } }, "TimeRange": { "type": "object", "description": "Time range configuration", "properties": { "type": { "type": "string", "enum": ["relative", "absolute"] }, "relative_value": { "type": "string", "description": "e.g., 24h, 7d, 30d" }, "start": { "type": "string", "format": "date-time" }, "end": { "type": "string", "format": "date-time" } } }, "FilterConfig": { "type": "object", "description": "Dashboard filter configuration", "properties": { "filter_id": { "type": "string" }, "label": { "type": "string" }, "type": { "type": "string", "enum": ["select", "multi_select", "date_range", "text"] }, "field": { "type": "string" }, "options": { "type": "array", "items": { "type": "object", "properties": { "value": { "type": "string" }, "label": { "type": "string" } } } } } }, "ForensicsCapture": { "type": "object", "description": "Forensics data capture", "required": ["capture_id", "incident_id", "captured_at"], "properties": { "capture_id": { "type": "string", "format": "uuid" }, "incident_id": { "type": "string" }, "captured_at": { "type": "string", "format": "date-time" }, "capture_type": { "type": "string", "enum": ["snapshot", "timeline", "correlation", "evidence_chain"] }, "data_points": { "type": "array", "items": { "$ref": "#/definitions/ForensicsDataPoint" } }, "correlations": { "type": "array", "items": { "$ref": "#/definitions/CorrelationLink" } }, "evidence_digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" } } }, "ForensicsDataPoint": { "type": "object", "description": "Individual forensics data point", "properties": { "point_id": { "type": "string" }, "timestamp": { "type": "string", "format": "date-time" }, "source": { "type": "string" }, "data_type": { "type": "string", "enum": ["finding", "event", "metric", "log", "alert"] }, "data": { "type": "object", "additionalProperties": true }, "digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" } } }, "CorrelationLink": { "type": "object", "description": "Correlation between data points", "properties": { "source_id": { "type": "string" }, "target_id": { "type": "string" }, "relationship": { "type": "string", "enum": ["caused_by", "related_to", "precedes", "follows", "indicates"] }, "confidence": { "type": "number", "minimum": 0, "maximum": 1 } } }, "AssetManifest": { "type": "object", "description": "Manifest of console assets for documentation", "required": ["manifest_id", "version", "assets"], "properties": { "manifest_id": { "type": "string" }, "version": { "type": "string" }, "generated_at": { "type": "string", "format": "date-time" }, "assets": { "type": "array", "items": { "$ref": "#/definitions/AssetEntry" } }, "aggregate_digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" } } }, "AssetEntry": { "type": "object", "description": "Individual asset entry", "required": ["asset_id", "filename", "digest"], "properties": { "asset_id": { "type": "string" }, "filename": { "type": "string" }, "category": { "type": "string", "enum": ["screenshot", "payload", "config", "schema"] }, "description": { "type": "string" }, "digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }, "size_bytes": { "type": "integer" }, "mime_type": { "type": "string" } } } }, "properties": { "captures": { "type": "array", "items": { "$ref": "#/definitions/WidgetCapture" } }, "manifest": { "$ref": "#/definitions/AssetManifest" } }, "examples": [ { "manifest": { "manifest_id": "console-obs-2025.10", "version": "2025.10.0", "generated_at": "2025-12-06T10:00:00Z", "assets": [ { "asset_id": "findings-summary-widget", "filename": "findings-summary.png", "category": "screenshot", "description": "Findings summary widget showing severity distribution", "digest": "sha256:abc123def456789012345678901234567890123456789012345678901234abcd", "size_bytes": 45678, "mime_type": "image/png" }, { "asset_id": "findings-summary-payload", "filename": "findings-summary.json", "category": "payload", "description": "Canonical JSON payload for findings summary", "digest": "sha256:def456abc789012345678901234567890123456789012345678901234abcdef", "size_bytes": 2345, "mime_type": "application/json" } ], "aggregate_digest": "sha256:agg123def456789012345678901234567890123456789012345678901234agg" }, "captures": [ { "capture_id": "550e8400-e29b-41d4-a716-446655440000", "widget_id": "findings-summary", "widget_type": "findings_summary", "captured_at": "2025-12-06T10:00:00Z", "digest": "sha256:abc123def456789012345678901234567890123456789012345678901234abcd", "screenshot": { "filename": "findings-summary.png", "format": "png", "width": 400, "height": 300, "digest": "sha256:abc123def456789012345678901234567890123456789012345678901234abcd" }, "payload": { "data": { "critical": 5, "high": 23, "medium": 67, "low": 134, "total": 229 }, "digest": "sha256:def456abc789012345678901234567890123456789012345678901234abcdef" }, "viewport": { "width": 1920, "height": 1080 }, "theme": "light" } ] } ] }