{
  "$defs": {
    "InternalInvitationTransaction": {
      "additionalProperties": false,
      "description": "The exact canonical bytes authorized by the sponsor and candidate.",
      "properties": {
        "candidate_binding_assurance": {
          "enum": [
            "lab",
            "os_bound",
            "hardware_bound"
          ],
          "title": "Candidate Binding Assurance",
          "type": "string"
        },
        "candidate_harness_display_name": {
          "maxLength": 128,
          "minLength": 1,
          "title": "Candidate Harness Display Name",
          "type": "string"
        },
        "candidate_harness_id": {
          "maxLength": 256,
          "minLength": 1,
          "title": "Candidate Harness Id",
          "type": "string"
        },
        "candidate_harness_kind": {
          "maxLength": 64,
          "minLength": 1,
          "title": "Candidate Harness Kind",
          "type": "string"
        },
        "candidate_key_id": {
          "maxLength": 256,
          "minLength": 16,
          "title": "Candidate Key Id",
          "type": "string"
        },
        "candidate_public_key_pem": {
          "maxLength": 16384,
          "minLength": 128,
          "title": "Candidate Public Key Pem",
          "type": "string"
        },
        "domain_id": {
          "maxLength": 256,
          "minLength": 1,
          "title": "Domain Id",
          "type": "string"
        },
        "domain_revocation_epoch": {
          "minimum": 1,
          "title": "Domain Revocation Epoch",
          "type": "integer"
        },
        "expires_at": {
          "format": "date-time",
          "title": "Expires At",
          "type": "string"
        },
        "invitation_id": {
          "maxLength": 128,
          "minLength": 16,
          "title": "Invitation Id",
          "type": "string"
        },
        "invited_oidc_issuer": {
          "maxLength": 512,
          "minLength": 1,
          "title": "Invited Oidc Issuer",
          "type": "string"
        },
        "invited_oidc_subject": {
          "maxLength": 512,
          "minLength": 1,
          "title": "Invited Oidc Subject",
          "type": "string"
        },
        "invited_verified_email": {
          "maxLength": 320,
          "minLength": 3,
          "title": "Invited Verified Email",
          "type": "string"
        },
        "max_uses": {
          "const": 1,
          "default": 1,
          "title": "Max Uses",
          "type": "integer"
        },
        "policy_revision": {
          "minimum": 1,
          "title": "Policy Revision",
          "type": "integer"
        },
        "predecessor_invitation_digest": {
          "anyOf": [
            {
              "pattern": "^[0-9a-f]{64}$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Predecessor Invitation Digest"
        },
        "predecessor_invitation_id": {
          "anyOf": [
            {
              "maxLength": 128,
              "minLength": 16,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Predecessor Invitation Id"
        },
        "predecessor_revision": {
          "anyOf": [
            {
              "minimum": 1,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Predecessor Revision"
        },
        "purpose": {
          "const": "internal_human_harness_invitation",
          "default": "internal_human_harness_invitation",
          "title": "Purpose",
          "type": "string"
        },
        "reason": {
          "maxLength": 512,
          "minLength": 1,
          "title": "Reason",
          "type": "string"
        },
        "requested_capabilities": {
          "items": {
            "type": "string"
          },
          "maxItems": 64,
          "title": "Requested Capabilities",
          "type": "array"
        },
        "schema_version": {
          "const": "1.0",
          "default": "1.0",
          "title": "Schema Version",
          "type": "string"
        },
        "sponsor_authority_id": {
          "maxLength": 256,
          "minLength": 1,
          "title": "Sponsor Authority Id",
          "type": "string"
        },
        "sponsor_authority_kind": {
          "enum": [
            "human",
            "guest"
          ],
          "title": "Sponsor Authority Kind",
          "type": "string"
        },
        "sponsor_credential_epoch": {
          "minimum": 1,
          "title": "Sponsor Credential Epoch",
          "type": "integer"
        },
        "sponsor_credential_id": {
          "maxLength": 256,
          "minLength": 1,
          "title": "Sponsor Credential Id",
          "type": "string"
        },
        "sponsor_harness_id": {
          "maxLength": 256,
          "minLength": 1,
          "title": "Sponsor Harness Id",
          "type": "string"
        }
      },
      "required": [
        "invitation_id",
        "domain_id",
        "sponsor_authority_kind",
        "sponsor_authority_id",
        "sponsor_harness_id",
        "sponsor_credential_id",
        "sponsor_credential_epoch",
        "invited_oidc_issuer",
        "invited_oidc_subject",
        "invited_verified_email",
        "candidate_harness_id",
        "candidate_harness_kind",
        "candidate_harness_display_name",
        "candidate_binding_assurance",
        "candidate_key_id",
        "candidate_public_key_pem",
        "requested_capabilities",
        "policy_revision",
        "domain_revocation_epoch",
        "expires_at",
        "reason"
      ],
      "title": "InternalInvitationTransaction",
      "type": "object"
    }
  },
  "$id": "https://agentnet.invalid/schemas/v1/internal-invitation-record.json",
  "additionalProperties": false,
  "properties": {
    "accepted_harness_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Accepted Harness Id"
    },
    "accepted_principal_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Accepted Principal Id"
    },
    "consumed_at": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Consumed At"
    },
    "created_at": {
      "format": "date-time",
      "title": "Created At",
      "type": "string"
    },
    "invitation_digest": {
      "pattern": "^[0-9a-f]{64}$",
      "title": "Invitation Digest",
      "type": "string"
    },
    "revision": {
      "minimum": 1,
      "title": "Revision",
      "type": "integer"
    },
    "revoked_at": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Revoked At"
    },
    "state": {
      "enum": [
        "active",
        "consumed",
        "revoked",
        "expired"
      ],
      "title": "State",
      "type": "string"
    },
    "transaction": {
      "$ref": "#/$defs/InternalInvitationTransaction"
    },
    "updated_at": {
      "format": "date-time",
      "title": "Updated At",
      "type": "string"
    },
    "use_count": {
      "enum": [
        0,
        1
      ],
      "title": "Use Count",
      "type": "integer"
    }
  },
  "required": [
    "transaction",
    "invitation_digest",
    "state",
    "revision",
    "use_count",
    "created_at",
    "updated_at"
  ],
  "title": "InternalInvitationRecord",
  "type": "object",
  "x-agentnet-schema-version": "1.0"
}
