| {
|
| "$schema": "https://json-schema.org/draft/2020-12/schema",
|
| "$id": "https://github.com/LucioLiu/handoff-protocol/contracts/return-packet.schema.json",
|
| "title": "Return packet",
|
| "type": "object",
|
| "additionalProperties": false,
|
| "required": ["conclusion", "evidence", "gaps", "artifact_paths"],
|
| "properties": {
|
| "conclusion": {"type": "string", "minLength": 1},
|
| "evidence": {"type": "array", "minItems": 1, "items": {"type": "string", "minLength": 1}},
|
| "gaps": {"type": "array", "items": {"type": "string", "minLength": 1}},
|
| "artifact_paths": {"type": "array", "minItems": 1, "items": {"type": "string", "minLength": 1}},
|
| "handoff_id": {"type": "string", "minLength": 1},
|
| "contract_id": {"type": "string", "minLength": 1},
|
| "dispatch_id": {"type": "string", "minLength": 1},
|
| "execution_mode": {
|
| "description": "Actual host execution container; persistence is represented separately by closure_receipts.",
|
| "enum": ["bounded_subagent", "independent_task"]
|
| },
|
| "closure_receipts": {
|
| "type": "array",
|
| "minItems": 4,
|
| "maxItems": 4,
|
| "uniqueItems": true,
|
| "items": {"$ref": "closure-receipt.schema.json"}
|
| }
|
| },
|
| "allOf": [
|
| {
|
| "if": {
|
| "properties": {"execution_mode": {"const": "independent_task"}},
|
| "required": ["execution_mode"]
|
| },
|
| "then": {
|
| "required": [
|
| "handoff_id",
|
| "contract_id",
|
| "dispatch_id",
|
| "closure_receipts"
|
| ]
|
| }
|
| },
|
| {
|
| "if": {"required": ["closure_receipts"]},
|
| "then": {
|
| "required": ["handoff_id", "contract_id", "dispatch_id"],
|
| "properties": {
|
| "closure_receipts": {
|
| "allOf": [
|
| {
|
| "contains": {
|
| "properties": {"target": {"const": "employee_memory"}},
|
| "required": ["target"]
|
| },
|
| "minContains": 1,
|
| "maxContains": 1
|
| },
|
| {
|
| "contains": {
|
| "properties": {"target": {"const": "employee_worklog"}},
|
| "required": ["target"]
|
| },
|
| "minContains": 1,
|
| "maxContains": 1
|
| },
|
| {
|
| "contains": {
|
| "properties": {"target": {"const": "team_journal"}},
|
| "required": ["target"]
|
| },
|
| "minContains": 1,
|
| "maxContains": 1
|
| },
|
| {
|
| "contains": {
|
| "properties": {"target": {"const": "central_board"}},
|
| "required": ["target"]
|
| },
|
| "minContains": 1,
|
| "maxContains": 1
|
| }
|
| ]
|
| }
|
| }
|
| }
|
| },
|
| {
|
| "if": {"required": ["contract_id"]},
|
| "then": {
|
| "required": [
|
| "handoff_id",
|
| "contract_id",
|
| "dispatch_id",
|
| "closure_receipts"
|
| ]
|
| }
|
| }
|
| ]
|
| }
|
|
|