315 lines
10 KiB
JSON
315 lines
10 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",
|
|
"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",
|
|
"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"
|
|
],
|
|
"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},
|
|
"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}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"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
|
|
},
|
|
"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
|
|
}
|