Files
awoooi/docs/schemas/ai_agent_action_audit_ledger_v1.schema.json
Your Name e13f716c00
Some checks failed
Code Review / ai-code-review (push) Successful in 12s
Ansible / Reboot Recovery Contract / validate (push) Has been cancelled
CD Pipeline / tests (push) Successful in 1m54s
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / build-and-deploy (push) Has been cancelled
feat(agents): 新增 AI action audit ledger
2026-06-19 00:50:43 +08:00

165 lines
7.4 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "urn:awoooi:ai-agent-action-audit-ledger-v1",
"title": "AWOOOI AI Agent action audit ledger v1",
"description": "P2-410 將 P2-408 / P2-409 / P2-110C-E / Telegram egress no-new-bypass 的只讀結果收斂成 AI 行動審計帳本。此 schema 只允許 committed snapshot、audit event template、verifier receipt gate 與 governance readback不授權 audit DB 寫入、timeline 寫入、KM 寫入、PlayBook trust 寫入、Gateway queue、Telegram 實發、Bot API、production write、secret read、host write、kubectl 或不可逆操作。",
"type": "object",
"required": [
"schema_version",
"generated_at",
"program_status",
"source_refs",
"source_readbacks",
"audit_truth",
"audit_event_templates",
"verifier_receipt_gates",
"activation_boundaries",
"display_redaction_contract",
"rollups",
"next_actions"
],
"properties": {
"schema_version": { "type": "string", "const": "ai_agent_action_audit_ledger_v1" },
"generated_at": { "type": "string", "minLength": 1 },
"program_status": {
"type": "object",
"required": [
"overall_completion_percent",
"current_priority",
"current_task_id",
"next_task_id",
"read_only_mode",
"runtime_authority",
"status_note"
],
"properties": {
"overall_completion_percent": { "type": "integer", "const": 100 },
"current_priority": { "type": "string", "const": "P0" },
"current_task_id": { "type": "string", "const": "P2-410" },
"next_task_id": { "type": "string", "const": "P2-411" },
"read_only_mode": { "type": "boolean", "const": true },
"runtime_authority": { "type": "string", "const": "agent_action_audit_ledger_no_live_write_committed_snapshot" },
"status_note": { "type": "string", "minLength": 1 }
},
"additionalProperties": false
},
"source_refs": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } },
"source_readbacks": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/source_readback" } },
"audit_truth": { "type": "object", "additionalProperties": { "type": ["boolean", "integer", "string"] } },
"audit_event_templates": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/audit_event_template" } },
"verifier_receipt_gates": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/verifier_receipt_gate" } },
"activation_boundaries": { "type": "object", "additionalProperties": { "type": "boolean" } },
"display_redaction_contract": { "type": "object", "additionalProperties": { "type": ["boolean", "array", "string"] } },
"rollups": { "type": "object", "additionalProperties": { "type": ["integer", "array"] } },
"next_actions": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/next_action" } }
},
"$defs": {
"source_readback": {
"type": "object",
"required": [
"readback_id",
"source_schema_version",
"source_ref",
"endpoint",
"owner_agent",
"status",
"key_readback",
"next_action"
],
"properties": {
"readback_id": { "type": "string", "minLength": 1 },
"source_schema_version": { "type": "string", "minLength": 1 },
"source_ref": { "type": "string", "minLength": 1 },
"endpoint": { "type": "string", "minLength": 1 },
"owner_agent": { "type": "string", "enum": ["openclaw", "hermes", "nemotron", "sre", "security", "devops"] },
"status": { "type": "string", "minLength": 1 },
"key_readback": { "type": "string", "minLength": 1 },
"next_action": { "type": "string", "minLength": 1 }
},
"additionalProperties": false
},
"audit_event_template": {
"type": "object",
"required": [
"audit_event_id",
"display_name",
"owner_agent",
"event_stage",
"risk_tier",
"source_readback_ids",
"required_audit_fields",
"required_evidence_refs",
"blocked_writes",
"immutable_event_required",
"audit_db_write_allowed",
"timeline_write_allowed",
"km_write_allowed",
"playbook_trust_write_allowed",
"gateway_queue_write_allowed",
"telegram_send_allowed",
"production_write_allowed",
"side_effect_count",
"next_gate"
],
"properties": {
"audit_event_id": { "type": "string", "minLength": 1 },
"display_name": { "type": "string", "minLength": 1 },
"owner_agent": { "type": "string", "enum": ["openclaw", "hermes", "nemotron", "sre", "security", "devops"] },
"event_stage": { "type": "string", "minLength": 1 },
"risk_tier": { "type": "string", "enum": ["low", "medium", "high", "critical"] },
"source_readback_ids": { "type": "array", "minItems": 1, "items": { "type": "string" } },
"required_audit_fields": { "type": "array", "minItems": 1, "items": { "type": "string" } },
"required_evidence_refs": { "type": "array", "minItems": 1, "items": { "type": "string" } },
"blocked_writes": { "type": "array", "minItems": 1, "items": { "type": "string" } },
"immutable_event_required": { "type": "boolean", "const": true },
"audit_db_write_allowed": { "type": "boolean", "const": false },
"timeline_write_allowed": { "type": "boolean", "const": false },
"km_write_allowed": { "type": "boolean", "const": false },
"playbook_trust_write_allowed": { "type": "boolean", "const": false },
"gateway_queue_write_allowed": { "type": "boolean", "const": false },
"telegram_send_allowed": { "type": "boolean", "const": false },
"production_write_allowed": { "type": "boolean", "const": false },
"side_effect_count": { "type": "integer", "const": 0 },
"next_gate": { "type": "string", "minLength": 1 }
},
"additionalProperties": false
},
"verifier_receipt_gate": {
"type": "object",
"required": [
"gate_id",
"display_name",
"owner_agent",
"required_checks",
"failure_if_missing",
"live_verifier_allowed",
"receipt_write_allowed",
"runtime_action_allowed"
],
"properties": {
"gate_id": { "type": "string", "minLength": 1 },
"display_name": { "type": "string", "minLength": 1 },
"owner_agent": { "type": "string", "enum": ["openclaw", "hermes", "nemotron", "sre", "security", "devops"] },
"required_checks": { "type": "array", "minItems": 1, "items": { "type": "string" } },
"failure_if_missing": { "type": "string", "minLength": 1 },
"live_verifier_allowed": { "type": "boolean", "const": false },
"receipt_write_allowed": { "type": "boolean", "const": false },
"runtime_action_allowed": { "type": "boolean", "const": false }
},
"additionalProperties": false
},
"next_action": {
"type": "object",
"required": ["task_id", "priority", "summary", "gate"],
"properties": {
"task_id": { "type": "string", "minLength": 1 },
"priority": { "type": "string", "enum": ["P0", "P1", "P2", "P3"] },
"summary": { "type": "string", "minLength": 1 },
"gate": { "type": "string", "minLength": 1 }
},
"additionalProperties": false
}
},
"additionalProperties": false
}