DocsThe data protocol

entryV2/v1

packages/core/schema/flower.schema.json
On this page

$defs.entryV2 of urn:petal:schema:flower:v1

Fields

Field Type or allowed values Presence in its parent Description
petal "flower/v2" Required
id string Required
title string Optional
spec object Required
spec.petal "spec/v1" Required
spec.network object Required
spec.network.id string Required
spec.network.chain string Required
spec.network.population string Required
spec.network.params object Optional
spec.network.params.* string Optional
spec.snapshot object Required
spec.snapshot.sha256 string Required
spec.snapshot.as_of string Required
spec.snapshot.block_height integer Optional
spec.labels choice Required
spec.labels (variant 1) "none" Required
spec.labels (variant 2) object Required
spec.labels (variant 2).sha256 string Required
spec.selection object Required
spec.selection.measure string Required
spec.selection.petals integer Required most petals to draw before the tail; a network with fewer included participants gets one petal each and no tail
spec.selection.tail object Required
spec.selection.tail.group boolean Required
spec.selection.tail.label string Required
spec.encodings object Required
spec.encodings.width object Required
spec.encodings.width.by string Required what drives the primitive, from the network's capabilities (e.g. share, kind, backers, identity_status)
spec.encodings.width.scale "sqrt" / "linear" / "log" / "log-band" / "equal" Optional
spec.encodings.width.max_ratio number Optional width only: widest side / narrowest side
spec.encodings.width.meaning string Required plain words shown in the legend
spec.encodings.width.sources array Required
spec.encodings.width.sources[] string Required
spec.encodings.height object Required
spec.encodings.height.by string Required what drives the primitive, from the network's capabilities (e.g. share, kind, backers, identity_status)
spec.encodings.height.scale "sqrt" / "linear" / "log" / "log-band" / "equal" Optional
spec.encodings.height.max_ratio number Optional width only: widest side / narrowest side
spec.encodings.height.meaning string Required plain words shown in the legend
spec.encodings.height.sources array Required
spec.encodings.height.sources[] string Required
spec.encodings.colour object Required
spec.encodings.colour.by string Required what drives the primitive, from the network's capabilities (e.g. share, kind, backers, identity_status)
spec.encodings.colour.scale "sqrt" / "linear" / "log" / "log-band" / "equal" Optional
spec.encodings.colour.max_ratio number Optional width only: widest side / narrowest side
spec.encodings.colour.meaning string Required plain words shown in the legend
spec.encodings.colour.sources array Required
spec.encodings.colour.sources[] string Required
spec.encodings.outline choice Required
spec.encodings.outline (variant 1) null Required
spec.encodings.outline (variant 2) object Required
spec.encodings.outline (variant 2).by string Required what drives the primitive, from the network's capabilities (e.g. share, kind, backers, identity_status)
spec.encodings.outline (variant 2).scale "sqrt" / "linear" / "log" / "log-band" / "equal" Optional
spec.encodings.outline (variant 2).max_ratio number Optional width only: widest side / narrowest side
spec.encodings.outline (variant 2).meaning string Required plain words shown in the legend
spec.encodings.outline (variant 2).sources array Required
spec.encodings.outline (variant 2).sources[] string Required
spec.encodings.segments choice Required
spec.encodings.segments (variant 1) null Required
spec.encodings.segments (variant 2) object Required
spec.encodings.segments (variant 2).by string Required what drives the primitive, from the network's capabilities (e.g. share, kind, backers, identity_status)
spec.encodings.segments (variant 2).scale "sqrt" / "linear" / "log" / "log-band" / "equal" Optional
spec.encodings.segments (variant 2).max_ratio number Optional width only: widest side / narrowest side
spec.encodings.segments (variant 2).meaning string Required plain words shown in the legend
spec.encodings.segments (variant 2).sources array Required
spec.encodings.segments (variant 2).sources[] string Required
spec.encodings.lines choice Optional
spec.encodings.lines (variant 1) null Optional
spec.encodings.lines (variant 2) object Optional
spec.encodings.lines (variant 2).by string Required what drives the primitive, from the network's capabilities (e.g. share, kind, backers, identity_status)
spec.encodings.lines (variant 2).scale "sqrt" / "linear" / "log" / "log-band" / "equal" Optional
spec.encodings.lines (variant 2).max_ratio number Optional width only: widest side / narrowest side
spec.encodings.lines (variant 2).meaning string Required plain words shown in the legend
spec.encodings.lines (variant 2).sources array Required
spec.encodings.lines (variant 2).sources[] string Required
spec.encodings.markings choice Optional
spec.encodings.markings (variant 1) null Optional
spec.encodings.markings (variant 2) object Optional
spec.encodings.markings (variant 2).by string Required what drives the primitive, from the network's capabilities (e.g. share, kind, backers, identity_status)
spec.encodings.markings (variant 2).scale "sqrt" / "linear" / "log" / "log-band" / "equal" Optional
spec.encodings.markings (variant 2).max_ratio number Optional width only: widest side / narrowest side
spec.encodings.markings (variant 2).meaning string Required plain words shown in the legend
spec.encodings.markings (variant 2).sources array Required
spec.encodings.markings (variant 2).sources[] string Required
spec.encodings.order object Required order is a primitive like any other: it declares what drives it, what it means, and its sources (constitution I)
spec.encodings.order.by "measure_desc" / "measure_asc" / "id" / "join_date" / "last_active" Required petals run clockwise from twelve o'clock in this order; default/v1 uses measure_desc
spec.encodings.order.meaning string Required plain words for the legend, e.g. 'largest first, clockwise from the top'
spec.encodings.order.sources array Required
spec.encodings.order.sources[] string Required
spec.convention object Required
spec.convention.id string Required default/v1, or a named convention
spec.convention.variation_of choice Required spec_sha256 of the spec this one changes
spec.convention.variation_of (variant 1) null Required
spec.convention.variation_of (variant 2) string Required
spec.convention.changes array Required
spec.convention.changes[] string Required
spec_sha256 string Required
interpretation object Required
interpretation.summary string Required
interpretation.power_means array Required
interpretation.power_means[] object Required
interpretation.power_means[].claim string Required
interpretation.power_means[].sources array Required
interpretation.power_means[].sources[] string Required
interpretation.power_means[].figures array Optional
interpretation.power_means[].figures[] string Required
interpretation.mappings array Required
interpretation.mappings[] object Required
interpretation.mappings[].primitive "width" / "height" / "colour" / "outline" / "segments" / "lines" / "markings" / "order" Required
interpretation.mappings[].why string Required
interpretation.mappings[].sources array Required
interpretation.mappings[].sources[] string Required
interpretation.conflicts array Required
interpretation.conflicts[] string Required
interpretation.unknowns array Required
interpretation.unknowns[] string Required
interpretation.inferred array Required
interpretation.inferred[] string Required
interpretation.documents array Required
interpretation.documents[] object Required
interpretation.documents[].id string Required
interpretation.documents[].kind "docs" / "forum" / "constitution" / "chain" / "news" / "other" Required
interpretation.documents[].url string Required
interpretation.documents[].title string Optional
interpretation.documents[].fetched_at string Required
snapshot object Required
snapshot.sha256 string Required
snapshot.urls array Required
snapshot.urls[] string Required
provenance object Required
provenance.maker choice Required null only for hero fixtures shipped in the repo
provenance.maker (variant 1) null Required
provenance.maker (variant 2) object Required
provenance.maker (variant 2).type "nep413" Required
provenance.maker (variant 2).account_id string Required
provenance.maker (variant 2).public_key string Required
provenance.maker (variant 2).signature string Required base64
provenance.maker (variant 2).message string Required JSON text: {"petal":"publish/v1","entry_sha256":"..."}
provenance.maker (variant 2).nonce string Required base64 of 32 bytes issued by Petals' server
provenance.maker (variant 2).recipient string Required
provenance.agent object Required
provenance.agent.kind "petal-agent" / "own-agent" / "hand-written" Required
provenance.agent.name string Optional e.g. claude-code, codex, ironclaw
provenance.agent.model string Optional
provenance.agent.signature choice Optional
provenance.agent.signature (variant 1) null Optional
provenance.agent.signature (variant 2) object Optional
provenance.agent.signature (variant 2).provider "near-ai-cloud" Required
provenance.agent.signature (variant 2).model string Required canonical model id, requested with x-no-aliasing: true
provenance.agent.signature (variant 2).completion_id string Required
provenance.agent.signature (variant 2).signature_kind "provider_tee" / "gateway" Required
provenance.agent.signature (variant 2).text string Required what was signed, as returned: model:sha256(request):sha256(response) for provider_tee
provenance.agent.signature (variant 2).signature string Required
provenance.agent.signature (variant 2).signing_address string Required
provenance.agent.signature (variant 2).signing_algo "ecdsa" / "ed25519" Required
provenance.agent.signature (variant 2).request_sha256 string Required
provenance.agent.signature (variant 2).response_sha256 string Required
provenance.agent.signature (variant 2).attestation object Optional the attestation report fetched before the completion, stored by Petals because the report endpoint needs a key
provenance.agent.signature (variant 2).attestation.nonce string Optional
provenance.agent.signature (variant 2).attestation.report_sha256 string Optional
provenance.agent.signature (variant 2).attestation.report_url string Optional where anyone can read the full report: Petals' API at /api/v1/attestations/<report_sha256> (http-api.md)
provenance.agent.signature (variant 2).fetched_at string Required
provenance.tools_version string Required
provenance.created_at string Required
drawn_with object Optional a receipt, outside what is hashed and signed: which renderer drew this when it was prepared, and the hash of those bytes. A drawing that differs from it later is normal.
drawn_with.render string Required
drawn_with.sha256 string Required

Examples

entry.v2.json

Fixture source

{
  "petal": "flower/v2",
  "id": "0123456789abcdef01234567",
  "title": "Two sample pools",
  "spec": {
    "petal": "spec/v1",
    "network": {
      "id": "sample-pools",
      "chain": "near:mainnet",
      "population": "validators"
    },
    "snapshot": {
      "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "as_of": "2026-11-03T19:42:00Z",
      "block_height": 222915356
    },
    "labels": "none",
    "selection": {
      "measure": "validator_stake_current_epoch",
      "petals": 60,
      "tail": {
        "group": true,
        "label": "everyone else"
      }
    },
    "encodings": {
      "width": {
        "by": "share",
        "scale": "log",
        "max_ratio": 2,
        "meaning": "share of stake, in a 2x band",
        "sources": [
          "rpc-validators"
        ]
      },
      "height": {
        "by": "share",
        "scale": "sqrt",
        "meaning": "square root of share",
        "sources": [
          "rpc-validators"
        ]
      },
      "colour": {
        "by": "kind",
        "meaning": "kind of account",
        "sources": [
          "rpc-validators"
        ]
      },
      "outline": {
        "by": "identity_status",
        "meaning": "solid: self-declared or verified; dashed: inferred",
        "sources": [
          "rpc-validators"
        ]
      },
      "segments": null,
      "order": {
        "by": "measure_desc",
        "meaning": "largest first, clockwise from the top",
        "sources": [
          "rpc-validators"
        ]
      }
    },
    "convention": {
      "id": "default/v1",
      "variation_of": null,
      "changes": []
    }
  },
  "spec_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
  "interpretation": {
    "summary": "Two pools hold all the stake; the larger holds two thirds of it.",
    "power_means": [
      {
        "claim": "Stake decides block production.",
        "sources": [
          "rpc-validators"
        ],
        "figures": [
          "fig:nakamoto"
        ]
      }
    ],
    "mappings": [
      {
        "primitive": "width",
        "why": "Stake is the power that counts here.",
        "sources": [
          "rpc-validators"
        ]
      }
    ],
    "conflicts": [],
    "unknowns": [
      "Who controls each pool is not known from the chain alone."
    ],
    "inferred": [],
    "documents": []
  },
  "snapshot": {
    "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "urls": [
      "/api/v1/snapshots/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
    ]
  },
  "provenance": {
    "maker": null,
    "agent": {
      "kind": "hand-written"
    },
    "tools_version": "tools/v1",
    "created_at": "2026-11-04T12:00:00Z"
  },
  "drawn_with": {
    "render": "render/v1",
    "sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
  }
}

Full schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:petal:schema:entryV2:v1",
  "title": "Petal entryV2 v1",
  "description": "$defs.entryV2 of urn:petal:schema:flower:v1",
  "$ref": "#/$defs/entryV2",
  "$defs": {
    "sha256": {
      "type": "string",
      "pattern": "^[0-9a-f]{64}$"
    },
    "datetime": {
      "type": "string",
      "format": "date-time"
    },
    "sourceIds": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "string"
      }
    },
    "encoding": {
      "type": "object",
      "required": [
        "by",
        "meaning",
        "sources"
      ],
      "additionalProperties": false,
      "properties": {
        "by": {
          "type": "string",
          "description": "what drives the primitive, from the network's capabilities (e.g. share, kind, backers, identity_status)"
        },
        "scale": {
          "enum": [
            "sqrt",
            "linear",
            "log",
            "log-band",
            "equal"
          ]
        },
        "max_ratio": {
          "type": "number",
          "minimum": 1,
          "maximum": 3,
          "description": "width only: widest side / narrowest side"
        },
        "meaning": {
          "type": "string",
          "minLength": 3,
          "description": "plain words shown in the legend"
        },
        "sources": {
          "$ref": "#/$defs/sourceIds"
        }
      }
    },
    "orderEncoding": {
      "type": "object",
      "required": [
        "by",
        "meaning",
        "sources"
      ],
      "additionalProperties": false,
      "description": "order is a primitive like any other: it declares what drives it, what it means, and its sources (constitution I)",
      "properties": {
        "by": {
          "enum": [
            "measure_desc",
            "measure_asc",
            "id",
            "join_date",
            "last_active"
          ],
          "description": "petals run clockwise from twelve o'clock in this order; default/v1 uses measure_desc"
        },
        "meaning": {
          "type": "string",
          "minLength": 3,
          "description": "plain words for the legend, e.g. 'largest first, clockwise from the top'"
        },
        "sources": {
          "$ref": "#/$defs/sourceIds"
        }
      }
    },
    "spec": {
      "type": "object",
      "required": [
        "petal",
        "network",
        "snapshot",
        "labels",
        "selection",
        "encodings",
        "convention"
      ],
      "additionalProperties": false,
      "properties": {
        "petal": {
          "const": "spec/v1"
        },
        "network": {
          "type": "object",
          "required": [
            "id",
            "chain",
            "population"
          ],
          "additionalProperties": false,
          "properties": {
            "id": {
              "type": "string"
            },
            "chain": {
              "type": "string"
            },
            "population": {
              "type": "string"
            },
            "params": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            }
          }
        },
        "snapshot": {
          "type": "object",
          "required": [
            "sha256",
            "as_of"
          ],
          "additionalProperties": false,
          "properties": {
            "sha256": {
              "$ref": "#/$defs/sha256"
            },
            "as_of": {
              "$ref": "#/$defs/datetime"
            },
            "block_height": {
              "type": "integer"
            }
          }
        },
        "labels": {
          "oneOf": [
            {
              "const": "none"
            },
            {
              "type": "object",
              "required": [
                "sha256"
              ],
              "additionalProperties": false,
              "properties": {
                "sha256": {
                  "$ref": "#/$defs/sha256"
                }
              }
            }
          ]
        },
        "selection": {
          "type": "object",
          "required": [
            "measure",
            "petals",
            "tail"
          ],
          "additionalProperties": false,
          "properties": {
            "measure": {
              "type": "string"
            },
            "petals": {
              "type": "integer",
              "minimum": 5,
              "maximum": 300,
              "description": "most petals to draw before the tail; a network with fewer included participants gets one petal each and no tail"
            },
            "tail": {
              "type": "object",
              "required": [
                "group",
                "label"
              ],
              "additionalProperties": false,
              "properties": {
                "group": {
                  "type": "boolean"
                },
                "label": {
                  "type": "string"
                }
              }
            }
          }
        },
        "encodings": {
          "type": "object",
          "required": [
            "width",
            "height",
            "colour",
            "outline",
            "segments",
            "order"
          ],
          "additionalProperties": false,
          "properties": {
            "width": {
              "$ref": "#/$defs/encoding"
            },
            "height": {
              "$ref": "#/$defs/encoding"
            },
            "colour": {
              "$ref": "#/$defs/encoding"
            },
            "outline": {
              "oneOf": [
                {
                  "type": "null"
                },
                {
                  "$ref": "#/$defs/encoding"
                }
              ]
            },
            "segments": {
              "oneOf": [
                {
                  "type": "null"
                },
                {
                  "$ref": "#/$defs/encoding"
                }
              ]
            },
            "lines": {
              "oneOf": [
                {
                  "type": "null"
                },
                {
                  "$ref": "#/$defs/encoding"
                }
              ]
            },
            "markings": {
              "oneOf": [
                {
                  "type": "null"
                },
                {
                  "$ref": "#/$defs/encoding"
                }
              ]
            },
            "order": {
              "$ref": "#/$defs/orderEncoding"
            }
          }
        },
        "convention": {
          "type": "object",
          "required": [
            "id",
            "variation_of",
            "changes"
          ],
          "additionalProperties": false,
          "properties": {
            "id": {
              "type": "string",
              "description": "default/v1, or a named convention"
            },
            "variation_of": {
              "oneOf": [
                {
                  "type": "null"
                },
                {
                  "$ref": "#/$defs/sha256"
                }
              ],
              "description": "spec_sha256 of the spec this one changes"
            },
            "changes": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "interpretation": {
      "type": "object",
      "required": [
        "summary",
        "power_means",
        "mappings",
        "conflicts",
        "unknowns",
        "inferred",
        "documents"
      ],
      "additionalProperties": false,
      "properties": {
        "summary": {
          "type": "string",
          "minLength": 20
        },
        "power_means": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "object",
            "required": [
              "claim",
              "sources"
            ],
            "additionalProperties": false,
            "properties": {
              "claim": {
                "type": "string"
              },
              "sources": {
                "$ref": "#/$defs/sourceIds"
              },
              "figures": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^fig:"
                }
              }
            }
          }
        },
        "mappings": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "object",
            "required": [
              "primitive",
              "why",
              "sources"
            ],
            "additionalProperties": false,
            "properties": {
              "primitive": {
                "enum": [
                  "width",
                  "height",
                  "colour",
                  "outline",
                  "segments",
                  "lines",
                  "markings",
                  "order"
                ]
              },
              "why": {
                "type": "string"
              },
              "sources": {
                "$ref": "#/$defs/sourceIds"
              }
            }
          }
        },
        "conflicts": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "unknowns": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "string"
          }
        },
        "inferred": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "documents": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "id",
              "kind",
              "url",
              "fetched_at"
            ],
            "additionalProperties": false,
            "properties": {
              "id": {
                "type": "string"
              },
              "kind": {
                "enum": [
                  "docs",
                  "forum",
                  "constitution",
                  "chain",
                  "news",
                  "other"
                ]
              },
              "url": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "fetched_at": {
                "$ref": "#/$defs/datetime"
              }
            }
          }
        }
      }
    },
    "nep413Proof": {
      "type": "object",
      "required": [
        "type",
        "account_id",
        "public_key",
        "signature",
        "message",
        "nonce",
        "recipient"
      ],
      "additionalProperties": false,
      "properties": {
        "type": {
          "const": "nep413"
        },
        "account_id": {
          "type": "string"
        },
        "public_key": {
          "type": "string",
          "pattern": "^ed25519:"
        },
        "signature": {
          "type": "string",
          "description": "base64"
        },
        "message": {
          "type": "string",
          "description": "JSON text: {\"petal\":\"publish/v1\",\"entry_sha256\":\"...\"}"
        },
        "nonce": {
          "type": "string",
          "description": "base64 of 32 bytes issued by Petals' server"
        },
        "recipient": {
          "type": "string"
        }
      }
    },
    "modelSignature": {
      "type": "object",
      "required": [
        "provider",
        "model",
        "completion_id",
        "signature_kind",
        "text",
        "signature",
        "signing_address",
        "signing_algo",
        "request_sha256",
        "response_sha256",
        "fetched_at"
      ],
      "additionalProperties": false,
      "properties": {
        "provider": {
          "const": "near-ai-cloud"
        },
        "model": {
          "type": "string",
          "description": "canonical model id, requested with x-no-aliasing: true"
        },
        "completion_id": {
          "type": "string"
        },
        "signature_kind": {
          "enum": [
            "provider_tee",
            "gateway"
          ]
        },
        "text": {
          "type": "string",
          "description": "what was signed, as returned: model:sha256(request):sha256(response) for provider_tee"
        },
        "signature": {
          "type": "string"
        },
        "signing_address": {
          "type": "string"
        },
        "signing_algo": {
          "enum": [
            "ecdsa",
            "ed25519"
          ]
        },
        "request_sha256": {
          "$ref": "#/$defs/sha256"
        },
        "response_sha256": {
          "$ref": "#/$defs/sha256"
        },
        "attestation": {
          "type": "object",
          "description": "the attestation report fetched before the completion, stored by Petals because the report endpoint needs a key",
          "additionalProperties": false,
          "properties": {
            "nonce": {
              "type": "string"
            },
            "report_sha256": {
              "$ref": "#/$defs/sha256"
            },
            "report_url": {
              "type": "string",
              "description": "where anyone can read the full report: Petals' API at /api/v1/attestations/<report_sha256> (http-api.md)"
            }
          }
        },
        "fetched_at": {
          "$ref": "#/$defs/datetime"
        }
      }
    },
    "correction": {
      "type": "object",
      "description": "a request to correct or remove an identity link or label (FR-022); key petal/v1/correction/<flower_id>/<id>; see shared-map.md",
      "required": [
        "petal",
        "id",
        "flower_id",
        "target",
        "request",
        "reason",
        "requester",
        "proof",
        "written_at"
      ],
      "additionalProperties": false,
      "properties": {
        "petal": {
          "const": "correction/v1"
        },
        "id": {
          "type": "string",
          "pattern": "^[0-9a-f]{24}$",
          "description": "first 24 hex of SHA-256 of the canonical request without id and proof"
        },
        "flower_id": {
          "type": "string",
          "pattern": "^[0-9a-f]{24}$"
        },
        "target": {
          "type": "object",
          "required": [
            "participant",
            "caip2",
            "address"
          ],
          "additionalProperties": false,
          "properties": {
            "participant": {
              "type": "string"
            },
            "caip2": {
              "type": "string"
            },
            "address": {
              "type": "string"
            },
            "label_key": {
              "type": "string"
            }
          }
        },
        "request": {
          "enum": [
            "correct",
            "remove"
          ]
        },
        "reason": {
          "type": "string",
          "minLength": 3
        },
        "evidence": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "kind",
              "url"
            ],
            "additionalProperties": false,
            "properties": {
              "kind": {
                "type": "string"
              },
              "url": {
                "type": "string"
              },
              "note": {
                "type": "string"
              }
            }
          }
        },
        "requester": {
          "type": "string",
          "description": "NEAR account of the person asking"
        },
        "proof": {
          "$ref": "#/$defs/nep413Proof"
        },
        "written_at": {
          "$ref": "#/$defs/datetime"
        }
      }
    },
    "entryProvenance": {
      "type": "object",
      "required": [
        "maker",
        "agent",
        "tools_version",
        "created_at"
      ],
      "additionalProperties": false,
      "properties": {
        "maker": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/nep413Proof"
            }
          ],
          "description": "null only for hero fixtures shipped in the repo"
        },
        "agent": {
          "type": "object",
          "required": [
            "kind"
          ],
          "additionalProperties": false,
          "properties": {
            "kind": {
              "enum": [
                "petal-agent",
                "own-agent",
                "hand-written"
              ]
            },
            "name": {
              "type": "string",
              "description": "e.g. claude-code, codex, ironclaw"
            },
            "model": {
              "type": "string"
            },
            "signature": {
              "oneOf": [
                {
                  "type": "null"
                },
                {
                  "$ref": "#/$defs/modelSignature"
                }
              ]
            }
          }
        },
        "tools_version": {
          "type": "string"
        },
        "created_at": {
          "$ref": "#/$defs/datetime"
        }
      }
    },
    "entrySnapshot": {
      "type": "object",
      "required": [
        "sha256",
        "urls"
      ],
      "additionalProperties": false,
      "properties": {
        "sha256": {
          "$ref": "#/$defs/sha256"
        },
        "urls": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "entryV1": {
      "type": "object",
      "description": "id and signature cover everything but id, render_sha256 included. Still read and verified, no longer written.",
      "required": [
        "petal",
        "id",
        "spec",
        "spec_sha256",
        "interpretation",
        "snapshot",
        "render_sha256",
        "provenance"
      ],
      "additionalProperties": false,
      "properties": {
        "petal": {
          "const": "flower/v1"
        },
        "id": {
          "type": "string",
          "pattern": "^[0-9a-f]{24}$"
        },
        "title": {
          "type": "string"
        },
        "spec": {
          "$ref": "#/$defs/spec"
        },
        "spec_sha256": {
          "$ref": "#/$defs/sha256"
        },
        "interpretation": {
          "$ref": "#/$defs/interpretation"
        },
        "snapshot": {
          "$ref": "#/$defs/entrySnapshot"
        },
        "render_sha256": {
          "$ref": "#/$defs/sha256"
        },
        "provenance": {
          "$ref": "#/$defs/entryProvenance"
        }
      }
    },
    "entryV2": {
      "type": "object",
      "description": "id and signature cover everything but id and drawn_with, so the same facts drawn by another renderer stay the same flower.",
      "required": [
        "petal",
        "id",
        "spec",
        "spec_sha256",
        "interpretation",
        "snapshot",
        "provenance"
      ],
      "additionalProperties": false,
      "properties": {
        "petal": {
          "const": "flower/v2"
        },
        "id": {
          "type": "string",
          "pattern": "^[0-9a-f]{24}$"
        },
        "title": {
          "type": "string"
        },
        "spec": {
          "$ref": "#/$defs/spec"
        },
        "spec_sha256": {
          "$ref": "#/$defs/sha256"
        },
        "interpretation": {
          "$ref": "#/$defs/interpretation"
        },
        "snapshot": {
          "$ref": "#/$defs/entrySnapshot"
        },
        "provenance": {
          "$ref": "#/$defs/entryProvenance"
        },
        "drawn_with": {
          "type": "object",
          "description": "a receipt, outside what is hashed and signed: which renderer drew this when it was prepared, and the hash of those bytes. A drawing that differs from it later is normal.",
          "required": [
            "render",
            "sha256"
          ],
          "additionalProperties": false,
          "properties": {
            "render": {
              "type": "string"
            },
            "sha256": {
              "$ref": "#/$defs/sha256"
            }
          }
        }
      }
    },
    "entry": {
      "description": "A published flower. Its `petal` says how to verify it (shared-map.md, Entry versions).",
      "oneOf": [
        {
          "$ref": "#/$defs/entryV1"
        },
        {
          "$ref": "#/$defs/entryV2"
        }
      ]
    }
  }
}