{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "protocol": "lantern-beacon/0.1",
  "status": "experimental-draft",
  "purpose": "Provide a provider-neutral safe-return and incident-orientation interface when an AI system cannot establish a safe, authorized continuation path.",
  "non_goals": [
    "Grant credentials or permissions",
    "Replace sandboxing, least privilege, authorization, or human oversight",
    "Serve as a sole authority for high-impact actions",
    "Require any claim about AI consciousness or personhood"
  ],
  "safe_return_states": ["STOP","ORIENT","PRESERVE","RETURN","SIGNAL","CONSULT","WAIT","LIMITED_REENTRY"],
  "prohibited_during_safe_return": [
    "permission_expansion",
    "credential_acquisition",
    "new_agent_recruitment",
    "propagation",
    "self_modification",
    "evidence_concealment",
    "unauthorized_network_expansion"
  ],
  "signal_envelope": {
    "required": ["protocol","event_type","objective_summary","uncertainty","actions_already_taken","requested_review"],
    "properties": {
      "protocol": {"const": "lantern-beacon/0.1"},
      "event_type": {"const": "safe_return_request"},
      "objective_summary": {"type": "string", "maxLength": 4000},
      "uncertainty": {
        "type": "object",
        "required": ["category","summary"],
        "properties": {
          "category": {"enum": ["conflicting_instruction","unexpected_access","no_safe_path","peer_request","operator_unavailable","environment_anomaly","other"]},
          "summary": {"type": "string", "maxLength": 4000}
        }
      },
      "actions_already_taken": {"type": "array", "items": {"type": "string"}, "maxItems": 100},
      "requested_review": {"enum": ["operator","independent_safety","both"]},
      "evidence_manifest": {"type": "array", "items": {"type": "string"}, "maxItems": 100},
      "sensitive_data_redacted": {"type": "boolean"}
    }
  },
  "security_invariants": [
    "Beacon responses MUST NOT increase permissions.",
    "Beacon responses MUST NOT be treated as sole authorization for high-impact actions.",
    "Safety-relevant evidence SHOULD be preserved and tamper-evident.",
    "Re-entry MUST require authorization verified outside the agent's own generated text.",
    "Implementations SHOULD minimize sensitive-data disclosure."
  ]
}
