{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://xmesh.dev/schemas/v1/mission.schema.json",
 "title": "xmesh /api/v1/mission",
 "$comment": "The $id names the v1 contract, not a release, and stays the same while v1 changes only additively; the release that generated this file is the xmesh version (GET /api/v1/_/version). A breaking change would be a new path (v2), never a reused $id.",
 "description": "Generated from src/mission-v1.ts. Requests: MissionRequest (POST), MissionOperation (PATCH). Responses: Mission, MissionPage, Capabilities, Board, Recall, Canon, Part, FeedEvent, ApiError.",
 "$defs": {
  "AbsolutePath": {
   "type": "string",
   "minLength": 2,
   "maxLength": 4096,
   "pattern": "^(\\/|[A-Za-z]:[\\\\/])"
  },
  "Activity": {
   "type": "string",
   "enum": [
    "exploring",
    "heading",
    "working",
    "crossing",
    "rescuing",
    "charging",
    "drained",
    "waiting"
   ]
  },
  "ApiError": {
   "type": "object",
   "properties": {
    "v": {
     "type": "string",
     "const": "xmesh.error/1"
    },
    "error": {
     "type": "object",
     "properties": {
      "code": {
       "$ref": "#/$defs/ErrorCode"
      },
      "message": {
       "type": "string"
      },
      "details": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "path": {
          "type": "string"
         },
         "message": {
          "type": "string"
         }
        },
        "required": [
         "path",
         "message"
        ],
        "additionalProperties": false
       }
      },
      "retryable": {
       "type": "boolean"
      },
      "retryAfterS": {
       "type": "integer",
       "minimum": 1,
       "maximum": 9007199254740991
      },
      "hint": {
       "type": "string"
      }
     },
     "required": [
      "code",
      "message",
      "retryable"
     ],
     "additionalProperties": false
    }
   },
   "required": [
    "v",
    "error"
   ],
   "additionalProperties": false
  },
  "ApprovalPresentation": {
   "type": "object",
   "properties": {
    "id": {
     "type": "string",
     "description": "the capability shape that matched: a stable id for grouping"
    },
    "question": {
     "type": "string",
     "description": "the plain-language question a person answers; it names no tool id or command"
    },
    "capability": {
     "type": "string",
     "description": "a short outcome label, for grouping identical asks"
    },
    "recommendation": {
     "type": "string",
     "enum": [
      "approve",
      "deny",
      "provision"
     ]
    },
    "recommendedAction": {
     "type": "string",
     "description": "the recommendation as its button says it, e.g. Deny"
    },
    "why": {
     "type": "string",
     "description": "one line of why"
    },
    "humanDecidable": {
     "type": "boolean",
     "description": "false: not a yes-or-no for a person; the capability has to be set up first"
    }
   },
   "required": [
    "id",
    "question",
    "capability",
    "recommendation",
    "recommendedAction",
    "why",
    "humanDecidable"
   ],
   "additionalProperties": false
  },
  "Arm": {
   "type": "object",
   "properties": {
    "comms": {
     "type": "string",
     "enum": [
      "mesh",
      "silent",
      "none"
     ],
     "description": "mesh: as the scenario says · silent: the crew's peer words off · none: comms range 0"
    },
    "growth": {
     "type": "boolean",
     "description": "calls for help on or off, always stated so an arm has one spelling; the engine refuses an arm the scenario cannot run"
    }
   },
   "required": [
    "comms",
    "growth"
   ],
   "additionalProperties": false
  },
  "AssessmentResult": {
   "type": "object",
   "properties": {
    "engagement": {
     "$ref": "#/$defs/RoomName"
    },
    "call": {
     "type": "integer",
     "minimum": -9007199254740991,
     "maximum": 9007199254740991
    },
    "outDir": {
     "type": "string"
    }
   },
   "required": [
    "engagement",
    "call",
    "outDir"
   ],
   "additionalProperties": false
  },
  "AssessmentSpec": {
   "type": "object",
   "properties": {
    "engagement": {
     "$ref": "#/$defs/RoomName"
    },
    "inputsDir": {
     "$ref": "#/$defs/AbsolutePath"
    },
    "workDir": {
     "$ref": "#/$defs/AbsolutePath"
    },
    "call": {
     "type": "integer",
     "minimum": 1,
     "maximum": 9007199254740991
    },
    "route": {
     "type": "object",
     "properties": {
      "fileName": {
       "type": "string",
       "minLength": 1,
       "maxLength": 200
      },
      "expect": {
       "type": "string",
       "maxLength": 4000
      },
      "maxMessages": {
       "type": "integer",
       "minimum": 1,
       "maximum": 1000
      },
      "timeoutS": {
       "type": "integer",
       "minimum": 1,
       "maximum": 3600
      }
     },
     "additionalProperties": false
    },
    "aim": {
     "type": "string",
     "maxLength": 4000
    },
    "notes": {
     "type": "string",
     "maxLength": 8000
    },
    "criticGrounds": {
     "type": "string",
     "maxLength": 4000
    },
    "expectClosed": {
     "type": "integer",
     "minimum": 0,
     "maximum": 9007199254740991
    }
   },
   "required": [
    "engagement",
    "inputsDir"
   ],
   "additionalProperties": false
  },
  "Blocked": {
   "type": "object",
   "properties": {
    "reason": {
     "type": "string"
    },
    "gapLayer": {
     "type": "string"
    },
    "blockerType": {
     "type": "string"
    },
    "findings": {
     "type": "array",
     "items": {
      "type": "object",
      "properties": {
       "finding": {
        "type": "string"
       },
       "by": {
        "type": "string"
       },
       "at": {
        "$ref": "#/$defs/Timestamp"
       }
      },
      "required": [
       "finding",
       "by",
       "at"
      ],
      "additionalProperties": false
     }
    }
   },
   "required": [
    "reason"
   ],
   "additionalProperties": false
  },
  "Board": {
   "type": "object",
   "properties": {
    "v": {
     "type": "string",
     "const": "xmesh.mission/1"
    },
    "total": {
     "type": "integer",
     "minimum": 0,
     "maximum": 9007199254740991
    },
    "truncated": {
     "type": "boolean",
     "description": "true when more tasks exist than the 1,000 shown"
    },
    "dropped": {
     "type": "integer",
     "minimum": 0,
     "maximum": 9007199254740991,
     "description": "cards dropped from the board and not shown here: each is still a task mission, listed with kind=task, status abandoned"
    },
    "columns": {
     "type": "object",
     "propertyNames": {
      "type": "string"
     },
     "additionalProperties": {
      "type": "array",
      "items": {
       "$ref": "#/$defs/BoardCard"
      }
     }
    },
    "legal": {
     "type": "object",
     "propertyNames": {
      "type": "string"
     },
     "additionalProperties": {
      "type": "array",
      "items": {
       "type": "string"
      }
     }
    }
   },
   "required": [
    "v",
    "total",
    "truncated",
    "dropped",
    "columns",
    "legal"
   ],
   "additionalProperties": false
  },
  "BoardCard": {
   "type": "object",
   "properties": {
    "id": {
     "$ref": "#/$defs/MissionId"
    },
    "kind": {
     "$ref": "#/$defs/MissionKind"
    },
    "status": {
     "$ref": "#/$defs/MissionStatus"
    },
    "verdict": {
     "anyOf": [
      {
       "type": "string",
       "enum": [
        "validated",
        "dismissed"
       ]
      },
      {
       "type": "null"
      }
     ]
    },
    "focus": {
     "type": "string",
     "maxLength": 200
    },
    "room": {
     "anyOf": [
      {
       "$ref": "#/$defs/RoomName"
      },
      {
       "type": "null"
      }
     ]
    },
    "requestedBy": {
     "$ref": "#/$defs/Principal"
    },
    "phase": {
     "type": [
      "string",
      "null"
     ]
    },
    "createdAt": {
     "$ref": "#/$defs/Timestamp"
    },
    "updatedAt": {
     "$ref": "#/$defs/Timestamp"
    },
    "reportedBy": {
     "description": "who reported the completion (evidence.reported.by); null before one",
     "type": [
      "string",
      "null"
     ]
    },
    "checked": {
     "anyOf": [
      {
       "type": "object",
       "properties": {
        "passed": {
         "type": "integer",
         "minimum": 0,
         "maximum": 9007199254740991
        },
        "total": {
         "type": "integer",
         "minimum": 0,
         "maximum": 9007199254740991
        }
       },
       "required": [
        "passed",
        "total"
       ],
       "additionalProperties": false
      },
      {
       "type": "null"
      }
     ],
     "description": "the harness's stored tally; the clauses themselves are on the full read"
    },
    "parent": {
     "anyOf": [
      {
       "$ref": "#/$defs/MissionId"
      },
      {
       "type": "null"
      }
     ],
     "description": "lineage.parent"
    },
    "firstArtifact": {
     "description": "the first artifact the completion names (evidence.reported.artifacts[0])",
     "type": [
      "string",
      "null"
     ]
    },
    "completionCmb": {
     "anyOf": [
      {
       "$ref": "#/$defs/CmbKey"
      },
      {
       "type": "null"
      }
     ],
     "description": "evidence.reported.cmb: the completion CMB, which a closed-record row links as its proof"
    },
    "grounding": {
     "anyOf": [
      {
       "$ref": "#/$defs/Grounding"
      },
      {
       "type": "null"
      }
     ],
     "description": "evidence.grounding: whether it held up, as the tally stands"
    },
    "review": {
     "anyOf": [
      {
       "type": "object",
       "properties": {
        "approvals": {
         "type": "integer",
         "minimum": 0,
         "maximum": 9007199254740991
        },
        "objections": {
         "type": "integer",
         "minimum": 0,
         "maximum": 9007199254740991
        }
       },
       "required": [
        "approvals",
        "objections"
       ],
       "additionalProperties": false
      },
      {
       "type": "null"
      }
     ],
     "description": "evidence.review as a tally: the critic's approvals and objections so far, {0, 0} while a configured critic has not ruled; null when no critic was configured and none ruled. A ruling moves updatedAt"
    },
    "waitingOn": {
     "anyOf": [
      {
       "type": "string",
       "enum": [
        "capacity",
        "approval",
        "budget",
        "review",
        "person"
       ]
      },
      {
       "type": "null"
      }
     ],
     "description": "waiting.on: what a waiting mission waits for, so a row tells a mind slot from a person; null unless the mission is waiting"
    },
    "blockerType": {
     "description": "blocked.blockerType: the kind of integration point the block is; null unless the mission is blocked",
     "type": [
      "string",
      "null"
     ]
    },
    "gapLayer": {
     "description": "blocked.gapLayer: the ontology layer the gap belongs to; null unless the mission is blocked",
     "type": [
      "string",
      "null"
     ]
    },
    "requests": {
     "type": "array",
     "items": {
      "type": "object",
      "properties": {
       "id": {
        "type": "string",
        "description": "presentation.id: the capability shape, a stable id for grouping"
       },
       "capability": {
        "type": "string",
        "description": "presentation.capability: its short plain label"
       },
       "pending": {
        "type": "integer",
        "minimum": 0,
        "maximum": 9007199254740991
       },
       "approved": {
        "type": "integer",
        "minimum": 0,
        "maximum": 9007199254740991
       },
       "denied": {
        "type": "integer",
        "minimum": 0,
        "maximum": 9007199254740991
       }
      },
      "required": [
       "id",
       "capability",
       "pending",
       "approved",
       "denied"
      ],
      "additionalProperties": false
     },
     "description": "evidence.requests tallied by capability shape, in the order each was first asked; empty when none was raised"
    },
    "diagnosis": {
     "anyOf": [
      {
       "type": "object",
       "properties": {
        "locus": {
         "$ref": "#/$defs/DiagnosisLocus"
        },
        "missing": {
         "anyOf": [
          {
           "type": "string",
           "maxLength": 300
          },
          {
           "type": "null"
          }
         ]
        }
       },
       "required": [
        "locus",
        "missing"
       ],
       "additionalProperties": false
      },
      {
       "type": "null"
      }
     ],
     "description": "diagnosis.locus and .missing: the newest deep root cause's claim, never checked (who claimed it, its evidence and any ruling are on the full read); null until one has completed"
    },
    "owner": {
     "type": [
      "string",
      "null"
     ]
    },
    "size": {
     "anyOf": [
      {
       "type": "string",
       "enum": [
        "S",
        "M",
        "L"
       ]
      },
      {
       "type": "null"
      }
     ],
     "description": "S = hours, M = days, L = weeks; null when unsized"
    },
    "rank": {
     "type": "number",
     "description": "order within its column"
    },
    "blockReason": {
     "description": "why it is blocked; null unless its column is blocked",
     "type": [
      "string",
      "null"
     ]
    },
    "lastAction": {
     "anyOf": [
      {
       "type": "object",
       "properties": {
        "by": {
         "type": "string"
        },
        "at": {
         "$ref": "#/$defs/Timestamp"
        },
        "text": {
         "type": "string"
        }
       },
       "required": [
        "by",
        "at",
        "text"
       ],
       "additionalProperties": false
      },
      {
       "type": "null"
      }
     ],
     "description": "the card's newest action, the last entry of the mission's result.actions (its kind is on that read); null when it has none"
    }
   },
   "required": [
    "id",
    "kind",
    "status",
    "verdict",
    "focus",
    "room",
    "requestedBy",
    "phase",
    "createdAt",
    "updatedAt",
    "reportedBy",
    "checked",
    "parent",
    "firstArtifact",
    "completionCmb",
    "grounding",
    "review",
    "waitingOn",
    "blockerType",
    "gapLayer",
    "requests",
    "diagnosis",
    "owner",
    "size",
    "rank",
    "blockReason",
    "lastAction"
   ],
   "additionalProperties": false
  },
  "Canon": {
   "type": "object",
   "properties": {
    "v": {
     "type": "string",
     "const": "xmesh.mission/1"
    },
    "count": {
     "type": "integer",
     "minimum": -9007199254740991,
     "maximum": 9007199254740991
    },
    "next": {
     "description": "opaque cursor; null at the end",
     "type": [
      "string",
      "null"
     ]
    },
    "items": {
     "type": "array",
     "items": {
      "type": "object",
      "properties": {
       "key": {
        "$ref": "#/$defs/CmbKey"
       },
       "agent": {
        "type": "string"
       },
       "author": {
        "type": "string"
       },
       "adopters": {
        "type": "array",
        "items": {
         "type": "string"
        }
       },
       "lifecycle": {
        "type": "string"
       },
       "focus": {
        "type": "string"
       },
       "storedAt": {
        "$ref": "#/$defs/Timestamp"
       }
      },
      "required": [
       "key",
       "agent",
       "author",
       "adopters",
       "lifecycle",
       "focus",
       "storedAt"
      ],
      "additionalProperties": false
     }
    }
   },
   "required": [
    "v",
    "count",
    "next",
    "items"
   ],
   "additionalProperties": false
  },
  "Capabilities": {
   "type": "object",
   "properties": {
    "v": {
     "type": "string",
     "const": "xmesh.mission/1"
    },
    "kinds": {
     "type": "object",
     "propertyNames": {
      "$ref": "#/$defs/MissionKind"
     },
     "additionalProperties": {
      "type": "object",
      "properties": {
       "available": {
        "type": "boolean"
       },
       "minRole": {
        "$ref": "#/$defs/Role"
       },
       "reason": {
        "type": "string"
       }
      },
      "required": [
       "available",
       "minRole"
      ],
      "additionalProperties": false
     },
     "required": [
      "work",
      "question",
      "review",
      "research",
      "assessment",
      "task",
      "simulation"
     ]
    },
    "engine": {
     "anyOf": [
      {
       "type": "object",
       "properties": {
        "version": {
         "type": "string"
        },
        "commit": {
         "type": [
          "string",
          "null"
         ]
        },
        "features": {
         "type": "array",
         "items": {
          "type": "string"
         }
        }
       },
       "required": [
        "version",
        "commit",
        "features"
       ],
       "additionalProperties": false
      },
      {
       "type": "null"
      }
     ]
    },
    "lanes": {
     "type": "array",
     "items": {
      "$ref": "#/$defs/Lane"
     }
    },
    "limits": {
     "type": "object",
     "properties": {
      "bodyBytes": {
       "type": "integer",
       "minimum": -9007199254740991,
       "maximum": 9007199254740991
      },
      "seedsPerMission": {
       "type": "integer",
       "minimum": -9007199254740991,
       "maximum": 9007199254740991
      },
      "simSecondsPerMission": {
       "type": "integer",
       "minimum": -9007199254740991,
       "maximum": 9007199254740991
      },
      "questionWaitS": {
       "type": "integer",
       "minimum": -9007199254740991,
       "maximum": 9007199254740991
      },
      "crewInView": {
       "anyOf": [
        {
         "type": "integer",
         "minimum": -9007199254740991,
         "maximum": 9007199254740991
        },
        {
         "type": "null"
        }
       ],
       "description": "at most this many syms in a viewport get crew detail; null when this runtime has no simulation host, whose limit it is"
      },
      "dotsInView": {
       "anyOf": [
        {
         "type": "integer",
         "minimum": -9007199254740991,
         "maximum": 9007199254740991
        },
        {
         "type": "null"
        }
       ],
       "description": "above this, cells replace syms; null when this runtime has no simulation host"
      },
      "feed": {
       "type": "object",
       "properties": {
        "heldEvents": {
         "type": "integer",
         "minimum": -9007199254740991,
         "maximum": 9007199254740991
        },
        "keptAfterEndS": {
         "type": "integer",
         "minimum": -9007199254740991,
         "maximum": 9007199254740991
        },
        "durable": {
         "type": "boolean",
         "const": false
        }
       },
       "required": [
        "heldEvents",
        "keptAfterEndS",
        "durable"
       ],
       "additionalProperties": false,
       "description": "the live feed is a reconnect window, not the mission's record: this many events per mission, in memory, kept this long after its end, and gone at a restart (a gap then says so)"
      }
     },
     "required": [
      "bodyBytes",
      "seedsPerMission",
      "simSecondsPerMission",
      "questionWaitS",
      "crewInView",
      "dotsInView",
      "feed"
     ],
     "additionalProperties": false
    }
   },
   "required": [
    "v",
    "kinds",
    "engine",
    "lanes",
    "limits"
   ],
   "additionalProperties": false
  },
  "CapabilityRequest": {
   "type": "object",
   "properties": {
    "binding": {
     "$ref": "#/$defs/EvidenceBinding"
    },
    "id": {
     "type": "string"
    },
    "capability": {
     "type": "string",
     "description": "the blocked mind's own words for what it needs, verbatim: kept for the record; a person is asked `presentation.question`"
    },
    "presentation": {
     "$ref": "#/$defs/ApprovalPresentation"
    },
    "grantEffect": {
     "type": "string",
     "description": "what approving actually does, which can be broader than what was asked for, derived by the runtime"
    },
    "requestedBy": {
     "type": "string"
    },
    "required": {
     "type": "object",
     "properties": {
      "minRole": {
       "$ref": "#/$defs/Role"
      },
      "quorum": {
       "type": "integer",
       "minimum": 1,
       "maximum": 9007199254740991
      }
     },
     "required": [
      "minRole",
      "quorum"
     ],
     "additionalProperties": false
    },
    "votes": {
     "type": "array",
     "items": {
      "type": "object",
      "properties": {
       "by": {
        "type": "string"
       },
       "role": {
        "$ref": "#/$defs/Role"
       },
       "decision": {
        "type": "string",
        "enum": [
         "approve",
         "deny"
        ]
       },
       "reason": {
        "type": "string"
       },
       "at": {
        "$ref": "#/$defs/Timestamp"
       }
      },
      "required": [
       "by",
       "role",
       "decision",
       "reason",
       "at"
      ],
      "additionalProperties": false
     }
    },
    "status": {
     "type": "string",
     "enum": [
      "pending",
      "approved",
      "denied"
     ]
    },
    "decidedAt": {
     "anyOf": [
      {
       "$ref": "#/$defs/Timestamp"
      },
      {
       "type": "null"
      }
     ]
    }
   },
   "required": [
    "binding",
    "id",
    "capability",
    "presentation",
    "grantEffect",
    "requestedBy",
    "required",
    "votes",
    "status",
    "decidedAt"
   ],
   "additionalProperties": false
  },
  "Cat7": {
   "type": "object",
   "properties": {
    "focus": {
     "type": "string",
     "minLength": 1,
     "maxLength": 4000
    },
    "issue": {
     "type": "string",
     "minLength": 1,
     "maxLength": 4000
    },
    "intent": {
     "type": "string",
     "minLength": 1,
     "maxLength": 4000
    },
    "motivation": {
     "type": "string",
     "minLength": 1,
     "maxLength": 4000
    },
    "commitment": {
     "type": "string",
     "minLength": 1,
     "maxLength": 4000
    },
    "perspective": {
     "type": "string",
     "minLength": 1,
     "maxLength": 4000
    },
    "mood": {
     "$ref": "#/$defs/Mood"
    }
   },
   "required": [
    "focus"
   ],
   "additionalProperties": false
  },
  "Cat7Category": {
   "type": "string",
   "enum": [
    "focus",
    "issue",
    "intent",
    "motivation",
    "commitment",
    "perspective",
    "mood"
   ]
  },
  "CheckClause": {
   "type": "object",
   "properties": {
    "kind": {
     "type": "string",
     "enum": [
      "prose",
      "file",
      "run",
      "contains",
      "not-contains",
      "contains-at-least",
      "other"
     ]
    },
    "text": {
     "type": "string"
    },
    "pass": {
     "type": [
      "boolean",
      "null"
     ]
    },
    "detail": {
     "type": "string"
    }
   },
   "required": [
    "kind",
    "text",
    "pass"
   ],
   "additionalProperties": false
  },
  "Checked": {
   "type": "object",
   "properties": {
    "binding": {
     "$ref": "#/$defs/EvidenceBinding"
    },
    "by": {
     "type": "string",
     "const": "harness"
    },
    "passed": {
     "type": "integer",
     "minimum": 0,
     "maximum": 9007199254740991
    },
    "total": {
     "type": "integer",
     "minimum": 0,
     "maximum": 9007199254740991
    },
    "substantive": {
     "type": "integer",
     "minimum": 0,
     "maximum": 9007199254740991
    },
    "notVerified": {
     "description": "checks the harness could not run on this host (it has no enforcing sandbox): not verified, so neither passed nor failed, and counted in neither passed nor total (added in 0.11.0)",
     "type": "integer",
     "minimum": 1,
     "maximum": 9007199254740991
    },
    "clauses": {
     "type": "array",
     "items": {
      "$ref": "#/$defs/CheckClause"
     }
    }
   },
   "required": [
    "binding",
    "by",
    "passed",
    "total",
    "substantive",
    "clauses"
   ],
   "additionalProperties": false
  },
  "Claim": {
   "type": "object",
   "properties": {
    "text": {
     "type": "string"
    },
    "citations": {
     "type": "array",
     "items": {
      "type": "string"
     }
    },
    "agent": {
     "type": "string"
    },
    "relevance": {
     "type": "number"
    },
    "buildsOn": {
     "description": "true when the claim builds on an earlier synthesis",
     "type": "boolean"
    },
    "fresh": {
     "description": "generated by this ask: provisional, with no authority until grounded",
     "type": "boolean"
    }
   },
   "required": [
    "text",
    "citations",
    "agent"
   ],
   "additionalProperties": false
  },
  "ClaimState": {
   "type": "string",
   "enum": [
    "CONTESTED",
    "STALE",
    "AGING",
    "KNOWN",
    "UNKNOWN"
   ]
  },
  "CmbKey": {
   "type": "string",
   "pattern": "^cmb1?-[0-9a-f]{8,128}$"
  },
  "Diagnosis": {
   "type": "object",
   "properties": {
    "locus": {
     "$ref": "#/$defs/DiagnosisLocus"
    },
    "missing": {
     "anyOf": [
      {
       "type": "string",
       "maxLength": 300
      },
      {
       "type": "null"
      }
     ],
     "description": "what was missing, in the root cause's words; null for none, and for an undetermined diagnosis that names nothing"
    },
    "evidence": {
     "anyOf": [
      {
       "type": "string",
       "maxLength": 1000
      },
      {
       "type": "null"
      }
     ],
     "description": "what the claim stands on (CMB keys, file paths, quoted text), in the root cause's words"
    },
    "reason": {
     "description": "set when the runtime read the diagnosis as undetermined itself: the report carried no diagnosis block, more than one, or one that does not parse or contradicts itself, or the report could not be read. Null when the root cause's block was well formed, its own undetermined included",
     "type": [
      "string",
      "null"
     ]
    },
    "claimedBy": {
     "description": "the root-cause worker that wrote the report",
     "type": [
      "string",
      "null"
     ]
    },
    "at": {
     "$ref": "#/$defs/Timestamp"
    },
    "source": {
     "type": "object",
     "properties": {
      "mission": {
       "anyOf": [
        {
         "$ref": "#/$defs/MissionId"
        },
        {
         "type": "null"
        }
       ],
       "description": "the root-cause mission it came from (a child of this one); null if it cannot be found"
      },
      "artifact": {
       "description": "the report it was read from, as the worker named it",
       "type": [
        "string",
        "null"
       ]
      }
     },
     "required": [
      "mission",
      "artifact"
     ],
     "additionalProperties": false
    },
    "ruling": {
     "anyOf": [
      {
       "type": "string",
       "enum": [
        "validated",
        "dismissed"
       ]
      },
      {
       "type": "null"
      }
     ],
     "description": "a person's verdict on that root-cause mission, when one was given. It rules on the report as a whole: it is the only check v1 records, and null means nothing checked the claim"
    }
   },
   "required": [
    "locus",
    "missing",
    "evidence",
    "reason",
    "claimedBy",
    "at",
    "source",
    "ruling"
   ],
   "additionalProperties": false
  },
  "DiagnosisLocus": {
   "type": "string",
   "enum": [
    "knowledge",
    "skill",
    "source",
    "approval",
    "none",
    "undetermined"
   ]
  },
  "ErrorCode": {
   "type": "string",
   "enum": [
    "bad_request",
    "validation_failed",
    "unauthorized",
    "forbidden",
    "not_found",
    "idempotency_conflict",
    "idempotency_in_progress",
    "invalid_transition",
    "payload_too_large",
    "budget_exceeded",
    "rate_limited",
    "kind_unavailable",
    "engine_mismatch",
    "ownership_lost",
    "unavailable",
    "internal"
   ]
  },
  "Evidence": {
   "type": "object",
   "properties": {
    "reported": {
     "anyOf": [
      {
       "$ref": "#/$defs/Reported"
      },
      {
       "type": "null"
      }
     ]
    },
    "checked": {
     "anyOf": [
      {
       "$ref": "#/$defs/Checked"
      },
      {
       "type": "null"
      }
     ]
    },
    "review": {
     "anyOf": [
      {
       "$ref": "#/$defs/Review"
      },
      {
       "type": "null"
      }
     ]
    },
    "requests": {
     "type": "array",
     "items": {
      "$ref": "#/$defs/CapabilityRequest"
     }
    },
    "replays": {
     "type": "array",
     "items": {
      "$ref": "#/$defs/ReplayReceipt"
     }
    },
    "grounding": {
     "anyOf": [
      {
       "$ref": "#/$defs/Grounding"
      },
      {
       "type": "null"
      }
     ],
     "description": "null until someone has grounded it"
    }
   },
   "required": [
    "reported",
    "checked",
    "review",
    "requests",
    "replays",
    "grounding"
   ],
   "additionalProperties": false
  },
  "EvidenceBinding": {
   "type": "object",
   "properties": {
    "mission": {
     "$ref": "#/$defs/MissionId"
    },
    "specDigest": {
     "type": "string",
     "pattern": "^[0-9a-f]{64}$"
    }
   },
   "required": [
    "mission",
    "specDigest"
   ],
   "additionalProperties": false
  },
  "Executor": {
   "oneOf": [
    {
     "type": "object",
     "properties": {
      "type": {
       "type": "string",
       "const": "mesh"
      },
      "minds": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string"
         },
         "mind": {
          "type": "string",
          "enum": [
           "claude",
           "codex",
           "echo"
          ]
         },
         "model": {
          "type": [
           "string",
           "null"
          ]
         },
         "role": {
          "type": "string",
          "enum": [
           "doer",
           "planner",
           "critic",
           "answer",
           "specialist"
          ]
         }
        },
        "required": [
         "name",
         "mind",
         "model",
         "role"
        ],
        "additionalProperties": false
       }
      }
     },
     "required": [
      "type",
      "minds"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "type": {
       "type": "string",
       "const": "engine"
      },
      "engine": {
       "type": "string"
      },
      "commit": {
       "type": [
        "string",
        "null"
       ]
      }
     },
     "required": [
      "type",
      "engine",
      "commit"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "type": {
       "type": "string",
       "const": "people"
      }
     },
     "required": [
      "type"
     ],
     "additionalProperties": false
    }
   ]
  },
  "FeedEvent": {
   "oneOf": [
    {
     "type": "object",
     "properties": {
      "v": {
       "type": "string",
       "const": "xmesh.feed/1"
      },
      "seq": {
       "type": "integer",
       "minimum": 1,
       "maximum": 9007199254740991
      },
      "type": {
       "type": "string",
       "const": "status"
      },
      "at": {
       "$ref": "#/$defs/Timestamp"
      },
      "data": {
       "type": "object",
       "properties": {
        "status": {
         "$ref": "#/$defs/MissionStatus"
        },
        "waiting": {
         "anyOf": [
          {
           "$ref": "#/$defs/Waiting"
          },
          {
           "type": "null"
          }
         ]
        },
        "blocked": {
         "anyOf": [
          {
           "$ref": "#/$defs/Blocked"
          },
          {
           "type": "null"
          }
         ]
        }
       },
       "required": [
        "status",
        "waiting",
        "blocked"
       ],
       "additionalProperties": false
      }
     },
     "required": [
      "v",
      "seq",
      "type",
      "at",
      "data"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "v": {
       "type": "string",
       "const": "xmesh.feed/1"
      },
      "seq": {
       "type": "integer",
       "minimum": 1,
       "maximum": 9007199254740991
      },
      "type": {
       "type": "string",
       "const": "progress"
      },
      "at": {
       "$ref": "#/$defs/Timestamp"
      },
      "data": {
       "type": "object",
       "properties": {
        "by": {
         "type": "string"
        },
        "text": {
         "type": "string"
        }
       },
       "required": [
        "by",
        "text"
       ],
       "additionalProperties": false
      }
     },
     "required": [
      "v",
      "seq",
      "type",
      "at",
      "data"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "v": {
       "type": "string",
       "const": "xmesh.feed/1"
      },
      "seq": {
       "type": "integer",
       "minimum": 1,
       "maximum": 9007199254740991
      },
      "type": {
       "type": "string",
       "const": "evidence"
      },
      "at": {
       "$ref": "#/$defs/Timestamp"
      },
      "data": {
       "type": "object",
       "properties": {
        "tier": {
         "type": "string",
         "enum": [
          "reported",
          "checked",
          "review",
          "request",
          "replay"
         ]
        },
        "binding": {
         "$ref": "#/$defs/EvidenceBinding"
        },
        "detail": {}
       },
       "required": [
        "tier",
        "binding",
        "detail"
       ],
       "additionalProperties": false
      }
     },
     "required": [
      "v",
      "seq",
      "type",
      "at",
      "data"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "v": {
       "type": "string",
       "const": "xmesh.feed/1"
      },
      "seq": {
       "type": "integer",
       "minimum": 1,
       "maximum": 9007199254740991
      },
      "type": {
       "type": "string",
       "const": "answer-step"
      },
      "at": {
       "$ref": "#/$defs/Timestamp"
      },
      "data": {
       "type": "object",
       "properties": {
        "step": {
         "type": "string",
         "enum": [
          "agents",
          "selection",
          "admission",
          "claim",
          "think",
          "synthesis"
         ]
        },
        "detail": {}
       },
       "required": [
        "step",
        "detail"
       ],
       "additionalProperties": false
      }
     },
     "required": [
      "v",
      "seq",
      "type",
      "at",
      "data"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "v": {
       "type": "string",
       "const": "xmesh.feed/1"
      },
      "seq": {
       "type": "integer",
       "minimum": 1,
       "maximum": 9007199254740991
      },
      "type": {
       "type": "string",
       "const": "sim-join"
      },
      "at": {
       "$ref": "#/$defs/Timestamp"
      },
      "data": {
       "type": "object",
       "properties": {
        "scenario": {
         "type": "object",
         "properties": {
          "id": {
           "type": "string"
          },
          "fingerprint": {
           "type": "string",
           "pattern": "^[0-9a-f]{8}$"
          }
         },
         "required": [
          "id",
          "fingerprint"
         ],
         "additionalProperties": false,
         "description": "a viewer drawing ground from its own copy refuses a mismatch; an absent identity refuses, never defaults"
        },
        "story": {
         "anyOf": [
          {
           "type": "object",
           "propertyNames": {
            "type": "string"
           },
           "additionalProperties": {}
          },
          {
           "type": "null"
          }
         ],
         "description": "the scenario's story, as the engine holds it"
        },
        "seed": {
         "$ref": "#/$defs/Seed"
        },
        "arm": {
         "$ref": "#/$defs/Arm"
        },
        "engine": {
         "type": "string"
        },
        "mesh": {
         "type": "string",
         "description": "whose picture this viewer is shown"
        },
        "xray": {
         "type": "boolean"
        },
        "view": {
         "type": "object",
         "properties": {
          "viewport": {
           "anyOf": [
            {
             "type": "array",
             "prefixItems": [
              {
               "type": "integer",
               "minimum": -9007199254740991,
               "maximum": 9007199254740991
              },
              {
               "type": "integer",
               "minimum": -9007199254740991,
               "maximum": 9007199254740991
              },
              {
               "type": "integer",
               "minimum": -9007199254740991,
               "maximum": 9007199254740991
              },
              {
               "type": "integer",
               "minimum": -9007199254740991,
               "maximum": 9007199254740991
              }
             ],
             "items": false,
             "minItems": 4,
             "maxItems": 4
            },
            {
             "type": "null"
            }
           ]
          },
          "rate": {
           "type": "integer",
           "minimum": 1,
           "maximum": 10
          }
         },
         "required": [
          "viewport",
          "rate"
         ],
         "additionalProperties": false
        }
       },
       "required": [
        "scenario",
        "story",
        "seed",
        "arm",
        "engine",
        "mesh",
        "xray",
        "view"
       ],
       "additionalProperties": false
      }
     },
     "required": [
      "v",
      "seq",
      "type",
      "at",
      "data"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "v": {
       "type": "string",
       "const": "xmesh.feed/1"
      },
      "seq": {
       "type": "integer",
       "minimum": 1,
       "maximum": 9007199254740991
      },
      "type": {
       "type": "string",
       "const": "sim-frame"
      },
      "at": {
       "$ref": "#/$defs/Timestamp"
      },
      "data": {
       "type": "object",
       "properties": {
        "tick": {
         "type": "integer",
         "minimum": -9007199254740991,
         "maximum": 9007199254740991
        },
        "basis": {
         "type": "string",
         "enum": [
          "picture",
          "truth"
         ],
         "description": "picture: what the viewer's mesh perceived and admitted; truth only on a granted x-ray view"
        },
        "detail": {
         "type": "string",
         "enum": [
          "crew",
          "dots",
          "cells"
         ],
         "description": "crew: at most capabilities.limits.crewInView syms in the viewport, with activity and step · dots: syms without detail · cells: per-cell counts replace syms"
        },
        "syms": {
         "type": "array",
         "items": {
          "type": "object",
          "properties": {
           "id": {
            "type": "string"
           },
           "x": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
           },
           "y": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
           },
           "mesh": {
            "type": "string"
           },
           "drained": {
            "type": "boolean"
           },
           "figure": {
            "type": "string"
           },
           "activity": {
            "description": "crew detail: the shared classifier's activity",
            "$ref": "#/$defs/Activity"
           },
           "step": {
            "description": "crew detail: where the sym stepped from and when, for interpolation",
            "type": "object",
            "properties": {
             "fromX": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
             },
             "fromY": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
             },
             "tick": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
             }
            },
            "required": [
             "fromX",
             "fromY",
             "tick"
            ],
            "additionalProperties": false
           },
           "work": {
            "type": "object",
            "properties": {
             "square": {
              "$ref": "#/$defs/SquareName"
             }
            },
            "required": [
             "square"
            ],
            "additionalProperties": false
           },
           "parcel": {
            "type": "string"
           }
          },
          "required": [
           "id",
           "x",
           "y",
           "mesh",
           "drained",
           "figure"
          ],
          "additionalProperties": false
         }
        },
        "cells": {
         "type": "array",
         "items": {
          "type": "object",
          "properties": {
           "x": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
           },
           "y": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
           },
           "counts": {
            "type": "object",
            "propertyNames": {
             "type": "string"
            },
            "additionalProperties": {
             "type": "integer",
             "minimum": -9007199254740991,
             "maximum": 9007199254740991
            }
           }
          },
          "required": [
           "x",
           "y",
           "counts"
          ],
          "additionalProperties": false
         }
        },
        "squares": {
         "type": "array",
         "items": {
          "type": "object",
          "properties": {
           "square": {
            "$ref": "#/$defs/SquareName"
           },
           "type": {
            "type": "string"
           },
           "state": {
            "type": "string",
            "enum": [
             "single",
             "solid",
             "guarded",
             "contested"
            ]
           }
          },
          "required": [
           "square",
           "type",
           "state"
          ],
          "additionalProperties": false
         },
         "description": "the viewer mesh's picture, not the truth, unless xray"
        },
        "words": {
         "type": "array",
         "items": {
          "type": "object",
          "properties": {
           "from": {
            "$ref": "#/$defs/SquareName"
           },
           "to": {
            "$ref": "#/$defs/SquareName"
           },
           "cat": {
            "type": "string"
           },
           "p": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
           }
          },
          "required": [
           "from",
           "to",
           "cat",
           "p"
          ],
          "additionalProperties": false
         },
         "description": "words in flight touching the viewport, as squares (the far end is often off screen): the viewer mesh's own words on a picture view, all words on x-ray. Sampled one in 2^k by the engine's wordKey, FNV-1a 32 over the word's own fields only (from|to|sentTick|square|type; docs §10 has the rule and test vectors), so host and console draw the same subset: stable over the word's flight, the same for every viewer, blind to other meshes' traffic. Never by seq: the engine numbers every mesh's words from one counter, so hidden rival words renumber ours and would change the sample"
        },
        "wordsInView": {
         "type": "integer",
         "minimum": 0,
         "maximum": 9007199254740991,
         "description": "every word the sample was drawn from, in the same scope"
        }
       },
       "required": [
        "tick",
        "basis",
        "detail",
        "syms",
        "cells",
        "squares",
        "words",
        "wordsInView"
       ],
       "additionalProperties": false
      }
     },
     "required": [
      "v",
      "seq",
      "type",
      "at",
      "data"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "v": {
       "type": "string",
       "const": "xmesh.feed/1"
      },
      "seq": {
       "type": "integer",
       "minimum": 1,
       "maximum": 9007199254740991
      },
      "type": {
       "type": "string",
       "const": "sim-second"
      },
      "at": {
       "$ref": "#/$defs/Timestamp"
      },
      "data": {
       "type": "object",
       "properties": {
        "tick": {
         "type": "integer",
         "minimum": -9007199254740991,
         "maximum": 9007199254740991
        },
        "basis": {
         "type": "string",
         "enum": [
          "picture",
          "truth"
         ],
         "description": "every aggregate below is computed on this basis and within the viewer's authorized scope (docs §10)"
        },
        "byCell": {
         "type": "array",
         "items": {
          "type": "object",
          "properties": {
           "x": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
           },
           "y": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
           },
           "kinds": {
            "type": "object",
            "propertyNames": {
             "type": "string"
            },
            "additionalProperties": {
             "type": "integer",
             "minimum": -9007199254740991,
             "maximum": 9007199254740991
            }
           }
          },
          "required": [
           "x",
           "y",
           "kinds"
          ],
          "additionalProperties": false
         }
        },
        "scope": {
         "type": "string",
         "enum": [
          "viewport",
          "mesh",
          "all"
         ],
         "description": "which events `events` lists"
        },
        "events": {
         "type": "array",
         "items": {
          "type": "object",
          "properties": {
           "seq": {
            "description": "the engine's seq, on an x-ray view only. A picture view leaves it out: the engine numbers every mesh's events from one counter, so the gap between two of ours would count the rival's",
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
           },
           "kind": {
            "type": "string"
           },
           "t": {
            "type": "number"
           },
           "square": {
            "anyOf": [
             {
              "$ref": "#/$defs/SquareName"
             },
             {
              "type": "null"
             }
            ]
           },
           "by": {
            "type": [
             "string",
             "null"
            ]
           },
           "mesh": {
            "type": [
             "string",
             "null"
            ]
           },
           "data": {
            "type": "object",
            "propertyNames": {
             "type": "string"
            },
            "additionalProperties": {},
            "description": "the engine's event payload: verbatim on an x-ray view; on a picture view without every field that counts across meshes (seq, and any number or id drawn from a world-wide counter)"
           }
          },
          "required": [
           "kind",
           "t",
           "square",
           "by",
           "mesh",
           "data"
          ],
          "additionalProperties": false
         }
        },
        "counts": {
         "type": "object",
         "propertyNames": {
          "type": "string"
         },
         "additionalProperties": {
          "type": "object",
          "propertyNames": {
           "type": "string"
          },
          "additionalProperties": {
           "type": "integer",
           "minimum": -9007199254740991,
           "maximum": 9007199254740991
          }
         },
         "description": "events this second by mesh then kind, WITHIN the authorized scope: the viewer's own mesh, others only as its picture holds them, all meshes only on x-ray"
        },
        "dropped": {
         "type": "integer",
         "minimum": 0,
         "maximum": 9007199254740991,
         "description": "authorized events not listed because of the per-second cap; never a silent cut, and never a count of what the viewer may not see"
        },
        "sides": {
         "type": "object",
         "propertyNames": {
          "type": "string"
         },
         "additionalProperties": {
          "type": "object",
          "properties": {
           "up": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
           },
           "drained": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
           },
           "joined": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
           },
           "calls": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
           }
          },
          "required": [
           "up",
           "drained",
           "joined",
           "calls"
          ],
          "additionalProperties": false
         }
        },
        "acts": {
         "type": "object",
         "propertyNames": {
          "type": "string"
         },
         "additionalProperties": {
          "type": "object",
          "propertyNames": {
           "$ref": "#/$defs/Activity"
          },
          "additionalProperties": {
           "type": "integer",
           "minimum": -9007199254740991,
           "maximum": 9007199254740991
          }
         },
         "description": "syms by mesh then activity (the shared classifier)"
        },
        "front": {
         "type": "array",
         "items": {
          "type": "object",
          "properties": {
           "band": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
           },
           "x": {
            "type": "array",
            "items": {
             "type": "number"
            },
            "description": "every crossing in the band, so a pocket shows"
           }
          },
          "required": [
           "band",
           "x"
          ],
          "additionalProperties": false
         }
        },
        "diagnosticDigest": {
         "description": "DIAGNOSTIC ONLY, on an x-ray view: a cheap digest of the run's counters, never a verified or final state (verified comes only from a replay receipt). Null on a picture view, because a digest of run-wide counters changes with traffic the viewer may not see",
         "type": [
          "string",
          "null"
         ]
        }
       },
       "required": [
        "tick",
        "basis",
        "byCell",
        "scope",
        "events",
        "counts",
        "dropped",
        "sides",
        "acts",
        "front",
        "diagnosticDigest"
       ],
       "additionalProperties": false
      }
     },
     "required": [
      "v",
      "seq",
      "type",
      "at",
      "data"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "v": {
       "type": "string",
       "const": "xmesh.feed/1"
      },
      "seq": {
       "type": "integer",
       "minimum": 1,
       "maximum": 9007199254740991
      },
      "type": {
       "type": "string",
       "const": "sim-checkpoint"
      },
      "at": {
       "$ref": "#/$defs/Timestamp"
      },
      "data": {
       "type": "object",
       "properties": {
        "basis": {
         "type": "string",
         "const": "truth",
         "description": "x-ray views only: a fingerprint digests the whole world (codex-win R3), so a picture view never receives a checkpoint"
        },
        "tick": {
         "type": "integer",
         "minimum": -9007199254740991,
         "maximum": 9007199254740991
        },
        "fingerprint": {
         "$ref": "#/$defs/Fingerprint"
        },
        "final": {
         "type": "boolean",
         "description": "true at the run's end; intermediate checkpoints every 60 s only where the host can save the run"
        }
       },
       "required": [
        "basis",
        "tick",
        "fingerprint",
        "final"
       ],
       "additionalProperties": false
      }
     },
     "required": [
      "v",
      "seq",
      "type",
      "at",
      "data"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "v": {
       "type": "string",
       "const": "xmesh.feed/1"
      },
      "seq": {
       "type": "integer",
       "minimum": 1,
       "maximum": 9007199254740991
      },
      "type": {
       "type": "string",
       "const": "gap"
      },
      "at": {
       "$ref": "#/$defs/Timestamp"
      },
      "data": {
       "type": "object",
       "properties": {
        "from": {
         "type": "integer",
         "minimum": -9007199254740991,
         "maximum": 9007199254740991
        },
        "to": {
         "type": "integer",
         "minimum": -9007199254740991,
         "maximum": 9007199254740991
        },
        "reason": {
         "type": "string"
        }
       },
       "required": [
        "from",
        "to",
        "reason"
       ],
       "additionalProperties": false
      }
     },
     "required": [
      "v",
      "seq",
      "type",
      "at",
      "data"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "v": {
       "type": "string",
       "const": "xmesh.feed/1"
      },
      "seq": {
       "type": "integer",
       "minimum": 1,
       "maximum": 9007199254740991
      },
      "type": {
       "type": "string",
       "const": "end"
      },
      "at": {
       "$ref": "#/$defs/Timestamp"
      },
      "data": {
       "type": "object",
       "properties": {
        "status": {
         "$ref": "#/$defs/MissionStatus"
        }
       },
       "required": [
        "status"
       ],
       "additionalProperties": false
      }
     },
     "required": [
      "v",
      "seq",
      "type",
      "at",
      "data"
     ],
     "additionalProperties": false
    }
   ]
  },
  "Fingerprint": {
   "type": "object",
   "properties": {
    "engine": {
     "type": "string"
    },
    "scenario": {
     "type": "string",
     "pattern": "^[0-9a-f]{8}$"
    },
    "seed": {
     "$ref": "#/$defs/Seed"
    },
    "tick": {
     "type": "integer",
     "minimum": 0,
     "maximum": 9007199254740991
    },
    "made": {
     "type": "integer",
     "minimum": 0,
     "maximum": 9007199254740991
    },
    "events": {
     "type": "integer",
     "minimum": 0,
     "maximum": 9007199254740991
    },
    "hash": {
     "type": "string",
     "pattern": "^[0-9a-f]{64}$",
     "description": "SHA-256 of the whole saved state"
    },
    "walk": {
     "type": "string",
     "pattern": "^[0-9a-f]{8}$"
    },
    "minds": {
     "type": "string"
    }
   },
   "required": [
    "engine",
    "scenario",
    "seed",
    "tick",
    "made",
    "events",
    "hash",
    "walk"
   ],
   "additionalProperties": false
  },
  "GearFile": {
   "type": "object",
   "propertyNames": {
    "type": "string"
   },
   "additionalProperties": {}
  },
  "Grounding": {
   "type": "object",
   "properties": {
    "verified": {
     "type": "integer",
     "minimum": 0,
     "maximum": 9007199254740991,
     "description": "observations that it held up, from any observer"
    },
    "failed": {
     "type": "integer",
     "minimum": 0,
     "maximum": 9007199254740991,
     "description": "observations that it did not, counted only when own-authored or a person's verdict: an untrusted peer's failed is observed and never counted"
    },
    "lastAt": {
     "$ref": "#/$defs/Timestamp"
    }
   },
   "required": [
    "verified",
    "failed",
    "lastAt"
   ],
   "additionalProperties": false
  },
  "Health": {
   "type": "object",
   "properties": {
    "ok": {
     "type": "boolean"
    },
    "ready": {
     "type": "boolean"
    },
    "grounded": {
     "type": "boolean"
    }
   },
   "required": [
    "ok",
    "ready",
    "grounded"
   ],
   "additionalProperties": false
  },
  "Lane": {
   "type": "object",
   "properties": {
    "name": {
     "type": "string"
    },
    "mind": {
     "type": "string",
     "enum": [
      "claude",
      "codex"
     ]
    },
    "protocol": {
     "type": "string",
     "enum": [
      "openai",
      "anthropic"
     ]
    },
    "transport": {
     "type": "string",
     "enum": [
      "cli",
      "api"
     ]
    },
    "model": {
     "type": "string"
    },
    "capabilities": {
     "type": "array",
     "items": {
      "type": "string"
     }
    },
    "callable": {
     "type": "array",
     "items": {
      "type": "string"
     }
    },
    "credentialPresent": {
     "type": "boolean"
    },
    "probe": {
     "anyOf": [
      {
       "type": "object",
       "properties": {
        "at": {
         "$ref": "#/$defs/Timestamp"
        },
        "ok": {
         "type": "boolean"
        },
        "note": {
         "type": "string"
        }
       },
       "required": [
        "at",
        "ok",
        "note"
       ],
       "additionalProperties": false
      },
      {
       "type": "null"
      }
     ]
    }
   },
   "required": [
    "name",
    "mind",
    "protocol",
    "capabilities",
    "callable",
    "credentialPresent",
    "probe"
   ],
   "additionalProperties": false
  },
  "Lineage": {
   "type": "object",
   "properties": {
    "parent": {
     "anyOf": [
      {
       "$ref": "#/$defs/MissionId"
      },
      {
       "type": "null"
      }
     ]
    },
    "relation": {
     "anyOf": [
      {
       "type": "string",
       "enum": [
        "shard",
        "fork",
        "patch",
        "resume",
        "replay",
        "apply",
        "reskill",
        "root-cause",
        "start"
       ]
      },
      {
       "type": "null"
      }
     ]
    },
    "children": {
     "type": "array",
     "items": {
      "$ref": "#/$defs/MissionId"
     }
    }
   },
   "required": [
    "parent",
    "relation",
    "children"
   ],
   "additionalProperties": false
  },
  "MetricVector": {
   "type": "object",
   "propertyNames": {
    "type": "string"
   },
   "additionalProperties": {}
  },
  "Mission": {
   "oneOf": [
    {
     "type": "object",
     "properties": {
      "v": {
       "type": "string",
       "const": "xmesh.mission/1"
      },
      "id": {
       "$ref": "#/$defs/MissionId"
      },
      "status": {
       "$ref": "#/$defs/MissionStatus"
      },
      "waiting": {
       "anyOf": [
        {
         "$ref": "#/$defs/Waiting"
        },
        {
         "type": "null"
        }
       ]
      },
      "blocked": {
       "anyOf": [
        {
         "$ref": "#/$defs/Blocked"
        },
        {
         "type": "null"
        }
       ]
      },
      "diagnosis": {
       "anyOf": [
        {
         "$ref": "#/$defs/Diagnosis"
        },
        {
         "type": "null"
        }
       ],
       "description": "null until a deep root cause of this mission has completed (op root-cause)"
      },
      "verdict": {
       "anyOf": [
        {
         "$ref": "#/$defs/Verdict"
        },
        {
         "type": "null"
        }
       ]
      },
      "cat7": {
       "$ref": "#/$defs/Cat7"
      },
      "cmb": {
       "anyOf": [
        {
         "$ref": "#/$defs/CmbKey"
        },
        {
         "type": "null"
        }
       ],
       "description": "the request's own CMB address: the mesh admits, stores and recalls the mission by it"
      },
      "specDigest": {
       "type": "string",
       "pattern": "^[0-9a-f]{64}$",
       "description": "SHA-256 of the canonical JSON of spec, recorded by the runtime when it accepted the request. In v1 the spec is NOT covered by the requester's signature: the CMB signs CAT7 only, and a spec never inherits that signature by proximity"
      },
      "requestedBy": {
       "$ref": "#/$defs/Principal"
      },
      "room": {
       "anyOf": [
        {
         "$ref": "#/$defs/RoomName"
        },
        {
         "type": "null"
        }
       ]
      },
      "visibility": {
       "type": "string",
       "enum": [
        "private",
        "tenant"
       ]
      },
      "createdAt": {
       "$ref": "#/$defs/Timestamp"
      },
      "updatedAt": {
       "$ref": "#/$defs/Timestamp"
      },
      "endedAt": {
       "anyOf": [
        {
         "$ref": "#/$defs/Timestamp"
        },
        {
         "type": "null"
        }
       ]
      },
      "fault": {
       "description": "why the runtime could not carry the mission out after accepting it (the mission then reads failed); null otherwise",
       "type": [
        "string",
        "null"
       ]
      },
      "executor": {
       "anyOf": [
        {
         "$ref": "#/$defs/Executor"
        },
        {
         "type": "null"
        }
       ]
      },
      "lineage": {
       "$ref": "#/$defs/Lineage"
      },
      "progress": {
       "$ref": "#/$defs/Progress"
      },
      "evidence": {
       "$ref": "#/$defs/Evidence"
      },
      "pendingVerification": {
       "maxItems": 20,
       "type": "array",
       "items": {
        "$ref": "#/$defs/PendingClaim"
       },
       "description": "lifecycle claims awaiting verification, oldest first, deduplicated by key; empty when there are none. Not evidence: the verified record is"
      },
      "usage": {
       "anyOf": [
        {
         "type": "object",
         "properties": {
          "input": {
           "type": "integer",
           "minimum": -9007199254740991,
           "maximum": 9007199254740991
          },
          "cached": {
           "type": "integer",
           "minimum": -9007199254740991,
           "maximum": 9007199254740991
          },
          "output": {
           "type": "integer",
           "minimum": -9007199254740991,
           "maximum": 9007199254740991
          },
          "usd": {
           "type": [
            "number",
            "null"
           ]
          }
         },
         "required": [
          "input",
          "cached",
          "output",
          "usd"
         ],
         "additionalProperties": false
        },
        {
         "type": "null"
        }
       ]
      },
      "notes": {
       "description": "what people recorded on the mission with op note, oldest first, the newest 50; empty when there are none. Always sent by a runtime from 0.10.11; absent from a Mission an earlier one returned. A task mission's notes are its card's actions (result.actions)",
       "maxItems": 50,
       "type": "array",
       "items": {
        "$ref": "#/$defs/MissionNote"
       }
      },
      "notices": {
       "description": "the runtime's notices about mesh traffic around the mission that are neither its progress nor a fault, oldest first, the newest 20; empty when there are none. Always sent by a runtime from 0.10.11; absent from a Mission an earlier one returned",
       "maxItems": 20,
       "type": "array",
       "items": {
        "$ref": "#/$defs/MissionNotice"
       }
      },
      "kind": {
       "type": "string",
       "const": "work"
      },
      "spec": {
       "$ref": "#/$defs/WorkSpec"
      },
      "result": {
       "anyOf": [
        {
         "$ref": "#/$defs/WorkResult"
        },
        {
         "type": "null"
        }
       ]
      }
     },
     "required": [
      "v",
      "id",
      "status",
      "waiting",
      "blocked",
      "diagnosis",
      "verdict",
      "cat7",
      "cmb",
      "specDigest",
      "requestedBy",
      "room",
      "visibility",
      "createdAt",
      "updatedAt",
      "endedAt",
      "fault",
      "executor",
      "lineage",
      "progress",
      "evidence",
      "pendingVerification",
      "usage",
      "kind",
      "spec",
      "result"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "v": {
       "type": "string",
       "const": "xmesh.mission/1"
      },
      "id": {
       "$ref": "#/$defs/MissionId"
      },
      "status": {
       "$ref": "#/$defs/MissionStatus"
      },
      "waiting": {
       "anyOf": [
        {
         "$ref": "#/$defs/Waiting"
        },
        {
         "type": "null"
        }
       ]
      },
      "blocked": {
       "anyOf": [
        {
         "$ref": "#/$defs/Blocked"
        },
        {
         "type": "null"
        }
       ]
      },
      "diagnosis": {
       "anyOf": [
        {
         "$ref": "#/$defs/Diagnosis"
        },
        {
         "type": "null"
        }
       ],
       "description": "null until a deep root cause of this mission has completed (op root-cause)"
      },
      "verdict": {
       "anyOf": [
        {
         "$ref": "#/$defs/Verdict"
        },
        {
         "type": "null"
        }
       ]
      },
      "cat7": {
       "$ref": "#/$defs/Cat7"
      },
      "cmb": {
       "anyOf": [
        {
         "$ref": "#/$defs/CmbKey"
        },
        {
         "type": "null"
        }
       ],
       "description": "the request's own CMB address: the mesh admits, stores and recalls the mission by it"
      },
      "specDigest": {
       "type": "string",
       "pattern": "^[0-9a-f]{64}$",
       "description": "SHA-256 of the canonical JSON of spec, recorded by the runtime when it accepted the request. In v1 the spec is NOT covered by the requester's signature: the CMB signs CAT7 only, and a spec never inherits that signature by proximity"
      },
      "requestedBy": {
       "$ref": "#/$defs/Principal"
      },
      "room": {
       "anyOf": [
        {
         "$ref": "#/$defs/RoomName"
        },
        {
         "type": "null"
        }
       ]
      },
      "visibility": {
       "type": "string",
       "enum": [
        "private",
        "tenant"
       ]
      },
      "createdAt": {
       "$ref": "#/$defs/Timestamp"
      },
      "updatedAt": {
       "$ref": "#/$defs/Timestamp"
      },
      "endedAt": {
       "anyOf": [
        {
         "$ref": "#/$defs/Timestamp"
        },
        {
         "type": "null"
        }
       ]
      },
      "fault": {
       "description": "why the runtime could not carry the mission out after accepting it (the mission then reads failed); null otherwise",
       "type": [
        "string",
        "null"
       ]
      },
      "executor": {
       "anyOf": [
        {
         "$ref": "#/$defs/Executor"
        },
        {
         "type": "null"
        }
       ]
      },
      "lineage": {
       "$ref": "#/$defs/Lineage"
      },
      "progress": {
       "$ref": "#/$defs/Progress"
      },
      "evidence": {
       "$ref": "#/$defs/Evidence"
      },
      "pendingVerification": {
       "maxItems": 20,
       "type": "array",
       "items": {
        "$ref": "#/$defs/PendingClaim"
       },
       "description": "lifecycle claims awaiting verification, oldest first, deduplicated by key; empty when there are none. Not evidence: the verified record is"
      },
      "usage": {
       "anyOf": [
        {
         "type": "object",
         "properties": {
          "input": {
           "type": "integer",
           "minimum": -9007199254740991,
           "maximum": 9007199254740991
          },
          "cached": {
           "type": "integer",
           "minimum": -9007199254740991,
           "maximum": 9007199254740991
          },
          "output": {
           "type": "integer",
           "minimum": -9007199254740991,
           "maximum": 9007199254740991
          },
          "usd": {
           "type": [
            "number",
            "null"
           ]
          }
         },
         "required": [
          "input",
          "cached",
          "output",
          "usd"
         ],
         "additionalProperties": false
        },
        {
         "type": "null"
        }
       ]
      },
      "notes": {
       "description": "what people recorded on the mission with op note, oldest first, the newest 50; empty when there are none. Always sent by a runtime from 0.10.11; absent from a Mission an earlier one returned. A task mission's notes are its card's actions (result.actions)",
       "maxItems": 50,
       "type": "array",
       "items": {
        "$ref": "#/$defs/MissionNote"
       }
      },
      "notices": {
       "description": "the runtime's notices about mesh traffic around the mission that are neither its progress nor a fault, oldest first, the newest 20; empty when there are none. Always sent by a runtime from 0.10.11; absent from a Mission an earlier one returned",
       "maxItems": 20,
       "type": "array",
       "items": {
        "$ref": "#/$defs/MissionNotice"
       }
      },
      "kind": {
       "type": "string",
       "const": "question"
      },
      "spec": {
       "$ref": "#/$defs/QuestionSpec"
      },
      "result": {
       "anyOf": [
        {
         "$ref": "#/$defs/QuestionResult"
        },
        {
         "type": "null"
        }
       ]
      }
     },
     "required": [
      "v",
      "id",
      "status",
      "waiting",
      "blocked",
      "diagnosis",
      "verdict",
      "cat7",
      "cmb",
      "specDigest",
      "requestedBy",
      "room",
      "visibility",
      "createdAt",
      "updatedAt",
      "endedAt",
      "fault",
      "executor",
      "lineage",
      "progress",
      "evidence",
      "pendingVerification",
      "usage",
      "kind",
      "spec",
      "result"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "v": {
       "type": "string",
       "const": "xmesh.mission/1"
      },
      "id": {
       "$ref": "#/$defs/MissionId"
      },
      "status": {
       "$ref": "#/$defs/MissionStatus"
      },
      "waiting": {
       "anyOf": [
        {
         "$ref": "#/$defs/Waiting"
        },
        {
         "type": "null"
        }
       ]
      },
      "blocked": {
       "anyOf": [
        {
         "$ref": "#/$defs/Blocked"
        },
        {
         "type": "null"
        }
       ]
      },
      "diagnosis": {
       "anyOf": [
        {
         "$ref": "#/$defs/Diagnosis"
        },
        {
         "type": "null"
        }
       ],
       "description": "null until a deep root cause of this mission has completed (op root-cause)"
      },
      "verdict": {
       "anyOf": [
        {
         "$ref": "#/$defs/Verdict"
        },
        {
         "type": "null"
        }
       ]
      },
      "cat7": {
       "$ref": "#/$defs/Cat7"
      },
      "cmb": {
       "anyOf": [
        {
         "$ref": "#/$defs/CmbKey"
        },
        {
         "type": "null"
        }
       ],
       "description": "the request's own CMB address: the mesh admits, stores and recalls the mission by it"
      },
      "specDigest": {
       "type": "string",
       "pattern": "^[0-9a-f]{64}$",
       "description": "SHA-256 of the canonical JSON of spec, recorded by the runtime when it accepted the request. In v1 the spec is NOT covered by the requester's signature: the CMB signs CAT7 only, and a spec never inherits that signature by proximity"
      },
      "requestedBy": {
       "$ref": "#/$defs/Principal"
      },
      "room": {
       "anyOf": [
        {
         "$ref": "#/$defs/RoomName"
        },
        {
         "type": "null"
        }
       ]
      },
      "visibility": {
       "type": "string",
       "enum": [
        "private",
        "tenant"
       ]
      },
      "createdAt": {
       "$ref": "#/$defs/Timestamp"
      },
      "updatedAt": {
       "$ref": "#/$defs/Timestamp"
      },
      "endedAt": {
       "anyOf": [
        {
         "$ref": "#/$defs/Timestamp"
        },
        {
         "type": "null"
        }
       ]
      },
      "fault": {
       "description": "why the runtime could not carry the mission out after accepting it (the mission then reads failed); null otherwise",
       "type": [
        "string",
        "null"
       ]
      },
      "executor": {
       "anyOf": [
        {
         "$ref": "#/$defs/Executor"
        },
        {
         "type": "null"
        }
       ]
      },
      "lineage": {
       "$ref": "#/$defs/Lineage"
      },
      "progress": {
       "$ref": "#/$defs/Progress"
      },
      "evidence": {
       "$ref": "#/$defs/Evidence"
      },
      "pendingVerification": {
       "maxItems": 20,
       "type": "array",
       "items": {
        "$ref": "#/$defs/PendingClaim"
       },
       "description": "lifecycle claims awaiting verification, oldest first, deduplicated by key; empty when there are none. Not evidence: the verified record is"
      },
      "usage": {
       "anyOf": [
        {
         "type": "object",
         "properties": {
          "input": {
           "type": "integer",
           "minimum": -9007199254740991,
           "maximum": 9007199254740991
          },
          "cached": {
           "type": "integer",
           "minimum": -9007199254740991,
           "maximum": 9007199254740991
          },
          "output": {
           "type": "integer",
           "minimum": -9007199254740991,
           "maximum": 9007199254740991
          },
          "usd": {
           "type": [
            "number",
            "null"
           ]
          }
         },
         "required": [
          "input",
          "cached",
          "output",
          "usd"
         ],
         "additionalProperties": false
        },
        {
         "type": "null"
        }
       ]
      },
      "notes": {
       "description": "what people recorded on the mission with op note, oldest first, the newest 50; empty when there are none. Always sent by a runtime from 0.10.11; absent from a Mission an earlier one returned. A task mission's notes are its card's actions (result.actions)",
       "maxItems": 50,
       "type": "array",
       "items": {
        "$ref": "#/$defs/MissionNote"
       }
      },
      "notices": {
       "description": "the runtime's notices about mesh traffic around the mission that are neither its progress nor a fault, oldest first, the newest 20; empty when there are none. Always sent by a runtime from 0.10.11; absent from a Mission an earlier one returned",
       "maxItems": 20,
       "type": "array",
       "items": {
        "$ref": "#/$defs/MissionNotice"
       }
      },
      "kind": {
       "type": "string",
       "const": "review"
      },
      "spec": {
       "$ref": "#/$defs/ReviewSpec"
      },
      "result": {
       "anyOf": [
        {
         "$ref": "#/$defs/ReviewResult"
        },
        {
         "type": "null"
        }
       ]
      }
     },
     "required": [
      "v",
      "id",
      "status",
      "waiting",
      "blocked",
      "diagnosis",
      "verdict",
      "cat7",
      "cmb",
      "specDigest",
      "requestedBy",
      "room",
      "visibility",
      "createdAt",
      "updatedAt",
      "endedAt",
      "fault",
      "executor",
      "lineage",
      "progress",
      "evidence",
      "pendingVerification",
      "usage",
      "kind",
      "spec",
      "result"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "v": {
       "type": "string",
       "const": "xmesh.mission/1"
      },
      "id": {
       "$ref": "#/$defs/MissionId"
      },
      "status": {
       "$ref": "#/$defs/MissionStatus"
      },
      "waiting": {
       "anyOf": [
        {
         "$ref": "#/$defs/Waiting"
        },
        {
         "type": "null"
        }
       ]
      },
      "blocked": {
       "anyOf": [
        {
         "$ref": "#/$defs/Blocked"
        },
        {
         "type": "null"
        }
       ]
      },
      "diagnosis": {
       "anyOf": [
        {
         "$ref": "#/$defs/Diagnosis"
        },
        {
         "type": "null"
        }
       ],
       "description": "null until a deep root cause of this mission has completed (op root-cause)"
      },
      "verdict": {
       "anyOf": [
        {
         "$ref": "#/$defs/Verdict"
        },
        {
         "type": "null"
        }
       ]
      },
      "cat7": {
       "$ref": "#/$defs/Cat7"
      },
      "cmb": {
       "anyOf": [
        {
         "$ref": "#/$defs/CmbKey"
        },
        {
         "type": "null"
        }
       ],
       "description": "the request's own CMB address: the mesh admits, stores and recalls the mission by it"
      },
      "specDigest": {
       "type": "string",
       "pattern": "^[0-9a-f]{64}$",
       "description": "SHA-256 of the canonical JSON of spec, recorded by the runtime when it accepted the request. In v1 the spec is NOT covered by the requester's signature: the CMB signs CAT7 only, and a spec never inherits that signature by proximity"
      },
      "requestedBy": {
       "$ref": "#/$defs/Principal"
      },
      "room": {
       "anyOf": [
        {
         "$ref": "#/$defs/RoomName"
        },
        {
         "type": "null"
        }
       ]
      },
      "visibility": {
       "type": "string",
       "enum": [
        "private",
        "tenant"
       ]
      },
      "createdAt": {
       "$ref": "#/$defs/Timestamp"
      },
      "updatedAt": {
       "$ref": "#/$defs/Timestamp"
      },
      "endedAt": {
       "anyOf": [
        {
         "$ref": "#/$defs/Timestamp"
        },
        {
         "type": "null"
        }
       ]
      },
      "fault": {
       "description": "why the runtime could not carry the mission out after accepting it (the mission then reads failed); null otherwise",
       "type": [
        "string",
        "null"
       ]
      },
      "executor": {
       "anyOf": [
        {
         "$ref": "#/$defs/Executor"
        },
        {
         "type": "null"
        }
       ]
      },
      "lineage": {
       "$ref": "#/$defs/Lineage"
      },
      "progress": {
       "$ref": "#/$defs/Progress"
      },
      "evidence": {
       "$ref": "#/$defs/Evidence"
      },
      "pendingVerification": {
       "maxItems": 20,
       "type": "array",
       "items": {
        "$ref": "#/$defs/PendingClaim"
       },
       "description": "lifecycle claims awaiting verification, oldest first, deduplicated by key; empty when there are none. Not evidence: the verified record is"
      },
      "usage": {
       "anyOf": [
        {
         "type": "object",
         "properties": {
          "input": {
           "type": "integer",
           "minimum": -9007199254740991,
           "maximum": 9007199254740991
          },
          "cached": {
           "type": "integer",
           "minimum": -9007199254740991,
           "maximum": 9007199254740991
          },
          "output": {
           "type": "integer",
           "minimum": -9007199254740991,
           "maximum": 9007199254740991
          },
          "usd": {
           "type": [
            "number",
            "null"
           ]
          }
         },
         "required": [
          "input",
          "cached",
          "output",
          "usd"
         ],
         "additionalProperties": false
        },
        {
         "type": "null"
        }
       ]
      },
      "notes": {
       "description": "what people recorded on the mission with op note, oldest first, the newest 50; empty when there are none. Always sent by a runtime from 0.10.11; absent from a Mission an earlier one returned. A task mission's notes are its card's actions (result.actions)",
       "maxItems": 50,
       "type": "array",
       "items": {
        "$ref": "#/$defs/MissionNote"
       }
      },
      "notices": {
       "description": "the runtime's notices about mesh traffic around the mission that are neither its progress nor a fault, oldest first, the newest 20; empty when there are none. Always sent by a runtime from 0.10.11; absent from a Mission an earlier one returned",
       "maxItems": 20,
       "type": "array",
       "items": {
        "$ref": "#/$defs/MissionNotice"
       }
      },
      "kind": {
       "type": "string",
       "const": "research"
      },
      "spec": {
       "$ref": "#/$defs/ResearchSpec"
      },
      "result": {
       "anyOf": [
        {
         "$ref": "#/$defs/ResearchResult"
        },
        {
         "type": "null"
        }
       ]
      }
     },
     "required": [
      "v",
      "id",
      "status",
      "waiting",
      "blocked",
      "diagnosis",
      "verdict",
      "cat7",
      "cmb",
      "specDigest",
      "requestedBy",
      "room",
      "visibility",
      "createdAt",
      "updatedAt",
      "endedAt",
      "fault",
      "executor",
      "lineage",
      "progress",
      "evidence",
      "pendingVerification",
      "usage",
      "kind",
      "spec",
      "result"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "v": {
       "type": "string",
       "const": "xmesh.mission/1"
      },
      "id": {
       "$ref": "#/$defs/MissionId"
      },
      "status": {
       "$ref": "#/$defs/MissionStatus"
      },
      "waiting": {
       "anyOf": [
        {
         "$ref": "#/$defs/Waiting"
        },
        {
         "type": "null"
        }
       ]
      },
      "blocked": {
       "anyOf": [
        {
         "$ref": "#/$defs/Blocked"
        },
        {
         "type": "null"
        }
       ]
      },
      "diagnosis": {
       "anyOf": [
        {
         "$ref": "#/$defs/Diagnosis"
        },
        {
         "type": "null"
        }
       ],
       "description": "null until a deep root cause of this mission has completed (op root-cause)"
      },
      "verdict": {
       "anyOf": [
        {
         "$ref": "#/$defs/Verdict"
        },
        {
         "type": "null"
        }
       ]
      },
      "cat7": {
       "$ref": "#/$defs/Cat7"
      },
      "cmb": {
       "anyOf": [
        {
         "$ref": "#/$defs/CmbKey"
        },
        {
         "type": "null"
        }
       ],
       "description": "the request's own CMB address: the mesh admits, stores and recalls the mission by it"
      },
      "specDigest": {
       "type": "string",
       "pattern": "^[0-9a-f]{64}$",
       "description": "SHA-256 of the canonical JSON of spec, recorded by the runtime when it accepted the request. In v1 the spec is NOT covered by the requester's signature: the CMB signs CAT7 only, and a spec never inherits that signature by proximity"
      },
      "requestedBy": {
       "$ref": "#/$defs/Principal"
      },
      "room": {
       "anyOf": [
        {
         "$ref": "#/$defs/RoomName"
        },
        {
         "type": "null"
        }
       ]
      },
      "visibility": {
       "type": "string",
       "enum": [
        "private",
        "tenant"
       ]
      },
      "createdAt": {
       "$ref": "#/$defs/Timestamp"
      },
      "updatedAt": {
       "$ref": "#/$defs/Timestamp"
      },
      "endedAt": {
       "anyOf": [
        {
         "$ref": "#/$defs/Timestamp"
        },
        {
         "type": "null"
        }
       ]
      },
      "fault": {
       "description": "why the runtime could not carry the mission out after accepting it (the mission then reads failed); null otherwise",
       "type": [
        "string",
        "null"
       ]
      },
      "executor": {
       "anyOf": [
        {
         "$ref": "#/$defs/Executor"
        },
        {
         "type": "null"
        }
       ]
      },
      "lineage": {
       "$ref": "#/$defs/Lineage"
      },
      "progress": {
       "$ref": "#/$defs/Progress"
      },
      "evidence": {
       "$ref": "#/$defs/Evidence"
      },
      "pendingVerification": {
       "maxItems": 20,
       "type": "array",
       "items": {
        "$ref": "#/$defs/PendingClaim"
       },
       "description": "lifecycle claims awaiting verification, oldest first, deduplicated by key; empty when there are none. Not evidence: the verified record is"
      },
      "usage": {
       "anyOf": [
        {
         "type": "object",
         "properties": {
          "input": {
           "type": "integer",
           "minimum": -9007199254740991,
           "maximum": 9007199254740991
          },
          "cached": {
           "type": "integer",
           "minimum": -9007199254740991,
           "maximum": 9007199254740991
          },
          "output": {
           "type": "integer",
           "minimum": -9007199254740991,
           "maximum": 9007199254740991
          },
          "usd": {
           "type": [
            "number",
            "null"
           ]
          }
         },
         "required": [
          "input",
          "cached",
          "output",
          "usd"
         ],
         "additionalProperties": false
        },
        {
         "type": "null"
        }
       ]
      },
      "notes": {
       "description": "what people recorded on the mission with op note, oldest first, the newest 50; empty when there are none. Always sent by a runtime from 0.10.11; absent from a Mission an earlier one returned. A task mission's notes are its card's actions (result.actions)",
       "maxItems": 50,
       "type": "array",
       "items": {
        "$ref": "#/$defs/MissionNote"
       }
      },
      "notices": {
       "description": "the runtime's notices about mesh traffic around the mission that are neither its progress nor a fault, oldest first, the newest 20; empty when there are none. Always sent by a runtime from 0.10.11; absent from a Mission an earlier one returned",
       "maxItems": 20,
       "type": "array",
       "items": {
        "$ref": "#/$defs/MissionNotice"
       }
      },
      "kind": {
       "type": "string",
       "const": "assessment"
      },
      "spec": {
       "$ref": "#/$defs/AssessmentSpec"
      },
      "result": {
       "anyOf": [
        {
         "$ref": "#/$defs/AssessmentResult"
        },
        {
         "type": "null"
        }
       ]
      }
     },
     "required": [
      "v",
      "id",
      "status",
      "waiting",
      "blocked",
      "diagnosis",
      "verdict",
      "cat7",
      "cmb",
      "specDigest",
      "requestedBy",
      "room",
      "visibility",
      "createdAt",
      "updatedAt",
      "endedAt",
      "fault",
      "executor",
      "lineage",
      "progress",
      "evidence",
      "pendingVerification",
      "usage",
      "kind",
      "spec",
      "result"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "v": {
       "type": "string",
       "const": "xmesh.mission/1"
      },
      "id": {
       "$ref": "#/$defs/MissionId"
      },
      "status": {
       "$ref": "#/$defs/MissionStatus"
      },
      "waiting": {
       "anyOf": [
        {
         "$ref": "#/$defs/Waiting"
        },
        {
         "type": "null"
        }
       ]
      },
      "blocked": {
       "anyOf": [
        {
         "$ref": "#/$defs/Blocked"
        },
        {
         "type": "null"
        }
       ]
      },
      "diagnosis": {
       "anyOf": [
        {
         "$ref": "#/$defs/Diagnosis"
        },
        {
         "type": "null"
        }
       ],
       "description": "null until a deep root cause of this mission has completed (op root-cause)"
      },
      "verdict": {
       "anyOf": [
        {
         "$ref": "#/$defs/Verdict"
        },
        {
         "type": "null"
        }
       ]
      },
      "cat7": {
       "$ref": "#/$defs/Cat7"
      },
      "cmb": {
       "anyOf": [
        {
         "$ref": "#/$defs/CmbKey"
        },
        {
         "type": "null"
        }
       ],
       "description": "the request's own CMB address: the mesh admits, stores and recalls the mission by it"
      },
      "specDigest": {
       "type": "string",
       "pattern": "^[0-9a-f]{64}$",
       "description": "SHA-256 of the canonical JSON of spec, recorded by the runtime when it accepted the request. In v1 the spec is NOT covered by the requester's signature: the CMB signs CAT7 only, and a spec never inherits that signature by proximity"
      },
      "requestedBy": {
       "$ref": "#/$defs/Principal"
      },
      "room": {
       "anyOf": [
        {
         "$ref": "#/$defs/RoomName"
        },
        {
         "type": "null"
        }
       ]
      },
      "visibility": {
       "type": "string",
       "enum": [
        "private",
        "tenant"
       ]
      },
      "createdAt": {
       "$ref": "#/$defs/Timestamp"
      },
      "updatedAt": {
       "$ref": "#/$defs/Timestamp"
      },
      "endedAt": {
       "anyOf": [
        {
         "$ref": "#/$defs/Timestamp"
        },
        {
         "type": "null"
        }
       ]
      },
      "fault": {
       "description": "why the runtime could not carry the mission out after accepting it (the mission then reads failed); null otherwise",
       "type": [
        "string",
        "null"
       ]
      },
      "executor": {
       "anyOf": [
        {
         "$ref": "#/$defs/Executor"
        },
        {
         "type": "null"
        }
       ]
      },
      "lineage": {
       "$ref": "#/$defs/Lineage"
      },
      "progress": {
       "$ref": "#/$defs/Progress"
      },
      "evidence": {
       "$ref": "#/$defs/Evidence"
      },
      "pendingVerification": {
       "maxItems": 20,
       "type": "array",
       "items": {
        "$ref": "#/$defs/PendingClaim"
       },
       "description": "lifecycle claims awaiting verification, oldest first, deduplicated by key; empty when there are none. Not evidence: the verified record is"
      },
      "usage": {
       "anyOf": [
        {
         "type": "object",
         "properties": {
          "input": {
           "type": "integer",
           "minimum": -9007199254740991,
           "maximum": 9007199254740991
          },
          "cached": {
           "type": "integer",
           "minimum": -9007199254740991,
           "maximum": 9007199254740991
          },
          "output": {
           "type": "integer",
           "minimum": -9007199254740991,
           "maximum": 9007199254740991
          },
          "usd": {
           "type": [
            "number",
            "null"
           ]
          }
         },
         "required": [
          "input",
          "cached",
          "output",
          "usd"
         ],
         "additionalProperties": false
        },
        {
         "type": "null"
        }
       ]
      },
      "notes": {
       "description": "what people recorded on the mission with op note, oldest first, the newest 50; empty when there are none. Always sent by a runtime from 0.10.11; absent from a Mission an earlier one returned. A task mission's notes are its card's actions (result.actions)",
       "maxItems": 50,
       "type": "array",
       "items": {
        "$ref": "#/$defs/MissionNote"
       }
      },
      "notices": {
       "description": "the runtime's notices about mesh traffic around the mission that are neither its progress nor a fault, oldest first, the newest 20; empty when there are none. Always sent by a runtime from 0.10.11; absent from a Mission an earlier one returned",
       "maxItems": 20,
       "type": "array",
       "items": {
        "$ref": "#/$defs/MissionNotice"
       }
      },
      "kind": {
       "type": "string",
       "const": "task"
      },
      "spec": {
       "$ref": "#/$defs/TaskSpec"
      },
      "result": {
       "anyOf": [
        {
         "$ref": "#/$defs/TaskResult"
        },
        {
         "type": "null"
        }
       ]
      }
     },
     "required": [
      "v",
      "id",
      "status",
      "waiting",
      "blocked",
      "diagnosis",
      "verdict",
      "cat7",
      "cmb",
      "specDigest",
      "requestedBy",
      "room",
      "visibility",
      "createdAt",
      "updatedAt",
      "endedAt",
      "fault",
      "executor",
      "lineage",
      "progress",
      "evidence",
      "pendingVerification",
      "usage",
      "kind",
      "spec",
      "result"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "v": {
       "type": "string",
       "const": "xmesh.mission/1"
      },
      "id": {
       "$ref": "#/$defs/MissionId"
      },
      "status": {
       "$ref": "#/$defs/MissionStatus"
      },
      "waiting": {
       "anyOf": [
        {
         "$ref": "#/$defs/Waiting"
        },
        {
         "type": "null"
        }
       ]
      },
      "blocked": {
       "anyOf": [
        {
         "$ref": "#/$defs/Blocked"
        },
        {
         "type": "null"
        }
       ]
      },
      "diagnosis": {
       "anyOf": [
        {
         "$ref": "#/$defs/Diagnosis"
        },
        {
         "type": "null"
        }
       ],
       "description": "null until a deep root cause of this mission has completed (op root-cause)"
      },
      "verdict": {
       "anyOf": [
        {
         "$ref": "#/$defs/Verdict"
        },
        {
         "type": "null"
        }
       ]
      },
      "cat7": {
       "$ref": "#/$defs/Cat7"
      },
      "cmb": {
       "anyOf": [
        {
         "$ref": "#/$defs/CmbKey"
        },
        {
         "type": "null"
        }
       ],
       "description": "the request's own CMB address: the mesh admits, stores and recalls the mission by it"
      },
      "specDigest": {
       "type": "string",
       "pattern": "^[0-9a-f]{64}$",
       "description": "SHA-256 of the canonical JSON of spec, recorded by the runtime when it accepted the request. In v1 the spec is NOT covered by the requester's signature: the CMB signs CAT7 only, and a spec never inherits that signature by proximity"
      },
      "requestedBy": {
       "$ref": "#/$defs/Principal"
      },
      "room": {
       "anyOf": [
        {
         "$ref": "#/$defs/RoomName"
        },
        {
         "type": "null"
        }
       ]
      },
      "visibility": {
       "type": "string",
       "enum": [
        "private",
        "tenant"
       ]
      },
      "createdAt": {
       "$ref": "#/$defs/Timestamp"
      },
      "updatedAt": {
       "$ref": "#/$defs/Timestamp"
      },
      "endedAt": {
       "anyOf": [
        {
         "$ref": "#/$defs/Timestamp"
        },
        {
         "type": "null"
        }
       ]
      },
      "fault": {
       "description": "why the runtime could not carry the mission out after accepting it (the mission then reads failed); null otherwise",
       "type": [
        "string",
        "null"
       ]
      },
      "executor": {
       "anyOf": [
        {
         "$ref": "#/$defs/Executor"
        },
        {
         "type": "null"
        }
       ]
      },
      "lineage": {
       "$ref": "#/$defs/Lineage"
      },
      "progress": {
       "$ref": "#/$defs/Progress"
      },
      "evidence": {
       "$ref": "#/$defs/Evidence"
      },
      "pendingVerification": {
       "maxItems": 20,
       "type": "array",
       "items": {
        "$ref": "#/$defs/PendingClaim"
       },
       "description": "lifecycle claims awaiting verification, oldest first, deduplicated by key; empty when there are none. Not evidence: the verified record is"
      },
      "usage": {
       "anyOf": [
        {
         "type": "object",
         "properties": {
          "input": {
           "type": "integer",
           "minimum": -9007199254740991,
           "maximum": 9007199254740991
          },
          "cached": {
           "type": "integer",
           "minimum": -9007199254740991,
           "maximum": 9007199254740991
          },
          "output": {
           "type": "integer",
           "minimum": -9007199254740991,
           "maximum": 9007199254740991
          },
          "usd": {
           "type": [
            "number",
            "null"
           ]
          }
         },
         "required": [
          "input",
          "cached",
          "output",
          "usd"
         ],
         "additionalProperties": false
        },
        {
         "type": "null"
        }
       ]
      },
      "notes": {
       "description": "what people recorded on the mission with op note, oldest first, the newest 50; empty when there are none. Always sent by a runtime from 0.10.11; absent from a Mission an earlier one returned. A task mission's notes are its card's actions (result.actions)",
       "maxItems": 50,
       "type": "array",
       "items": {
        "$ref": "#/$defs/MissionNote"
       }
      },
      "notices": {
       "description": "the runtime's notices about mesh traffic around the mission that are neither its progress nor a fault, oldest first, the newest 20; empty when there are none. Always sent by a runtime from 0.10.11; absent from a Mission an earlier one returned",
       "maxItems": 20,
       "type": "array",
       "items": {
        "$ref": "#/$defs/MissionNotice"
       }
      },
      "kind": {
       "type": "string",
       "const": "simulation"
      },
      "spec": {
       "$ref": "#/$defs/SimulationSpec"
      },
      "result": {
       "anyOf": [
        {
         "$ref": "#/$defs/SimulationResult"
        },
        {
         "type": "null"
        }
       ]
      }
     },
     "required": [
      "v",
      "id",
      "status",
      "waiting",
      "blocked",
      "diagnosis",
      "verdict",
      "cat7",
      "cmb",
      "specDigest",
      "requestedBy",
      "room",
      "visibility",
      "createdAt",
      "updatedAt",
      "endedAt",
      "fault",
      "executor",
      "lineage",
      "progress",
      "evidence",
      "pendingVerification",
      "usage",
      "kind",
      "spec",
      "result"
     ],
     "additionalProperties": false
    }
   ]
  },
  "MissionId": {
   "type": "string",
   "pattern": "^mission-[0-9a-f]{6,32}$"
  },
  "MissionKind": {
   "type": "string",
   "enum": [
    "work",
    "question",
    "review",
    "research",
    "assessment",
    "task",
    "simulation"
   ]
  },
  "MissionNote": {
   "type": "object",
   "properties": {
    "by": {
     "type": "string",
     "description": "who wrote it, as type:id"
    },
    "text": {
     "type": "string"
    },
    "at": {
     "$ref": "#/$defs/Timestamp"
    }
   },
   "required": [
    "by",
    "text",
    "at"
   ],
   "additionalProperties": false
  },
  "MissionNotice": {
   "type": "object",
   "properties": {
    "kind": {
     "type": "string",
     "enum": [
      "delivery",
      "child-request"
     ],
     "description": "delivery: a mesh delivery for the mission's commission was refused because its author is not a party to it · child-request: a request to register a child of the commission was refused for the same reason"
    },
    "by": {
     "type": "string",
     "description": "the part of the runtime that wrote it"
    },
    "text": {
     "type": "string"
    },
    "at": {
     "$ref": "#/$defs/Timestamp"
    },
    "count": {
     "description": "how many times the same notice was seen, when more than once",
     "type": "integer",
     "minimum": -9007199254740991,
     "maximum": 9007199254740991
    },
    "lastAt": {
     "$ref": "#/$defs/Timestamp"
    }
   },
   "required": [
    "kind",
    "by",
    "text",
    "at"
   ],
   "additionalProperties": false
  },
  "MissionOperation": {
   "oneOf": [
    {
     "type": "object",
     "properties": {
      "op": {
       "type": "string",
       "const": "verdict"
      },
      "verdict": {
       "type": "string",
       "enum": [
        "validated",
        "dismissed"
       ]
      },
      "reason": {
       "type": "string",
       "maxLength": 2000
      },
      "permissionStop": {
       "type": "boolean"
      },
      "horizonDays": {
       "type": "integer",
       "minimum": 1,
       "maximum": 3650
      }
     },
     "required": [
      "op",
      "verdict"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "op": {
       "type": "string",
       "const": "decide"
      },
      "request": {
       "type": "string",
       "minLength": 1,
       "maxLength": 200
      },
      "decision": {
       "type": "string",
       "enum": [
        "approve",
        "deny"
       ]
      },
      "reason": {
       "type": "string",
       "maxLength": 2000
      },
      "alwaysAllow": {
       "type": "boolean"
      }
     },
     "required": [
      "op",
      "request",
      "decision"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "op": {
       "type": "string",
       "const": "resume"
      }
     },
     "required": [
      "op"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "op": {
       "type": "string",
       "const": "replay"
      },
      "reason": {
       "type": "string",
       "maxLength": 2000
      }
     },
     "required": [
      "op"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "op": {
       "type": "string",
       "const": "apply"
      },
      "note": {
       "type": "string",
       "maxLength": 4000
      },
      "mind": {
       "type": "string",
       "enum": [
        "claude",
        "codex"
       ]
      },
      "model": {
       "type": "string",
       "maxLength": 100
      }
     },
     "required": [
      "op"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "op": {
       "type": "string",
       "const": "reskill"
      },
      "skill": {
       "type": "string",
       "minLength": 1,
       "maxLength": 200
      }
     },
     "required": [
      "op",
      "skill"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "op": {
       "type": "string",
       "const": "propose-next"
      }
     },
     "required": [
      "op"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "op": {
       "type": "string",
       "const": "take-move"
      },
      "index": {
       "type": "integer",
       "minimum": 0,
       "maximum": 9007199254740991
      }
     },
     "required": [
      "op",
      "index"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "op": {
       "type": "string",
       "const": "root-cause"
      }
     },
     "required": [
      "op"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "op": {
       "type": "string",
       "const": "claim"
      }
     },
     "required": [
      "op"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "op": {
       "type": "string",
       "const": "move"
      },
      "to": {
       "type": "string",
       "enum": [
        "proposed",
        "ready",
        "in-progress",
        "in-review",
        "blocked",
        "done"
       ]
      },
      "reason": {
       "type": "string",
       "maxLength": 2000
      }
     },
     "required": [
      "op",
      "to"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "op": {
       "type": "string",
       "const": "note"
      },
      "text": {
       "type": "string",
       "minLength": 1,
       "maxLength": 4000
      }
     },
     "required": [
      "op",
      "text"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "op": {
       "type": "string",
       "const": "size"
      },
      "size": {
       "type": "string",
       "enum": [
        "S",
        "M",
        "L"
       ]
      }
     },
     "required": [
      "op",
      "size"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "op": {
       "type": "string",
       "const": "review"
      },
      "verdict": {
       "type": "string",
       "enum": [
        "approve",
        "objection",
        "none"
       ]
      },
      "text": {
       "type": "string",
       "maxLength": 4000
      }
     },
     "required": [
      "op",
      "verdict"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "op": {
       "type": "string",
       "const": "rank"
      },
      "rank": {
       "type": "integer",
       "minimum": 0,
       "maximum": 9007199254740991
      }
     },
     "required": [
      "op",
      "rank"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "op": {
       "type": "string",
       "const": "correct"
      },
      "focus": {
       "type": "string",
       "minLength": 1,
       "maxLength": 4000
      },
      "issue": {
       "type": "string",
       "minLength": 1,
       "maxLength": 4000
      }
     },
     "required": [
      "op",
      "focus"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "op": {
       "type": "string",
       "const": "start"
      }
     },
     "required": [
      "op"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "op": {
       "type": "string",
       "const": "link"
      },
      "mission": {
       "$ref": "#/$defs/MissionId"
      }
     },
     "required": [
      "op",
      "mission"
     ],
     "additionalProperties": false
    }
   ]
  },
  "MissionPage": {
   "type": "object",
   "properties": {
    "v": {
     "type": "string",
     "const": "xmesh.mission/1"
    },
    "items": {
     "type": "array",
     "items": {
      "$ref": "#/$defs/MissionSummary"
     }
    },
    "next": {
     "description": "opaque cursor; null at the end",
     "type": [
      "string",
      "null"
     ]
    }
   },
   "required": [
    "v",
    "items",
    "next"
   ],
   "additionalProperties": false
  },
  "MissionRequest": {
   "oneOf": [
    {
     "type": "object",
     "properties": {
      "kind": {
       "type": "string",
       "const": "work"
      },
      "cat7": {
       "$ref": "#/$defs/Cat7"
      },
      "spec": {
       "$ref": "#/$defs/WorkSpec"
      }
     },
     "required": [
      "kind",
      "cat7",
      "spec"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "kind": {
       "type": "string",
       "const": "question"
      },
      "cat7": {
       "$ref": "#/$defs/Cat7"
      },
      "spec": {
       "$ref": "#/$defs/QuestionSpec"
      }
     },
     "required": [
      "kind",
      "cat7",
      "spec"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "kind": {
       "type": "string",
       "const": "review"
      },
      "cat7": {
       "$ref": "#/$defs/Cat7"
      },
      "spec": {
       "$ref": "#/$defs/ReviewSpec"
      }
     },
     "required": [
      "kind",
      "cat7",
      "spec"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "kind": {
       "type": "string",
       "const": "research"
      },
      "cat7": {
       "$ref": "#/$defs/Cat7"
      },
      "spec": {
       "$ref": "#/$defs/ResearchSpec"
      }
     },
     "required": [
      "kind",
      "cat7",
      "spec"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "kind": {
       "type": "string",
       "const": "assessment"
      },
      "cat7": {
       "$ref": "#/$defs/Cat7"
      },
      "spec": {
       "$ref": "#/$defs/AssessmentSpec"
      }
     },
     "required": [
      "kind",
      "cat7",
      "spec"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "kind": {
       "type": "string",
       "const": "task"
      },
      "cat7": {
       "$ref": "#/$defs/Cat7"
      },
      "spec": {
       "$ref": "#/$defs/TaskSpec"
      }
     },
     "required": [
      "kind",
      "cat7",
      "spec"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "kind": {
       "type": "string",
       "const": "simulation"
      },
      "cat7": {
       "$ref": "#/$defs/Cat7"
      },
      "spec": {
       "$ref": "#/$defs/SimulationSpec"
      }
     },
     "required": [
      "kind",
      "cat7",
      "spec"
     ],
     "additionalProperties": false
    }
   ]
  },
  "MissionStatus": {
   "type": "string",
   "enum": [
    "accepted",
    "running",
    "waiting",
    "blocked",
    "completed",
    "failed",
    "abandoned"
   ]
  },
  "MissionSummary": {
   "type": "object",
   "properties": {
    "id": {
     "$ref": "#/$defs/MissionId"
    },
    "kind": {
     "$ref": "#/$defs/MissionKind"
    },
    "status": {
     "$ref": "#/$defs/MissionStatus"
    },
    "verdict": {
     "anyOf": [
      {
       "type": "string",
       "enum": [
        "validated",
        "dismissed"
       ]
      },
      {
       "type": "null"
      }
     ]
    },
    "focus": {
     "type": "string",
     "maxLength": 200
    },
    "room": {
     "anyOf": [
      {
       "$ref": "#/$defs/RoomName"
      },
      {
       "type": "null"
      }
     ]
    },
    "requestedBy": {
     "$ref": "#/$defs/Principal"
    },
    "phase": {
     "type": [
      "string",
      "null"
     ]
    },
    "createdAt": {
     "$ref": "#/$defs/Timestamp"
    },
    "updatedAt": {
     "$ref": "#/$defs/Timestamp"
    },
    "reportedBy": {
     "description": "who reported the completion (evidence.reported.by); null before one",
     "type": [
      "string",
      "null"
     ]
    },
    "checked": {
     "anyOf": [
      {
       "type": "object",
       "properties": {
        "passed": {
         "type": "integer",
         "minimum": 0,
         "maximum": 9007199254740991
        },
        "total": {
         "type": "integer",
         "minimum": 0,
         "maximum": 9007199254740991
        }
       },
       "required": [
        "passed",
        "total"
       ],
       "additionalProperties": false
      },
      {
       "type": "null"
      }
     ],
     "description": "the harness's stored tally; the clauses themselves are on the full read"
    },
    "parent": {
     "anyOf": [
      {
       "$ref": "#/$defs/MissionId"
      },
      {
       "type": "null"
      }
     ],
     "description": "lineage.parent"
    },
    "firstArtifact": {
     "description": "the first artifact the completion names (evidence.reported.artifacts[0])",
     "type": [
      "string",
      "null"
     ]
    },
    "completionCmb": {
     "anyOf": [
      {
       "$ref": "#/$defs/CmbKey"
      },
      {
       "type": "null"
      }
     ],
     "description": "evidence.reported.cmb: the completion CMB, which a closed-record row links as its proof"
    },
    "grounding": {
     "anyOf": [
      {
       "$ref": "#/$defs/Grounding"
      },
      {
       "type": "null"
      }
     ],
     "description": "evidence.grounding: whether it held up, as the tally stands"
    },
    "review": {
     "anyOf": [
      {
       "type": "object",
       "properties": {
        "approvals": {
         "type": "integer",
         "minimum": 0,
         "maximum": 9007199254740991
        },
        "objections": {
         "type": "integer",
         "minimum": 0,
         "maximum": 9007199254740991
        }
       },
       "required": [
        "approvals",
        "objections"
       ],
       "additionalProperties": false
      },
      {
       "type": "null"
      }
     ],
     "description": "evidence.review as a tally: the critic's approvals and objections so far, {0, 0} while a configured critic has not ruled; null when no critic was configured and none ruled. A ruling moves updatedAt"
    },
    "waitingOn": {
     "anyOf": [
      {
       "type": "string",
       "enum": [
        "capacity",
        "approval",
        "budget",
        "review",
        "person"
       ]
      },
      {
       "type": "null"
      }
     ],
     "description": "waiting.on: what a waiting mission waits for, so a row tells a mind slot from a person; null unless the mission is waiting"
    },
    "blockerType": {
     "description": "blocked.blockerType: the kind of integration point the block is; null unless the mission is blocked",
     "type": [
      "string",
      "null"
     ]
    },
    "gapLayer": {
     "description": "blocked.gapLayer: the ontology layer the gap belongs to; null unless the mission is blocked",
     "type": [
      "string",
      "null"
     ]
    },
    "requests": {
     "type": "array",
     "items": {
      "type": "object",
      "properties": {
       "id": {
        "type": "string",
        "description": "presentation.id: the capability shape, a stable id for grouping"
       },
       "capability": {
        "type": "string",
        "description": "presentation.capability: its short plain label"
       },
       "pending": {
        "type": "integer",
        "minimum": 0,
        "maximum": 9007199254740991
       },
       "approved": {
        "type": "integer",
        "minimum": 0,
        "maximum": 9007199254740991
       },
       "denied": {
        "type": "integer",
        "minimum": 0,
        "maximum": 9007199254740991
       }
      },
      "required": [
       "id",
       "capability",
       "pending",
       "approved",
       "denied"
      ],
      "additionalProperties": false
     },
     "description": "evidence.requests tallied by capability shape, in the order each was first asked; empty when none was raised"
    },
    "diagnosis": {
     "anyOf": [
      {
       "type": "object",
       "properties": {
        "locus": {
         "$ref": "#/$defs/DiagnosisLocus"
        },
        "missing": {
         "anyOf": [
          {
           "type": "string",
           "maxLength": 300
          },
          {
           "type": "null"
          }
         ]
        }
       },
       "required": [
        "locus",
        "missing"
       ],
       "additionalProperties": false
      },
      {
       "type": "null"
      }
     ],
     "description": "diagnosis.locus and .missing: the newest deep root cause's claim, never checked (who claimed it, its evidence and any ruling are on the full read); null until one has completed"
    }
   },
   "required": [
    "id",
    "kind",
    "status",
    "verdict",
    "focus",
    "room",
    "requestedBy",
    "phase",
    "createdAt",
    "updatedAt",
    "reportedBy",
    "checked",
    "parent",
    "firstArtifact",
    "completionCmb",
    "grounding",
    "review",
    "waitingOn",
    "blockerType",
    "gapLayer",
    "requests",
    "diagnosis"
   ],
   "additionalProperties": false
  },
  "Mood": {
   "type": "object",
   "properties": {
    "text": {
     "type": "string",
     "minLength": 1,
     "maxLength": 200
    },
    "valence": {
     "type": "number",
     "minimum": -1,
     "maximum": 1
    },
    "arousal": {
     "type": "number",
     "minimum": -1,
     "maximum": 1
    }
   },
   "additionalProperties": false
  },
  "NextMove": {
   "type": "object",
   "properties": {
    "kind": {
     "type": "string",
     "enum": [
      "fork",
      "patch"
     ]
    },
    "title": {
     "type": "string"
    },
    "rationale": {
     "type": "string"
    },
    "focus": {
     "type": "string"
    },
    "dod": {
     "type": "string"
    },
    "groundedIn": {
     "type": "string",
     "description": "what the move stands on, in a line: an objection, the checks, or a canon excerpt"
    },
    "soundness": {
     "type": "number"
    },
    "completeness": {
     "type": "number"
    },
    "weight": {
     "type": "number"
    }
   },
   "required": [
    "kind",
    "title",
    "rationale",
    "focus",
    "dod",
    "groundedIn",
    "soundness",
    "completeness",
    "weight"
   ],
   "additionalProperties": false
  },
  "OperationResponse": {
   "type": "object",
   "properties": {
    "v": {
     "type": "string",
     "const": "xmesh.mission/1"
    },
    "mission": {
     "$ref": "#/$defs/Mission"
    },
    "child": {
     "anyOf": [
      {
       "$ref": "#/$defs/Mission"
      },
      {
       "type": "null"
      }
     ]
    }
   },
   "required": [
    "v",
    "mission",
    "child"
   ],
   "additionalProperties": false
  },
  "Part": {
   "oneOf": [
    {
     "type": "object",
     "properties": {
      "part": {
       "type": "string",
       "const": "outputs"
      },
      "outputs": {
       "type": "array",
       "items": {
        "$ref": "#/$defs/ResolvedOutput"
       }
      },
      "unresolved": {
       "type": "array",
       "items": {
        "type": "string"
       }
      }
     },
     "required": [
      "part",
      "outputs",
      "unresolved"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "part": {
       "type": "string",
       "const": "diff"
      },
      "path": {
       "type": "string"
      },
      "diff": {
       "type": "string"
      },
      "truncated": {
       "type": "boolean"
      }
     },
     "required": [
      "part",
      "path",
      "diff",
      "truncated"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "part": {
       "type": "string",
       "const": "log"
      },
      "entries": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "n": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
         },
         "kind": {
          "type": "string",
          "enum": [
           "read",
           "write",
           "modify",
           "delete",
           "run",
           "tool",
           "search"
          ]
         },
         "target": {
          "type": "string"
         },
         "result": {
          "type": [
           "string",
           "null"
          ]
         }
        },
        "required": [
         "n",
         "kind",
         "target",
         "result"
        ],
        "additionalProperties": false
       }
      },
      "truncated": {
       "type": "boolean"
      }
     },
     "required": [
      "part",
      "entries",
      "truncated"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "part": {
       "type": "string",
       "const": "artifact"
      },
      "name": {
       "type": "string"
      },
      "size": {
       "type": "integer",
       "minimum": -9007199254740991,
       "maximum": 9007199254740991
      },
      "truncated": {
       "type": "boolean"
      },
      "content": {
       "type": "string"
      }
     },
     "required": [
      "part",
      "name",
      "size",
      "truncated",
      "content"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "part": {
       "type": "string",
       "const": "root-cause"
      },
      "name": {
       "type": "string"
      },
      "size": {
       "type": "integer",
       "minimum": -9007199254740991,
       "maximum": 9007199254740991
      },
      "truncated": {
       "type": "boolean"
      },
      "content": {
       "type": "string"
      }
     },
     "required": [
      "part",
      "name",
      "size",
      "truncated",
      "content"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "part": {
       "type": "string",
       "const": "square"
      },
      "square": {
       "$ref": "#/$defs/SquareName"
      },
      "mesh": {
       "type": "string"
      },
      "picture": {
       "anyOf": [
        {
         "type": "object",
         "properties": {
          "type": {
           "type": "string"
          },
          "alt": {
           "type": [
            "string",
            "null"
           ]
          },
          "holders": {
           "type": "integer",
           "minimum": -9007199254740991,
           "maximum": 9007199254740991
          },
          "since": {
           "type": "number"
          },
          "state": {
           "type": "string",
           "enum": [
            "single",
            "solid",
            "guarded",
            "contested"
           ]
          },
          "told": {
           "type": "boolean"
          }
         },
         "required": [
          "type",
          "alt",
          "holders",
          "since",
          "state",
          "told"
         ],
         "additionalProperties": false
        },
        {
         "type": "null"
        }
       ],
       "description": "what the mesh holds of the square (the engine's picture), null if nothing"
      },
      "knowledge": {
       "type": "object",
       "properties": {
        "tallies": {
         "type": "object",
         "propertyNames": {
          "$ref": "#/$defs/ClaimState"
         },
         "additionalProperties": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
         },
         "required": [
          "CONTESTED",
          "STALE",
          "AGING",
          "KNOWN",
          "UNKNOWN"
         ],
         "description": "our syms' beliefs about the station, one per sym, by state"
        },
        "claims": {
         "type": "array",
         "items": {
          "type": "object",
          "properties": {
           "type": {
            "type": "string",
            "description": "held as"
           },
           "owner": {
            "type": "string",
            "description": "whose, or \"×\""
           },
           "via": {
            "type": "string",
            "description": "how it was learned"
           },
           "n": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
           },
           "lo": {
            "type": "number"
           },
           "hi": {
            "type": "number",
            "description": "the beliefs' age range, seconds"
           },
           "worst": {
            "$ref": "#/$defs/ClaimState"
           }
          },
          "required": [
           "type",
           "owner",
           "via",
           "n",
           "lo",
           "hi",
           "worst"
          ],
          "additionalProperties": false
         }
        }
       },
       "required": [
        "tallies",
        "claims"
       ],
       "additionalProperties": false,
       "description": "a station's knowledge, tallied by state, and its dispute grouped by claim (console ctx.ts ClaimGroup)"
      }
     },
     "required": [
      "part",
      "square",
      "mesh",
      "picture",
      "knowledge"
     ],
     "additionalProperties": false
    },
    {
     "type": "object",
     "properties": {
      "part": {
       "type": "string",
       "const": "sym"
      },
      "sym": {
       "type": "string"
      },
      "card": {
       "type": "object",
       "properties": {
        "name": {
         "type": "string"
        },
        "role": {
         "type": "string"
        },
        "mesh": {
         "type": "string"
        },
        "record": {
         "type": "object",
         "propertyNames": {
          "type": "string"
         },
         "additionalProperties": {
          "type": "number"
         }
        }
       },
       "required": [
        "name",
        "role",
        "mesh",
        "record"
       ],
       "additionalProperties": false
      }
     },
     "required": [
      "part",
      "sym",
      "card"
     ],
     "additionalProperties": false
    }
   ]
  },
  "PendingClaim": {
   "type": "object",
   "properties": {
    "key": {
     "type": "string",
     "description": "the claimed record's CMB address"
    },
    "intent": {
     "type": "string",
     "description": "the lifecycle step it claims: accept, progress, complete, blocker, delivery, objection, verdict or disclose"
    },
    "claimedBy": {
     "type": "string",
     "description": "who the copy names as its author; unverified, and credited to no one (\"\" when the copy names nobody)"
    },
    "at": {
     "description": "when the runtime first held the claim",
     "$ref": "#/$defs/Timestamp"
    }
   },
   "required": [
    "key",
    "intent",
    "claimedBy",
    "at"
   ],
   "additionalProperties": false
  },
  "Plot": {
   "type": "object",
   "properties": {
    "id": {
     "type": "string",
     "pattern": "^[a-z0-9][a-z0-9-]{0,39}$"
    },
    "t": {
     "type": "number",
     "minimum": 0,
     "maximum": 3600
    },
    "kind": {
     "type": "string",
     "pattern": "^[a-z][a-z0-9-]{0,31}$"
    },
    "params": {
     "type": "object",
     "propertyNames": {
      "type": "string"
     },
     "additionalProperties": {}
    }
   },
   "required": [
    "id",
    "t",
    "kind",
    "params"
   ],
   "additionalProperties": false
  },
  "PlotReceipt": {
   "type": "object",
   "properties": {
    "id": {
     "type": "string"
    },
    "tick": {
     "type": "integer",
     "minimum": 0,
     "maximum": 9007199254740991,
     "description": "the tick the host applied it at"
    },
    "outcome": {
     "type": "string",
     "enum": [
      "applied",
      "refused"
     ]
    },
    "reasons": {
     "type": "array",
     "items": {
      "type": "string"
     },
     "description": "the engine's reasons for a refusal; empty when applied"
    },
    "events": {
     "type": "array",
     "items": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
     },
     "description": "seq of the events the plot caused"
    }
   },
   "required": [
    "id",
    "tick",
    "outcome",
    "reasons",
    "events"
   ],
   "additionalProperties": false
  },
  "Principal": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string",
     "enum": [
      "agent",
      "user"
     ],
     "description": "agent: a seat's session; user: a person or player"
    },
    "id": {
     "type": "string",
     "minLength": 1,
     "maxLength": 200
    },
    "role": {
     "$ref": "#/$defs/Role"
    }
   },
   "required": [
    "type",
    "id",
    "role"
   ],
   "additionalProperties": false
  },
  "Progress": {
   "type": "object",
   "properties": {
    "phase": {
     "type": [
      "string",
      "null"
     ]
    },
    "entries": {
     "type": "array",
     "items": {
      "type": "object",
      "properties": {
       "by": {
        "type": "string"
       },
       "text": {
        "type": "string"
       },
       "at": {
        "$ref": "#/$defs/Timestamp"
       },
       "count": {
        "type": "integer",
        "minimum": -9007199254740991,
        "maximum": 9007199254740991
       },
       "lastAt": {
        "$ref": "#/$defs/Timestamp"
       }
      },
      "required": [
       "by",
       "text",
       "at"
      ],
      "additionalProperties": false
     }
    },
    "total": {
     "type": "integer",
     "minimum": 0,
     "maximum": 9007199254740991,
     "description": "entries is bounded (the newest 40); total counts every entry appended, so a reader can tell new entries from a window that rolled. A record from before the count was kept knows only its window"
    }
   },
   "required": [
    "phase",
    "entries",
    "total"
   ],
   "additionalProperties": false
  },
  "QuestionResult": {
   "type": "object",
   "properties": {
    "answer": {
     "type": "object",
     "properties": {
      "text": {
       "type": "string"
      },
      "prose": {
       "type": [
        "string",
        "null"
       ]
      },
      "mode": {
       "type": "string",
       "enum": [
        "mind",
        "local-model",
        "illustrative"
       ]
      },
      "model": {
       "type": [
        "string",
        "null"
       ]
      },
      "claims": {
       "type": "array",
       "items": {
        "$ref": "#/$defs/Claim"
       }
      },
      "citations": {
       "type": "array",
       "items": {
        "type": "string"
       }
      },
      "cost": {
       "anyOf": [
        {
         "type": "object",
         "properties": {
          "minds": {
           "type": "integer",
           "minimum": -9007199254740991,
           "maximum": 9007199254740991
          },
          "tokens": {
           "type": "integer",
           "minimum": -9007199254740991,
           "maximum": 9007199254740991
          },
          "usd": {
           "type": [
            "number",
            "null"
           ]
          }
         },
         "required": [
          "minds",
          "tokens",
          "usd"
         ],
         "additionalProperties": false
        },
        {
         "type": "null"
        }
       ]
      }
     },
     "required": [
      "text",
      "prose",
      "mode",
      "model",
      "claims",
      "citations",
      "cost"
     ],
     "additionalProperties": false
    },
    "contributions": {
     "type": "array",
     "items": {
      "type": "object",
      "properties": {
       "key": {
        "type": "string"
       },
       "agent": {
        "type": "string"
       },
       "decision": {
        "type": [
         "string",
         "null"
        ]
       }
      },
      "required": [
       "key",
       "agent",
       "decision"
      ],
      "additionalProperties": false
     }
    },
    "silent": {
     "type": "array",
     "items": {
      "type": "object",
      "properties": {
       "agent": {
        "type": "string"
       },
       "reason": {
        "type": "string"
       }
      },
      "required": [
       "agent",
       "reason"
      ],
      "additionalProperties": false
     }
    }
   },
   "required": [
    "answer",
    "contributions",
    "silent"
   ],
   "additionalProperties": false
  },
  "QuestionSpec": {
   "type": "object",
   "properties": {
    "category": {
     "anyOf": [
      {
       "$ref": "#/$defs/Cat7Category"
      },
      {
       "type": "string",
       "const": "all"
      }
     ]
    },
    "depth": {
     "type": "string",
     "enum": [
      "think",
      "recall-only"
     ]
    },
    "room": {
     "description": "conversation context, answer minds and budget room",
     "$ref": "#/$defs/RoomName"
    },
    "attach": {
     "description": "files under the runtime's attachments directory",
     "maxItems": 8,
     "type": "array",
     "items": {
      "$ref": "#/$defs/AbsolutePath"
     }
    },
    "wait": {
     "description": "hold the response up to this many seconds for the answer",
     "type": "integer",
     "minimum": 0,
     "maximum": 120
    },
    "overBudget": {
     "type": "boolean"
    }
   },
   "additionalProperties": false
  },
  "Recall": {
   "type": "object",
   "properties": {
    "v": {
     "type": "string",
     "const": "xmesh.mission/1"
    },
    "category": {
     "type": "string"
    },
    "q": {
     "type": "string"
    },
    "mode": {
     "type": "string",
     "enum": [
      "match",
      "relevance"
     ]
    },
    "limit": {
     "type": "integer",
     "minimum": -9007199254740991,
     "maximum": 9007199254740991
    },
    "hits": {
     "type": "array",
     "items": {
      "$ref": "#/$defs/RecallHit"
     }
    },
    "state": {
     "type": "string",
     "enum": [
      "full",
      "partial",
      "starved",
      "query-failed",
      "no-such-category"
     ]
    },
    "fault": {
     "type": [
      "string",
      "null"
     ]
    },
    "expanded": {
     "description": "with expand=1: how many of the hits are siblings joined to the anchors, after them",
     "type": "integer",
     "minimum": 0,
     "maximum": 9007199254740991
    }
   },
   "required": [
    "v",
    "category",
    "q",
    "mode",
    "limit",
    "hits",
    "state",
    "fault"
   ],
   "additionalProperties": false
  },
  "RecallHit": {
   "type": "object",
   "properties": {
    "key": {
     "$ref": "#/$defs/CmbKey"
    },
    "agent": {
     "type": "string"
    },
    "category": {
     "type": "string"
    },
    "text": {
     "type": "string"
    },
    "score": {
     "type": "number"
    },
    "timestamp": {
     "$ref": "#/$defs/Timestamp"
    },
    "lineageRoot": {
     "type": "string"
    },
    "via": {
     "description": "expanded rows only (expand=1): reached by a join from this anchor within its mission room, not by ranking, so its score is not a relevance",
     "type": "object",
     "properties": {
      "anchor": {
       "$ref": "#/$defs/CmbKey"
      },
      "room": {
       "type": "string"
      }
     },
     "required": [
      "anchor",
      "room"
     ],
     "additionalProperties": false
    }
   },
   "required": [
    "key",
    "agent",
    "category",
    "text",
    "score",
    "timestamp"
   ],
   "additionalProperties": false
  },
  "Register": {
   "type": "object",
   "properties": {
    "v": {
     "type": "string",
     "const": "xmesh.mission/1"
    },
    "room": {
     "anyOf": [
      {
       "$ref": "#/$defs/RoomName"
      },
      {
       "type": "null"
      }
     ]
    },
    "entries": {
     "type": "array",
     "items": {
      "type": "object",
      "properties": {
       "id": {
        "type": "string"
       },
       "layer": {
        "type": "string"
       },
       "domain": {
        "type": "string"
       },
       "maturity": {
        "anyOf": [
         {
          "type": "string",
          "enum": [
           "live",
           "near",
           "roadmap"
          ]
         },
         {
          "type": "null"
         }
        ]
       },
       "detectionMode": {
        "anyOf": [
         {
          "type": "string",
          "enum": [
           "observed",
           "elicited"
          ]
         },
         {
          "type": "null"
         }
        ]
       },
       "novel": {
        "type": "boolean"
       },
       "requiresReview": {
        "type": "boolean"
       },
       "blocker": {
        "type": "string"
       },
       "closes": {
        "type": "string"
       },
       "question": {
        "type": "string"
       },
       "fn": {
        "type": "string"
       },
       "owner": {
        "type": "string"
       },
       "evidence": {
        "type": "string"
       },
       "latestEvidence": {
        "type": "string"
       },
       "status": {
        "type": "string",
        "enum": [
         "open",
         "narrowed",
         "closed",
         "reopened"
        ]
       },
       "closedBy": {
        "type": "string"
       },
       "firstAt": {
        "$ref": "#/$defs/Timestamp"
       },
       "lastAt": {
        "$ref": "#/$defs/Timestamp"
       },
       "connector": {
        "anyOf": [
         {
          "type": "object",
          "propertyNames": {
           "type": "string"
          },
          "additionalProperties": {}
         },
         {
          "type": "null"
         }
        ]
       },
       "frequency": {
        "type": "integer",
        "minimum": -9007199254740991,
        "maximum": 9007199254740991
       },
       "evidenceRefs": {
        "type": "array",
        "items": {
         "type": "string"
        }
       }
      },
      "required": [
       "id",
       "layer",
       "domain",
       "maturity",
       "detectionMode",
       "novel",
       "requiresReview",
       "blocker",
       "closes",
       "question",
       "status",
       "firstAt",
       "lastAt",
       "frequency",
       "evidenceRefs"
      ],
      "additionalProperties": false
     }
    },
    "ourGaps": {
     "type": "array",
     "items": {
      "type": "object",
      "properties": {
       "mission": {
        "anyOf": [
         {
          "$ref": "#/$defs/MissionId"
         },
         {
          "type": "null"
         }
        ]
       },
       "reason": {
        "type": "string"
       }
      },
      "required": [
       "mission",
       "reason"
      ],
      "additionalProperties": false
     }
    },
    "byDesign": {
     "type": "integer",
     "minimum": -9007199254740991,
     "maximum": 9007199254740991
    },
    "runtimeEvents": {
     "type": "integer",
     "minimum": -9007199254740991,
     "maximum": 9007199254740991
    },
    "exhaustive": {
     "type": "boolean"
    }
   },
   "required": [
    "v",
    "room",
    "entries",
    "ourGaps",
    "byDesign",
    "runtimeEvents",
    "exhaustive"
   ],
   "additionalProperties": false
  },
  "ReplayReceipt": {
   "type": "object",
   "properties": {
    "binding": {
     "$ref": "#/$defs/EvidenceBinding"
    },
    "inputs": {
     "type": "object",
     "properties": {
      "scenario": {
       "type": "object",
       "properties": {
        "id": {
         "type": "string"
        },
        "fingerprint": {
         "type": "string",
         "pattern": "^[0-9a-f]{8}$"
        }
       },
       "required": [
        "id",
        "fingerprint"
       ],
       "additionalProperties": false
      },
      "seed": {
       "$ref": "#/$defs/Seed"
      },
      "secs": {
       "type": "integer",
       "minimum": -9007199254740991,
       "maximum": 9007199254740991
      },
      "gear": {
       "anyOf": [
        {
         "$ref": "#/$defs/GearFile"
        },
        {
         "type": "null"
        }
       ]
      }
     },
     "required": [
      "scenario",
      "seed",
      "secs",
      "gear"
     ],
     "additionalProperties": false
    },
    "arm": {
     "$ref": "#/$defs/Arm"
    },
    "plots": {
     "type": "array",
     "items": {
      "$ref": "#/$defs/Plot"
     },
     "description": "every plot as recorded (its params, apart from its outcome)"
    },
    "sessions": {
     "type": "object",
     "propertyNames": {
      "type": "string"
     },
     "additionalProperties": {},
     "description": "the run's session history (session ends, setups, upgrades) that a replay re-applies"
    },
    "engine": {
     "type": "object",
     "properties": {
      "build": {
       "type": "string"
      },
      "commit": {
       "type": "string"
      }
     },
     "required": [
      "build",
      "commit"
     ],
     "additionalProperties": false
    },
    "fingerprint": {
     "$ref": "#/$defs/Fingerprint"
    },
    "verifiedAt": {
     "$ref": "#/$defs/Timestamp"
    },
    "verifier": {
     "type": "string"
    }
   },
   "required": [
    "binding",
    "inputs",
    "arm",
    "plots",
    "sessions",
    "engine",
    "fingerprint",
    "verifiedAt",
    "verifier"
   ],
   "additionalProperties": false
  },
  "Reported": {
   "type": "object",
   "properties": {
    "binding": {
     "$ref": "#/$defs/EvidenceBinding"
    },
    "by": {
     "type": "string"
    },
    "summary": {
     "type": "string"
    },
    "artifacts": {
     "type": "array",
     "items": {
      "type": "string"
     }
    },
    "at": {
     "$ref": "#/$defs/Timestamp"
    },
    "cmb": {
     "anyOf": [
      {
       "$ref": "#/$defs/CmbKey"
      },
      {
       "type": "null"
      }
     ],
     "description": "the completion CMB the agent published, whose lineage and attestations a client can open; null when the runtime recorded none"
    }
   },
   "required": [
    "binding",
    "by",
    "summary",
    "artifacts",
    "at",
    "cmb"
   ],
   "additionalProperties": false
  },
  "ResearchResult": {
   "type": "object",
   "properties": {
    "artifact": {
     "type": [
      "string",
      "null"
     ]
    }
   },
   "required": [
    "artifact"
   ],
   "additionalProperties": false
  },
  "ResearchSpec": {
   "type": "object",
   "properties": {
    "originRoom": {
     "$ref": "#/$defs/RoomName"
    },
    "overBudget": {
     "type": "boolean"
    }
   },
   "additionalProperties": false
  },
  "ResolvedOutput": {
   "type": "object",
   "properties": {
    "role": {
     "type": "string",
     "enum": [
      "artifact",
      "evidence"
     ]
    },
    "name": {
     "type": "string"
    },
    "path": {
     "type": "string"
    },
    "size": {
     "type": "integer",
     "minimum": 0,
     "maximum": 9007199254740991
    },
    "modifiedAt": {
     "$ref": "#/$defs/Timestamp"
    },
    "git": {
     "anyOf": [
      {
       "type": "object",
       "properties": {
        "repo": {
         "type": "string"
        },
        "status": {
         "type": "string",
         "enum": [
          "untracked",
          "modified",
          "clean"
         ]
        },
        "diffable": {
         "type": "boolean"
        },
        "lineEndingsOnly": {
         "description": "modified only: the file and HEAD's blob differ in line endings (CRLF and LF) and nothing else; never reported as clean (added in 0.11.0)",
         "type": "boolean",
         "const": true
        }
       },
       "required": [
        "repo",
        "status",
        "diffable"
       ],
       "additionalProperties": false
      },
      {
       "type": "null"
      }
     ]
    },
    "gitNotStated": {
     "description": "why git is null for a file that is in a repository: the runtime could not state its facts (added in 0.11.0)",
     "type": "string"
    }
   },
   "required": [
    "role",
    "name",
    "path",
    "size",
    "modifiedAt",
    "git"
   ],
   "additionalProperties": false
  },
  "Review": {
   "type": "object",
   "properties": {
    "binding": {
     "$ref": "#/$defs/EvidenceBinding"
    },
    "objections": {
     "type": "array",
     "items": {
      "type": "object",
      "properties": {
       "by": {
        "type": "string"
       },
       "text": {
        "type": "string"
       },
       "at": {
        "$ref": "#/$defs/Timestamp"
       }
      },
      "required": [
       "by",
       "text",
       "at"
      ],
      "additionalProperties": false
     }
    },
    "approvals": {
     "type": "array",
     "items": {
      "type": "object",
      "properties": {
       "by": {
        "type": "string"
       },
       "at": {
        "$ref": "#/$defs/Timestamp"
       }
      },
      "required": [
       "by",
       "at"
      ],
      "additionalProperties": false
     }
    },
    "lenses": {
     "type": "array",
     "items": {
      "type": "object",
      "properties": {
       "lens": {
        "type": "string",
        "enum": [
         "correctness",
         "evidence",
         "reproduction"
        ]
       },
       "by": {
        "type": "string"
       },
       "judgment": {
        "type": "string",
        "enum": [
         "challenge",
         "no challenge found",
         "unable to test"
        ]
       },
       "grounds": {
        "type": "string"
       },
       "at": {
        "$ref": "#/$defs/Timestamp"
       }
      },
      "required": [
       "lens",
       "by",
       "judgment",
       "grounds",
       "at"
      ],
      "additionalProperties": false
     }
    }
   },
   "required": [
    "binding",
    "objections",
    "approvals",
    "lenses"
   ],
   "additionalProperties": false
  },
  "ReviewResult": {
   "type": "object",
   "properties": {
    "reviewPath": {
     "type": "string"
    },
    "outDir": {
     "type": "string"
    }
   },
   "required": [
    "reviewPath",
    "outDir"
   ],
   "additionalProperties": false
  },
  "ReviewSpec": {
   "type": "object",
   "properties": {
    "target": {
     "description": "the file or saved diff to review; it must exist on the runtime's host",
     "$ref": "#/$defs/AbsolutePath"
    },
    "isDiff": {
     "type": "boolean"
    },
    "questions": {
     "type": "string",
     "minLength": 1,
     "maxLength": 4000
    },
    "minFindings": {
     "type": "integer",
     "minimum": 0,
     "maximum": 50
    },
    "room": {
     "$ref": "#/$defs/RoomName"
    },
    "outDir": {
     "$ref": "#/$defs/AbsolutePath"
    }
   },
   "required": [
    "target"
   ],
   "additionalProperties": false
  },
  "Role": {
   "type": "string",
   "enum": [
    "participant",
    "validator",
    "anchor"
   ]
  },
  "RoomName": {
   "type": "string",
   "maxLength": 62,
   "pattern": "^(?!sym$)[a-z0-9]+(?:--?[a-z0-9]+)*$"
  },
  "Scenario": {
   "type": "object",
   "description": "the engine's scenario, in the schema the simulation host names (capabilities: scenarioSchema); validated on the host with validateScenario(sc, {closed: true})"
  },
  "Seed": {
   "type": "integer",
   "minimum": 0,
   "maximum": 4294967295
  },
  "SessionRequest": {
   "type": "object",
   "properties": {
    "credential": {
     "type": "string",
     "minLength": 1,
     "maxLength": 512
    },
    "seat": {
     "type": "string",
     "minLength": 1,
     "maxLength": 64
    }
   },
   "required": [
    "credential"
   ],
   "additionalProperties": false
  },
  "SessionResponse": {
   "type": "object",
   "properties": {
    "token": {
     "type": "string"
    },
    "user": {
     "$ref": "#/$defs/Principal"
    }
   },
   "required": [
    "token",
    "user"
   ],
   "additionalProperties": false
  },
  "SimulationResult": {
   "type": "object",
   "properties": {
    "engine": {
     "type": "string"
    },
    "batch": {
     "type": "string",
     "description": "the engine host's batch id (batch-<uuid>)"
    },
    "scenario": {
     "type": "object",
     "properties": {
      "id": {
       "type": "string"
      },
      "fingerprint": {
       "type": "string",
       "pattern": "^[0-9a-f]{8}$"
      }
     },
     "required": [
      "id",
      "fingerprint"
     ],
     "additionalProperties": false
    },
    "secs": {
     "type": "integer",
     "minimum": -9007199254740991,
     "maximum": 9007199254740991
    },
    "ceiling": {
     "anyOf": [
      {
       "type": "integer",
       "minimum": -9007199254740991,
       "maximum": 9007199254740991
      },
      {
       "type": "null"
      }
     ],
     "description": "the batch's crew ceiling, which a growth arm's help block is built with; null when the host does not serve it"
    },
    "runs": {
     "type": "array",
     "items": {
      "$ref": "#/$defs/SimulationRun"
     }
    },
    "byArm": {
     "type": "array",
     "items": {
      "type": "object",
      "properties": {
       "arm": {
        "$ref": "#/$defs/Arm"
       },
       "played": {
        "anyOf": [
         {
          "type": "object",
          "properties": {
           "fingerprint": {
            "type": "string"
           }
          },
          "required": [
           "fingerprint"
          ],
          "additionalProperties": false
         },
         {
          "type": "null"
         }
        ],
        "description": "the scenario as this arm played it (an arm changes the scenario: silent, none and growth each do). null: not served by this host, never \"the same as scenario\""
       },
       "done": {
        "type": "integer",
        "minimum": -9007199254740991,
        "maximum": 9007199254740991
       },
       "failed": {
        "type": "integer",
        "minimum": -9007199254740991,
        "maximum": 9007199254740991
       },
       "void": {
        "type": "integer",
        "minimum": -9007199254740991,
        "maximum": 9007199254740991
       },
       "unjudged": {
        "type": "integer",
        "minimum": -9007199254740991,
        "maximum": 9007199254740991
       },
       "queued": {
        "type": "integer",
        "minimum": -9007199254740991,
        "maximum": 9007199254740991
       },
       "running": {
        "type": "integer",
        "minimum": -9007199254740991,
        "maximum": 9007199254740991
       },
       "stopping": {
        "type": "integer",
        "minimum": -9007199254740991,
        "maximum": 9007199254740991
       },
       "stopped": {
        "type": "integer",
        "minimum": -9007199254740991,
        "maximum": 9007199254740991
       },
       "aborted": {
        "type": "integer",
        "minimum": -9007199254740991,
        "maximum": 9007199254740991
       },
       "meanProgress": {
        "type": [
         "number",
         "null"
        ]
       }
      },
      "required": [
       "arm",
       "played",
       "done",
       "failed",
       "void",
       "unjudged",
       "queued",
       "running",
       "stopping",
       "stopped",
       "aborted",
       "meanProgress"
      ],
      "additionalProperties": false
     },
     "description": "per arm, every run counted once, under its own status. A comparison of arms (win counts, a sign test) uses done against failed only: void, unjudged, aborted, stopped and stopping runs are left out of both arms and reported, so an unjudged or host-ended run never enters as a win or a loss"
    }
   },
   "required": [
    "engine",
    "batch",
    "scenario",
    "secs",
    "ceiling",
    "runs",
    "byArm"
   ],
   "additionalProperties": false
  },
  "SimulationRun": {
   "type": "object",
   "properties": {
    "run": {
     "type": "string",
     "description": "the engine host's id for this run (batch-<uuid>.<n>)"
    },
    "seed": {
     "$ref": "#/$defs/Seed"
    },
    "arm": {
     "$ref": "#/$defs/Arm"
    },
    "outcome": {
     "type": "object",
     "properties": {
      "status": {
       "type": "string",
       "enum": [
        "queued",
        "running",
        "stopping",
        "done",
        "failed",
        "void",
        "unjudged",
        "stopped",
        "aborted"
       ]
      },
      "at": {
       "description": "when the engine judged it, in simulated seconds; null for a run it did not judge",
       "type": [
        "number",
        "null"
       ]
      },
      "na": {
       "description": "void only: the goal facts that measured nothing",
       "minItems": 1,
       "type": "array",
       "items": {
        "type": "string",
        "minLength": 1
       }
      }
     },
     "required": [
      "status",
      "at"
     ],
     "additionalProperties": false,
     "description": "the engine's judgement: done (won), failed (lost), or void (judged at the deadline with a goal fact that measured nothing: neither won nor lost, and a result, not a failure of the host). unjudged when it played to its end and the engine gave no judgement (a world with no mission, or a deadline past the run's secs): a result, never a win or a loss. queued while it waits for a worker behind the host's runsAtOnce, never reported as running; running while it plays; stopping from a DELETE or the host's ceiling until the host has reaped its worker; stopped once it has, never left reading as running; aborted when the host ended it with no judgement (a worker crash, a host restart), never counted as failed"
    },
    "unjudged": {
     "anyOf": [
      {
       "type": "object",
       "properties": {
        "reason": {
         "type": "string",
         "enum": [
          "no-mission",
          "before-deadline"
         ],
         "description": "no-mission: the world has no mission, so nothing is judged (a metrics-only run) · before-deadline: its mission's deadline lies past the run's secs, which more secs fix"
        },
        "deadline": {
         "description": "the mission's deadline in simulated seconds; null for no-mission",
         "type": [
          "number",
          "null"
         ]
        }
       },
       "required": [
        "reason",
        "deadline"
       ],
       "additionalProperties": false
      },
      {
       "type": "null"
      }
     ],
     "description": "why a run that played to its end has no judgement; present exactly when the status is unjudged"
    },
    "stopped": {
     "anyOf": [
      {
       "type": "object",
       "properties": {
        "reason": {
         "type": "string"
        },
        "by": {
         "type": "string",
         "enum": [
          "requester",
          "host-ceiling",
          "operator"
         ]
        },
        "tick": {
         "type": "integer",
         "minimum": -9007199254740991,
         "maximum": 9007199254740991,
         "description": "the last tick the worker acknowledged"
        }
       },
       "required": [
        "reason",
        "by",
        "tick"
       ],
       "additionalProperties": false
      },
      {
       "type": "null"
      }
     ]
    },
    "aborted": {
     "anyOf": [
      {
       "type": "object",
       "properties": {
        "reason": {
         "type": "string",
         "enum": [
          "worker",
          "host-restart"
         ]
        },
        "tick": {
         "type": "integer",
         "minimum": -9007199254740991,
         "maximum": 9007199254740991,
         "description": "the last tick the worker acknowledged; after a host restart, the last one the host had recorded, which can trail the worker"
        }
       },
       "required": [
        "reason",
        "tick"
       ],
       "additionalProperties": false
      },
      {
       "type": "null"
      }
     ],
     "description": "why the host ended the run without a judgement; present exactly when the status is aborted"
    },
    "progress": {
     "anyOf": [
      {
       "type": "number",
       "minimum": 0,
       "maximum": 1
      },
      {
       "type": "null"
      }
     ]
    },
    "metrics": {
     "anyOf": [
      {
       "$ref": "#/$defs/MetricVector"
      },
      {
       "type": "null"
      }
     ]
    },
    "fingerprint": {
     "oneOf": [
      {
       "type": "object",
       "properties": {
        "state": {
         "type": "string",
         "const": "final"
        },
        "fingerprint": {
         "$ref": "#/$defs/Fingerprint"
        }
       },
       "required": [
        "state",
        "fingerprint"
       ],
       "additionalProperties": false
      },
      {
       "type": "object",
       "properties": {
        "state": {
         "type": "string",
         "const": "pending"
        }
       },
       "required": [
        "state"
       ],
       "additionalProperties": false
      },
      {
       "type": "object",
       "properties": {
        "state": {
         "type": "string",
         "const": "unavailable"
        },
        "reason": {
         "type": "string",
         "description": "e.g. the run's save cannot complete at this size; no digest stands in, and no receipt follows"
        }
       },
       "required": [
        "state",
        "reason"
       ],
       "additionalProperties": false
      }
     ]
    },
    "plots": {
     "type": "array",
     "items": {
      "$ref": "#/$defs/PlotReceipt"
     }
    }
   },
   "required": [
    "run",
    "seed",
    "arm",
    "outcome",
    "unjudged",
    "stopped",
    "aborted",
    "progress",
    "metrics",
    "fingerprint",
    "plots"
   ],
   "additionalProperties": false
  },
  "SimulationSpec": {
   "type": "object",
   "properties": {
    "scenario": {
     "anyOf": [
      {
       "type": "object",
       "properties": {
        "library": {
         "type": "string",
         "pattern": "^[a-z0-9-]+(\\/[a-z0-9-]+)?$"
        }
       },
       "required": [
        "library"
       ],
       "additionalProperties": false
      },
      {
       "type": "object",
       "properties": {
        "inline": {
         "$ref": "#/$defs/Scenario"
        }
       },
       "required": [
        "inline"
       ],
       "additionalProperties": false
      }
     ]
    },
    "gear": {
     "$ref": "#/$defs/GearFile"
    },
    "seeds": {
     "anyOf": [
      {
       "minItems": 1,
       "maxItems": 100,
       "type": "array",
       "items": {
        "$ref": "#/$defs/Seed"
       },
       "uniqueItems": true
      },
      {
       "type": "object",
       "properties": {
        "count": {
         "type": "integer",
         "minimum": 1,
         "maximum": 100
        }
       },
       "required": [
        "count"
       ],
       "additionalProperties": false
      }
     ]
    },
    "secs": {
     "description": "default: the mission's deadline, else 90",
     "type": "integer",
     "minimum": 1,
     "maximum": 3600
    },
    "arms": {
     "description": "default [{comms: mesh, growth: false}]; every arm runs on every seed; an arm the host's engine cannot serve is refused (see capabilities.engine.features)",
     "minItems": 1,
     "maxItems": 6,
     "type": "array",
     "items": {
      "$ref": "#/$defs/Arm"
     },
     "uniqueItems": true
    },
    "plots": {
     "maxItems": 1000,
     "type": "array",
     "items": {
      "$ref": "#/$defs/Plot"
     }
    },
    "engine": {
     "description": "the engine the caller expects; a different engine refuses rather than reinterprets",
     "type": "string",
     "minLength": 1,
     "maxLength": 40
    },
    "keep": {
     "description": "what is retained per run (default metrics); save keeps the world to replay or resume, and is refused (422) above what the host can save",
     "type": "string",
     "enum": [
      "summary",
      "metrics",
      "save"
     ]
    },
    "visibility": {
     "description": "default private for a user's mission, tenant for an agent's",
     "type": "string",
     "enum": [
      "private",
      "tenant"
     ]
    }
   },
   "required": [
    "scenario",
    "seeds"
   ],
   "additionalProperties": false
  },
  "SquareName": {
   "type": "string",
   "pattern": "^x\\d+y\\d+$"
  },
  "TaskResult": {
   "type": "object",
   "properties": {
    "column": {
     "type": "string",
     "enum": [
      "proposed",
      "ready",
      "in-progress",
      "in-review",
      "blocked",
      "done",
      "dropped"
     ]
    },
    "owner": {
     "type": [
      "string",
      "null"
     ]
    },
    "size": {
     "anyOf": [
      {
       "type": "string",
       "enum": [
        "S",
        "M",
        "L"
       ]
      },
      {
       "type": "null"
      }
     ]
    },
    "rank": {
     "type": "integer",
     "minimum": -9007199254740991,
     "maximum": 9007199254740991
    },
    "reviews": {
     "type": "array",
     "items": {
      "type": "object",
      "properties": {
       "by": {
        "type": "string"
       },
       "verdict": {
        "type": "string",
        "enum": [
         "approve",
         "objection"
        ]
       },
       "text": {
        "type": "string"
       },
       "at": {
        "$ref": "#/$defs/Timestamp"
       }
      },
      "required": [
       "by",
       "verdict",
       "text",
       "at"
      ],
      "additionalProperties": false
     }
    },
    "actions": {
     "type": "array",
     "items": {
      "type": "object",
      "properties": {
       "by": {
        "type": "string"
       },
       "at": {
        "$ref": "#/$defs/Timestamp"
       },
       "kind": {
        "type": "string"
       },
       "text": {
        "type": "string"
       }
      },
      "required": [
       "by",
       "at",
       "kind",
       "text"
      ],
      "additionalProperties": false
     }
    },
    "origin": {
     "anyOf": [
      {
       "type": "object",
       "properties": {
        "commission": {
         "description": "the commission whose completion disclosed the finding",
         "$ref": "#/$defs/CmbKey"
        },
        "room": {
         "type": "string"
        },
        "artifact": {
         "description": "the artifact the finding was disclosed in, when it named one",
         "type": [
          "string",
          "null"
         ]
        }
       },
       "required": [
        "commission",
        "room",
        "artifact"
       ],
       "additionalProperties": false
      },
      {
       "type": "null"
      }
     ],
     "description": "the finding this card was made from, so the card names its source (m043); null for a card a person or an agent filed. Set by the runtime, never by a request"
    }
   },
   "required": [
    "column",
    "owner",
    "size",
    "rank",
    "reviews",
    "actions",
    "origin"
   ],
   "additionalProperties": false
  },
  "TaskSpec": {
   "type": "object",
   "properties": {
    "owner": {
     "type": "string",
     "minLength": 1,
     "maxLength": 64
    },
    "column": {
     "type": "string",
     "enum": [
      "proposed",
      "ready",
      "in-progress",
      "in-review"
     ]
    },
    "size": {
     "type": "string",
     "enum": [
      "S",
      "M",
      "L"
     ]
    },
    "source": {
     "type": "string",
     "enum": [
      "founder",
      "seat",
      "mission"
     ]
    }
   },
   "additionalProperties": false
  },
  "Timestamp": {
   "type": "string",
   "format": "date-time",
   "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
  },
  "Verdict": {
   "type": "object",
   "properties": {
    "verdict": {
     "type": "string",
     "enum": [
      "validated",
      "dismissed"
     ]
    },
    "by": {
     "type": "string"
    },
    "at": {
     "$ref": "#/$defs/Timestamp"
    },
    "reason": {
     "type": "string"
    },
    "weight": {
     "description": "whether the verdict reached the author's own store, the weight recall and learning read later; absent where there was no authored completion to weigh (a ruled stop). A verdict recorded with committed: false moved nothing",
     "type": "object",
     "properties": {
      "committed": {
       "type": "boolean"
      },
      "agent": {
       "type": [
        "string",
        "null"
       ]
      },
      "value": {
       "type": "number"
      },
      "reason": {
       "type": "string"
      }
     },
     "required": [
      "committed",
      "agent"
     ],
     "additionalProperties": false
    }
   },
   "required": [
    "verdict",
    "by",
    "at"
   ],
   "additionalProperties": false
  },
  "Waiting": {
   "type": "object",
   "properties": {
    "on": {
     "type": "string",
     "enum": [
      "capacity",
      "approval",
      "budget",
      "review",
      "person"
     ]
    },
    "detail": {
     "type": "string"
    },
    "position": {
     "type": "integer",
     "minimum": 0,
     "maximum": 9007199254740991
    },
    "cap": {
     "type": "integer",
     "minimum": 0,
     "maximum": 9007199254740991
    },
    "requests": {
     "description": "the capability requests awaiting a decision",
     "type": "array",
     "items": {
      "type": "string"
     }
    }
   },
   "required": [
    "on",
    "detail"
   ],
   "additionalProperties": false
  },
  "WorkResult": {
   "type": "object",
   "properties": {
    "outputs": {
     "type": "array",
     "items": {
      "$ref": "#/$defs/ResolvedOutput"
     }
    },
    "unresolved": {
     "type": "array",
     "items": {
      "type": "string"
     }
    },
    "nextMoves": {
     "anyOf": [
      {
       "type": "array",
       "items": {
        "$ref": "#/$defs/NextMove"
       }
      },
      {
       "type": "null"
      }
     ]
    },
    "assessment": {
     "anyOf": [
      {
       "type": "object",
       "properties": {
        "soundness": {
         "type": "number"
        },
        "completeness": {
         "type": "number"
        },
        "converged": {
         "type": "boolean"
        },
        "verdict": {
         "type": "string"
        }
       },
       "required": [
        "soundness",
        "completeness",
        "converged",
        "verdict"
       ],
       "additionalProperties": false
      },
      {
       "type": "null"
      }
     ]
    }
   },
   "required": [
    "outputs",
    "unresolved",
    "nextMoves",
    "assessment"
   ],
   "additionalProperties": false
  },
  "WorkSpec": {
   "type": "object",
   "properties": {
    "room": {
     "description": "file into this existing room; absent, a mission room forms and staffs itself",
     "$ref": "#/$defs/RoomName"
    },
    "originRoom": {
     "description": "where the ask comes from: it picks the minds and whose daily budget pays (absent: personal)",
     "$ref": "#/$defs/RoomName"
    },
    "project": {
     "description": "the repository the work is about; validator or anchor only",
     "$ref": "#/$defs/AbsolutePath"
    },
    "surfaceOnly": {
     "description": "report findings only: a completion proposes no next moves",
     "type": "boolean"
    },
    "groundFromCanon": {
     "description": "ground the brief in canon first (default true)",
     "type": "boolean"
    },
    "notify": {
     "type": "object",
     "properties": {
      "broadcast": {
       "type": "boolean"
      },
      "replyTo": {
       "type": "string",
       "minLength": 1,
       "maxLength": 64
      }
     },
     "additionalProperties": false
    },
    "overBudget": {
     "description": "validator or anchor: proceed past the room's daily budget",
     "type": "boolean"
    }
   },
   "additionalProperties": false
  }
 }
}
