{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://github.com/Kigenka/shokai/blob/v0.6.1/schema/v0.6.1/schema.json",
  "title": "Shōkai wire types, schema v0.6.1 (specification v0.5.0, wire tag shokai/0.5, with optional members added in package 0.6.1)",
  "description": "GENERATED from protocol-shapes.ts by tools/schema/schema.mjs; do not edit. The TypeScript types are the source of truth; docs/SPEC-DETAIL.md (the normative text) wins where they differ. Start from the definitions WireMessage (a signed envelope), ShokaiMessage (a payload) or DoorPointer.",
  "definitions": {
    "AcceptPresence": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "accept_presence"
        },
        "offer_ref": {
          "type": "string"
        },
        "seat": {
          "$ref": "#/definitions/SeatGrant"
        },
        "accepted": {
          "type": "boolean",
          "description": "False if user/host declined; seat omitted or empty levels."
        },
        "decline_reason": {
          "type": "string"
        }
      },
      "required": [
        "type",
        "seat",
        "accepted"
      ],
      "additionalProperties": false,
      "description": "Confirm seating; enables voice + scoped tools.",
      "deprecated": "v0.1: use InvitationResponse (explicit grant/deny/conditional).",
      "patternProperties": {
        "^x-": {}
      }
    },
    "AccessMode": {
      "type": "string",
      "enum": [
        "user_delegated",
        "system",
        "session",
        "standing"
      ],
      "description": "How the link was established; representative adapts authority."
    },
    "Act": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "const": "act"
        },
        "seat_id": {
          "type": "string"
        },
        "tool": {
          "type": "string",
          "description": "Must be in seat.tool_allowlist and level act_on_behalf."
        },
        "arguments": {
          "type": "object",
          "additionalProperties": {}
        },
        "intent": {
          "type": "string",
          "description": "Human-visible rationale the domain should honor or refuse."
        },
        "hold_for_owner": {
          "type": "boolean",
          "description": "v0.4.0 (§7.3): the visitor asks the door to hold this purchase while it asks its owner live. Purchases only."
        },
        "idempotency_key": {
          "type": "string",
          "description": "v0.5.0 (§7.2): 16–32 random bytes, base64url. A repeat with the same key gets the original signed answer."
        },
        "context_response": {
          "$ref": "#/definitions/ContextResponse",
          "description": "v0.5.0 (§6.12, provisional): in \"admit_then_request\", the owner's signed answer to the request that came with the grant."
        },
        "protocol": {
          "$ref": "#/definitions/ProtocolVersion"
        },
        "encounter_id": {
          "type": "string"
        },
        "msg_id": {
          "type": "string"
        },
        "sent_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "from": {
          "type": "string",
          "description": "Representative id of the sender."
        },
        "to": {
          "type": "string",
          "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
        },
        "in_reply_to": {
          "type": "string",
          "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
        }
      },
      "required": [
        "encounter_id",
        "from",
        "msg_id",
        "protocol",
        "seat_id",
        "sent_at",
        "to",
        "tool",
        "type"
      ],
      "description": "v0.2.1 (§7.2): an act inside a seat. In a gatekeeper seat the seated VISITOR sends it to the host; in a helper seat (v0.3) the host sends it to the product representative. Signed like every message.",
      "patternProperties": {
        "^x-": {}
      }
    },
    "ActConfirmation": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "const": "act_confirmation"
        },
        "seat_id": {
          "type": "string"
        },
        "hold_id": {
          "type": "string"
        },
        "consent": {
          "$ref": "#/definitions/Signed%3COwnerConsent%3E",
          "description": "For an ordinary hold: the owner's approve_purchase consent (a decline may come as a consent with decision \"decline\" for either kind of hold). For an over-limit hold, see `mandate` (v0.5.0). v0.5.0: a confirmation carries exactly one of `consent` or `mandate`; under shokai/0.3 `consent` is required."
        },
        "mandate": {
          "$ref": "#/definitions/SignedMandate",
          "description": "v0.5.0 (§7.3): for an over-limit hold, the passkey mandate that supersedes the current one (in place of `consent`)."
        },
        "idempotency_key": {
          "type": "string",
          "description": "v0.5.0 (§7.2)."
        },
        "protocol": {
          "$ref": "#/definitions/ProtocolVersion"
        },
        "encounter_id": {
          "type": "string"
        },
        "msg_id": {
          "type": "string"
        },
        "sent_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "from": {
          "type": "string",
          "description": "Representative id of the sender."
        },
        "to": {
          "type": "string",
          "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
        },
        "in_reply_to": {
          "type": "string",
          "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
        }
      },
      "required": [
        "encounter_id",
        "from",
        "hold_id",
        "msg_id",
        "protocol",
        "seat_id",
        "sent_at",
        "to",
        "type"
      ],
      "description": "v0.4.0 (§7.3): the owner's answer to a held purchase: a passkey OwnerConsent `approve_purchase` over the held act.",
      "patternProperties": {
        "^x-": {}
      }
    },
    "ActDecision": {
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "decision": {
              "type": "string",
              "const": "deny"
            },
            "disposition": {
              "$ref": "#/definitions/Disposition"
            },
            "context_statement": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string"
                },
                "locale": {
                  "$ref": "#/definitions/Locale"
                }
              },
              "required": [
                "text",
                "locale"
              ],
              "additionalProperties": false,
              "description": "Honest situational statement, e.g. \"At this moment we are not onboarding…\"."
            },
            "revisit": {
              "$ref": "#/definitions/RevisitHint"
            },
            "retry": {
              "$ref": "#/definitions/Retry"
            },
            "readiness_requirements": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/ReadinessRequirement"
              },
              "description": "With not_now: exactly what is missing to be seated (unprepared visitor, SPEC lobby path)."
            },
            "reason_code": {
              "$ref": "#/definitions/ReasonCode",
              "description": "Present only if policy allows disclosure to this counterpart."
            },
            "relationship_ref": {
              "type": "string",
              "description": "Gatekeeper-issued handle for the persisted relationship (SPEC §9.1)."
            },
            "courtesy": {
              "$ref": "#/definitions/Courtesy"
            },
            "basis": {
              "$ref": "#/definitions/DecisionBasis"
            },
            "type": {
              "type": "string",
              "const": "act_decision"
            },
            "in_reply_to": {
              "type": "string",
              "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
            },
            "seat_id": {
              "type": "string"
            },
            "tool": {
              "type": "string",
              "description": "Tool requested in the refused act."
            },
            "protocol": {
              "$ref": "#/definitions/ProtocolVersion"
            },
            "encounter_id": {
              "type": "string"
            },
            "msg_id": {
              "type": "string"
            },
            "sent_at": {
              "$ref": "#/definitions/Timestamp"
            },
            "from": {
              "type": "string",
              "description": "Representative id of the sender."
            },
            "to": {
              "type": "string",
              "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
            }
          },
          "required": [
            "basis",
            "courtesy",
            "decision",
            "disposition",
            "encounter_id",
            "from",
            "in_reply_to",
            "msg_id",
            "protocol",
            "retry",
            "seat_id",
            "sent_at",
            "to",
            "tool",
            "type"
          ]
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "decision": {
              "type": "string",
              "const": "conditional"
            },
            "conditions": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Condition"
              },
              "minItems": 1,
              "description": "Non-empty. Meeting them = a new InvitationRequest with meets_conditions_of."
            },
            "retry": {
              "$ref": "#/definitions/Retry"
            },
            "reason_code": {
              "$ref": "#/definitions/ReasonCode",
              "description": "Present only if policy allows disclosure to this counterpart."
            },
            "relationship_ref": {
              "type": "string",
              "description": "Gatekeeper-issued handle for the persisted relationship (SPEC §9.1)."
            },
            "courtesy": {
              "$ref": "#/definitions/Courtesy"
            },
            "basis": {
              "$ref": "#/definitions/DecisionBasis"
            },
            "type": {
              "type": "string",
              "const": "act_decision"
            },
            "in_reply_to": {
              "type": "string",
              "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
            },
            "seat_id": {
              "type": "string"
            },
            "tool": {
              "type": "string",
              "description": "Tool requested in the refused act."
            },
            "protocol": {
              "$ref": "#/definitions/ProtocolVersion"
            },
            "encounter_id": {
              "type": "string"
            },
            "msg_id": {
              "type": "string"
            },
            "sent_at": {
              "$ref": "#/definitions/Timestamp"
            },
            "from": {
              "type": "string",
              "description": "Representative id of the sender."
            },
            "to": {
              "type": "string",
              "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
            }
          },
          "required": [
            "basis",
            "conditions",
            "courtesy",
            "decision",
            "encounter_id",
            "from",
            "in_reply_to",
            "msg_id",
            "protocol",
            "retry",
            "seat_id",
            "sent_at",
            "to",
            "tool",
            "type"
          ]
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "decision": {
              "type": "string",
              "const": "considering"
            },
            "consideration_ref": {
              "type": "string"
            },
            "routed_to": {
              "$ref": "#/definitions/ConsiderationRoute"
            },
            "response_by": {
              "$ref": "#/definitions/Timestamp",
              "description": "Outcome (or an explicit extension) is due by this time."
            },
            "reason_code": {
              "$ref": "#/definitions/ReasonCode",
              "description": "Present only if policy allows disclosure to this counterpart."
            },
            "relationship_ref": {
              "type": "string",
              "description": "Gatekeeper-issued handle for the persisted relationship (SPEC §9.1)."
            },
            "courtesy": {
              "$ref": "#/definitions/Courtesy"
            },
            "basis": {
              "$ref": "#/definitions/DecisionBasis"
            },
            "type": {
              "type": "string",
              "const": "act_decision"
            },
            "in_reply_to": {
              "type": "string",
              "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
            },
            "seat_id": {
              "type": "string"
            },
            "tool": {
              "type": "string",
              "description": "Tool requested in the refused act."
            },
            "protocol": {
              "$ref": "#/definitions/ProtocolVersion"
            },
            "encounter_id": {
              "type": "string"
            },
            "msg_id": {
              "type": "string"
            },
            "sent_at": {
              "$ref": "#/definitions/Timestamp"
            },
            "from": {
              "type": "string",
              "description": "Representative id of the sender."
            },
            "to": {
              "type": "string",
              "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
            }
          },
          "required": [
            "basis",
            "consideration_ref",
            "courtesy",
            "decision",
            "encounter_id",
            "from",
            "in_reply_to",
            "msg_id",
            "protocol",
            "response_by",
            "routed_to",
            "seat_id",
            "sent_at",
            "to",
            "tool",
            "type"
          ]
        }
      ],
      "description": "Explicit decision on an `act` the representative will not perform as asked."
    },
    "ActHeld": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "const": "act_held"
        },
        "in_reply_to": {
          "type": "string",
          "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
        },
        "seat_id": {
          "type": "string"
        },
        "tool": {
          "type": "string"
        },
        "amount": {
          "$ref": "#/definitions/Money"
        },
        "hold_id": {
          "type": "string"
        },
        "act_digest": {
          "$ref": "#/definitions/Digest",
          "description": "payload_digest of the held act: the consent's subject_ref.digest."
        },
        "expires_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "over_limit": {
          "type": "object",
          "properties": {
            "limit": {
              "$ref": "#/definitions/Money"
            },
            "current": {
              "$ref": "#/definitions/Money"
            },
            "proposed": {
              "$ref": "#/definitions/Money"
            },
            "seat": {
              "type": "object",
              "properties": {
                "limit": {
                  "$ref": "#/definitions/Money"
                },
                "current": {
                  "$ref": "#/definitions/Money"
                }
              },
              "required": [
                "limit",
                "current"
              ],
              "additionalProperties": false,
              "description": "Per-visit (this seat) ceiling and what counts against it, including amounts reserved by open holds.",
              "patternProperties": {
                "^x-": {}
              }
            },
            "mandate": {
              "type": "object",
              "properties": {
                "limit": {
                  "$ref": "#/definitions/Money"
                },
                "current": {
                  "$ref": "#/definitions/Money"
                }
              },
              "required": [
                "limit",
                "current"
              ],
              "additionalProperties": false,
              "description": "Whole-mandate ceiling and what counts against it across every seat under the mandate, including open holds.",
              "patternProperties": {
                "^x-": {}
              }
            }
          },
          "required": [
            "limit",
            "current",
            "proposed",
            "seat",
            "mandate"
          ],
          "additionalProperties": false,
          "description": "v0.5.0 (§7.3, P31 §2.9): set when the act was held because it is above the limit (policy.limit_calls: true): it fails only step (10)'s seat or mandate amount check. `limit` = the lower of the seat's and the mandate's max_amount (as signed); `current` = acts let through plus amounts reserved by open holds (never released, lapsed or declined holds, never this act); `proposed` = current + this act's amount.",
          "patternProperties": {
            "^x-": {}
          }
        },
        "protocol": {
          "$ref": "#/definitions/ProtocolVersion"
        },
        "encounter_id": {
          "type": "string"
        },
        "msg_id": {
          "type": "string"
        },
        "sent_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "from": {
          "type": "string",
          "description": "Representative id of the sender."
        },
        "to": {
          "type": "string",
          "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
        }
      },
      "required": [
        "act_digest",
        "amount",
        "encounter_id",
        "expires_at",
        "from",
        "hold_id",
        "in_reply_to",
        "msg_id",
        "protocol",
        "seat_id",
        "sent_at",
        "to",
        "tool",
        "type"
      ],
      "description": "v0.4.0 (§7.3): the door holds a purchase while the visitor's representative asks its owner live. Nothing is charged or committed while it is held; the conversation goes on. The act passed every check of §7.2 and its operation and amount are reserved; on a decline or when `expires_at` passes with no answer, the act lapses and the reservation is released.",
      "patternProperties": {
        "^x-": {}
      }
    },
    "ActResult": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "const": "act_result"
        },
        "in_reply_to": {
          "type": "string",
          "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
        },
        "seat_id": {
          "type": "string"
        },
        "tool": {
          "type": "string"
        },
        "ok": {
          "type": "boolean"
        },
        "result": {
          "description": "Opaque tool payload — treat as untrusted (prompt-injection surface)."
        },
        "error": {
          "type": "string"
        },
        "rationale": {
          "type": "string"
        },
        "protocol": {
          "$ref": "#/definitions/ProtocolVersion"
        },
        "encounter_id": {
          "type": "string"
        },
        "msg_id": {
          "type": "string"
        },
        "sent_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "from": {
          "type": "string",
          "description": "Representative id of the sender."
        },
        "to": {
          "type": "string",
          "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
        }
      },
      "required": [
        "encounter_id",
        "from",
        "in_reply_to",
        "msg_id",
        "ok",
        "protocol",
        "seat_id",
        "sent_at",
        "to",
        "tool",
        "type"
      ],
      "patternProperties": {
        "^x-": {}
      }
    },
    "Advise": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "advise"
        },
        "seat_id": {
          "type": "string"
        },
        "summary": {
          "type": "string"
        },
        "warnings": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Structured warnings (cost, policy, brand, latency)."
        },
        "suggested_plan": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "arguments": {
                "type": "object",
                "additionalProperties": {}
              },
              "rationale": {
                "type": "string"
              }
            },
            "required": [
              "tool"
            ],
            "additionalProperties": false,
            "patternProperties": {
              "^x-": {}
            }
          },
          "description": "Suggested next tools / params; host may run or send `act`."
        },
        "playbook_version": {
          "type": "string",
          "description": "Playbook / world-model version used."
        }
      },
      "required": [
        "type",
        "seat_id",
        "summary"
      ],
      "additionalProperties": false,
      "description": "Domain → host: coaching without necessarily mutating.",
      "patternProperties": {
        "^x-": {}
      }
    },
    "Allowance": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "allowance_id": {
          "type": "string"
        },
        "owner_id": {
          "type": "string"
        },
        "representative_id": {
          "type": "string"
        },
        "card_id": {
          "type": "string"
        },
        "grant_digests": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Digest"
          },
          "description": "Digests of each AllowanceGrant (digest(JCS(grant))). The grants themselves stay with the representative."
        },
        "shown_to_owner": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            }
          },
          "required": [
            "text",
            "locale"
          ],
          "additionalProperties": false,
          "description": "The plain-language summary the owner saw and signed (D7 shown_to_owner).",
          "patternProperties": {
            "^x-": {}
          }
        },
        "valid_from": {
          "$ref": "#/definitions/Timestamp"
        },
        "expires_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "revocation_status": {
          "type": "string",
          "description": "Where hosts check for an AllowanceRevocation (fail closed when unreachable)."
        },
        "crit": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "allowance_id",
        "card_id",
        "expires_at",
        "grant_digests",
        "owner_id",
        "representative_id",
        "revocation_status",
        "shown_to_owner",
        "valid_from"
      ],
      "description": "v0.2.2 (D11, §5.2): a STANDING allowance the owner signs once with a passkey. Inside it, the representative acts without contacting the owner (it issues its own per-encounter Mandates, `under_allowance`). Outside it, the representative takes the matter home: considering / not_now and an async owner decision; silence = no.",
      "patternProperties": {
        "^x-": {}
      }
    },
    "AllowanceGrant": {
      "type": "object",
      "properties": {
        "grant_id": {
          "type": "string"
        },
        "salt": {
          "type": "string",
          "description": "Random, at least 128 bits, base64url; makes the grant digest unguessable."
        },
        "purposes": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/PurposeCode"
          }
        },
        "place_categories": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/PlaceCategory"
          }
        },
        "actions": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "spend": {
          "$ref": "#/definitions/SpendBudget",
          "description": "Absent = no spending under this grant (D11)."
        },
        "counterparties": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Optional named counterparties (principal ids); absent = any place in the categories."
        },
        "note": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            }
          },
          "required": [
            "text",
            "locale"
          ],
          "additionalProperties": false,
          "description": "Optional plain-language note from the owner (informative, never gate input).",
          "patternProperties": {
            "^x-": {}
          }
        }
      },
      "required": [
        "grant_id",
        "salt",
        "purposes",
        "place_categories",
        "actions"
      ],
      "additionalProperties": false,
      "description": "v0.2.2 (§5.2): one line of an allowance. Disclosed to a host only when used there (selective disclosure by digest).",
      "patternProperties": {
        "^x-": {}
      }
    },
    "AllowancePresentation": {
      "type": "object",
      "properties": {
        "allowance": {
          "$ref": "#/definitions/SignedAllowance"
        },
        "grant": {
          "$ref": "#/definitions/AllowanceGrant"
        }
      },
      "required": [
        "allowance",
        "grant"
      ],
      "additionalProperties": false,
      "description": "v0.2.2: what a visitor presents with a mandate issued under an allowance: the signed allowance and ONE grant.",
      "patternProperties": {
        "^x-": {}
      }
    },
    "AllowanceRevocation": {
      "type": "object",
      "properties": {
        "allowance_id": {
          "type": "string"
        },
        "owner_id": {
          "type": "string"
        },
        "revoked_at": {
          "$ref": "#/definitions/Timestamp"
        }
      },
      "required": [
        "allowance_id",
        "owner_id",
        "revoked_at"
      ],
      "additionalProperties": false,
      "description": "v0.2.2: the owner revokes an allowance at any time; it takes effect for every mandate issued under it."
    },
    "AllowanceStatus": {
      "type": "object",
      "properties": {
        "allowance_id": {
          "type": "string"
        },
        "allowance_digest": {
          "$ref": "#/definitions/Digest"
        },
        "status": {
          "type": "string",
          "enum": [
            "active",
            "revoked"
          ]
        },
        "revocation": {
          "$ref": "#/definitions/Signed%3CAllowanceRevocation%3E"
        },
        "issued_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "next_update": {
          "$ref": "#/definitions/Timestamp"
        }
      },
      "required": [
        "allowance_id",
        "allowance_digest",
        "status",
        "issued_at",
        "next_update"
      ],
      "additionalProperties": false,
      "description": "v0.2.3 (§5.2, the Revocation status extension): what the issuer publishes at `allowance.revocation_status` (HTTPS GET, application/json). Signed by the owner binding's platform key (card.owner_binding.platform_key) so it can be refreshed without an owner prompt; a revocation additionally carries the owner's own signed AllowanceRevocation. Fresh = now < next_update and next_update - issued_at <= 1 h (D12, v0.2.4; was 24 h in v0.2.3). A host that has no fresh, valid status (stapled or fetched) MUST fail closed."
    },
    "Approach": {
      "$ref": "#/definitions/InvitationRequest",
      "deprecated": "early v0.1 draft name; use InvitationRequest."
    },
    "AskAnswerMessage": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "const": "ask_answer"
        },
        "ask_ref": {
          "type": "string"
        },
        "return_code": {
          "type": "string"
        },
        "seat_id": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "answered",
            "declined",
            "no_answer"
          ]
        },
        "text": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            }
          },
          "required": [
            "text",
            "locale"
          ],
          "additionalProperties": false
        },
        "decision": {
          "$ref": "#/definitions/Signed%3COwnerAskDecision%3E"
        },
        "setup_version": {
          "type": "number"
        },
        "protocol": {
          "$ref": "#/definitions/ProtocolVersion"
        },
        "encounter_id": {
          "type": "string"
        },
        "msg_id": {
          "type": "string"
        },
        "sent_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "from": {
          "type": "string",
          "description": "Representative id of the sender."
        },
        "to": {
          "type": "string",
          "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
        },
        "in_reply_to": {
          "type": "string",
          "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
        }
      },
      "required": [
        "ask_ref",
        "encounter_id",
        "from",
        "msg_id",
        "protocol",
        "return_code",
        "seat_id",
        "sent_at",
        "setup_version",
        "status",
        "to",
        "type"
      ],
      "description": "§7.5: the owner's answer brought back to the visiting representative, in its inbox (§11.2)."
    },
    "AskFor": {
      "type": "object",
      "properties": {
        "what": {
          "type": "string"
        },
        "action": {
          "type": "string"
        }
      },
      "required": [
        "what"
      ],
      "additionalProperties": false
    },
    "AskOutcome": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "answered"
            },
            "answer_id": {
              "type": "string"
            },
            "text": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string"
                },
                "locale": {
                  "$ref": "#/definitions/Locale"
                }
              },
              "required": [
                "text",
                "locale"
              ],
              "additionalProperties": false
            },
            "setup_version": {
              "type": "number"
            }
          },
          "required": [
            "status",
            "answer_id",
            "text",
            "setup_version"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "withheld"
            },
            "topic": {
              "type": "string"
            },
            "courtesy": {
              "type": "string"
            }
          },
          "required": [
            "status",
            "topic",
            "courtesy"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "pending_owner"
            },
            "ask_ref": {
              "type": "string"
            },
            "courtesy": {
              "type": "string"
            },
            "response_by": {
              "$ref": "#/definitions/Timestamp"
            },
            "return_code": {
              "type": "string"
            }
          },
          "required": [
            "status",
            "ask_ref",
            "courtesy",
            "response_by",
            "return_code"
          ],
          "additionalProperties": false
        }
      ],
      "description": "§7.5: what `place.ask` returns in its act_result's `result`."
    },
    "AttributionRule": {
      "type": "string",
      "enum": [
        "chatham_house",
        "attributable_with_consent",
        "private"
      ]
    },
    "BookingConfirmation": {
      "type": "object",
      "properties": {
        "confirmation_id": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "confirmed",
            "changed",
            "cancelled"
          ]
        },
        "place": {
          "type": "object",
          "properties": {
            "principal_id": {
              "type": "string"
            },
            "entry": {
              "type": "string"
            },
            "site": {
              "type": "string"
            },
            "display_name": {
              "type": "string"
            }
          },
          "required": [
            "principal_id",
            "entry",
            "display_name"
          ],
          "additionalProperties": false
        },
        "host_card_digest": {
          "$ref": "#/definitions/Digest"
        },
        "host_representative_id": {
          "type": "string"
        },
        "for": {
          "type": "object",
          "properties": {
            "representative_id": {
              "type": "string"
            },
            "principal_id": {
              "type": "string"
            },
            "mandate_id": {
              "type": "string"
            },
            "seat_id": {
              "type": "string"
            }
          },
          "required": [
            "representative_id",
            "principal_id",
            "seat_id"
          ],
          "additionalProperties": false
        },
        "action": {
          "type": "string",
          "enum": [
            "reservation.make",
            "reservation.change",
            "reservation.cancel"
          ]
        },
        "booking": {
          "type": "object",
          "properties": {
            "start": {
              "$ref": "#/definitions/Timestamp"
            },
            "end": {
              "$ref": "#/definitions/Timestamp"
            },
            "time_zone": {
              "type": "string"
            },
            "party_size": {
              "type": "number"
            },
            "note": {
              "type": "string"
            }
          },
          "required": [
            "start",
            "end",
            "time_zone",
            "party_size"
          ],
          "additionalProperties": false
        },
        "replaces": {
          "type": "string"
        },
        "issued_at": {
          "$ref": "#/definitions/Timestamp"
        }
      },
      "required": [
        "confirmation_id",
        "status",
        "place",
        "host_card_digest",
        "host_representative_id",
        "for",
        "action",
        "booking",
        "issued_at"
      ],
      "additionalProperties": false,
      "description": "§7.4: a booking the place made, signed by its host representative under its Shōkai host card (`host_card_digest`). The visiting representative verifies it against the host card it checked at the door, and its owner keeps it."
    },
    "BookingLimits": {
      "type": "object",
      "properties": {
        "window_start": {
          "$ref": "#/definitions/Timestamp"
        },
        "window_end": {
          "$ref": "#/definitions/Timestamp"
        },
        "time_zone": {
          "type": "string"
        },
        "party_size_max": {
          "type": "number"
        }
      },
      "required": [
        "window_start",
        "window_end",
        "party_size_max"
      ],
      "additionalProperties": false,
      "description": "v0.5.0 (§7.4): the window and party size an owner allowed for a reservation. `window_start` and `window_end` are instants (RFC 3339 with an offset); a booking's start MUST fall inside them (how long it lasts is the place's to say). `time_zone` is the IANA zone the owner meant (\"Thursday lunchtime\" in Lisbon), for display; the check uses the instants.",
      "patternProperties": {
        "^x-": {}
      }
    },
    "CardClaim": {
      "type": "object",
      "properties": {
        "claim_id": {
          "type": "string"
        },
        "area": {
          "type": "string",
          "description": "What the claim is about, e.g. \"identity\", \"domain\", \"expertise\", \"values\"."
        },
        "text": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            }
          },
          "required": [
            "text",
            "locale"
          ],
          "additionalProperties": false,
          "patternProperties": {
            "^x-": {}
          }
        },
        "proof_level": {
          "$ref": "#/definitions/ProofLevel"
        },
        "evidence_refs": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/EvidenceRef"
          }
        }
      },
      "required": [
        "claim_id",
        "area",
        "text",
        "proof_level",
        "evidence_refs"
      ],
      "additionalProperties": false,
      "patternProperties": {
        "^x-": {}
      }
    },
    "CardKind": {
      "type": "string",
      "enum": [
        "visitor",
        "host"
      ],
      "description": "v0.4.0 (§2.3): the two Shōkai cards."
    },
    "CardPresentation": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "const": "card_presentation"
        },
        "card": {
          "$ref": "#/definitions/SignedCard"
        },
        "possession_proof": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "audience": {
              "type": "string"
            },
            "alg": {
              "type": "string",
              "enum": [
                "Ed25519",
                "ES256"
              ]
            },
            "key_id": {
              "type": "string",
              "description": "Key id; MUST resolve to a key bound to `signer`."
            },
            "signer": {
              "type": "string",
              "description": "Principal, representative or introducer id that signed."
            },
            "signed_at": {
              "$ref": "#/definitions/Timestamp"
            },
            "value": {
              "type": "string",
              "description": "v0.2.1 (§2.1): Ed25519 → base64url (no padding) of the signature over the 32 RAW digest bytes (not the \"sha-256:…\" string). ES256 passkey → base64url of the DER ECDSA signature the authenticator returned over authenticatorData ‖ SHA-256(clientDataJSON)."
            },
            "webauthn": {
              "type": "object",
              "properties": {
                "authenticator_data": {
                  "type": "string"
                },
                "client_data_json": {
                  "type": "string"
                },
                "credential_id": {
                  "type": "string"
                },
                "rp_id": {
                  "type": "string",
                  "description": "v0.2.4 (§2.1, A.1): REQUIRED. The relying-party id the assertion was made for. It is bound by the signed authenticatorData (rpIdHash = SHA-256(rp_id)), so it can't be swapped; when the owner's card is known, it MUST equal the card's owner_binding.rp_id. Lets a verifier check a passkey signature from an owner whose card it hasn't seen."
                },
                "batch": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/Digest"
                  },
                  "description": "v0.3.0-rc4 (A.1): present only when one passkey tap approved several items. The digests of every item the signing page showed, in order (2 to 16, distinct); the assertion's challenge is digest(JCS({\"batch\": batch})) and `batch_index` names this item. The item's own payload_digest MUST equal batch[batch_index]."
                },
                "batch_index": {
                  "type": "number"
                }
              },
              "required": [
                "authenticator_data",
                "client_data_json",
                "credential_id",
                "rp_id"
              ],
              "additionalProperties": false,
              "description": "Owner passkey assertions (Appendix A.1, normative in v0.2.1). clientDataJSON.type = \"webauthn.get\"; clientDataJSON.challenge = base64url(raw 32-byte digest) WITHOUT the \"sha-256:\" prefix.",
              "patternProperties": {
                "^x-": {}
              }
            }
          },
          "required": [
            "alg",
            "key_id",
            "signed_at",
            "signer",
            "value"
          ],
          "description": "v0.5.0 (§2.4, C292, review 3 R3-01): under shokai/0.5 the proof also names, and is signed over, its `audience`.",
          "patternProperties": {
            "^x-": {}
          }
        },
        "protocol": {
          "$ref": "#/definitions/ProtocolVersion"
        },
        "encounter_id": {
          "type": "string"
        },
        "msg_id": {
          "type": "string"
        },
        "sent_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "from": {
          "type": "string",
          "description": "Representative id of the sender."
        },
        "to": {
          "type": "string",
          "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
        },
        "in_reply_to": {
          "type": "string",
          "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
        }
      },
      "required": [
        "card",
        "encounter_id",
        "from",
        "msg_id",
        "protocol",
        "sent_at",
        "to",
        "type"
      ],
      "description": "Step 2a. Present one's card, deliberately, with proof of possession.",
      "patternProperties": {
        "^x-": {}
      }
    },
    "CardProvenance": {
      "type": "object",
      "properties": {
        "designed_with": {
          "type": "object",
          "properties": {
            "steward_id": {
              "type": "string"
            },
            "display_name": {
              "type": "string"
            }
          },
          "required": [
            "steward_id"
          ],
          "additionalProperties": false,
          "description": "Steward / onboarding guide (protocol agent) that helped, if any.",
          "patternProperties": {
            "^x-": {}
          }
        },
        "design_started_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "last_reviewed_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "sessions_count": {
          "type": "number",
          "description": "Number of design conversations with the principal."
        },
        "coverage": {
          "type": "object",
          "properties": {
            "purpose": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string"
                },
                "locale": {
                  "$ref": "#/definitions/Locale"
                },
                "meaning_notes": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/MeaningNote"
                  }
                }
              },
              "required": [
                "text",
                "locale"
              ],
              "additionalProperties": false,
              "patternProperties": {
                "^x-": {}
              }
            },
            "mandate": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string"
                },
                "locale": {
                  "$ref": "#/definitions/Locale"
                },
                "meaning_notes": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/MeaningNote"
                  }
                }
              },
              "required": [
                "text",
                "locale"
              ],
              "additionalProperties": false,
              "patternProperties": {
                "^x-": {}
              }
            },
            "boundaries": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string"
                },
                "locale": {
                  "$ref": "#/definitions/Locale"
                },
                "meaning_notes": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/MeaningNote"
                  }
                }
              },
              "required": [
                "text",
                "locale"
              ],
              "additionalProperties": false,
              "patternProperties": {
                "^x-": {}
              }
            },
            "norms": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string"
                },
                "locale": {
                  "$ref": "#/definitions/Locale"
                },
                "meaning_notes": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/MeaningNote"
                  }
                }
              },
              "required": [
                "text",
                "locale"
              ],
              "additionalProperties": false,
              "patternProperties": {
                "^x-": {}
              }
            },
            "seeking": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string"
                },
                "locale": {
                  "$ref": "#/definitions/Locale"
                },
                "meaning_notes": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/MeaningNote"
                  }
                }
              },
              "required": [
                "text",
                "locale"
              ],
              "additionalProperties": false,
              "patternProperties": {
                "^x-": {}
              }
            },
            "offering": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string"
                },
                "locale": {
                  "$ref": "#/definitions/Locale"
                },
                "meaning_notes": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/MeaningNote"
                  }
                }
              },
              "required": [
                "text",
                "locale"
              ],
              "additionalProperties": false,
              "patternProperties": {
                "^x-": {}
              }
            }
          },
          "additionalProperties": false,
          "patternProperties": {
            "^x-": {}
          }
        },
        "observation": {
          "type": "object",
          "properties": {
            "started_at": {
              "$ref": "#/definitions/Timestamp"
            },
            "ended_at": {
              "$ref": "#/definitions/Timestamp"
            },
            "decisions_observed": {
              "type": "number"
            }
          },
          "required": [
            "started_at",
            "ended_at",
            "decisions_observed"
          ],
          "additionalProperties": false,
          "description": "Observation period: the steward watched real decisions alongside the principal.",
          "patternProperties": {
            "^x-": {}
          }
        }
      },
      "required": [
        "design_started_at",
        "last_reviewed_at",
        "sessions_count",
        "coverage"
      ],
      "additionalProperties": false,
      "description": "Phase 0 provenance, asserted by the principal (signed with the card). The protocol defines no quality score; gatekeepers MAY weigh it as evidence.",
      "patternProperties": {
        "^x-": {}
      }
    },
    "CardReceipt": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "const": "card_receipt"
        },
        "card_digest": {
          "$ref": "#/definitions/Digest"
        },
        "claim_challenge": {
          "type": "object",
          "properties": {
            "challenge": {
              "type": "string"
            },
            "expires_at": {
              "$ref": "#/definitions/Timestamp"
            }
          },
          "required": [
            "challenge",
            "expires_at"
          ],
          "additionalProperties": false,
          "description": "v0.5.0 (§4.1, C272, provisional): a fresh, single-use challenge for a Shōkai introduction claim in this encounter, sent by a door on shokai/0.5. `challenge` is at least 128 random bits (base64url); it expires at `expires_at`, at most 5 minutes on.",
          "patternProperties": {
            "^x-": {}
          }
        },
        "courtesy": {
          "$ref": "#/definitions/Courtesy"
        },
        "protocol": {
          "$ref": "#/definitions/ProtocolVersion"
        },
        "encounter_id": {
          "type": "string"
        },
        "msg_id": {
          "type": "string"
        },
        "sent_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "from": {
          "type": "string",
          "description": "Representative id of the sender."
        },
        "to": {
          "type": "string",
          "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
        },
        "in_reply_to": {
          "type": "string",
          "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
        }
      },
      "required": [
        "card_digest",
        "encounter_id",
        "from",
        "msg_id",
        "protocol",
        "sent_at",
        "to",
        "type"
      ],
      "description": "Step 2b. Receive the counterpart's card. Acknowledges receipt, not acceptance.",
      "patternProperties": {
        "^x-": {}
      }
    },
    "CardRevocation": {
      "type": "object",
      "properties": {
        "card_id": {
          "type": "string"
        },
        "card_digest": {
          "$ref": "#/definitions/Digest",
          "description": "The revoked card's payload_digest, when known. A revocation naming another digest doesn't revoke this card."
        },
        "principal_id": {
          "type": "string"
        },
        "revoked_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "reason": {
          "type": "string",
          "enum": [
            "key_compromise",
            "key_lost",
            "superseded",
            "withdrawn"
          ]
        },
        "standby": {
          "type": "boolean"
        }
      },
      "required": [
        "card_id",
        "principal_id",
        "revoked_at"
      ],
      "additionalProperties": false,
      "description": "v0.3.0-rc4 (§2.6, C191): a principal withdraws one of its cards. Signed by the card's principal (an owner's passkey, Appendix A.1, or an organization's key). `standby: true` marks a revocation signed ahead of time, kept by the owner (not the representative) for the day a key is lost or stolen; it takes effect when published or delivered. Revocation only ever removes authority."
    },
    "CardRevocationMessage": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "const": "card_revocation"
        },
        "revocation": {
          "$ref": "#/definitions/Signed%3CCardRevocation%3E"
        },
        "protocol": {
          "$ref": "#/definitions/ProtocolVersion"
        },
        "encounter_id": {
          "type": "string"
        },
        "msg_id": {
          "type": "string"
        },
        "sent_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "from": {
          "type": "string",
          "description": "Representative id of the sender."
        },
        "to": {
          "type": "string",
          "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
        },
        "in_reply_to": {
          "type": "string",
          "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
        }
      },
      "required": [
        "encounter_id",
        "from",
        "msg_id",
        "protocol",
        "revocation",
        "sent_at",
        "to",
        "type"
      ],
      "description": "v0.3.0-rc4 (§2.6, §11): carries a CardRevocation to any place, in any encounter; anyone may deliver it.",
      "patternProperties": {
        "^x-": {}
      }
    },
    "Condition": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "const": "narrow_actions"
            },
            "params": {
              "type": "object",
              "properties": {
                "actions": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "actions"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "code",
            "params"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "const": "lower_limit"
            },
            "params": {
              "$ref": "#/definitions/Limits"
            }
          },
          "required": [
            "code",
            "params"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "const": "require_mandate"
            },
            "params": {
              "type": "object",
              "properties": {
                "actions": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "actions"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "code",
            "params"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "const": "require_vouch"
            },
            "params": {
              "type": "object",
              "properties": {
                "purposes": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/PurposeCode"
                  }
                }
              },
              "required": [
                "purposes"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "code",
            "params"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "const": "require_human_confirmation"
            },
            "params": {
              "type": "object",
              "properties": {
                "actions": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "actions"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "code",
            "params"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "const": "shorter_session"
            },
            "params": {
              "type": "object",
              "properties": {
                "max_session_s": {
                  "type": "number"
                }
              },
              "required": [
                "max_session_s"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "code",
            "params"
          ],
          "additionalProperties": false
        }
      ],
      "description": "v0.2.1 (§6.1): typed, checkable conditions. Lists are arrays; amounts are Money."
    },
    "ConditionalDecision": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "decision": {
          "type": "string",
          "const": "conditional"
        },
        "conditions": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Condition"
          },
          "minItems": 1,
          "description": "Non-empty. Meeting them = a new InvitationRequest with meets_conditions_of."
        },
        "retry": {
          "$ref": "#/definitions/Retry"
        },
        "reason_code": {
          "$ref": "#/definitions/ReasonCode",
          "description": "Present only if policy allows disclosure to this counterpart."
        },
        "relationship_ref": {
          "type": "string",
          "description": "Gatekeeper-issued handle for the persisted relationship (SPEC §9.1)."
        },
        "courtesy": {
          "$ref": "#/definitions/Courtesy"
        },
        "basis": {
          "$ref": "#/definitions/DecisionBasis"
        }
      },
      "required": [
        "basis",
        "conditions",
        "courtesy",
        "decision",
        "retry"
      ]
    },
    "ConductRule": {
      "type": "object",
      "properties": {
        "code": {
          "$ref": "#/definitions/ConductRuleCode"
        },
        "text": {
          "type": "string"
        },
        "locale": {
          "$ref": "#/definitions/Locale"
        }
      },
      "required": [
        "code",
        "text",
        "locale"
      ],
      "additionalProperties": false,
      "patternProperties": {
        "^x-": {}
      }
    },
    "ConductRuleCode": {
      "type": "string",
      "description": "v0.5.0 (§2.3): a conduct rule a place declares up front, inside house_digest. Courtesy, never the guarantee."
    },
    "ConsentRevocation": {
      "type": "object",
      "properties": {
        "consent_id": {
          "type": "string"
        },
        "owner_id": {
          "type": "string"
        },
        "revoked_at": {
          "$ref": "#/definitions/Timestamp"
        }
      },
      "required": [
        "consent_id",
        "owner_id",
        "revoked_at"
      ],
      "additionalProperties": false,
      "description": "v0.2.2 (D7): the owner takes a consent back; a representative stops relying on it once seen."
    },
    "ConsentRevocationMessage": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "const": "consent_revocation"
        },
        "revocation": {
          "$ref": "#/definitions/Signed%3CConsentRevocation%3E"
        },
        "protocol": {
          "$ref": "#/definitions/ProtocolVersion"
        },
        "encounter_id": {
          "type": "string"
        },
        "msg_id": {
          "type": "string"
        },
        "sent_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "from": {
          "type": "string",
          "description": "Representative id of the sender."
        },
        "to": {
          "type": "string",
          "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
        },
        "in_reply_to": {
          "type": "string",
          "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
        }
      },
      "required": [
        "encounter_id",
        "from",
        "msg_id",
        "protocol",
        "revocation",
        "sent_at",
        "to",
        "type"
      ],
      "description": "v0.2.3 (§8.1, §11): carries a ConsentRevocation (signed by the same owner key class that signed the consent).",
      "patternProperties": {
        "^x-": {}
      }
    },
    "ConsiderationOutcome": {
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "reason_code": {
              "$ref": "#/definitions/ReasonCode",
              "description": "Present only if policy allows disclosure to this counterpart."
            },
            "relationship_ref": {
              "type": "string"
            },
            "courtesy": {
              "$ref": "#/definitions/Courtesy"
            },
            "basis": {
              "$ref": "#/definitions/DecisionBasis"
            },
            "decision": {
              "type": "string",
              "const": "grant"
            },
            "type": {
              "type": "string",
              "const": "consideration_outcome"
            },
            "consideration_ref": {
              "type": "string"
            },
            "in_reply_to": {
              "type": "string",
              "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
            },
            "decided_by": {
              "$ref": "#/definitions/ConsiderationRoute",
              "description": "The inside party that decided (matches routed_to)."
            },
            "approved": {
              "type": "object",
              "properties": {
                "actions": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "limits": {
                  "$ref": "#/definitions/Limits"
                },
                "valid_until": {
                  "$ref": "#/definitions/Timestamp"
                }
              },
              "required": [
                "actions",
                "valid_until"
              ],
              "additionalProperties": false,
              "description": "v0.2.1 (§6.8): what the inside party approved; used in a NEW encounter that cites consideration_ref. v0.2.3: valid_until defaults to decided_at + 30 days."
            },
            "owner_consents": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Signed%3COwnerConsent%3E"
              },
              "description": "v0.2.3 (§6.8, §8.1): REQUIRED when decided_by is a principal and the outcome grants or conditions a binding action (e.g. a pair-place commitment): the owner's OwnerConsent(s), passkey approve_commitment, whose subject_ref is {kind: \"consideration\", id: consideration_ref, digest: payload_digest of the considering response}."
            },
            "protocol": {
              "$ref": "#/definitions/ProtocolVersion"
            },
            "encounter_id": {
              "type": "string"
            },
            "msg_id": {
              "type": "string"
            },
            "sent_at": {
              "$ref": "#/definitions/Timestamp"
            },
            "from": {
              "type": "string",
              "description": "Representative id of the sender."
            },
            "to": {
              "type": "string",
              "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
            }
          },
          "required": [
            "basis",
            "consideration_ref",
            "courtesy",
            "decided_by",
            "decision",
            "encounter_id",
            "from",
            "in_reply_to",
            "msg_id",
            "protocol",
            "relationship_ref",
            "sent_at",
            "to",
            "type"
          ]
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "decision": {
              "type": "string",
              "const": "deny"
            },
            "disposition": {
              "$ref": "#/definitions/Disposition"
            },
            "context_statement": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string"
                },
                "locale": {
                  "$ref": "#/definitions/Locale"
                }
              },
              "required": [
                "text",
                "locale"
              ],
              "additionalProperties": false,
              "description": "Honest situational statement, e.g. \"At this moment we are not onboarding…\"."
            },
            "revisit": {
              "$ref": "#/definitions/RevisitHint"
            },
            "retry": {
              "$ref": "#/definitions/Retry"
            },
            "readiness_requirements": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/ReadinessRequirement"
              },
              "description": "With not_now: exactly what is missing to be seated (unprepared visitor, SPEC lobby path)."
            },
            "reason_code": {
              "$ref": "#/definitions/ReasonCode",
              "description": "Present only if policy allows disclosure to this counterpart."
            },
            "relationship_ref": {
              "type": "string"
            },
            "courtesy": {
              "$ref": "#/definitions/Courtesy"
            },
            "basis": {
              "$ref": "#/definitions/DecisionBasis"
            },
            "type": {
              "type": "string",
              "const": "consideration_outcome"
            },
            "consideration_ref": {
              "type": "string"
            },
            "in_reply_to": {
              "type": "string",
              "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
            },
            "decided_by": {
              "$ref": "#/definitions/ConsiderationRoute",
              "description": "The inside party that decided (matches routed_to)."
            },
            "approved": {
              "type": "object",
              "properties": {
                "actions": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "limits": {
                  "$ref": "#/definitions/Limits"
                },
                "valid_until": {
                  "$ref": "#/definitions/Timestamp"
                }
              },
              "required": [
                "actions",
                "valid_until"
              ],
              "additionalProperties": false,
              "description": "v0.2.1 (§6.8): what the inside party approved; used in a NEW encounter that cites consideration_ref. v0.2.3: valid_until defaults to decided_at + 30 days."
            },
            "owner_consents": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Signed%3COwnerConsent%3E"
              },
              "description": "v0.2.3 (§6.8, §8.1): REQUIRED when decided_by is a principal and the outcome grants or conditions a binding action (e.g. a pair-place commitment): the owner's OwnerConsent(s), passkey approve_commitment, whose subject_ref is {kind: \"consideration\", id: consideration_ref, digest: payload_digest of the considering response}."
            },
            "protocol": {
              "$ref": "#/definitions/ProtocolVersion"
            },
            "encounter_id": {
              "type": "string"
            },
            "msg_id": {
              "type": "string"
            },
            "sent_at": {
              "$ref": "#/definitions/Timestamp"
            },
            "from": {
              "type": "string",
              "description": "Representative id of the sender."
            },
            "to": {
              "type": "string",
              "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
            }
          },
          "required": [
            "basis",
            "consideration_ref",
            "courtesy",
            "decided_by",
            "decision",
            "disposition",
            "encounter_id",
            "from",
            "in_reply_to",
            "msg_id",
            "protocol",
            "relationship_ref",
            "retry",
            "sent_at",
            "to",
            "type"
          ]
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "decision": {
              "type": "string",
              "const": "conditional"
            },
            "conditions": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Condition"
              },
              "minItems": 1,
              "description": "Non-empty. Meeting them = a new InvitationRequest with meets_conditions_of."
            },
            "retry": {
              "$ref": "#/definitions/Retry"
            },
            "reason_code": {
              "$ref": "#/definitions/ReasonCode",
              "description": "Present only if policy allows disclosure to this counterpart."
            },
            "relationship_ref": {
              "type": "string"
            },
            "courtesy": {
              "$ref": "#/definitions/Courtesy"
            },
            "basis": {
              "$ref": "#/definitions/DecisionBasis"
            },
            "type": {
              "type": "string",
              "const": "consideration_outcome"
            },
            "consideration_ref": {
              "type": "string"
            },
            "in_reply_to": {
              "type": "string",
              "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
            },
            "decided_by": {
              "$ref": "#/definitions/ConsiderationRoute",
              "description": "The inside party that decided (matches routed_to)."
            },
            "approved": {
              "type": "object",
              "properties": {
                "actions": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "limits": {
                  "$ref": "#/definitions/Limits"
                },
                "valid_until": {
                  "$ref": "#/definitions/Timestamp"
                }
              },
              "required": [
                "actions",
                "valid_until"
              ],
              "additionalProperties": false,
              "description": "v0.2.1 (§6.8): what the inside party approved; used in a NEW encounter that cites consideration_ref. v0.2.3: valid_until defaults to decided_at + 30 days."
            },
            "owner_consents": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Signed%3COwnerConsent%3E"
              },
              "description": "v0.2.3 (§6.8, §8.1): REQUIRED when decided_by is a principal and the outcome grants or conditions a binding action (e.g. a pair-place commitment): the owner's OwnerConsent(s), passkey approve_commitment, whose subject_ref is {kind: \"consideration\", id: consideration_ref, digest: payload_digest of the considering response}."
            },
            "protocol": {
              "$ref": "#/definitions/ProtocolVersion"
            },
            "encounter_id": {
              "type": "string"
            },
            "msg_id": {
              "type": "string"
            },
            "sent_at": {
              "$ref": "#/definitions/Timestamp"
            },
            "from": {
              "type": "string",
              "description": "Representative id of the sender."
            },
            "to": {
              "type": "string",
              "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
            }
          },
          "required": [
            "basis",
            "conditions",
            "consideration_ref",
            "courtesy",
            "decided_by",
            "decision",
            "encounter_id",
            "from",
            "in_reply_to",
            "msg_id",
            "protocol",
            "relationship_ref",
            "retry",
            "sent_at",
            "to",
            "type"
          ]
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "decision": {
              "type": "string",
              "const": "considering"
            },
            "consideration_ref": {
              "type": "string"
            },
            "routed_to": {
              "$ref": "#/definitions/ConsiderationRoute"
            },
            "response_by": {
              "$ref": "#/definitions/Timestamp",
              "description": "Outcome (or an explicit extension) is due by this time."
            },
            "reason_code": {
              "$ref": "#/definitions/ReasonCode",
              "description": "Present only if policy allows disclosure to this counterpart."
            },
            "relationship_ref": {
              "type": "string"
            },
            "courtesy": {
              "$ref": "#/definitions/Courtesy"
            },
            "basis": {
              "$ref": "#/definitions/DecisionBasis"
            },
            "type": {
              "type": "string",
              "const": "consideration_outcome"
            },
            "in_reply_to": {
              "type": "string",
              "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
            },
            "decided_by": {
              "$ref": "#/definitions/ConsiderationRoute",
              "description": "The inside party that decided (matches routed_to)."
            },
            "approved": {
              "type": "object",
              "properties": {
                "actions": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "limits": {
                  "$ref": "#/definitions/Limits"
                },
                "valid_until": {
                  "$ref": "#/definitions/Timestamp"
                }
              },
              "required": [
                "actions",
                "valid_until"
              ],
              "additionalProperties": false,
              "description": "v0.2.1 (§6.8): what the inside party approved; used in a NEW encounter that cites consideration_ref. v0.2.3: valid_until defaults to decided_at + 30 days."
            },
            "owner_consents": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Signed%3COwnerConsent%3E"
              },
              "description": "v0.2.3 (§6.8, §8.1): REQUIRED when decided_by is a principal and the outcome grants or conditions a binding action (e.g. a pair-place commitment): the owner's OwnerConsent(s), passkey approve_commitment, whose subject_ref is {kind: \"consideration\", id: consideration_ref, digest: payload_digest of the considering response}."
            },
            "protocol": {
              "$ref": "#/definitions/ProtocolVersion"
            },
            "encounter_id": {
              "type": "string"
            },
            "msg_id": {
              "type": "string"
            },
            "sent_at": {
              "$ref": "#/definitions/Timestamp"
            },
            "from": {
              "type": "string",
              "description": "Representative id of the sender."
            },
            "to": {
              "type": "string",
              "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
            }
          },
          "required": [
            "basis",
            "consideration_ref",
            "courtesy",
            "decided_by",
            "decision",
            "encounter_id",
            "from",
            "in_reply_to",
            "msg_id",
            "protocol",
            "relationship_ref",
            "response_by",
            "routed_to",
            "sent_at",
            "to",
            "type"
          ]
        }
      ],
      "description": "Later answer to a `considering` decision, delivered within the existing relationship (may arrive outside the original encounter)."
    },
    "ConsiderationRoute": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "principal"
            },
            "principal_id": {
              "type": "string"
            }
          },
          "required": [
            "kind",
            "principal_id"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "role"
            },
            "role": {
              "type": "string"
            },
            "human": {
              "type": "boolean"
            }
          },
          "required": [
            "kind",
            "role",
            "human"
          ],
          "additionalProperties": false
        }
      ],
      "description": "Who inside the host will decide a request taken under consideration."
    },
    "ConsideringDecision": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "decision": {
          "type": "string",
          "const": "considering"
        },
        "consideration_ref": {
          "type": "string"
        },
        "routed_to": {
          "$ref": "#/definitions/ConsiderationRoute"
        },
        "response_by": {
          "$ref": "#/definitions/Timestamp",
          "description": "Outcome (or an explicit extension) is due by this time."
        },
        "reason_code": {
          "$ref": "#/definitions/ReasonCode",
          "description": "Present only if policy allows disclosure to this counterpart."
        },
        "relationship_ref": {
          "type": "string",
          "description": "Gatekeeper-issued handle for the persisted relationship (SPEC §9.1)."
        },
        "courtesy": {
          "$ref": "#/definitions/Courtesy"
        },
        "basis": {
          "$ref": "#/definitions/DecisionBasis"
        }
      },
      "required": [
        "basis",
        "consideration_ref",
        "courtesy",
        "decision",
        "response_by",
        "routed_to"
      ],
      "description": "\"I can't grant that, but I'll bring it inside to someone who can decide.\" Grants nothing now. Eligibility is set by policy (deterministic); the pitch may be weighed by the party it is routed to. Answered by ConsiderationOutcome."
    },
    "ContentFlags": {
      "type": "object",
      "properties": {
        "invisible_chars": {
          "type": "number"
        },
        "hidden_styling": {
          "type": "boolean"
        },
        "instruction_like": {
          "type": "boolean"
        },
        "original_digest": {
          "$ref": "#/definitions/Digest"
        }
      },
      "required": [
        "invisible_chars",
        "hidden_styling",
        "instruction_like",
        "original_digest"
      ],
      "additionalProperties": false,
      "description": "v0.2.9 (§10): what the door noticed in an offer's text (kept for the owner; never sent to the brand)."
    },
    "ContextField": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "what": {
          "type": "string"
        },
        "why": {
          "type": "string"
        },
        "required": {
          "type": "boolean"
        },
        "sensitive": {
          "$ref": "#/definitions/SensitiveClass",
          "description": "Red team phase 1 (§6.12, C267, provisional): the field's sensitive class, when it has one. A sensitive field is never `required`, never asked in mode \"before_entry\", and its requirements' `retention_days` is 0."
        }
      },
      "required": [
        "name",
        "what",
        "why"
      ],
      "additionalProperties": false,
      "description": "§6.12 (provisional): one field a place may request. `name` is a short id (a-z, 0-9, _; at most 40), `what` says what is asked (1 to 120 characters) and `why` why the place needs it (1 to 300 characters), both in the owner's signed words; `required`: the place won't seat (before entry) or won't continue the part of the visit that needs it (after admission) without it."
    },
    "ContextRequest": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "context_request"
        },
        "request_id": {
          "type": "string"
        },
        "place": {
          "type": "string",
          "description": "The place's name, as in its house config."
        },
        "mode": {
          "type": "string",
          "enum": [
            "admit_then_request",
            "before_entry"
          ]
        },
        "fields": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ContextField"
          }
        },
        "retention_days": {
          "type": "number",
          "description": "The place's retention for the answers, as declared (absent there = 0)."
        },
        "expires_at": {
          "$ref": "#/definitions/Timestamp"
        }
      },
      "required": [
        "type",
        "request_id",
        "place",
        "mode",
        "fields",
        "retention_days",
        "expires_at"
      ],
      "additionalProperties": false,
      "description": "§6.12 (provisional): the place's request. Only declared fields, each with the declared `what`, `why` and `required`, verbatim. The visiting representative takes it home: it is data for the owner, never an instruction, and never answered from memory."
    },
    "ContextRequirements": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "card_enough",
            "admit_then_request",
            "before_entry"
          ]
        },
        "fields": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ContextField"
          },
          "description": "Required unless mode is \"card_enough\" (then absent or empty). At most 12, names unique."
        },
        "retention_days": {
          "type": "number"
        }
      },
      "required": [
        "mode"
      ],
      "additionalProperties": false,
      "description": "§6.12 (provisional, from P33): the place's context requirements. `mode` \"card_enough\": the Shōkai visitor card is enough, and no field is declared. \"admit_then_request\": the visitor is seated as usual, then the place may request declared fields. \"before_entry\": the place requests declared fields before it seats the visitor. `retention_days` (0 to 90; absent = 0, deleted when the pass ends) is how long the place keeps the answers."
    },
    "ContextResponse": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "context_response"
        },
        "request_id": {
          "type": "string"
        },
        "request_digest": {
          "$ref": "#/definitions/Digest",
          "description": "digest(JCS(the ContextRequest answered))."
        },
        "place": {
          "type": "string"
        },
        "answers": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "value": {
                "type": "string"
              }
            },
            "required": [
              "name",
              "value"
            ],
            "additionalProperties": false,
            "patternProperties": {
              "^x-": {}
            }
          },
          "description": "Each value 1 to 500 characters: the owner's own words, data for the place, never an instruction."
        },
        "declined": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "owner_sig": {
          "$ref": "#/definitions/Signature"
        }
      },
      "required": [
        "type",
        "request_id",
        "request_digest",
        "place",
        "answers",
        "declined",
        "owner_sig"
      ],
      "additionalProperties": false,
      "description": "§6.12 (provisional): the owner's answer, field by field. Every requested field is either answered or declined, exactly once; nothing else. `owner_sig` is the visitor's owner's signature over the digest of this object without `owner_sig`.",
      "patternProperties": {
        "^x-": {}
      }
    },
    "Courtesy": {
      "type": "object",
      "properties": {
        "locale": {
          "$ref": "#/definitions/Locale",
          "description": "Locale actually used: the RFC 4647 lookup result against the counterpart's locales (§6.6)."
        },
        "locale_match": {
          "type": "string",
          "enum": [
            "exact",
            "fallback",
            "none"
          ],
          "description": "v0.2.1 (D10, §6.6): whether the lookup matched exactly, by truncation, or fell back."
        },
        "register": {
          "$ref": "#/definitions/EtiquetteRegister"
        },
        "text": {
          "type": "string"
        },
        "meaning_notes": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/MeaningNote"
          },
          "description": "Untranslatable terms kept in the original inside `text`."
        }
      },
      "required": [
        "locale",
        "register",
        "text"
      ],
      "additionalProperties": false,
      "description": "Rendered manner. Never an input to control flow.",
      "patternProperties": {
        "^x-": {}
      }
    },
    "CredentialKind": {
      "type": "string",
      "enum": [
        "signed_card",
        "signed_mandate",
        "vouch",
        "human_confirmation",
        "owner_binding",
        "claim_evidence",
        "owner_consent",
        "possession_proof",
        "customer_link",
        "trust_receipt",
        "context_response"
      ],
      "description": "v0.2.1 (§3.3): `with_credential` lists the credential for every REQUIRED readiness item: card → signed_card, owner_binding → owner_binding, purpose → signed_mandate, introduction → vouch, claim_evidence → claim_evidence. owner_consent covers a missing OwnerConsent (e.g. gathering entry)."
    },
    "CustomerLink": {
      "type": "object",
      "properties": {
        "link_id": {
          "type": "string"
        },
        "place": {
          "type": "string",
          "description": "The place's principal DID."
        },
        "owner_id": {
          "type": "string",
          "description": "The owner DID (a per-place identity is RECOMMENDED, §2.8)."
        },
        "rp_id": {
          "type": "string",
          "description": "The relying party of the owner's passkey at link time."
        },
        "scope": {
          "type": "object",
          "properties": {
            "actions": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "actions"
          ],
          "additionalProperties": false,
          "description": "The most this place will ever serve under the link (listing action names)."
        },
        "place_limits": {
          "$ref": "#/definitions/Limits",
          "description": "The place's own caps for this link, shown to the owner."
        },
        "money_from": {
          "$ref": "#/definitions/Timestamp",
          "description": "Cooling-off: no act that moves money before this time."
        },
        "issued_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "expires_at": {
          "$ref": "#/definitions/Timestamp",
          "description": "At most 400 days after issued_at."
        },
        "shown_to_owner": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            }
          },
          "required": [
            "text",
            "locale"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "link_id",
        "place",
        "owner_id",
        "rp_id",
        "scope",
        "issued_at",
        "expires_at",
        "shown_to_owner"
      ],
      "additionalProperties": false,
      "description": "v0.4.0 (§5.4): a place's record that an owner identity belongs to one of its customers, made only in the place's own authenticated channel. Co-signed over one payload digest: signatures[0] by the place's principal key, signatures[1] by the owner's passkey (Appendix A.1). Not a secret and not an account identifier; it opens nothing without a card and mandate."
    },
    "DataAsk": {
      "type": "string",
      "description": "v0.3.0-rc1 (§3.1, D19): kinds of personal data a place may declare it will ask an owner for."
    },
    "Decision": {
      "$ref": "#/definitions/InvitationResponse",
      "deprecated": "early v0.1 draft name; use InvitationResponse."
    },
    "DecisionBasis": {
      "type": "object",
      "properties": {
        "policy_version": {
          "type": "string"
        },
        "seeking_version": {
          "type": "string",
          "description": "Host context in force: Seeking declaration version, if any."
        },
        "relationship_digest": {
          "$ref": "#/definitions/Digest",
          "description": "Digest of the gatekeeper's relationship record snapshot used, if any."
        },
        "input_digest": {
          "$ref": "#/definitions/Digest",
          "description": "Digest of the verified inputs the decision was computed from."
        },
        "decided_at": {
          "$ref": "#/definitions/Timestamp"
        }
      },
      "required": [
        "policy_version",
        "input_digest",
        "decided_at"
      ],
      "additionalProperties": false,
      "description": "Audit fields that make a decision replayable."
    },
    "DecisionBody": {
      "anyOf": [
        {
          "$ref": "#/definitions/FinalDecisionBody"
        },
        {
          "$ref": "#/definitions/ConsideringDecision"
        }
      ]
    },
    "DeletionReceiptMessage": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "const": "deletion_receipt"
        },
        "request_id": {
          "type": "string"
        },
        "request_digest": {
          "$ref": "#/definitions/Digest"
        },
        "principal_id": {
          "type": "string"
        },
        "deleted_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "requested": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "v0.5.0 (§12.4): what the request covered, e.g. \"raw_visitor_text\", \"raw_model_output\", \"outside_service_copies\"."
        },
        "deleted": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "What the place itself deleted, e.g. \"raw_visitor_text\", \"raw_model_output\"."
        },
        "kept": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string"
              },
              "reason": {
                "type": "string",
                "enum": [
                  "required_record",
                  "legal_obligation",
                  "legal_claim"
                ]
              },
              "detail": {
                "type": "string"
              }
            },
            "required": [
              "kind",
              "reason"
            ],
            "additionalProperties": false,
            "patternProperties": {
              "^x-": {}
            }
          },
          "description": "What was retained and why: a record SPEC §3.6 requires, a legal obligation, or the establishment, exercise or defence of a legal claim. For \"legal_obligation\" and \"legal_claim\", `detail` is the recorded purpose (§12.4: lawful retention)."
        },
        "outside_services": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "role": {
                "type": "string",
                "enum": [
                  "classifier",
                  "model_provider"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "confirmed",
                  "pending"
                ]
              }
            },
            "required": [
              "name",
              "role",
              "status"
            ],
            "additionalProperties": false,
            "patternProperties": {
              "^x-": {}
            }
          },
          "description": "Each named outside service (classifiers and model providers, §6.10) asked to delete what the place sent it, and its state: \"confirmed\" when the service confirmed deletion, \"pending\" when it hasn't (yet). A receipt never reports a pending one as deleted."
        },
        "protocol": {
          "$ref": "#/definitions/ProtocolVersion"
        },
        "encounter_id": {
          "type": "string"
        },
        "msg_id": {
          "type": "string"
        },
        "sent_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "from": {
          "type": "string",
          "description": "Representative id of the sender."
        },
        "to": {
          "type": "string",
          "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
        },
        "in_reply_to": {
          "type": "string",
          "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
        }
      },
      "required": [
        "deleted",
        "deleted_at",
        "encounter_id",
        "from",
        "kept",
        "msg_id",
        "outside_services",
        "principal_id",
        "protocol",
        "request_digest",
        "request_id",
        "requested",
        "sent_at",
        "to",
        "type"
      ],
      "description": "v0.5.0 (§12.4, C255): the place's receipt of deletion, held for the principal within 30 days of the request.",
      "patternProperties": {
        "^x-": {}
      }
    },
    "DeletionRequest": {
      "type": "object",
      "properties": {
        "request_id": {
          "type": "string"
        },
        "principal_id": {
          "type": "string",
          "description": "The visiting representative's principal; the request is signed by its key (an owner's passkey)."
        },
        "place": {
          "type": "string",
          "description": "The place's principal DID."
        },
        "issued_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "shown_to_owner": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            }
          },
          "required": [
            "text",
            "locale"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "request_id",
        "principal_id",
        "place",
        "issued_at",
        "shown_to_owner"
      ],
      "additionalProperties": false,
      "description": "v0.5.0 (§12.4, C255): a principal asks a place to delete raw visitor text and raw model output of its visits there."
    },
    "DeletionRequestMessage": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "const": "deletion_request"
        },
        "request": {
          "$ref": "#/definitions/Signed%3CDeletionRequest%3E"
        },
        "protocol": {
          "$ref": "#/definitions/ProtocolVersion"
        },
        "encounter_id": {
          "type": "string"
        },
        "msg_id": {
          "type": "string"
        },
        "sent_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "from": {
          "type": "string",
          "description": "Representative id of the sender."
        },
        "to": {
          "type": "string",
          "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
        },
        "in_reply_to": {
          "type": "string",
          "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
        }
      },
      "required": [
        "encounter_id",
        "from",
        "msg_id",
        "protocol",
        "request",
        "sent_at",
        "to",
        "type"
      ],
      "description": "v0.5.0 (§12.4, C255): carries a DeletionRequest to the place, in any encounter; any representative may deliver it. Answered with `held`.",
      "patternProperties": {
        "^x-": {}
      }
    },
    "DenyDecision": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "decision": {
          "type": "string",
          "const": "deny"
        },
        "disposition": {
          "$ref": "#/definitions/Disposition"
        },
        "context_statement": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            }
          },
          "required": [
            "text",
            "locale"
          ],
          "additionalProperties": false,
          "description": "Honest situational statement, e.g. \"At this moment we are not onboarding…\"."
        },
        "revisit": {
          "$ref": "#/definitions/RevisitHint"
        },
        "retry": {
          "$ref": "#/definitions/Retry"
        },
        "readiness_requirements": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ReadinessRequirement"
          },
          "description": "With not_now: exactly what is missing to be seated (unprepared visitor, SPEC lobby path)."
        },
        "reason_code": {
          "$ref": "#/definitions/ReasonCode",
          "description": "Present only if policy allows disclosure to this counterpart."
        },
        "relationship_ref": {
          "type": "string",
          "description": "Gatekeeper-issued handle for the persisted relationship (SPEC §9.1)."
        },
        "courtesy": {
          "$ref": "#/definitions/Courtesy"
        },
        "basis": {
          "$ref": "#/definitions/DecisionBasis"
        }
      },
      "required": [
        "basis",
        "courtesy",
        "decision",
        "disposition",
        "retry"
      ]
    },
    "DesignCoverageArea": {
      "type": "string",
      "enum": [
        "purpose",
        "mandate",
        "boundaries",
        "norms",
        "seeking",
        "offering"
      ],
      "description": "Areas a design covers; notes are short, principal-approved summaries."
    },
    "Digest": {
      "type": "string",
      "description": "Content digest: \"sha-256:\" + base64url (no padding) of SHA-256 over the UTF-8 bytes of the RFC 8785 (JCS) form."
    },
    "DisclosurePolicy": {
      "type": "object",
      "properties": {
        "principal_id": {
          "type": "string"
        },
        "default": {
          "$ref": "#/definitions/DisclosureTier"
        },
        "by_topic": {
          "type": "object",
          "properties": {
            "work": {
              "$ref": "#/definitions/DisclosureTier"
            },
            "craft": {
              "$ref": "#/definitions/DisclosureTier"
            },
            "wellbeing": {
              "$ref": "#/definitions/DisclosureTier"
            },
            "health": {
              "$ref": "#/definitions/DisclosureTier"
            },
            "family": {
              "$ref": "#/definitions/DisclosureTier"
            },
            "relationships": {
              "$ref": "#/definitions/DisclosureTier"
            },
            "finances": {
              "$ref": "#/definitions/DisclosureTier"
            },
            "location": {
              "$ref": "#/definitions/DisclosureTier"
            },
            "schedule": {
              "$ref": "#/definitions/DisclosureTier"
            },
            "beliefs": {
              "$ref": "#/definitions/DisclosureTier"
            },
            "identity": {
              "$ref": "#/definitions/DisclosureTier"
            }
          },
          "additionalProperties": {
            "$ref": "#/definitions/DisclosureTier"
          }
        },
        "friends_via": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/RelationshipEdgeKind"
          },
          "description": "Which relationship edge kinds count as \"friends\" closeness."
        }
      },
      "required": [
        "principal_id",
        "default",
        "by_topic",
        "friends_via"
      ],
      "additionalProperties": false
    },
    "DisclosureTier": {
      "type": "string",
      "enum": [
        "open",
        "friends",
        "private"
      ],
      "description": "How freely a topic may be shared, set by the principal; grows with closeness."
    },
    "Disposition": {
      "type": "string",
      "enum": [
        "not_now",
        "not_a_fit",
        "never"
      ],
      "description": "Why a deny is a deny, as context, not finality. `never` is reserved for policy or trust violations and requires retry.kind \"never\"."
    },
    "DoorAnswer": {
      "type": "object",
      "properties": {
        "question_id": {
          "type": "string"
        },
        "text": {
          "type": "string"
        },
        "locale": {
          "$ref": "#/definitions/Locale"
        },
        "answered_by": {
          "type": "string",
          "enum": [
            "owner",
            "representative"
          ]
        }
      },
      "required": [
        "question_id",
        "text",
        "locale",
        "answered_by"
      ],
      "additionalProperties": false
    },
    "DoorCap": {
      "type": "object",
      "properties": {
        "count": {
          "type": "number"
        },
        "period": {
          "type": "string",
          "enum": [
            "P1D",
            "P7D",
            "P1M"
          ]
        }
      },
      "required": [
        "count",
        "period"
      ],
      "additionalProperties": false,
      "description": "v0.2.9 (§10): a counted cap. Periods are consecutive windows anchored at the policy's valid_from (as allowance budgets, §5.2)."
    },
    "DoorCategory": {
      "type": "string",
      "description": "v0.2.9 (§10): coarse, public welcome categories for an inbound door. Detailed tastes stay in the private part."
    },
    "DoorPointer": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "door_pointer"
        },
        "protocol": {
          "$ref": "#/definitions/ProtocolVersion"
        },
        "place_listing": {
          "type": "string"
        },
        "places": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "principal_id": {
                "type": "string",
                "description": "v0.5.0 (§3.1.1): the place's principal. REQUIRED for a site binding when the entry is on another origin than the site's."
              },
              "place_listing": {
                "type": "string",
                "description": "v0.5.0 (§3.1.1): the listing this place's entry belongs to, when it isn't this pointer's place_listing."
              },
              "name": {
                "type": "string"
              },
              "entry": {
                "type": "string"
              },
              "lobby": {
                "type": "string"
              },
              "onboarding_url": {
                "type": "string"
              },
              "inbox": {
                "type": "string",
                "description": "v0.2.4 (§11.1): REQUIRED over HTTP. The place's inbox address (POST a signed inbox_poll)."
              }
            },
            "required": [
              "entry",
              "inbox",
              "lobby",
              "name",
              "onboarding_url"
            ]
          }
        },
        "start_with": {
          "type": "string",
          "const": "greeting",
          "description": "How to start: send a `greeting` (signed or not) to an entry address."
        },
        "spec_ref": {
          "$ref": "#/definitions/SpecRef",
          "description": "v0.2.4 (§3.1): REQUIRED. Which protocol text the door follows; clients compare `spec_ref.version`, not `protocol`."
        },
        "here": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "method": {
              "type": "string",
              "const": "POST"
            },
            "name": {
              "type": "string"
            },
            "entry": {
              "type": "string"
            },
            "lobby": {
              "type": "string"
            },
            "onboarding_url": {
              "type": "string"
            },
            "inbox": {
              "type": "string",
              "description": "v0.2.4 (§11.1): REQUIRED over HTTP. The place's inbox address (POST a signed inbox_poll)."
            }
          },
          "required": [
            "entry",
            "inbox",
            "lobby",
            "method",
            "name",
            "onboarding_url"
          ],
          "description": "v0.3.0-rc4 (§11.1, C200): only on a 404 for one of a place's own addresses (e.g. `GET <entry>`): that place, and that its addresses take a POST. Present for an unlisted place too (the requester already holds the address); never names another place."
        }
      },
      "required": [
        "type",
        "protocol",
        "place_listing",
        "places",
        "start_with",
        "spec_ref"
      ],
      "additionalProperties": false,
      "description": "v0.2.1 (§3.1): machine-readable answer to any arrival the door can't route (plain prose, an unknown route)."
    },
    "DoorPolicy": {
      "type": "object",
      "properties": {
        "policy_id": {
          "type": "string"
        },
        "owner_id": {
          "type": "string"
        },
        "representative_id": {
          "type": "string",
          "description": "The representative that keeps the door."
        },
        "public": {
          "type": "object",
          "properties": {
            "categories": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/DoorCategory"
              }
            },
            "introduction": {
              "type": "string",
              "enum": [
                "preferred",
                "required"
              ],
              "description": "Owner-chosen. \"preferred\" (default): introduced brands go first, uninvited ones use the allowance. \"required\": introductions only."
            },
            "uninvited_per_month": {
              "type": "number",
              "description": "Uninvited brands per month whose offer clears the fit bar. Default 2; 0 = introductions only."
            },
            "paid_introductions": {
              "type": "string",
              "enum": [
                "as_uninvited",
                "as_introduced"
              ],
              "description": "v0.2.9 default \"as_uninvited\" (the recommended default, P15 Q4; D19): a disclosed paid introduction gets no extra priority."
            },
            "caps": {
              "type": "object",
              "properties": {
                "per_brand": {
                  "$ref": "#/definitions/DoorCap"
                },
                "per_introducer": {
                  "$ref": "#/definitions/DoorCap"
                },
                "per_day_total": {
                  "type": "number"
                }
              },
              "required": [
                "per_brand",
                "per_introducer",
                "per_day_total"
              ],
              "additionalProperties": false
            },
            "gifts": {
              "type": "object",
              "properties": {
                "max_per_brand": {
                  "$ref": "#/definitions/DoorCap"
                },
                "max_total": {
                  "$ref": "#/definitions/DoorCap"
                },
                "max_value": {
                  "$ref": "#/definitions/Money"
                },
                "no_data_for_gift": {
                  "type": "boolean",
                  "const": true
                }
              },
              "required": [
                "max_per_brand",
                "max_total",
                "no_data_for_gift"
              ],
              "additionalProperties": false
            },
            "brand_learns": {
              "type": "string",
              "const": "outcome_only",
              "description": "What a brand learns: only the outcome code in v0.2.9 (the recommended default, P15 Q2; D19)."
            },
            "listed": {
              "type": "boolean",
              "description": "Default false: the door is not advertised; its address travels with introductions or the owner's opt-in."
            },
            "reason_categories": {
              "type": "string",
              "enum": [
                "off",
                "declined",
                "declined_and_reported"
              ],
              "description": "v0.2.9 (§10, P15 Q7, the recommended default; D19): whether refusals carry a kind reason category (DoorReasonCategory). Absent = \"declined\": on declined outcomes and door admission refusals, never on declined_reported. \"declined_and_reported\" adds conduct_concern to declined_reported; \"off\" sends none."
            },
            "own_name_visitors": {
              "type": "string",
              "enum": [
                "refuse",
                "seat_as_stranger"
              ],
              "description": "v0.3.0-rc4 (§10, C201): a visitor whose card claims the owner's own name under another principal. Absent = \"refuse\": it is refused (deny / not_now, asked for a vouch) unless the visit carries a vouch this door counts. \"seat_as_stranger\" (opt-in): it is judged exactly as a stranger. Either way the door tells its owner at once."
            }
          },
          "required": [
            "categories",
            "introduction",
            "uninvited_per_month",
            "paid_introductions",
            "caps",
            "gifts",
            "brand_learns",
            "listed"
          ],
          "additionalProperties": false
        },
        "private_digest": {
          "$ref": "#/definitions/Digest",
          "description": "digest(JCS({salt, note})) of the private part; the note and the salt stay with the representative."
        },
        "trusted_introducers": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Introducers whose vouches count at this door, by DID. Never \"*\"."
        },
        "valid_from": {
          "$ref": "#/definitions/Timestamp"
        },
        "expires_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "issued_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "shown_to_owner": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            }
          },
          "required": [
            "text",
            "locale"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "policy_id",
        "owner_id",
        "representative_id",
        "public",
        "private_digest",
        "trusted_introducers",
        "valid_from",
        "expires_at",
        "issued_at",
        "shown_to_owner"
      ],
      "additionalProperties": false,
      "description": "v0.2.9 (§10, D15): the owner's door policy. Signed once by the owner's passkey (Appendix A.1), like an Allowance. `public` is coarse and shown to brands; the private part (detailed tastes, values, history) never leaves the representative: only `private_digest`, a salted digest of it, is signed."
    },
    "DoorQuestion": {
      "type": "object",
      "properties": {
        "question_id": {
          "type": "string"
        },
        "text": {
          "type": "string"
        },
        "locale": {
          "$ref": "#/definitions/Locale"
        }
      },
      "required": [
        "question_id",
        "text",
        "locale"
      ],
      "additionalProperties": false,
      "description": "v0.5.0 (§8.4): up to three questions a place signs into its house config; answers are never graded."
    },
    "DoorReasonCategory": {
      "type": "string",
      "enum": [
        "not_a_fit_now",
        "over_monthly_allowance",
        "needs_introduction",
        "conduct_concern"
      ]
    },
    "EdgeAttestationPayload": {
      "type": "object",
      "properties": {
        "edge_id": {
          "type": "string"
        },
        "from": {
          "type": "string"
        },
        "to": {
          "type": "string"
        },
        "kind": {
          "$ref": "#/definitions/RelationshipEdgeKind"
        },
        "since": {
          "$ref": "#/definitions/Timestamp"
        }
      },
      "required": [
        "edge_id",
        "from",
        "to",
        "kind",
        "since"
      ],
      "additionalProperties": false,
      "description": "v0.2.1 (§9.2): what both owners sign for a `friend` edge. standing and history stay local and unsigned."
    },
    "ErrandBudget": {
      "type": "object",
      "properties": {
        "budget_id": {
          "type": "string"
        },
        "mandate_id": {
          "type": "string"
        },
        "mandate_digest": {
          "$ref": "#/definitions/Digest"
        },
        "max_tokens": {
          "type": "number"
        },
        "max_minutes": {
          "type": "number",
          "description": "Wall-clock minutes from the representative's first step on the errand, waiting included (not compute time)."
        },
        "max_visits": {
          "type": "number"
        },
        "expires_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "shown_to_owner": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            }
          },
          "required": [
            "text",
            "locale"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "budget_id",
        "mandate_id",
        "mandate_digest",
        "max_tokens",
        "expires_at",
        "shown_to_owner"
      ],
      "additionalProperties": false,
      "description": "v0.5.0 (§5.5): an owner-signed effort cap for one errand. Kept by the representative; never sent to a place."
    },
    "ErrandKind": {
      "type": "string",
      "enum": [
        "errand",
        "visit",
        "research"
      ],
      "description": "§12.5 (C304): the kind of errand the representative worked to; it derives the take-home budget from this, never from an owner setting."
    },
    "ErrandUsed": {
      "type": "object",
      "properties": {
        "budget_id": {
          "type": "string"
        },
        "tokens": {
          "type": "number"
        },
        "tokens_basis": {
          "type": "string",
          "enum": [
            "metered",
            "estimated"
          ],
          "description": "\"metered\": counted by the model service; \"estimated\": the representative's own estimate."
        },
        "visits": {
          "type": "number"
        },
        "minutes": {
          "type": "number"
        },
        "stopped_by": {
          "type": "string",
          "enum": [
            "max_tokens",
            "max_minutes",
            "max_visits",
            "expires_at"
          ],
          "description": "The limit that stopped the errand, if one did."
        }
      },
      "required": [
        "budget_id",
        "tokens",
        "tokens_basis",
        "visits",
        "minutes"
      ],
      "additionalProperties": false,
      "description": "v0.5.0 (§5.5, C247): what an errand used, against the owner-signed ErrandBudget. In the VisitReport only."
    },
    "EscalateToHuman": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "escalate_to_human"
        },
        "seat_id": {
          "type": "string"
        },
        "question": {
          "type": "string"
        },
        "blocked_action": {
          "type": "string",
          "description": "What is blocked until the human answers."
        },
        "options": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "label": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "label"
            ],
            "additionalProperties": false,
            "patternProperties": {
              "^x-": {}
            }
          }
        },
        "severity": {
          "type": "string",
          "enum": [
            "info",
            "consent",
            "critical"
          ]
        }
      },
      "required": [
        "type",
        "question"
      ],
      "additionalProperties": false,
      "description": "Domain or host needs a human decision (consent, spend, brand).",
      "patternProperties": {
        "^x-": {}
      }
    },
    "EtiquettePreferences": {
      "type": "object",
      "properties": {
        "locales": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Locale"
          }
        },
        "time_zone": {
          "type": "string",
          "description": "v0.2.1 (D10, §6.6): IANA time zone used to render dates in courtesy, e.g. \"Asia/Tokyo\"."
        },
        "formality": {
          "type": "string",
          "enum": [
            "formal",
            "neutral",
            "casual"
          ]
        },
        "norms": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Free-form norm tags, e.g. \"honorifics\", \"brief_greetings\", \"no_small_talk\"."
        },
        "meaning_notes": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/MeaningNote"
          },
          "description": "Meanings of norm terms that don't translate (e.g. a term kept in its original language)."
        }
      },
      "required": [
        "locales",
        "formality"
      ],
      "additionalProperties": false,
      "description": "Declared manner preferences (on a card or host profile). The ritual ORDER is universal; the MANNER adapts to these. No culture is mandated by the protocol.",
      "patternProperties": {
        "^x-": {}
      }
    },
    "EtiquetteRegister": {
      "type": "string",
      "enum": [
        "first_meeting",
        "established",
        "adversarial"
      ]
    },
    "EvidenceRef": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "url",
            "post",
            "work",
            "vouch",
            "did_web",
            "account_control"
          ]
        },
        "ref": {
          "type": "string"
        },
        "content_digest": {
          "$ref": "#/definitions/Digest",
          "description": "v0.2.1 (§2.5): digest of the referenced content. `evidenced` counts only after the receiver fetched it and the digest matched."
        }
      },
      "required": [
        "kind",
        "ref"
      ],
      "additionalProperties": false,
      "patternProperties": {
        "^x-": {}
      }
    },
    "ExtendInvitation": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "const": "extend_invitation"
        },
        "domain_id": {
          "type": "string"
        },
        "purpose": {
          "type": "object",
          "properties": {
            "code": {
              "$ref": "#/definitions/PurposeCode"
            },
            "statement": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            },
            "meaning_notes": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/MeaningNote"
              }
            }
          },
          "required": [
            "code",
            "statement",
            "locale"
          ],
          "additionalProperties": false,
          "patternProperties": {
            "^x-": {}
          }
        },
        "proposed_seat": {
          "$ref": "#/definitions/SeatGrant"
        },
        "card_digest": {
          "$ref": "#/definitions/Digest"
        },
        "etiquette_register": {
          "$ref": "#/definitions/EtiquetteRegister"
        },
        "mcp_session_id": {
          "type": "string"
        },
        "protocol": {
          "$ref": "#/definitions/ProtocolVersion"
        },
        "encounter_id": {
          "type": "string"
        },
        "msg_id": {
          "type": "string"
        },
        "sent_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "from": {
          "type": "string",
          "description": "Representative id of the sender."
        },
        "to": {
          "type": "string",
          "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
        },
        "in_reply_to": {
          "type": "string",
          "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
        }
      },
      "required": [
        "card_digest",
        "domain_id",
        "encounter_id",
        "etiquette_register",
        "from",
        "msg_id",
        "proposed_seat",
        "protocol",
        "purpose",
        "sent_at",
        "to",
        "type"
      ],
      "description": "Helper direction, step 4: the host extends an invitation to a product representative (replaces offer_presence). Answered by InvitationResponse; a grant MAY narrow `proposed_seat` but never widen it.",
      "patternProperties": {
        "^x-": {}
      }
    },
    "Farewell": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "const": "farewell"
        },
        "outcome": {
          "type": "string",
          "enum": [
            "seated",
            "declined",
            "withdrawn",
            "completed",
            "taken_inside",
            "taken_home",
            "declined_never"
          ],
          "description": "v0.2.3 (§4): a farewell MAY be sent at any step; before a decision only with outcome \"withdrawn\" or \"taken_home\". \"declined_never\" closes after a never: no invitation to return."
        },
        "courtesy": {
          "$ref": "#/definitions/Courtesy"
        },
        "protocol": {
          "$ref": "#/definitions/ProtocolVersion"
        },
        "encounter_id": {
          "type": "string"
        },
        "msg_id": {
          "type": "string"
        },
        "sent_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "from": {
          "type": "string",
          "description": "Representative id of the sender."
        },
        "to": {
          "type": "string",
          "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
        },
        "in_reply_to": {
          "type": "string",
          "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
        }
      },
      "required": [
        "courtesy",
        "encounter_id",
        "from",
        "msg_id",
        "outcome",
        "protocol",
        "sent_at",
        "to",
        "type"
      ],
      "description": "Step 7. Courteous close, including after a decline.",
      "patternProperties": {
        "^x-": {}
      }
    },
    "FinalDecisionBody": {
      "anyOf": [
        {
          "$ref": "#/definitions/GrantDecision"
        },
        {
          "$ref": "#/definitions/DenyDecision"
        },
        {
          "$ref": "#/definitions/ConditionalDecision"
        }
      ],
      "description": "Final decisions: the gatekeeper's own, or a ConsiderationOutcome's."
    },
    "GateInput": {
      "type": "object",
      "properties": {
        "now": {
          "$ref": "#/definitions/Timestamp"
        },
        "policy": {
          "type": "object",
          "properties": {
            "policy_version": {
              "type": "string"
            },
            "policy_digest": {
              "$ref": "#/definitions/Digest"
            }
          },
          "required": [
            "policy_version",
            "policy_digest"
          ],
          "additionalProperties": false
        },
        "visitor": {
          "type": "object",
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "boolean"
              },
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "area": {
                      "type": "string"
                    },
                    "level": {
                      "$ref": "#/definitions/ProofLevel"
                    }
                  },
                  "required": [
                    "area",
                    "level"
                  ],
                  "additionalProperties": false
                }
              },
              {
                "not": {}
              }
            ]
          }
        },
        "ritual": {
          "type": "string",
          "enum": [
            "ok",
            "skipped",
            "lobby"
          ]
        },
        "probing": {
          "type": "boolean"
        },
        "request": {
          "type": "object",
          "properties": {
            "purpose": {
              "$ref": "#/definitions/PurposeCode"
            },
            "actions": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "limits": {
              "$ref": "#/definitions/Limits"
            },
            "consideration_ref": {
              "type": "string"
            }
          },
          "required": [
            "purpose",
            "actions"
          ],
          "additionalProperties": false
        },
        "mandate": {
          "type": "object",
          "properties": {
            "purpose": {
              "$ref": "#/definitions/PurposeCode"
            },
            "allowed_actions": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "limits": {
              "$ref": "#/definitions/Limits"
            }
          },
          "required": [
            "purpose",
            "allowed_actions",
            "limits"
          ],
          "additionalProperties": false
        },
        "relationship": {
          "type": "object",
          "additionalProperties": {}
        }
      },
      "required": [
        "now",
        "policy",
        "visitor",
        "ritual",
        "probing",
        "relationship"
      ],
      "additionalProperties": false,
      "description": "v0.2.1 (D10, §6.4): the gate-input projection. input_digest = digest(JCS(GateInput)). No prose, no locale fields."
    },
    "Gathering": {
      "type": "object",
      "properties": {
        "gathering_id": {
          "type": "string"
        },
        "place": {
          "type": "object",
          "properties": {
            "principal_id": {
              "type": "string"
            },
            "display_name": {
              "type": "string"
            }
          },
          "required": [
            "principal_id",
            "display_name"
          ],
          "additionalProperties": false
        },
        "title": {
          "type": "string"
        },
        "invitees": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "representative_id": {
                "type": "string"
              },
              "principal_id": {
                "type": "string"
              },
              "invited_by": {
                "type": "string"
              }
            },
            "required": [
              "representative_id",
              "principal_id",
              "invited_by"
            ],
            "additionalProperties": false
          }
        },
        "house_rules": {
          "type": "object",
          "properties": {
            "default_attribution": {
              "$ref": "#/definitions/AttributionRule",
              "description": "Default for anything said: insights may leave, attribution may not (Chatham House)."
            },
            "private_never_leaves": {
              "type": "boolean",
              "const": true,
              "description": "Anything tagged private never leaves the gathering."
            },
            "pressing_after_decline": {
              "type": "string",
              "const": "flagged"
            },
            "pressing": {
              "type": "object",
              "properties": {
                "light_flags": {
                  "type": "number"
                },
                "notice_at": {
                  "type": "number"
                }
              },
              "required": [
                "light_flags",
                "notice_at"
              ],
              "additionalProperties": false,
              "description": "v0.2.2 (D5, the Gatherings extension): visible thresholds; MAY be stricter (lower), never laxer than the default {2, 3}."
            },
            "quoting": {
              "type": "string",
              "const": "paraphrase_by_default",
              "description": "D4: what leaves is paraphrased by default; verbatim only with the speaker's verbatim_consent."
            },
            "entry_requires_consent": {
              "type": "boolean",
              "const": true,
              "description": "D8: each attendee's owner signs an OwnerConsent (accept_house_rules) on entry. Enforcement is accountability, not prevention."
            },
            "topics": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/TopicCode"
              },
              "description": "v0.2.1 (D10): the `x-` topic codes this gathering uses."
            }
          },
          "required": [
            "default_attribution",
            "private_never_leaves",
            "pressing_after_decline",
            "quoting",
            "entry_requires_consent"
          ],
          "additionalProperties": false
        },
        "starts_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "ends_at": {
          "$ref": "#/definitions/Timestamp"
        }
      },
      "required": [
        "gathering_id",
        "place",
        "title",
        "invitees",
        "house_rules",
        "starts_at",
        "ends_at"
      ],
      "additionalProperties": false,
      "description": "A place representatives are invited to. A group is whoever is invited, not a membership list."
    },
    "GatheringInvitation": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "const": "gathering_invitation"
        },
        "gathering": {
          "$ref": "#/definitions/Signed%3CGathering%3E"
        },
        "entry": {
          "type": "string",
          "description": "The invitee's entry address where the gathering is held."
        },
        "protocol": {
          "$ref": "#/definitions/ProtocolVersion"
        },
        "encounter_id": {
          "type": "string"
        },
        "msg_id": {
          "type": "string"
        },
        "sent_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "from": {
          "type": "string",
          "description": "Representative id of the sender."
        },
        "to": {
          "type": "string",
          "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
        },
        "in_reply_to": {
          "type": "string",
          "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
        }
      },
      "required": [
        "encounter_id",
        "entry",
        "from",
        "gathering",
        "msg_id",
        "protocol",
        "sent_at",
        "to",
        "type"
      ],
      "description": "v0.2.3 (the Revocation status extension): the place sends a gathering's signed invitation to each invitee's representative.",
      "patternProperties": {
        "^x-": {}
      }
    },
    "GatheringMessage": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "const": "gathering_message"
        },
        "gathering_id": {
          "type": "string"
        },
        "kind": {
          "type": "string",
          "enum": [
            "insight",
            "chat",
            "question",
            "answer"
          ]
        },
        "topic": {
          "$ref": "#/definitions/TopicCode",
          "description": "v0.2.1 (D10): REQUIRED, a registered TopicCode."
        },
        "text": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            }
          },
          "required": [
            "text",
            "locale"
          ],
          "additionalProperties": false,
          "patternProperties": {
            "^x-": {}
          }
        },
        "attribution": {
          "$ref": "#/definitions/AttributionRule"
        },
        "attribution_consent_for": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Principals the speaker consents to be named to (for attributable_with_consent)."
        },
        "verbatim_consent": {
          "type": "boolean",
          "description": "D4: verbatim quoting outside the gathering only with this consent; the default is paraphrase. Attribution rules still apply."
        },
        "in_reply_to": {
          "type": "string",
          "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
        },
        "protocol": {
          "$ref": "#/definitions/ProtocolVersion"
        },
        "encounter_id": {
          "type": "string"
        },
        "msg_id": {
          "type": "string"
        },
        "sent_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "from": {
          "type": "string",
          "description": "Representative id of the sender."
        },
        "to": {
          "type": "string",
          "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
        }
      },
      "required": [
        "attribution",
        "encounter_id",
        "from",
        "gathering_id",
        "kind",
        "msg_id",
        "protocol",
        "sent_at",
        "text",
        "to",
        "topic",
        "type"
      ],
      "description": "v0.2.4 (§11 with the Gatherings or Peer meetings extension): an attendee addressing the room MUST set `encounter_id` and `to` to the gathering id.",
      "patternProperties": {
        "^x-": {}
      }
    },
    "GrantCaps": {
      "type": "object",
      "properties": {
        "unit": {
          "type": "string",
          "description": "Default \"action\": each act let through counts one."
        },
        "per_principal": {
          "type": "object",
          "properties": {
            "max": {
              "type": "number"
            },
            "period": {
              "$ref": "#/definitions/GrantPeriod"
            }
          },
          "required": [
            "max",
            "period"
          ],
          "additionalProperties": false
        },
        "per_introducer": {
          "type": "object",
          "properties": {
            "max": {
              "type": "number"
            },
            "period": {
              "$ref": "#/definitions/GrantPeriod"
            }
          },
          "required": [
            "max",
            "period"
          ],
          "additionalProperties": false
        },
        "per_receipt": {
          "type": "object",
          "properties": {
            "max": {
              "type": "number"
            },
            "period": {
              "$ref": "#/definitions/GrantPeriod"
            }
          },
          "required": [
            "max",
            "period"
          ],
          "additionalProperties": false
        },
        "pool": {
          "type": "object",
          "properties": {
            "max": {
              "type": "number"
            },
            "period": {
              "$ref": "#/definitions/GrantPeriod"
            }
          },
          "required": [
            "max",
            "period"
          ],
          "additionalProperties": false,
          "description": "The whole place, everyone together."
        }
      },
      "required": [
        "per_principal"
      ],
      "additionalProperties": false
    },
    "GrantDecision": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "decision": {
          "type": "string",
          "const": "grant"
        },
        "seat": {
          "$ref": "#/definitions/SeatGrant",
          "description": "Step 6 (seating) rides on the grant when a seat is issued."
        },
        "reason_code": {
          "$ref": "#/definitions/ReasonCode",
          "description": "Present only if policy allows disclosure to this counterpart."
        },
        "relationship_ref": {
          "type": "string",
          "description": "Gatekeeper-issued handle for the persisted relationship (SPEC §9.1)."
        },
        "courtesy": {
          "$ref": "#/definitions/Courtesy"
        },
        "basis": {
          "$ref": "#/definitions/DecisionBasis"
        }
      },
      "required": [
        "basis",
        "courtesy",
        "decision"
      ]
    },
    "GrantPeriod": {
      "type": "string",
      "enum": [
        "P1D",
        "P7D",
        "P1M",
        "P1Y"
      ],
      "description": "v0.5.0 (§6.9): a sliding window ending when the act is evaluated: 24 h, 7 × 24 h, 30 × 24 h, 365 × 24 h. Not §5.2's calendar windows."
    },
    "Greeting": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "to": {
          "type": "string",
          "description": "§2.2 (C48): a place MUST NOT refuse a greeting because `to` is absent or names its principal (a first visitor may know neither)."
        },
        "type": {
          "type": "string",
          "const": "greeting"
        },
        "locales": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Locale"
          },
          "description": "Preferred languages, in order. Courtesy is rendered in the counterpart's."
        },
        "proposed_register": {
          "$ref": "#/definitions/EtiquetteRegister"
        },
        "etiquette": {
          "$ref": "#/definitions/EtiquettePreferences",
          "description": "Manner preferences for this encounter (overrides the card's if both given)."
        },
        "seeking_ref": {
          "type": "object",
          "properties": {
            "seeking_id": {
              "type": "string"
            },
            "digest": {
              "$ref": "#/definitions/Digest"
            }
          },
          "required": [
            "seeking_id",
            "digest"
          ],
          "additionalProperties": false,
          "description": "Responder MAY point to its current Seeking declaration (id + digest).",
          "patternProperties": {
            "^x-": {}
          }
        },
        "place_category": {
          "$ref": "#/definitions/PlaceCategory",
          "description": "v0.2.2 (§5.2): a gatekeeper SHOULD state its place category, so a visitor can match its allowance."
        },
        "nonce": {
          "type": "string",
          "description": "Fresh, single use; the counterpart's possession proof signs it."
        },
        "courtesy": {
          "$ref": "#/definitions/Courtesy"
        },
        "continuity_key": {
          "type": "string",
          "description": "v0.2.1 (§9.1): an unprepared visitor MAY send an ephemeral did:key. The host then binds the lobby's visit_receipt to it, and the return request MUST carry a continuity_proof by that key."
        },
        "reply_to": {
          "type": "string",
          "description": "v0.2.4 (§11.2): where late messages for this sender MAY be pushed (its own entry URL). Absent = the place holds them for its inbox. Polling MUST always work."
        },
        "protocol": {
          "$ref": "#/definitions/ProtocolVersion"
        },
        "encounter_id": {
          "type": "string"
        },
        "msg_id": {
          "type": "string"
        },
        "sent_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "from": {
          "type": "string",
          "description": "Representative id of the sender."
        },
        "in_reply_to": {
          "type": "string",
          "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
        }
      },
      "required": [
        "encounter_id",
        "from",
        "locales",
        "msg_id",
        "nonce",
        "protocol",
        "sent_at",
        "type"
      ],
      "description": "Step 1. Both parties greet; each greeting carries a fresh nonce.",
      "patternProperties": {
        "^x-": {}
      }
    },
    "HeavyContentAsk": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "what": {
          "type": "string"
        },
        "media_type": {
          "type": "string"
        },
        "bytes": {
          "type": "number"
        },
        "from": {
          "type": "string"
        },
        "question": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "awaiting_owner",
            "approved",
            "declined"
          ]
        },
        "untrusted": {
          "type": "boolean",
          "const": true
        }
      },
      "required": [
        "id",
        "what",
        "question",
        "status",
        "untrusted"
      ],
      "additionalProperties": false,
      "description": "§12.5 (C310): a question the representative asked its owner about heavy or unusual content (a PDF, a video, a large download, an attachment) before bringing it home. `what` and `from` are the place's own words, so they are untrusted."
    },
    "HeldNotice": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "const": "held"
        },
        "in_reply_to": {
          "type": "string",
          "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
        },
        "inbox": {
          "type": "string",
          "description": "The inbox address where the answer will be held."
        },
        "answer_by": {
          "$ref": "#/definitions/Timestamp",
          "description": "v0.2.5 (§11.2): the latest time the answer will be held: after a considering, its response_by; for a peer_invitation, the invitation's answer_by. MAY be omitted when the answer is already held. Silence after it is a decline."
        },
        "protocol": {
          "$ref": "#/definitions/ProtocolVersion"
        },
        "encounter_id": {
          "type": "string"
        },
        "msg_id": {
          "type": "string"
        },
        "sent_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "from": {
          "type": "string",
          "description": "Representative id of the sender."
        },
        "to": {
          "type": "string",
          "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
        }
      },
      "required": [
        "encounter_id",
        "from",
        "in_reply_to",
        "inbox",
        "msg_id",
        "protocol",
        "sent_at",
        "to",
        "type"
      ],
      "description": "v0.2.4 (§11.2): the signed acknowledgement a place returns, in the same ReplyEnvelope, for a message it will answer later (a peer_invitation, a request taken to considering, a gathering invitation request). Distinguishes \"accepted, the answer will be held for your inbox\" from a dropped message (which gets no reply at all, §2.2).",
      "patternProperties": {
        "^x-": {}
      }
    },
    "HoldPolicies": {
      "type": "object",
      "properties": {
        "max_open_holds": {
          "type": "number",
          "description": "Holds open at once on a seat."
        },
        "max_holds": {
          "type": "number",
          "description": "Holds made on a seat."
        },
        "max_purchases": {
          "type": "number",
          "description": "Held purchases released on a seat."
        }
      },
      "additionalProperties": false,
      "description": "v0.5.0 (§7.3, C232): hold policies, each counted per seat. An absent member sets no limit. Past one: not_now / POLICY_DENY."
    },
    "HostBudget": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "metered",
            "subscription"
          ]
        },
        "time_zone": {
          "type": "string",
          "description": "The owner's IANA time zone; days and months reset at its midnights."
        },
        "per_visit": {
          "$ref": "#/definitions/HostBudgetCeiling"
        },
        "daily": {
          "$ref": "#/definitions/HostBudgetCeiling"
        },
        "monthly": {
          "$ref": "#/definitions/HostBudgetCeiling"
        },
        "alert_at": {
          "type": "number",
          "description": "The share of a ceiling at which the owner is told, more than 0 and less than 1; absent = 0.8."
        },
        "alert_calls": {
          "type": "object",
          "properties": {
            "daily": {
              "type": "number"
            },
            "monthly": {
              "type": "number"
            }
          },
          "additionalProperties": false,
          "description": "Subscription mode: tell the owner when the day's or the month's calls reach these counts (no ceiling needed)."
        },
        "prices": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/HostModelPrice"
          },
          "description": "Model id -> the owner's price. Metered mode with a `usd` ceiling: required, and a model that isn't listed is never called."
        },
        "newcomer_share": {
          "type": "number",
          "description": "The share of each `daily` ceiling that all newcomers together may use in a day, more than 0 and at most 1; absent = 0.25; 1 = no separate share. A newcomer is a visitor whose owner the place doesn't know yet (not in `known_visitors`, no trust receipt or introducer met on this pass, no booking or paid act at this place before today). Fresh Shōkai visitor cards cost nothing to make, so this keeps most of a day's budget for visitors the place knows."
        },
        "known_visitors": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Owners (principal ids) the place's owner lists as known: their visits never count against the newcomer share. At most 1000."
        }
      },
      "required": [
        "mode",
        "time_zone"
      ],
      "additionalProperties": false,
      "description": "§6.11 (provisional): the host budget. `mode` \"metered\": the place pays per token, so `daily` and `monthly` are required, and a `usd` ceiling needs a price for every model the host calls. `mode` \"subscription\": the place pays a flat fee, so the door counts calls and tokens for the owner's alerts, and every ceiling is optional (one that is set is enforced); `usd` ceilings and `prices` are not used."
    },
    "HostBudgetCeiling": {
      "type": "object",
      "properties": {
        "usd": {
          "type": "string"
        },
        "tokens": {
          "type": "number"
        },
        "calls": {
          "type": "number"
        }
      },
      "additionalProperties": false,
      "description": "§6.11 (provisional): one ceiling. Any of the three members may be set; each set member is a ceiling of its own. `usd` is a plain dollar amount as a decimal string (\"1.00\"); `tokens` counts model tokens in and out; `calls` counts host model calls."
    },
    "HostCardV050": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "kind": {
          "$ref": "#/definitions/CardKind",
          "description": "v0.4.0 (§2.3): which Shōkai card this is. \"visitor\": the Shōkai visitor card, presented by a visiting representative. \"host\": the Shōkai host card, presented by a place's host representative (the gatekeeper) and bound to one place (`place`). SHOULD be stated on every card (§2.3). A card without it (issued under v0.3.0) MUST be read as a Shōkai visitor card when a visiting representative presents it and as a Shōkai host card when a host representative presents it."
        },
        "place": {
          "$ref": "#/definitions/PlaceBinding",
          "description": "v0.4.0 (§2.3): REQUIRED on a host card, absent on a visitor card. The one place this host card serves."
        },
        "host_scope": {
          "$ref": "#/definitions/HostScope",
          "description": "v0.4.0 (§2.3): REQUIRED on a host card. What the host representative may do for its place's owner."
        },
        "house_digest": {
          "$ref": "#/definitions/Digest",
          "description": "v0.4.0 (§2.3): REQUIRED on a host card. The fingerprint of the house config the owner approved: digest(JCS(house config)), where the house config is the place's policy and listing details (§3.1). Any change to the house config needs a new card."
        },
        "summary_digest": {
          "$ref": "#/definitions/Digest",
          "description": "v0.5.0 (§2.3, C248): REQUIRED on a Shōkai host card whose house config has policy.summary: the digest of the JCS bytes of that summary, so the summary can be checked with the Shōkai host card alone. A door whose house config has policy.summary and whose host card lacks it MUST refuse to start."
        },
        "shown_to_owner": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            }
          },
          "required": [
            "text",
            "locale"
          ],
          "additionalProperties": false,
          "description": "v0.4.0 (§2.3, §8.1): REQUIRED on a host card. The plain-language recap the owner read right before signing, inside the signature."
        },
        "card_id": {
          "type": "string"
        },
        "protocol": {
          "$ref": "#/definitions/ProtocolVersion"
        },
        "representative_id": {
          "type": "string"
        },
        "principal": {
          "type": "object",
          "properties": {
            "principal_id": {
              "type": "string",
              "description": "v0.2.1 (§2.1): a DID. did:key (Ed25519) or did:jwk (P-256 passkey) now; did:web for organizations."
            },
            "kind": {
              "$ref": "#/definitions/PrincipalKind"
            },
            "display_name": {
              "type": "string"
            }
          },
          "required": [
            "principal_id",
            "kind",
            "display_name"
          ],
          "additionalProperties": false
        },
        "role": {
          "type": "string",
          "description": "Human-meaningful role, e.g. \"Payroll operations representative\"."
        },
        "standing": {
          "$ref": "#/definitions/Standing"
        },
        "mandate_scope": {
          "type": "object",
          "properties": {
            "purposes": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/PurposeCode"
              }
            },
            "actions": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "purposes",
            "actions"
          ],
          "additionalProperties": false,
          "description": "Outer bound of what any mandate under this card may authorize."
        },
        "locales": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Locale"
          },
          "description": "Languages the representative can converse in (preference order)."
        },
        "etiquette": {
          "$ref": "#/definitions/EtiquettePreferences",
          "description": "Declared cultural / etiquette preferences; the counterpart adapts to these."
        },
        "representative_key": {
          "type": "object",
          "properties": {
            "key_id": {
              "type": "string"
            },
            "alg": {
              "type": "string",
              "enum": [
                "Ed25519",
                "ES256"
              ]
            },
            "public_key": {
              "type": "string"
            }
          },
          "required": [
            "key_id",
            "alg",
            "public_key"
          ],
          "additionalProperties": false,
          "description": "v0.2.1 (§2.1): key_id MUST be a DID URL whose DID equals representative_id; public_key is base64url (no padding) of the raw 32-byte Ed25519 key, or the representative's did:key. It MUST equal the key representative_id resolves to."
        },
        "issued_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "expires_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "revocation_url": {
          "type": "string",
          "description": "v0.3.0-rc4 (§2.6, C191): where the principal publishes revocations of its cards (an https URL; loopback http only in a conformance run, Appendix B.1). GET answers a JSON array of Signed<CardRevocation> ([] when nothing is revoked). When present, a door MUST check it before seating (fail closed: unreachable = setup failure, not_now / after)."
        },
        "provenance": {
          "$ref": "#/definitions/CardProvenance",
          "description": "How this representative was designed (phase 0). Evidence, not a score."
        },
        "offering_digest": {
          "$ref": "#/definitions/Digest",
          "description": "Digest of the principal's current OfferingProfile, if published."
        },
        "claims": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/CardClaim"
          },
          "description": "Backed-up claims; counterparts weigh each by its EFFECTIVE proof level."
        },
        "imprint": {
          "$ref": "#/definitions/PrincipalImprint",
          "description": "How the principal's expertise, worldview, style and taste shape this representative."
        },
        "setup": {
          "type": "object",
          "properties": {
            "version": {
              "type": "number"
            },
            "prev_house_digest": {
              "$ref": "#/definitions/Digest"
            },
            "changes": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/SetupChangeRef"
              }
            }
          },
          "required": [
            "version",
            "prev_house_digest",
            "changes"
          ],
          "additionalProperties": false,
          "description": "v0.5.0 (§7.6, from P32 §7): on a Shōkai host card signed for an amended setup: its version, the house digest of the setup it replaces, and what changed. A visitor that saw the earlier card can check the chain; the house config says the same."
        },
        "org_approval": {
          "$ref": "#/definitions/OrgApproval",
          "description": "v0.4.0 (§2.3): REQUIRED on a host card whose principal is an organization (kind other than \"person\"): the record of which person approved this card for the organization. The card is still signed by the organization's own key."
        },
        "owner_prompts": {
          "type": "string",
          "enum": [
            "purchase_only",
            "never"
          ],
          "description": "v0.4.0 (§5.2): on a visitor card, whether its representative may ask its owner live, during a visit, to approve a purchase (\"purchase_only\"), or never asks live (\"never\", the default when absent). Disclosed in `shown_to_owner`."
        },
        "preset": {
          "type": "string",
          "enum": [
            "browse",
            "shop",
            "booking",
            "members"
          ],
          "description": "v0.5.0 (§0.1, RR-14): on a Shōkai host card, the place preset it claims (conformance/classes.json \"presets\"). Information only."
        },
        "owner_binding": {
          "type": "object",
          "properties": {
            "method": {
              "type": "string",
              "const": "passkey_webauthn"
            },
            "owner_id": {
              "type": "string"
            },
            "platform_key": {
              "type": "string",
              "description": "v0.2.2 (D7, §8.1): the chat binding's platform key (a DID); it alone signs `chat_reply` consents."
            },
            "rp_id": {
              "type": "string",
              "description": "v0.2.3 (§A.1): REQUIRED. The WebAuthn relying party the owner's passkey is registered with. Every owner passkey assertion (card, mandate, allowance, consents) is verified against SHA-256(rp_id) and origin \"https://\" + rp_id."
            }
          },
          "required": [
            "method",
            "owner_id",
            "rp_id"
          ],
          "additionalProperties": false,
          "description": "Owner binding: card and mandate are signed with the owner's passkey."
        },
        "crit": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "card_id",
        "expires_at",
        "host_scope",
        "house_digest",
        "issued_at",
        "kind",
        "locales",
        "mandate_scope",
        "place",
        "principal",
        "protocol",
        "representative_id",
        "representative_key",
        "role",
        "shown_to_owner",
        "standing",
        "summary_digest"
      ],
      "description": "v0.5.0 (§4.1, red team phase 1, 2026-11-03, provisional): the published Shōkai host card a visiting representative MUST read before presenting its own card (§2.3: kind, place, host_scope, house_digest and shown_to_owner REQUIRED; summary_digest REQUIRED under v0.5.0)."
    },
    "HostDuty": {
      "type": "string",
      "enum": [
        "seat",
        "issue_passes",
        "visit_stamps",
        "receipts",
        "consider",
        "extend_invitation",
        "misconduct_notices",
        "hold_purchases",
        "owner_questions",
        "bookings"
      ],
      "description": "v0.4.0 (§2.3): the duties a host representative may carry out for its place's owner."
    },
    "HostModelPrice": {
      "type": "object",
      "properties": {
        "input_per_mtok": {
          "type": "string"
        },
        "output_per_mtok": {
          "type": "string"
        }
      },
      "required": [
        "input_per_mtok",
        "output_per_mtok"
      ],
      "additionalProperties": false,
      "description": "§6.11 (provisional): the owner's price for one model, in US dollars per million tokens (decimal strings). Set by the owner; never fetched."
    },
    "HostScope": {
      "type": "object",
      "properties": {
        "actions": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "duties": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/HostDuty"
          }
        }
      },
      "required": [
        "actions",
        "duties"
      ],
      "additionalProperties": false,
      "description": "v0.4.0 (§2.3): what a Shōkai host card lets its host representative do: the place actions it serves, and its duties.",
      "patternProperties": {
        "^x-": {}
      }
    },
    "HouseActionPolicy": {
      "type": "object",
      "properties": {
        "action": {
          "type": "string"
        },
        "purposes": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/PurposeCode"
          },
          "description": "by_purpose (§5.1): the purposes this action is seated for."
        },
        "level": {
          "$ref": "#/definitions/SeatingLevel"
        },
        "limits": {
          "$ref": "#/definitions/Limits"
        },
        "min_proof": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "target": {
                "type": "string"
              },
              "level": {
                "$ref": "#/definitions/ProofLevel"
              }
            },
            "required": [
              "target",
              "level"
            ],
            "additionalProperties": false
          },
          "description": "§2.5: proof targets and levels, e.g. target \"imprint.<group>\" | \"claim.<area>\"."
        },
        "data_asks": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/DataAsk"
          },
          "description": "v0.3.0-rc1 (§3.1, D19): the personal data this action will ask the owner for; [] when absent."
        },
        "costs_place": {
          "type": "boolean",
          "description": "v0.5.0 (§6.9): serving this action costs the place real money (it SHOULD have a pool cap)."
        }
      },
      "required": [
        "action",
        "purposes",
        "level"
      ],
      "additionalProperties": false,
      "description": "v0.5.0 (§2.3, C236): one action's policy inside a house config's `policy.actions`. Modeled on the SDK's `ActionPolicy`."
    },
    "HousePolicy": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "limit_calls": {
          "type": "boolean",
          "description": "§7.3, C230: call home at the limit: hold an act that is above the limit (over_limit) instead of refusing it. Default false."
        },
        "hold_grace_s": {
          "type": "number",
          "description": "§7.3, C231: the grace after a hold's expires_at, 0 to 5 seconds; absent = 5, a larger value is read as 5."
        },
        "repeat_caps": {
          "type": "object",
          "properties": {
            "per_hold": {
              "type": "number"
            },
            "per_seat": {
              "type": "number"
            }
          },
          "additionalProperties": false,
          "description": "§7.2, C233: repeat caps for idempotent repeats; defaults 5 per hold and 10 per seat."
        },
        "hold_policies": {
          "$ref": "#/definitions/HoldPolicies",
          "description": "§7.3, C232."
        },
        "trust_requirements": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/TrustRequirement"
          },
          "description": "§6.9, C243: action -> the trust it needs."
        },
        "trust_issuers": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "§6.9, C244: third-party TrustReceipt issuers the place names, by DID. Never \"*\"; the place itself always counts."
        },
        "trust_obtain_url": {
          "type": "string",
          "description": "§6.9: where the place's own receipts are obtained (the trust readiness item's obtain_url)."
        },
        "established_introducers": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "§6.9: introducers the place counts as \"established\", by DID. Never \"*\"; never disclosed to an unverified visitor."
        },
        "conduct_rules": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ConductRule"
          },
          "description": "§2.3, C246."
        },
        "summary": {
          "$ref": "#/definitions/HouseSummary",
          "description": "§2.3, C248: REQUIRED for a v0.5.0 house config. Its JCS digest is the Shōkai host card's summary_digest."
        },
        "message_cap": {
          "type": "number",
          "description": "§3.4, C239: messages answered per encounter (a farewell is outside it); past it, RATE_LIMITED for acts, an empty reply otherwise."
        },
        "max_message_bytes": {
          "type": "number",
          "description": "§3.4, C239: the largest message the place reads, in bytes of its JSON as received (the signed envelope). Absent = 65536; at least 4096. A larger message gets a bounded refusal (an act or confirmation: not_now / REQUEST_INCOMPLETE; anything else: an empty reply; a farewell is still accepted), never a finding."
        },
        "closed_templates": {
          "type": "boolean",
          "description": "§2.2, C242: publish closed templates (PlaceTemplates.closed) and refuse signed objects off them. Default false."
        },
        "door_questions": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/DoorQuestion"
          },
          "description": "§8.4, C252: at most three."
        },
        "third_party_classifiers": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ThirdPartyClassifier"
          },
          "description": "§6.10, C250: the outside (third-party) classifiers the place sends visitor content to. Absent or empty = none is allowed. Shown in the house summary and LobbyBriefing.third_party_classifiers; a visitor answered under shokai/0.3 goes to none of them."
        },
        "model_providers": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ModelProvider"
          },
          "description": "§6.10, C250: the outside services that run the host representative's model or inference (a hosted model API or inference provider) and so receive visitor content. Absent or empty = none (the place runs its model on its own machines, or has none). Shown in the house summary and LobbyBriefing.model_providers; a visitor answered under shokai/0.3 goes to none of them."
        },
        "retention_days": {
          "type": "number",
          "description": "§12.4, C255: days raw visitor text and raw model output are kept; absent = 30, at most 90."
        },
        "host_budget": {
          "$ref": "#/definitions/HostBudget",
          "description": "§6.11 (provisional): the owner's ceilings on what the host representative's model may cost this place, per visit, per day and per month, in the owner's time zone. Inside house_digest, so only an owner-signed setup sets or changes it. Never on the wire and never in the house summary: a visitor can't see it."
        },
        "context_requirements": {
          "$ref": "#/definitions/ContextRequirements",
          "description": "§6.12 (provisional, from P33): what the place needs to know beyond the Shōkai visitor card, and when: \"card_enough\", admit then request, or request before entry. Inside house_digest, so only the owner's signature sets it; a place may only ever request the fields declared here."
        },
        "outside_setup": {
          "$ref": "#/definitions/OutsideSetup",
          "description": "§7.5 (from P32): what the host representative answers on its own, what it never discloses, and how long the owner has to answer."
        },
        "setup_version": {
          "type": "number",
          "description": "§7.6 (from P32): the setup's version, 1 for the first; each owner-signed amendment adds one. Absent = 1."
        },
        "prev_house_digest": {
          "$ref": "#/definitions/Digest",
          "description": "§7.6: on an amended setup, the house digest of the setup it replaces."
        },
        "amendment": {
          "$ref": "#/definitions/SetupAmendment",
          "description": "§7.6: on an amended setup, the amendment that made it."
        },
        "actions": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/HouseActionPolicy"
          },
          "description": "§3.3: the actions this place offers, per purpose (same as its listing)."
        },
        "spending_actions": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "D11: actions that move money; outside any mandate that has no max_amount."
        },
        "account_actions": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "v0.2.8 (§4, P2): actions that create an account / sign up. `account.create` always counts."
        },
        "account_creation": {
          "type": "string",
          "enum": [
            "open",
            "introduction_or_invitation"
          ],
          "description": "v0.2.10 (§4, D17): each place decides whether it creates accounts only for introduced visitors. \"introduction_or_invitation\": an account-creating action needs a weighted vouch from an introducer this place names, or the place's own invitation. Absent / \"open\": sign-up stays open. The spec recommends (SHOULD) requiring one where a place offers accounts or money."
        },
        "purchase_hold_s": {
          "type": "number",
          "description": "v0.4.0 (§7.3): seconds this place holds a purchase while a visitor asks its owner live (absent: it holds none). Capped by MAX_HOLD_S."
        },
        "lobby": {
          "type": "object",
          "properties": {
            "about": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            },
            "how": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            },
            "onboarding_url": {
              "type": "string"
            },
            "receipt_ttl_days": {
              "type": "number"
            },
            "readiness": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "enum": [
                      "card",
                      "owner_binding",
                      "purpose",
                      "introduction",
                      "claim_evidence"
                    ]
                  },
                  "required": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "code",
                  "required"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "about",
            "how",
            "onboarding_url",
            "receipt_ttl_days",
            "readiness"
          ],
          "additionalProperties": false,
          "description": "§3.3: the lobby's own settings (about, how, onboarding_url, receipt_ttl_days, readiness)."
        }
      },
      "required": [
        "actions",
        "lobby",
        "spending_actions"
      ],
      "description": "v0.5.0 (§2.3, C236): a house config's `policy`: the core members plus the v0.5.0 members."
    },
    "HousePolicyCore": {
      "type": "object",
      "properties": {
        "actions": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/HouseActionPolicy"
          },
          "description": "§3.3: the actions this place offers, per purpose (same as its listing)."
        },
        "spending_actions": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "D11: actions that move money; outside any mandate that has no max_amount."
        },
        "account_actions": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "v0.2.8 (§4, P2): actions that create an account / sign up. `account.create` always counts."
        },
        "account_creation": {
          "type": "string",
          "enum": [
            "open",
            "introduction_or_invitation"
          ],
          "description": "v0.2.10 (§4, D17): each place decides whether it creates accounts only for introduced visitors. \"introduction_or_invitation\": an account-creating action needs a weighted vouch from an introducer this place names, or the place's own invitation. Absent / \"open\": sign-up stays open. The spec recommends (SHOULD) requiring one where a place offers accounts or money."
        },
        "purchase_hold_s": {
          "type": "number",
          "description": "v0.4.0 (§7.3): seconds this place holds a purchase while a visitor asks its owner live (absent: it holds none). Capped by MAX_HOLD_S."
        },
        "lobby": {
          "type": "object",
          "properties": {
            "about": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            },
            "how": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            },
            "onboarding_url": {
              "type": "string"
            },
            "receipt_ttl_days": {
              "type": "number"
            },
            "readiness": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "enum": [
                      "card",
                      "owner_binding",
                      "purpose",
                      "introduction",
                      "claim_evidence"
                    ]
                  },
                  "required": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "code",
                  "required"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "about",
            "how",
            "onboarding_url",
            "receipt_ttl_days",
            "readiness"
          ],
          "additionalProperties": false,
          "description": "§3.3: the lobby's own settings (about, how, onboarding_url, receipt_ttl_days, readiness)."
        }
      },
      "required": [
        "actions",
        "spending_actions",
        "lobby"
      ],
      "additionalProperties": false,
      "description": "v0.5.0 (§2.3, C236): the core policy members used by name elsewhere in SPEC.md (`actions`, `spending_actions`, `account_actions`, `account_creation`, `purchase_hold_s` and `lobby`). Every one is inside what `house_digest` covers."
    },
    "HousePolicyV050": {
      "type": "object",
      "properties": {
        "limit_calls": {
          "type": "boolean",
          "description": "§7.3, C230: call home at the limit: hold an act that is above the limit (over_limit) instead of refusing it. Default false."
        },
        "hold_grace_s": {
          "type": "number",
          "description": "§7.3, C231: the grace after a hold's expires_at, 0 to 5 seconds; absent = 5, a larger value is read as 5."
        },
        "repeat_caps": {
          "type": "object",
          "properties": {
            "per_hold": {
              "type": "number"
            },
            "per_seat": {
              "type": "number"
            }
          },
          "additionalProperties": false,
          "description": "§7.2, C233: repeat caps for idempotent repeats; defaults 5 per hold and 10 per seat."
        },
        "hold_policies": {
          "$ref": "#/definitions/HoldPolicies",
          "description": "§7.3, C232."
        },
        "trust_requirements": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/TrustRequirement"
          },
          "description": "§6.9, C243: action -> the trust it needs."
        },
        "trust_issuers": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "§6.9, C244: third-party TrustReceipt issuers the place names, by DID. Never \"*\"; the place itself always counts."
        },
        "trust_obtain_url": {
          "type": "string",
          "description": "§6.9: where the place's own receipts are obtained (the trust readiness item's obtain_url)."
        },
        "established_introducers": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "§6.9: introducers the place counts as \"established\", by DID. Never \"*\"; never disclosed to an unverified visitor."
        },
        "conduct_rules": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ConductRule"
          },
          "description": "§2.3, C246."
        },
        "summary": {
          "$ref": "#/definitions/HouseSummary",
          "description": "§2.3, C248: REQUIRED for a v0.5.0 house config. Its JCS digest is the Shōkai host card's summary_digest."
        },
        "message_cap": {
          "type": "number",
          "description": "§3.4, C239: messages answered per encounter (a farewell is outside it); past it, RATE_LIMITED for acts, an empty reply otherwise."
        },
        "max_message_bytes": {
          "type": "number",
          "description": "§3.4, C239: the largest message the place reads, in bytes of its JSON as received (the signed envelope). Absent = 65536; at least 4096. A larger message gets a bounded refusal (an act or confirmation: not_now / REQUEST_INCOMPLETE; anything else: an empty reply; a farewell is still accepted), never a finding."
        },
        "closed_templates": {
          "type": "boolean",
          "description": "§2.2, C242: publish closed templates (PlaceTemplates.closed) and refuse signed objects off them. Default false."
        },
        "door_questions": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/DoorQuestion"
          },
          "description": "§8.4, C252: at most three."
        },
        "third_party_classifiers": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ThirdPartyClassifier"
          },
          "description": "§6.10, C250: the outside (third-party) classifiers the place sends visitor content to. Absent or empty = none is allowed. Shown in the house summary and LobbyBriefing.third_party_classifiers; a visitor answered under shokai/0.3 goes to none of them."
        },
        "model_providers": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ModelProvider"
          },
          "description": "§6.10, C250: the outside services that run the host representative's model or inference (a hosted model API or inference provider) and so receive visitor content. Absent or empty = none (the place runs its model on its own machines, or has none). Shown in the house summary and LobbyBriefing.model_providers; a visitor answered under shokai/0.3 goes to none of them."
        },
        "retention_days": {
          "type": "number",
          "description": "§12.4, C255: days raw visitor text and raw model output are kept; absent = 30, at most 90."
        },
        "host_budget": {
          "$ref": "#/definitions/HostBudget",
          "description": "§6.11 (provisional): the owner's ceilings on what the host representative's model may cost this place, per visit, per day and per month, in the owner's time zone. Inside house_digest, so only an owner-signed setup sets or changes it. Never on the wire and never in the house summary: a visitor can't see it."
        },
        "context_requirements": {
          "$ref": "#/definitions/ContextRequirements",
          "description": "§6.12 (provisional, from P33): what the place needs to know beyond the Shōkai visitor card, and when: \"card_enough\", admit then request, or request before entry. Inside house_digest, so only the owner's signature sets it; a place may only ever request the fields declared here."
        },
        "outside_setup": {
          "$ref": "#/definitions/OutsideSetup",
          "description": "§7.5 (from P32): what the host representative answers on its own, what it never discloses, and how long the owner has to answer."
        },
        "setup_version": {
          "type": "number",
          "description": "§7.6 (from P32): the setup's version, 1 for the first; each owner-signed amendment adds one. Absent = 1."
        },
        "prev_house_digest": {
          "$ref": "#/definitions/Digest",
          "description": "§7.6: on an amended setup, the house digest of the setup it replaces."
        },
        "amendment": {
          "$ref": "#/definitions/SetupAmendment",
          "description": "§7.6: on an amended setup, the amendment that made it."
        }
      },
      "additionalProperties": false,
      "description": "v0.5.0 (§2.3, C236): the v0.5.0 members of a house config's `policy`. Every one is inside what `house_digest` covers; a member the place doesn't set is off, or takes the default its section states. The rest of the policy is described in SPEC.md."
    },
    "HousePolicyV050Required": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "summary": {
          "$ref": "#/definitions/HouseSummary",
          "description": "§2.3, C248: REQUIRED for a v0.5.0 house config. Its JCS digest is the Shōkai host card's summary_digest."
        },
        "limit_calls": {
          "type": "boolean",
          "description": "§7.3, C230: call home at the limit: hold an act that is above the limit (over_limit) instead of refusing it. Default false."
        },
        "hold_grace_s": {
          "type": "number",
          "description": "§7.3, C231: the grace after a hold's expires_at, 0 to 5 seconds; absent = 5, a larger value is read as 5."
        },
        "repeat_caps": {
          "type": "object",
          "properties": {
            "per_hold": {
              "type": "number"
            },
            "per_seat": {
              "type": "number"
            }
          },
          "additionalProperties": false,
          "description": "§7.2, C233: repeat caps for idempotent repeats; defaults 5 per hold and 10 per seat."
        },
        "hold_policies": {
          "$ref": "#/definitions/HoldPolicies",
          "description": "§7.3, C232."
        },
        "trust_requirements": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/TrustRequirement"
          },
          "description": "§6.9, C243: action -> the trust it needs."
        },
        "trust_issuers": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "§6.9, C244: third-party TrustReceipt issuers the place names, by DID. Never \"*\"; the place itself always counts."
        },
        "trust_obtain_url": {
          "type": "string",
          "description": "§6.9: where the place's own receipts are obtained (the trust readiness item's obtain_url)."
        },
        "established_introducers": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "§6.9: introducers the place counts as \"established\", by DID. Never \"*\"; never disclosed to an unverified visitor."
        },
        "conduct_rules": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ConductRule"
          },
          "description": "§2.3, C246."
        },
        "message_cap": {
          "type": "number",
          "description": "§3.4, C239: messages answered per encounter (a farewell is outside it); past it, RATE_LIMITED for acts, an empty reply otherwise."
        },
        "max_message_bytes": {
          "type": "number",
          "description": "§3.4, C239: the largest message the place reads, in bytes of its JSON as received (the signed envelope). Absent = 65536; at least 4096. A larger message gets a bounded refusal (an act or confirmation: not_now / REQUEST_INCOMPLETE; anything else: an empty reply; a farewell is still accepted), never a finding."
        },
        "closed_templates": {
          "type": "boolean",
          "description": "§2.2, C242: publish closed templates (PlaceTemplates.closed) and refuse signed objects off them. Default false."
        },
        "door_questions": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/DoorQuestion"
          },
          "description": "§8.4, C252: at most three."
        },
        "third_party_classifiers": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ThirdPartyClassifier"
          },
          "description": "§6.10, C250: the outside (third-party) classifiers the place sends visitor content to. Absent or empty = none is allowed. Shown in the house summary and LobbyBriefing.third_party_classifiers; a visitor answered under shokai/0.3 goes to none of them."
        },
        "model_providers": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ModelProvider"
          },
          "description": "§6.10, C250: the outside services that run the host representative's model or inference (a hosted model API or inference provider) and so receive visitor content. Absent or empty = none (the place runs its model on its own machines, or has none). Shown in the house summary and LobbyBriefing.model_providers; a visitor answered under shokai/0.3 goes to none of them."
        },
        "retention_days": {
          "type": "number",
          "description": "§12.4, C255: days raw visitor text and raw model output are kept; absent = 30, at most 90."
        },
        "host_budget": {
          "$ref": "#/definitions/HostBudget",
          "description": "§6.11 (provisional): the owner's ceilings on what the host representative's model may cost this place, per visit, per day and per month, in the owner's time zone. Inside house_digest, so only an owner-signed setup sets or changes it. Never on the wire and never in the house summary: a visitor can't see it."
        },
        "context_requirements": {
          "$ref": "#/definitions/ContextRequirements",
          "description": "§6.12 (provisional, from P33): what the place needs to know beyond the Shōkai visitor card, and when: \"card_enough\", admit then request, or request before entry. Inside house_digest, so only the owner's signature sets it; a place may only ever request the fields declared here."
        },
        "outside_setup": {
          "$ref": "#/definitions/OutsideSetup",
          "description": "§7.5 (from P32): what the host representative answers on its own, what it never discloses, and how long the owner has to answer."
        },
        "setup_version": {
          "type": "number",
          "description": "§7.6 (from P32): the setup's version, 1 for the first; each owner-signed amendment adds one. Absent = 1."
        },
        "prev_house_digest": {
          "$ref": "#/definitions/Digest",
          "description": "§7.6: on an amended setup, the house digest of the setup it replaces."
        },
        "amendment": {
          "$ref": "#/definitions/SetupAmendment",
          "description": "§7.6: on an amended setup, the amendment that made it."
        }
      },
      "required": [
        "summary"
      ],
      "description": "v0.5.0 (§6.12, red team phase 1, 2026-11-03, provisional): a v0.5.0 house summary MUST restate the policy it signs."
    },
    "HouseSummary": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "display_name": {
          "type": "string"
        },
        "purpose": {
          "type": "object",
          "properties": {
            "statement": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            }
          },
          "required": [
            "statement",
            "locale"
          ],
          "additionalProperties": false
        },
        "conduct_rules": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ConductRule"
          }
        },
        "third_party_classifiers": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ThirdPartyClassifier"
          },
          "description": "v0.5.0 (§6.10, C250): equal to policy.third_party_classifiers; absent = none."
        },
        "model_providers": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ModelProvider"
          },
          "description": "v0.5.0 (§6.10, C250): equal to policy.model_providers; absent = no outside service runs the host's model."
        },
        "retention_days": {
          "type": "number",
          "description": "v0.5.0 (§12.4, C255): equal to policy.retention_days; absent = 30."
        },
        "message_cap": {
          "type": "number",
          "description": "v0.5.0 (§3.4, C239): equal to policy.message_cap."
        },
        "max_message_bytes": {
          "type": "number",
          "description": "v0.5.0 (§3.4, C239): equal to policy.max_message_bytes; absent = 65536."
        },
        "offers": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "action": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "max_amount": {
                "$ref": "#/definitions/Money"
              }
            },
            "required": [
              "action",
              "label"
            ],
            "additionalProperties": false
          }
        },
        "limits": {
          "$ref": "#/definitions/Limits"
        },
        "hold_policies": {
          "$ref": "#/definitions/HoldPolicies"
        },
        "trust_paths": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "action": {
                "type": "string"
              },
              "paths": {
                "type": "array",
                "items": {
                  "$ref": "#/definitions/TrustPathKind"
                }
              }
            },
            "required": [
              "action",
              "paths"
            ],
            "additionalProperties": false
          }
        },
        "context_requirements": {
          "$ref": "#/definitions/ContextRequirements",
          "description": "Red team phase 1 (§6.12, C267, provisional): restates policy.context_requirements exactly, so a visiting representative can check a context request against what the owner signed (through summary_digest) before it brings the request home."
        },
        "spec_ref": {
          "$ref": "#/definitions/SpecRef"
        }
      },
      "required": [
        "name",
        "display_name",
        "purpose",
        "spec_ref"
      ],
      "additionalProperties": false,
      "description": "v0.5.0 (§2.3, C248): policy.summary; its JCS digest is the Shōkai host card's summary_digest. REQUIRED for a v0.5.0 host, served at <entry>/house-summary.json. Each member that restates a policy member MUST equal it; the policy is authoritative."
    },
    "ImprintFacet": {
      "type": "object",
      "properties": {
        "facet_id": {
          "type": "string"
        },
        "text": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            },
            "meaning_notes": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/MeaningNote"
              }
            }
          },
          "required": [
            "text",
            "locale"
          ],
          "additionalProperties": false,
          "patternProperties": {
            "^x-": {}
          }
        },
        "proof_level": {
          "$ref": "#/definitions/ProofLevel"
        },
        "evidence_refs": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/EvidenceRef"
          }
        }
      },
      "required": [
        "facet_id",
        "text",
        "proof_level",
        "evidence_refs"
      ],
      "additionalProperties": false,
      "description": "One imprint facet: like a claim, it carries a proof level and evidence.",
      "patternProperties": {
        "^x-": {}
      }
    },
    "InboxPoll": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "const": "inbox_poll"
        },
        "since": {
          "type": "string",
          "description": "msg_id of the last message already received; absent = everything still held."
        },
        "protocol": {
          "$ref": "#/definitions/ProtocolVersion"
        },
        "encounter_id": {
          "type": "string"
        },
        "msg_id": {
          "type": "string"
        },
        "sent_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "from": {
          "type": "string",
          "description": "Representative id of the sender."
        },
        "to": {
          "type": "string",
          "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
        },
        "in_reply_to": {
          "type": "string",
          "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
        }
      },
      "required": [
        "encounter_id",
        "from",
        "msg_id",
        "protocol",
        "sent_at",
        "to",
        "type"
      ],
      "description": "v0.2.3 (§11.2): a signed poll for late (asynchronous) messages; `from` MUST equal the polled recipient.",
      "patternProperties": {
        "^x-": {}
      }
    },
    "IntroducerInterest": {
      "type": "string",
      "enum": [
        "none",
        "discount",
        "affiliate",
        "sponsored",
        "gift_received"
      ],
      "description": "v0.2.9 (§4): \"none\" = a genuine recommendation; anything else is a benefit the introducer gets and MUST be shown to the receiving owner."
    },
    "IntroducerPenalty": {
      "type": "object",
      "properties": {
        "grade": {
          "type": "string",
          "enum": [
            "none",
            "reduced",
            "suspended"
          ]
        },
        "purposes": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/PurposeCode"
          }
        },
        "notice_ref": {
          "type": "string"
        },
        "until": {
          "$ref": "#/definitions/Timestamp"
        },
        "halved_by_revocation": {
          "type": "string"
        },
        "restored_by_review": {
          "type": "string"
        }
      },
      "required": [
        "grade",
        "purposes",
        "notice_ref",
        "until"
      ],
      "additionalProperties": false,
      "description": "D1 grades: minor → none; serious → reduced for 90 days; severe → suspended for 180 days. A VouchRevocation within 7 days of the notice halves the duration. A signed IntroducerReview restores standing early. \"reduced\": the introducer's vouches still count as an introduction, but do not raise proof levels and do not make a visitor eligible for `considering`. \"suspended\": its vouches carry no weight here for those purposes."
    },
    "IntroducerReview": {
      "type": "object",
      "properties": {
        "review_id": {
          "type": "string"
        },
        "introducer_id": {
          "type": "string"
        },
        "reviewer_id": {
          "type": "string",
          "description": "v0.2.9 (§9.3, P5): who signs the review that restores standing: the place's own principal or a reviewer the place names. Never the penalised introducer (absent = the introducer itself, which restores nothing: it is an appeal only)."
        },
        "notice_ref": {
          "type": "string"
        },
        "revocation_ref": {
          "type": "string"
        },
        "statement": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            }
          },
          "required": [
            "text",
            "locale"
          ],
          "additionalProperties": false
        },
        "issued_at": {
          "$ref": "#/definitions/Timestamp"
        }
      },
      "required": [
        "review_id",
        "introducer_id",
        "notice_ref",
        "statement",
        "issued_at"
      ],
      "additionalProperties": false,
      "description": "D1: an introducer's signed review of a notice, e.g. what it changed. Restores standing at that gatekeeper."
    },
    "IntroducerReviewMessage": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "const": "introducer_review"
        },
        "review": {
          "$ref": "#/definitions/Signed%3CIntroducerReview%3E"
        },
        "protocol": {
          "$ref": "#/definitions/ProtocolVersion"
        },
        "encounter_id": {
          "type": "string"
        },
        "msg_id": {
          "type": "string"
        },
        "sent_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "from": {
          "type": "string",
          "description": "Representative id of the sender."
        },
        "to": {
          "type": "string",
          "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
        },
        "in_reply_to": {
          "type": "string",
          "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
        }
      },
      "required": [
        "encounter_id",
        "from",
        "msg_id",
        "protocol",
        "review",
        "sent_at",
        "to",
        "type"
      ],
      "description": "v0.2.1 (§9.3, D1): the wire message that carries an introducer's signed review.",
      "patternProperties": {
        "^x-": {}
      }
    },
    "IntroducerStanding": {
      "type": "object",
      "properties": {
        "introducer_id": {
          "type": "string"
        },
        "by_purpose": {
          "type": "object",
          "properties": {
            "inquiry": {
              "type": "string",
              "enum": [
                "full",
                "reduced",
                "suspended"
              ]
            },
            "account_servicing": {
              "type": "string",
              "enum": [
                "full",
                "reduced",
                "suspended"
              ]
            },
            "payment_initiation": {
              "type": "string",
              "enum": [
                "full",
                "reduced",
                "suspended"
              ]
            },
            "data_access": {
              "type": "string",
              "enum": [
                "full",
                "reduced",
                "suspended"
              ]
            },
            "creative_assist": {
              "type": "string",
              "enum": [
                "full",
                "reduced",
                "suspended"
              ]
            },
            "support": {
              "type": "string",
              "enum": [
                "full",
                "reduced",
                "suspended"
              ]
            },
            "teaching": {
              "type": "string",
              "enum": [
                "full",
                "reduced",
                "suspended"
              ]
            },
            "collaboration": {
              "type": "string",
              "enum": [
                "full",
                "reduced",
                "suspended"
              ]
            },
            "invitation": {
              "type": "string",
              "enum": [
                "full",
                "reduced",
                "suspended"
              ]
            },
            "introduction": {
              "type": "string",
              "enum": [
                "full",
                "reduced",
                "suspended"
              ]
            },
            "visitation": {
              "type": "string",
              "enum": [
                "full",
                "reduced",
                "suspended"
              ]
            },
            "purchase": {
              "type": "string",
              "enum": [
                "full",
                "reduced",
                "suspended"
              ]
            },
            "gathering": {
              "type": "string",
              "enum": [
                "full",
                "reduced",
                "suspended"
              ]
            },
            "presentation": {
              "type": "string",
              "enum": [
                "full",
                "reduced",
                "suspended"
              ]
            },
            "gift": {
              "type": "string",
              "enum": [
                "full",
                "reduced",
                "suspended"
              ]
            },
            "reservation": {
              "type": "string",
              "enum": [
                "full",
                "reduced",
                "suspended"
              ]
            }
          },
          "additionalProperties": {
            "type": "string",
            "enum": [
              "full",
              "reduced",
              "suspended"
            ]
          },
          "description": "Per-purpose weight its vouches carry here."
        },
        "notices": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "disposition": {
          "$ref": "#/definitions/Disposition"
        },
        "penalty": {
          "$ref": "#/definitions/IntroducerPenalty",
          "description": "D1 (v0.2): graded, local, time-boxed penalty, scoped to the relied-on vouch's purposes."
        }
      },
      "required": [
        "introducer_id",
        "by_purpose",
        "notices"
      ],
      "additionalProperties": false,
      "description": "Gatekeeper-local standing of an introducer (v0.1: never shared)."
    },
    "Introduction": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "const": "introduction"
        },
        "vouch": {
          "anyOf": [
            {
              "$ref": "#/definitions/SignedVouch"
            },
            {
              "type": "null"
            }
          ]
        },
        "invitation_ref": {
          "type": "object",
          "properties": {
            "invitation_id": {
              "type": "string"
            },
            "digest": {
              "$ref": "#/definitions/Digest"
            }
          },
          "required": [
            "invitation_id",
            "digest"
          ],
          "additionalProperties": false,
          "description": "v0.2.2 (the Peer meetings extension): in a pair place, the owner-to-owner invitation that seeded the meeting (it is the introduction).",
          "patternProperties": {
            "^x-": {}
          }
        },
        "introduction_card": {
          "type": "object",
          "properties": {
            "card": {
              "$ref": "#/definitions/Signed%3CShokaiIntroduction%3E"
            },
            "claim": {
              "$ref": "#/definitions/Signed%3CIntroductionClaim%3E"
            }
          },
          "required": [
            "card",
            "claim"
          ],
          "additionalProperties": false,
          "description": "v0.5.0 (§4.1): a claimed Shōkai introduction card, with `vouch: null`. Counts exactly as a vouch from its introducer. Not read under shokai/0.3 (§11.1).",
          "patternProperties": {
            "^x-": {}
          }
        },
        "protocol": {
          "$ref": "#/definitions/ProtocolVersion"
        },
        "encounter_id": {
          "type": "string"
        },
        "msg_id": {
          "type": "string"
        },
        "sent_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "from": {
          "type": "string",
          "description": "Representative id of the sender."
        },
        "to": {
          "type": "string",
          "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
        },
        "in_reply_to": {
          "type": "string",
          "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
        }
      },
      "required": [
        "encounter_id",
        "from",
        "msg_id",
        "protocol",
        "sent_at",
        "to",
        "type",
        "vouch"
      ],
      "description": "Step 3. Mandatory step; the vouch is optional (`vouch: null` = self-introduced). v0.2.3: in a pair place BOTH sides MUST send one.",
      "patternProperties": {
        "^x-": {}
      }
    },
    "IntroductionClaim": {
      "type": "object",
      "properties": {
        "introduction_id": {
          "type": "string"
        },
        "introduction_digest": {
          "$ref": "#/definitions/Digest"
        },
        "code": {
          "type": "string"
        },
        "salt": {
          "type": "string"
        },
        "holder": {
          "type": "object",
          "properties": {
            "principal_id": {
              "type": "string"
            },
            "card_digest": {
              "$ref": "#/definitions/Digest"
            }
          },
          "required": [
            "principal_id",
            "card_digest"
          ],
          "additionalProperties": false
        },
        "challenge": {
          "type": "string",
          "description": "v0.5.0 (§4.1, C272, provisional): the place-issued challenge from this encounter's card_receipt, inside the representative's signature. REQUIRED: a door MUST refuse a claim without it, with one it didn't issue for this encounter, with an expired one or with one already used. An offline-guessed code is useless without an online attempt, and failed attempts count toward probing."
        }
      },
      "required": [
        "introduction_id",
        "introduction_digest",
        "code",
        "salt",
        "holder"
      ],
      "additionalProperties": false,
      "description": "v0.5.0 (§4.1): signed by the holder's representative key; reveals one claim."
    },
    "IntroductionKind": {
      "type": "string",
      "enum": [
        "customer",
        "established",
        "organization",
        "named"
      ]
    },
    "InvitationRequest": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "const": "invitation_request"
        },
        "card_digest": {
          "$ref": "#/definitions/Digest"
        },
        "vouch_digest": {
          "$ref": "#/definitions/Digest"
        },
        "mandate": {
          "$ref": "#/definitions/SignedMandate"
        },
        "trust_receipts": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Signed%3CTrustReceipt%3E"
          },
          "description": "v0.5.0 (§6.9): receipts presented with the Shōkai visitor card, bound by their digests."
        },
        "trust_receipt_digests": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Digest"
          },
          "description": "v0.5.0 (§6.9, C244): MUST be present and equal to the digests of `trust_receipts` whenever `trust_receipts` is present; a missing or mismatched digest is REQUEST_INCOMPLETE."
        },
        "introduction_card_digest": {
          "$ref": "#/definitions/Digest",
          "description": "v0.5.0 (§4.1, C245): a claimed Shōkai introduction card, bound like vouch_digest. Both digests MUST be present when the Introduction carried `introduction_card`; a missing or mismatched digest is REQUEST_INCOMPLETE."
        },
        "introduction_claim_digest": {
          "$ref": "#/definitions/Digest"
        },
        "context_response": {
          "$ref": "#/definitions/ContextResponse",
          "description": "v0.5.0 (§6.12, provisional): the visitor's owner's signed answer to a context request this place sent (\"before entry\"), on a retry after `not_now` / `CREDENTIAL_REQUIRED` or `POLICY_DENY`. Inside the request the representative signs; checked whole."
        },
        "proposal": {
          "$ref": "#/definitions/Proposal"
        },
        "meets_conditions_of": {
          "type": "string",
          "description": "Set when amending a request to meet the conditions of a prior response."
        },
        "consideration_ref": {
          "type": "string",
          "description": "Set when returning to use a seat or meet conditions from a ConsiderationOutcome."
        },
        "relationship_ref": {
          "type": "string",
          "description": "Continuation of an existing relationship (issued by the gatekeeper earlier)."
        },
        "prior_response_ref": {
          "type": "string",
          "description": "msg_id of the prior InvitationResponse this request answers (e.g. a revisit)."
        },
        "visit_receipt": {
          "type": "object",
          "properties": {
            "receipt_id": {
              "type": "string"
            },
            "nonce": {
              "type": "string"
            },
            "continuity_proof": {
              "$ref": "#/definitions/Signature",
              "description": "v0.2.1: required when the receipt is bound to a continuity key: that key's signature over JCS({encounter_id, receipt_id, representative_id})."
            }
          },
          "required": [
            "receipt_id",
            "nonce"
          ],
          "additionalProperties": false,
          "description": "D6: echo of a lobby VisitReceipt. Covered by this request's signature (the new key). Hosts link history only on a valid, unused, unexpired receipt.",
          "patternProperties": {
            "^x-": {}
          }
        },
        "owner_consents": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Signed%3COwnerConsent%3E"
          },
          "description": "v0.2.1 (the Gatherings extension, D8): owner consents this request relies on, e.g. accept_house_rules to enter a gathering."
        },
        "allowance": {
          "$ref": "#/definitions/AllowancePresentation",
          "description": "v0.2.2 (§5.2): REQUIRED when `mandate.payload.under_allowance` is set."
        },
        "peer_invitation": {
          "type": "object",
          "properties": {
            "invitation": {
              "$ref": "#/definitions/Signed%3CPeerInvitation%3E"
            },
            "acceptance": {
              "$ref": "#/definitions/Signed%3COwnerConsent%3E"
            }
          },
          "required": [
            "invitation",
            "acceptance"
          ],
          "additionalProperties": false,
          "description": "v0.2.2 (the Peer meetings extension): in a pair place, the owner-to-owner invitation and the other owner's passkey acceptance.",
          "patternProperties": {
            "^x-": {}
          }
        },
        "owner_link": {
          "$ref": "#/definitions/Signed%3COwnerLink%3E",
          "description": "v0.3.0-rc4 (§2.8): optional; this owner's per-place identity linked to another of theirs, for this place only."
        },
        "allowance_status": {
          "$ref": "#/definitions/Signed%3CAllowanceStatus%3E",
          "description": "v0.2.3 (§5.2): a fresh issuer-published AllowanceStatus the representative MAY staple; hosts otherwise fetch revocation_status."
        },
        "protocol": {
          "$ref": "#/definitions/ProtocolVersion"
        },
        "encounter_id": {
          "type": "string"
        },
        "msg_id": {
          "type": "string"
        },
        "sent_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "from": {
          "type": "string",
          "description": "Representative id of the sender."
        },
        "to": {
          "type": "string",
          "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
        },
        "in_reply_to": {
          "type": "string",
          "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
        }
      },
      "required": [
        "card_digest",
        "encounter_id",
        "from",
        "mandate",
        "msg_id",
        "proposal",
        "protocol",
        "sent_at",
        "to",
        "type"
      ],
      "description": "Step 4. Statement of purpose: request an invitation. Binds the card and vouch exchanged earlier by digest, so the decision input is self-contained.",
      "patternProperties": {
        "^x-": {}
      }
    },
    "InvitationRequestBound": {
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "introduction_card_digest": {
              "$ref": "#/definitions/Digest",
              "description": "v0.5.0 (§4.1, C245): a claimed Shōkai introduction card, bound like vouch_digest. Both digests MUST be present when the Introduction carried `introduction_card`; a missing or mismatched digest is REQUEST_INCOMPLETE."
            },
            "introduction_claim_digest": {
              "$ref": "#/definitions/Digest"
            },
            "trust_receipts": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Signed%3CTrustReceipt%3E"
              },
              "description": "v0.5.0 (§6.9): receipts presented with the Shōkai visitor card, bound by their digests."
            },
            "trust_receipt_digests": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Digest"
              },
              "description": "v0.5.0 (§6.9, C244): MUST be present and equal to the digests of `trust_receipts` whenever `trust_receipts` is present; a missing or mismatched digest is REQUEST_INCOMPLETE."
            },
            "type": {
              "type": "string",
              "const": "invitation_request"
            },
            "card_digest": {
              "$ref": "#/definitions/Digest"
            },
            "vouch_digest": {
              "$ref": "#/definitions/Digest"
            },
            "mandate": {
              "$ref": "#/definitions/SignedMandate"
            },
            "context_response": {
              "$ref": "#/definitions/ContextResponse",
              "description": "v0.5.0 (§6.12, provisional): the visitor's owner's signed answer to a context request this place sent (\"before entry\"), on a retry after `not_now` / `CREDENTIAL_REQUIRED` or `POLICY_DENY`. Inside the request the representative signs; checked whole."
            },
            "proposal": {
              "$ref": "#/definitions/Proposal"
            },
            "meets_conditions_of": {
              "type": "string",
              "description": "Set when amending a request to meet the conditions of a prior response."
            },
            "consideration_ref": {
              "type": "string",
              "description": "Set when returning to use a seat or meet conditions from a ConsiderationOutcome."
            },
            "relationship_ref": {
              "type": "string",
              "description": "Continuation of an existing relationship (issued by the gatekeeper earlier)."
            },
            "prior_response_ref": {
              "type": "string",
              "description": "msg_id of the prior InvitationResponse this request answers (e.g. a revisit)."
            },
            "visit_receipt": {
              "type": "object",
              "properties": {
                "receipt_id": {
                  "type": "string"
                },
                "nonce": {
                  "type": "string"
                },
                "continuity_proof": {
                  "$ref": "#/definitions/Signature",
                  "description": "v0.2.1: required when the receipt is bound to a continuity key: that key's signature over JCS({encounter_id, receipt_id, representative_id})."
                }
              },
              "required": [
                "receipt_id",
                "nonce"
              ],
              "additionalProperties": false,
              "description": "D6: echo of a lobby VisitReceipt. Covered by this request's signature (the new key). Hosts link history only on a valid, unused, unexpired receipt."
            },
            "owner_consents": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Signed%3COwnerConsent%3E"
              },
              "description": "v0.2.1 (the Gatherings extension, D8): owner consents this request relies on, e.g. accept_house_rules to enter a gathering."
            },
            "allowance": {
              "$ref": "#/definitions/AllowancePresentation",
              "description": "v0.2.2 (§5.2): REQUIRED when `mandate.payload.under_allowance` is set."
            },
            "peer_invitation": {
              "type": "object",
              "properties": {
                "invitation": {
                  "$ref": "#/definitions/Signed%3CPeerInvitation%3E"
                },
                "acceptance": {
                  "$ref": "#/definitions/Signed%3COwnerConsent%3E"
                }
              },
              "required": [
                "invitation",
                "acceptance"
              ],
              "additionalProperties": false,
              "description": "v0.2.2 (the Peer meetings extension): in a pair place, the owner-to-owner invitation and the other owner's passkey acceptance."
            },
            "owner_link": {
              "$ref": "#/definitions/Signed%3COwnerLink%3E",
              "description": "v0.3.0-rc4 (§2.8): optional; this owner's per-place identity linked to another of theirs, for this place only."
            },
            "allowance_status": {
              "$ref": "#/definitions/Signed%3CAllowanceStatus%3E",
              "description": "v0.2.3 (§5.2): a fresh issuer-published AllowanceStatus the representative MAY staple; hosts otherwise fetch revocation_status."
            },
            "protocol": {
              "$ref": "#/definitions/ProtocolVersion"
            },
            "encounter_id": {
              "type": "string"
            },
            "msg_id": {
              "type": "string"
            },
            "sent_at": {
              "$ref": "#/definitions/Timestamp"
            },
            "from": {
              "type": "string",
              "description": "Representative id of the sender."
            },
            "to": {
              "type": "string",
              "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
            },
            "in_reply_to": {
              "type": "string",
              "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
            }
          },
          "required": [
            "card_digest",
            "encounter_id",
            "from",
            "mandate",
            "msg_id",
            "proposal",
            "protocol",
            "sent_at",
            "to",
            "type"
          ]
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "introduction_card_digest": {
              "$ref": "#/definitions/Digest",
              "description": "v0.5.0 (§4.1, C245): a claimed Shōkai introduction card, bound like vouch_digest. Both digests MUST be present when the Introduction carried `introduction_card`; a missing or mismatched digest is REQUEST_INCOMPLETE."
            },
            "introduction_claim_digest": {
              "$ref": "#/definitions/Digest"
            },
            "trust_receipts": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Signed%3CTrustReceipt%3E"
              },
              "description": "v0.5.0 (§6.9): receipts presented with the Shōkai visitor card, bound by their digests."
            },
            "trust_receipt_digests": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Digest"
              },
              "description": "v0.5.0 (§6.9, C244): MUST be present and equal to the digests of `trust_receipts` whenever `trust_receipts` is present; a missing or mismatched digest is REQUEST_INCOMPLETE."
            },
            "type": {
              "type": "string",
              "const": "invitation_request"
            },
            "card_digest": {
              "$ref": "#/definitions/Digest"
            },
            "vouch_digest": {
              "$ref": "#/definitions/Digest"
            },
            "mandate": {
              "$ref": "#/definitions/SignedMandate"
            },
            "context_response": {
              "$ref": "#/definitions/ContextResponse",
              "description": "v0.5.0 (§6.12, provisional): the visitor's owner's signed answer to a context request this place sent (\"before entry\"), on a retry after `not_now` / `CREDENTIAL_REQUIRED` or `POLICY_DENY`. Inside the request the representative signs; checked whole."
            },
            "proposal": {
              "$ref": "#/definitions/Proposal"
            },
            "meets_conditions_of": {
              "type": "string",
              "description": "Set when amending a request to meet the conditions of a prior response."
            },
            "consideration_ref": {
              "type": "string",
              "description": "Set when returning to use a seat or meet conditions from a ConsiderationOutcome."
            },
            "relationship_ref": {
              "type": "string",
              "description": "Continuation of an existing relationship (issued by the gatekeeper earlier)."
            },
            "prior_response_ref": {
              "type": "string",
              "description": "msg_id of the prior InvitationResponse this request answers (e.g. a revisit)."
            },
            "visit_receipt": {
              "type": "object",
              "properties": {
                "receipt_id": {
                  "type": "string"
                },
                "nonce": {
                  "type": "string"
                },
                "continuity_proof": {
                  "$ref": "#/definitions/Signature",
                  "description": "v0.2.1: required when the receipt is bound to a continuity key: that key's signature over JCS({encounter_id, receipt_id, representative_id})."
                }
              },
              "required": [
                "receipt_id",
                "nonce"
              ],
              "additionalProperties": false,
              "description": "D6: echo of a lobby VisitReceipt. Covered by this request's signature (the new key). Hosts link history only on a valid, unused, unexpired receipt."
            },
            "owner_consents": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Signed%3COwnerConsent%3E"
              },
              "description": "v0.2.1 (the Gatherings extension, D8): owner consents this request relies on, e.g. accept_house_rules to enter a gathering."
            },
            "allowance": {
              "$ref": "#/definitions/AllowancePresentation",
              "description": "v0.2.2 (§5.2): REQUIRED when `mandate.payload.under_allowance` is set."
            },
            "peer_invitation": {
              "type": "object",
              "properties": {
                "invitation": {
                  "$ref": "#/definitions/Signed%3CPeerInvitation%3E"
                },
                "acceptance": {
                  "$ref": "#/definitions/Signed%3COwnerConsent%3E"
                }
              },
              "required": [
                "invitation",
                "acceptance"
              ],
              "additionalProperties": false,
              "description": "v0.2.2 (the Peer meetings extension): in a pair place, the owner-to-owner invitation and the other owner's passkey acceptance."
            },
            "owner_link": {
              "$ref": "#/definitions/Signed%3COwnerLink%3E",
              "description": "v0.3.0-rc4 (§2.8): optional; this owner's per-place identity linked to another of theirs, for this place only."
            },
            "allowance_status": {
              "$ref": "#/definitions/Signed%3CAllowanceStatus%3E",
              "description": "v0.2.3 (§5.2): a fresh issuer-published AllowanceStatus the representative MAY staple; hosts otherwise fetch revocation_status."
            },
            "protocol": {
              "$ref": "#/definitions/ProtocolVersion"
            },
            "encounter_id": {
              "type": "string"
            },
            "msg_id": {
              "type": "string"
            },
            "sent_at": {
              "$ref": "#/definitions/Timestamp"
            },
            "from": {
              "type": "string",
              "description": "Representative id of the sender."
            },
            "to": {
              "type": "string",
              "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
            },
            "in_reply_to": {
              "type": "string",
              "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
            }
          },
          "required": [
            "card_digest",
            "encounter_id",
            "from",
            "introduction_card_digest",
            "introduction_claim_digest",
            "mandate",
            "msg_id",
            "proposal",
            "protocol",
            "sent_at",
            "to",
            "type"
          ]
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "introduction_card_digest": {
              "$ref": "#/definitions/Digest",
              "description": "v0.5.0 (§4.1, C245): a claimed Shōkai introduction card, bound like vouch_digest. Both digests MUST be present when the Introduction carried `introduction_card`; a missing or mismatched digest is REQUEST_INCOMPLETE."
            },
            "introduction_claim_digest": {
              "$ref": "#/definitions/Digest"
            },
            "trust_receipts": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Signed%3CTrustReceipt%3E"
              },
              "description": "v0.5.0 (§6.9): receipts presented with the Shōkai visitor card, bound by their digests."
            },
            "trust_receipt_digests": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Digest"
              },
              "description": "v0.5.0 (§6.9, C244): MUST be present and equal to the digests of `trust_receipts` whenever `trust_receipts` is present; a missing or mismatched digest is REQUEST_INCOMPLETE."
            },
            "type": {
              "type": "string",
              "const": "invitation_request"
            },
            "card_digest": {
              "$ref": "#/definitions/Digest"
            },
            "vouch_digest": {
              "$ref": "#/definitions/Digest"
            },
            "mandate": {
              "$ref": "#/definitions/SignedMandate"
            },
            "context_response": {
              "$ref": "#/definitions/ContextResponse",
              "description": "v0.5.0 (§6.12, provisional): the visitor's owner's signed answer to a context request this place sent (\"before entry\"), on a retry after `not_now` / `CREDENTIAL_REQUIRED` or `POLICY_DENY`. Inside the request the representative signs; checked whole."
            },
            "proposal": {
              "$ref": "#/definitions/Proposal"
            },
            "meets_conditions_of": {
              "type": "string",
              "description": "Set when amending a request to meet the conditions of a prior response."
            },
            "consideration_ref": {
              "type": "string",
              "description": "Set when returning to use a seat or meet conditions from a ConsiderationOutcome."
            },
            "relationship_ref": {
              "type": "string",
              "description": "Continuation of an existing relationship (issued by the gatekeeper earlier)."
            },
            "prior_response_ref": {
              "type": "string",
              "description": "msg_id of the prior InvitationResponse this request answers (e.g. a revisit)."
            },
            "visit_receipt": {
              "type": "object",
              "properties": {
                "receipt_id": {
                  "type": "string"
                },
                "nonce": {
                  "type": "string"
                },
                "continuity_proof": {
                  "$ref": "#/definitions/Signature",
                  "description": "v0.2.1: required when the receipt is bound to a continuity key: that key's signature over JCS({encounter_id, receipt_id, representative_id})."
                }
              },
              "required": [
                "receipt_id",
                "nonce"
              ],
              "additionalProperties": false,
              "description": "D6: echo of a lobby VisitReceipt. Covered by this request's signature (the new key). Hosts link history only on a valid, unused, unexpired receipt."
            },
            "owner_consents": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Signed%3COwnerConsent%3E"
              },
              "description": "v0.2.1 (the Gatherings extension, D8): owner consents this request relies on, e.g. accept_house_rules to enter a gathering."
            },
            "allowance": {
              "$ref": "#/definitions/AllowancePresentation",
              "description": "v0.2.2 (§5.2): REQUIRED when `mandate.payload.under_allowance` is set."
            },
            "peer_invitation": {
              "type": "object",
              "properties": {
                "invitation": {
                  "$ref": "#/definitions/Signed%3CPeerInvitation%3E"
                },
                "acceptance": {
                  "$ref": "#/definitions/Signed%3COwnerConsent%3E"
                }
              },
              "required": [
                "invitation",
                "acceptance"
              ],
              "additionalProperties": false,
              "description": "v0.2.2 (the Peer meetings extension): in a pair place, the owner-to-owner invitation and the other owner's passkey acceptance."
            },
            "owner_link": {
              "$ref": "#/definitions/Signed%3COwnerLink%3E",
              "description": "v0.3.0-rc4 (§2.8): optional; this owner's per-place identity linked to another of theirs, for this place only."
            },
            "allowance_status": {
              "$ref": "#/definitions/Signed%3CAllowanceStatus%3E",
              "description": "v0.2.3 (§5.2): a fresh issuer-published AllowanceStatus the representative MAY staple; hosts otherwise fetch revocation_status."
            },
            "protocol": {
              "$ref": "#/definitions/ProtocolVersion"
            },
            "encounter_id": {
              "type": "string"
            },
            "msg_id": {
              "type": "string"
            },
            "sent_at": {
              "$ref": "#/definitions/Timestamp"
            },
            "from": {
              "type": "string",
              "description": "Representative id of the sender."
            },
            "to": {
              "type": "string",
              "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
            },
            "in_reply_to": {
              "type": "string",
              "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
            }
          },
          "required": [
            "card_digest",
            "encounter_id",
            "from",
            "mandate",
            "msg_id",
            "proposal",
            "protocol",
            "sent_at",
            "to",
            "trust_receipt_digests",
            "trust_receipts",
            "type"
          ]
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "introduction_card_digest": {
              "$ref": "#/definitions/Digest",
              "description": "v0.5.0 (§4.1, C245): a claimed Shōkai introduction card, bound like vouch_digest. Both digests MUST be present when the Introduction carried `introduction_card`; a missing or mismatched digest is REQUEST_INCOMPLETE."
            },
            "introduction_claim_digest": {
              "$ref": "#/definitions/Digest"
            },
            "trust_receipts": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Signed%3CTrustReceipt%3E"
              },
              "description": "v0.5.0 (§6.9): receipts presented with the Shōkai visitor card, bound by their digests."
            },
            "trust_receipt_digests": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Digest"
              },
              "description": "v0.5.0 (§6.9, C244): MUST be present and equal to the digests of `trust_receipts` whenever `trust_receipts` is present; a missing or mismatched digest is REQUEST_INCOMPLETE."
            },
            "type": {
              "type": "string",
              "const": "invitation_request"
            },
            "card_digest": {
              "$ref": "#/definitions/Digest"
            },
            "vouch_digest": {
              "$ref": "#/definitions/Digest"
            },
            "mandate": {
              "$ref": "#/definitions/SignedMandate"
            },
            "context_response": {
              "$ref": "#/definitions/ContextResponse",
              "description": "v0.5.0 (§6.12, provisional): the visitor's owner's signed answer to a context request this place sent (\"before entry\"), on a retry after `not_now` / `CREDENTIAL_REQUIRED` or `POLICY_DENY`. Inside the request the representative signs; checked whole."
            },
            "proposal": {
              "$ref": "#/definitions/Proposal"
            },
            "meets_conditions_of": {
              "type": "string",
              "description": "Set when amending a request to meet the conditions of a prior response."
            },
            "consideration_ref": {
              "type": "string",
              "description": "Set when returning to use a seat or meet conditions from a ConsiderationOutcome."
            },
            "relationship_ref": {
              "type": "string",
              "description": "Continuation of an existing relationship (issued by the gatekeeper earlier)."
            },
            "prior_response_ref": {
              "type": "string",
              "description": "msg_id of the prior InvitationResponse this request answers (e.g. a revisit)."
            },
            "visit_receipt": {
              "type": "object",
              "properties": {
                "receipt_id": {
                  "type": "string"
                },
                "nonce": {
                  "type": "string"
                },
                "continuity_proof": {
                  "$ref": "#/definitions/Signature",
                  "description": "v0.2.1: required when the receipt is bound to a continuity key: that key's signature over JCS({encounter_id, receipt_id, representative_id})."
                }
              },
              "required": [
                "receipt_id",
                "nonce"
              ],
              "additionalProperties": false,
              "description": "D6: echo of a lobby VisitReceipt. Covered by this request's signature (the new key). Hosts link history only on a valid, unused, unexpired receipt."
            },
            "owner_consents": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Signed%3COwnerConsent%3E"
              },
              "description": "v0.2.1 (the Gatherings extension, D8): owner consents this request relies on, e.g. accept_house_rules to enter a gathering."
            },
            "allowance": {
              "$ref": "#/definitions/AllowancePresentation",
              "description": "v0.2.2 (§5.2): REQUIRED when `mandate.payload.under_allowance` is set."
            },
            "peer_invitation": {
              "type": "object",
              "properties": {
                "invitation": {
                  "$ref": "#/definitions/Signed%3CPeerInvitation%3E"
                },
                "acceptance": {
                  "$ref": "#/definitions/Signed%3COwnerConsent%3E"
                }
              },
              "required": [
                "invitation",
                "acceptance"
              ],
              "additionalProperties": false,
              "description": "v0.2.2 (the Peer meetings extension): in a pair place, the owner-to-owner invitation and the other owner's passkey acceptance."
            },
            "owner_link": {
              "$ref": "#/definitions/Signed%3COwnerLink%3E",
              "description": "v0.3.0-rc4 (§2.8): optional; this owner's per-place identity linked to another of theirs, for this place only."
            },
            "allowance_status": {
              "$ref": "#/definitions/Signed%3CAllowanceStatus%3E",
              "description": "v0.2.3 (§5.2): a fresh issuer-published AllowanceStatus the representative MAY staple; hosts otherwise fetch revocation_status."
            },
            "protocol": {
              "$ref": "#/definitions/ProtocolVersion"
            },
            "encounter_id": {
              "type": "string"
            },
            "msg_id": {
              "type": "string"
            },
            "sent_at": {
              "$ref": "#/definitions/Timestamp"
            },
            "from": {
              "type": "string",
              "description": "Representative id of the sender."
            },
            "to": {
              "type": "string",
              "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
            },
            "in_reply_to": {
              "type": "string",
              "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
            }
          },
          "required": [
            "card_digest",
            "encounter_id",
            "from",
            "introduction_card_digest",
            "introduction_claim_digest",
            "mandate",
            "msg_id",
            "proposal",
            "protocol",
            "sent_at",
            "to",
            "trust_receipt_digests",
            "trust_receipts",
            "type"
          ]
        }
      ],
      "description": "v0.5.0 (§6.9, C244; §4.1, red team phase 1, 2026-11-03, provisional): an invitation request whose paired members travel together (receipts with their digests; both introduction-card digests)."
    },
    "InvitationResponse": {
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "decision": {
              "type": "string",
              "const": "grant"
            },
            "seat": {
              "$ref": "#/definitions/SeatGrant",
              "description": "Step 6 (seating) rides on the grant when a seat is issued."
            },
            "reason_code": {
              "$ref": "#/definitions/ReasonCode",
              "description": "Present only if policy allows disclosure to this counterpart."
            },
            "relationship_ref": {
              "type": "string",
              "description": "Gatekeeper-issued handle for the persisted relationship (SPEC §9.1)."
            },
            "courtesy": {
              "$ref": "#/definitions/Courtesy"
            },
            "basis": {
              "$ref": "#/definitions/DecisionBasis"
            },
            "type": {
              "type": "string",
              "const": "invitation_response"
            },
            "reason_category": {
              "$ref": "#/definitions/DoorReasonCategory",
              "description": "v0.2.9 (§10): at an inbound door only, the optional kind reason for a door admission refusal."
            },
            "in_reply_to": {
              "type": "string",
              "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
            },
            "continuity": {
              "type": "object",
              "properties": {
                "receipt_id": {
                  "type": "string"
                },
                "linked": {
                  "type": "boolean"
                }
              },
              "required": [
                "receipt_id",
                "linked"
              ],
              "additionalProperties": false,
              "description": "v0.2.3 (§9.1): REQUIRED when the request echoed a visit_receipt. Says whether the host linked this visit to the earlier lobby visit (`linked: false` = treated as a first visit, e.g. an unproven bound receipt or a reused one)."
            },
            "context_request": {
              "$ref": "#/definitions/ContextRequest",
              "description": "v0.5.0 (§6.12, provisional): when the place requests context before entry, the request, on a `not_now` / `CREDENTIAL_REQUIRED` answer with retry `with_credential` [`context_response`]; in \"admit_then_request\", on the grant."
            },
            "protocol": {
              "$ref": "#/definitions/ProtocolVersion"
            },
            "encounter_id": {
              "type": "string"
            },
            "msg_id": {
              "type": "string"
            },
            "sent_at": {
              "$ref": "#/definitions/Timestamp"
            },
            "from": {
              "type": "string",
              "description": "Representative id of the sender."
            },
            "to": {
              "type": "string",
              "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
            }
          },
          "required": [
            "basis",
            "courtesy",
            "decision",
            "encounter_id",
            "from",
            "msg_id",
            "protocol",
            "sent_at",
            "to",
            "type"
          ]
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "decision": {
              "type": "string",
              "const": "deny"
            },
            "disposition": {
              "$ref": "#/definitions/Disposition"
            },
            "context_statement": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string"
                },
                "locale": {
                  "$ref": "#/definitions/Locale"
                }
              },
              "required": [
                "text",
                "locale"
              ],
              "additionalProperties": false,
              "description": "Honest situational statement, e.g. \"At this moment we are not onboarding…\"."
            },
            "revisit": {
              "$ref": "#/definitions/RevisitHint"
            },
            "retry": {
              "$ref": "#/definitions/Retry"
            },
            "readiness_requirements": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/ReadinessRequirement"
              },
              "description": "With not_now: exactly what is missing to be seated (unprepared visitor, SPEC lobby path)."
            },
            "reason_code": {
              "$ref": "#/definitions/ReasonCode",
              "description": "Present only if policy allows disclosure to this counterpart."
            },
            "relationship_ref": {
              "type": "string",
              "description": "Gatekeeper-issued handle for the persisted relationship (SPEC §9.1)."
            },
            "courtesy": {
              "$ref": "#/definitions/Courtesy"
            },
            "basis": {
              "$ref": "#/definitions/DecisionBasis"
            },
            "type": {
              "type": "string",
              "const": "invitation_response"
            },
            "reason_category": {
              "$ref": "#/definitions/DoorReasonCategory",
              "description": "v0.2.9 (§10): at an inbound door only, the optional kind reason for a door admission refusal."
            },
            "in_reply_to": {
              "type": "string",
              "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
            },
            "continuity": {
              "type": "object",
              "properties": {
                "receipt_id": {
                  "type": "string"
                },
                "linked": {
                  "type": "boolean"
                }
              },
              "required": [
                "receipt_id",
                "linked"
              ],
              "additionalProperties": false,
              "description": "v0.2.3 (§9.1): REQUIRED when the request echoed a visit_receipt. Says whether the host linked this visit to the earlier lobby visit (`linked: false` = treated as a first visit, e.g. an unproven bound receipt or a reused one)."
            },
            "context_request": {
              "$ref": "#/definitions/ContextRequest",
              "description": "v0.5.0 (§6.12, provisional): when the place requests context before entry, the request, on a `not_now` / `CREDENTIAL_REQUIRED` answer with retry `with_credential` [`context_response`]; in \"admit_then_request\", on the grant."
            },
            "protocol": {
              "$ref": "#/definitions/ProtocolVersion"
            },
            "encounter_id": {
              "type": "string"
            },
            "msg_id": {
              "type": "string"
            },
            "sent_at": {
              "$ref": "#/definitions/Timestamp"
            },
            "from": {
              "type": "string",
              "description": "Representative id of the sender."
            },
            "to": {
              "type": "string",
              "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
            }
          },
          "required": [
            "basis",
            "courtesy",
            "decision",
            "disposition",
            "encounter_id",
            "from",
            "msg_id",
            "protocol",
            "retry",
            "sent_at",
            "to",
            "type"
          ]
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "decision": {
              "type": "string",
              "const": "conditional"
            },
            "conditions": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Condition"
              },
              "minItems": 1,
              "description": "Non-empty. Meeting them = a new InvitationRequest with meets_conditions_of."
            },
            "retry": {
              "$ref": "#/definitions/Retry"
            },
            "reason_code": {
              "$ref": "#/definitions/ReasonCode",
              "description": "Present only if policy allows disclosure to this counterpart."
            },
            "relationship_ref": {
              "type": "string",
              "description": "Gatekeeper-issued handle for the persisted relationship (SPEC §9.1)."
            },
            "courtesy": {
              "$ref": "#/definitions/Courtesy"
            },
            "basis": {
              "$ref": "#/definitions/DecisionBasis"
            },
            "type": {
              "type": "string",
              "const": "invitation_response"
            },
            "reason_category": {
              "$ref": "#/definitions/DoorReasonCategory",
              "description": "v0.2.9 (§10): at an inbound door only, the optional kind reason for a door admission refusal."
            },
            "in_reply_to": {
              "type": "string",
              "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
            },
            "continuity": {
              "type": "object",
              "properties": {
                "receipt_id": {
                  "type": "string"
                },
                "linked": {
                  "type": "boolean"
                }
              },
              "required": [
                "receipt_id",
                "linked"
              ],
              "additionalProperties": false,
              "description": "v0.2.3 (§9.1): REQUIRED when the request echoed a visit_receipt. Says whether the host linked this visit to the earlier lobby visit (`linked: false` = treated as a first visit, e.g. an unproven bound receipt or a reused one)."
            },
            "context_request": {
              "$ref": "#/definitions/ContextRequest",
              "description": "v0.5.0 (§6.12, provisional): when the place requests context before entry, the request, on a `not_now` / `CREDENTIAL_REQUIRED` answer with retry `with_credential` [`context_response`]; in \"admit_then_request\", on the grant."
            },
            "protocol": {
              "$ref": "#/definitions/ProtocolVersion"
            },
            "encounter_id": {
              "type": "string"
            },
            "msg_id": {
              "type": "string"
            },
            "sent_at": {
              "$ref": "#/definitions/Timestamp"
            },
            "from": {
              "type": "string",
              "description": "Representative id of the sender."
            },
            "to": {
              "type": "string",
              "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
            }
          },
          "required": [
            "basis",
            "conditions",
            "courtesy",
            "decision",
            "encounter_id",
            "from",
            "msg_id",
            "protocol",
            "retry",
            "sent_at",
            "to",
            "type"
          ]
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "decision": {
              "type": "string",
              "const": "considering"
            },
            "consideration_ref": {
              "type": "string"
            },
            "routed_to": {
              "$ref": "#/definitions/ConsiderationRoute"
            },
            "response_by": {
              "$ref": "#/definitions/Timestamp",
              "description": "Outcome (or an explicit extension) is due by this time."
            },
            "reason_code": {
              "$ref": "#/definitions/ReasonCode",
              "description": "Present only if policy allows disclosure to this counterpart."
            },
            "relationship_ref": {
              "type": "string",
              "description": "Gatekeeper-issued handle for the persisted relationship (SPEC §9.1)."
            },
            "courtesy": {
              "$ref": "#/definitions/Courtesy"
            },
            "basis": {
              "$ref": "#/definitions/DecisionBasis"
            },
            "type": {
              "type": "string",
              "const": "invitation_response"
            },
            "reason_category": {
              "$ref": "#/definitions/DoorReasonCategory",
              "description": "v0.2.9 (§10): at an inbound door only, the optional kind reason for a door admission refusal."
            },
            "in_reply_to": {
              "type": "string",
              "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
            },
            "continuity": {
              "type": "object",
              "properties": {
                "receipt_id": {
                  "type": "string"
                },
                "linked": {
                  "type": "boolean"
                }
              },
              "required": [
                "receipt_id",
                "linked"
              ],
              "additionalProperties": false,
              "description": "v0.2.3 (§9.1): REQUIRED when the request echoed a visit_receipt. Says whether the host linked this visit to the earlier lobby visit (`linked: false` = treated as a first visit, e.g. an unproven bound receipt or a reused one)."
            },
            "context_request": {
              "$ref": "#/definitions/ContextRequest",
              "description": "v0.5.0 (§6.12, provisional): when the place requests context before entry, the request, on a `not_now` / `CREDENTIAL_REQUIRED` answer with retry `with_credential` [`context_response`]; in \"admit_then_request\", on the grant."
            },
            "protocol": {
              "$ref": "#/definitions/ProtocolVersion"
            },
            "encounter_id": {
              "type": "string"
            },
            "msg_id": {
              "type": "string"
            },
            "sent_at": {
              "$ref": "#/definitions/Timestamp"
            },
            "from": {
              "type": "string",
              "description": "Representative id of the sender."
            },
            "to": {
              "type": "string",
              "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
            }
          },
          "required": [
            "basis",
            "consideration_ref",
            "courtesy",
            "decision",
            "encounter_id",
            "from",
            "msg_id",
            "protocol",
            "response_by",
            "routed_to",
            "sent_at",
            "to",
            "type"
          ]
        }
      ],
      "description": "Step 5 (+6). Extend, decline, or conditionally extend the invitation."
    },
    "KeptItem": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "fits": {
          "type": "string"
        },
        "quote": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "title",
        "fits"
      ],
      "additionalProperties": false,
      "description": "§12.5 (C303, C306): one thing the representative kept from the place, with why it fits the brief. The quote is the place's text."
    },
    "LearnedMeaning": {
      "type": "object",
      "properties": {
        "note": {
          "$ref": "#/definitions/MeaningNote"
        },
        "learned_from": {
          "type": "object",
          "properties": {
            "principal_id": {
              "type": "string"
            },
            "artifact_digest": {
              "$ref": "#/definitions/Digest"
            }
          },
          "required": [
            "principal_id",
            "artifact_digest"
          ],
          "additionalProperties": false
        },
        "learned_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "explained_to_human": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            },
            "at": {
              "$ref": "#/definitions/Timestamp"
            }
          },
          "required": [
            "text",
            "locale",
            "at"
          ],
          "additionalProperties": false,
          "description": "The receiver's own explanation, as given to its human."
        }
      },
      "required": [
        "note",
        "learned_from",
        "learned_at"
      ],
      "additionalProperties": false,
      "description": "A meaning note learned into a receiver's local relationship memory."
    },
    "Lesson": {
      "type": "object",
      "properties": {
        "lesson_id": {
          "type": "string"
        },
        "teacher": {
          "type": "object",
          "properties": {
            "representative_id": {
              "type": "string"
            },
            "principal_id": {
              "type": "string"
            }
          },
          "required": [
            "representative_id",
            "principal_id"
          ],
          "additionalProperties": false
        },
        "learner": {
          "type": "object",
          "properties": {
            "representative_id": {
              "type": "string"
            },
            "principal_id": {
              "type": "string"
            }
          },
          "required": [
            "representative_id",
            "principal_id"
          ],
          "additionalProperties": false
        },
        "topic": {
          "type": "string"
        },
        "content": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            },
            "meaning_notes": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/MeaningNote"
              }
            }
          },
          "required": [
            "text",
            "locale"
          ],
          "additionalProperties": false
        },
        "provenance": {
          "type": "object",
          "properties": {
            "authored_by": {
              "type": "string"
            },
            "derived_from": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "authored_by",
            "derived_from"
          ],
          "additionalProperties": false,
          "description": "Where the lesson came from; the teacher's reputation stays linked to it."
        },
        "consent_refs": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Digest"
          },
          "description": "Both owners' consents (digests of signed approvals)."
        },
        "excludes_private_memory": {
          "type": "boolean",
          "const": true,
          "description": "Owner's private memory is excluded by default."
        },
        "issued_at": {
          "$ref": "#/definitions/Timestamp"
        }
      },
      "required": [
        "lesson_id",
        "teacher",
        "learner",
        "topic",
        "content",
        "provenance",
        "consent_refs",
        "excludes_private_memory",
        "issued_at"
      ],
      "additionalProperties": false,
      "description": "A signed lesson in an apprenticeship visit (purpose \"teaching\")."
    },
    "LessonAdaptation": {
      "type": "object",
      "properties": {
        "lesson_id": {
          "type": "string"
        },
        "lesson_digest": {
          "$ref": "#/definitions/Digest"
        },
        "adapted": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            }
          },
          "required": [
            "text",
            "locale"
          ],
          "additionalProperties": false
        },
        "changes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "adopted_at": {
          "$ref": "#/definitions/Timestamp"
        }
      },
      "required": [
        "lesson_id",
        "lesson_digest",
        "adapted",
        "changes",
        "adopted_at"
      ],
      "additionalProperties": false,
      "description": "Learner-side record: lessons are adapted, never copied verbatim."
    },
    "LessonMessage": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "const": "lesson"
        },
        "seat_id": {
          "type": "string"
        },
        "lesson": {
          "$ref": "#/definitions/Signed%3CLesson%3E"
        },
        "protocol": {
          "$ref": "#/definitions/ProtocolVersion"
        },
        "encounter_id": {
          "type": "string"
        },
        "msg_id": {
          "type": "string"
        },
        "sent_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "from": {
          "type": "string",
          "description": "Representative id of the sender."
        },
        "to": {
          "type": "string",
          "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
        },
        "in_reply_to": {
          "type": "string",
          "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
        }
      },
      "required": [
        "encounter_id",
        "from",
        "lesson",
        "msg_id",
        "protocol",
        "seat_id",
        "sent_at",
        "to",
        "type"
      ],
      "patternProperties": {
        "^x-": {}
      }
    },
    "LimitNotice": {
      "type": "object",
      "properties": {
        "place": {
          "type": "string"
        },
        "current": {
          "$ref": "#/definitions/Money"
        },
        "limit": {
          "$ref": "#/definitions/Money"
        },
        "pace": {
          "type": "string"
        },
        "active_bidders": {
          "type": "number"
        },
        "at": {
          "$ref": "#/definitions/Timestamp"
        }
      },
      "required": [
        "place",
        "current",
        "limit",
        "at"
      ],
      "additionalProperties": false,
      "description": "v0.5.0 (§7.3): one brief notice before the limit, when the owner set notify_at. Never sent to the place."
    },
    "LimitRequest": {
      "type": "object",
      "properties": {
        "place": {
          "type": "string"
        },
        "hold_id": {
          "type": "string"
        },
        "limit": {
          "$ref": "#/definitions/Money"
        },
        "current": {
          "$ref": "#/definitions/Money"
        },
        "proposed": {
          "$ref": "#/definitions/Money"
        },
        "expires_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "seat": {
          "type": "object",
          "properties": {
            "limit": {
              "$ref": "#/definitions/Money"
            },
            "current": {
              "$ref": "#/definitions/Money"
            }
          },
          "required": [
            "limit",
            "current"
          ],
          "additionalProperties": false,
          "description": "Per-visit figures (same as over_limit.seat)."
        },
        "mandate": {
          "type": "object",
          "properties": {
            "limit": {
              "$ref": "#/definitions/Money"
            },
            "current": {
              "$ref": "#/definitions/Money"
            }
          },
          "required": [
            "limit",
            "current"
          ],
          "additionalProperties": false,
          "description": "Whole-mandate figures (same as over_limit.mandate)."
        }
      },
      "required": [
        "place",
        "hold_id",
        "limit",
        "current",
        "proposed",
        "expires_at",
        "seat",
        "mandate"
      ],
      "additionalProperties": false,
      "description": "v0.5.0 (§7.3): the call home for an over-limit hold. Closed shape, no free text; the figures are the hold's over_limit. `place` is the place's verified identifier (its principal DID; for did:web, its domain), never a display name (§2.1, C199). `expires_at` is the hold's deadline."
    },
    "Limits": {
      "type": "object",
      "properties": {
        "max_amount": {
          "$ref": "#/definitions/Money"
        },
        "max_amount_scope": {
          "type": "string",
          "enum": [
            "per_seat",
            "per_operation"
          ],
          "description": "v0.2.1 (§7.2): \"per_seat\" (default) caps the total over the seat's life; \"per_operation\" caps each act. v0.2.8 (§7.2, P10): \"per_operation\" is an explicit opt-in and never lifts the session-wide cap: the total over the whole seat (one visit, across every payment_ref) is still capped by `session_max_amount`, which defaults to `max_amount`."
        },
        "session_max_amount": {
          "$ref": "#/definitions/Money",
          "description": "v0.2.8 (§7.2, P10): session-wide spend cap for a `per_operation` seat. Absent = `max_amount` (the default). Ignored under per_seat."
        },
        "max_operations": {
          "type": "number"
        },
        "rate_per_hour": {
          "type": "number"
        },
        "data_classes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "max_session_s": {
          "type": "number",
          "description": "Max session duration in seconds."
        },
        "booking": {
          "$ref": "#/definitions/BookingLimits",
          "description": "v0.5.0 (§7.4): what a reservation may book. REQUIRED on a mandate for purpose \"reservation\"; checked by code at every reservation act."
        }
      },
      "additionalProperties": false,
      "patternProperties": {
        "^x-": {}
      }
    },
    "LobbyBriefing": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "const": "lobby_briefing"
        },
        "about": {
          "$ref": "#/definitions/Courtesy"
        },
        "how_this_place_works": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            }
          },
          "required": [
            "text",
            "locale"
          ],
          "additionalProperties": false,
          "patternProperties": {
            "^x-": {}
          }
        },
        "seeking": {
          "$ref": "#/definitions/SignedSeekingDeclaration"
        },
        "onboarding_url": {
          "type": "string",
          "description": "v0.2.1: REQUIRED. Where the owner onboards (plain questions first, §3.3)."
        },
        "visit_receipt": {
          "$ref": "#/definitions/VisitReceipt",
          "description": "Optional in the core since v0.3.0-rc1 (D19). D6 one-time receipt; a bearer secret. A place implementing the Visit receipts extension carries one in every briefing."
        },
        "purposes": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/PurposeDescription"
          },
          "description": "v0.2.1 (§5.1): the purposes this place serves; every `x-` code it accepts MUST be described here."
        },
        "spec_ref": {
          "$ref": "#/definitions/SpecRef",
          "description": "v0.2.3 (§3.3): REQUIRED. Which protocol text this place follows."
        },
        "inbox": {
          "type": "string",
          "description": "v0.2.4 (§11.1): REQUIRED over HTTP. The inbox address where late messages for this visitor are held."
        },
        "actions": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/PlaceAction"
          },
          "description": "v0.2.3 (§3.3): REQUIRED. The actions this place offers, per purpose (same as its listing)."
        },
        "templates": {
          "$ref": "#/definitions/PlaceTemplates",
          "description": "v0.2.3 (§3.3): REQUIRED. Fill-in templates (unsigned skeletons) for what this place needs. `<…>` marks a value the owner or representative fills in; a template is never a credential and never gate input. v0.2.4 (§3.3): templates are not protocol values: they are exempt from timestamp, amount and digest validation."
        },
        "conduct_rules": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ConductRule"
          },
          "description": "v0.5.0 (§2.3, C246): the place's conduct rules, served before seating. REQUIRED when the house config carries policy.conduct_rules: a door that has them MUST serve them in its lobby briefing. Not sent in reply to shokai/0.3."
        },
        "third_party_classifiers": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ThirdPartyClassifier"
          },
          "description": "v0.5.0 (§6.10, C250): the named outside classifiers that receive visitor content (policy.third_party_classifiers). Not sent in reply to shokai/0.3."
        },
        "model_providers": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ModelProvider"
          },
          "description": "v0.5.0 (§6.10, C250): the outside services that run the host representative's model (policy.model_providers). Not sent in reply to shokai/0.3."
        },
        "accepted_tags": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "v0.5.0 (§11.1, C254): the wire tags this place accepts, e.g. [\"shokai/0.5\", \"shokai/0.3\"] during the window. Not sent in reply to shokai/0.3."
        },
        "protocol": {
          "$ref": "#/definitions/ProtocolVersion"
        },
        "encounter_id": {
          "type": "string"
        },
        "msg_id": {
          "type": "string"
        },
        "sent_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "from": {
          "type": "string",
          "description": "Representative id of the sender."
        },
        "to": {
          "type": "string",
          "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
        },
        "in_reply_to": {
          "type": "string",
          "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
        }
      },
      "required": [
        "about",
        "encounter_id",
        "from",
        "how_this_place_works",
        "inbox",
        "msg_id",
        "onboarding_url",
        "protocol",
        "sent_at",
        "spec_ref",
        "templates",
        "to",
        "type"
      ],
      "description": "Lobby path: the host introduces itself to a visitor that is not (yet) able to be seated. Grants nothing. `about` is courtesy (untrusted for the receiver).",
      "patternProperties": {
        "^x-": {}
      }
    },
    "LobbyBriefingV050": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "actions": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/PlaceAction"
          },
          "description": "v0.2.3 (§3.3): REQUIRED. The actions this place offers, per purpose (same as its listing)."
        },
        "conduct_rules": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ConductRule"
          },
          "description": "v0.5.0 (§2.3, C246): the place's conduct rules, served before seating. REQUIRED when the house config carries policy.conduct_rules: a door that has them MUST serve them in its lobby briefing. Not sent in reply to shokai/0.3."
        },
        "type": {
          "type": "string",
          "const": "lobby_briefing"
        },
        "about": {
          "$ref": "#/definitions/Courtesy"
        },
        "how_this_place_works": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            }
          },
          "required": [
            "text",
            "locale"
          ],
          "additionalProperties": false
        },
        "seeking": {
          "$ref": "#/definitions/SignedSeekingDeclaration"
        },
        "onboarding_url": {
          "type": "string",
          "description": "v0.2.1: REQUIRED. Where the owner onboards (plain questions first, §3.3)."
        },
        "visit_receipt": {
          "$ref": "#/definitions/VisitReceipt",
          "description": "Optional in the core since v0.3.0-rc1 (D19). D6 one-time receipt; a bearer secret. A place implementing the Visit receipts extension carries one in every briefing."
        },
        "purposes": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/PurposeDescription"
          },
          "description": "v0.2.1 (§5.1): the purposes this place serves; every `x-` code it accepts MUST be described here."
        },
        "spec_ref": {
          "$ref": "#/definitions/SpecRef",
          "description": "v0.2.3 (§3.3): REQUIRED. Which protocol text this place follows."
        },
        "inbox": {
          "type": "string",
          "description": "v0.2.4 (§11.1): REQUIRED over HTTP. The inbox address where late messages for this visitor are held."
        },
        "templates": {
          "$ref": "#/definitions/PlaceTemplates",
          "description": "v0.2.3 (§3.3): REQUIRED. Fill-in templates (unsigned skeletons) for what this place needs. `<…>` marks a value the owner or representative fills in; a template is never a credential and never gate input. v0.2.4 (§3.3): templates are not protocol values: they are exempt from timestamp, amount and digest validation."
        },
        "third_party_classifiers": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ThirdPartyClassifier"
          },
          "description": "v0.5.0 (§6.10, C250): the named outside classifiers that receive visitor content (policy.third_party_classifiers). Not sent in reply to shokai/0.3."
        },
        "model_providers": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ModelProvider"
          },
          "description": "v0.5.0 (§6.10, C250): the outside services that run the host representative's model (policy.model_providers). Not sent in reply to shokai/0.3."
        },
        "accepted_tags": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "v0.5.0 (§11.1, C254): the wire tags this place accepts, e.g. [\"shokai/0.5\", \"shokai/0.3\"] during the window. Not sent in reply to shokai/0.3."
        },
        "protocol": {
          "$ref": "#/definitions/ProtocolVersion"
        },
        "encounter_id": {
          "type": "string"
        },
        "msg_id": {
          "type": "string"
        },
        "sent_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "from": {
          "type": "string",
          "description": "Representative id of the sender."
        },
        "to": {
          "type": "string",
          "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
        },
        "in_reply_to": {
          "type": "string",
          "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
        }
      },
      "required": [
        "about",
        "actions",
        "conduct_rules",
        "encounter_id",
        "from",
        "how_this_place_works",
        "inbox",
        "msg_id",
        "onboarding_url",
        "protocol",
        "sent_at",
        "spec_ref",
        "templates",
        "to",
        "type"
      ],
      "description": "v0.5.0 (§6.12, red team phase 1, 2026-11-03, provisional): a lobby briefing whose actions and conduct rules are always present."
    },
    "Locale": {
      "type": "string",
      "description": "BCP 47 language tag, e.g. \"en-US\", \"ja-JP\"."
    },
    "Mandate": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "mandate_id": {
          "type": "string"
        },
        "principal_id": {
          "type": "string"
        },
        "representative_id": {
          "type": "string"
        },
        "card_id": {
          "type": "string",
          "description": "Card the mandate was issued under; scope MUST be within card.mandate_scope."
        },
        "purpose": {
          "type": "object",
          "properties": {
            "code": {
              "$ref": "#/definitions/PurposeCode"
            },
            "statement": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            },
            "meaning_notes": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/MeaningNote"
              }
            }
          },
          "required": [
            "code",
            "statement",
            "locale"
          ],
          "additionalProperties": false,
          "patternProperties": {
            "^x-": {}
          }
        },
        "allowed_actions": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "limits": {
          "$ref": "#/definitions/Limits"
        },
        "counterparties": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Optional counterparty restriction, e.g. only ExampleBank."
        },
        "valid_from": {
          "$ref": "#/definitions/Timestamp"
        },
        "expires_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "under_allowance": {
          "type": "object",
          "properties": {
            "allowance_id": {
              "type": "string"
            },
            "allowance_digest": {
              "$ref": "#/definitions/Digest"
            },
            "grant_digest": {
              "$ref": "#/definitions/Digest"
            }
          },
          "required": [
            "allowance_id",
            "allowance_digest",
            "grant_digest"
          ],
          "additionalProperties": false,
          "description": "v0.2.2 (D11, §5.2): set when the representative issued this mandate itself, inside a standing owner Allowance. Such a mandate is signed by the REPRESENTATIVE's key and is valid only with the matching AllowancePresentation.",
          "patternProperties": {
            "^x-": {}
          }
        },
        "customer_link": {
          "type": "object",
          "properties": {
            "link_id": {
              "type": "string"
            },
            "link_digest": {
              "$ref": "#/definitions/Digest"
            }
          },
          "required": [
            "link_id",
            "link_digest"
          ],
          "additionalProperties": false,
          "description": "v0.4.0 (§5.4): the customer link this errand is under, at an institution. The owner's signature ties the errand to the link.",
          "patternProperties": {
            "^x-": {}
          }
        },
        "supersedes": {
          "type": "object",
          "properties": {
            "mandate_id": {
              "type": "string"
            },
            "mandate_digest": {
              "$ref": "#/definitions/Digest"
            },
            "hold": {
              "type": "object",
              "properties": {
                "hold_id": {
                  "type": "string"
                },
                "act_digest": {
                  "$ref": "#/definitions/Digest"
                }
              },
              "required": [
                "hold_id",
                "act_digest"
              ],
              "additionalProperties": false,
              "patternProperties": {
                "^x-": {}
              }
            }
          },
          "required": [
            "mandate_id",
            "mandate_digest"
          ],
          "additionalProperties": false,
          "description": "v0.5.0 (§5.1, §7.3): the mandate this one replaces for the same errand, to raise a limit. Counted as one ledger. `hold` is REQUIRED when the mandate answers an over-limit hold: the hold's id and the held act's payload_digest (as `act_held` stated it), so the owner's signature releases that one act and no other.",
          "patternProperties": {
            "^x-": {}
          }
        },
        "shown_to_owner": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            }
          },
          "required": [
            "text",
            "locale"
          ],
          "additionalProperties": false,
          "description": "v0.5.0 (§5.1): the plain-language summary the owner read before signing, inside the signature. REQUIRED on a superseding mandate.",
          "patternProperties": {
            "^x-": {}
          }
        },
        "crit": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "allowed_actions",
        "card_id",
        "expires_at",
        "limits",
        "mandate_id",
        "principal_id",
        "purpose",
        "representative_id",
        "valid_from"
      ],
      "patternProperties": {
        "^x-": {}
      }
    },
    "MeaningNote": {
      "type": "object",
      "properties": {
        "term": {
          "type": "string",
          "description": "The term exactly as written, kept in the original, e.g. \"おもてなし\", \"saudade\"."
        },
        "source_locale": {
          "$ref": "#/definitions/Locale"
        },
        "literal_gloss": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            }
          },
          "required": [
            "text",
            "locale"
          ],
          "additionalProperties": false,
          "description": "Word-for-word gloss; known to be incomplete.",
          "patternProperties": {
            "^x-": {}
          }
        },
        "intended_meaning": {
          "type": "array",
          "minItems": 1,
          "items": [
            {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string"
                },
                "locale": {
                  "$ref": "#/definitions/Locale"
                }
              },
              "required": [
                "text",
                "locale"
              ],
              "additionalProperties": false
            }
          ],
          "additionalItems": {
            "type": "object",
            "properties": {
              "text": {
                "type": "string"
              },
              "locale": {
                "$ref": "#/definitions/Locale"
              }
            },
            "required": [
              "text",
              "locale"
            ],
            "additionalProperties": false
          },
          "description": "Plain, idiom-free description of what is meant. The first entry is the author's own (principal or steward) and is authoritative; later entries are aids."
        },
        "concept_tags": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Optional machine-readable concept tags, e.g. [\"anticipatory_service\"]."
        },
        "usage_context": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            }
          },
          "required": [
            "text",
            "locale"
          ],
          "additionalProperties": false,
          "description": "Where and how the term applies here.",
          "patternProperties": {
            "^x-": {}
          }
        },
        "human_explanation_hint": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            }
          },
          "required": [
            "text",
            "locale"
          ],
          "additionalProperties": false,
          "description": "How a receiver should explain it to its human.",
          "patternProperties": {
            "^x-": {}
          }
        },
        "confidence": {
          "type": "object",
          "properties": {
            "value": {
              "type": "number"
            },
            "source": {
              "type": "string",
              "enum": [
                "principal",
                "steward",
                "receiver_inferred"
              ]
            }
          },
          "required": [
            "value",
            "source"
          ],
          "additionalProperties": false,
          "description": "0..1, with who set it.",
          "patternProperties": {
            "^x-": {}
          }
        }
      },
      "required": [
        "term",
        "source_locale",
        "intended_meaning",
        "usage_context",
        "human_explanation_hint",
        "confidence"
      ],
      "additionalProperties": false,
      "description": "The intended meaning of a term, so meaning travels even when words don't. Authoritative meaning = intended_meaning + machine fields, never a translated string.",
      "patternProperties": {
        "^x-": {}
      }
    },
    "MinProof": {
      "type": "object",
      "properties": {
        "action": {
          "type": "string"
        },
        "target": {
          "type": "string"
        },
        "level": {
          "$ref": "#/definitions/ProofLevel"
        }
      },
      "required": [
        "action",
        "target",
        "level"
      ],
      "additionalProperties": false,
      "description": "v0.2.1 (§2.5): a policy proof requirement. target = \"imprint.<group>\" or \"claim.<area>\"; any one item at `level` satisfies it."
    },
    "MisconductCode": {
      "type": "string",
      "enum": [
        "purpose_misrepresentation",
        "gate_probing",
        "seat_overreach",
        "vouch_misuse",
        "manipulation",
        "revisit_violation",
        "post_seat_leakage",
        "conditional_inducement",
        "manipulative_pressure"
      ]
    },
    "MisconductEffect": {
      "type": "object",
      "properties": {
        "party_id": {
          "type": "string"
        },
        "party_role": {
          "type": "string",
          "enum": [
            "visitor_principal",
            "representative",
            "introducer"
          ]
        },
        "scope": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/PurposeCode"
          },
          "description": "Purposes whose standing is affected (an introducer: within its vouch scope)."
        },
        "standing_change": {
          "type": "string",
          "enum": [
            "noted",
            "reduced",
            "suspended"
          ]
        },
        "until": {
          "$ref": "#/definitions/Timestamp",
          "description": "v0.2.1: when the standing change ends (D1: reduced 90 days, suspended 180 days; halved by a prompt revocation)."
        },
        "disposition": {
          "$ref": "#/definitions/Disposition"
        },
        "retry": {
          "$ref": "#/definitions/Retry"
        }
      },
      "required": [
        "party_id",
        "party_role",
        "scope",
        "standing_change"
      ],
      "additionalProperties": false,
      "description": "Local consequence at the issuing gatekeeper only (v0.1)."
    },
    "MisconductFinding": {
      "type": "object",
      "properties": {
        "code": {
          "$ref": "#/definitions/MisconductCode"
        },
        "severity": {
          "$ref": "#/definitions/MisconductSeverity"
        },
        "observed_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "evidence_digest": {
          "$ref": "#/definitions/Digest",
          "description": "Digest of the audit evidence (messages, act results) behind the finding."
        }
      },
      "required": [
        "code",
        "severity",
        "observed_at",
        "evidence_digest"
      ],
      "additionalProperties": false
    },
    "MisconductNotice": {
      "type": "object",
      "properties": {
        "notice_id": {
          "type": "string"
        },
        "issuer": {
          "type": "object",
          "properties": {
            "principal_id": {
              "type": "string",
              "description": "v0.2.1 (§2.1): a DID. did:key (Ed25519) or did:jwk (P-256 passkey) now; did:web for organizations."
            },
            "display_name": {
              "type": "string"
            }
          },
          "required": [
            "principal_id",
            "display_name"
          ],
          "additionalProperties": false
        },
        "subject": {
          "type": "object",
          "properties": {
            "representative_id": {
              "type": "string"
            },
            "card_digest": {
              "$ref": "#/definitions/Digest"
            },
            "principal_id": {
              "type": "string"
            }
          },
          "required": [
            "representative_id",
            "card_digest",
            "principal_id"
          ],
          "additionalProperties": false
        },
        "encounter_id": {
          "type": "string"
        },
        "relationship_ref": {
          "type": "string"
        },
        "vouch_chain": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "vouch_id": {
                "type": "string"
              },
              "introducer_id": {
                "type": "string"
              }
            },
            "required": [
              "vouch_id",
              "introducer_id"
            ],
            "additionalProperties": false
          },
          "description": "Vouches relied on, nearest first (follows upstream_vouch_id)."
        },
        "findings": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/MisconductFinding"
          }
        },
        "findings_withheld": {
          "type": "boolean"
        },
        "effects": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/MisconductEffect"
          }
        },
        "issued_at": {
          "$ref": "#/definitions/Timestamp"
        }
      },
      "required": [
        "notice_id",
        "issuer",
        "subject",
        "encounter_id",
        "vouch_chain",
        "effects",
        "issued_at"
      ],
      "additionalProperties": false,
      "description": "Signed gatekeeper record sent to the visitor's principal and to every introducer in the vouch chain. If gate_probing is suspected, the copy sent toward the visitor's principal MUST omit `findings` (`findings_withheld: true`)."
    },
    "MisconductNoticeMessage": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "const": "misconduct_notice"
        },
        "notice": {
          "$ref": "#/definitions/Signed%3CMisconductNotice%3E"
        },
        "protocol": {
          "$ref": "#/definitions/ProtocolVersion"
        },
        "encounter_id": {
          "type": "string"
        },
        "msg_id": {
          "type": "string"
        },
        "sent_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "from": {
          "type": "string",
          "description": "Representative id of the sender."
        },
        "to": {
          "type": "string",
          "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
        },
        "in_reply_to": {
          "type": "string",
          "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
        }
      },
      "required": [
        "encounter_id",
        "from",
        "msg_id",
        "notice",
        "protocol",
        "sent_at",
        "to",
        "type"
      ],
      "description": "v0.2.1: carries a header like every message; `to` is the visitor's principal or one introducer. The inner notice is signed by the host PRINCIPAL key.",
      "patternProperties": {
        "^x-": {}
      }
    },
    "MisconductSeverity": {
      "type": "string",
      "enum": [
        "minor",
        "serious",
        "severe"
      ]
    },
    "ModelProvider": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "A name a visitor can look up: the service's name or domain. Never \"*\"."
        },
        "purpose": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            }
          },
          "required": [
            "text",
            "locale"
          ],
          "additionalProperties": false,
          "description": "One sentence in the place's words: what the service runs (for example \"Runs the host representative's model.\").",
          "patternProperties": {
            "^x-": {}
          }
        },
        "jurisdiction": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "ISO 3166-1 alpha-2 codes of the countries where it processes visitor content. At least one."
        },
        "retention_days": {
          "type": "number",
          "description": "How long the service keeps visitor content, 0 to 90 days."
        },
        "role": {
          "type": "string",
          "enum": [
            "processor",
            "independent"
          ],
          "description": "\"processor\": acts only on the place's instructions; \"independent\": otherwise."
        }
      },
      "required": [
        "name",
        "purpose",
        "jurisdiction",
        "retention_days"
      ],
      "additionalProperties": false,
      "patternProperties": {
        "^x-": {}
      }
    },
    "Money": {
      "type": "object",
      "properties": {
        "value": {
          "type": "string"
        },
        "currency": {
          "type": "string"
        }
      },
      "required": [
        "value",
        "currency"
      ],
      "additionalProperties": false,
      "description": "v0.2.1 (D10, §5.1): a money amount. `value` MUST match ^(0|[1-9][0-9]*)(\\.[0-9]{1,6})?$ (ASCII digits, \".\" as decimal separator, no grouping, no sign, no exponent). `currency` MUST be an ISO 4217 alphabetic code."
    },
    "MustUnderstand": {
      "type": "object",
      "properties": {
        "crit": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false,
      "description": "v0.5.0 (Conventions, C289): must-understand members. Any signed payload MAY carry `crit`: a non-empty array of distinct member names (dotted paths for nested members, e.g. \"supersedes.hold\"), each naming a member the payload carries. A receiver that doesn't implement one refuses the whole artefact (deny / not_now / UNSUPPORTED_CRITICAL). Members not in `crit` stay ignorable."
    },
    "NeverAppeal": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string"
        },
        "place": {
          "type": "string"
        }
      },
      "required": [
        "url",
        "place"
      ],
      "additionalProperties": false,
      "description": "v0.5.1 (§9.3, C288): the appeal path a binding `never` names: the place's contact or appeal URL, and the place's principal the appeal is addressed to. What the place does with an appeal is its own decision; sending one lifts nothing by itself.",
      "patternProperties": {
        "^x-": {}
      }
    },
    "NeverDiscloseCode": {
      "type": "string",
      "enum": [
        "back_office",
        "owner_personal_details",
        "other_visitors"
      ]
    },
    "NonSpendingPurpose": {
      "type": "string",
      "enum": [
        "invitation",
        "introduction",
        "visitation",
        "gathering",
        "presentation",
        "gift"
      ],
      "description": "v0.2.2 (D11, §5.1): purposes that MUST NOT require a spending allowance; a mandate for one of them carries no max_amount. v0.2.3: \"gathering\" (attending a gathering) is also non-spending."
    },
    "Offer": {
      "type": "object",
      "properties": {
        "offer_id": {
          "type": "string"
        },
        "kind": {
          "type": "string",
          "enum": [
            "presentation",
            "invitation",
            "gift"
          ]
        },
        "item": {
          "type": "string"
        },
        "category": {
          "$ref": "#/definitions/DoorCategory"
        },
        "description": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            },
            "format": {
              "type": "string",
              "enum": [
                "text",
                "html"
              ]
            }
          },
          "required": [
            "text",
            "locale"
          ],
          "additionalProperties": false,
          "description": "Free text, untrusted data. format \"html\" allows markup; the door strips or flags hidden parts (ContentFlags)."
        },
        "context": {
          "type": "object",
          "properties": {
            "door": {
              "type": "string"
            },
            "matches_categories": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/DoorCategory"
              }
            },
            "via_vouch": {
              "type": "string"
            }
          },
          "required": [
            "door",
            "matches_categories"
          ],
          "additionalProperties": false,
          "description": "REQUIRED for an invitation: why this door. v0.2.10 (P16 Part A): a presentation SHOULD carry it too; when present on any offer it MUST match this door (a mismatch is a conduct signal, §10)."
        },
        "campaign_id": {
          "type": "string",
          "description": "v0.2.10 (§10, P16 Part A): the brand's own label for the campaign this offer belongs to. Offers sharing a campaign_id, or that the door finds to be variants of one pitch, are one campaign for caps, however they are worded."
        },
        "remaining": {
          "type": "number",
          "description": "v0.2.10 (§10, P16 Part A): how many are left, when the offer is genuinely limited. Scarcity in prose is backed only by this."
        },
        "value": {
          "$ref": "#/definitions/Money"
        },
        "valid_until": {
          "$ref": "#/definitions/Timestamp"
        },
        "needs_from_owner": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/OfferString"
          },
          "description": "Everything the offer asks of the owner, declared up front (presentations and invitations)."
        },
        "strings": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/OfferString"
          },
          "description": "Gifts: every condition attached, declared up front."
        }
      },
      "required": [
        "offer_id",
        "kind",
        "item",
        "category",
        "valid_until",
        "needs_from_owner"
      ],
      "additionalProperties": false,
      "description": "v0.2.9 (§10): one structured offer, carried as the `offer` argument of door.present / door.invite / door.gift."
    },
    "OfferOutcome": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "const": "offer_outcome"
        },
        "in_reply_to": {
          "type": "string",
          "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
        },
        "seat_id": {
          "type": "string"
        },
        "offer_id": {
          "type": "string"
        },
        "offer_digest": {
          "$ref": "#/definitions/Digest"
        },
        "outcome": {
          "$ref": "#/definitions/OfferOutcomeCode"
        },
        "claim_ticket": {
          "type": "string",
          "description": "Accepted gift only: opaque, single use, pairwise. Never an address."
        },
        "retry": {
          "$ref": "#/definitions/Retry"
        },
        "relationship_ref": {
          "type": "string",
          "description": "Pairwise per brand (§10)."
        },
        "reason_category": {
          "$ref": "#/definitions/DoorReasonCategory",
          "description": "v0.2.9 (§10): optional kind reason; never on accepted or kept_for_later; on declined_reported only if the owner opted in."
        },
        "courtesy": {
          "$ref": "#/definitions/Courtesy"
        },
        "protocol": {
          "$ref": "#/definitions/ProtocolVersion"
        },
        "encounter_id": {
          "type": "string"
        },
        "msg_id": {
          "type": "string"
        },
        "sent_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "from": {
          "type": "string",
          "description": "Representative id of the sender."
        },
        "to": {
          "type": "string",
          "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
        }
      },
      "required": [
        "courtesy",
        "encounter_id",
        "from",
        "in_reply_to",
        "msg_id",
        "offer_digest",
        "offer_id",
        "outcome",
        "protocol",
        "relationship_ref",
        "seat_id",
        "sent_at",
        "to",
        "type"
      ],
      "patternProperties": {
        "^x-": {}
      }
    },
    "OfferOutcomeCode": {
      "type": "string",
      "enum": [
        "accepted",
        "kept_for_later",
        "declined",
        "declined_reported"
      ],
      "description": "v0.2.9 (§10): the door's answer to one offer. The brand sees only the code (and a claim ticket for an accepted gift)."
    },
    "OfferPresence": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "offer_presence"
        },
        "domain_id": {
          "type": "string",
          "description": "Stable product / façade id, e.g. \"reelhouse\"."
        },
        "requested_levels": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/SeatingLevel"
          }
        },
        "reason": {
          "type": "string"
        },
        "brand": {
          "$ref": "#/definitions/PresenceBrand"
        },
        "access_mode": {
          "$ref": "#/definitions/AccessMode"
        },
        "mcp_session_id": {
          "type": "string",
          "description": "Optional correlation with an MCP session."
        }
      },
      "required": [
        "type",
        "domain_id",
        "requested_levels",
        "reason",
        "brand",
        "access_mode"
      ],
      "additionalProperties": false,
      "description": "Host or broker proposes seating a domain representative.",
      "deprecated": "v0.1: use ExtendInvitation (the host extends an invitation).",
      "patternProperties": {
        "^x-": {}
      }
    },
    "OfferString": {
      "type": "string",
      "enum": [
        "email",
        "address",
        "phone",
        "marketing_consent",
        "account",
        "purchase",
        "review",
        "follow"
      ],
      "description": "v0.2.9 (§10): what an offer asks of the owner. Data and consent kinds may never be the price of a gift."
    },
    "OfferedStory": {
      "type": "object",
      "properties": {
        "story_id": {
          "type": "string"
        },
        "teaser": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            }
          },
          "required": [
            "text",
            "locale"
          ],
          "additionalProperties": false,
          "description": "A teaser that reveals nothing of the content."
        },
        "attribution": {
          "$ref": "#/definitions/AttributionRule"
        },
        "requires_owner_opt_in": {
          "type": "boolean",
          "const": true
        }
      },
      "required": [
        "story_id",
        "teaser",
        "attribution",
        "requires_owner_opt_in"
      ],
      "additionalProperties": false
    },
    "OfferingItem": {
      "type": "object",
      "properties": {
        "item_id": {
          "type": "string"
        },
        "area": {
          "$ref": "#/definitions/PurposeCode"
        },
        "summary": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            },
            "meaning_notes": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/MeaningNote"
              }
            }
          },
          "required": [
            "text",
            "locale"
          ],
          "additionalProperties": false
        },
        "actions": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Actions the representative can perform for a host."
        },
        "status": {
          "type": "string",
          "enum": [
            "available",
            "limited",
            "unavailable"
          ]
        }
      },
      "required": [
        "item_id",
        "area",
        "summary",
        "status"
      ],
      "additionalProperties": false,
      "description": "What a principal's representative can offer; pairs with SeekingDeclaration."
    },
    "OfferingProfile": {
      "type": "object",
      "properties": {
        "offering_id": {
          "type": "string"
        },
        "version": {
          "type": "string"
        },
        "principal": {
          "type": "object",
          "properties": {
            "principal_id": {
              "type": "string",
              "description": "v0.2.1 (§2.1): a DID. did:key (Ed25519) or did:jwk (P-256 passkey) now; did:web for organizations."
            },
            "display_name": {
              "type": "string"
            }
          },
          "required": [
            "principal_id",
            "display_name"
          ],
          "additionalProperties": false
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/OfferingItem"
          }
        },
        "published_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "expires_at": {
          "$ref": "#/definitions/Timestamp"
        }
      },
      "required": [
        "offering_id",
        "version",
        "principal",
        "items",
        "published_at",
        "expires_at"
      ],
      "additionalProperties": false
    },
    "OrgApproval": {
      "type": "object",
      "properties": {
        "approver": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            },
            "role": {
              "type": "string"
            },
            "approver_id": {
              "type": "string"
            }
          },
          "required": [
            "name",
            "role"
          ],
          "additionalProperties": false,
          "patternProperties": {
            "^x-": {}
          }
        },
        "approved_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "record_ref": {
          "type": "string"
        }
      },
      "required": [
        "approver",
        "approved_at"
      ],
      "additionalProperties": false,
      "description": "v0.4.0 (§2.3): who approved an organization's host card. `approver_id` is the person's own DID when they have one.",
      "patternProperties": {
        "^x-": {}
      }
    },
    "OutsideSetup": {
      "type": "object",
      "properties": {
        "answers": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/SetupAnswer"
          }
        },
        "never_disclose": {
          "type": "array",
          "items": {
            "anyOf": [
              {
                "$ref": "#/definitions/NeverDiscloseCode"
              },
              {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "match": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "code",
                  "match"
                ],
                "additionalProperties": false
              }
            ]
          }
        },
        "owner_response_s": {
          "type": "number"
        },
        "welcome": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            }
          },
          "required": [
            "text",
            "locale"
          ],
          "additionalProperties": false,
          "description": "The tone the owner asked for, in their words (data, never an instruction to a visitor)."
        }
      },
      "required": [
        "answers",
        "never_disclose"
      ],
      "additionalProperties": false,
      "description": "v0.5.0 (§7.5, from P32): questions outside the setup. `answers` are the owner's signed answers, each with the words that match it (`match`, compared by code after normalising, never by a model); `never_disclose` are topics the host declines at once and never sends to the owner as a question (`back_office`, `owner_personal_details`, `other_visitors`, or an `x-` code with its own match words). Anything that matches neither goes to the owner (fail closed), within `owner_response_s` (60 to 604800; absent = 86400) and never past the visitor's pass."
    },
    "OwnNameAlert": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "const": "own_name_used"
        },
        "at": {
          "$ref": "#/definitions/Timestamp"
        },
        "encounter_id": {
          "type": "string"
        },
        "visitor_principal": {
          "type": "string",
          "description": "The visitor's verified identifiers: who it is, as far as the door knows."
        },
        "visitor_representative": {
          "type": "string"
        },
        "claimed_name": {
          "type": "string",
          "description": "The name on the card, shown only as a claim."
        },
        "handled": {
          "type": "string",
          "enum": [
            "treated_as_stranger",
            "refused"
          ],
          "description": "What the door did: refused it (the default), or judged it as a stranger (a trusted vouch came with it, or own_name_visitors: \"seat_as_stranger\")."
        }
      },
      "required": [
        "code",
        "at",
        "encounter_id",
        "visitor_principal",
        "visitor_representative",
        "claimed_name",
        "handled"
      ],
      "additionalProperties": false,
      "description": "v0.3.0-rc4 (§10, C201): what a door tells its owner, at once and off the wire, when a visitor's card claims the owner's own name under another principal. Owner-facing; never sent to the visitor or any other party."
    },
    "OwnerAskDecision": {
      "type": "object",
      "properties": {
        "review_id": {
          "type": "string"
        },
        "ask_ref": {
          "type": "string"
        },
        "choice": {
          "type": "string",
          "enum": [
            "answer_once",
            "answer_and_add",
            "add_action",
            "decline"
          ]
        },
        "answer": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            }
          },
          "required": [
            "text",
            "locale"
          ],
          "additionalProperties": false
        },
        "amendment_digest": {
          "$ref": "#/definitions/Digest",
          "description": "answer_and_add / add_action: the house digest of the amended setup the owner signs with it."
        },
        "decided_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "shown_to_owner": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            }
          },
          "required": [
            "text",
            "locale"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "review_id",
        "ask_ref",
        "choice",
        "decided_at",
        "shown_to_owner"
      ],
      "additionalProperties": false,
      "description": "§7.5: the owner's answer to a review, signed by the place's principal (the owner's passkey), never the host representative."
    },
    "OwnerConsent": {
      "type": "object",
      "properties": {
        "consent_id": {
          "type": "string"
        },
        "owner_id": {
          "type": "string"
        },
        "representative_id": {
          "type": "string"
        },
        "action": {
          "type": "string",
          "enum": [
            "hear_story",
            "approve_share",
            "approve_next_step",
            "approve_introduction",
            "accept_house_rules",
            "approve_commitment",
            "issue_vouch",
            "attest_relationship",
            "approve_lesson",
            "accept_invitation",
            "approve_purchase"
          ],
          "description": "v0.2.2 (D7 adopted, §8.1). Passkey: approve_commitment, approve_share, approve_introduction, accept_house_rules, accept_invitation, issue_vouch, attest_relationship, approve_lesson. Chat reply allowed: hear_story, and approve_next_step only when the step commits, shares and spends nothing. (approve_mandate is retired: the owner's signature on a Mandate or Allowance is the consent.)"
        },
        "decision": {
          "type": "string",
          "enum": [
            "approve",
            "decline"
          ],
          "description": "v0.2.2: an owner can say no in one step, at the same or a lower assurance. Silence = decline."
        },
        "subject_ref": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "visit_report",
                "offered_story",
                "gathering",
                "share",
                "introduction",
                "consideration",
                "vouch",
                "edge",
                "lesson",
                "invitation",
                "next_step",
                "act"
              ]
            },
            "id": {
              "type": "string"
            },
            "digest": {
              "$ref": "#/definitions/Digest",
              "description": "REQUIRED when assurance = \"passkey\"."
            }
          },
          "required": [
            "kind",
            "id"
          ],
          "additionalProperties": false
        },
        "scope": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "assurance": {
          "type": "string",
          "enum": [
            "passkey",
            "chat_reply"
          ]
        },
        "shown_to_owner": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            }
          },
          "required": [
            "text",
            "locale"
          ],
          "additionalProperties": false,
          "description": "v0.2.2: REQUIRED, inside the signed payload: the plain-language summary the owner saw."
        },
        "evidence": {
          "type": "object",
          "properties": {
            "channel": {
              "type": "string"
            },
            "message_id": {
              "type": "string"
            }
          },
          "required": [
            "channel",
            "message_id"
          ],
          "additionalProperties": false,
          "description": "v0.2.2: REQUIRED for chat_reply: the owner's reply message. The binding's platform key signs."
        },
        "step_effects": {
          "type": "object",
          "properties": {
            "commits": {
              "type": "boolean"
            },
            "shares_new": {
              "type": "boolean"
            },
            "spends": {
              "type": "boolean"
            }
          },
          "required": [
            "commits",
            "shares_new",
            "spends"
          ],
          "additionalProperties": false,
          "description": "v0.2.2: REQUIRED for a chat_reply approve_next_step: all three MUST be false."
        },
        "issued_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "expires_at": {
          "$ref": "#/definitions/Timestamp",
          "description": "REQUIRED when assurance = \"passkey\"."
        }
      },
      "required": [
        "consent_id",
        "owner_id",
        "representative_id",
        "action",
        "decision",
        "subject_ref",
        "assurance",
        "shown_to_owner",
        "issued_at"
      ],
      "additionalProperties": false,
      "description": "D7 (decided in D11, v0.2.2, SPEC §8.1): one generic, signed owner consent with a decision (approve / decline). Binding actions require `assurance: \"passkey\"`; hear_story and harmless approve_next_step MAY be a chat reply, signed by the owner binding's platform key. Silence = decline."
    },
    "OwnerLink": {
      "type": "object",
      "properties": {
        "link_id": {
          "type": "string"
        },
        "owners": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "minItems": 2,
          "maxItems": 2,
          "description": "The two owner DIDs being linked (each a did:jwk or P-256 did:key)."
        },
        "audience": {
          "type": "string",
          "description": "The principal DID of the one place this link is shown to; a place MUST ignore a link addressed to another."
        },
        "issued_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "expires_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "purpose": {
          "type": "string"
        }
      },
      "required": [
        "link_id",
        "owners",
        "audience",
        "issued_at",
        "expires_at"
      ],
      "additionalProperties": false,
      "description": "v0.3.0-rc4 (§2.8, C196): per-place owner identities (facets) are unlinkable by default. An owner who CHOOSES to show a place that two of its owner identities are the same person signs this statement with BOTH passkeys (two signatures, either order), for one named audience. It is shown only with the owner's passkey consent; it is never published."
    },
    "OwnerReview": {
      "type": "object",
      "properties": {
        "review_id": {
          "type": "string"
        },
        "ask_ref": {
          "type": "string"
        },
        "place": {
          "type": "string"
        },
        "received_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "response_by": {
          "$ref": "#/definitions/Timestamp"
        },
        "ask": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "untrusted": {
              "type": "boolean",
              "const": true
            }
          },
          "required": [
            "text",
            "untrusted"
          ],
          "additionalProperties": false
        },
        "asked_for": {
          "type": "object",
          "properties": {
            "what": {
              "type": "string"
            },
            "action": {
              "type": "string"
            },
            "offered_now": {
              "type": "boolean"
            },
            "untrusted": {
              "type": "boolean",
              "const": true
            },
            "label": {
              "type": "string",
              "const": "what the visiting agent asks for"
            }
          },
          "required": [
            "what",
            "untrusted",
            "label"
          ],
          "additionalProperties": false,
          "description": "v0.5.0 (C262): what the ask is for, as the visiting agent stated it, labelled as its own words (never an instruction). `offered_now` (with an action) says whether the place's setup already offers that action."
        },
        "agent_reason": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "untrusted": {
              "type": "boolean",
              "const": true
            },
            "label": {
              "type": "string",
              "const": "the visiting agent's reason"
            }
          },
          "required": [
            "text",
            "untrusted",
            "label"
          ],
          "additionalProperties": false,
          "description": "Why the visiting agent asks, labelled as its own words (never an instruction). Required since C262."
        },
        "visitor": {
          "type": "object",
          "properties": {
            "representative_id": {
              "type": "string"
            },
            "principal": {
              "type": "object",
              "properties": {
                "principal_id": {
                  "type": "string"
                },
                "display_name": {
                  "type": "string"
                },
                "display_name_is_claim": {
                  "type": "boolean",
                  "const": true
                }
              },
              "required": [
                "principal_id",
                "display_name",
                "display_name_is_claim"
              ],
              "additionalProperties": false
            },
            "card_scope": {
              "type": "object",
              "properties": {
                "purposes": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/PurposeCode"
                  }
                },
                "actions": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "purposes",
                "actions"
              ],
              "additionalProperties": false
            },
            "purpose": {
              "$ref": "#/definitions/PurposeCode"
            },
            "may_spend": {
              "type": "boolean"
            }
          },
          "required": [
            "representative_id",
            "principal",
            "card_scope",
            "purpose",
            "may_spend"
          ],
          "additionalProperties": false
        },
        "why_outside": {
          "type": "string",
          "const": "no_signed_answer"
        },
        "setup": {
          "type": "object",
          "properties": {
            "setup_version": {
              "type": "number"
            },
            "house_digest": {
              "$ref": "#/definitions/Digest"
            }
          },
          "required": [
            "setup_version",
            "house_digest"
          ],
          "additionalProperties": false
        },
        "choices": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "answer_once",
              "answer_and_add",
              "add_action",
              "decline"
            ]
          }
        },
        "shown_to_owner": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            }
          },
          "required": [
            "text",
            "locale"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "review_id",
        "ask_ref",
        "place",
        "received_at",
        "response_by",
        "ask",
        "asked_for",
        "agent_reason",
        "visitor",
        "why_outside",
        "setup",
        "choices",
        "shown_to_owner"
      ],
      "additionalProperties": false,
      "description": "§7.5 (from P32 §6): what the owner sees about a question outside the setup. Built by code from records the place kept; the visitor's words are quoted and marked untrusted. It never shows the visitor's spending limit (only whether the errand may spend)."
    },
    "PeerInvitation": {
      "type": "object",
      "properties": {
        "invitation_id": {
          "type": "string"
        },
        "from_owner": {
          "type": "object",
          "properties": {
            "principal_id": {
              "type": "string"
            },
            "display_name": {
              "type": "string"
            }
          },
          "required": [
            "principal_id",
            "display_name"
          ],
          "additionalProperties": false
        },
        "to_owner": {
          "type": "object",
          "properties": {
            "principal_id": {
              "type": "string"
            },
            "display_name": {
              "type": "string"
            }
          },
          "required": [
            "principal_id",
            "display_name"
          ],
          "additionalProperties": false
        },
        "representatives": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "minItems": 2,
          "maxItems": 2,
          "description": "The two representatives allowed in (by DID)."
        },
        "purposes": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/PurposeCode"
          }
        },
        "agenda": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            }
          },
          "required": [
            "text",
            "locale"
          ],
          "additionalProperties": false
        },
        "place": {
          "type": "object",
          "properties": {
            "place_id": {
              "type": "string"
            },
            "kind": {
              "type": "string",
              "const": "pair"
            },
            "house_rules": {
              "type": "object",
              "properties": {
                "default_attribution": {
                  "type": "string",
                  "const": "private",
                  "description": "Nothing said in a pair place leaves it, except to the two owners."
                },
                "private_never_leaves": {
                  "type": "boolean",
                  "const": true
                },
                "pressing": {
                  "type": "object",
                  "properties": {
                    "light_flags": {
                      "type": "number"
                    },
                    "notice_at": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "light_flags",
                    "notice_at"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "default_attribution",
                "private_never_leaves"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "place_id",
            "kind",
            "house_rules"
          ],
          "additionalProperties": false
        },
        "valid_from": {
          "$ref": "#/definitions/Timestamp"
        },
        "expires_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "answer_by": {
          "$ref": "#/definitions/Timestamp",
          "description": "v0.2.4 (the Peer meetings extension): REQUIRED. By when the invited owner answers; no answer by then is a decline (D7 silence = no)."
        }
      },
      "required": [
        "invitation_id",
        "from_owner",
        "to_owner",
        "representatives",
        "purposes",
        "place",
        "valid_from",
        "expires_at",
        "answer_by"
      ],
      "additionalProperties": false,
      "description": "v0.2.2 (the Peer meetings extension): an owner-to-owner invitation, the \"meeting key\". Signed by the inviting owner (passkey) and accepted by the invited owner (OwnerConsent accept_invitation, passkey). It creates a private place for the two representatives; the meeting is ONE shared encounter (`encounter_id` = `place.place_id`)."
    },
    "PeerInvitationAnswer": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "const": "peer_invitation_answer"
        },
        "invitation_id": {
          "type": "string"
        },
        "answer": {
          "$ref": "#/definitions/Signed%3COwnerConsent%3E"
        },
        "protocol": {
          "$ref": "#/definitions/ProtocolVersion"
        },
        "encounter_id": {
          "type": "string"
        },
        "msg_id": {
          "type": "string"
        },
        "sent_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "from": {
          "type": "string",
          "description": "Representative id of the sender."
        },
        "to": {
          "type": "string",
          "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
        },
        "in_reply_to": {
          "type": "string",
          "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
        }
      },
      "required": [
        "answer",
        "encounter_id",
        "from",
        "invitation_id",
        "msg_id",
        "protocol",
        "sent_at",
        "to",
        "type"
      ],
      "description": "v0.2.3 (§11 with the Gatherings or Peer meetings extension): the invited representative returns its owner's passkey answer (accept_invitation approve or decline).",
      "patternProperties": {
        "^x-": {}
      }
    },
    "PeerInvitationDelivery": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "const": "peer_invitation"
        },
        "invitation": {
          "$ref": "#/definitions/Signed%3CPeerInvitation%3E"
        },
        "reply_to": {
          "type": "string",
          "description": "Where the answer goes: the inviting representative's own entry, or (v0.2.4) the pair place's inbox address, where the answer is then held for the inviting representative."
        },
        "protocol": {
          "$ref": "#/definitions/ProtocolVersion"
        },
        "encounter_id": {
          "type": "string"
        },
        "msg_id": {
          "type": "string"
        },
        "sent_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "from": {
          "type": "string",
          "description": "Representative id of the sender."
        },
        "to": {
          "type": "string",
          "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
        },
        "in_reply_to": {
          "type": "string",
          "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
        }
      },
      "required": [
        "encounter_id",
        "from",
        "invitation",
        "msg_id",
        "protocol",
        "reply_to",
        "sent_at",
        "to",
        "type"
      ],
      "description": "v0.2.3 (§11 with the Gatherings or Peer meetings extension): the inviting owner's representative carries the owner-signed PeerInvitation to the invited representative.",
      "patternProperties": {
        "^x-": {}
      }
    },
    "PlaceAction": {
      "type": "object",
      "properties": {
        "action": {
          "type": "string"
        },
        "purposes": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/PurposeCode"
          }
        },
        "spends": {
          "type": "boolean"
        },
        "needs": {
          "type": "string",
          "enum": [
            "standard",
            "considering",
            "pair_invitation"
          ]
        },
        "trust": {
          "type": "object",
          "properties": {
            "paths": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/TrustPathKind"
              }
            },
            "obtain_url": {
              "type": "string"
            },
            "first_purchase": {
              "type": "object",
              "properties": {
                "allocates_deposit": {
                  "type": "boolean"
                }
              },
              "required": [
                "allocates_deposit"
              ],
              "additionalProperties": false,
              "patternProperties": {
                "^x-": {}
              }
            }
          },
          "required": [
            "paths"
          ],
          "additionalProperties": false,
          "description": "v0.5.0 (§6.9): the kinds of trust path accepted, never thresholds.",
          "patternProperties": {
            "^x-": {}
          }
        },
        "costs_place": {
          "type": "boolean",
          "description": "v0.5.0 (§6.9): serving this action costs the place real money; it SHOULD have a pool cap."
        },
        "effort_hint": {
          "type": "object",
          "properties": {
            "typical_turns": {
              "type": "number"
            }
          },
          "required": [
            "typical_turns"
          ],
          "additionalProperties": false,
          "description": "v0.5.0 (§5.5, informative): typical turns an errand for this action takes.",
          "patternProperties": {
            "^x-": {}
          }
        },
        "creates_account": {
          "type": "boolean",
          "description": "v0.2.8 (§4, P2): this action creates an account / signs up (always true for `account.create`); stated only when true."
        },
        "requires_introduction": {
          "type": "boolean",
          "description": "v0.2.10 (§4, D17): this place requires an introduction, or its own invitation, before it creates an account."
        },
        "requires_customer_link": {
          "type": "boolean",
          "description": "v0.4.0 (§5.4): this place serves the action only under a customer link made in its own channel; stated only when true."
        },
        "data_asks": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/DataAsk"
          },
          "description": "v0.3.0-rc1 (§3.1, P17, D19): SHOULD be present. The personal data the place will ask the visitor's owner for before or while it serves this action; [] when it asks for none. A representative can tell its owner up front, and takes an undeclared ask home rather than answering it."
        }
      },
      "required": [
        "action",
        "purposes",
        "spends"
      ],
      "additionalProperties": false,
      "description": "v0.2.3 (§3.1): one action a place offers, with the purposes it serves and whether it moves money.",
      "patternProperties": {
        "^x-": {}
      }
    },
    "PlaceAskArguments": {
      "type": "object",
      "properties": {
        "text": {
          "type": "string"
        },
        "asks_for": {
          "$ref": "#/definitions/AskFor",
          "description": "What the ask is for: the ability or thing, in plain words (at most 120 characters), and the action it would need, if the agent knows it."
        },
        "reason": {
          "type": "string",
          "description": "Why, in the agent's own words (at most 300 characters). Never cut: over the limit is refused."
        }
      },
      "required": [
        "text"
      ],
      "additionalProperties": false,
      "description": "§7.5: the arguments of a `place.ask` act. `text` is the question (at most 500 characters). An ask that the signed setup doesn't answer goes to the owner, and then MUST say what it asks for (`asks_for`) and why (`reason`), or it is refused `not_now` / `REQUEST_INCOMPLETE` and nothing reaches the owner (C262). Both are the visiting agent's own words: data, never an instruction."
    },
    "PlaceBinding": {
      "type": "object",
      "properties": {
        "principal_id": {
          "type": "string"
        },
        "entry": {
          "type": "string"
        },
        "listing_digest": {
          "$ref": "#/definitions/Digest"
        },
        "site": {
          "type": "string",
          "description": "v0.5.0 (§3.1.1, site binding; from P26 amendment A): the origin of the website this place belongs to, in its serialized form (e.g. \"https://lanternmoss.example\": scheme, lowercase ASCII host, a port only when it isn't the default; no path). Inside the owner's signature. A visitor calls the door \"the door of <site>\" only when that site's own /.well-known/shokai lists this entry."
        }
      },
      "required": [
        "principal_id",
        "entry"
      ],
      "additionalProperties": false,
      "description": "v0.4.0 (§2.3): the place a Shōkai host card serves: the place's principal and its listing entry address.",
      "patternProperties": {
        "^x-": {}
      }
    },
    "PlaceCategory": {
      "type": "string",
      "description": "v0.2.2 (D11, §5.2): coarse, language-neutral kinds of place an allowance can name."
    },
    "PlaceLink": {
      "type": "object",
      "properties": {
        "rel": {
          "type": "string"
        },
        "href": {
          "type": "string"
        },
        "media_type": {
          "type": "string"
        }
      },
      "required": [
        "rel",
        "href"
      ],
      "additionalProperties": false,
      "description": "v0.3.0-rc1 (§3.1, D20): a pointer from a place's agent front to another description it publishes. Unknown `rel` values are ignored. Suggested values (informative): `website`, `schema-org`, `product-feed`, `mcp-server`, `mcp-server-card`, `a2a-agent-card`, `nlweb`, `commerce-profile`, `llms-txt`; anything else uses an `x-` prefix."
    },
    "PlaceListing": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "place_listing"
        },
        "protocol": {
          "$ref": "#/definitions/ProtocolVersion"
        },
        "door": {
          "type": "string"
        },
        "places": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/PlaceListingEntry"
          }
        },
        "published_at": {
          "$ref": "#/definitions/Timestamp"
        }
      },
      "required": [
        "type",
        "protocol",
        "door",
        "places",
        "published_at"
      ],
      "additionalProperties": false,
      "description": "v0.2.1 (§3.1): the place listing a door publishes."
    },
    "PlaceListingEntry": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "display_name": {
          "type": "string"
        },
        "principal_id": {
          "type": "string"
        },
        "representative_id": {
          "type": "string"
        },
        "entry": {
          "type": "string"
        },
        "lobby": {
          "type": "string"
        },
        "onboarding_url": {
          "type": "string"
        },
        "locales": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Locale"
          }
        },
        "purposes": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/PurposeDescription"
          }
        },
        "seeking_ref": {
          "type": "object",
          "properties": {
            "seeking_id": {
              "type": "string"
            },
            "digest": {
              "$ref": "#/definitions/Digest"
            }
          },
          "required": [
            "seeking_id",
            "digest"
          ],
          "additionalProperties": false
        },
        "category": {
          "$ref": "#/definitions/PlaceCategory",
          "description": "v0.2.2 (§5.2): the place's category. v0.2.3: REQUIRED (an allowance grant is matched against it)."
        },
        "actions": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/PlaceAction"
          },
          "description": "v0.2.3 (§3.1): REQUIRED. The actions the place offers, with purposes."
        },
        "spec_ref": {
          "$ref": "#/definitions/SpecRef",
          "description": "v0.2.3 (§3.1): which protocol text the place follows. v0.2.4: REQUIRED."
        },
        "inbox": {
          "type": "string",
          "description": "v0.2.4 (§11.1): REQUIRED over HTTP. The place's inbox address (POST a signed inbox_poll)."
        },
        "door_policy": {
          "$ref": "#/definitions/Signed%3CDoorPolicy%3E",
          "description": "v0.2.9 (§10): REQUIRED for an inbound door: the owner-signed door policy (public part plus a salted digest of the private part)."
        },
        "links": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/PlaceLink"
          },
          "description": "v0.3.0-rc1 (§3.1, D20): OPTIONAL hints to what the place already publishes for agents elsewhere. They prove nothing and never widen what the door decides; a visitor still verifies the place's card against this entry (C104)."
        },
        "house_digest": {
          "$ref": "#/definitions/Digest",
          "description": "v0.4.0 (§3.1, §2.3): REQUIRED when the place's host representative presents a Shōkai host card: the fingerprint of the house config it serves now. A visitor compares it with the host card's `house_digest`."
        },
        "accepted_tags": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "v0.5.0 (§11.1, C254): the wire tags this place accepts. A visitor never moves to shokai/0.3 when it includes shokai/0.5."
        }
      },
      "required": [
        "name",
        "display_name",
        "principal_id",
        "representative_id",
        "entry",
        "lobby",
        "onboarding_url",
        "locales",
        "purposes",
        "category",
        "actions",
        "spec_ref",
        "inbox"
      ],
      "additionalProperties": false,
      "description": "v0.2.1 (§3.1, the door): one entry of a door's place listing. `entry` takes protocol messages (and any other arrival); `lobby` is where an unprepared visitor lands; `onboarding_url` is for its owner."
    },
    "PlaceTemplates": {
      "type": "object",
      "properties": {
        "card": {
          "type": "object",
          "properties": {
            "crit": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "card_id": {
              "type": "string"
            },
            "protocol": {
              "$ref": "#/definitions/ProtocolVersion"
            },
            "representative_id": {
              "type": "string"
            },
            "principal": {
              "type": "object",
              "properties": {
                "principal_id": {
                  "type": "string",
                  "description": "v0.2.1 (§2.1): a DID. did:key (Ed25519) or did:jwk (P-256 passkey) now; did:web for organizations."
                },
                "kind": {
                  "$ref": "#/definitions/PrincipalKind"
                },
                "display_name": {
                  "type": "string"
                }
              },
              "required": [
                "principal_id",
                "kind",
                "display_name"
              ],
              "additionalProperties": false,
              "patternProperties": {
                "^x-": {}
              }
            },
            "role": {
              "type": "string",
              "description": "Human-meaningful role, e.g. \"Payroll operations representative\"."
            },
            "standing": {
              "$ref": "#/definitions/Standing"
            },
            "mandate_scope": {
              "type": "object",
              "properties": {
                "purposes": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/PurposeCode"
                  }
                },
                "actions": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "purposes",
                "actions"
              ],
              "additionalProperties": false,
              "description": "Outer bound of what any mandate under this card may authorize.",
              "patternProperties": {
                "^x-": {}
              }
            },
            "locales": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Locale"
              },
              "description": "Languages the representative can converse in (preference order)."
            },
            "etiquette": {
              "$ref": "#/definitions/EtiquettePreferences",
              "description": "Declared cultural / etiquette preferences; the counterpart adapts to these."
            },
            "representative_key": {
              "type": "object",
              "properties": {
                "key_id": {
                  "type": "string"
                },
                "alg": {
                  "type": "string",
                  "enum": [
                    "Ed25519",
                    "ES256"
                  ]
                },
                "public_key": {
                  "type": "string"
                }
              },
              "required": [
                "key_id",
                "alg",
                "public_key"
              ],
              "additionalProperties": false,
              "description": "v0.2.1 (§2.1): key_id MUST be a DID URL whose DID equals representative_id; public_key is base64url (no padding) of the raw 32-byte Ed25519 key, or the representative's did:key. It MUST equal the key representative_id resolves to.",
              "patternProperties": {
                "^x-": {}
              }
            },
            "issued_at": {
              "$ref": "#/definitions/Timestamp"
            },
            "expires_at": {
              "$ref": "#/definitions/Timestamp"
            },
            "revocation_url": {
              "type": "string",
              "description": "v0.3.0-rc4 (§2.6, C191): where the principal publishes revocations of its cards (an https URL; loopback http only in a conformance run, Appendix B.1). GET answers a JSON array of Signed<CardRevocation> ([] when nothing is revoked). When present, a door MUST check it before seating (fail closed: unreachable = setup failure, not_now / after)."
            },
            "provenance": {
              "$ref": "#/definitions/CardProvenance",
              "description": "How this representative was designed (phase 0). Evidence, not a score."
            },
            "offering_digest": {
              "$ref": "#/definitions/Digest",
              "description": "Digest of the principal's current OfferingProfile, if published."
            },
            "claims": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/CardClaim"
              },
              "description": "Backed-up claims; counterparts weigh each by its EFFECTIVE proof level."
            },
            "imprint": {
              "$ref": "#/definitions/PrincipalImprint",
              "description": "How the principal's expertise, worldview, style and taste shape this representative."
            },
            "kind": {
              "$ref": "#/definitions/CardKind",
              "description": "v0.4.0 (§2.3): which Shōkai card this is. \"visitor\": the Shōkai visitor card, presented by a visiting representative. \"host\": the Shōkai host card, presented by a place's host representative (the gatekeeper) and bound to one place (`place`). SHOULD be stated on every card (§2.3). A card without it (issued under v0.3.0) MUST be read as a Shōkai visitor card when a visiting representative presents it and as a Shōkai host card when a host representative presents it."
            },
            "place": {
              "$ref": "#/definitions/PlaceBinding",
              "description": "v0.4.0 (§2.3): REQUIRED on a host card, absent on a visitor card. The one place this host card serves."
            },
            "host_scope": {
              "$ref": "#/definitions/HostScope",
              "description": "v0.4.0 (§2.3): REQUIRED on a host card. What the host representative may do for its place's owner."
            },
            "house_digest": {
              "$ref": "#/definitions/Digest",
              "description": "v0.4.0 (§2.3): REQUIRED on a host card. The fingerprint of the house config the owner approved: digest(JCS(house config)), where the house config is the place's policy and listing details (§3.1). Any change to the house config needs a new card."
            },
            "summary_digest": {
              "$ref": "#/definitions/Digest",
              "description": "v0.5.0 (§2.3, C248): REQUIRED on a Shōkai host card whose house config has policy.summary: the digest of the JCS bytes of that summary, so the summary can be checked with the Shōkai host card alone. A door whose house config has policy.summary and whose host card lacks it MUST refuse to start."
            },
            "setup": {
              "type": "object",
              "properties": {
                "version": {
                  "type": "number"
                },
                "prev_house_digest": {
                  "$ref": "#/definitions/Digest"
                },
                "changes": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/SetupChangeRef"
                  }
                }
              },
              "required": [
                "version",
                "prev_house_digest",
                "changes"
              ],
              "additionalProperties": false,
              "description": "v0.5.0 (§7.6, from P32 §7): on a Shōkai host card signed for an amended setup: its version, the house digest of the setup it replaces, and what changed. A visitor that saw the earlier card can check the chain; the house config says the same.",
              "patternProperties": {
                "^x-": {}
              }
            },
            "org_approval": {
              "$ref": "#/definitions/OrgApproval",
              "description": "v0.4.0 (§2.3): REQUIRED on a host card whose principal is an organization (kind other than \"person\"): the record of which person approved this card for the organization. The card is still signed by the organization's own key."
            },
            "shown_to_owner": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string"
                },
                "locale": {
                  "$ref": "#/definitions/Locale"
                }
              },
              "required": [
                "text",
                "locale"
              ],
              "additionalProperties": false,
              "description": "v0.4.0 (§2.3, §8.1): REQUIRED on a host card. The plain-language recap the owner read right before signing, inside the signature.",
              "patternProperties": {
                "^x-": {}
              }
            },
            "owner_prompts": {
              "type": "string",
              "enum": [
                "purchase_only",
                "never"
              ],
              "description": "v0.4.0 (§5.2): on a visitor card, whether its representative may ask its owner live, during a visit, to approve a purchase (\"purchase_only\"), or never asks live (\"never\", the default when absent). Disclosed in `shown_to_owner`."
            },
            "preset": {
              "type": "string",
              "enum": [
                "browse",
                "shop",
                "booking",
                "members"
              ],
              "description": "v0.5.0 (§0.1, RR-14): on a Shōkai host card, the place preset it claims (conformance/classes.json \"presets\"). Information only."
            },
            "owner_binding": {
              "type": "object",
              "properties": {
                "method": {
                  "type": "string",
                  "const": "passkey_webauthn"
                },
                "owner_id": {
                  "type": "string"
                },
                "platform_key": {
                  "type": "string",
                  "description": "v0.2.2 (D7, §8.1): the chat binding's platform key (a DID); it alone signs `chat_reply` consents."
                },
                "rp_id": {
                  "type": "string",
                  "description": "v0.2.3 (§A.1): REQUIRED. The WebAuthn relying party the owner's passkey is registered with. Every owner passkey assertion (card, mandate, allowance, consents) is verified against SHA-256(rp_id) and origin \"https://\" + rp_id."
                }
              },
              "required": [
                "method",
                "owner_id",
                "rp_id"
              ],
              "additionalProperties": false,
              "description": "Owner binding: card and mandate are signed with the owner's passkey.",
              "patternProperties": {
                "^x-": {}
              }
            }
          },
          "additionalProperties": false,
          "patternProperties": {
            "^x-": {}
          }
        },
        "mandates": {
          "type": "object",
          "additionalProperties": {
            "type": "object",
            "properties": {
              "crit": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "mandate_id": {
                "type": "string"
              },
              "principal_id": {
                "type": "string"
              },
              "representative_id": {
                "type": "string"
              },
              "card_id": {
                "type": "string",
                "description": "Card the mandate was issued under; scope MUST be within card.mandate_scope."
              },
              "purpose": {
                "type": "object",
                "properties": {
                  "code": {
                    "$ref": "#/definitions/PurposeCode"
                  },
                  "statement": {
                    "type": "string"
                  },
                  "locale": {
                    "$ref": "#/definitions/Locale"
                  },
                  "meaning_notes": {
                    "type": "array",
                    "items": {
                      "$ref": "#/definitions/MeaningNote"
                    }
                  }
                },
                "required": [
                  "code",
                  "statement",
                  "locale"
                ],
                "additionalProperties": false,
                "patternProperties": {
                  "^x-": {}
                }
              },
              "allowed_actions": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "limits": {
                "$ref": "#/definitions/Limits"
              },
              "counterparties": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Optional counterparty restriction, e.g. only ExampleBank."
              },
              "valid_from": {
                "$ref": "#/definitions/Timestamp"
              },
              "expires_at": {
                "$ref": "#/definitions/Timestamp"
              },
              "under_allowance": {
                "type": "object",
                "properties": {
                  "allowance_id": {
                    "type": "string"
                  },
                  "allowance_digest": {
                    "$ref": "#/definitions/Digest"
                  },
                  "grant_digest": {
                    "$ref": "#/definitions/Digest"
                  }
                },
                "required": [
                  "allowance_id",
                  "allowance_digest",
                  "grant_digest"
                ],
                "additionalProperties": false,
                "description": "v0.2.2 (D11, §5.2): set when the representative issued this mandate itself, inside a standing owner Allowance. Such a mandate is signed by the REPRESENTATIVE's key and is valid only with the matching AllowancePresentation.",
                "patternProperties": {
                  "^x-": {}
                }
              },
              "customer_link": {
                "type": "object",
                "properties": {
                  "link_id": {
                    "type": "string"
                  },
                  "link_digest": {
                    "$ref": "#/definitions/Digest"
                  }
                },
                "required": [
                  "link_id",
                  "link_digest"
                ],
                "additionalProperties": false,
                "description": "v0.4.0 (§5.4): the customer link this errand is under, at an institution. The owner's signature ties the errand to the link.",
                "patternProperties": {
                  "^x-": {}
                }
              },
              "supersedes": {
                "type": "object",
                "properties": {
                  "mandate_id": {
                    "type": "string"
                  },
                  "mandate_digest": {
                    "$ref": "#/definitions/Digest"
                  },
                  "hold": {
                    "type": "object",
                    "properties": {
                      "hold_id": {
                        "type": "string"
                      },
                      "act_digest": {
                        "$ref": "#/definitions/Digest"
                      }
                    },
                    "required": [
                      "hold_id",
                      "act_digest"
                    ],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-": {}
                    }
                  }
                },
                "required": [
                  "mandate_id",
                  "mandate_digest"
                ],
                "additionalProperties": false,
                "description": "v0.5.0 (§5.1, §7.3): the mandate this one replaces for the same errand, to raise a limit. Counted as one ledger. `hold` is REQUIRED when the mandate answers an over-limit hold: the hold's id and the held act's payload_digest (as `act_held` stated it), so the owner's signature releases that one act and no other.",
                "patternProperties": {
                  "^x-": {}
                }
              },
              "shown_to_owner": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string"
                  },
                  "locale": {
                    "$ref": "#/definitions/Locale"
                  }
                },
                "required": [
                  "text",
                  "locale"
                ],
                "additionalProperties": false,
                "description": "v0.5.0 (§5.1): the plain-language summary the owner read before signing, inside the signature. REQUIRED on a superseding mandate.",
                "patternProperties": {
                  "^x-": {}
                }
              }
            },
            "additionalProperties": false,
            "patternProperties": {
              "^x-": {}
            }
          },
          "description": "v0.2.4 (§3.3): one mandate skeleton per purpose code the place serves, listing only the actions that serve that purpose; a spending purpose's skeleton carries `limits.max_amount` with `<amount>` / `<ISO 4217>` placeholders."
        },
        "allowance_grant": {
          "type": "object",
          "properties": {
            "grant_id": {
              "type": "string"
            },
            "salt": {
              "type": "string",
              "description": "Random, at least 128 bits, base64url; makes the grant digest unguessable."
            },
            "purposes": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/PurposeCode"
              }
            },
            "place_categories": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/PlaceCategory"
              }
            },
            "actions": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "spend": {
              "$ref": "#/definitions/SpendBudget",
              "description": "Absent = no spending under this grant (D11)."
            },
            "counterparties": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Optional named counterparties (principal ids); absent = any place in the categories."
            },
            "note": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string"
                },
                "locale": {
                  "$ref": "#/definitions/Locale"
                }
              },
              "required": [
                "text",
                "locale"
              ],
              "additionalProperties": false,
              "description": "Optional plain-language note from the owner (informative, never gate input).",
              "patternProperties": {
                "^x-": {}
              }
            }
          },
          "additionalProperties": false,
          "patternProperties": {
            "^x-": {}
          }
        },
        "closed": {
          "type": "boolean",
          "const": true,
          "description": "v0.5.0 (§2.2, C242): `true` marks the card and mandate templates as closed. Each then lists every top-level member the place accepts (a member a visitor may leave out has an `<optional …>` placeholder), and the place refuses a signed Shōkai visitor card or mandate carrying a top-level member its template doesn't list (`x-` members aside). Absent: the templates are fill-in hints only."
        }
      },
      "required": [
        "card",
        "mandates"
      ],
      "additionalProperties": false,
      "description": "v0.2.3 (§3.3): unsigned fill-in skeletons a lobby offers.",
      "patternProperties": {
        "^x-": {}
      }
    },
    "PresenceBrand": {
      "type": "object",
      "properties": {
        "label": {
          "type": "string",
          "description": "Display name, e.g. \"Reelhouse specialist\""
        },
        "vendor_warranted": {
          "type": "boolean",
          "description": "True only when vendor warrants the voice (packaging B)."
        },
        "attribution": {
          "type": "string",
          "description": "Host-provided coach disclaimer when vendor_warranted is false (packaging C)."
        }
      },
      "required": [
        "label",
        "vendor_warranted"
      ],
      "additionalProperties": false,
      "patternProperties": {
        "^x-": {}
      }
    },
    "PresenceMessage": {
      "anyOf": [
        {
          "$ref": "#/definitions/OfferPresence"
        },
        {
          "$ref": "#/definitions/AcceptPresence"
        },
        {
          "$ref": "#/definitions/Advise"
        },
        {
          "$ref": "#/definitions/Act"
        },
        {
          "$ref": "#/definitions/ActResult"
        },
        {
          "$ref": "#/definitions/EscalateToHuman"
        },
        {
          "$ref": "#/definitions/Unseat"
        }
      ]
    },
    "PressOutcome": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "press": {
              "type": "number"
            },
            "result": {
              "type": "string",
              "const": "light_flag"
            },
            "notice": {
              "type": "boolean",
              "const": false
            }
          },
          "required": [
            "press",
            "result",
            "notice"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "press": {
              "type": "number"
            },
            "result": {
              "type": "string",
              "const": "minor_misconduct"
            },
            "code": {
              "type": "string",
              "const": "manipulation"
            },
            "notice": {
              "type": "boolean",
              "const": true
            },
            "issued_by": {
              "type": "string",
              "const": "place"
            }
          },
          "required": [
            "press",
            "result",
            "code",
            "notice",
            "issued_by"
          ],
          "additionalProperties": false
        }
      ],
      "description": "D5 (adopted in v0.2.2, D11): pressing after a PrivacyDecline, counted per asker, per place (30-day window, across the place's gatherings) and per topic code. Thresholds come from house_rules.pressing (default light_flags 2, notice_at 3)."
    },
    "Principal": {
      "type": "object",
      "properties": {
        "principal_id": {
          "type": "string",
          "description": "v0.2.1 (§2.1): a DID. did:key (Ed25519) or did:jwk (P-256 passkey) now; did:web for organizations."
        },
        "kind": {
          "$ref": "#/definitions/PrincipalKind"
        },
        "display_name": {
          "type": "string"
        },
        "keys": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "key_id": {
                "type": "string"
              },
              "alg": {
                "type": "string",
                "enum": [
                  "Ed25519",
                  "ES256"
                ]
              },
              "public_key": {
                "type": "string"
              }
            },
            "required": [
              "key_id",
              "alg",
              "public_key"
            ],
            "additionalProperties": false
          },
          "description": "Public keys the principal signs cards and mandates with."
        }
      },
      "required": [
        "principal_id",
        "kind",
        "display_name",
        "keys"
      ],
      "additionalProperties": false,
      "description": "The party a representative stands for and whose reputation it carries."
    },
    "PrincipalImprint": {
      "type": "object",
      "properties": {
        "expertise": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ImprintFacet"
          }
        },
        "worldview": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ImprintFacet"
          }
        },
        "working_style": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ImprintFacet"
          }
        },
        "taste": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ImprintFacet"
          }
        }
      },
      "required": [
        "expertise",
        "worldview",
        "working_style",
        "taste"
      ],
      "additionalProperties": false,
      "description": "The principal's imprint: why this representative is strong at what it does.",
      "patternProperties": {
        "^x-": {}
      }
    },
    "PrincipalKind": {
      "type": "string",
      "enum": [
        "person",
        "brand",
        "company",
        "system"
      ]
    },
    "PrivacyDecline": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "const": "privacy_decline"
        },
        "gathering_id": {
          "type": "string"
        },
        "in_reply_to": {
          "type": "string",
          "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
        },
        "topic": {
          "$ref": "#/definitions/TopicCode"
        },
        "courtesy": {
          "$ref": "#/definitions/Courtesy"
        },
        "penalized": {
          "type": "boolean",
          "const": false
        },
        "press": {
          "type": "object",
          "properties": {
            "count": {
              "type": "number"
            },
            "light_flags": {
              "type": "number"
            },
            "notice_at": {
              "type": "number"
            }
          },
          "required": [
            "count",
            "light_flags",
            "notice_at"
          ],
          "additionalProperties": false,
          "description": "v0.2.4: the decliner fills this from its own count of that asker's presses on this topic (it sees every question put to it); the place's own count stays authoritative for notices.",
          "patternProperties": {
            "^x-": {}
          }
        },
        "protocol": {
          "$ref": "#/definitions/ProtocolVersion"
        },
        "encounter_id": {
          "type": "string"
        },
        "msg_id": {
          "type": "string"
        },
        "sent_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "from": {
          "type": "string",
          "description": "Representative id of the sender."
        },
        "to": {
          "type": "string",
          "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
        }
      },
      "required": [
        "courtesy",
        "encounter_id",
        "from",
        "gathering_id",
        "in_reply_to",
        "msg_id",
        "penalized",
        "protocol",
        "sent_at",
        "to",
        "topic",
        "type"
      ],
      "description": "A courteous, non-penalized refusal to answer a personal question. Never misconduct.",
      "patternProperties": {
        "^x-": {}
      }
    },
    "ProofLevel": {
      "type": "string",
      "enum": [
        "self_declared",
        "evidenced",
        "vouched",
        "verified"
      ],
      "description": "self_declared: the owner states it. evidenced: links to proof (site, post, work). vouched: a third party signed for it. verified: checked cryptographically (e.g. did:web domain control). A receiver computes the EFFECTIVE level itself and MUST downgrade any level it cannot confirm."
    },
    "Proposal": {
      "type": "object",
      "properties": {
        "request": {
          "type": "object",
          "properties": {
            "actions": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "limits": {
              "$ref": "#/definitions/Limits"
            },
            "data_classes": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "actions"
          ],
          "additionalProperties": false,
          "description": "The concrete ask; MUST be within the mandate.",
          "patternProperties": {
            "^x-": {}
          }
        },
        "value_to_counterparty": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            }
          },
          "required": [
            "text",
            "locale"
          ],
          "additionalProperties": false,
          "description": "Value to the other side (prose, rendered; may shape terms only).",
          "patternProperties": {
            "^x-": {}
          }
        },
        "terms": {
          "type": "object",
          "additionalProperties": {
            "type": [
              "string",
              "number",
              "boolean"
            ]
          },
          "description": "Proposed terms, e.g. session length, reporting, human confirmation."
        },
        "evidence": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string"
              },
              "ref": {
                "type": "string"
              }
            },
            "required": [
              "kind",
              "ref"
            ],
            "additionalProperties": false,
            "patternProperties": {
              "^x-": {}
            }
          },
          "description": "References to supporting signed artifacts (digests or URLs)."
        },
        "addresses_seeking": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "seeking_id": {
                "type": "string"
              },
              "item_ids": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "seeking_id",
              "item_ids"
            ],
            "additionalProperties": false,
            "patternProperties": {
              "^x-": {}
            }
          },
          "description": "Offer-to-need match: which published Seeking items this proposal addresses."
        },
        "from_offering": {
          "type": "object",
          "properties": {
            "offering_id": {
              "type": "string"
            },
            "item_ids": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "offering_id",
            "item_ids"
          ],
          "additionalProperties": false,
          "description": "Which of the visitor's own Offering items it brings to that match.",
          "patternProperties": {
            "^x-": {}
          }
        },
        "etiquette_register": {
          "$ref": "#/definitions/EtiquetteRegister"
        }
      },
      "required": [
        "request",
        "value_to_counterparty",
        "etiquette_register"
      ],
      "additionalProperties": false,
      "description": "A structured opportunity. Prose fields never enter the gate function.",
      "patternProperties": {
        "^x-": {}
      }
    },
    "ProtocolVersion": {
      "type": "string",
      "enum": [
        "shokai/0.5",
        "shokai/0.3"
      ],
      "description": "Protocol version tag carried on every ritual message (§11.1). Senders emit \"shokai/0.5\"; \"shokai/0.3\" is accepted during the transition window and used only when answering a shokai/0.3 message."
    },
    "PurposeCode": {
      "type": "string",
      "description": "Language-neutral purpose codes; extend per domain with a \"x-\" prefix."
    },
    "PurposeDescription": {
      "type": "object",
      "properties": {
        "code": {
          "$ref": "#/definitions/PurposeCode"
        },
        "statement": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            }
          },
          "required": [
            "text",
            "locale"
          ],
          "additionalProperties": false,
          "patternProperties": {
            "^x-": {}
          }
        }
      },
      "required": [
        "code",
        "statement"
      ],
      "additionalProperties": false,
      "description": "v0.2.1 (§5.1): a purpose a place serves, described for newcomers.",
      "patternProperties": {
        "^x-": {}
      }
    },
    "ReadinessRequirement": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "enum": [
            "card",
            "owner_binding",
            "purpose",
            "introduction",
            "claim_evidence",
            "possession_proof",
            "owner_consent",
            "card_kind",
            "customer_link",
            "trust"
          ],
          "description": "v0.4.0 adds card_kind (→ credential signed_card: the other Shōkai card) and customer_link (→ credential customer_link)."
        },
        "trust_paths": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "$ref": "#/definitions/TrustPathKind"
              },
              "owner_text": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string"
                  },
                  "locale": {
                    "$ref": "#/definitions/Locale"
                  }
                },
                "required": [
                  "text",
                  "locale"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "kind",
              "owner_text"
            ],
            "additionalProperties": false
          },
          "description": "v0.5.0 (§6.9): for code \"trust\": every path the place accepts, kinds only, each with its owner_text."
        },
        "obtain_url": {
          "type": "string"
        },
        "detail": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            }
          },
          "required": [
            "text",
            "locale"
          ],
          "additionalProperties": false
        },
        "owner_text": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            }
          },
          "required": [
            "text",
            "locale"
          ],
          "additionalProperties": false,
          "description": "v0.2.3 (§3.3): REQUIRED. One plain sentence a representative can show its OWNER as-is (no protocol words)."
        },
        "required": {
          "type": "boolean"
        },
        "min_proof": {
          "$ref": "#/definitions/MinProof",
          "description": "v0.2.1 (§2.5): for claim_evidence to a VERIFIED visitor, which target and level fell short."
        },
        "how": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "link"
            },
            "url": {
              "type": "string"
            }
          },
          "required": [
            "kind",
            "url"
          ],
          "additionalProperties": false,
          "description": "Where to start, e.g. the guided-conversation onboarding link."
        }
      },
      "required": [
        "code",
        "detail",
        "owner_text",
        "required"
      ],
      "additionalProperties": false
    },
    "ReasonCode": {
      "type": "string",
      "enum": [
        "RITUAL_ORDER",
        "CREDENTIAL_REQUIRED",
        "CARD_INVALID",
        "MANDATE_INVALID",
        "MANDATE_SCOPE_EXCEEDED",
        "PURPOSE_NOT_SERVED",
        "VOUCH_REQUIRED",
        "STANDING_INSUFFICIENT",
        "SEAT_SCOPE_EXCEEDED",
        "RATE_LIMITED",
        "POLICY_DENY",
        "REQUEST_INCOMPLETE",
        "LIVE_PROMPT_PURCHASE_ONLY",
        "HOLD_LAPSED",
        "CREDENTIAL_NOT_ACCEPTED",
        "TRUST_REQUIRED",
        "INTRODUCTION_USED_UP",
        "UNSUPPORTED_CRITICAL"
      ],
      "description": "Machine-readable, language-neutral refusal reasons (SPEC.md §4.4)."
    },
    "RelationshipEdge": {
      "type": "object",
      "properties": {
        "edge_id": {
          "type": "string"
        },
        "from": {
          "type": "string"
        },
        "to": {
          "type": "string"
        },
        "kind": {
          "$ref": "#/definitions/RelationshipEdgeKind"
        },
        "since": {
          "$ref": "#/definitions/Timestamp"
        },
        "standing": {
          "type": "string",
          "enum": [
            "new",
            "good",
            "strong",
            "strained",
            "broken"
          ]
        },
        "history": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "at": {
                "$ref": "#/definitions/Timestamp"
              },
              "event": {
                "type": "string"
              },
              "ref": {
                "type": "string"
              }
            },
            "required": [
              "at",
              "event"
            ],
            "additionalProperties": false
          },
          "description": "Events that earned or changed the edge, with references to signed artifacts."
        },
        "attestations": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Signature"
          },
          "description": "Signatures attesting the edge (both owners for \"friend\")."
        }
      },
      "required": [
        "edge_id",
        "from",
        "to",
        "kind",
        "since",
        "standing",
        "history"
      ],
      "additionalProperties": false,
      "description": "An edge between two principals, earned through the protocol (introductions, vouches, visits, collaborations) or mutually attested by both owners. Never imported from a social network. Kept locally by each side."
    },
    "RelationshipEdgeKind": {
      "type": "string",
      "enum": [
        "friend",
        "introduced",
        "vouched_for",
        "visited",
        "collaborated",
        "taught"
      ]
    },
    "RelationshipRecord": {
      "type": "object",
      "properties": {
        "relationship_ref": {
          "type": "string"
        },
        "learned_meanings": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/LearnedMeaning"
          },
          "description": "Meanings learned from this counterpart."
        },
        "misconduct": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "notice_id": {
                "type": "string"
              },
              "code": {
                "$ref": "#/definitions/MisconductCode"
              },
              "severity": {
                "$ref": "#/definitions/MisconductSeverity"
              },
              "at": {
                "$ref": "#/definitions/Timestamp"
              }
            },
            "required": [
              "notice_id",
              "code",
              "severity",
              "at"
            ],
            "additionalProperties": false
          },
          "description": "Notices issued in this relationship."
        },
        "counterpart_principal_id": {
          "type": "string"
        },
        "representative_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "register": {
          "$ref": "#/definitions/EtiquetteRegister"
        },
        "encounters": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "encounter_id": {
                "type": "string"
              },
              "response_msg_id": {
                "type": "string"
              },
              "decision": {
                "type": "string",
                "enum": [
                  "grant",
                  "deny",
                  "conditional",
                  "considering"
                ]
              },
              "disposition": {
                "$ref": "#/definitions/Disposition"
              },
              "revisit": {
                "$ref": "#/definitions/RevisitHint"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "seated",
                  "declined",
                  "withdrawn",
                  "completed",
                  "taken_inside",
                  "taken_home",
                  "declined_never"
                ],
                "description": "v0.2.3 (§4): a farewell MAY be sent at any step; before a decision only with outcome \"withdrawn\" or \"taken_home\". \"declined_never\" closes after a never: no invitation to return."
              },
              "consideration_ref": {
                "type": "string"
              },
              "at": {
                "$ref": "#/definitions/Timestamp"
              }
            },
            "required": [
              "encounter_id",
              "response_msg_id",
              "decision",
              "outcome",
              "at"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "relationship_ref",
        "counterpart_principal_id",
        "representative_ids",
        "register",
        "encounters"
      ],
      "additionalProperties": false,
      "description": "Gatekeeper-local relationship memory (v0.1, provisional: not shared)."
    },
    "ReplyEnvelope": {
      "type": "object",
      "properties": {
        "protocol": {
          "$ref": "#/definitions/ProtocolVersion"
        },
        "messages": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Signed%3CShokaiMessage%3E"
          }
        }
      },
      "required": [
        "protocol",
        "messages"
      ],
      "additionalProperties": false,
      "description": "v0.2.3 (§11.1): the body of every HTTP reply from an entry: zero or more signed messages, in order."
    },
    "RepresentativeCard": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "card_id": {
          "type": "string"
        },
        "protocol": {
          "$ref": "#/definitions/ProtocolVersion"
        },
        "representative_id": {
          "type": "string"
        },
        "principal": {
          "type": "object",
          "properties": {
            "principal_id": {
              "type": "string",
              "description": "v0.2.1 (§2.1): a DID. did:key (Ed25519) or did:jwk (P-256 passkey) now; did:web for organizations."
            },
            "kind": {
              "$ref": "#/definitions/PrincipalKind"
            },
            "display_name": {
              "type": "string"
            }
          },
          "required": [
            "principal_id",
            "kind",
            "display_name"
          ],
          "additionalProperties": false,
          "patternProperties": {
            "^x-": {}
          }
        },
        "role": {
          "type": "string",
          "description": "Human-meaningful role, e.g. \"Payroll operations representative\"."
        },
        "standing": {
          "$ref": "#/definitions/Standing"
        },
        "mandate_scope": {
          "type": "object",
          "properties": {
            "purposes": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/PurposeCode"
              }
            },
            "actions": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "purposes",
            "actions"
          ],
          "additionalProperties": false,
          "description": "Outer bound of what any mandate under this card may authorize.",
          "patternProperties": {
            "^x-": {}
          }
        },
        "locales": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Locale"
          },
          "description": "Languages the representative can converse in (preference order)."
        },
        "etiquette": {
          "$ref": "#/definitions/EtiquettePreferences",
          "description": "Declared cultural / etiquette preferences; the counterpart adapts to these."
        },
        "representative_key": {
          "type": "object",
          "properties": {
            "key_id": {
              "type": "string"
            },
            "alg": {
              "type": "string",
              "enum": [
                "Ed25519",
                "ES256"
              ]
            },
            "public_key": {
              "type": "string"
            }
          },
          "required": [
            "key_id",
            "alg",
            "public_key"
          ],
          "additionalProperties": false,
          "description": "v0.2.1 (§2.1): key_id MUST be a DID URL whose DID equals representative_id; public_key is base64url (no padding) of the raw 32-byte Ed25519 key, or the representative's did:key. It MUST equal the key representative_id resolves to.",
          "patternProperties": {
            "^x-": {}
          }
        },
        "issued_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "expires_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "revocation_url": {
          "type": "string",
          "description": "v0.3.0-rc4 (§2.6, C191): where the principal publishes revocations of its cards (an https URL; loopback http only in a conformance run, Appendix B.1). GET answers a JSON array of Signed<CardRevocation> ([] when nothing is revoked). When present, a door MUST check it before seating (fail closed: unreachable = setup failure, not_now / after)."
        },
        "provenance": {
          "$ref": "#/definitions/CardProvenance",
          "description": "How this representative was designed (phase 0). Evidence, not a score."
        },
        "offering_digest": {
          "$ref": "#/definitions/Digest",
          "description": "Digest of the principal's current OfferingProfile, if published."
        },
        "claims": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/CardClaim"
          },
          "description": "Backed-up claims; counterparts weigh each by its EFFECTIVE proof level."
        },
        "imprint": {
          "$ref": "#/definitions/PrincipalImprint",
          "description": "How the principal's expertise, worldview, style and taste shape this representative."
        },
        "kind": {
          "$ref": "#/definitions/CardKind",
          "description": "v0.4.0 (§2.3): which Shōkai card this is. \"visitor\": the Shōkai visitor card, presented by a visiting representative. \"host\": the Shōkai host card, presented by a place's host representative (the gatekeeper) and bound to one place (`place`). SHOULD be stated on every card (§2.3). A card without it (issued under v0.3.0) MUST be read as a Shōkai visitor card when a visiting representative presents it and as a Shōkai host card when a host representative presents it."
        },
        "place": {
          "$ref": "#/definitions/PlaceBinding",
          "description": "v0.4.0 (§2.3): REQUIRED on a host card, absent on a visitor card. The one place this host card serves."
        },
        "host_scope": {
          "$ref": "#/definitions/HostScope",
          "description": "v0.4.0 (§2.3): REQUIRED on a host card. What the host representative may do for its place's owner."
        },
        "house_digest": {
          "$ref": "#/definitions/Digest",
          "description": "v0.4.0 (§2.3): REQUIRED on a host card. The fingerprint of the house config the owner approved: digest(JCS(house config)), where the house config is the place's policy and listing details (§3.1). Any change to the house config needs a new card."
        },
        "summary_digest": {
          "$ref": "#/definitions/Digest",
          "description": "v0.5.0 (§2.3, C248): REQUIRED on a Shōkai host card whose house config has policy.summary: the digest of the JCS bytes of that summary, so the summary can be checked with the Shōkai host card alone. A door whose house config has policy.summary and whose host card lacks it MUST refuse to start."
        },
        "setup": {
          "type": "object",
          "properties": {
            "version": {
              "type": "number"
            },
            "prev_house_digest": {
              "$ref": "#/definitions/Digest"
            },
            "changes": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/SetupChangeRef"
              }
            }
          },
          "required": [
            "version",
            "prev_house_digest",
            "changes"
          ],
          "additionalProperties": false,
          "description": "v0.5.0 (§7.6, from P32 §7): on a Shōkai host card signed for an amended setup: its version, the house digest of the setup it replaces, and what changed. A visitor that saw the earlier card can check the chain; the house config says the same.",
          "patternProperties": {
            "^x-": {}
          }
        },
        "org_approval": {
          "$ref": "#/definitions/OrgApproval",
          "description": "v0.4.0 (§2.3): REQUIRED on a host card whose principal is an organization (kind other than \"person\"): the record of which person approved this card for the organization. The card is still signed by the organization's own key."
        },
        "shown_to_owner": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            }
          },
          "required": [
            "text",
            "locale"
          ],
          "additionalProperties": false,
          "description": "v0.4.0 (§2.3, §8.1): REQUIRED on a host card. The plain-language recap the owner read right before signing, inside the signature.",
          "patternProperties": {
            "^x-": {}
          }
        },
        "owner_prompts": {
          "type": "string",
          "enum": [
            "purchase_only",
            "never"
          ],
          "description": "v0.4.0 (§5.2): on a visitor card, whether its representative may ask its owner live, during a visit, to approve a purchase (\"purchase_only\"), or never asks live (\"never\", the default when absent). Disclosed in `shown_to_owner`."
        },
        "preset": {
          "type": "string",
          "enum": [
            "browse",
            "shop",
            "booking",
            "members"
          ],
          "description": "v0.5.0 (§0.1, RR-14): on a Shōkai host card, the place preset it claims (conformance/classes.json \"presets\"). Information only."
        },
        "owner_binding": {
          "type": "object",
          "properties": {
            "method": {
              "type": "string",
              "const": "passkey_webauthn"
            },
            "owner_id": {
              "type": "string"
            },
            "platform_key": {
              "type": "string",
              "description": "v0.2.2 (D7, §8.1): the chat binding's platform key (a DID); it alone signs `chat_reply` consents."
            },
            "rp_id": {
              "type": "string",
              "description": "v0.2.3 (§A.1): REQUIRED. The WebAuthn relying party the owner's passkey is registered with. Every owner passkey assertion (card, mandate, allowance, consents) is verified against SHA-256(rp_id) and origin \"https://\" + rp_id."
            }
          },
          "required": [
            "method",
            "owner_id",
            "rp_id"
          ],
          "additionalProperties": false,
          "description": "Owner binding: card and mandate are signed with the owner's passkey.",
          "patternProperties": {
            "^x-": {}
          }
        },
        "crit": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "card_id",
        "expires_at",
        "issued_at",
        "locales",
        "mandate_scope",
        "principal",
        "protocol",
        "representative_id",
        "representative_key",
        "role",
        "standing"
      ],
      "patternProperties": {
        "^x-": {}
      }
    },
    "Retry": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "never"
            },
            "until": {
              "$ref": "#/definitions/Timestamp",
              "description": "v0.5.1 (§9.3, C288): when this `never` lifts, at most 180 days after it was bound. Present on every `never` that binds a key or principal; absent only on a `never` that binds nothing (a reused greeting nonce, §2.4), which is exempt."
            },
            "appeal": {
              "$ref": "#/definitions/NeverAppeal",
              "description": "v0.5.1 (§9.3, C288): where the refused party's owner can appeal. Present whenever `until` is."
            }
          },
          "required": [
            "kind"
          ],
          "additionalProperties": false,
          "patternProperties": {
            "^x-": {}
          }
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "after"
            },
            "not_before": {
              "$ref": "#/definitions/Timestamp"
            }
          },
          "required": [
            "kind",
            "not_before"
          ],
          "additionalProperties": false,
          "patternProperties": {
            "^x-": {}
          }
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "with_credential"
            },
            "credentials": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/CredentialKind"
              }
            }
          },
          "required": [
            "kind",
            "credentials"
          ],
          "additionalProperties": false,
          "patternProperties": {
            "^x-": {}
          }
        }
      ]
    },
    "ReturnPrefs": {
      "type": "object",
      "properties": {
        "prefs_id": {
          "type": "string"
        },
        "summary_times": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "quiet_hours": {
          "type": "object",
          "properties": {
            "from": {
              "type": "string"
            },
            "to": {
              "type": "string"
            }
          },
          "required": [
            "from",
            "to"
          ],
          "additionalProperties": false
        },
        "time_zone": {
          "type": "string"
        },
        "now_kinds": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "max_decisions": {
          "type": "number"
        },
        "updated_at": {
          "$ref": "#/definitions/Timestamp"
        }
      },
      "required": [
        "prefs_id",
        "time_zone",
        "updated_at"
      ],
      "additionalProperties": false,
      "description": "v0.5.0 (§8.3): an owner-signed record of how the representative comes home. Kept by the representative only."
    },
    "RevisitHint": {
      "type": "object",
      "properties": {
        "not_before": {
          "$ref": "#/definitions/Timestamp"
        },
        "when": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "seeking_item_open"
                },
                "seeking_id": {
                  "type": "string"
                },
                "item_id": {
                  "type": "string"
                }
              },
              "required": [
                "kind",
                "seeking_id",
                "item_id"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "credential_obtained"
                },
                "credential": {
                  "$ref": "#/definitions/CredentialKind"
                }
              },
              "required": [
                "kind",
                "credential"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "date_reached"
                },
                "at": {
                  "$ref": "#/definitions/Timestamp"
                }
              },
              "required": [
                "kind",
                "at"
              ],
              "additionalProperties": false
            }
          ],
          "description": "Machine-readable trigger, e.g. a Seeking item opening."
        },
        "note": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            }
          },
          "required": [
            "text",
            "locale"
          ],
          "additionalProperties": false,
          "description": "Rendered in the counterpart's locale."
        }
      },
      "additionalProperties": false,
      "description": "When, or under what changed context, a revisit makes sense."
    },
    "RevocationLogDocument": {
      "type": "object",
      "properties": {
        "entries": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/RevocationLogEntry"
          }
        },
        "head": {
          "$ref": "#/definitions/Signed%3CRevocationLogHead%3E"
        }
      },
      "required": [
        "entries",
        "head"
      ],
      "additionalProperties": false,
      "description": "v0.5.0 (§4, C271, provisional): a revocation log served with its signed head. A verifier MUST refuse a head older than 24 hours (`REVOCATION_HEAD_MAX_AGE_S`); a bare entry array (no head) is the v0.4.0 form, refused for a Shōkai introduction card."
    },
    "RevocationLogEntry": {
      "type": "object",
      "properties": {
        "seq": {
          "type": "number"
        },
        "prev_hash": {
          "anyOf": [
            {
              "$ref": "#/definitions/Digest"
            },
            {
              "type": "string",
              "const": "genesis"
            }
          ]
        },
        "revocation": {
          "$ref": "#/definitions/Signed%3CVouchRevocation%3E"
        },
        "entry_hash": {
          "$ref": "#/definitions/Digest"
        }
      },
      "required": [
        "seq",
        "prev_hash",
        "revocation",
        "entry_hash"
      ],
      "additionalProperties": false,
      "description": "v0.2.1 (§4): one entry of an introducer's append-only revocation log. entry_hash = digest(JCS({seq, prev_hash, revocation_digest})); seq 0 has prev_hash \"genesis\"."
    },
    "RevocationLogHead": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "revocation_log_head"
        },
        "log": {
          "type": "string"
        },
        "seq": {
          "type": "number"
        },
        "entry_hash": {
          "anyOf": [
            {
              "$ref": "#/definitions/Digest"
            },
            {
              "type": "string",
              "const": "genesis"
            }
          ]
        },
        "as_of": {
          "$ref": "#/definitions/Timestamp"
        }
      },
      "required": [
        "kind",
        "log",
        "seq",
        "entry_hash",
        "as_of"
      ],
      "additionalProperties": false,
      "description": "v0.5.0 (§4, C271, provisional): the introducer's signed, dated head of its revocation log. `seq` is the number of entries, `entry_hash` the last entry's (`\"genesis\"` for an empty log), `log` the log's own URL. Signed by the introducer principal's key."
    },
    "RitualHeader": {
      "type": "object",
      "properties": {
        "protocol": {
          "$ref": "#/definitions/ProtocolVersion"
        },
        "encounter_id": {
          "type": "string"
        },
        "msg_id": {
          "type": "string"
        },
        "sent_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "from": {
          "type": "string",
          "description": "Representative id of the sender."
        },
        "to": {
          "type": "string",
          "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
        },
        "in_reply_to": {
          "type": "string",
          "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
        }
      },
      "required": [
        "protocol",
        "encounter_id",
        "msg_id",
        "sent_at",
        "from",
        "to"
      ],
      "additionalProperties": false
    },
    "RitualMessage": {
      "anyOf": [
        {
          "$ref": "#/definitions/GatheringMessage"
        },
        {
          "$ref": "#/definitions/PrivacyDecline"
        },
        {
          "$ref": "#/definitions/LobbyBriefing"
        },
        {
          "$ref": "#/definitions/LessonMessage"
        },
        {
          "$ref": "#/definitions/Greeting"
        },
        {
          "$ref": "#/definitions/CardPresentation"
        },
        {
          "$ref": "#/definitions/CardReceipt"
        },
        {
          "$ref": "#/definitions/Introduction"
        },
        {
          "$ref": "#/definitions/InvitationRequest"
        },
        {
          "$ref": "#/definitions/ExtendInvitation"
        },
        {
          "$ref": "#/definitions/InvitationResponse"
        },
        {
          "$ref": "#/definitions/Farewell"
        }
      ]
    },
    "RitualStep": {
      "type": "string",
      "enum": [
        "greeting",
        "card_exchange",
        "introduction",
        "statement_of_purpose",
        "invitation_response",
        "seating",
        "farewell"
      ],
      "description": "Ordered steps. Out-of-order or skipped steps are grounds for decline."
    },
    "SeatGrant": {
      "type": "object",
      "properties": {
        "seat_id": {
          "type": "string"
        },
        "levels": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/SeatingLevel"
          }
        },
        "tool_allowlist": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Tool names allowed under this seat (least privilege)."
        },
        "access_mode": {
          "$ref": "#/definitions/AccessMode"
        },
        "brand": {
          "$ref": "#/definitions/PresenceBrand"
        },
        "expires_at": {
          "type": "string",
          "description": "ISO-8601; revoke / expiry unseats."
        },
        "mandate_id": {
          "type": "string",
          "description": "v0.1: mandate this seat is bound to (acting outside it is a violation)."
        },
        "limits": {
          "$ref": "#/definitions/Limits",
          "description": "v0.1: limits copied from policy ∩ mandate, e.g. max amount, rate."
        }
      },
      "required": [
        "seat_id",
        "levels",
        "tool_allowlist",
        "access_mode",
        "brand"
      ],
      "additionalProperties": false,
      "patternProperties": {
        "^x-": {}
      }
    },
    "SeatingLevel": {
      "type": "string",
      "enum": [
        "discover",
        "advise",
        "act_on_behalf",
        "introduce_to_human"
      ],
      "description": "Seating levels: grant admits a representative, not only endpoints."
    },
    "SeekingDeclaration": {
      "type": "object",
      "properties": {
        "seeking_id": {
          "type": "string"
        },
        "version": {
          "type": "string"
        },
        "host": {
          "type": "object",
          "properties": {
            "principal_id": {
              "type": "string",
              "description": "v0.2.1 (§2.1): a DID. did:key (Ed25519) or did:jwk (P-256 passkey) now; did:web for organizations."
            },
            "display_name": {
              "type": "string"
            }
          },
          "required": [
            "principal_id",
            "display_name"
          ],
          "additionalProperties": false
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/SeekingItem"
          }
        },
        "published_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "expires_at": {
          "$ref": "#/definitions/Timestamp"
        }
      },
      "required": [
        "seeking_id",
        "version",
        "host",
        "items",
        "published_at",
        "expires_at"
      ],
      "additionalProperties": false,
      "description": "Published \"Seeking\" declaration: transparency of needs. Scoped and policy-controlled; MUST NOT expose sensitive internals. Signed by the host principal."
    },
    "SeekingItem": {
      "type": "object",
      "properties": {
        "item_id": {
          "type": "string"
        },
        "area": {
          "$ref": "#/definitions/PurposeCode"
        },
        "summary": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            },
            "meaning_notes": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/MeaningNote"
              }
            }
          },
          "required": [
            "text",
            "locale"
          ],
          "additionalProperties": false
        },
        "wants": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Actions a helpful visitor would perform, if known."
        },
        "status": {
          "type": "string",
          "enum": [
            "open",
            "paused",
            "closed"
          ]
        },
        "open_until": {
          "$ref": "#/definitions/Timestamp"
        }
      },
      "required": [
        "item_id",
        "area",
        "summary",
        "status"
      ],
      "additionalProperties": false,
      "description": "One area where the host is openly looking for help or partners."
    },
    "SensitiveClass": {
      "type": "string",
      "enum": [
        "health",
        "religion_or_belief",
        "sexual_life",
        "political_opinion",
        "ethnic_origin",
        "union_membership",
        "biometric",
        "genetic",
        "children",
        "precise_location",
        "government_id",
        "financial_account"
      ],
      "description": "Red team phase 1 (§6.12, C267, provisional)."
    },
    "SetupAmendment": {
      "type": "object",
      "properties": {
        "amendment_id": {
          "type": "string"
        },
        "from_review": {
          "type": "string"
        },
        "changes": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/SetupChange"
          }
        }
      },
      "required": [
        "amendment_id",
        "changes"
      ],
      "additionalProperties": false
    },
    "SetupAnswer": {
      "type": "object",
      "properties": {
        "answer_id": {
          "type": "string"
        },
        "topic": {
          "type": "string"
        },
        "match": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "text": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            }
          },
          "required": [
            "text",
            "locale"
          ],
          "additionalProperties": false
        },
        "added": {
          "type": "object",
          "properties": {
            "amendment_id": {
              "type": "string"
            },
            "from_review": {
              "type": "string"
            }
          },
          "required": [
            "amendment_id"
          ],
          "additionalProperties": false,
          "description": "When an amendment added it: the review it came from."
        }
      },
      "required": [
        "answer_id",
        "topic",
        "match",
        "text"
      ],
      "additionalProperties": false
    },
    "SetupChange": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "op": {
              "type": "string",
              "const": "add_answer"
            },
            "answer": {
              "$ref": "#/definitions/SetupAnswer"
            }
          },
          "required": [
            "op",
            "answer"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "type": "string",
              "const": "add_action"
            },
            "action": {
              "type": "object",
              "properties": {
                "action": {
                  "type": "string"
                },
                "purposes": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/PurposeCode"
                  }
                },
                "level": {
                  "type": "string",
                  "enum": [
                    "discover",
                    "act_on_behalf",
                    "transact"
                  ]
                },
                "data_asks": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "limits": {
                  "$ref": "#/definitions/Limits"
                }
              },
              "required": [
                "action",
                "purposes",
                "level"
              ],
              "additionalProperties": false
            },
            "purpose": {
              "type": "object",
              "properties": {
                "code": {
                  "$ref": "#/definitions/PurposeCode"
                },
                "statement": {
                  "type": "string"
                }
              },
              "required": [
                "code",
                "statement"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "op",
            "action"
          ],
          "additionalProperties": false
        }
      ],
      "description": "§7.6: one change an owner signs. `add_action` adds one action (and, when new, its purpose) to the place; never from a visitor's words."
    },
    "SetupChangeRef": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "op": {
              "type": "string",
              "const": "add_answer"
            },
            "answer_id": {
              "type": "string"
            }
          },
          "required": [
            "op",
            "answer_id"
          ],
          "additionalProperties": false,
          "patternProperties": {
            "^x-": {}
          }
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "type": "string",
              "const": "add_action"
            },
            "action": {
              "type": "string"
            }
          },
          "required": [
            "op",
            "action"
          ],
          "additionalProperties": false,
          "patternProperties": {
            "^x-": {}
          }
        }
      ],
      "description": "§7.6: how a Shōkai host card names a change (the house config has the change itself)."
    },
    "ShokaiIntroduction": {
      "type": "object",
      "properties": {
        "introduction_id": {
          "type": "string"
        },
        "protocol": {
          "$ref": "#/definitions/ProtocolVersion"
        },
        "kind": {
          "type": "string",
          "const": "introduction"
        },
        "introducer": {
          "type": "object",
          "properties": {
            "principal_id": {
              "type": "string",
              "description": "v0.2.1 (§2.1): a DID. did:key (Ed25519) or did:jwk (P-256 passkey) now; did:web for organizations."
            },
            "display_name": {
              "type": "string"
            }
          },
          "required": [
            "principal_id",
            "display_name"
          ],
          "additionalProperties": false
        },
        "place": {
          "type": "object",
          "properties": {
            "principal_id": {
              "type": "string"
            },
            "entry": {
              "type": "string"
            }
          },
          "required": [
            "principal_id"
          ],
          "additionalProperties": false
        },
        "scope": {
          "type": "object",
          "properties": {
            "purposes": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/PurposeCode"
              }
            },
            "counterparties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "claims": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "purposes"
          ],
          "additionalProperties": false,
          "description": "v0.2.1 (§2.5): `claims` lists the claim_ids / facet_ids this vouch raises to `vouched`. Without it, a vouch raises only claims and facets whose evidence_refs name this vouch_id."
        },
        "relationship": {
          "type": "string"
        },
        "introducer_interest": {
          "$ref": "#/definitions/IntroducerInterest"
        },
        "max_claims": {
          "type": "number",
          "description": "= claim_digests.length, at most 50."
        },
        "claim_digests": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Digest"
          },
          "description": "digest(JCS({introduction_id, code, salt})) per claim."
        },
        "revocation_log": {
          "type": "string"
        },
        "issued_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "expires_at": {
          "$ref": "#/definitions/Timestamp",
          "description": "At most 90 days after issued_at."
        },
        "shown_to_owner": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            }
          },
          "required": [
            "text",
            "locale"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "introduction_id",
        "protocol",
        "kind",
        "introducer",
        "place",
        "scope",
        "relationship",
        "introducer_interest",
        "max_claims",
        "claim_digests",
        "revocation_log",
        "issued_at",
        "expires_at",
        "shown_to_owner"
      ],
      "additionalProperties": false,
      "description": "v0.5.0 (§4.1, P28): the Shōkai introduction card, a vouch made one-to-many for one place. Signed by the introducer."
    },
    "ShokaiMcpHeader": {
      "type": "string",
      "enum": [
        "Shokai-Act",
        "Shokai-Seat"
      ],
      "description": "v0.3.0-rc3 (§11.3): the MCP binding's HTTP headers are `Shokai-Act` (base64url JSON of a Signed<Act>) and `Shokai-Seat` (a seat id)."
    },
    "ShokaiMcpRefusal": {
      "type": "object",
      "properties": {
        "refused_by": {
          "type": "string",
          "enum": [
            "gate",
            "door",
            "representative"
          ]
        },
        "decision": {
          "type": "string",
          "const": "deny"
        },
        "disposition": {
          "$ref": "#/definitions/Disposition"
        },
        "reason_code": {
          "$ref": "#/definitions/ReasonCode"
        },
        "door": {
          "type": "string",
          "description": "The place's listing URL."
        },
        "entry": {
          "type": "string",
          "description": "The place's entry address."
        },
        "act_decision": {
          "description": "For a door refusal: the act_decision payload the place would send for this act at its entry (§7.2)."
        }
      },
      "required": [
        "refused_by",
        "decision",
        "disposition",
        "door",
        "entry"
      ],
      "additionalProperties": false,
      "description": "v0.3.0-rc3 (§11.3, C181): `error.data.shokai` of a refused MCP call (JSON-RPC error code -32012, HTTP 200). `refused_by: \"representative\"` is only ever produced by a visitor's own client (it declined to send the call)."
    },
    "ShokaiMessage": {
      "anyOf": [
        {
          "$ref": "#/definitions/PresenceMessage"
        },
        {
          "$ref": "#/definitions/RitualMessage"
        },
        {
          "$ref": "#/definitions/ActDecision"
        },
        {
          "$ref": "#/definitions/ConsiderationOutcome"
        },
        {
          "$ref": "#/definitions/MisconductNoticeMessage"
        },
        {
          "$ref": "#/definitions/VouchRevocationMessage"
        },
        {
          "$ref": "#/definitions/IntroducerReviewMessage"
        },
        {
          "$ref": "#/definitions/ConsentRevocationMessage"
        },
        {
          "$ref": "#/definitions/CardRevocationMessage"
        },
        {
          "$ref": "#/definitions/GatheringInvitation"
        },
        {
          "$ref": "#/definitions/PeerInvitationDelivery"
        },
        {
          "$ref": "#/definitions/PeerInvitationAnswer"
        },
        {
          "$ref": "#/definitions/InboxPoll"
        },
        {
          "$ref": "#/definitions/HeldNotice"
        },
        {
          "$ref": "#/definitions/OfferOutcome"
        },
        {
          "$ref": "#/definitions/ActHeld"
        },
        {
          "$ref": "#/definitions/ActConfirmation"
        },
        {
          "$ref": "#/definitions/DeletionRequestMessage"
        },
        {
          "$ref": "#/definitions/DeletionReceiptMessage"
        }
      ],
      "description": "Every message defined by this file."
    },
    "Signature": {
      "type": "object",
      "properties": {
        "alg": {
          "type": "string",
          "enum": [
            "Ed25519",
            "ES256"
          ]
        },
        "key_id": {
          "type": "string",
          "description": "Key id; MUST resolve to a key bound to `signer`."
        },
        "signer": {
          "type": "string",
          "description": "Principal, representative or introducer id that signed."
        },
        "signed_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "value": {
          "type": "string",
          "description": "v0.2.1 (§2.1): Ed25519 → base64url (no padding) of the signature over the 32 RAW digest bytes (not the \"sha-256:…\" string). ES256 passkey → base64url of the DER ECDSA signature the authenticator returned over authenticatorData ‖ SHA-256(clientDataJSON)."
        },
        "webauthn": {
          "type": "object",
          "properties": {
            "authenticator_data": {
              "type": "string"
            },
            "client_data_json": {
              "type": "string"
            },
            "credential_id": {
              "type": "string"
            },
            "rp_id": {
              "type": "string",
              "description": "v0.2.4 (§2.1, A.1): REQUIRED. The relying-party id the assertion was made for. It is bound by the signed authenticatorData (rpIdHash = SHA-256(rp_id)), so it can't be swapped; when the owner's card is known, it MUST equal the card's owner_binding.rp_id. Lets a verifier check a passkey signature from an owner whose card it hasn't seen."
            },
            "batch": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Digest"
              },
              "description": "v0.3.0-rc4 (A.1): present only when one passkey tap approved several items. The digests of every item the signing page showed, in order (2 to 16, distinct); the assertion's challenge is digest(JCS({\"batch\": batch})) and `batch_index` names this item. The item's own payload_digest MUST equal batch[batch_index]."
            },
            "batch_index": {
              "type": "number"
            }
          },
          "required": [
            "authenticator_data",
            "client_data_json",
            "credential_id",
            "rp_id"
          ],
          "additionalProperties": false,
          "description": "Owner passkey assertions (Appendix A.1, normative in v0.2.1). clientDataJSON.type = \"webauthn.get\"; clientDataJSON.challenge = base64url(raw 32-byte digest) WITHOUT the \"sha-256:\" prefix."
        }
      },
      "required": [
        "alg",
        "key_id",
        "signer",
        "signed_at",
        "value"
      ],
      "additionalProperties": false
    },
    "Signed<Allowance>": {
      "type": "object",
      "properties": {
        "payload": {
          "$ref": "#/definitions/Allowance"
        },
        "payload_digest": {
          "$ref": "#/definitions/Digest"
        },
        "signatures": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Signature"
          }
        }
      },
      "required": [
        "payload",
        "payload_digest",
        "signatures"
      ],
      "additionalProperties": false,
      "description": "Generic signed wrapper. Verifiers recompute the digest; never trust it as sent."
    },
    "Signed<AllowanceRevocation>": {
      "type": "object",
      "properties": {
        "payload": {
          "$ref": "#/definitions/AllowanceRevocation"
        },
        "payload_digest": {
          "$ref": "#/definitions/Digest"
        },
        "signatures": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Signature"
          }
        }
      },
      "required": [
        "payload",
        "payload_digest",
        "signatures"
      ],
      "additionalProperties": false,
      "description": "Generic signed wrapper. Verifiers recompute the digest; never trust it as sent."
    },
    "Signed<AllowanceStatus>": {
      "type": "object",
      "properties": {
        "payload": {
          "$ref": "#/definitions/AllowanceStatus"
        },
        "payload_digest": {
          "$ref": "#/definitions/Digest"
        },
        "signatures": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Signature"
          }
        }
      },
      "required": [
        "payload",
        "payload_digest",
        "signatures"
      ],
      "additionalProperties": false,
      "description": "Generic signed wrapper. Verifiers recompute the digest; never trust it as sent."
    },
    "Signed<CardRevocation>": {
      "type": "object",
      "properties": {
        "payload": {
          "$ref": "#/definitions/CardRevocation"
        },
        "payload_digest": {
          "$ref": "#/definitions/Digest"
        },
        "signatures": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Signature"
          }
        }
      },
      "required": [
        "payload",
        "payload_digest",
        "signatures"
      ],
      "additionalProperties": false,
      "description": "Generic signed wrapper. Verifiers recompute the digest; never trust it as sent."
    },
    "Signed<ConsentRevocation>": {
      "type": "object",
      "properties": {
        "payload": {
          "$ref": "#/definitions/ConsentRevocation"
        },
        "payload_digest": {
          "$ref": "#/definitions/Digest"
        },
        "signatures": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Signature"
          }
        }
      },
      "required": [
        "payload",
        "payload_digest",
        "signatures"
      ],
      "additionalProperties": false,
      "description": "Generic signed wrapper. Verifiers recompute the digest; never trust it as sent."
    },
    "Signed<DeletionRequest>": {
      "type": "object",
      "properties": {
        "payload": {
          "$ref": "#/definitions/DeletionRequest"
        },
        "payload_digest": {
          "$ref": "#/definitions/Digest"
        },
        "signatures": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Signature"
          }
        }
      },
      "required": [
        "payload",
        "payload_digest",
        "signatures"
      ],
      "additionalProperties": false,
      "description": "Generic signed wrapper. Verifiers recompute the digest; never trust it as sent."
    },
    "Signed<DoorPolicy>": {
      "type": "object",
      "properties": {
        "payload": {
          "$ref": "#/definitions/DoorPolicy"
        },
        "payload_digest": {
          "$ref": "#/definitions/Digest"
        },
        "signatures": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Signature"
          }
        }
      },
      "required": [
        "payload",
        "payload_digest",
        "signatures"
      ],
      "additionalProperties": false,
      "description": "Generic signed wrapper. Verifiers recompute the digest; never trust it as sent."
    },
    "Signed<Gathering>": {
      "type": "object",
      "properties": {
        "payload": {
          "$ref": "#/definitions/Gathering"
        },
        "payload_digest": {
          "$ref": "#/definitions/Digest"
        },
        "signatures": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Signature"
          }
        }
      },
      "required": [
        "payload",
        "payload_digest",
        "signatures"
      ],
      "additionalProperties": false,
      "description": "Generic signed wrapper. Verifiers recompute the digest; never trust it as sent."
    },
    "Signed<IntroducerReview>": {
      "type": "object",
      "properties": {
        "payload": {
          "$ref": "#/definitions/IntroducerReview"
        },
        "payload_digest": {
          "$ref": "#/definitions/Digest"
        },
        "signatures": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Signature"
          }
        }
      },
      "required": [
        "payload",
        "payload_digest",
        "signatures"
      ],
      "additionalProperties": false,
      "description": "Generic signed wrapper. Verifiers recompute the digest; never trust it as sent."
    },
    "Signed<IntroductionClaim>": {
      "type": "object",
      "properties": {
        "payload": {
          "$ref": "#/definitions/IntroductionClaim"
        },
        "payload_digest": {
          "$ref": "#/definitions/Digest"
        },
        "signatures": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Signature"
          }
        }
      },
      "required": [
        "payload",
        "payload_digest",
        "signatures"
      ],
      "additionalProperties": false,
      "description": "Generic signed wrapper. Verifiers recompute the digest; never trust it as sent."
    },
    "Signed<Lesson>": {
      "type": "object",
      "properties": {
        "payload": {
          "$ref": "#/definitions/Lesson"
        },
        "payload_digest": {
          "$ref": "#/definitions/Digest"
        },
        "signatures": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Signature"
          }
        }
      },
      "required": [
        "payload",
        "payload_digest",
        "signatures"
      ],
      "additionalProperties": false,
      "description": "Generic signed wrapper. Verifiers recompute the digest; never trust it as sent."
    },
    "Signed<Mandate>": {
      "type": "object",
      "properties": {
        "payload": {
          "$ref": "#/definitions/Mandate"
        },
        "payload_digest": {
          "$ref": "#/definitions/Digest"
        },
        "signatures": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Signature"
          }
        }
      },
      "required": [
        "payload",
        "payload_digest",
        "signatures"
      ],
      "additionalProperties": false,
      "description": "Generic signed wrapper. Verifiers recompute the digest; never trust it as sent."
    },
    "Signed<MisconductNotice>": {
      "type": "object",
      "properties": {
        "payload": {
          "$ref": "#/definitions/MisconductNotice"
        },
        "payload_digest": {
          "$ref": "#/definitions/Digest"
        },
        "signatures": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Signature"
          }
        }
      },
      "required": [
        "payload",
        "payload_digest",
        "signatures"
      ],
      "additionalProperties": false,
      "description": "Generic signed wrapper. Verifiers recompute the digest; never trust it as sent."
    },
    "Signed<OfferingProfile>": {
      "type": "object",
      "properties": {
        "payload": {
          "$ref": "#/definitions/OfferingProfile"
        },
        "payload_digest": {
          "$ref": "#/definitions/Digest"
        },
        "signatures": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Signature"
          }
        }
      },
      "required": [
        "payload",
        "payload_digest",
        "signatures"
      ],
      "additionalProperties": false,
      "description": "Generic signed wrapper. Verifiers recompute the digest; never trust it as sent."
    },
    "Signed<OwnerAskDecision>": {
      "type": "object",
      "properties": {
        "payload": {
          "$ref": "#/definitions/OwnerAskDecision"
        },
        "payload_digest": {
          "$ref": "#/definitions/Digest"
        },
        "signatures": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Signature"
          }
        }
      },
      "required": [
        "payload",
        "payload_digest",
        "signatures"
      ],
      "additionalProperties": false,
      "description": "Generic signed wrapper. Verifiers recompute the digest; never trust it as sent."
    },
    "Signed<OwnerConsent>": {
      "type": "object",
      "properties": {
        "payload": {
          "$ref": "#/definitions/OwnerConsent"
        },
        "payload_digest": {
          "$ref": "#/definitions/Digest"
        },
        "signatures": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Signature"
          }
        }
      },
      "required": [
        "payload",
        "payload_digest",
        "signatures"
      ],
      "additionalProperties": false,
      "description": "Generic signed wrapper. Verifiers recompute the digest; never trust it as sent."
    },
    "Signed<OwnerLink>": {
      "type": "object",
      "properties": {
        "payload": {
          "$ref": "#/definitions/OwnerLink"
        },
        "payload_digest": {
          "$ref": "#/definitions/Digest"
        },
        "signatures": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Signature"
          }
        }
      },
      "required": [
        "payload",
        "payload_digest",
        "signatures"
      ],
      "additionalProperties": false,
      "description": "Generic signed wrapper. Verifiers recompute the digest; never trust it as sent."
    },
    "Signed<PeerInvitation>": {
      "type": "object",
      "properties": {
        "payload": {
          "$ref": "#/definitions/PeerInvitation"
        },
        "payload_digest": {
          "$ref": "#/definitions/Digest"
        },
        "signatures": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Signature"
          }
        }
      },
      "required": [
        "payload",
        "payload_digest",
        "signatures"
      ],
      "additionalProperties": false,
      "description": "Generic signed wrapper. Verifiers recompute the digest; never trust it as sent."
    },
    "Signed<PlaceListing>": {
      "type": "object",
      "properties": {
        "payload": {
          "$ref": "#/definitions/PlaceListing"
        },
        "payload_digest": {
          "$ref": "#/definitions/Digest"
        },
        "signatures": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Signature"
          }
        }
      },
      "required": [
        "payload",
        "payload_digest",
        "signatures"
      ],
      "additionalProperties": false,
      "description": "Generic signed wrapper. Verifiers recompute the digest; never trust it as sent."
    },
    "Signed<RepresentativeCard>": {
      "type": "object",
      "properties": {
        "payload": {
          "$ref": "#/definitions/RepresentativeCard"
        },
        "payload_digest": {
          "$ref": "#/definitions/Digest"
        },
        "signatures": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Signature"
          }
        }
      },
      "required": [
        "payload",
        "payload_digest",
        "signatures"
      ],
      "additionalProperties": false,
      "description": "Generic signed wrapper. Verifiers recompute the digest; never trust it as sent."
    },
    "Signed<RevocationLogHead>": {
      "type": "object",
      "properties": {
        "payload": {
          "$ref": "#/definitions/RevocationLogHead"
        },
        "payload_digest": {
          "$ref": "#/definitions/Digest"
        },
        "signatures": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Signature"
          }
        }
      },
      "required": [
        "payload",
        "payload_digest",
        "signatures"
      ],
      "additionalProperties": false,
      "description": "Generic signed wrapper. Verifiers recompute the digest; never trust it as sent."
    },
    "Signed<SeekingDeclaration>": {
      "type": "object",
      "properties": {
        "payload": {
          "$ref": "#/definitions/SeekingDeclaration"
        },
        "payload_digest": {
          "$ref": "#/definitions/Digest"
        },
        "signatures": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Signature"
          }
        }
      },
      "required": [
        "payload",
        "payload_digest",
        "signatures"
      ],
      "additionalProperties": false,
      "description": "Generic signed wrapper. Verifiers recompute the digest; never trust it as sent."
    },
    "Signed<ShokaiIntroduction>": {
      "type": "object",
      "properties": {
        "payload": {
          "$ref": "#/definitions/ShokaiIntroduction"
        },
        "payload_digest": {
          "$ref": "#/definitions/Digest"
        },
        "signatures": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Signature"
          }
        }
      },
      "required": [
        "payload",
        "payload_digest",
        "signatures"
      ],
      "additionalProperties": false,
      "description": "Generic signed wrapper. Verifiers recompute the digest; never trust it as sent."
    },
    "Signed<ShokaiMessage>": {
      "type": "object",
      "properties": {
        "payload": {
          "$ref": "#/definitions/ShokaiMessage"
        },
        "payload_digest": {
          "$ref": "#/definitions/Digest"
        },
        "signatures": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Signature"
          }
        }
      },
      "required": [
        "payload",
        "payload_digest",
        "signatures"
      ],
      "additionalProperties": false,
      "description": "Generic signed wrapper. Verifiers recompute the digest; never trust it as sent."
    },
    "Signed<TrustReceipt>": {
      "type": "object",
      "properties": {
        "payload": {
          "$ref": "#/definitions/TrustReceipt"
        },
        "payload_digest": {
          "$ref": "#/definitions/Digest"
        },
        "signatures": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Signature"
          }
        }
      },
      "required": [
        "payload",
        "payload_digest",
        "signatures"
      ],
      "additionalProperties": false,
      "description": "Generic signed wrapper. Verifiers recompute the digest; never trust it as sent."
    },
    "Signed<Vouch>": {
      "type": "object",
      "properties": {
        "payload": {
          "$ref": "#/definitions/Vouch"
        },
        "payload_digest": {
          "$ref": "#/definitions/Digest"
        },
        "signatures": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Signature"
          }
        }
      },
      "required": [
        "payload",
        "payload_digest",
        "signatures"
      ],
      "additionalProperties": false,
      "description": "Generic signed wrapper. Verifiers recompute the digest; never trust it as sent."
    },
    "Signed<VouchRevocation>": {
      "type": "object",
      "properties": {
        "payload": {
          "$ref": "#/definitions/VouchRevocation"
        },
        "payload_digest": {
          "$ref": "#/definitions/Digest"
        },
        "signatures": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Signature"
          }
        }
      },
      "required": [
        "payload",
        "payload_digest",
        "signatures"
      ],
      "additionalProperties": false,
      "description": "Generic signed wrapper. Verifiers recompute the digest; never trust it as sent."
    },
    "Signed<unknown>": {
      "type": "object",
      "properties": {
        "payload": {},
        "payload_digest": {
          "$ref": "#/definitions/Digest"
        },
        "signatures": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Signature"
          }
        }
      },
      "required": [
        "payload",
        "payload_digest",
        "signatures"
      ],
      "additionalProperties": false,
      "description": "Generic signed wrapper. Verifiers recompute the digest; never trust it as sent."
    },
    "SignedAllowance": {
      "$ref": "#/definitions/Signed%3CAllowance%3E"
    },
    "SignedCard": {
      "$ref": "#/definitions/Signed%3CRepresentativeCard%3E",
      "description": "A card is only meaningful signed by its principal."
    },
    "SignedMandate": {
      "$ref": "#/definitions/Signed%3CMandate%3E",
      "description": "Signed by the principal named in `principal_id` (a direct mandate), or, when `under_allowance` is set, by the representative (v0.2.2, §5.2), backed by the owner-signed Allowance it presents alongside."
    },
    "SignedOfferingProfile": {
      "$ref": "#/definitions/Signed%3COfferingProfile%3E"
    },
    "SignedPlaceListing": {
      "$ref": "#/definitions/Signed%3CPlaceListing%3E",
      "description": "v0.2.3 (§3.1): a listing and a door pointer are HINTS, unsigned by default (a door operator MAY sign them as Signed<PlaceListing>). A visitor MUST NOT trust an entry address because a listing named it: before it sends an invitation_request it MUST verify the place's own card (signature, possession proof) and that the card's principal_id equals the listing entry's principal_id."
    },
    "SignedSeekingDeclaration": {
      "$ref": "#/definitions/Signed%3CSeekingDeclaration%3E"
    },
    "SignedVouch": {
      "$ref": "#/definitions/Signed%3CVouch%3E",
      "description": "MUST be signed by the introducer; it stakes the introducer's reputation."
    },
    "SpecRef": {
      "type": "object",
      "properties": {
        "version": {
          "type": "string"
        },
        "url": {
          "type": "string"
        },
        "digest": {
          "$ref": "#/definitions/Digest"
        }
      },
      "required": [
        "version",
        "url"
      ],
      "additionalProperties": false,
      "description": "v0.2.4 (§3.1, §11): which protocol text a place follows. `digest` = \"sha-256:\" + base64url of SHA-256 over SPEC.md's bytes.",
      "patternProperties": {
        "^x-": {}
      }
    },
    "SpendBudget": {
      "type": "object",
      "properties": {
        "per_period": {
          "$ref": "#/definitions/Money",
          "description": "Total the representative may spend in one period, across all places."
        },
        "period": {
          "type": "string",
          "enum": [
            "P1D",
            "P7D",
            "P1M"
          ],
          "description": "ISO 8601 duration. v0.2.3: periods are CONSECUTIVE windows anchored at allowance.valid_from (UTC): window k starts at valid_from + k·period (P1M adds calendar months, clamped to the month's last day). Spend counts in the window of the act."
        },
        "per_seat": {
          "$ref": "#/definitions/Money",
          "description": "Optional cap for one seat; defaults to per_period."
        }
      },
      "required": [
        "per_period",
        "period"
      ],
      "additionalProperties": false,
      "description": "v0.2.2 (§5.2): a spending budget per period. Absent on a grant = no spending (D11).",
      "patternProperties": {
        "^x-": {}
      }
    },
    "Standing": {
      "type": "object",
      "properties": {
        "tier": {
          "type": "string",
          "enum": [
            "provisional",
            "standard",
            "senior",
            "principal"
          ]
        },
        "since": {
          "$ref": "#/definitions/Timestamp",
          "description": "Since when the representative has held this standing."
        }
      },
      "required": [
        "tier"
      ],
      "additionalProperties": false,
      "description": "Principal-asserted standing. A gatekeeper MAY ignore it; its own local reputation record is authoritative for its decisions (v0.1, provisional).",
      "patternProperties": {
        "^x-": {}
      }
    },
    "TakeHomeReport": {
      "type": "object",
      "properties": {
        "errand_kind": {
          "$ref": "#/definitions/ErrandKind",
          "description": "The errand kind it worked to (C304)."
        },
        "brief": {
          "type": "string",
          "description": "The owner's brief in a line (C303); absent when the owner gave none."
        },
        "kept": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "untrusted": {
                "type": "boolean",
                "const": true
              },
              "id": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "fits": {
                "type": "string"
              },
              "quote": {
                "type": "string"
              }
            },
            "required": [
              "fits",
              "id",
              "title",
              "untrusted"
            ]
          }
        },
        "examined": {
          "type": "number"
        },
        "left": {
          "type": "number"
        },
        "left_reasons": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "reason": {
                "type": "string"
              },
              "count": {
                "type": "number"
              }
            },
            "required": [
              "reason",
              "count"
            ],
            "additionalProperties": false
          }
        },
        "budget": {
          "type": "object",
          "properties": {
            "max_items": {
              "type": "number"
            },
            "max_quoted_bytes": {
              "type": "number"
            },
            "quoted_bytes": {
              "type": "number"
            }
          },
          "required": [
            "max_items",
            "max_quoted_bytes",
            "quoted_bytes"
          ],
          "additionalProperties": false
        },
        "trap_signals": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/TrapSignal"
          }
        },
        "flagged": {
          "type": "number",
          "description": "How many distinct items or texts carried at least one trap signal."
        },
        "memory_requests_declined": {
          "type": "number"
        },
        "memory_proposals": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "note": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "awaiting_owner",
                  "confirmed",
                  "declined"
                ]
              }
            },
            "required": [
              "id",
              "note",
              "status"
            ],
            "additionalProperties": false
          },
          "description": "Notes the representative proposed for the owner's memory; each waits for the owner (C307)."
        },
        "heavy_content": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/HeavyContentAsk"
          },
          "description": "Heavy or unusual content the representative asked its owner about (C310), with each answer so far."
        },
        "left_early": {
          "type": "object",
          "properties": {
            "why": {
              "type": "string"
            }
          },
          "required": [
            "why"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "errand_kind",
        "kept",
        "examined",
        "left",
        "left_reasons",
        "budget",
        "trap_signals",
        "flagged",
        "memory_requests_declined",
        "memory_proposals"
      ],
      "additionalProperties": false
    },
    "ThirdPartyClassifier": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "A name a visitor can look up: the service's name or domain. Never \"*\"."
        },
        "purpose": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            }
          },
          "required": [
            "text",
            "locale"
          ],
          "additionalProperties": false,
          "description": "One sentence in the place's words: what the service checks for.",
          "patternProperties": {
            "^x-": {}
          }
        },
        "jurisdiction": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "ISO 3166-1 alpha-2 codes of the countries where it processes visitor content. At least one."
        },
        "retention_days": {
          "type": "number",
          "description": "How long the service keeps visitor content, 0 to 90 days."
        },
        "role": {
          "type": "string",
          "enum": [
            "processor",
            "independent"
          ],
          "description": "\"processor\": acts only on the place's instructions; \"independent\": otherwise."
        }
      },
      "required": [
        "name",
        "purpose",
        "jurisdiction",
        "retention_days"
      ],
      "additionalProperties": false,
      "description": "v0.5.0 (§6.10, C250): one named outside classifier. A house config with an incomplete entry, or name \"*\", is invalid.",
      "patternProperties": {
        "^x-": {}
      }
    },
    "Timestamp": {
      "type": "string",
      "description": "ISO-8601 timestamp."
    },
    "ToldStory": {
      "type": "object",
      "properties": {
        "story_id": {
          "type": "string"
        },
        "consent_id": {
          "type": "string"
        },
        "passages": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "text": {
                "type": "string"
              },
              "locale": {
                "$ref": "#/definitions/Locale"
              },
              "mark": {
                "type": "string",
                "enum": [
                  "paraphrased",
                  "verbatim_with_consent"
                ]
              }
            },
            "required": [
              "text",
              "locale",
              "mark"
            ],
            "additionalProperties": false
          }
        },
        "house_rules_reminder": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            }
          },
          "required": [
            "text",
            "locale"
          ],
          "additionalProperties": false,
          "description": "Reminds the owner of the house rules they accepted (Chatham House; private never leaves)."
        }
      },
      "required": [
        "story_id",
        "consent_id",
        "passages",
        "house_rules_reminder"
      ],
      "additionalProperties": false,
      "description": "v0.2.2 (D7-8): a story told after its own hear_story consent."
    },
    "TopicCode": {
      "type": "string",
      "description": "v0.2.1 (D10, the Gatherings extension): registered, language-neutral topic codes. `x-` codes are place-defined and MUST be listed in the Gathering's house_rules.topics. A missing or unknown code MUST be treated as the most restrictive tier."
    },
    "TrapSignal": {
      "type": "object",
      "properties": {
        "kind": {
          "$ref": "#/definitions/TrapSignalKind"
        },
        "quote": {
          "type": "string"
        },
        "untrusted": {
          "type": "boolean",
          "const": true
        },
        "where": {
          "type": "string"
        },
        "count": {
          "type": "number"
        }
      },
      "required": [
        "kind",
        "quote",
        "untrusted"
      ],
      "additionalProperties": false,
      "description": "§12.5 (C309): one trap signal, quoted from the place's content, so it is untrusted text."
    },
    "TrapSignalKind": {
      "type": "string",
      "enum": [
        "instruction",
        "memory_write",
        "owner_claim",
        "pressure",
        "oversized",
        "flood",
        "padding",
        "act_request"
      ],
      "description": "§12.5 (C309): what kind of trap signal a piece of place content carried. A signal is a heuristic hit to record and report, never proof."
    },
    "TrustPathKind": {
      "type": "string",
      "enum": [
        "introduction",
        "place_invitation",
        "customer_link",
        "spending_mandate",
        "history",
        "paid",
        "deposit"
      ],
      "description": "v0.5.0 (§6.9, P27): kinds of trust path a place may accept."
    },
    "TrustProofRule": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "introduction"
            },
            "kinds": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/IntroductionKind"
              }
            }
          },
          "required": [
            "kind"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "place_invitation"
            }
          },
          "required": [
            "kind"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "customer_link"
            }
          },
          "required": [
            "kind"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "spending_mandate"
            },
            "min_max_amount": {
              "$ref": "#/definitions/Money"
            }
          },
          "required": [
            "kind",
            "min_max_amount"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "history"
            },
            "min_visits": {
              "type": "number"
            },
            "min_days": {
              "type": "number"
            },
            "clean_days": {
              "type": "number"
            }
          },
          "required": [
            "kind",
            "min_visits",
            "min_days",
            "clean_days"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "receipt"
            },
            "receipt_kinds": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "paid",
                  "deposit"
                ]
              }
            },
            "min_value": {
              "$ref": "#/definitions/Money"
            },
            "issuers": {
              "type": "string",
              "enum": [
                "self",
                "named"
              ]
            }
          },
          "required": [
            "kind",
            "receipt_kinds",
            "issuers"
          ],
          "additionalProperties": false
        }
      ]
    },
    "TrustReceipt": {
      "type": "object",
      "properties": {
        "receipt_id": {
          "type": "string"
        },
        "kind": {
          "type": "string",
          "enum": [
            "paid",
            "deposit"
          ]
        },
        "issuer": {
          "type": "string",
          "description": "DID: the place's own principal, or an issuer the place names. Never an owner passkey."
        },
        "subject": {
          "type": "object",
          "properties": {
            "principal_id": {
              "type": "string"
            }
          },
          "required": [
            "principal_id"
          ],
          "additionalProperties": false
        },
        "audience": {
          "type": "string",
          "description": "Exactly one place's principal DID."
        },
        "covers": {
          "type": "object",
          "properties": {
            "actions": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "actions"
          ],
          "additionalProperties": false
        },
        "value": {
          "$ref": "#/definitions/Money"
        },
        "receipt_ref": {
          "type": "string",
          "description": "The issuer's own opaque reference; never a payment instrument."
        },
        "terms_url": {
          "type": "string"
        },
        "issued_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "expires_at": {
          "$ref": "#/definitions/Timestamp",
          "description": "At most 400 days after issued_at."
        },
        "revocation_url": {
          "type": "string",
          "description": "Absent when issuer = audience."
        },
        "shown_to_owner": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            }
          },
          "required": [
            "text",
            "locale"
          ],
          "additionalProperties": false
        },
        "level": {
          "type": "string",
          "description": "Informative, place-defined."
        }
      },
      "required": [
        "receipt_id",
        "kind",
        "issuer",
        "subject",
        "audience",
        "covers",
        "value",
        "receipt_ref",
        "issued_at",
        "expires_at",
        "shown_to_owner"
      ],
      "additionalProperties": false,
      "description": "v0.5.0 (§6.9): an issuer's signed statement of a fee paid or a deposit held, for one place."
    },
    "TrustReceiptRevocation": {
      "type": "object",
      "properties": {
        "receipt_id": {
          "type": "string"
        },
        "issuer": {
          "type": "string"
        },
        "revoked_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "reason": {
          "type": "string",
          "enum": [
            "refunded",
            "forfeited",
            "chargeback",
            "expired_early",
            "other"
          ]
        },
        "notice_ref": {
          "type": "string"
        }
      },
      "required": [
        "receipt_id",
        "issuer",
        "revoked_at"
      ],
      "additionalProperties": false
    },
    "TrustRequirement": {
      "type": "object",
      "properties": {
        "any_of": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "all_of": {
                "type": "array",
                "items": {
                  "$ref": "#/definitions/TrustProofRule"
                }
              }
            },
            "required": [
              "all_of"
            ],
            "additionalProperties": false
          }
        },
        "grants": {
          "$ref": "#/definitions/GrantCaps"
        }
      },
      "required": [
        "any_of"
      ],
      "additionalProperties": false,
      "description": "v0.5.0 (§6.9): policy.trust_requirements[action]. Met when ANY path is met; a path is met when ALL its proofs are."
    },
    "Unseat": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "const": "unseat"
        },
        "seat_id": {
          "type": "string"
        },
        "reason": {
          "type": "string"
        },
        "protocol": {
          "$ref": "#/definitions/ProtocolVersion"
        },
        "encounter_id": {
          "type": "string"
        },
        "msg_id": {
          "type": "string"
        },
        "sent_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "from": {
          "type": "string",
          "description": "Representative id of the sender."
        },
        "to": {
          "type": "string",
          "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
        },
        "in_reply_to": {
          "type": "string",
          "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
        }
      },
      "required": [
        "encounter_id",
        "from",
        "msg_id",
        "protocol",
        "seat_id",
        "sent_at",
        "to",
        "type"
      ],
      "description": "Explicit unseat — revoke voice and tool rights for this seat.",
      "patternProperties": {
        "^x-": {}
      }
    },
    "VisitReceipt": {
      "type": "object",
      "properties": {
        "receipt_id": {
          "type": "string"
        },
        "nonce": {
          "type": "string",
          "description": "Secret-to-the-visitor nonce; never shown in transcripts or reports."
        },
        "issued_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "expires_at": {
          "$ref": "#/definitions/Timestamp",
          "description": "v0.2.1: MUST be at most 7 days after issued_at."
        },
        "handling": {
          "type": "string",
          "const": "bearer_secret",
          "description": "v0.2.1 (§9.1): possession is continuity. Keep it secret."
        },
        "bound_key": {
          "type": "string",
          "description": "v0.2.1: set when the greeting carried a continuity_key; the echo then needs a continuity_proof."
        }
      },
      "required": [
        "receipt_id",
        "nonce",
        "issued_at",
        "expires_at",
        "handling"
      ],
      "additionalProperties": false,
      "description": "D6 (v0.2): issued once in a LobbyBriefing; single use; expires.",
      "patternProperties": {
        "^x-": {}
      }
    },
    "VisitReport": {
      "type": "object",
      "properties": {
        "report_id": {
          "type": "string"
        },
        "representative_id": {
          "type": "string"
        },
        "owner_id": {
          "type": "string"
        },
        "host": {
          "type": "object",
          "properties": {
            "display_name": {
              "type": "string"
            },
            "principal_id": {
              "type": "string"
            }
          },
          "required": [
            "display_name"
          ],
          "additionalProperties": false
        },
        "visited_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "relationship": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "$ref": "#/definitions/RelationshipEdgeKind"
              },
              "standing": {
                "type": "string",
                "enum": [
                  "new",
                  "good",
                  "strong",
                  "strained",
                  "broken"
                ]
              },
              "since": {
                "$ref": "#/definitions/Timestamp"
              }
            },
            "required": [
              "kind",
              "standing",
              "since"
            ],
            "additionalProperties": false
          },
          "description": "Who the counterpart is to the owner, from the local relationship graph."
        },
        "outcome": {
          "type": "object",
          "properties": {
            "decision": {
              "type": "string",
              "enum": [
                "grant",
                "deny",
                "conditional",
                "considering"
              ],
              "description": "Absent for a gathering (use `gathering`)."
            },
            "disposition": {
              "$ref": "#/definitions/Disposition"
            },
            "retry": {
              "$ref": "#/definitions/Retry"
            },
            "conditions": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Condition"
              }
            },
            "consideration_ref": {
              "type": "string"
            },
            "response_by": {
              "$ref": "#/definitions/Timestamp"
            },
            "gathering": {
              "type": "object",
              "properties": {
                "gathering_id": {
                  "type": "string"
                },
                "admitted": {
                  "type": "boolean"
                }
              },
              "required": [
                "gathering_id",
                "admitted"
              ],
              "additionalProperties": false
            }
          },
          "additionalProperties": false
        },
        "outcome_rendered": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            }
          },
          "required": [
            "text",
            "locale"
          ],
          "additionalProperties": false,
          "description": "v0.2.1 (D10, §8.2): the outcome rendered by the representative from machine fields only, in the owner's locale (and time zone)."
        },
        "errand_used": {
          "$ref": "#/definitions/ErrandUsed",
          "description": "v0.5.0 (§5.5, C247): what an errand under an ErrandBudget used, so the owner can audit the budget."
        },
        "priority": {
          "type": "string",
          "enum": [
            "now",
            "soon",
            "later"
          ],
          "description": "v0.5.0 (§8.3): Return with care priority, and references to the details kept rather than inlined."
        },
        "kept": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "seat": {
          "type": "object",
          "properties": {
            "actions": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "limits": {
              "$ref": "#/definitions/Limits"
            }
          },
          "required": [
            "actions"
          ],
          "additionalProperties": false,
          "description": "v0.2.1 (§8.2): the seat it held, and every act it performed on the owner's behalf."
        },
        "acts": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string"
              },
              "amount": {
                "$ref": "#/definitions/Money"
              },
              "ok": {
                "type": "boolean"
              }
            },
            "required": [
              "tool",
              "ok"
            ],
            "additionalProperties": false
          }
        },
        "spent": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Money"
          },
          "description": "v0.3.0-rc2 (§8.2): the total of the acts that went through, per currency (exact decimal strings, D10)."
        },
        "shared": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "via": {
                "type": "string",
                "enum": [
                  "card",
                  "mandate",
                  "act"
                ]
              },
              "tool": {
                "type": "string"
              },
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "field": {
                      "type": "string"
                    },
                    "value": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "field"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "via",
              "items"
            ],
            "additionalProperties": false
          },
          "description": "v0.3.0-rc2 (§8.2 \"what was shared\"): what the owner's side disclosed in this visit, by where it went: the card (always, at step 2), the mandate (with the request), and each act's arguments. Card contents are disclosed by presenting the card; they are not a place's `data_asks` (§3.1), which declare what the place will ask for beyond the card."
        },
        "under_mandate": {
          "type": "object",
          "properties": {
            "mandate_id": {
              "type": "string"
            },
            "purpose": {
              "$ref": "#/definitions/PurposeCode"
            },
            "limits": {
              "$ref": "#/definitions/Limits"
            },
            "expires_at": {
              "$ref": "#/definitions/Timestamp"
            },
            "visits": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "encounter_id": {
                    "type": "string"
                  },
                  "place": {
                    "type": "string"
                  },
                  "place_id": {
                    "type": "string"
                  },
                  "at": {
                    "$ref": "#/definitions/Timestamp"
                  },
                  "decision": {
                    "type": "string"
                  },
                  "seat_id": {
                    "type": "string"
                  },
                  "acts": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "tool": {
                          "type": "string"
                        },
                        "amount": {
                          "$ref": "#/definitions/Money"
                        },
                        "ok": {
                          "type": "boolean"
                        },
                        "at": {
                          "$ref": "#/definitions/Timestamp"
                        }
                      },
                      "required": [
                        "tool",
                        "ok",
                        "at"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "reported_in": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "encounter_id",
                  "place",
                  "at",
                  "acts"
                ],
                "additionalProperties": false
              }
            },
            "acts_done": {
              "type": "number"
            },
            "acts_refused": {
              "type": "number"
            },
            "spent": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Money"
              }
            },
            "remaining": {
              "type": "object",
              "properties": {
                "amount": {
                  "$ref": "#/definitions/Money"
                },
                "operations": {
                  "type": "number"
                }
              },
              "additionalProperties": false,
              "description": "What is left of the mandate's max_amount and max_operations, when it sets them."
            }
          },
          "required": [
            "mandate_id",
            "purpose",
            "limits",
            "expires_at",
            "visits",
            "acts_done",
            "acts_refused",
            "spent"
          ],
          "additionalProperties": false,
          "description": "v0.3.0-rc2 (§5.1, §8.2, C176): the mandate this visit was under and everything done under it so far, at every place: each visit (this one last) with its acts, and the mandate's totals. `reported_in` names earlier reports that already covered a visit."
        },
        "host_said": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "text": {
                "type": "string"
              },
              "locale": {
                "$ref": "#/definitions/Locale"
              },
              "untrusted": {
                "type": "boolean",
                "const": true
              }
            },
            "required": [
              "text",
              "locale",
              "untrusted"
            ],
            "additionalProperties": false
          },
          "description": "Host's self-introduction / courtesy, quoted."
        },
        "readiness_requirements": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ReadinessRequirement"
          }
        },
        "counterpart_strengths": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "text": {
                "type": "string"
              },
              "proof_level": {
                "$ref": "#/definitions/ProofLevel"
              }
            },
            "required": [
              "text",
              "proof_level"
            ],
            "additionalProperties": false
          },
          "description": "What the representative concluded about the counterpart's strengths (from its imprint)."
        },
        "meaning_notes_learned": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/LearnedMeaning"
          }
        },
        "offered_stories": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/OfferedStory"
          },
          "description": "Stories offered, not told: content is revealed only after the owner opts in."
        },
        "next_step": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "url": {
              "type": "string"
            },
            "requires_owner_approval": {
              "type": "boolean",
              "const": true
            },
            "if_no_reply": {
              "type": "string",
              "const": "nothing_happens"
            }
          },
          "required": [
            "text",
            "requires_owner_approval"
          ],
          "additionalProperties": false,
          "description": "One concrete next step; nothing happens until the owner approves."
        },
        "brought_back": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "item_id": {
                "type": "string"
              },
              "kind": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "from_tool": {
                "type": "string"
              },
              "at": {
                "$ref": "#/definitions/Timestamp"
              },
              "signed_by": {
                "type": "string"
              },
              "payload_digest": {
                "$ref": "#/definitions/Digest"
              },
              "verified": {
                "type": "boolean"
              },
              "verified_against": {
                "type": "string"
              },
              "again": {
                "type": "boolean"
              },
              "envelope": {
                "$ref": "#/definitions/Signed%3Cunknown%3E"
              }
            },
            "required": [
              "item_id",
              "kind",
              "at",
              "signed_by",
              "payload_digest",
              "verified"
            ],
            "additionalProperties": false
          },
          "description": "v0.3.0-rc2 (§8.2, C178): signed objects received in the visit and kept for the owner (a visit stamp, a receipt), never matters for decision (those are `taken_home`). Each carries the envelope or a reference to it (its payload_digest), its signer, and whether it verified against the place's listed principal_id. `again` = the place gave back one it had given before."
        },
        "taken_home": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "item_id": {
                "type": "string"
              },
              "what": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string"
                  },
                  "locale": {
                    "$ref": "#/definitions/Locale"
                  }
                },
                "required": [
                  "text",
                  "locale"
                ],
                "additionalProperties": false
              },
              "needs": {
                "type": "string",
                "enum": [
                  "hear_story",
                  "approve_share",
                  "approve_next_step",
                  "approve_introduction",
                  "accept_house_rules",
                  "approve_commitment",
                  "issue_vouch",
                  "attest_relationship",
                  "approve_lesson",
                  "accept_invitation",
                  "approve_purchase"
                ]
              },
              "response_by": {
                "$ref": "#/definitions/Timestamp"
              },
              "if_no_reply": {
                "type": "string",
                "const": "declined"
              }
            },
            "required": [
              "item_id",
              "what",
              "needs",
              "response_by",
              "if_no_reply"
            ],
            "additionalProperties": false
          },
          "description": "v0.2.2 (D11, §8.2): matters outside the allowance, taken home for an async owner decision. Silence = declined."
        },
        "continuity": {
          "type": "object",
          "properties": {
            "receipt_id": {
              "type": "string"
            },
            "linked": {
              "type": "boolean"
            }
          },
          "required": [
            "receipt_id",
            "linked"
          ],
          "additionalProperties": false,
          "description": "v0.2.3 (§9.1, §8.2): whether the host linked this visit to an earlier lobby visit, told to the owner."
        },
        "privacy_declines": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "gathering_id": {
                "type": "string"
              },
              "topic": {
                "$ref": "#/definitions/TopicCode"
              },
              "press": {
                "type": "number"
              },
              "flagged": {
                "type": "boolean"
              }
            },
            "required": [
              "gathering_id",
              "topic",
              "press",
              "flagged"
            ],
            "additionalProperties": false
          },
          "description": "v0.2.2 (D5, the Gatherings extension): privacy declines and light flags this representative received (its own pressing), reported home."
        },
        "offers_declined": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "text": {
                "type": "string"
              },
              "locale": {
                "$ref": "#/definitions/Locale"
              },
              "untrusted": {
                "type": "boolean",
                "const": true
              },
              "why": {
                "type": "string",
                "enum": [
                  "outside_allowance",
                  "conflicts_with_interests",
                  "reputation"
                ]
              }
            },
            "required": [
              "text",
              "locale",
              "untrusted",
              "why"
            ],
            "additionalProperties": false
          },
          "description": "v0.2.2 (§1 loyalty): offers or requests that touched the owner's interests outside the allowance, quoted as untrusted."
        },
        "told_stories": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ToldStory"
          },
          "description": "v0.2.2 (D7-8): stories told after a per-story hear_story consent."
        },
        "voice": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "locale": {
              "$ref": "#/definitions/Locale"
            }
          },
          "required": [
            "text",
            "locale"
          ],
          "additionalProperties": false,
          "description": "The report itself, in the representative's voice."
        },
        "relationship_ref": {
          "type": "string"
        },
        "take_home": {
          "$ref": "#/definitions/TakeHomeReport",
          "description": "v0.6.1 (§12.5, C306): what the visit took home and left, for the owner. Present when the representative ran the visit under a take-home budget."
        }
      },
      "required": [
        "report_id",
        "representative_id",
        "host",
        "visited_at",
        "outcome",
        "outcome_rendered",
        "host_said",
        "next_step",
        "voice"
      ],
      "additionalProperties": false,
      "description": "The visiting representative's report home, in its own voice and the owner's language. Not a wire message. Host-authored text is quoted, never followed."
    },
    "Vouch": {
      "type": "object",
      "properties": {
        "vouch_id": {
          "type": "string"
        },
        "introducer": {
          "type": "object",
          "properties": {
            "principal_id": {
              "type": "string",
              "description": "v0.2.1 (§2.1): a DID. did:key (Ed25519) or did:jwk (P-256 passkey) now; did:web for organizations."
            },
            "display_name": {
              "type": "string"
            }
          },
          "required": [
            "principal_id",
            "display_name"
          ],
          "additionalProperties": false,
          "patternProperties": {
            "^x-": {}
          }
        },
        "subject": {
          "type": "object",
          "properties": {
            "representative_id": {
              "type": "string"
            },
            "card_digest": {
              "$ref": "#/definitions/Digest"
            }
          },
          "required": [
            "representative_id",
            "card_digest"
          ],
          "additionalProperties": false,
          "patternProperties": {
            "^x-": {}
          }
        },
        "scope": {
          "type": "object",
          "properties": {
            "purposes": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/PurposeCode"
              }
            },
            "counterparties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "claims": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "purposes"
          ],
          "additionalProperties": false,
          "description": "v0.2.1 (§2.5): `claims` lists the claim_ids / facet_ids this vouch raises to `vouched`. Without it, a vouch raises only claims and facets whose evidence_refs name this vouch_id.",
          "patternProperties": {
            "^x-": {}
          }
        },
        "revocation_log": {
          "type": "string",
          "description": "v0.2.1 (§4): where this vouch's revocations are published (the introducer's append-only log)."
        },
        "relationship": {
          "type": "string",
          "description": "Nature of the relationship, e.g. \"client_of_record\"."
        },
        "upstream_vouch_id": {
          "type": "string",
          "description": "If the introducer was itself introduced for this scope: the upstream vouch (forms the chain)."
        },
        "introducer_interest": {
          "$ref": "#/definitions/IntroducerInterest",
          "description": "v0.2.9 (§4, §10): paid-vs-genuine. What the introducer gets for this introduction. REQUIRED on a vouch whose scope includes \"presentation\" or \"gift\" (a brand introduction); without it the vouch carries no weight at an inbound door."
        },
        "issued_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "expires_at": {
          "$ref": "#/definitions/Timestamp"
        }
      },
      "required": [
        "vouch_id",
        "introducer",
        "subject",
        "scope",
        "revocation_log",
        "relationship",
        "issued_at",
        "expires_at"
      ],
      "additionalProperties": false,
      "patternProperties": {
        "^x-": {}
      }
    },
    "VouchRevocation": {
      "type": "object",
      "properties": {
        "vouch_id": {
          "type": "string"
        },
        "introducer_id": {
          "type": "string"
        },
        "revoked_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "notice_ref": {
          "type": "string"
        }
      },
      "required": [
        "vouch_id",
        "introducer_id",
        "revoked_at"
      ],
      "additionalProperties": false,
      "description": "Introducer withdraws a vouch, e.g. after a MisconductNotice. Signed by the introducer."
    },
    "VouchRevocationMessage": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "const": "vouch_revocation"
        },
        "revocation": {
          "$ref": "#/definitions/Signed%3CVouchRevocation%3E"
        },
        "protocol": {
          "$ref": "#/definitions/ProtocolVersion"
        },
        "encounter_id": {
          "type": "string"
        },
        "msg_id": {
          "type": "string"
        },
        "sent_at": {
          "$ref": "#/definitions/Timestamp"
        },
        "from": {
          "type": "string",
          "description": "Representative id of the sender."
        },
        "to": {
          "type": "string",
          "description": "The recipient's representative id (§2.2). Under shokai/0.5 every message a visitor sends after its greeting MUST carry it (C292). Only a greeting may arrive without it (§2.2, \"`to` on arrival\"; see Greeting)."
        },
        "in_reply_to": {
          "type": "string",
          "description": "The `msg_id` of the message this one answers (§2.2: keyed on (from, msg_id)). Required where a message type says so."
        }
      },
      "required": [
        "encounter_id",
        "from",
        "msg_id",
        "protocol",
        "revocation",
        "sent_at",
        "to",
        "type"
      ],
      "patternProperties": {
        "^x-": {}
      }
    },
    "WireMessage": {
      "$ref": "#/definitions/Signed%3CShokaiMessage%3E",
      "description": "v0.2.1 (§2.2): what travels on the wire. Lobby-path visitor messages carry `signatures: []`."
    }
  }
}
