Add stable v1 schema IDs and docs

This commit is contained in:
Luna 2026-06-16 04:05:12 -07:00
parent bfef23fc4a
commit 7a176ea238
13 changed files with 409 additions and 8 deletions

View file

@ -15,6 +15,7 @@ from datetime import datetime
from pathlib import Path
from typing import Any
from . import schemas
from .config import Config
from .netutil import is_public_ip
@ -189,7 +190,7 @@ def build_plan(bundle: dict, cfg: Config) -> dict:
numbered.append(d)
return {
"schema": "enodia.response.plan.v1",
"schema": schemas.RESPONSE_PLAN_V1,
"plan_id": f"plan-{incident_id}",
"incident_id": incident_id,
"created_at": datetime.now().astimezone().isoformat(),
@ -242,6 +243,7 @@ def persist_plan(cfg: Config, plan: dict, actor: str = "cli") -> dict[str, str]:
audit_path = response_audit_path(cfg)
record = {
"schema": schemas.RESPONSE_AUDIT_V1,
"time": datetime.now().astimezone().isoformat(),
"event": "response_plan_generated",
"actor": actor,