577 lines
20 KiB
JSON
577 lines
20 KiB
JSON
{
|
||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||
"$id": "urn:awoooi:github-target-owner-decision-response-v1",
|
||
"title": "GitHub Target Owner Decision Response 收件契約 v1",
|
||
"description": "定義 owner 回覆 GitHub target / owner / visibility / canonical 決策時的收件欄位、驗收規則與拒收規則。此 schema 不授權建立 repo、修改 visibility、同步 refs、保存 secret value 或切換 GitHub primary。",
|
||
"type": "object",
|
||
"required": [
|
||
"schema_version",
|
||
"status",
|
||
"date",
|
||
"mode",
|
||
"runtime_execution_authorized",
|
||
"source_contract",
|
||
"target_contract",
|
||
"source_indexes",
|
||
"summary",
|
||
"target_owner_handoff_preflight_checks",
|
||
"target_owner_handoff_packet",
|
||
"post_dispatch_invariants",
|
||
"response_templates",
|
||
"acceptance_checks",
|
||
"rejection_rules",
|
||
"allowed_outputs",
|
||
"forbidden_actions"
|
||
],
|
||
"properties": {
|
||
"schema_version": {
|
||
"const": "github_target_owner_decision_response_v1"
|
||
},
|
||
"status": {
|
||
"type": "string",
|
||
"enum": ["draft_waiting_owner_response"]
|
||
},
|
||
"date": {
|
||
"type": "string"
|
||
},
|
||
"mode": {
|
||
"type": "string",
|
||
"enum": ["owner_decision_response_intake_only"]
|
||
},
|
||
"runtime_execution_authorized": {
|
||
"type": "boolean",
|
||
"const": false
|
||
},
|
||
"source_contract": {
|
||
"type": "string",
|
||
"const": "github_target_decision_v1"
|
||
},
|
||
"target_contract": {
|
||
"type": "string",
|
||
"const": "github_target_repo_approval_package_v1"
|
||
},
|
||
"source_indexes": {
|
||
"type": "array",
|
||
"items": {"type": "string"},
|
||
"minItems": 1
|
||
},
|
||
"summary": {
|
||
"type": "object",
|
||
"required": [
|
||
"owner_response_status",
|
||
"target_decision_count",
|
||
"approval_required_target_count",
|
||
"owner_response_request_packet_count",
|
||
"owner_response_template_status_count",
|
||
"owner_response_audit_event_template_count",
|
||
"owner_response_redaction_example_count",
|
||
"owner_response_collection_check_count",
|
||
"intake_preflight_check_count",
|
||
"response_template_count",
|
||
"received_response_count",
|
||
"accepted_response_count",
|
||
"rejected_response_count",
|
||
"acceptance_check_count",
|
||
"rejection_rule_count",
|
||
"repo_creation_authorized",
|
||
"visibility_change_authorized",
|
||
"refs_sync_authorized",
|
||
"github_primary_switch_authorized",
|
||
"secret_value_collection_allowed",
|
||
"action_buttons_allowed",
|
||
"target_owner_handoff_package_ready",
|
||
"target_owner_handoff_completion_percent",
|
||
"target_owner_handoff_check_count",
|
||
"target_owner_handoff_packet_field_count",
|
||
"target_owner_request_dispatch_authorized",
|
||
"not_found_or_private_as_absent_allowed",
|
||
"repo_creation_allowed_without_owner_response",
|
||
"visibility_change_allowed_without_owner_response",
|
||
"github_target_owner_response_handoff_not_approval"
|
||
],
|
||
"properties": {
|
||
"owner_response_status": {
|
||
"type": "string",
|
||
"enum": ["waiting_owner_response"]
|
||
},
|
||
"target_decision_count": {"type": "integer", "minimum": 0},
|
||
"approval_required_target_count": {"type": "integer", "minimum": 0},
|
||
"owner_response_request_packet_count": {"type": "integer", "minimum": 0},
|
||
"owner_response_template_status_count": {"type": "integer", "minimum": 0},
|
||
"owner_response_audit_event_template_count": {"type": "integer", "minimum": 0},
|
||
"owner_response_redaction_example_count": {"type": "integer", "minimum": 0},
|
||
"owner_response_collection_check_count": {"type": "integer", "minimum": 0},
|
||
"intake_preflight_check_count": {"type": "integer", "minimum": 0},
|
||
"response_template_count": {"type": "integer", "minimum": 0},
|
||
"received_response_count": {"type": "integer", "minimum": 0},
|
||
"accepted_response_count": {"type": "integer", "minimum": 0},
|
||
"rejected_response_count": {"type": "integer", "minimum": 0},
|
||
"acceptance_check_count": {"type": "integer", "minimum": 0},
|
||
"rejection_rule_count": {"type": "integer", "minimum": 0},
|
||
"repo_creation_authorized": {"type": "boolean", "const": false},
|
||
"visibility_change_authorized": {"type": "boolean", "const": false},
|
||
"refs_sync_authorized": {"type": "boolean", "const": false},
|
||
"github_primary_switch_authorized": {"type": "boolean", "const": false},
|
||
"secret_value_collection_allowed": {"type": "boolean", "const": false},
|
||
"action_buttons_allowed": {"type": "boolean", "const": false},
|
||
"target_owner_handoff_package_ready": {"type": "boolean", "const": true},
|
||
"target_owner_handoff_completion_percent": {
|
||
"type": "integer",
|
||
"minimum": 0,
|
||
"maximum": 100
|
||
},
|
||
"target_owner_handoff_check_count": {"type": "integer", "minimum": 0},
|
||
"target_owner_handoff_packet_field_count": {"type": "integer", "minimum": 0},
|
||
"target_owner_request_dispatch_authorized": {"type": "boolean", "const": false},
|
||
"not_found_or_private_as_absent_allowed": {"type": "boolean", "const": false},
|
||
"repo_creation_allowed_without_owner_response": {"type": "boolean", "const": false},
|
||
"visibility_change_allowed_without_owner_response": {"type": "boolean", "const": false},
|
||
"github_target_owner_response_handoff_not_approval": {"type": "boolean", "const": true}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"target_owner_handoff_preflight_checks": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "object",
|
||
"required": [
|
||
"check_id",
|
||
"display_order",
|
||
"check",
|
||
"current_status",
|
||
"execution_authorized"
|
||
],
|
||
"properties": {
|
||
"check_id": {"type": "string"},
|
||
"display_order": {"type": "integer", "minimum": 1},
|
||
"check": {"type": "string"},
|
||
"current_status": {
|
||
"type": "string",
|
||
"enum": ["defined_not_dispatched"]
|
||
},
|
||
"execution_authorized": {"type": "boolean", "const": false}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"minItems": 1
|
||
},
|
||
"target_owner_handoff_packet": {
|
||
"type": "object",
|
||
"required": [
|
||
"request_id",
|
||
"stage_id",
|
||
"prerequisite_gates",
|
||
"requested_templates",
|
||
"target_probe_summary",
|
||
"recipient_role_or_team_required",
|
||
"required_response_fields",
|
||
"forbidden_inputs",
|
||
"not_approval",
|
||
"execution_authorized"
|
||
],
|
||
"properties": {
|
||
"request_id": {"type": "string"},
|
||
"stage_id": {"type": "string"},
|
||
"prerequisite_gates": {
|
||
"type": "array",
|
||
"items": {"type": "string"},
|
||
"minItems": 1
|
||
},
|
||
"requested_templates": {
|
||
"type": "array",
|
||
"items": {"type": "string"},
|
||
"minItems": 1
|
||
},
|
||
"target_probe_summary": {
|
||
"type": "object",
|
||
"required": [
|
||
"candidate_count",
|
||
"exists_count",
|
||
"not_found_or_private_count",
|
||
"external_scope_summary_repo"
|
||
],
|
||
"properties": {
|
||
"candidate_count": {"type": "integer", "minimum": 0},
|
||
"exists_count": {"type": "integer", "minimum": 0},
|
||
"not_found_or_private_count": {"type": "integer", "minimum": 0},
|
||
"external_scope_summary_repo": {"type": "string"}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"recipient_role_or_team_required": {"type": "boolean", "const": true},
|
||
"required_response_fields": {
|
||
"type": "array",
|
||
"items": {"type": "string"},
|
||
"minItems": 1
|
||
},
|
||
"forbidden_inputs": {
|
||
"type": "array",
|
||
"items": {"type": "string"},
|
||
"minItems": 1
|
||
},
|
||
"not_approval": {"type": "boolean", "const": true},
|
||
"execution_authorized": {"type": "boolean", "const": false}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"post_dispatch_invariants": {
|
||
"type": "array",
|
||
"items": {"type": "string"},
|
||
"minItems": 1
|
||
},
|
||
"owner_response_request_packet": {
|
||
"type": "object",
|
||
"description": "AwoooP 可直接顯示給 owner 的 S4.10 GitHub target owner decision 回覆請求;只說明要填什麼與不得貼什麼,不授權 repo、visibility、refs 或 primary 執行。",
|
||
"required": [
|
||
"request_id",
|
||
"display_status",
|
||
"requested_packet",
|
||
"required_response_item_count",
|
||
"requested_template_ids",
|
||
"owner_instruction_summary",
|
||
"allowed_response_fields",
|
||
"evidence_ref_rules",
|
||
"forbidden_payloads",
|
||
"allowed_submission_modes",
|
||
"awooop_display_mode",
|
||
"execution_authorized",
|
||
"not_approval",
|
||
"still_forbidden"
|
||
],
|
||
"properties": {
|
||
"request_id": {"type": "string"},
|
||
"display_status": {"type": "string", "enum": ["ready_to_request_owner_response"]},
|
||
"requested_packet": {"type": "string"},
|
||
"required_response_item_count": {"type": "integer", "minimum": 0},
|
||
"requested_template_ids": {
|
||
"type": "array",
|
||
"items": {"type": "string"},
|
||
"minItems": 1
|
||
},
|
||
"owner_instruction_summary": {"type": "string"},
|
||
"allowed_response_fields": {
|
||
"type": "array",
|
||
"items": {"type": "string"},
|
||
"minItems": 1
|
||
},
|
||
"evidence_ref_rules": {
|
||
"type": "array",
|
||
"items": {"type": "string"},
|
||
"minItems": 1
|
||
},
|
||
"forbidden_payloads": {
|
||
"type": "array",
|
||
"items": {"type": "string"},
|
||
"minItems": 1
|
||
},
|
||
"allowed_submission_modes": {
|
||
"type": "array",
|
||
"items": {"type": "string"},
|
||
"minItems": 1
|
||
},
|
||
"awooop_display_mode": {"type": "string", "enum": ["display_owner_response_request_only"]},
|
||
"execution_authorized": {"type": "boolean", "const": false},
|
||
"not_approval": {"type": "boolean", "const": true},
|
||
"still_forbidden": {
|
||
"type": "array",
|
||
"items": {"type": "string"},
|
||
"minItems": 1
|
||
}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"owner_response_template_statuses": {
|
||
"type": "array",
|
||
"description": "S4.10 七個 GitHub target response templates 的逐項收件狀態;只供 AwoooP 顯示,不代表 approval 或 execution queue。",
|
||
"items": {
|
||
"type": "object",
|
||
"required": [
|
||
"template_id",
|
||
"github_repo",
|
||
"source_key",
|
||
"display_order",
|
||
"collection_status",
|
||
"request_status",
|
||
"received_response_count",
|
||
"accepted_response_count",
|
||
"rejected_response_count",
|
||
"latest_outcome_lane",
|
||
"next_owner_action",
|
||
"awooop_display_mode",
|
||
"execution_authorized",
|
||
"not_approval",
|
||
"still_forbidden"
|
||
],
|
||
"properties": {
|
||
"template_id": {"type": "string"},
|
||
"github_repo": {"type": "string"},
|
||
"source_key": {"type": "string"},
|
||
"display_order": {"type": "integer", "minimum": 1},
|
||
"collection_status": {"type": "string", "enum": ["waiting_owner_response"]},
|
||
"request_status": {"type": "string", "enum": ["request_ready_not_sent"]},
|
||
"received_response_count": {"type": "integer", "minimum": 0},
|
||
"accepted_response_count": {"type": "integer", "minimum": 0},
|
||
"rejected_response_count": {"type": "integer", "minimum": 0},
|
||
"latest_outcome_lane": {"type": "string", "enum": ["keep_waiting_owner_response"]},
|
||
"next_owner_action": {"type": "string"},
|
||
"awooop_display_mode": {"type": "string", "enum": ["display_template_status_only"]},
|
||
"execution_authorized": {"type": "boolean", "const": false},
|
||
"not_approval": {"type": "boolean", "const": true},
|
||
"still_forbidden": {
|
||
"type": "array",
|
||
"items": {"type": "string"},
|
||
"minItems": 1
|
||
}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"minItems": 1
|
||
},
|
||
"owner_response_audit_event_templates": {
|
||
"type": "array",
|
||
"description": "AwoooP 可照此格式記錄 S4.10 GitHub target owner response 流程的脫敏 audit metadata;此欄位只是模板,尚未代表 runtime ingestion。",
|
||
"items": {
|
||
"type": "object",
|
||
"required": [
|
||
"event_template_id",
|
||
"display_order",
|
||
"event_status",
|
||
"trigger",
|
||
"purpose",
|
||
"allowed_metadata_fields",
|
||
"forbidden_payloads",
|
||
"emitted_event_count",
|
||
"stored_raw_payload_allowed",
|
||
"awooop_display_mode",
|
||
"execution_authorized",
|
||
"not_approval"
|
||
],
|
||
"properties": {
|
||
"event_template_id": {"type": "string"},
|
||
"display_order": {"type": "integer", "minimum": 1},
|
||
"event_status": {"type": "string", "enum": ["template_only_not_emitted"]},
|
||
"trigger": {"type": "string"},
|
||
"purpose": {"type": "string"},
|
||
"allowed_metadata_fields": {"type": "array", "items": {"type": "string"}, "minItems": 1},
|
||
"forbidden_payloads": {"type": "array", "items": {"type": "string"}, "minItems": 1},
|
||
"emitted_event_count": {"type": "integer", "minimum": 0},
|
||
"stored_raw_payload_allowed": {"type": "boolean", "const": false},
|
||
"awooop_display_mode": {"type": "string", "enum": ["display_audit_template_only"]},
|
||
"execution_authorized": {"type": "boolean", "const": false},
|
||
"not_approval": {"type": "boolean", "const": true}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"minItems": 1
|
||
},
|
||
"owner_response_redaction_examples": {
|
||
"type": "array",
|
||
"description": "Owner 回覆 S4.10 GitHub target owner decision 時可參考的脫敏範例;只供 AwoooP 顯示,不代表收件、驗收或執行授權。",
|
||
"items": {
|
||
"type": "object",
|
||
"required": [
|
||
"example_id",
|
||
"display_order",
|
||
"example_status",
|
||
"category",
|
||
"safe_response_shape",
|
||
"required_redactions",
|
||
"forbidden_raw_values",
|
||
"stored_raw_payload_allowed",
|
||
"awooop_display_mode",
|
||
"execution_authorized",
|
||
"not_approval"
|
||
],
|
||
"properties": {
|
||
"example_id": {"type": "string"},
|
||
"display_order": {"type": "integer", "minimum": 1},
|
||
"example_status": {"type": "string", "enum": ["template_example_only"]},
|
||
"category": {"type": "string"},
|
||
"safe_response_shape": {"type": "array", "items": {"type": "string"}, "minItems": 1},
|
||
"required_redactions": {"type": "array", "items": {"type": "string"}, "minItems": 1},
|
||
"forbidden_raw_values": {"type": "array", "items": {"type": "string"}, "minItems": 1},
|
||
"stored_raw_payload_allowed": {"type": "boolean", "const": false},
|
||
"awooop_display_mode": {"type": "string", "enum": ["display_redaction_example_only"]},
|
||
"execution_authorized": {"type": "boolean", "const": false},
|
||
"not_approval": {"type": "boolean", "const": true}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"minItems": 1
|
||
},
|
||
"owner_response_collection_checks": {
|
||
"type": "array",
|
||
"description": "AwoooP 顯示 S4.10 request packet 到收回 GitHub target owner response 之間的只讀收件檢查;不得把 request ready、audit template、redaction example 誤判為 response received / accepted。",
|
||
"items": {
|
||
"type": "object",
|
||
"required": [
|
||
"check_id",
|
||
"display_order",
|
||
"title",
|
||
"required",
|
||
"pass_condition",
|
||
"failure_lane",
|
||
"awooop_display",
|
||
"execution_authorized",
|
||
"not_approval"
|
||
],
|
||
"properties": {
|
||
"check_id": {"type": "string"},
|
||
"display_order": {"type": "integer", "minimum": 1},
|
||
"title": {"type": "string"},
|
||
"required": {"type": "boolean"},
|
||
"pass_condition": {"type": "string"},
|
||
"failure_lane": {"type": "string"},
|
||
"awooop_display": {"type": "string"},
|
||
"execution_authorized": {"type": "boolean", "const": false},
|
||
"not_approval": {"type": "boolean", "const": true}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"minItems": 1
|
||
},
|
||
"intake_preflight_checks": {
|
||
"type": "array",
|
||
"description": "AwoooP 收到 S4.10 GitHub target owner response 前後可執行的只讀 preflight;只分類可收、補證或隔離,不授權 repo、visibility、refs 或 primary 執行。",
|
||
"items": {
|
||
"type": "object",
|
||
"required": [
|
||
"check_id",
|
||
"display_order",
|
||
"title",
|
||
"required",
|
||
"pass_condition",
|
||
"failure_lane",
|
||
"awooop_display",
|
||
"execution_authorized"
|
||
],
|
||
"properties": {
|
||
"check_id": {"type": "string"},
|
||
"display_order": {"type": "integer", "minimum": 1},
|
||
"title": {"type": "string"},
|
||
"required": {"type": "boolean"},
|
||
"pass_condition": {"type": "string"},
|
||
"failure_lane": {"type": "string"},
|
||
"awooop_display": {
|
||
"type": "string",
|
||
"enum": [
|
||
"ready_for_owner_review",
|
||
"request_more_evidence",
|
||
"quarantine_sensitive_payload",
|
||
"reject_execution_request"
|
||
]
|
||
},
|
||
"execution_authorized": {"type": "boolean", "const": false}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"minItems": 1
|
||
},
|
||
"response_templates": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "object",
|
||
"required": [
|
||
"template_id",
|
||
"github_repo",
|
||
"source_key",
|
||
"target_state",
|
||
"risk",
|
||
"requested_owner_decision",
|
||
"required_owner_fields",
|
||
"acceptable_decisions",
|
||
"minimum_evidence_refs",
|
||
"acceptance_criteria",
|
||
"rejection_conditions",
|
||
"allowed_outputs",
|
||
"execution_authorized"
|
||
],
|
||
"properties": {
|
||
"template_id": {"type": "string"},
|
||
"github_repo": {"type": "string"},
|
||
"source_key": {"type": "string"},
|
||
"target_state": {"type": "string"},
|
||
"risk": {"type": "string"},
|
||
"requested_owner_decision": {"type": "string"},
|
||
"required_owner_fields": {
|
||
"type": "array",
|
||
"items": {"type": "string"},
|
||
"minItems": 1
|
||
},
|
||
"acceptable_decisions": {
|
||
"type": "array",
|
||
"items": {"type": "string"},
|
||
"minItems": 1
|
||
},
|
||
"minimum_evidence_refs": {
|
||
"type": "array",
|
||
"items": {"type": "string"},
|
||
"minItems": 1
|
||
},
|
||
"acceptance_criteria": {
|
||
"type": "array",
|
||
"items": {"type": "string"},
|
||
"minItems": 1
|
||
},
|
||
"rejection_conditions": {
|
||
"type": "array",
|
||
"items": {"type": "string"},
|
||
"minItems": 1
|
||
},
|
||
"allowed_outputs": {
|
||
"type": "array",
|
||
"items": {"type": "string"},
|
||
"minItems": 1
|
||
},
|
||
"execution_authorized": {
|
||
"type": "boolean",
|
||
"const": false
|
||
}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"minItems": 1
|
||
},
|
||
"acceptance_checks": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "object",
|
||
"required": [
|
||
"check_id",
|
||
"title",
|
||
"required",
|
||
"pass_condition",
|
||
"failure_lane",
|
||
"execution_authorized"
|
||
],
|
||
"properties": {
|
||
"check_id": {"type": "string"},
|
||
"title": {"type": "string"},
|
||
"required": {"type": "boolean"},
|
||
"pass_condition": {"type": "string"},
|
||
"failure_lane": {"type": "string"},
|
||
"execution_authorized": {"type": "boolean", "const": false}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"minItems": 1
|
||
},
|
||
"rejection_rules": {
|
||
"type": "array",
|
||
"items": {"type": "string"},
|
||
"minItems": 1
|
||
},
|
||
"allowed_outputs": {
|
||
"type": "array",
|
||
"items": {"type": "string"},
|
||
"minItems": 1
|
||
},
|
||
"forbidden_actions": {
|
||
"type": "array",
|
||
"items": {"type": "string"},
|
||
"minItems": 1
|
||
}
|
||
},
|
||
"additionalProperties": false
|
||
}
|