[
  {
    "name": "Agent",
    "version": "1.1.1",
    "domain": "core.identity",
    "description": "An AI agent that acts inside a product, for the people and organizations it is granted to act for.",
    "tags": [
      "universal",
      "identity",
      "core",
      "agent"
    ],
    "maturity": "alpha",
    "traits": [
      {
        "name": "core/Actor",
        "alias": null,
        "parameters": {
          "kind": "agent"
        }
      },
      {
        "name": "lifecycle/Stateful",
        "alias": "AgentLifecycle",
        "parameters": {
          "states": [
            "draft",
            "active",
            "paused",
            "retired"
          ],
          "initialState": "draft"
        }
      },
      {
        "name": "structural/Ownerable",
        "alias": "AgentSponsor",
        "parameters": {
          "ownerTypes": [
            "user",
            "team"
          ],
          "primaryOwnerType": "user",
          "allowTransfer": true
        }
      },
      {
        "name": "core/Authable",
        "alias": "AgentRoles",
        "parameters": {
          "hierarchyDepthLimit": 5
        }
      },
      {
        "name": "lifecycle/Timestampable",
        "alias": "AgentAuditTrail",
        "parameters": {
          "recordedEvents": [
            "created",
            "activated",
            "paused",
            "retired",
            "updated"
          ],
          "timezone": "UTC"
        }
      }
    ],
    "schema": {
      "status": {
        "type": "string",
        "required": true,
        "description": "Canonical lifecycle state derived from the states parameter. This is the single source\nof truth for the entity's current lifecycle position. Consumed by Colorized to resolve\nvisual tokens, and by view extensions to render StatusBadge and StatusTimeline.\n",
        "validation": {
          "enumFromParameter": "states"
        }
      },
      "state_history": {
        "type": "StateTransition[]",
        "required": false,
        "description": "Chronological log of state transitions. Each entry records the before/after states,\ntimestamp, and (when governance is enabled) the actor, reason, and transition metadata.\nRendered by StatusTimeline in the detail and timeline views.\n\nEntry structure:\n  - from: string (previous state)\n  - to: string (new state)\n  - timestamp: ISO 8601 datetime\n  - actor_id: string (user/system who triggered the transition, optional)\n  - reason: string (human-readable justification, required when requireTransitionReason is true)\n  - transition_metadata: Record<string, unknown> (arbitrary context, optional)\n\nEvery recorded change can name who acted, who it acted for and who approved it. All optional,\nfollowing Relationship's source_id/source_name pattern; only a *_name names a party, and an entry that names\nno one renders as it always has:\n  - actor_name: string (who acted, as shown: \"Billing Agent\")\n  - actor_kind: string (person, agent or system: the Actor trait's kinds)\n  - on_behalf_of_name / on_behalf_of_id: string (the person or organization it acted for)\n  - approved_by_name / approved_by_id: string (who approved the change, when someone did)\nStatusTimeline then reads \"Billing Agent for Tidewater Co-op · approved by Ruth Adeyemi\".\n\nA change someone approved can also say which approval it belongs to and what level of yes it was. Both\noptional; the id stays in the record's data, a pointer and not a link, and an entry without them renders as it\nalways has:\n  - approval_id: string (the Approval record the yes is kept in)\n  - approval_level: string (the level of yes, one of the levels the product declares: \"approval\")\nStatusTimeline then reads \"Billing Agent for Tidewater Co-op · approved by Ruth Adeyemi (level: Approval)\".\n\nA change made as part of a task can also say which task it was. Both optional; the id stays in the record's\ndata, a pointer and not a link, and an entry without them renders as it always has:\n  - task_id: string (the Task record the change was made under)\n  - task_name: string (the task, as shown: \"Get INV-2026-0155 paid\")\nStatusTimeline then reads \"… · approved by Ruth Adeyemi (level: Approval) · task: Get INV-2026-0155 paid\".\n\nA change made under a grant, the standing yes an actor acts under for a person or organization, can also say\nwhich grant it was. Both optional; the id stays in the record's data, a pointer and not a link, and an entry\nwithout them renders as it always has:\n  - grant_id: string (the Grant record the change was made under)\n  - grant_name: string (the grant, as shown: \"Resend returned transfers\")\nStatusTimeline names the grant after any approval and before the task: \"Billing Agent for Tidewater Co-op ·\ngrant: Resend returned transfers\".\n",
        "default": []
      },
      "allowed_transitions": {
        "type": "string[]",
        "required": false,
        "description": "Materialized list of the next states the product allows from the current status, written\nby the product from the transitionRules parameter. When transitionRules is null (open model),\nthis contains all states except the current one. The detail page's StatusTimeline lists it\nwhen the record holds it. A generated StatusSelector reads transitionRules instead: it offers the\ncurrent state and the moves the order allows (every state where no order is declared).\n",
        "default": []
      },
      "owner_id": {
        "type": "string",
        "required": true,
        "description": "Identifier of the owning principal scoped by owner_type."
      },
      "owner_type": {
        "type": "string",
        "required": true,
        "description": "Categorical owner type sourced from the ownerTypes parameter.",
        "validation": {
          "enumFromParameter": "ownerTypes"
        }
      },
      "ownership_role": {
        "type": "string",
        "required": false,
        "description": "Optional role name describing how the owner governs the entity.",
        "validation": {
          "maxLength": 80
        }
      },
      "ownership_transferred_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp recording when ownership was last transferred."
      },
      "role_catalog": {
        "type": "AuthzRoleDocument[]",
        "required": true,
        "description": "Canonical RBAC roles (R21.2 Part 4.2 TABLE 1).",
        "examples": [
          [
            {
              "id": "11111111-1111-4111-8111-111111111111",
              "name": "Owner",
              "description": "Full tenant access + invoice approval (R21.2 Table 1)."
            },
            {
              "id": "22222222-2222-4222-8222-222222222222",
              "name": "Approver",
              "description": "Workflow approver for compliance-sensitive documents."
            },
            {
              "id": "33333333-3333-4333-8333-333333333333",
              "name": "Editor",
              "description": "Contributor allowed to create + update documents in scope."
            }
          ]
        ],
        "default": []
      },
      "permission_catalog": {
        "type": "AuthzPermissionDocument[]",
        "required": true,
        "description": "Atomic permissions following resource:action notation (TABLE 2).",
        "default": []
      },
      "role_permissions": {
        "type": "Record<string, string[]>",
        "required": true,
        "description": "Junction map for role→permission edges (TABLE 3).",
        "default": {}
      },
      "membership_records": {
        "type": "AuthzMembershipDocument[]",
        "required": true,
        "description": "SaaS membership triple (member, organization_id, role_id) with UNIQUE constraint (TABLE 4). The member is a user (user_id) or any other actor (actor_id with actor_kind, such as an agent), exactly one of the two.",
        "default": []
      },
      "role_hierarchy_edges": {
        "type": "AuthzRoleHierarchyEdge[]",
        "required": false,
        "description": "Parent→child adjacency list for hierarchical RBAC (Part 3.1).",
        "default": []
      },
      "session_roles": {
        "type": "string[]",
        "required": false,
        "description": "Materialized roles granted within the current session/token exchange.",
        "default": []
      },
      "created_at": {
        "type": "datetime",
        "required": true,
        "description": "Timestamp recording when the entity was first created."
      },
      "updated_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the most recent modification, when available."
      },
      "last_event": {
        "type": "string",
        "required": true,
        "description": "Lifecycle event associated with the most recent timestamp mutation.",
        "validation": {
          "enumFromParameter": "recordedEvents"
        }
      },
      "last_event_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the lifecycle event captured in last_event."
      },
      "agent_id": {
        "type": "uuid",
        "required": true,
        "description": "Primary identifier for the agent."
      },
      "name": {
        "type": "string",
        "required": true,
        "description": "The name the agent is shown by, in its own record and in every history it appears in.",
        "validation": {
          "minLength": 1,
          "maxLength": 80
        }
      },
      "description": {
        "type": "string",
        "required": false,
        "description": "What the agent is for, in one line.",
        "validation": {
          "maxLength": 160
        }
      },
      "provider": {
        "type": "string",
        "required": true,
        "description": "Who built or runs the agent."
      },
      "skills": {
        "type": "string",
        "required": true,
        "description": "What the agent can do, separated by \"; \" (Look up orders; Draft replies; Issue refunds)."
      },
      "acts_for": {
        "type": "string",
        "required": true,
        "description": "Who the agent acts for, one phrase per party restating the grant it holds for that party (organization · scope · until), separated by \"; \". A standing yes inside a grant is covered by the grant it sits in and is not restated."
      },
      "allowed_actions": {
        "type": "string",
        "required": true,
        "description": "Actions the agent may take with no one's yes, under any grant that allows them, separated by \"; \"; None when there are none."
      },
      "asks_first_for": {
        "type": "string",
        "required": true,
        "description": "Actions that need a person's yes before the agent takes them, asked each time or given in advance by a standing yes under a grant, separated by \"; \"; None when there are none."
      },
      "never_allowed": {
        "type": "string",
        "required": true,
        "description": "Actions nothing permits the agent to take, separated by \"; \"; None when there are none."
      },
      "owner_name": {
        "type": "string",
        "required": false,
        "description": "Display name of the person or team that sponsors the agent."
      }
    },
    "semantics": {
      "status": {
        "semantic_type": "status.state",
        "token_mapping": "tokenMap(status.state.*)",
        "ui_hints": {
          "component": "StatusBadge",
          "showIcon": true
        }
      },
      "state_history": {
        "semantic_type": "timeline.state_transition",
        "token_mapping": "tokenMap(timeline.status.*)",
        "ui_hints": {
          "component": "StatusTimeline",
          "collapseWhenEmpty": true
        }
      },
      "allowed_transitions": {
        "semantic_type": "status.navigation",
        "token_mapping": "computed",
        "ui_hints": {
          "component": "StatusSelector",
          "description": "The next states the product allows, as the product writes them; listed on the detail page, never used to disable an option."
        }
      },
      "owner_id": {
        "semantic_type": "ownership.owner.id",
        "token_mapping": "tokenMap(ownership.owner.id)",
        "ui_hints": {
          "component": "OwnerReference",
          "ownerTypeField": "owner_type",
          "displayLabelField": "owner_name"
        }
      },
      "owner_type": {
        "semantic_type": "ownership.owner.type",
        "token_mapping": "tokenMap(ownership.owner.type)",
        "ui_hints": {
          "component": "OwnerTypeBadge",
          "parameterSource": "ownerTypes"
        }
      },
      "ownership_role": {
        "semantic_type": "ownership.owner.role",
        "token_mapping": "tokenMap(ownership.owner.role)",
        "ui_hints": {
          "component": "OwnerRolePill"
        }
      },
      "ownership_transferred_at": {
        "semantic_type": "ownership.owner.transferred_at",
        "token_mapping": "tokenMap(ownership.owner.timestamp)",
        "ui_hints": {
          "component": "TimelineTimestamp"
        }
      },
      "membership_records": {
        "semantic_type": "authorization.memberships",
        "token_mapping": "tokenMap(authorization.memberships)",
        "ui_hints": {
          "component": "MembershipMatrix",
          "uniqueConstraint": "user_id|actor_id+organization_id+role_id"
        }
      },
      "role_catalog": {
        "semantic_type": "authorization.roles",
        "token_mapping": "tokenMap(authorization.roles)",
        "ui_hints": {
          "component": "RoleCatalogPanel"
        }
      },
      "permission_catalog": {
        "semantic_type": "authorization.permissions",
        "token_mapping": "tokenMap(authorization.permissions)",
        "ui_hints": {
          "component": "PermissionList"
        }
      },
      "created_at": {
        "semantic_type": "audit.created_at",
        "token_mapping": "tokenMap(audit.created)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "updated_at": {
        "semantic_type": "audit.updated_at",
        "token_mapping": "tokenMap(audit.updated)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone",
          "allowNullParameter": "allowNullUpdatedAt"
        }
      },
      "last_event": {
        "semantic_type": "audit.event.type",
        "token_mapping": "tokenMap(audit.event.*)",
        "ui_hints": {
          "component": "AuditBadge",
          "parameterSource": "recordedEvents"
        }
      },
      "last_event_at": {
        "semantic_type": "audit.event.timestamp",
        "token_mapping": "tokenMap(audit.event.timestamp)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "agent_id": {
        "semantic_type": "identity.agent.id",
        "token_mapping": "tokenMap(identity.id.primary)"
      },
      "name": {
        "semantic_type": "identity.agent.name",
        "token_mapping": "tokenMap(identity.name.primary)"
      },
      "description": {
        "semantic_type": "text.summary",
        "token_mapping": "tokenMap(identity.description.summary)"
      },
      "provider": {
        "semantic_type": "identity.agent.provider",
        "token_mapping": "tokenMap(text.body.*)"
      },
      "skills": {
        "semantic_type": "identity.agent.skills",
        "token_mapping": "tokenMap(text.body.*)"
      },
      "acts_for": {
        "semantic_type": "identity.agent.acts_for",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "valueLabels": {
            "None": "No party listed"
          }
        }
      },
      "allowed_actions": {
        "semantic_type": "identity.agent.approval.allowed",
        "token_mapping": "tokenMap(text.body.*)"
      },
      "asks_first_for": {
        "semantic_type": "identity.agent.approval.ask_first",
        "token_mapping": "tokenMap(text.body.*)"
      },
      "never_allowed": {
        "semantic_type": "identity.agent.approval.never",
        "token_mapping": "tokenMap(text.body.*)"
      }
    },
    "viewExtensions": {
      "list": [
        {
          "component": "Badge",
          "position": "after",
          "props": {
            "label": "Agent",
            "tone": "info"
          }
        },
        {
          "component": "StatusBadge",
          "props": {
            "field": "status",
            "tone": "lifecycle"
          }
        },
        {
          "component": "OwnerBadge",
          "props": {
            "ownerIdField": "owner_id",
            "ownerTypeField": "owner_type"
          }
        },
        {
          "component": "RoleBadgeList",
          "position": "after",
          "props": {
            "rolesField": "session_roles",
            "fallbackRoleParameter": "defaultRoleId"
          }
        },
        {
          "component": "RelativeTimestamp",
          "props": {
            "field": "updated_at",
            "fallbackField": "created_at",
            "timezoneParameter": "timezone"
          }
        }
      ],
      "card": [
        {
          "component": "Badge",
          "position": "before",
          "props": {
            "label": "Agent",
            "tone": "info"
          }
        },
        {
          "component": "StatusBadge",
          "position": "before",
          "props": {
            "field": "status",
            "variant": "subtle"
          }
        },
        {
          "component": "OwnershipMeta",
          "position": "after",
          "props": {
            "ownerIdField": "owner_id",
            "ownerTypeField": "owner_type",
            "roleField": "ownership_role"
          }
        }
      ],
      "detail": [
        {
          "component": "Badge",
          "position": "top",
          "priority": 90,
          "props": {
            "label": "Agent",
            "tone": "info"
          }
        },
        {
          "component": "MembershipPanel",
          "position": "main",
          "priority": 75,
          "props": {
            "membershipsField": "membership_records",
            "hierarchyField": "role_hierarchy_edges",
            "roleField": "role_catalog",
            "permissionField": "permission_catalog"
          }
        },
        {
          "component": "StatusTimeline",
          "position": "top",
          "priority": 40,
          "props": {
            "field": "status",
            "historyField": "state_history",
            "statesParameter": "states",
            "showActorId": true,
            "showReason": true
          }
        },
        {
          "component": "OwnershipSummary",
          "position": "top",
          "props": {
            "ownerIdField": "owner_id",
            "ownerTypeField": "owner_type",
            "roleField": "ownership_role",
            "transferredAtField": "ownership_transferred_at",
            "allowTransferParameter": "allowTransfer"
          }
        },
        {
          "component": "AuditTimeline",
          "position": "bottom",
          "props": {
            "createdField": "created_at",
            "updatedField": "updated_at",
            "eventField": "last_event",
            "eventTimestampField": "last_event_at",
            "eventOptionsParameter": "recordedEvents"
          }
        }
      ],
      "form": [
        {
          "component": "StatusSelector",
          "position": "top",
          "props": {
            "field": "status",
            "optionsParameter": "states",
            "initialParameter": "initialState",
            "allowedTransitionsField": "allowed_transitions",
            "requireReasonParameter": "requireTransitionReason"
          }
        },
        {
          "component": "RoleAssignmentForm",
          "position": "main",
          "props": {
            "availableRolesField": "role_catalog",
            "membershipField": "membership_records",
            "defaultRoleParameter": "defaultRoleId"
          }
        }
      ]
    },
    "tokens": {
      "status.state.default.bg": "var(--status-neutral-bg)",
      "status.state.default.text": "var(--status-neutral-text)",
      "status.timeline.connector": "var(--border-subtle)",
      "status.timeline.node.bg": "var(--sys-surface-raised)",
      "status.timeline.node.border": "var(--sys-border-default)",
      "status.timeline.actor.text": "var(--sys-text-secondary)",
      "status.timeline.reason.text": "var(--sys-text-tertiary)",
      "status.timeline.reason.bg": "var(--sys-surface-neutral)",
      "ownership.owner.badge.bg": "var(--surface-subtle)",
      "ownership.owner.badge.text": "var(--text-default)",
      "ownership.owner.role.text": "var(--text-muted)",
      "auth.roles.badge.bg": "var(--sys-surface-neutral)",
      "auth.roles.badge.text": "var(--sys-text-strong)",
      "auth.membership.card.border": "var(--sys-border-strong)",
      "auth.membership.card.bg": "var(--sys-surface-raised)",
      "audit.created.badge.text": "var(--text-subtle)",
      "audit.updated.badge.text": "var(--text-subtle)",
      "audit.event.badge.bg": "var(--surface-muted)",
      "identity.id.primary": "var(--text-strong)",
      "identity.name.primary": "var(--text-strong)",
      "identity.description.summary": "var(--text-subtle)"
    },
    "warnings": [],
    "filePath": "~/.oods-foundry/runtime/0.18.0-2b9c3aa471be/objects/core/Agent.object.yaml",
    "source": "shipped"
  },
  {
    "name": "Approval",
    "version": "1.1.2",
    "domain": "core.governance",
    "description": "One ask to one person or agent for a yes, about one version of one thing, and the answer it became.",
    "tags": [
      "universal",
      "governance",
      "core",
      "approval"
    ],
    "maturity": "alpha",
    "traits": [
      {
        "name": "core/Decision",
        "alias": null,
        "parameters": {
          "levels": [
            "acknowledgement",
            "review",
            "approval",
            "sign_off"
          ]
        }
      },
      {
        "name": "lifecycle/Stateful",
        "alias": "ApprovalAnswer",
        "parameters": {
          "states": [
            "not_yet_asked",
            "waiting",
            "approved",
            "declined",
            "out_of_date",
            "taken_back",
            "expired",
            "withdrawn",
            "not_needed",
            "used"
          ],
          "initialState": "not_yet_asked",
          "transitionRules": {
            "not_yet_asked": [
              "waiting",
              "withdrawn",
              "not_needed"
            ],
            "waiting": [
              "approved",
              "declined",
              "expired",
              "withdrawn",
              "not_needed"
            ],
            "approved": [
              "used",
              "out_of_date",
              "taken_back",
              "expired",
              "withdrawn",
              "not_needed"
            ],
            "declined": [],
            "out_of_date": [],
            "taken_back": [],
            "expired": [],
            "withdrawn": [],
            "not_needed": [],
            "used": []
          }
        }
      },
      {
        "name": "lifecycle/Timestampable",
        "alias": "ApprovalTimes",
        "parameters": {
          "recordedEvents": [
            "created",
            "asked",
            "answered",
            "ended",
            "updated"
          ],
          "timezone": "UTC"
        }
      }
    ],
    "schema": {
      "requested_by_id": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "Who asked for the yes, by the id the product knows them by."
      },
      "requested_by_name": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "Who asked, as shown (\"Billing Agent\"). Kept on the record."
      },
      "requested_by_kind": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "What kind of actor asked (person, agent or system), as the Actor trait names them.",
        "validation": {
          "enum": [
            "person",
            "agent",
            "system"
          ]
        }
      },
      "requested_for_id": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "Who the asker acted for, when an agent or a delegate asked for someone."
      },
      "requested_for_name": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "Who the asker acted for, as shown (\"Tidewater Co-op\"). Kept on the record."
      },
      "asked_of_id": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "Who was asked, by the id the product knows them by. One record is one ask to one actor."
      },
      "asked_of_name": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "Who was asked, as shown (\"Ruth Adeyemi\"). Kept on the record."
      },
      "answered_by_id": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "Who answered, when someone has. A delegate or an agent may answer for the one who was asked."
      },
      "answered_by_name": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "Who answered, as shown. Kept on the record."
      },
      "answered_by_kind": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "What kind of actor answered (person, agent or system), so a rule can say which levels an agent's yes may satisfy.",
        "validation": {
          "enum": [
            "person",
            "agent",
            "system"
          ]
        }
      },
      "answered_for_id": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "Who the answer was given for, when a delegate or an agent answered for the one who was asked."
      },
      "answered_for_name": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "Who the answer was given for, as shown. Kept on the record."
      },
      "subject_type": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "What kind of thing is approved (\"Transaction\", \"Article\")."
      },
      "subject_id": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "The thing approved, by the id the product calls it by (a payment's reference, an article's slug)."
      },
      "subject_name": {
        "type": "string",
        "required": true,
        "readOnly": true,
        "description": "The thing approved, as shown. Kept on the record, so it still reads after the thing is deleted."
      },
      "shown": {
        "type": "string",
        "required": true,
        "readOnly": true,
        "description": "Exactly what the person was shown, in one line, which is what a yes approves: for a document, its version\n(\"Version 3, saved 1 Jul 2026\"); for an agent's action, the action and its particulars, with anything it must do\ndifferently this time:\n\"Resend $12,000.00 by bank transfer for INV-2026-0155, with the invoice number in the reference\".\nA comment never changes it.\n",
        "validation": {
          "maxLength": 240
        }
      },
      "level": {
        "type": "string",
        "required": true,
        "readOnly": true,
        "description": "The level of yes asked for, one of the levels the product declares.",
        "validation": {
          "enumFromParameter": "levels"
        }
      },
      "meaning": {
        "type": "string",
        "required": true,
        "readOnly": true,
        "description": "What this yes means and permits, in words, kept on the record (\"Sign-off: you answer for this release\"). The\nproduct writes it when it asks; OODS Foundry keeps it and shows it.\n",
        "validation": {
          "maxLength": 240
        }
      },
      "asked_at": {
        "type": "datetime",
        "required": false,
        "readOnly": true,
        "description": "When the person was asked. Absent while the ask is not yet theirs.",
        "validation": {
          "format": "date-time"
        }
      },
      "due_at": {
        "type": "datetime",
        "required": false,
        "readOnly": true,
        "description": "When an answer is due, when the product sets a date.",
        "validation": {
          "format": "date-time"
        }
      },
      "answered_at": {
        "type": "datetime",
        "required": false,
        "readOnly": true,
        "description": "When the answer was given. Absent while it is waiting.",
        "validation": {
          "format": "date-time"
        }
      },
      "comment": {
        "type": "string",
        "required": false,
        "description": "What the person who answered said with their answer.",
        "validation": {
          "maxLength": 500
        }
      },
      "status": {
        "type": "string",
        "required": true,
        "description": "Canonical lifecycle state derived from the states parameter. This is the single source\nof truth for the entity's current lifecycle position. Consumed by Colorized to resolve\nvisual tokens, and by view extensions to render StatusBadge and StatusTimeline.\n",
        "validation": {
          "enumFromParameter": "states"
        }
      },
      "state_history": {
        "type": "StateTransition[]",
        "required": false,
        "description": "Chronological log of state transitions. Each entry records the before/after states,\ntimestamp, and (when governance is enabled) the actor, reason, and transition metadata.\nRendered by StatusTimeline in the detail and timeline views.\n\nEntry structure:\n  - from: string (previous state)\n  - to: string (new state)\n  - timestamp: ISO 8601 datetime\n  - actor_id: string (user/system who triggered the transition, optional)\n  - reason: string (human-readable justification, required when requireTransitionReason is true)\n  - transition_metadata: Record<string, unknown> (arbitrary context, optional)\n\nEvery recorded change can name who acted, who it acted for and who approved it. All optional,\nfollowing Relationship's source_id/source_name pattern; only a *_name names a party, and an entry that names\nno one renders as it always has:\n  - actor_name: string (who acted, as shown: \"Billing Agent\")\n  - actor_kind: string (person, agent or system: the Actor trait's kinds)\n  - on_behalf_of_name / on_behalf_of_id: string (the person or organization it acted for)\n  - approved_by_name / approved_by_id: string (who approved the change, when someone did)\nStatusTimeline then reads \"Billing Agent for Tidewater Co-op · approved by Ruth Adeyemi\".\n\nA change someone approved can also say which approval it belongs to and what level of yes it was. Both\noptional; the id stays in the record's data, a pointer and not a link, and an entry without them renders as it\nalways has:\n  - approval_id: string (the Approval record the yes is kept in)\n  - approval_level: string (the level of yes, one of the levels the product declares: \"approval\")\nStatusTimeline then reads \"Billing Agent for Tidewater Co-op · approved by Ruth Adeyemi (level: Approval)\".\n\nA change made as part of a task can also say which task it was. Both optional; the id stays in the record's\ndata, a pointer and not a link, and an entry without them renders as it always has:\n  - task_id: string (the Task record the change was made under)\n  - task_name: string (the task, as shown: \"Get INV-2026-0155 paid\")\nStatusTimeline then reads \"… · approved by Ruth Adeyemi (level: Approval) · task: Get INV-2026-0155 paid\".\n\nA change made under a grant, the standing yes an actor acts under for a person or organization, can also say\nwhich grant it was. Both optional; the id stays in the record's data, a pointer and not a link, and an entry\nwithout them renders as it always has:\n  - grant_id: string (the Grant record the change was made under)\n  - grant_name: string (the grant, as shown: \"Resend returned transfers\")\nStatusTimeline names the grant after any approval and before the task: \"Billing Agent for Tidewater Co-op ·\ngrant: Resend returned transfers\".\n",
        "default": []
      },
      "allowed_transitions": {
        "type": "string[]",
        "required": false,
        "description": "Materialized list of the next states the product allows from the current status, written\nby the product from the transitionRules parameter. When transitionRules is null (open model),\nthis contains all states except the current one. The detail page's StatusTimeline lists it\nwhen the record holds it. A generated StatusSelector reads transitionRules instead: it offers the\ncurrent state and the moves the order allows (every state where no order is declared).\n",
        "default": []
      },
      "created_at": {
        "type": "datetime",
        "required": true,
        "description": "Timestamp recording when the entity was first created."
      },
      "updated_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the most recent modification, when available."
      },
      "last_event": {
        "type": "string",
        "required": true,
        "description": "Lifecycle event associated with the most recent timestamp mutation.",
        "validation": {
          "enumFromParameter": "recordedEvents"
        }
      },
      "last_event_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the lifecycle event captured in last_event."
      },
      "approval_id": {
        "type": "uuid",
        "required": true,
        "description": "Primary identifier for the approval, the id a history entry's approval_id points at."
      },
      "name": {
        "type": "string",
        "required": true,
        "readOnly": true,
        "description": "What is asked, in a few words (\"Approve the resend of PAY-2026-0429\").",
        "validation": {
          "minLength": 1,
          "maxLength": 120
        }
      }
    },
    "semantics": {
      "requested_by_id": {
        "semantic_type": "decision.requested_by.id",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Asked by",
          "displayLabelField": "requested_by_name"
        }
      },
      "requested_by_name": {
        "semantic_type": "decision.requested_by.name",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Asked by"
        }
      },
      "requested_by_kind": {
        "semantic_type": "decision.requested_by.kind",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Kind of asker"
        }
      },
      "requested_for_id": {
        "semantic_type": "decision.requested_for.id",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Asked for",
          "displayLabelField": "requested_for_name"
        }
      },
      "requested_for_name": {
        "semantic_type": "decision.requested_for.name",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Asked for"
        }
      },
      "asked_of_id": {
        "semantic_type": "decision.asked_of.id",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Asked of",
          "displayLabelField": "asked_of_name"
        }
      },
      "asked_of_name": {
        "semantic_type": "decision.asked_of.name",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Asked of"
        }
      },
      "answered_by_id": {
        "semantic_type": "decision.answered_by.id",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Answered by",
          "displayLabelField": "answered_by_name"
        }
      },
      "answered_by_name": {
        "semantic_type": "decision.answered_by.name",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Answered by"
        }
      },
      "answered_by_kind": {
        "semantic_type": "decision.answered_by.kind",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Kind of answerer"
        }
      },
      "answered_for_id": {
        "semantic_type": "decision.answered_for.id",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Answered for",
          "displayLabelField": "answered_for_name"
        }
      },
      "answered_for_name": {
        "semantic_type": "decision.answered_for.name",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Answered for"
        }
      },
      "subject_type": {
        "semantic_type": "decision.subject.type",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Kind of thing"
        }
      },
      "subject_id": {
        "semantic_type": "decision.subject.id",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Approving",
          "displayLabelField": "subject_name"
        }
      },
      "subject_name": {
        "semantic_type": "decision.subject.name",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Approving"
        }
      },
      "shown": {
        "semantic_type": "text.summary",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "What was shown"
        }
      },
      "level": {
        "semantic_type": "decision.level",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Level",
          "enumLabels": {
            "sign_off": "Sign-off"
          }
        }
      },
      "meaning": {
        "semantic_type": "decision.meaning",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "What this yes means"
        }
      },
      "asked_at": {
        "semantic_type": "decision.asked_at",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "RelativeTimestamp",
          "label": "Asked"
        }
      },
      "due_at": {
        "semantic_type": "decision.due_at",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "RelativeTimestamp",
          "label": "Due"
        }
      },
      "answered_at": {
        "semantic_type": "decision.answered_at",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "RelativeTimestamp",
          "label": "Answered"
        }
      },
      "comment": {
        "semantic_type": "decision.comment",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Comment"
        }
      },
      "status": {
        "semantic_type": "status.state",
        "token_mapping": "tokenMap(status.state.*)",
        "ui_hints": {
          "component": "StatusBadge",
          "showIcon": true,
          "label": "Answer",
          "help": "This answer applies to what was shown above."
        }
      },
      "state_history": {
        "semantic_type": "timeline.state_transition",
        "token_mapping": "tokenMap(timeline.status.*)",
        "ui_hints": {
          "component": "StatusTimeline",
          "collapseWhenEmpty": true
        }
      },
      "allowed_transitions": {
        "semantic_type": "status.navigation",
        "token_mapping": "computed",
        "ui_hints": {
          "component": "StatusSelector",
          "description": "The next states the product allows, as the product writes them; listed on the detail page, never used to disable an option."
        }
      },
      "created_at": {
        "semantic_type": "audit.created_at",
        "token_mapping": "tokenMap(audit.created)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "updated_at": {
        "semantic_type": "audit.updated_at",
        "token_mapping": "tokenMap(audit.updated)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone",
          "allowNullParameter": "allowNullUpdatedAt"
        }
      },
      "last_event": {
        "semantic_type": "audit.event.type",
        "token_mapping": "tokenMap(audit.event.*)",
        "ui_hints": {
          "component": "AuditBadge",
          "parameterSource": "recordedEvents"
        }
      },
      "last_event_at": {
        "semantic_type": "audit.event.timestamp",
        "token_mapping": "tokenMap(audit.event.timestamp)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "approval_id": {
        "semantic_type": "governance.approval.id",
        "token_mapping": "tokenMap(identity.id.primary)"
      },
      "name": {
        "semantic_type": "text.label",
        "token_mapping": "tokenMap(identity.name.primary)"
      }
    },
    "viewExtensions": {
      "list": [
        {
          "component": "Text",
          "position": "after",
          "props": {
            "field": "level"
          }
        },
        {
          "component": "Text",
          "position": "after",
          "props": {
            "field": "asked_of_id"
          }
        },
        {
          "component": "StatusBadge",
          "props": {
            "field": "status",
            "tone": "lifecycle"
          }
        },
        {
          "component": "RelativeTimestamp",
          "props": {
            "field": "updated_at",
            "fallbackField": "created_at",
            "timezoneParameter": "timezone"
          }
        }
      ],
      "card": [
        {
          "component": "Text",
          "position": "after",
          "props": {
            "field": "level",
            "label": "Level"
          }
        },
        {
          "component": "Text",
          "position": "after",
          "props": {
            "field": "asked_of_id",
            "label": "Asked of"
          }
        },
        {
          "component": "StatusBadge",
          "position": "before",
          "props": {
            "field": "status",
            "variant": "subtle"
          }
        }
      ],
      "detail": [
        {
          "component": "Text",
          "position": "main",
          "priority": 80,
          "props": {
            "field": "subject_id"
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 79,
          "props": {
            "field": "subject_name"
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 78,
          "props": {
            "field": "subject_type"
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 77,
          "props": {
            "field": "shown"
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 76,
          "props": {
            "field": "level"
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 75,
          "props": {
            "field": "meaning"
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 74,
          "props": {
            "field": "requested_by_id"
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 73,
          "props": {
            "field": "requested_by_name"
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 72,
          "props": {
            "field": "requested_by_kind"
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 71,
          "props": {
            "field": "requested_for_id",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 70,
          "props": {
            "field": "requested_for_name"
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 69,
          "props": {
            "field": "asked_of_id"
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 68,
          "props": {
            "field": "asked_of_name"
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 67,
          "props": {
            "field": "answered_by_id"
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 66,
          "props": {
            "field": "answered_by_name"
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 65,
          "props": {
            "field": "answered_by_kind"
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 64,
          "props": {
            "field": "answered_for_id"
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 63,
          "props": {
            "field": "answered_for_name"
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 62,
          "props": {
            "field": "asked_at"
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 61,
          "props": {
            "field": "due_at"
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 60,
          "props": {
            "field": "answered_at"
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 59,
          "props": {
            "field": "comment"
          }
        },
        {
          "component": "StatusTimeline",
          "position": "top",
          "priority": 40,
          "props": {
            "field": "status",
            "historyField": "state_history",
            "statesParameter": "states",
            "showActorId": true,
            "showReason": true
          }
        },
        {
          "component": "AuditTimeline",
          "position": "bottom",
          "props": {
            "createdField": "created_at",
            "updatedField": "updated_at",
            "eventField": "last_event",
            "eventTimestampField": "last_event_at",
            "eventOptionsParameter": "recordedEvents"
          }
        }
      ],
      "form": [
        {
          "component": "Text",
          "position": "top",
          "priority": 80,
          "fact": true,
          "props": {
            "field": "subject_id"
          }
        },
        {
          "component": "Text",
          "position": "top",
          "priority": 79,
          "fact": true,
          "props": {
            "field": "subject_name"
          }
        },
        {
          "component": "Text",
          "position": "top",
          "priority": 78,
          "fact": true,
          "props": {
            "field": "shown"
          }
        },
        {
          "component": "Text",
          "position": "top",
          "priority": 77,
          "fact": true,
          "props": {
            "field": "level"
          }
        },
        {
          "component": "Text",
          "position": "top",
          "priority": 76,
          "fact": true,
          "props": {
            "field": "meaning"
          }
        },
        {
          "component": "Text",
          "position": "top",
          "priority": 75,
          "fact": true,
          "props": {
            "field": "requested_by_id"
          }
        },
        {
          "component": "Text",
          "position": "top",
          "priority": 74,
          "fact": true,
          "props": {
            "field": "requested_by_name"
          }
        },
        {
          "component": "Text",
          "position": "top",
          "priority": 73,
          "fact": true,
          "props": {
            "field": "requested_for_id"
          }
        },
        {
          "component": "Text",
          "position": "top",
          "priority": 72,
          "fact": true,
          "props": {
            "field": "requested_for_name"
          }
        },
        {
          "component": "StatusSelector",
          "position": "top",
          "props": {
            "field": "status",
            "optionsParameter": "states",
            "initialParameter": "initialState",
            "allowedTransitionsField": "allowed_transitions",
            "requireReasonParameter": "requireTransitionReason"
          }
        }
      ]
    },
    "tokens": {
      "status.state.default.bg": "var(--status-neutral-bg)",
      "status.state.default.text": "var(--status-neutral-text)",
      "status.timeline.connector": "var(--border-subtle)",
      "status.timeline.node.bg": "var(--sys-surface-raised)",
      "status.timeline.node.border": "var(--sys-border-default)",
      "status.timeline.actor.text": "var(--sys-text-secondary)",
      "status.timeline.reason.text": "var(--sys-text-tertiary)",
      "status.timeline.reason.bg": "var(--sys-surface-neutral)",
      "audit.created.badge.text": "var(--text-subtle)",
      "audit.updated.badge.text": "var(--text-subtle)",
      "audit.event.badge.bg": "var(--surface-muted)",
      "identity.id.primary": "var(--text-strong)",
      "identity.name.primary": "var(--text-strong)"
    },
    "warnings": [],
    "filePath": "~/.oods-foundry/runtime/0.18.0-2b9c3aa471be/objects/core/Approval.object.yaml",
    "source": "shipped"
  },
  {
    "name": "Article",
    "version": "1.1.0",
    "domain": "content.publication",
    "description": "Canonical editorial article with hybrid taxonomy + tag classification for CMS surfaces.",
    "tags": [
      "content",
      "article",
      "hybrid",
      "classifiable"
    ],
    "maturity": null,
    "traits": [
      {
        "name": "content/Labelled",
        "alias": "ArticleHeadline",
        "parameters": null
      },
      {
        "name": "lifecycle/Stateful",
        "alias": "ArticleWorkflow",
        "parameters": {
          "states": [
            "draft",
            "in_review",
            "scheduled",
            "published",
            "archived"
          ],
          "initialState": "draft"
        }
      },
      {
        "name": "lifecycle/Timestampable",
        "alias": "ArticleTimestamps",
        "parameters": {
          "recordedEvents": [
            "created",
            "scheduled",
            "published",
            "updated",
            "archived"
          ],
          "timezone": "UTC"
        }
      },
      {
        "name": "core/Classifiable",
        "alias": "ArticleClassification",
        "parameters": {
          "classification_mode": "hybrid",
          "hierarchy_storage_model": "materialized_path",
          "tag_policy": "moderated",
          "max_tags": 24,
          "require_primary_category": true
        }
      },
      {
        "name": "core/Approvable",
        "alias": "ArticleApprovals",
        "parameters": {
          "levels": [
            "review",
            "approval",
            "sign_off"
          ],
          "levelDefinitions": {
            "review": {
              "who": "Someone who knows the subject",
              "permits": "Nothing on its own; it counts toward the approval",
              "shown": "The version and what changed in it",
              "cost": "A mistake that the approver may still catch",
              "act": "A careful read, then one step",
              "lapses": "When the article changes"
            },
            "approval": {
              "who": "The lead whose readers the article serves",
              "permits": "Publishing the version they saw",
              "shown": "The version, as it will be published",
              "cost": "Wrong help in front of customers",
              "act": "A deliberate yes or no",
              "lapses": "When the article changes after the yes"
            },
            "sign_off": {
              "who": "Legal, for tax and legal content",
              "permits": "Publishing what the company answers for",
              "shown": "The version and what the yes means",
              "cost": "A legal statement the company did not mean to make",
              "act": "The most deliberate, with its meaning written down",
              "lapses": "Never for that version; a new version needs a new sign-off"
            }
          },
          "requiredLevels": {
            "publish_knowledge_base": "approval",
            "publish_how_to": "approval",
            "publish_announcement": "approval"
          }
        }
      }
    ],
    "relationships": [
      {
        "target": "User",
        "via": "author_id",
        "cardinality": "many-to-one",
        "label": "Author"
      },
      {
        "target": "Media",
        "via": "hero_media_id",
        "cardinality": "many-to-one",
        "label": "Hero media"
      }
    ],
    "schema": {
      "label": {
        "type": "string",
        "required": true,
        "description": "Human-readable display name rendered in primary surfaces.",
        "validation": {
          "minLength": 1,
          "maxLengthFromParameter": "maxLabelLength",
          "pattern": "^\\S.*\\S$|^\\S$"
        }
      },
      "description": {
        "type": "string",
        "required": false,
        "requiredFromParameter": "requireDescription",
        "description": "Supporting description used in detail and card contexts.",
        "validation": {
          "maxLengthFromParameter": "maxDescriptionLength"
        }
      },
      "placeholder": {
        "type": "string",
        "required": false,
        "description": "Hint copy surfaced in form fields when the label is empty.",
        "validation": {
          "maxLength": 80
        }
      },
      "status": {
        "type": "string",
        "required": true,
        "description": "Canonical lifecycle state derived from the states parameter. This is the single source\nof truth for the entity's current lifecycle position. Consumed by Colorized to resolve\nvisual tokens, and by view extensions to render StatusBadge and StatusTimeline.\n",
        "validation": {
          "enumFromParameter": "states"
        }
      },
      "state_history": {
        "type": "StateTransition[]",
        "required": false,
        "description": "Chronological log of state transitions. Each entry records the before/after states,\ntimestamp, and (when governance is enabled) the actor, reason, and transition metadata.\nRendered by StatusTimeline in the detail and timeline views.\n\nEntry structure:\n  - from: string (previous state)\n  - to: string (new state)\n  - timestamp: ISO 8601 datetime\n  - actor_id: string (user/system who triggered the transition, optional)\n  - reason: string (human-readable justification, required when requireTransitionReason is true)\n  - transition_metadata: Record<string, unknown> (arbitrary context, optional)\n\nEvery recorded change can name who acted, who it acted for and who approved it. All optional,\nfollowing Relationship's source_id/source_name pattern; only a *_name names a party, and an entry that names\nno one renders as it always has:\n  - actor_name: string (who acted, as shown: \"Billing Agent\")\n  - actor_kind: string (person, agent or system: the Actor trait's kinds)\n  - on_behalf_of_name / on_behalf_of_id: string (the person or organization it acted for)\n  - approved_by_name / approved_by_id: string (who approved the change, when someone did)\nStatusTimeline then reads \"Billing Agent for Tidewater Co-op · approved by Ruth Adeyemi\".\n\nA change someone approved can also say which approval it belongs to and what level of yes it was. Both\noptional; the id stays in the record's data, a pointer and not a link, and an entry without them renders as it\nalways has:\n  - approval_id: string (the Approval record the yes is kept in)\n  - approval_level: string (the level of yes, one of the levels the product declares: \"approval\")\nStatusTimeline then reads \"Billing Agent for Tidewater Co-op · approved by Ruth Adeyemi (level: Approval)\".\n\nA change made as part of a task can also say which task it was. Both optional; the id stays in the record's\ndata, a pointer and not a link, and an entry without them renders as it always has:\n  - task_id: string (the Task record the change was made under)\n  - task_name: string (the task, as shown: \"Get INV-2026-0155 paid\")\nStatusTimeline then reads \"… · approved by Ruth Adeyemi (level: Approval) · task: Get INV-2026-0155 paid\".\n\nA change made under a grant, the standing yes an actor acts under for a person or organization, can also say\nwhich grant it was. Both optional; the id stays in the record's data, a pointer and not a link, and an entry\nwithout them renders as it always has:\n  - grant_id: string (the Grant record the change was made under)\n  - grant_name: string (the grant, as shown: \"Resend returned transfers\")\nStatusTimeline names the grant after any approval and before the task: \"Billing Agent for Tidewater Co-op ·\ngrant: Resend returned transfers\".\n",
        "default": []
      },
      "allowed_transitions": {
        "type": "string[]",
        "required": false,
        "description": "Materialized list of the next states the product allows from the current status, written\nby the product from the transitionRules parameter. When transitionRules is null (open model),\nthis contains all states except the current one. The detail page's StatusTimeline lists it\nwhen the record holds it. A generated StatusSelector reads transitionRules instead: it offers the\ncurrent state and the moves the order allows (every state where no order is declared).\n",
        "default": []
      },
      "created_at": {
        "type": "datetime",
        "required": true,
        "description": "Timestamp recording when the entity was first created."
      },
      "updated_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the most recent modification, when available."
      },
      "last_event": {
        "type": "string",
        "required": true,
        "description": "Lifecycle event associated with the most recent timestamp mutation.",
        "validation": {
          "enumFromParameter": "recordedEvents"
        }
      },
      "last_event_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the lifecycle event captured in last_event."
      },
      "classification_metadata": {
        "type": "ClassificationMetadata",
        "required": true,
        "description": "Operational metadata describing mode, storage model, governance rules, and audit timestamps.\n"
      },
      "categories": {
        "type": "CategoryNode[]",
        "required": false,
        "default": [],
        "description": "Ordered taxonomy nodes scoped to the object."
      },
      "primary_category_id": {
        "type": "string",
        "required": false,
        "description": "Identifier of the canonical taxonomy node."
      },
      "primary_category_path": {
        "type": "string",
        "required": false,
        "description": "Human-readable breadcrumb path (Electronics > Mobile > Android)."
      },
      "tags": {
        "type": "Tag[]",
        "required": false,
        "default": [],
        "description": "Canonical tag collection after synonym collapse."
      },
      "tag_count": {
        "type": "number",
        "required": false,
        "default": 0,
        "description": "Number of canonical tags assigned to the object."
      },
      "tag_preview": {
        "type": "string",
        "required": false,
        "description": "Denormalized comma-delimited preview for list renders."
      },
      "approval_state": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "The outcome, worked out by the product from the approvals that still stand and written here. Named apart from\nStateful's `status`, so a thing keeps its lifecycle and its approval outcome side by side. Read-only: it is shown\non the detail page and kept off the form.\n",
        "validation": {
          "enumFromParameter": "outcomes"
        }
      },
      "approval_summary": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "One kept line saying what the outcome rests on (\"Approved by Ruth Adeyemi · version 3 · 2 Nov\"), or why no\napproval was asked. It restates the Approval records, since a thing's own page lists its approvals only where the\nthing declares that list (metadata.relatedLists), and no shipped object does. Read-only.\n",
        "validation": {
          "maxLength": 240
        }
      },
      "article_id": {
        "type": "uuid",
        "required": true,
        "description": "Primary identifier for the article document."
      },
      "slug": {
        "type": "string",
        "required": true,
        "description": "Canonical slug rendered in URLs and breadcrumb links.",
        "validation": {
          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
        }
      },
      "author_id": {
        "type": "uuid",
        "required": true,
        "description": "Reference to the authoring user."
      },
      "author_name": {
        "type": "string",
        "required": false,
        "description": "Display name of the authoring user."
      },
      "content_type": {
        "type": "string",
        "required": true,
        "default": "knowledge_base",
        "description": "Editorial template driving layout and governance workflows.",
        "validation": {
          "enum": [
            "knowledge_base",
            "announcement",
            "release_notes",
            "how_to"
          ]
        }
      },
      "excerpt": {
        "type": "string",
        "required": false,
        "description": "Summary text used in list + SEO contexts.",
        "validation": {
          "maxLength": 240
        }
      },
      "body_markdown": {
        "type": "string",
        "required": true,
        "description": "Markdown content rendered in CMS detail views."
      },
      "hero_media_id": {
        "type": "string",
        "required": false,
        "description": "Optional Media object identifier referenced in hero slots."
      },
      "reading_time_minutes": {
        "type": "number",
        "required": false,
        "description": "Estimated reading time derived from body length.",
        "validation": {
          "minimum": 1,
          "maximum": 60
        }
      },
      "locale": {
        "type": "string",
        "required": false,
        "default": "en-US",
        "description": "Locale tag determining headline, copy, and SEO metadata."
      },
      "published_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp when the article was published live."
      }
    },
    "semantics": {
      "label": {
        "semantic_type": "text.label",
        "token_mapping": "tokenMap(text.label.*)",
        "ui_hints": {
          "component": "TextHeading",
          "maxLengthParameter": "maxLabelLength",
          "headingLevel": 2
        }
      },
      "description": {
        "semantic_type": "text.summary",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "TextBody",
          "maxLengthParameter": "maxDescriptionLength"
        }
      },
      "placeholder": {
        "semantic_type": "text.placeholder",
        "token_mapping": "tokenMap(text.placeholder.*)",
        "ui_hints": {
          "component": "FormHint",
          "maxLength": 80
        }
      },
      "status": {
        "semantic_type": "status.state",
        "token_mapping": "tokenMap(status.state.*)",
        "ui_hints": {
          "component": "StatusBadge",
          "showIcon": true
        }
      },
      "state_history": {
        "semantic_type": "timeline.state_transition",
        "token_mapping": "tokenMap(timeline.status.*)",
        "ui_hints": {
          "component": "StatusTimeline",
          "collapseWhenEmpty": true
        }
      },
      "allowed_transitions": {
        "semantic_type": "status.navigation",
        "token_mapping": "computed",
        "ui_hints": {
          "component": "StatusSelector",
          "description": "The next states the product allows, as the product writes them; listed on the detail page, never used to disable an option."
        }
      },
      "created_at": {
        "semantic_type": "audit.created_at",
        "token_mapping": "tokenMap(audit.created)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "updated_at": {
        "semantic_type": "audit.updated_at",
        "token_mapping": "tokenMap(audit.updated)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone",
          "allowNullParameter": "allowNullUpdatedAt"
        }
      },
      "last_event": {
        "semantic_type": "audit.event.type",
        "token_mapping": "tokenMap(audit.event.*)",
        "ui_hints": {
          "component": "AuditBadge",
          "parameterSource": "recordedEvents"
        }
      },
      "last_event_at": {
        "semantic_type": "audit.event.timestamp",
        "token_mapping": "tokenMap(audit.event.timestamp)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "classification_metadata": {
        "semantic_type": "classification.metadata",
        "token_mapping": "tokenMap(classification.metadata)",
        "ui_hints": {
          "component": "ClassificationDiagnostics"
        }
      },
      "categories": {
        "semantic_type": "classification.categories",
        "token_mapping": "tokenMap(classification.categories.*)",
        "ui_hints": {
          "component": "CategoryTree"
        }
      },
      "tags": {
        "semantic_type": "classification.tags",
        "token_mapping": "tokenMap(classification.tags.*)",
        "ui_hints": {
          "component": "TagTokenCloud",
          "policyParameter": "tag_policy"
        }
      },
      "primary_category_id": {
        "semantic_type": "classification.primary",
        "token_mapping": "tokenMap(classification.primary)",
        "ui_hints": {
          "component": "CategoryBreadcrumb"
        }
      },
      "approval_state": {
        "semantic_type": "approval.outcome",
        "token_mapping": "tokenMap(status.state.*)",
        "ui_hints": {
          "component": "StatusBadge",
          "showIcon": true
        }
      },
      "approval_summary": {
        "semantic_type": "approval.outcome.summary",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Approvals"
        }
      },
      "article_id": {
        "semantic_type": "content.article.id",
        "token_mapping": "tokenMap(content.article.id)"
      },
      "slug": {
        "semantic_type": "content.article.slug",
        "token_mapping": "tokenMap(content.article.slug)"
      },
      "author_id": {
        "semantic_type": "content.article.author",
        "token_mapping": "tokenMap(identity.user.id)",
        "ui_hints": {
          "displayLabelField": "author_name"
        }
      },
      "content_type": {
        "semantic_type": "content.article.type",
        "token_mapping": "tokenMap(content.article.type)"
      },
      "reading_time_minutes": {
        "semantic_type": "content.article.read_time",
        "token_mapping": "tokenMap(metric.duration.short)"
      },
      "locale": {
        "semantic_type": "content.article.locale",
        "token_mapping": "tokenMap(content.locale.badge)"
      },
      "published_at": {
        "semantic_type": "content.article.published_at",
        "token_mapping": "tokenMap(timestamp.published_at)"
      }
    },
    "viewExtensions": {
      "list": [
        {
          "component": "LabelCell",
          "priority": 100,
          "props": {
            "field": "label",
            "descriptionField": "description",
            "truncate": true,
            "maxLengthParameter": "maxLabelLength"
          }
        },
        {
          "component": "StatusBadge",
          "props": {
            "field": "status",
            "tone": "lifecycle"
          }
        },
        {
          "component": "RelativeTimestamp",
          "props": {
            "field": "updated_at",
            "fallbackField": "created_at",
            "timezoneParameter": "timezone"
          }
        },
        {
          "component": "ClassificationBadge",
          "position": "after",
          "props": {
            "mode": "{classification_mode}",
            "primaryCategoryField": "primary_category_id",
            "tagPreviewField": "tag_preview"
          }
        }
      ],
      "detail": [
        {
          "component": "DetailHeader",
          "position": "top",
          "priority": 100,
          "props": {
            "titleField": "label",
            "subtitleField": "description",
            "headingLevel": 1
          }
        },
        {
          "component": "StatusBadge",
          "position": "main",
          "priority": 58,
          "props": {
            "statusField": "approval_state",
            "emphasis": "subtle",
            "showIcon": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 57,
          "props": {
            "field": "approval_summary"
          }
        },
        {
          "component": "StatusTimeline",
          "position": "top",
          "priority": 40,
          "props": {
            "field": "status",
            "historyField": "state_history",
            "statesParameter": "states",
            "showActorId": true,
            "showReason": true
          }
        },
        {
          "component": "ClassificationPanel",
          "position": "sidebar",
          "priority": 40,
          "props": {
            "categoriesField": "categories",
            "tagsField": "tags",
            "metadataField": "classification_metadata",
            "modeParameter": "classification_mode"
          }
        },
        {
          "component": "AuditTimeline",
          "position": "bottom",
          "props": {
            "createdField": "created_at",
            "updatedField": "updated_at",
            "eventField": "last_event",
            "eventTimestampField": "last_event_at",
            "eventOptionsParameter": "recordedEvents"
          }
        }
      ],
      "form": [
        {
          "component": "FormLabelGroup",
          "position": "before",
          "priority": 100,
          "props": {
            "labelField": "label",
            "descriptionField": "description",
            "placeholderField": "placeholder",
            "maxLabelLengthParameter": "maxLabelLength",
            "maxDescriptionLengthParameter": "maxDescriptionLength",
            "requireDescriptionParameter": "requireDescription"
          }
        },
        {
          "component": "StatusSelector",
          "position": "top",
          "props": {
            "field": "status",
            "optionsParameter": "states",
            "initialParameter": "initialState",
            "allowedTransitionsField": "allowed_transitions",
            "requireReasonParameter": "requireTransitionReason"
          }
        },
        {
          "component": "ClassificationEditor",
          "position": "main",
          "props": {
            "modeParameter": "classification_mode",
            "tagPolicyParameter": "tag_policy",
            "maxTagsParameter": "max_tags"
          }
        }
      ],
      "card": [
        {
          "component": "CardHeader",
          "position": "top",
          "priority": 100,
          "props": {
            "titleField": "label",
            "supportingField": "description"
          }
        },
        {
          "component": "StatusBadge",
          "position": "before",
          "props": {
            "field": "status",
            "variant": "subtle"
          }
        }
      ],
      "timeline": [
        {
          "component": "TimelineEntryLabel",
          "props": {
            "field": "label",
            "compact": true
          }
        }
      ],
      "inline": [
        {
          "component": "InlineLabel",
          "props": {
            "field": "label",
            "maxLength": 40
          }
        }
      ]
    },
    "tokens": {
      "text.label.color": "var(--sys-text-strong)",
      "text.label.font-weight": "var(--sys-font-weight-semibold)",
      "text.label.font-size": "var(--sys-font-size-lg)",
      "text.label.line-height": "var(--sys-line-height-tight)",
      "text.body.color": "var(--sys-text-subtle)",
      "text.body.font-weight": "var(--sys-font-weight-regular)",
      "text.body.font-size": "var(--sys-font-size-sm)",
      "text.body.line-height": "var(--sys-line-height-relaxed)",
      "text.placeholder.color": "var(--sys-text-muted)",
      "text.placeholder.font-weight": "var(--sys-font-weight-regular)",
      "text.placeholder.font-size": "var(--sys-font-size-sm)",
      "text.placeholder.line-height": "var(--sys-line-height-normal)",
      "status.state.default.bg": "var(--status-neutral-bg)",
      "status.state.default.text": "var(--status-neutral-text)",
      "status.timeline.connector": "var(--border-subtle)",
      "status.timeline.node.bg": "var(--sys-surface-raised)",
      "status.timeline.node.border": "var(--sys-border-default)",
      "status.timeline.actor.text": "var(--sys-text-secondary)",
      "status.timeline.reason.text": "var(--sys-text-tertiary)",
      "status.timeline.reason.bg": "var(--sys-surface-neutral)",
      "audit.created.badge.text": "var(--text-subtle)",
      "audit.updated.badge.text": "var(--text-subtle)",
      "audit.event.badge.bg": "var(--surface-muted)",
      "classification": {
        "category": {
          "badge": {
            "bg": "var(--sys-surface-raised)",
            "border": "var(--sys-border-strong)"
          }
        },
        "tag": {
          "chip": {
            "bg": "var(--sys-surface-muted)",
            "text": "var(--sys-text-strong)"
          }
        }
      },
      "content.article.id": "var(--sys-text-strong)",
      "content.article.slug": "var(--sys-text-muted)",
      "content.article.type": "var(--sys-badge-neutral-fg)",
      "content.article.read_time": "var(--sys-text-subtle)",
      "content.locale.badge": "var(--sys-badge-accent-fg)",
      "timestamp.published_at": "var(--sys-text-muted)"
    },
    "warnings": [],
    "filePath": "~/.oods-foundry/runtime/0.18.0-2b9c3aa471be/objects/content/Article.object.yaml",
    "source": "shipped"
  },
  {
    "name": "Closure",
    "version": "1.0.0",
    "domain": "core.governance",
    "description": "The third part of the Grant story, what a product reports became of the work after a grant ended. Only a report should move it, a rule your product keeps.",
    "tags": [
      "universal",
      "governance",
      "core",
      "closure"
    ],
    "maturity": "alpha",
    "traits": [
      {
        "name": "core/Closeout",
        "alias": null,
        "parameters": null
      },
      {
        "name": "lifecycle/Stateful",
        "alias": "ClosureState",
        "parameters": {
          "states": [
            "closing",
            "reported_closed",
            "still_running",
            "not_known",
            "failed"
          ],
          "initialState": "closing",
          "transitionRules": {
            "closing": [
              "reported_closed",
              "still_running",
              "not_known",
              "failed"
            ],
            "still_running": [
              "reported_closed",
              "not_known",
              "failed"
            ],
            "not_known": [
              "reported_closed",
              "still_running",
              "failed"
            ],
            "reported_closed": [
              "failed"
            ],
            "failed": []
          }
        }
      },
      {
        "name": "lifecycle/Timestampable",
        "alias": "ClosureTimes",
        "parameters": {
          "recordedEvents": [
            "opened",
            "reported",
            "updated"
          ],
          "timezone": "UTC"
        }
      },
      {
        "name": "structural/Ownerable",
        "alias": "ClosureAnswers",
        "parameters": {
          "ownerTypes": [
            "user",
            "team"
          ],
          "primaryOwnerType": "user",
          "allowTransfer": true
        }
      }
    ],
    "schema": {
      "closes_id": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "What ended, by the id your product knows it by: for a closure, the grant."
      },
      "closes_name": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "What ended, as shown (\"Northwind customer replies\"). Kept on the record."
      },
      "ended_how": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "How it ended: the ended record's state as people read it (\"Revoked\", \"Replaced\", \"Expired\").",
        "validation": {
          "maxLength": 64
        }
      },
      "ended_at": {
        "type": "datetime",
        "required": false,
        "readOnly": true,
        "description": "The instant it ended, as the ended record keeps it.",
        "validation": {
          "format": "date-time"
        }
      },
      "for_id": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "Who it was for, by the id your product knows them by: the person or organization the ended record was for."
      },
      "for_name": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "Who it was for, as shown (\"Northwind Traders\"). Kept on the record."
      },
      "scope": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "What this record covers, in words: the systems and the work its reports speak for (\"What the support desk controls\").",
        "validation": {
          "maxLength": 240
        }
      },
      "summary": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "Where it stands now, in one line your product writes with each report.",
        "validation": {
          "maxLength": 240
        }
      },
      "deadline_at": {
        "type": "datetime",
        "required": false,
        "readOnly": true,
        "description": "When your product stops waiting for answers. A line saying it passed with no answer reports only that nothing is known.",
        "validation": {
          "format": "date-time"
        }
      },
      "still_works_until": {
        "type": "datetime",
        "required": false,
        "readOnly": true,
        "description": "Until when access already given may still work, as reported.",
        "validation": {
          "format": "date-time"
        }
      },
      "still_works_note": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "What access already given may still work, and until when, in words (\"Not known: the booking service has not said\").",
        "validation": {
          "maxLength": 240
        }
      },
      "receipt_sent_at": {
        "type": "datetime",
        "required": false,
        "readOnly": true,
        "description": "When your product sent the receipt, outside this page.",
        "validation": {
          "format": "date-time"
        }
      },
      "receipt_sent_to_name": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "Who the receipt was sent to, as shown. Kept on the record."
      },
      "receipt_channel": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "How the receipt was sent (\"Email\").",
        "validation": {
          "maxLength": 64
        }
      },
      "status": {
        "type": "string",
        "required": true,
        "description": "Canonical lifecycle state derived from the states parameter. This is the single source\nof truth for the entity's current lifecycle position. Consumed by Colorized to resolve\nvisual tokens, and by view extensions to render StatusBadge and StatusTimeline.\n",
        "validation": {
          "enumFromParameter": "states"
        }
      },
      "state_history": {
        "type": "StateTransition[]",
        "required": false,
        "description": "Chronological log of state transitions. Each entry records the before/after states,\ntimestamp, and (when governance is enabled) the actor, reason, and transition metadata.\nRendered by StatusTimeline in the detail and timeline views.\n\nEntry structure:\n  - from: string (previous state)\n  - to: string (new state)\n  - timestamp: ISO 8601 datetime\n  - actor_id: string (user/system who triggered the transition, optional)\n  - reason: string (human-readable justification, required when requireTransitionReason is true)\n  - transition_metadata: Record<string, unknown> (arbitrary context, optional)\n\nEvery recorded change can name who acted, who it acted for and who approved it. All optional,\nfollowing Relationship's source_id/source_name pattern; only a *_name names a party, and an entry that names\nno one renders as it always has:\n  - actor_name: string (who acted, as shown: \"Billing Agent\")\n  - actor_kind: string (person, agent or system: the Actor trait's kinds)\n  - on_behalf_of_name / on_behalf_of_id: string (the person or organization it acted for)\n  - approved_by_name / approved_by_id: string (who approved the change, when someone did)\nStatusTimeline then reads \"Billing Agent for Tidewater Co-op · approved by Ruth Adeyemi\".\n\nA change someone approved can also say which approval it belongs to and what level of yes it was. Both\noptional; the id stays in the record's data, a pointer and not a link, and an entry without them renders as it\nalways has:\n  - approval_id: string (the Approval record the yes is kept in)\n  - approval_level: string (the level of yes, one of the levels the product declares: \"approval\")\nStatusTimeline then reads \"Billing Agent for Tidewater Co-op · approved by Ruth Adeyemi (level: Approval)\".\n\nA change made as part of a task can also say which task it was. Both optional; the id stays in the record's\ndata, a pointer and not a link, and an entry without them renders as it always has:\n  - task_id: string (the Task record the change was made under)\n  - task_name: string (the task, as shown: \"Get INV-2026-0155 paid\")\nStatusTimeline then reads \"… · approved by Ruth Adeyemi (level: Approval) · task: Get INV-2026-0155 paid\".\n\nA change made under a grant, the standing yes an actor acts under for a person or organization, can also say\nwhich grant it was. Both optional; the id stays in the record's data, a pointer and not a link, and an entry\nwithout them renders as it always has:\n  - grant_id: string (the Grant record the change was made under)\n  - grant_name: string (the grant, as shown: \"Resend returned transfers\")\nStatusTimeline names the grant after any approval and before the task: \"Billing Agent for Tidewater Co-op ·\ngrant: Resend returned transfers\".\n",
        "default": []
      },
      "allowed_transitions": {
        "type": "string[]",
        "required": false,
        "description": "Materialized list of the next states the product allows from the current status, written\nby the product from the transitionRules parameter. When transitionRules is null (open model),\nthis contains all states except the current one. The detail page's StatusTimeline lists it\nwhen the record holds it. A generated StatusSelector reads transitionRules instead: it offers the\ncurrent state and the moves the order allows (every state where no order is declared).\n",
        "default": []
      },
      "created_at": {
        "type": "datetime",
        "required": true,
        "description": "Timestamp recording when the entity was first created."
      },
      "updated_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the most recent modification, when available."
      },
      "last_event": {
        "type": "string",
        "required": true,
        "description": "Lifecycle event associated with the most recent timestamp mutation.",
        "validation": {
          "enumFromParameter": "recordedEvents"
        }
      },
      "last_event_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the lifecycle event captured in last_event."
      },
      "owner_id": {
        "type": "string",
        "required": true,
        "description": "Identifier of the owning principal scoped by owner_type."
      },
      "owner_type": {
        "type": "string",
        "required": true,
        "description": "Categorical owner type sourced from the ownerTypes parameter.",
        "validation": {
          "enumFromParameter": "ownerTypes"
        }
      },
      "ownership_role": {
        "type": "string",
        "required": false,
        "description": "Optional role name describing how the owner governs the entity.",
        "validation": {
          "maxLength": 80
        }
      },
      "ownership_transferred_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp recording when ownership was last transferred."
      },
      "closure_id": {
        "type": "uuid",
        "required": true,
        "description": "Primary identifier for the closure."
      },
      "name": {
        "type": "string",
        "required": true,
        "description": "What the closure is called, saying it is a closure and of what (\"Closure of Northwind customer replies\").",
        "validation": {
          "minLength": 1,
          "maxLength": 160
        }
      },
      "owner_name": {
        "type": "string",
        "required": false,
        "description": "Who answers for the closure, a person or a team, as shown."
      }
    },
    "semantics": {
      "closes_id": {
        "semantic_type": "closeout.closes_id",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "What ended",
          "displayLabelField": "closes_name"
        }
      },
      "closes_name": {
        "semantic_type": "closeout.closes_name",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "What ended"
        }
      },
      "ended_how": {
        "semantic_type": "closeout.ended_how",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "How it ended"
        }
      },
      "ended_at": {
        "semantic_type": "closeout.ended_at",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "RelativeTimestamp",
          "label": "When it ended"
        }
      },
      "for_id": {
        "semantic_type": "closeout.for_id",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "For",
          "displayLabelField": "for_name"
        }
      },
      "for_name": {
        "semantic_type": "closeout.for_name",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "For"
        }
      },
      "scope": {
        "semantic_type": "closeout.scope",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "This record covers"
        }
      },
      "summary": {
        "semantic_type": "text.summary",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Where it stands"
        }
      },
      "deadline_at": {
        "semantic_type": "closeout.deadline_at",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "RelativeTimestamp",
          "label": "Waits for answers until"
        }
      },
      "still_works_until": {
        "semantic_type": "closeout.still_works_until",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "RelativeTimestamp",
          "label": "May still work until"
        }
      },
      "still_works_note": {
        "semantic_type": "closeout.still_works_note",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "What may still work"
        }
      },
      "receipt_sent_at": {
        "semantic_type": "closeout.receipt_sent_at",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "RelativeTimestamp",
          "label": "Receipt sent"
        }
      },
      "receipt_sent_to_name": {
        "semantic_type": "closeout.receipt_sent_to_name",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Receipt sent to"
        }
      },
      "receipt_channel": {
        "semantic_type": "closeout.receipt_channel",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Receipt sent by"
        }
      },
      "status": {
        "semantic_type": "status.state",
        "token_mapping": "tokenMap(status.state.*)",
        "ui_hints": {
          "component": "StatusBadge",
          "showIcon": true
        }
      },
      "state_history": {
        "semantic_type": "timeline.state_transition",
        "token_mapping": "tokenMap(timeline.status.*)",
        "ui_hints": {
          "component": "StatusTimeline",
          "collapseWhenEmpty": true
        }
      },
      "allowed_transitions": {
        "semantic_type": "status.navigation",
        "token_mapping": "computed",
        "ui_hints": {
          "component": "StatusSelector",
          "description": "The next states the product allows, as the product writes them; listed on the detail page, never used to disable an option."
        }
      },
      "created_at": {
        "semantic_type": "audit.created_at",
        "token_mapping": "tokenMap(audit.created)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "updated_at": {
        "semantic_type": "audit.updated_at",
        "token_mapping": "tokenMap(audit.updated)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone",
          "allowNullParameter": "allowNullUpdatedAt"
        }
      },
      "last_event": {
        "semantic_type": "audit.event.type",
        "token_mapping": "tokenMap(audit.event.*)",
        "ui_hints": {
          "component": "AuditBadge",
          "parameterSource": "recordedEvents"
        }
      },
      "last_event_at": {
        "semantic_type": "audit.event.timestamp",
        "token_mapping": "tokenMap(audit.event.timestamp)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "owner_id": {
        "semantic_type": "ownership.owner.id",
        "token_mapping": "tokenMap(ownership.owner.id)",
        "ui_hints": {
          "component": "OwnerReference",
          "ownerTypeField": "owner_type",
          "displayLabelField": "owner_name"
        }
      },
      "owner_type": {
        "semantic_type": "ownership.owner.type",
        "token_mapping": "tokenMap(ownership.owner.type)",
        "ui_hints": {
          "component": "OwnerTypeBadge",
          "parameterSource": "ownerTypes"
        }
      },
      "ownership_role": {
        "semantic_type": "ownership.owner.role",
        "token_mapping": "tokenMap(ownership.owner.role)",
        "ui_hints": {
          "component": "OwnerRolePill"
        }
      },
      "ownership_transferred_at": {
        "semantic_type": "ownership.owner.transferred_at",
        "token_mapping": "tokenMap(ownership.owner.timestamp)",
        "ui_hints": {
          "component": "TimelineTimestamp"
        }
      },
      "closure_id": {
        "semantic_type": "governance.closure.id",
        "token_mapping": "tokenMap(identity.id.primary)"
      },
      "name": {
        "semantic_type": "text.label",
        "token_mapping": "tokenMap(identity.name.primary)"
      }
    },
    "viewExtensions": {
      "list": [
        {
          "component": "LabelCell",
          "position": "after",
          "props": {
            "field": "closes_id",
            "description": "What ended",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "LabelCell",
          "position": "after",
          "props": {
            "field": "for_id",
            "description": "For",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "StatusBadge",
          "props": {
            "field": "status",
            "tone": "lifecycle"
          }
        },
        {
          "component": "RelativeTimestamp",
          "props": {
            "field": "updated_at",
            "fallbackField": "created_at",
            "timezoneParameter": "timezone"
          }
        },
        {
          "component": "OwnerBadge",
          "props": {
            "ownerIdField": "owner_id",
            "ownerTypeField": "owner_type"
          }
        }
      ],
      "card": [
        {
          "component": "LabelCell",
          "position": "after",
          "props": {
            "field": "closes_id",
            "description": "What ended",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "LabelCell",
          "position": "after",
          "props": {
            "field": "for_id",
            "description": "For",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "StatusBadge",
          "position": "before",
          "props": {
            "field": "status",
            "variant": "subtle"
          }
        },
        {
          "component": "OwnershipMeta",
          "position": "after",
          "props": {
            "ownerIdField": "owner_id",
            "ownerTypeField": "owner_type",
            "roleField": "ownership_role"
          }
        }
      ],
      "detail": [
        {
          "component": "Text",
          "position": "main",
          "priority": 90,
          "props": {
            "field": "closes_id",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 89,
          "props": {
            "field": "closes_name",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 88,
          "props": {
            "field": "ended_how",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 87,
          "props": {
            "field": "ended_at",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 86,
          "props": {
            "field": "for_id",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 85,
          "props": {
            "field": "for_name",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 84,
          "props": {
            "field": "scope",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 83,
          "props": {
            "field": "summary",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 82,
          "props": {
            "field": "deadline_at",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 81,
          "props": {
            "field": "still_works_until",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 80,
          "props": {
            "field": "still_works_note",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 79,
          "props": {
            "field": "receipt_sent_at",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 78,
          "props": {
            "field": "receipt_sent_to_name",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 77,
          "props": {
            "field": "receipt_channel",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "StatusTimeline",
          "position": "top",
          "priority": 40,
          "props": {
            "field": "status",
            "historyField": "state_history",
            "statesParameter": "states",
            "showActorId": true,
            "showReason": true
          }
        },
        {
          "component": "AuditTimeline",
          "position": "bottom",
          "props": {
            "createdField": "created_at",
            "updatedField": "updated_at",
            "eventField": "last_event",
            "eventTimestampField": "last_event_at",
            "eventOptionsParameter": "recordedEvents"
          }
        },
        {
          "component": "OwnershipSummary",
          "position": "top",
          "props": {
            "ownerIdField": "owner_id",
            "ownerTypeField": "owner_type",
            "roleField": "ownership_role",
            "transferredAtField": "ownership_transferred_at",
            "allowTransferParameter": "allowTransfer"
          }
        }
      ]
    },
    "tokens": {
      "status.state.default.bg": "var(--status-neutral-bg)",
      "status.state.default.text": "var(--status-neutral-text)",
      "status.timeline.connector": "var(--border-subtle)",
      "status.timeline.node.bg": "var(--sys-surface-raised)",
      "status.timeline.node.border": "var(--sys-border-default)",
      "status.timeline.actor.text": "var(--sys-text-secondary)",
      "status.timeline.reason.text": "var(--sys-text-tertiary)",
      "status.timeline.reason.bg": "var(--sys-surface-neutral)",
      "audit.created.badge.text": "var(--text-subtle)",
      "audit.updated.badge.text": "var(--text-subtle)",
      "audit.event.badge.bg": "var(--surface-muted)",
      "ownership.owner.badge.bg": "var(--surface-subtle)",
      "ownership.owner.badge.text": "var(--text-default)",
      "ownership.owner.role.text": "var(--text-muted)",
      "identity.id.primary": "var(--text-strong)",
      "identity.name.primary": "var(--text-strong)"
    },
    "warnings": [],
    "filePath": "~/.oods-foundry/runtime/0.18.0-2b9c3aa471be/objects/core/Closure.object.yaml",
    "source": "shipped"
  },
  {
    "name": "Grant",
    "version": "1.0.1",
    "domain": "core.governance",
    "description": "A standing yes that one actor may act for a person or organization, on stated terms, until it ends.",
    "tags": [
      "universal",
      "governance",
      "core",
      "grant"
    ],
    "maturity": "alpha",
    "traits": [
      {
        "name": "core/Mandate",
        "alias": null,
        "parameters": null
      },
      {
        "name": "lifecycle/Stateful",
        "alias": "GrantState",
        "parameters": {
          "states": [
            "requested",
            "active",
            "paused",
            "revoked",
            "expired",
            "replaced",
            "declined",
            "withdrawn"
          ],
          "initialState": "requested",
          "transitionRules": {
            "requested": [
              "active",
              "declined",
              "withdrawn",
              "expired"
            ],
            "active": [
              "paused",
              "revoked",
              "expired",
              "replaced"
            ],
            "paused": [
              "active",
              "revoked",
              "expired",
              "replaced"
            ],
            "revoked": [],
            "expired": [],
            "replaced": [],
            "declined": [],
            "withdrawn": []
          },
          "actions": [
            {
              "id": "revoke",
              "to": "revoked",
              "verb": "Revoke",
              "event": "ended",
              "reasonField": "ended_reason",
              "bySeat": "ended_by",
              "confirm": true,
              "alsoEnds": {
                "via": "within_id"
              }
            },
            {
              "id": "pause",
              "to": "paused",
              "verb": "Pause",
              "event": "paused"
            },
            {
              "id": "resume",
              "from": [
                "paused"
              ],
              "to": "active",
              "verb": "Resume",
              "event": "resumed"
            }
          ]
        }
      },
      {
        "name": "lifecycle/Timestampable",
        "alias": "GrantTimes",
        "parameters": {
          "recordedEvents": [
            "requested",
            "granted",
            "paused",
            "resumed",
            "ended",
            "updated"
          ],
          "timezone": "UTC"
        }
      },
      {
        "name": "structural/Ownerable",
        "alias": "GrantAnswers",
        "parameters": {
          "ownerTypes": [
            "user",
            "team"
          ],
          "primaryOwnerType": "user",
          "allowTransfer": true
        }
      }
    ],
    "schema": {
      "requested_by_id": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "Who asked for the grant, by the id the product knows them by: a person, or the agent itself."
      },
      "requested_by_name": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "Who asked for the grant, as shown (\"Billing Agent\"). Kept on the record."
      },
      "requested_by_kind": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "What kind of actor asked for it (person, agent or system), as the Actor trait names them.",
        "validation": {
          "enum": [
            "person",
            "agent",
            "system"
          ]
        }
      },
      "asked_of_id": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "Who was asked for the yes, by the id the product knows them by. A requested grant waits on them; the field stays once it is answered."
      },
      "asked_of_name": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "Who was asked for the yes, as shown (\"Ruth Adeyemi\"). Kept on the record."
      },
      "asked_of_kind": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "What kind of actor was asked for the yes (person, agent or system), as the Actor trait names them.",
        "validation": {
          "enum": [
            "person",
            "agent",
            "system"
          ]
        }
      },
      "granted_by_id": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "Who gave the grant, by the id the product knows them by: usually a person who may give it for the party."
      },
      "granted_by_name": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "Who gave the grant, as shown (\"Ruth Adeyemi\"). Kept on the record, so it still reads after they leave."
      },
      "granted_by_kind": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "What kind of actor gave it (person, agent or system), as the Actor trait names them.",
        "validation": {
          "enum": [
            "person",
            "agent",
            "system"
          ]
        }
      },
      "granted_as": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "The capacity the giver gave it in, in one line (\"Finance manager, Tidewater Co-op\").",
        "validation": {
          "maxLength": 120
        }
      },
      "granted_to_id": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "Who holds the grant and acts under it, by the id the product knows them by: an agent, or a person standing in for someone."
      },
      "granted_to_name": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "Who holds the grant, as shown (\"Billing Agent\"). Kept on the record."
      },
      "granted_to_kind": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "What kind of actor holds it (person, agent or system), as the Actor trait names them.",
        "validation": {
          "enum": [
            "person",
            "agent",
            "system"
          ]
        }
      },
      "granted_for_id": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "Who the grant is for, the person or organization the holder acts for, by the id the product knows them by. Never an agent."
      },
      "granted_for_name": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "Who the grant is for, as shown (\"Tidewater Co-op\"). Kept on the record."
      },
      "scope": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "What the grant covers, in a few words (\"Invoices and payments\").",
        "validation": {
          "maxLength": 160
        }
      },
      "allowed_actions": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "Actions the holder may take for this party with no one asked, separated by \"; \"; None when there are none."
      },
      "asks_first_for": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "Actions that need a person's yes before the holder takes them for this party, separated by \"; \"; None when there are none."
      },
      "never_allowed": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "Actions the holder never takes for this party, separated by \"; \"; None when there are none. An action for the party that no line names is never allowed; asking the person who gave it for a yes or an answer is not one."
      },
      "amount_limit_minor": {
        "type": "integer",
        "required": false,
        "readOnly": true,
        "description": "The most the holder may move in one use, in the currency's minor units (1200000 is $12,000.00).",
        "validation": {
          "minimum": 0
        }
      },
      "period_limit_minor": {
        "type": "integer",
        "required": false,
        "readOnly": true,
        "description": "The most the holder may move in each period, in the currency's minor units.",
        "validation": {
          "minimum": 0
        }
      },
      "limit_currency": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "The currency of the money limits, as an ISO 4217 code (\"USD\").",
        "validation": {
          "pattern": "^[A-Z]{3}$"
        }
      },
      "limit_period": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "The period the limits per period count over.",
        "validation": {
          "enum": [
            "day",
            "week",
            "month",
            "year"
          ]
        }
      },
      "uses_per_period": {
        "type": "integer",
        "required": false,
        "readOnly": true,
        "description": "The most times the grant may be used in each period.",
        "validation": {
          "minimum": 0
        }
      },
      "conditions": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "Conditions on each use, in words, shown and not checked (\"Only a payment the bank returned, to the same payee for the same amount\").",
        "validation": {
          "maxLength": 240
        }
      },
      "ends_at": {
        "type": "datetime",
        "required": false,
        "readOnly": true,
        "description": "The exact instant the grant ends, the one a product checks.",
        "validation": {
          "format": "date-time"
        }
      },
      "timezone": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "The party's time zone, as an IANA name (\"Pacific/Auckland\"), the zone its end is read in.",
        "validation": {
          "maxLength": 64
        }
      },
      "ends_note": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "The end as people read it, in the party's own words and time zone (\"At the end of 31 Dec 2026, Tauranga time\"), written by the product; a grant with no end says so here (\"No end: it stands until someone ends it\").",
        "validation": {
          "maxLength": 160
        }
      },
      "uses": {
        "type": "integer",
        "required": false,
        "readOnly": true,
        "description": "How many times the grant has been used, as the product counts it.",
        "validation": {
          "minimum": 0
        }
      },
      "last_used_at": {
        "type": "datetime",
        "required": false,
        "readOnly": true,
        "description": "When the grant was last used.",
        "validation": {
          "format": "date-time"
        }
      },
      "last_use": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "The last use, in one kept line (\"28 Sep: PAY-2026-0429 sent again\").",
        "validation": {
          "maxLength": 240
        }
      },
      "spent_minor": {
        "type": "integer",
        "required": false,
        "readOnly": true,
        "description": "The money moved under the grant in the current period, as the product counts it, in the currency's minor units.",
        "validation": {
          "minimum": 0
        }
      },
      "within_id": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "The grant this one sits inside, for a standing yes given for one action: same holder, same party, ending no later."
      },
      "within_name": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "The grant this one sits inside, as shown. Kept on the record."
      },
      "replaces_id": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "The grant this one replaced when the terms changed; that grant is kept whole, ended as replaced."
      },
      "replaces_name": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "The grant this one replaced, as shown. Kept on the record."
      },
      "first_grant_id": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "The first grant in a line of replacements, kept on every later grant in the line so a search by its name finds them all."
      },
      "first_grant_name": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "The first grant in the line, as shown. Kept on the record."
      },
      "ended_by_id": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "Who ended the grant, by the id the product knows them by, when someone did."
      },
      "ended_by_name": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "Who ended the grant, as shown. Kept on the record."
      },
      "ended_by_kind": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "What kind of actor ended it (person, agent or system), as the Actor trait names them.",
        "validation": {
          "enum": [
            "person",
            "agent",
            "system"
          ]
        }
      },
      "ended_as": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "The capacity they ended it in, in one line, where it is not one of the grant's own seats (\"Accounts lead, Kestrel Print Co.\").",
        "validation": {
          "maxLength": 120
        }
      },
      "ended_reason": {
        "type": "string",
        "required": false,
        "description": "Why the grant ended, in one line, written where it is ended (\"The studio closed\").",
        "validation": {
          "maxLength": 240
        }
      },
      "status": {
        "type": "string",
        "required": true,
        "description": "Canonical lifecycle state derived from the states parameter. This is the single source\nof truth for the entity's current lifecycle position. Consumed by Colorized to resolve\nvisual tokens, and by view extensions to render StatusBadge and StatusTimeline.\n",
        "validation": {
          "enumFromParameter": "states"
        }
      },
      "state_history": {
        "type": "StateTransition[]",
        "required": false,
        "description": "Chronological log of state transitions. Each entry records the before/after states,\ntimestamp, and (when governance is enabled) the actor, reason, and transition metadata.\nRendered by StatusTimeline in the detail and timeline views.\n\nEntry structure:\n  - from: string (previous state)\n  - to: string (new state)\n  - timestamp: ISO 8601 datetime\n  - actor_id: string (user/system who triggered the transition, optional)\n  - reason: string (human-readable justification, required when requireTransitionReason is true)\n  - transition_metadata: Record<string, unknown> (arbitrary context, optional)\n\nEvery recorded change can name who acted, who it acted for and who approved it. All optional,\nfollowing Relationship's source_id/source_name pattern; only a *_name names a party, and an entry that names\nno one renders as it always has:\n  - actor_name: string (who acted, as shown: \"Billing Agent\")\n  - actor_kind: string (person, agent or system: the Actor trait's kinds)\n  - on_behalf_of_name / on_behalf_of_id: string (the person or organization it acted for)\n  - approved_by_name / approved_by_id: string (who approved the change, when someone did)\nStatusTimeline then reads \"Billing Agent for Tidewater Co-op · approved by Ruth Adeyemi\".\n\nA change someone approved can also say which approval it belongs to and what level of yes it was. Both\noptional; the id stays in the record's data, a pointer and not a link, and an entry without them renders as it\nalways has:\n  - approval_id: string (the Approval record the yes is kept in)\n  - approval_level: string (the level of yes, one of the levels the product declares: \"approval\")\nStatusTimeline then reads \"Billing Agent for Tidewater Co-op · approved by Ruth Adeyemi (level: Approval)\".\n\nA change made as part of a task can also say which task it was. Both optional; the id stays in the record's\ndata, a pointer and not a link, and an entry without them renders as it always has:\n  - task_id: string (the Task record the change was made under)\n  - task_name: string (the task, as shown: \"Get INV-2026-0155 paid\")\nStatusTimeline then reads \"… · approved by Ruth Adeyemi (level: Approval) · task: Get INV-2026-0155 paid\".\n\nA change made under a grant, the standing yes an actor acts under for a person or organization, can also say\nwhich grant it was. Both optional; the id stays in the record's data, a pointer and not a link, and an entry\nwithout them renders as it always has:\n  - grant_id: string (the Grant record the change was made under)\n  - grant_name: string (the grant, as shown: \"Resend returned transfers\")\nStatusTimeline names the grant after any approval and before the task: \"Billing Agent for Tidewater Co-op ·\ngrant: Resend returned transfers\".\n",
        "default": []
      },
      "allowed_transitions": {
        "type": "string[]",
        "required": false,
        "description": "Materialized list of the next states the product allows from the current status, written\nby the product from the transitionRules parameter. When transitionRules is null (open model),\nthis contains all states except the current one. The detail page's StatusTimeline lists it\nwhen the record holds it. A generated StatusSelector reads transitionRules instead: it offers the\ncurrent state and the moves the order allows (every state where no order is declared).\n",
        "default": []
      },
      "created_at": {
        "type": "datetime",
        "required": true,
        "description": "Timestamp recording when the entity was first created."
      },
      "updated_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the most recent modification, when available."
      },
      "last_event": {
        "type": "string",
        "required": true,
        "description": "Lifecycle event associated with the most recent timestamp mutation.",
        "validation": {
          "enumFromParameter": "recordedEvents"
        }
      },
      "last_event_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the lifecycle event captured in last_event."
      },
      "owner_id": {
        "type": "string",
        "required": true,
        "description": "Identifier of the owning principal scoped by owner_type."
      },
      "owner_type": {
        "type": "string",
        "required": true,
        "description": "Categorical owner type sourced from the ownerTypes parameter.",
        "validation": {
          "enumFromParameter": "ownerTypes"
        }
      },
      "ownership_role": {
        "type": "string",
        "required": false,
        "description": "Optional role name describing how the owner governs the entity.",
        "validation": {
          "maxLength": 80
        }
      },
      "ownership_transferred_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp recording when ownership was last transferred."
      },
      "grant_id": {
        "type": "uuid",
        "required": true,
        "description": "Primary identifier for the grant, the id a history entry's grant_id points at."
      },
      "name": {
        "type": "string",
        "required": true,
        "description": "What the grant is called, in a few words (\"Tidewater invoices and payments\").",
        "validation": {
          "minLength": 1,
          "maxLength": 120
        }
      },
      "owner_name": {
        "type": "string",
        "required": false,
        "description": "Who answers for the grant, a person or a team, as shown."
      }
    },
    "semantics": {
      "requested_by_id": {
        "semantic_type": "mandate.requested_by_id",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Asked for by",
          "displayLabelField": "requested_by_name"
        }
      },
      "requested_by_name": {
        "semantic_type": "mandate.requested_by_name",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Asked for by"
        }
      },
      "requested_by_kind": {
        "semantic_type": "mandate.requested_by_kind",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Kind of asker"
        }
      },
      "asked_of_id": {
        "semantic_type": "mandate.asked_of_id",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Asked of",
          "displayLabelField": "asked_of_name"
        }
      },
      "asked_of_name": {
        "semantic_type": "mandate.asked_of_name",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Asked of"
        }
      },
      "asked_of_kind": {
        "semantic_type": "mandate.asked_of_kind",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Kind of the one asked"
        }
      },
      "granted_by_id": {
        "semantic_type": "mandate.granted_by_id",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Given by",
          "displayLabelField": "granted_by_name"
        }
      },
      "granted_by_name": {
        "semantic_type": "mandate.granted_by_name",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Given by"
        }
      },
      "granted_by_kind": {
        "semantic_type": "mandate.granted_by_kind",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Kind of giver"
        }
      },
      "granted_as": {
        "semantic_type": "mandate.granted_as",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Given as"
        }
      },
      "granted_to_id": {
        "semantic_type": "mandate.granted_to_id",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Held by",
          "displayLabelField": "granted_to_name"
        }
      },
      "granted_to_name": {
        "semantic_type": "mandate.granted_to_name",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Held by"
        }
      },
      "granted_to_kind": {
        "semantic_type": "mandate.granted_to_kind",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Kind of holder"
        }
      },
      "granted_for_id": {
        "semantic_type": "mandate.granted_for_id",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "For",
          "displayLabelField": "granted_for_name"
        }
      },
      "granted_for_name": {
        "semantic_type": "mandate.granted_for_name",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "For"
        }
      },
      "scope": {
        "semantic_type": "text.summary",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Covers"
        }
      },
      "allowed_actions": {
        "semantic_type": "mandate.allowed_actions",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Allowed actions"
        }
      },
      "asks_first_for": {
        "semantic_type": "mandate.asks_first_for",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Asks first for",
          "valueLabels": {
            "None": "No listed action needs a separate yes"
          }
        }
      },
      "never_allowed": {
        "semantic_type": "mandate.never_allowed",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Never allowed",
          "valueLabels": {
            "None": "No additional exclusions listed"
          }
        }
      },
      "amount_limit_minor": {
        "semantic_type": "mandate.amount_limit_minor",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "CurrencyAmount",
          "currencyField": "limit_currency",
          "minorUnits": 100,
          "label": "Most per use"
        }
      },
      "period_limit_minor": {
        "semantic_type": "mandate.period_limit_minor",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "CurrencyAmount",
          "currencyField": "limit_currency",
          "minorUnits": 100,
          "label": "Most per period"
        }
      },
      "limit_currency": {
        "semantic_type": "mandate.limit_currency",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Currency"
        }
      },
      "limit_period": {
        "semantic_type": "mandate.limit_period",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Period"
        }
      },
      "uses_per_period": {
        "semantic_type": "mandate.uses_per_period",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Uses per period"
        }
      },
      "conditions": {
        "semantic_type": "mandate.conditions",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Conditions"
        }
      },
      "ends_at": {
        "semantic_type": "mandate.ends_at",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "RelativeTimestamp",
          "label": "End time"
        }
      },
      "timezone": {
        "semantic_type": "mandate.timezone",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Time zone"
        }
      },
      "ends_note": {
        "semantic_type": "mandate.ends_note",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Ends"
        }
      },
      "uses": {
        "semantic_type": "mandate.uses",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Uses"
        }
      },
      "last_used_at": {
        "semantic_type": "mandate.last_used_at",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "RelativeTimestamp",
          "label": "Last used"
        }
      },
      "last_use": {
        "semantic_type": "mandate.last_use",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Last used for"
        }
      },
      "spent_minor": {
        "semantic_type": "mandate.spent_minor",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "CurrencyAmount",
          "currencyField": "limit_currency",
          "minorUnits": 100,
          "label": "Spent this period"
        }
      },
      "within_id": {
        "semantic_type": "mandate.within_id",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Inside",
          "displayLabelField": "within_name"
        }
      },
      "within_name": {
        "semantic_type": "mandate.within_name",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Inside"
        }
      },
      "replaces_id": {
        "semantic_type": "mandate.replaces_id",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Replaces",
          "displayLabelField": "replaces_name"
        }
      },
      "replaces_name": {
        "semantic_type": "mandate.replaces_name",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Replaces"
        }
      },
      "first_grant_id": {
        "semantic_type": "mandate.first_grant_id",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "First grant",
          "displayLabelField": "first_grant_name"
        }
      },
      "first_grant_name": {
        "semantic_type": "mandate.first_grant_name",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "First grant"
        }
      },
      "ended_by_id": {
        "semantic_type": "mandate.ended_by_id",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Ended by",
          "displayLabelField": "ended_by_name"
        }
      },
      "ended_by_name": {
        "semantic_type": "mandate.ended_by_name",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Ended by"
        }
      },
      "ended_by_kind": {
        "semantic_type": "mandate.ended_by_kind",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Kind of ender"
        }
      },
      "ended_as": {
        "semantic_type": "mandate.ended_as",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Ended as"
        }
      },
      "ended_reason": {
        "semantic_type": "mandate.ended_reason",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Why it ended",
          "multiline": false
        }
      },
      "status": {
        "semantic_type": "status.state",
        "token_mapping": "tokenMap(status.state.*)",
        "ui_hints": {
          "component": "StatusBadge",
          "showIcon": true
        }
      },
      "state_history": {
        "semantic_type": "timeline.state_transition",
        "token_mapping": "tokenMap(timeline.status.*)",
        "ui_hints": {
          "component": "StatusTimeline",
          "collapseWhenEmpty": true
        }
      },
      "allowed_transitions": {
        "semantic_type": "status.navigation",
        "token_mapping": "computed",
        "ui_hints": {
          "component": "StatusSelector",
          "description": "The next states the product allows, as the product writes them; listed on the detail page, never used to disable an option."
        }
      },
      "created_at": {
        "semantic_type": "audit.created_at",
        "token_mapping": "tokenMap(audit.created)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "updated_at": {
        "semantic_type": "audit.updated_at",
        "token_mapping": "tokenMap(audit.updated)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone",
          "allowNullParameter": "allowNullUpdatedAt"
        }
      },
      "last_event": {
        "semantic_type": "audit.event.type",
        "token_mapping": "tokenMap(audit.event.*)",
        "ui_hints": {
          "component": "AuditBadge",
          "parameterSource": "recordedEvents"
        }
      },
      "last_event_at": {
        "semantic_type": "audit.event.timestamp",
        "token_mapping": "tokenMap(audit.event.timestamp)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "owner_id": {
        "semantic_type": "ownership.owner.id",
        "token_mapping": "tokenMap(ownership.owner.id)",
        "ui_hints": {
          "component": "OwnerReference",
          "ownerTypeField": "owner_type",
          "displayLabelField": "owner_name"
        }
      },
      "owner_type": {
        "semantic_type": "ownership.owner.type",
        "token_mapping": "tokenMap(ownership.owner.type)",
        "ui_hints": {
          "component": "OwnerTypeBadge",
          "parameterSource": "ownerTypes"
        }
      },
      "ownership_role": {
        "semantic_type": "ownership.owner.role",
        "token_mapping": "tokenMap(ownership.owner.role)",
        "ui_hints": {
          "component": "OwnerRolePill"
        }
      },
      "ownership_transferred_at": {
        "semantic_type": "ownership.owner.transferred_at",
        "token_mapping": "tokenMap(ownership.owner.timestamp)",
        "ui_hints": {
          "component": "TimelineTimestamp"
        }
      },
      "grant_id": {
        "semantic_type": "governance.grant.id",
        "token_mapping": "tokenMap(identity.id.primary)"
      },
      "name": {
        "semantic_type": "text.label",
        "token_mapping": "tokenMap(identity.name.primary)"
      }
    },
    "viewExtensions": {
      "list": [
        {
          "component": "LabelCell",
          "position": "after",
          "props": {
            "field": "granted_to_id",
            "description": "Held by",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "LabelCell",
          "position": "after",
          "props": {
            "field": "granted_for_id",
            "description": "For",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "LabelCell",
          "position": "after",
          "props": {
            "field": "ends_note",
            "description": "Ends",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "LabelCell",
          "position": "after",
          "props": {
            "field": "last_use",
            "description": "Last used for",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "StatusBadge",
          "props": {
            "field": "status",
            "tone": "lifecycle"
          }
        },
        {
          "component": "RelativeTimestamp",
          "props": {
            "field": "updated_at",
            "fallbackField": "created_at",
            "timezoneParameter": "timezone"
          }
        },
        {
          "component": "OwnerBadge",
          "props": {
            "ownerIdField": "owner_id",
            "ownerTypeField": "owner_type"
          }
        }
      ],
      "card": [
        {
          "component": "LabelCell",
          "position": "after",
          "props": {
            "field": "granted_to_id",
            "description": "Held by",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "LabelCell",
          "position": "after",
          "props": {
            "field": "granted_for_id",
            "description": "For",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "LabelCell",
          "position": "after",
          "props": {
            "field": "ends_note",
            "description": "Ends",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "StatusBadge",
          "position": "before",
          "props": {
            "field": "status",
            "variant": "subtle"
          }
        },
        {
          "component": "OwnershipMeta",
          "position": "after",
          "props": {
            "ownerIdField": "owner_id",
            "ownerTypeField": "owner_type",
            "roleField": "ownership_role"
          }
        }
      ],
      "detail": [
        {
          "component": "Text",
          "position": "main",
          "priority": 90,
          "props": {
            "field": "scope",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 89,
          "props": {
            "field": "granted_for_id",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 88,
          "props": {
            "field": "granted_for_name",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 87,
          "props": {
            "field": "granted_to_id",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 86,
          "props": {
            "field": "granted_to_name",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 85,
          "props": {
            "field": "granted_to_kind",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 84,
          "props": {
            "field": "granted_by_id",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 83,
          "props": {
            "field": "granted_by_name",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 82,
          "props": {
            "field": "granted_by_kind",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 81,
          "props": {
            "field": "granted_as",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 80,
          "props": {
            "field": "requested_by_id",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 79,
          "props": {
            "field": "requested_by_name",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 78,
          "props": {
            "field": "requested_by_kind",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 77.9,
          "props": {
            "field": "asked_of_id",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 77.8,
          "props": {
            "field": "asked_of_name",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 77.7,
          "props": {
            "field": "asked_of_kind",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 77,
          "props": {
            "field": "allowed_actions",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 76,
          "props": {
            "field": "asks_first_for",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 75,
          "props": {
            "field": "never_allowed",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 74,
          "props": {
            "field": "amount_limit_minor",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 73,
          "props": {
            "field": "period_limit_minor",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 72,
          "props": {
            "field": "limit_period",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 71,
          "props": {
            "field": "uses_per_period",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 70,
          "props": {
            "field": "conditions",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 69,
          "props": {
            "field": "ends_note",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 68,
          "props": {
            "field": "ends_at",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 67,
          "props": {
            "field": "timezone",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 66,
          "props": {
            "field": "uses",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 65,
          "props": {
            "field": "last_used_at",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 64,
          "props": {
            "field": "last_use",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 63,
          "props": {
            "field": "spent_minor",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 62,
          "props": {
            "field": "within_id",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 61,
          "props": {
            "field": "within_name",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 60,
          "props": {
            "field": "replaces_id",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 59,
          "props": {
            "field": "replaces_name",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 58,
          "props": {
            "field": "first_grant_id",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 57,
          "props": {
            "field": "first_grant_name",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 56,
          "props": {
            "field": "ended_by_id",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 55,
          "props": {
            "field": "ended_by_name",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 54,
          "props": {
            "field": "ended_by_kind",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 53.5,
          "props": {
            "field": "ended_as",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 53,
          "props": {
            "field": "ended_reason",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "StatusTimeline",
          "position": "top",
          "priority": 40,
          "props": {
            "field": "status",
            "historyField": "state_history",
            "statesParameter": "states",
            "showActorId": true,
            "showReason": true
          }
        },
        {
          "component": "AuditTimeline",
          "position": "bottom",
          "props": {
            "createdField": "created_at",
            "updatedField": "updated_at",
            "eventField": "last_event",
            "eventTimestampField": "last_event_at",
            "eventOptionsParameter": "recordedEvents"
          }
        },
        {
          "component": "OwnershipSummary",
          "position": "top",
          "props": {
            "ownerIdField": "owner_id",
            "ownerTypeField": "owner_type",
            "roleField": "ownership_role",
            "transferredAtField": "ownership_transferred_at",
            "allowTransferParameter": "allowTransfer"
          }
        }
      ],
      "form": [
        {
          "component": "Text",
          "position": "top",
          "priority": 90,
          "fact": true,
          "props": {
            "field": "scope",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "top",
          "priority": 89,
          "fact": true,
          "props": {
            "field": "granted_for_id",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "top",
          "priority": 88,
          "fact": true,
          "props": {
            "field": "granted_for_name",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "top",
          "priority": 87,
          "fact": true,
          "props": {
            "field": "granted_to_id",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "top",
          "priority": 86,
          "fact": true,
          "props": {
            "field": "granted_to_name",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "top",
          "priority": 85,
          "fact": true,
          "props": {
            "field": "granted_by_id",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "top",
          "priority": 84,
          "fact": true,
          "props": {
            "field": "granted_by_name",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "top",
          "priority": 83,
          "fact": true,
          "props": {
            "field": "granted_as",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "top",
          "priority": 82,
          "fact": true,
          "props": {
            "field": "requested_by_id",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "top",
          "priority": 81,
          "fact": true,
          "props": {
            "field": "requested_by_name",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "top",
          "priority": 80.9,
          "fact": true,
          "props": {
            "field": "asked_of_id",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "top",
          "priority": 80.8,
          "fact": true,
          "props": {
            "field": "asked_of_name",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "top",
          "priority": 80,
          "fact": true,
          "props": {
            "field": "allowed_actions",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "top",
          "priority": 79,
          "fact": true,
          "props": {
            "field": "asks_first_for",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "top",
          "priority": 78,
          "fact": true,
          "props": {
            "field": "never_allowed",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "top",
          "priority": 77,
          "fact": true,
          "props": {
            "field": "amount_limit_minor",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "top",
          "priority": 76,
          "fact": true,
          "props": {
            "field": "period_limit_minor",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "top",
          "priority": 75,
          "fact": true,
          "props": {
            "field": "limit_period",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "top",
          "priority": 74,
          "fact": true,
          "props": {
            "field": "uses_per_period",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "top",
          "priority": 73,
          "fact": true,
          "props": {
            "field": "conditions",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "top",
          "priority": 72,
          "fact": true,
          "props": {
            "field": "ends_note",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "top",
          "priority": 71,
          "fact": true,
          "props": {
            "field": "ends_at",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "top",
          "priority": 70,
          "fact": true,
          "props": {
            "field": "within_id",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "top",
          "priority": 69,
          "fact": true,
          "props": {
            "field": "within_name",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Input",
          "position": "main",
          "priority": 60,
          "props": {
            "field": "ended_reason",
            "label": "Why it is ending, if you end it here"
          }
        },
        {
          "component": "StatusSelector",
          "position": "top",
          "props": {
            "field": "status",
            "optionsParameter": "states",
            "initialParameter": "initialState",
            "allowedTransitionsField": "allowed_transitions",
            "requireReasonParameter": "requireTransitionReason"
          }
        }
      ]
    },
    "tokens": {
      "status.state.default.bg": "var(--status-neutral-bg)",
      "status.state.default.text": "var(--status-neutral-text)",
      "status.timeline.connector": "var(--border-subtle)",
      "status.timeline.node.bg": "var(--sys-surface-raised)",
      "status.timeline.node.border": "var(--sys-border-default)",
      "status.timeline.actor.text": "var(--sys-text-secondary)",
      "status.timeline.reason.text": "var(--sys-text-tertiary)",
      "status.timeline.reason.bg": "var(--sys-surface-neutral)",
      "audit.created.badge.text": "var(--text-subtle)",
      "audit.updated.badge.text": "var(--text-subtle)",
      "audit.event.badge.bg": "var(--surface-muted)",
      "ownership.owner.badge.bg": "var(--surface-subtle)",
      "ownership.owner.badge.text": "var(--text-default)",
      "ownership.owner.role.text": "var(--text-muted)",
      "identity.id.primary": "var(--text-strong)",
      "identity.name.primary": "var(--text-strong)"
    },
    "warnings": [],
    "filePath": "~/.oods-foundry/runtime/0.18.0-2b9c3aa471be/objects/core/Grant.object.yaml",
    "source": "shipped"
  },
  {
    "name": "Invoice",
    "version": "1.0.0",
    "domain": "saas.billing",
    "description": "Canonical SaaS invoice object normalizing payment terms, status, and refund posture.",
    "tags": [
      "billing",
      "invoice",
      "finance"
    ],
    "maturity": "beta",
    "traits": [
      {
        "name": "SaaSBillingPayable",
        "alias": "InvoiceTerms",
        "parameters": null
      },
      {
        "name": "SaaSBillingRefundable",
        "alias": "CreditWindow",
        "parameters": null
      },
      {
        "name": "lifecycle/Timestampable",
        "alias": "AuditTrail",
        "parameters": {
          "recordedEvents": [
            "created",
            "posted",
            "payment_initiated",
            "payment_cleared",
            "payment_failed",
            "voided",
            "written_off"
          ],
          "timezone": "UTC",
          "allowNullUpdatedAt": true
        }
      },
      {
        "name": "viz/MarkBar",
        "alias": null,
        "parameters": {
          "title": "Invoice line item amounts",
          "description": "Line-item amounts in the invoice's currency; line items with the same description are summed.",
          "chart": {
            "chartType": "bar",
            "source": "record-array",
            "dataField": "line_items",
            "encodings": {
              "x": {
                "field": "description",
                "title": "Line item"
              },
              "y": {
                "field": "amount_minor",
                "aggregate": "sum",
                "title": "Amount"
              }
            },
            "minorUnits": 100,
            "currencyField": "currency",
            "sampleRows": [
              {
                "description": "Scale plan",
                "quantity": 1,
                "amount_minor": 284000,
                "unit_amount_minor": 284000
              }
            ]
          }
        }
      }
    ],
    "relationships": [
      {
        "target": "Subscription",
        "via": "subscription_id",
        "cardinality": "many-to-one",
        "label": "Subscription"
      }
    ],
    "schema": {
      "invoice_number": {
        "type": "string",
        "required": true,
        "description": "Human readable invoice identifier presented to customers."
      },
      "status": {
        "type": "string",
        "required": true,
        "description": "Canonical invoice status after provider mapping.",
        "validation": {
          "enumFromParameter": "statusEnum"
        }
      },
      "provider_status": {
        "type": "string",
        "required": false,
        "description": "Original provider reported status or badge."
      },
      "issued_at": {
        "type": "datetime",
        "required": true,
        "description": "Timestamp when the invoice was finalized or posted."
      },
      "due_at": {
        "type": "datetime",
        "required": false,
        "description": "Payment due timestamp derived from payment terms."
      },
      "paid_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp when full payment cleared."
      },
      "total_minor": {
        "type": "integer",
        "required": true,
        "description": "Total amount due expressed in minor currency units."
      },
      "balance_minor": {
        "type": "integer",
        "required": false,
        "description": "Remaining amount outstanding in minor units.",
        "default": 0
      },
      "currency": {
        "type": "string",
        "required": true,
        "description": "ISO 4217 currency for the invoice."
      },
      "payment_terms": {
        "type": "string",
        "required": false,
        "description": "Payment term label describing when payment is expected.",
        "validation": {
          "enumFromParameter": "paymentTerms"
        }
      },
      "collection_state": {
        "type": "string",
        "required": false,
        "description": "Dunning phase or retry program detail presented to success teams."
      },
      "last_reminder_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp of most recent payment reminder issued to customer."
      },
      "aging_bucket_days": {
        "type": "integer",
        "required": false,
        "description": "Number of days outstanding grouped for aging reports."
      },
      "attempt_count": {
        "type": "integer",
        "required": false,
        "description": "Number of automatic payment attempts made on this invoice (Stripe smart-retries attempt_count). Increments on each retry in the dunning window. Source: docs.stripe.com/billing/revenue-recovery/smart-retries.",
        "default": 0,
        "validation": {
          "minimum": 0
        }
      },
      "next_payment_attempt": {
        "type": "datetime",
        "required": false,
        "description": "When the next automatic payment retry is scheduled (Stripe smart-retries next_payment_attempt). Defines the open end of the retry window — modeled on the Refundable.refundable_until datetime-window precedent. Absent/null when no further attempts are scheduled (retries exhausted → invoice goes uncollectible, mirroring the subscription `unpaid` state). Source: docs.stripe.com/billing/revenue-recovery/smart-retries."
      },
      "memo": {
        "type": "string",
        "required": false,
        "description": "Internal finance note or customer visible memo."
      },
      "refundable_until": {
        "type": "datetime",
        "required": false,
        "description": "Date when refund eligibility window ends for this record."
      },
      "refund_policy_url": {
        "type": "string",
        "required": false,
        "description": "Link to customer facing refund or cancellation policy."
      },
      "total_refunded_minor": {
        "type": "integer",
        "required": false,
        "description": "Cumulative amount refunded in minor currency units.",
        "default": 0
      },
      "credit_memo_balance_minor": {
        "type": "integer",
        "required": false,
        "description": "Remaining credit memo balance that can be applied to invoices.",
        "default": 0
      },
      "credit_memo_type": {
        "type": "string",
        "required": false,
        "description": "Category of credit memo tied to business justification.",
        "validation": {
          "enumFromParameter": "creditMemoTypes"
        }
      },
      "last_refund_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp when the most recent refund was issued."
      },
      "requires_manager_approval": {
        "type": "boolean",
        "required": false,
        "description": "Indicates if finance manager approval is required before issuing refund.",
        "default": false
      },
      "notes": {
        "type": "string",
        "required": false,
        "description": "Internal commentary about refund actions or policy exceptions."
      },
      "created_at": {
        "type": "datetime",
        "required": true,
        "description": "Timestamp recording when the entity was first created."
      },
      "updated_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the most recent modification, when available."
      },
      "last_event": {
        "type": "string",
        "required": true,
        "description": "Lifecycle event associated with the most recent timestamp mutation.",
        "validation": {
          "enumFromParameter": "recordedEvents"
        }
      },
      "last_event_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the lifecycle event captured in last_event."
      },
      "invoice_id": {
        "type": "string",
        "required": true,
        "description": "Primary identifier for the invoice inside the billing domain."
      },
      "subscription_id": {
        "type": "string",
        "required": true,
        "description": "Subscription identifier this invoice is associated with."
      },
      "provider": {
        "type": "string",
        "required": true,
        "description": "Source system providing invoice data."
      },
      "provider_invoice_id": {
        "type": "string",
        "required": false,
        "description": "Native provider identifier retained for audit trails."
      },
      "billing_contact_name": {
        "type": "string",
        "required": false,
        "description": "Customer billing contact receiving the invoice."
      },
      "billing_contact_email": {
        "type": "email",
        "required": false,
        "description": "Email address for the billing contact."
      },
      "tax_minor": {
        "type": "integer",
        "required": false,
        "description": "Tax amount collected on the invoice in minor currency units."
      },
      "discount_minor": {
        "type": "integer",
        "required": false,
        "description": "Total discounts applied to the invoice in minor units."
      },
      "subtotal_minor": {
        "type": "integer",
        "required": false,
        "description": "Subtotal before discounts and tax in minor units."
      },
      "line_items": {
        "type": "InvoiceLineItem[]",
        "required": false,
        "description": "Normalized line items with quantity, amount_minor, and description fields.",
        "default": []
      },
      "attachments": {
        "type": "AssetReference[]",
        "required": false,
        "description": "Supporting documents or credit memos associated with the invoice.",
        "default": []
      },
      "portal_url": {
        "type": "string",
        "required": false,
        "description": "Link to the hosted invoice or customer billing portal."
      },
      "dunning_step": {
        "type": "string",
        "required": false,
        "description": "Current dunning playbook step label (ex: reminder_1, reminder_final, collections). The structured retry window (attempt_count + next_payment_attempt) is provided by the composed SaaSBillingPayable trait; this field is the human-readable step name."
      },
      "payment_source": {
        "type": "string",
        "required": false,
        "description": "Payment method used or expected (card, ach, wire)."
      }
    },
    "semantics": {
      "invoice_number": {
        "semantic_type": "billing.invoice.number",
        "token_mapping": "tokenMap(billing.invoice.number)"
      },
      "status": {
        "semantic_type": "billing.invoice.status",
        "token_mapping": "tokenMap(billing.invoice.status.*)"
      },
      "provider_status": {
        "semantic_type": "billing.invoice.provider_status",
        "token_mapping": "tokenMap(billing.invoice.provider_status)"
      },
      "issued_at": {
        "semantic_type": "billing.invoice.issued_at",
        "token_mapping": "tokenMap(billing.invoice.issued_at)"
      },
      "due_at": {
        "semantic_type": "billing.invoice.due_at",
        "token_mapping": "tokenMap(billing.invoice.due_at)"
      },
      "paid_at": {
        "semantic_type": "billing.invoice.paid_at",
        "token_mapping": "tokenMap(billing.invoice.paid_at)"
      },
      "total_minor": {
        "semantic_type": "billing.invoice.total_minor",
        "token_mapping": "tokenMap(billing.invoice.total_minor)",
        "ui_hints": {
          "component": "CurrencyAmount",
          "currencyField": "currency",
          "minorUnits": 100
        }
      },
      "balance_minor": {
        "semantic_type": "billing.invoice.balance_minor",
        "token_mapping": "tokenMap(billing.invoice.balance_minor)",
        "ui_hints": {
          "component": "CurrencyAmount",
          "currencyField": "currency",
          "minorUnits": 100
        }
      },
      "currency": {
        "semantic_type": "billing.invoice.currency",
        "token_mapping": "tokenMap(billing.invoice.currency)"
      },
      "payment_terms": {
        "semantic_type": "billing.invoice.payment_terms",
        "token_mapping": "tokenMap(billing.invoice.payment_terms)"
      },
      "collection_state": {
        "semantic_type": "billing.invoice.collection_state",
        "token_mapping": "tokenMap(billing.invoice.collection_state)"
      },
      "last_reminder_at": {
        "semantic_type": "billing.invoice.last_reminder_at",
        "token_mapping": "tokenMap(billing.invoice.last_reminder_at)"
      },
      "aging_bucket_days": {
        "semantic_type": "billing.invoice.aging_bucket_days",
        "token_mapping": "tokenMap(billing.invoice.aging_bucket_days)"
      },
      "attempt_count": {
        "semantic_type": "billing.invoice.attempt_count",
        "token_mapping": "tokenMap(billing.invoice.attempt_count)"
      },
      "next_payment_attempt": {
        "semantic_type": "billing.invoice.next_payment_attempt",
        "token_mapping": "tokenMap(billing.invoice.next_payment_attempt)"
      },
      "memo": {
        "semantic_type": "billing.invoice.memo",
        "token_mapping": "tokenMap(billing.invoice.memo)"
      },
      "refundable_until": {
        "semantic_type": "billing.refund.window_end",
        "token_mapping": "tokenMap(billing.refund.window_end)"
      },
      "refund_policy_url": {
        "semantic_type": "billing.refund.policy_link",
        "token_mapping": "tokenMap(billing.refund.policy_link)"
      },
      "total_refunded_minor": {
        "semantic_type": "billing.refund.total_minor",
        "token_mapping": "tokenMap(billing.refund.total_minor)",
        "ui_hints": {
          "component": "CurrencyAmount",
          "currencyField": "currency",
          "minorUnits": 100
        }
      },
      "credit_memo_balance_minor": {
        "semantic_type": "billing.refund.credit_memo_balance_minor",
        "token_mapping": "tokenMap(billing.refund.credit_memo_balance_minor)",
        "ui_hints": {
          "component": "CurrencyAmount",
          "currencyField": "currency",
          "minorUnits": 100
        }
      },
      "credit_memo_type": {
        "semantic_type": "billing.refund.credit_memo_type",
        "token_mapping": "tokenMap(billing.refund.credit_memo_type)"
      },
      "last_refund_at": {
        "semantic_type": "billing.refund.last_refund_at",
        "token_mapping": "tokenMap(billing.refund.last_refund_at)"
      },
      "requires_manager_approval": {
        "semantic_type": "billing.refund.requires_manager_approval",
        "token_mapping": "tokenMap(billing.refund.requires_manager_approval)"
      },
      "notes": {
        "semantic_type": "billing.refund.notes",
        "token_mapping": "tokenMap(billing.refund.notes)"
      },
      "created_at": {
        "semantic_type": "audit.created_at",
        "token_mapping": "tokenMap(audit.created)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "updated_at": {
        "semantic_type": "audit.updated_at",
        "token_mapping": "tokenMap(audit.updated)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone",
          "allowNullParameter": "allowNullUpdatedAt"
        }
      },
      "last_event": {
        "semantic_type": "audit.event.type",
        "token_mapping": "tokenMap(audit.event.*)",
        "ui_hints": {
          "component": "AuditBadge",
          "parameterSource": "recordedEvents"
        }
      },
      "last_event_at": {
        "semantic_type": "audit.event.timestamp",
        "token_mapping": "tokenMap(audit.event.timestamp)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "invoice_id": {
        "semantic_type": "billing.invoice.id",
        "token_mapping": "tokenMap(billing.invoice.id)"
      },
      "subscription_id": {
        "semantic_type": "billing.invoice.subscription_id",
        "token_mapping": "tokenMap(billing.invoice.subscription_id)"
      },
      "provider": {
        "semantic_type": "billing.invoice.provider",
        "token_mapping": "tokenMap(billing.invoice.provider)"
      },
      "provider_invoice_id": {
        "semantic_type": "billing.invoice.provider_id",
        "token_mapping": "tokenMap(billing.invoice.provider_id)"
      },
      "billing_contact_name": {
        "semantic_type": "text.summary",
        "token_mapping": "tokenMap(billing.invoice.billing_contact_name)"
      },
      "billing_contact_email": {
        "semantic_type": "billing.invoice.billing_contact_email",
        "token_mapping": "tokenMap(billing.invoice.billing_contact_email)"
      },
      "tax_minor": {
        "semantic_type": "billing.invoice.tax_minor",
        "token_mapping": "tokenMap(billing.invoice.tax_minor)",
        "ui_hints": {
          "component": "CurrencyAmount",
          "currencyField": "currency",
          "minorUnits": 100
        }
      },
      "discount_minor": {
        "semantic_type": "billing.invoice.discount_minor",
        "token_mapping": "tokenMap(billing.invoice.discount_minor)",
        "ui_hints": {
          "component": "CurrencyAmount",
          "currencyField": "currency",
          "minorUnits": 100
        }
      },
      "subtotal_minor": {
        "semantic_type": "billing.invoice.subtotal_minor",
        "token_mapping": "tokenMap(billing.invoice.subtotal_minor)",
        "ui_hints": {
          "component": "CurrencyAmount",
          "currencyField": "currency",
          "minorUnits": 100
        }
      },
      "line_items": {
        "semantic_type": "billing.invoice.line_items",
        "token_mapping": "tokenMap(billing.invoice.line_items)"
      },
      "attachments": {
        "semantic_type": "billing.invoice.attachments",
        "token_mapping": "tokenMap(billing.invoice.attachments)"
      },
      "portal_url": {
        "semantic_type": "billing.invoice.portal_url",
        "token_mapping": "tokenMap(billing.invoice.portal_url)"
      },
      "dunning_step": {
        "semantic_type": "billing.invoice.dunning_step",
        "token_mapping": "tokenMap(billing.invoice.dunning_step)"
      },
      "payment_source": {
        "semantic_type": "billing.invoice.payment_source",
        "token_mapping": "tokenMap(billing.invoice.payment_source)"
      }
    },
    "viewExtensions": {
      "list": [
        {
          "component": "BillingSummaryBadge",
          "position": "after",
          "props": {
            "amountField": "total_minor",
            "currencyField": "currency",
            "minorUnits": 100,
            "showInterval": false
          }
        },
        {
          "component": "RelativeTimestamp",
          "props": {
            "field": "updated_at",
            "fallbackField": "created_at",
            "timezoneParameter": "timezone"
          }
        }
      ],
      "card": [
        {
          "component": "BillingSummaryBadge",
          "position": "after",
          "props": {
            "amountField": "total_minor",
            "currencyField": "currency",
            "minorUnits": 100,
            "showInterval": false
          }
        }
      ],
      "detail": [
        {
          "component": "VizMarkPreview",
          "position": "top",
          "priority": 55,
          "props": {
            "chart": {
              "chartType": "bar",
              "source": "record-array",
              "dataField": "line_items",
              "encodings": {
                "x": {
                  "field": "description",
                  "title": "Line item"
                },
                "y": {
                  "field": "amount_minor",
                  "aggregate": "sum",
                  "title": "Amount"
                }
              },
              "minorUnits": 100,
              "currencyField": "currency",
              "sampleRows": [
                {
                  "description": "Scale plan",
                  "quantity": 1,
                  "amount_minor": 284000,
                  "unit_amount_minor": 284000
                }
              ]
            },
            "title": "Invoice line item amounts",
            "description": "Line-item amounts in the invoice's currency; line items with the same description are summed."
          }
        },
        {
          "component": "AuditTimeline",
          "position": "bottom",
          "props": {
            "createdField": "created_at",
            "updatedField": "updated_at",
            "eventField": "last_event",
            "eventTimestampField": "last_event_at",
            "eventOptionsParameter": "recordedEvents"
          }
        }
      ],
      "dashboard": [
        {
          "component": "VizMarkPreview",
          "position": "top",
          "priority": 55,
          "props": {
            "chart": {
              "chartType": "bar",
              "source": "record-array",
              "dataField": "line_items",
              "encodings": {
                "x": {
                  "field": "description",
                  "title": "Line item"
                },
                "y": {
                  "field": "amount_minor",
                  "aggregate": "sum",
                  "title": "Amount"
                }
              },
              "minorUnits": 100,
              "currencyField": "currency",
              "sampleRows": [
                {
                  "description": "Scale plan",
                  "quantity": 1,
                  "amount_minor": 284000,
                  "unit_amount_minor": 284000
                }
              ]
            },
            "title": "Invoice line item amounts",
            "description": "Line-item amounts in the invoice's currency; line items with the same description are summed."
          }
        }
      ]
    },
    "tokens": {
      "billing.invoice.number": "var(--cmp-text-strong)",
      "billing.invoice.total_minor": "var(--cmp-text-body-strong)",
      "billing.invoice.balance_minor": "var(--cmp-text-warning)",
      "billing.invoice.status.past_due": "var(--cmp-status-critical-text)",
      "billing.invoice.status.paid": "var(--cmp-status-success-text)",
      "billing.refund.total_minor": "var(--cmp-text-accent)",
      "billing.refund.credit_memo_balance_minor": "var(--cmp-text-info)",
      "billing.refund.requires_manager_approval": "var(--cmp-badge-text-warning)",
      "audit.created.badge.text": "var(--text-subtle)",
      "audit.updated.badge.text": "var(--text-subtle)",
      "audit.event.badge.bg": "var(--surface-muted)",
      "viz.mark.bar.fill.default": "var(--cmp-viz-mark-bar-fill)",
      "viz.mark.bar.stroke.default": "var(--cmp-viz-mark-bar-stroke)",
      "viz.mark.bar.spacing": "var(--cmp-viz-mark-spacing)",
      "billing.invoice.id": "var(--cmp-text-strong)",
      "billing.invoice.billing_contact_name": "var(--cmp-text-body-strong)",
      "billing.invoice.payment_source": "var(--cmp-text-subtle)",
      "billing.invoice.dunning_step": "var(--cmp-badge-text-warning)"
    },
    "warnings": [],
    "filePath": "~/.oods-foundry/runtime/0.18.0-2b9c3aa471be/domains/saas-billing/objects/Invoice.object.yaml",
    "source": "shipped"
  },
  {
    "name": "Media",
    "version": "1.0.0",
    "domain": "content.asset",
    "description": "Canonical digital asset metadata powering media library, DAM, and CMS integrations.",
    "tags": [
      "content",
      "media",
      "asset",
      "classifiable"
    ],
    "maturity": null,
    "traits": [
      {
        "name": "content/Labelled",
        "alias": "MediaLabel",
        "parameters": null
      },
      {
        "name": "lifecycle/Stateful",
        "alias": "MediaLifecycle",
        "parameters": {
          "states": [
            "ingested",
            "processing",
            "available",
            "deprecated"
          ],
          "initialState": "ingested"
        }
      },
      {
        "name": "lifecycle/Timestampable",
        "alias": "MediaTimestamps",
        "parameters": {
          "recordedEvents": [
            "ingested",
            "transcoded",
            "published",
            "archived"
          ],
          "timezone": "UTC"
        }
      },
      {
        "name": "core/Classifiable",
        "alias": "MediaClassification",
        "parameters": {
          "classification_mode": "tag",
          "tag_policy": "open",
          "max_tags": 32
        }
      }
    ],
    "schema": {
      "label": {
        "type": "string",
        "required": true,
        "description": "Human-readable display name rendered in primary surfaces.",
        "validation": {
          "minLength": 1,
          "maxLengthFromParameter": "maxLabelLength",
          "pattern": "^\\S.*\\S$|^\\S$"
        }
      },
      "description": {
        "type": "string",
        "required": false,
        "requiredFromParameter": "requireDescription",
        "description": "Supporting description used in detail and card contexts.",
        "validation": {
          "maxLengthFromParameter": "maxDescriptionLength"
        }
      },
      "placeholder": {
        "type": "string",
        "required": false,
        "description": "Hint copy surfaced in form fields when the label is empty.",
        "validation": {
          "maxLength": 80
        }
      },
      "status": {
        "type": "string",
        "required": true,
        "description": "Canonical lifecycle state derived from the states parameter. This is the single source\nof truth for the entity's current lifecycle position. Consumed by Colorized to resolve\nvisual tokens, and by view extensions to render StatusBadge and StatusTimeline.\n",
        "validation": {
          "enumFromParameter": "states"
        }
      },
      "state_history": {
        "type": "StateTransition[]",
        "required": false,
        "description": "Chronological log of state transitions. Each entry records the before/after states,\ntimestamp, and (when governance is enabled) the actor, reason, and transition metadata.\nRendered by StatusTimeline in the detail and timeline views.\n\nEntry structure:\n  - from: string (previous state)\n  - to: string (new state)\n  - timestamp: ISO 8601 datetime\n  - actor_id: string (user/system who triggered the transition, optional)\n  - reason: string (human-readable justification, required when requireTransitionReason is true)\n  - transition_metadata: Record<string, unknown> (arbitrary context, optional)\n\nEvery recorded change can name who acted, who it acted for and who approved it. All optional,\nfollowing Relationship's source_id/source_name pattern; only a *_name names a party, and an entry that names\nno one renders as it always has:\n  - actor_name: string (who acted, as shown: \"Billing Agent\")\n  - actor_kind: string (person, agent or system: the Actor trait's kinds)\n  - on_behalf_of_name / on_behalf_of_id: string (the person or organization it acted for)\n  - approved_by_name / approved_by_id: string (who approved the change, when someone did)\nStatusTimeline then reads \"Billing Agent for Tidewater Co-op · approved by Ruth Adeyemi\".\n\nA change someone approved can also say which approval it belongs to and what level of yes it was. Both\noptional; the id stays in the record's data, a pointer and not a link, and an entry without them renders as it\nalways has:\n  - approval_id: string (the Approval record the yes is kept in)\n  - approval_level: string (the level of yes, one of the levels the product declares: \"approval\")\nStatusTimeline then reads \"Billing Agent for Tidewater Co-op · approved by Ruth Adeyemi (level: Approval)\".\n\nA change made as part of a task can also say which task it was. Both optional; the id stays in the record's\ndata, a pointer and not a link, and an entry without them renders as it always has:\n  - task_id: string (the Task record the change was made under)\n  - task_name: string (the task, as shown: \"Get INV-2026-0155 paid\")\nStatusTimeline then reads \"… · approved by Ruth Adeyemi (level: Approval) · task: Get INV-2026-0155 paid\".\n\nA change made under a grant, the standing yes an actor acts under for a person or organization, can also say\nwhich grant it was. Both optional; the id stays in the record's data, a pointer and not a link, and an entry\nwithout them renders as it always has:\n  - grant_id: string (the Grant record the change was made under)\n  - grant_name: string (the grant, as shown: \"Resend returned transfers\")\nStatusTimeline names the grant after any approval and before the task: \"Billing Agent for Tidewater Co-op ·\ngrant: Resend returned transfers\".\n",
        "default": []
      },
      "allowed_transitions": {
        "type": "string[]",
        "required": false,
        "description": "Materialized list of the next states the product allows from the current status, written\nby the product from the transitionRules parameter. When transitionRules is null (open model),\nthis contains all states except the current one. The detail page's StatusTimeline lists it\nwhen the record holds it. A generated StatusSelector reads transitionRules instead: it offers the\ncurrent state and the moves the order allows (every state where no order is declared).\n",
        "default": []
      },
      "created_at": {
        "type": "datetime",
        "required": true,
        "description": "Timestamp recording when the entity was first created."
      },
      "updated_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the most recent modification, when available."
      },
      "last_event": {
        "type": "string",
        "required": true,
        "description": "Lifecycle event associated with the most recent timestamp mutation.",
        "validation": {
          "enumFromParameter": "recordedEvents"
        }
      },
      "last_event_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the lifecycle event captured in last_event."
      },
      "classification_metadata": {
        "type": "ClassificationMetadata",
        "required": true,
        "description": "Operational metadata describing mode, storage model, governance rules, and audit timestamps.\n"
      },
      "categories": {
        "type": "CategoryNode[]",
        "required": false,
        "default": [],
        "description": "Ordered taxonomy nodes scoped to the object."
      },
      "primary_category_id": {
        "type": "string",
        "required": false,
        "description": "Identifier of the canonical taxonomy node."
      },
      "primary_category_path": {
        "type": "string",
        "required": false,
        "description": "Human-readable breadcrumb path (Electronics > Mobile > Android)."
      },
      "tags": {
        "type": "Tag[]",
        "required": false,
        "default": [],
        "description": "Canonical tag collection after synonym collapse."
      },
      "tag_count": {
        "type": "number",
        "required": false,
        "default": 0,
        "description": "Number of canonical tags assigned to the object."
      },
      "tag_preview": {
        "type": "string",
        "required": false,
        "description": "Denormalized comma-delimited preview for list renders."
      },
      "media_id": {
        "type": "uuid",
        "required": true,
        "description": "Primary identifier for the media asset across services."
      },
      "asset_type": {
        "type": "string",
        "required": true,
        "description": "Media form factor guiding viewer presentation.",
        "validation": {
          "enum": [
            "image",
            "video",
            "audio",
            "document"
          ]
        }
      },
      "mime_type": {
        "type": "string",
        "required": true,
        "description": "IANA MIME type recorded at ingestion."
      },
      "storage_bucket": {
        "type": "string",
        "required": true,
        "description": "Storage namespace (S3 bucket, GCS bucket) backing the asset."
      },
      "object_key": {
        "type": "string",
        "required": true,
        "description": "Provider-specific path or key referencing the binary object."
      },
      "source_url": {
        "type": "string",
        "required": false,
        "description": "Canonical CDN URL for public consumption."
      },
      "checksum": {
        "type": "string",
        "required": false,
        "description": "Hex-encoded checksum (SHA-256) for deduplication."
      },
      "file_size_bytes": {
        "type": "number",
        "required": true,
        "description": "Size of the binary payload in bytes.",
        "validation": {
          "minimum": 0
        }
      },
      "width_px": {
        "type": "number",
        "required": false,
        "description": "Pixel width for images/videos when available.",
        "validation": {
          "minimum": 1
        }
      },
      "height_px": {
        "type": "number",
        "required": false,
        "description": "Pixel height for images/videos when available.",
        "validation": {
          "minimum": 1
        }
      },
      "duration_seconds": {
        "type": "number",
        "required": false,
        "description": "Media playback duration for video/audio assets.",
        "validation": {
          "minimum": 0
        }
      },
      "transcoding_profiles": {
        "type": "string[]",
        "required": false,
        "description": "List of transcoding profiles generated for the asset.",
        "default": []
      }
    },
    "semantics": {
      "label": {
        "semantic_type": "text.label",
        "token_mapping": "tokenMap(text.label.*)",
        "ui_hints": {
          "component": "TextHeading",
          "maxLengthParameter": "maxLabelLength",
          "headingLevel": 2
        }
      },
      "description": {
        "semantic_type": "text.summary",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "TextBody",
          "maxLengthParameter": "maxDescriptionLength"
        }
      },
      "placeholder": {
        "semantic_type": "text.placeholder",
        "token_mapping": "tokenMap(text.placeholder.*)",
        "ui_hints": {
          "component": "FormHint",
          "maxLength": 80
        }
      },
      "status": {
        "semantic_type": "status.state",
        "token_mapping": "tokenMap(status.state.*)",
        "ui_hints": {
          "component": "StatusBadge",
          "showIcon": true
        }
      },
      "state_history": {
        "semantic_type": "timeline.state_transition",
        "token_mapping": "tokenMap(timeline.status.*)",
        "ui_hints": {
          "component": "StatusTimeline",
          "collapseWhenEmpty": true
        }
      },
      "allowed_transitions": {
        "semantic_type": "status.navigation",
        "token_mapping": "computed",
        "ui_hints": {
          "component": "StatusSelector",
          "description": "The next states the product allows, as the product writes them; listed on the detail page, never used to disable an option."
        }
      },
      "created_at": {
        "semantic_type": "audit.created_at",
        "token_mapping": "tokenMap(audit.created)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "updated_at": {
        "semantic_type": "audit.updated_at",
        "token_mapping": "tokenMap(audit.updated)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone",
          "allowNullParameter": "allowNullUpdatedAt"
        }
      },
      "last_event": {
        "semantic_type": "audit.event.type",
        "token_mapping": "tokenMap(audit.event.*)",
        "ui_hints": {
          "component": "AuditBadge",
          "parameterSource": "recordedEvents"
        }
      },
      "last_event_at": {
        "semantic_type": "audit.event.timestamp",
        "token_mapping": "tokenMap(audit.event.timestamp)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "classification_metadata": {
        "semantic_type": "classification.metadata",
        "token_mapping": "tokenMap(classification.metadata)",
        "ui_hints": {
          "component": "ClassificationDiagnostics"
        }
      },
      "categories": {
        "semantic_type": "classification.categories",
        "token_mapping": "tokenMap(classification.categories.*)",
        "ui_hints": {
          "component": "CategoryTree"
        }
      },
      "tags": {
        "semantic_type": "classification.tags",
        "token_mapping": "tokenMap(classification.tags.*)",
        "ui_hints": {
          "component": "TagTokenCloud",
          "policyParameter": "tag_policy"
        }
      },
      "primary_category_id": {
        "semantic_type": "classification.primary",
        "token_mapping": "tokenMap(classification.primary)",
        "ui_hints": {
          "component": "CategoryBreadcrumb"
        }
      },
      "media_id": {
        "semantic_type": "media.asset.id",
        "token_mapping": "tokenMap(media.asset.id)"
      },
      "asset_type": {
        "semantic_type": "media.asset.type",
        "token_mapping": "tokenMap(media.asset.type)"
      },
      "mime_type": {
        "semantic_type": "media.asset.mime",
        "token_mapping": "tokenMap(media.asset.mime)"
      },
      "file_size_bytes": {
        "semantic_type": "media.asset.size",
        "token_mapping": "tokenMap(metric.storage.bytes)"
      },
      "duration_seconds": {
        "semantic_type": "media.asset.duration",
        "token_mapping": "tokenMap(metric.duration.media)"
      }
    },
    "viewExtensions": {
      "list": [
        {
          "component": "LabelCell",
          "priority": 100,
          "props": {
            "field": "label",
            "descriptionField": "description",
            "truncate": true,
            "maxLengthParameter": "maxLabelLength"
          }
        },
        {
          "component": "StatusBadge",
          "props": {
            "field": "status",
            "tone": "lifecycle"
          }
        },
        {
          "component": "RelativeTimestamp",
          "props": {
            "field": "updated_at",
            "fallbackField": "created_at",
            "timezoneParameter": "timezone"
          }
        },
        {
          "component": "ClassificationBadge",
          "position": "after",
          "props": {
            "mode": "{classification_mode}",
            "primaryCategoryField": "primary_category_id",
            "tagPreviewField": "tag_preview"
          }
        }
      ],
      "detail": [
        {
          "component": "DetailHeader",
          "position": "top",
          "priority": 100,
          "props": {
            "titleField": "label",
            "subtitleField": "description",
            "headingLevel": 1
          }
        },
        {
          "component": "StatusTimeline",
          "position": "top",
          "priority": 40,
          "props": {
            "field": "status",
            "historyField": "state_history",
            "statesParameter": "states",
            "showActorId": true,
            "showReason": true
          }
        },
        {
          "component": "ClassificationPanel",
          "position": "sidebar",
          "priority": 40,
          "props": {
            "categoriesField": "categories",
            "tagsField": "tags",
            "metadataField": "classification_metadata",
            "modeParameter": "classification_mode"
          }
        },
        {
          "component": "AuditTimeline",
          "position": "bottom",
          "props": {
            "createdField": "created_at",
            "updatedField": "updated_at",
            "eventField": "last_event",
            "eventTimestampField": "last_event_at",
            "eventOptionsParameter": "recordedEvents"
          }
        }
      ],
      "form": [
        {
          "component": "FormLabelGroup",
          "position": "before",
          "priority": 100,
          "props": {
            "labelField": "label",
            "descriptionField": "description",
            "placeholderField": "placeholder",
            "maxLabelLengthParameter": "maxLabelLength",
            "maxDescriptionLengthParameter": "maxDescriptionLength",
            "requireDescriptionParameter": "requireDescription"
          }
        },
        {
          "component": "StatusSelector",
          "position": "top",
          "props": {
            "field": "status",
            "optionsParameter": "states",
            "initialParameter": "initialState",
            "allowedTransitionsField": "allowed_transitions",
            "requireReasonParameter": "requireTransitionReason"
          }
        },
        {
          "component": "ClassificationEditor",
          "position": "main",
          "props": {
            "modeParameter": "classification_mode",
            "tagPolicyParameter": "tag_policy",
            "maxTagsParameter": "max_tags"
          }
        }
      ],
      "card": [
        {
          "component": "CardHeader",
          "position": "top",
          "priority": 100,
          "props": {
            "titleField": "label",
            "supportingField": "description"
          }
        },
        {
          "component": "StatusBadge",
          "position": "before",
          "props": {
            "field": "status",
            "variant": "subtle"
          }
        }
      ],
      "timeline": [
        {
          "component": "TimelineEntryLabel",
          "props": {
            "field": "label",
            "compact": true
          }
        }
      ],
      "inline": [
        {
          "component": "InlineLabel",
          "props": {
            "field": "label",
            "maxLength": 40
          }
        }
      ]
    },
    "tokens": {
      "text.label.color": "var(--sys-text-strong)",
      "text.label.font-weight": "var(--sys-font-weight-semibold)",
      "text.label.font-size": "var(--sys-font-size-lg)",
      "text.label.line-height": "var(--sys-line-height-tight)",
      "text.body.color": "var(--sys-text-subtle)",
      "text.body.font-weight": "var(--sys-font-weight-regular)",
      "text.body.font-size": "var(--sys-font-size-sm)",
      "text.body.line-height": "var(--sys-line-height-relaxed)",
      "text.placeholder.color": "var(--sys-text-muted)",
      "text.placeholder.font-weight": "var(--sys-font-weight-regular)",
      "text.placeholder.font-size": "var(--sys-font-size-sm)",
      "text.placeholder.line-height": "var(--sys-line-height-normal)",
      "status.state.default.bg": "var(--status-neutral-bg)",
      "status.state.default.text": "var(--status-neutral-text)",
      "status.timeline.connector": "var(--border-subtle)",
      "status.timeline.node.bg": "var(--sys-surface-raised)",
      "status.timeline.node.border": "var(--sys-border-default)",
      "status.timeline.actor.text": "var(--sys-text-secondary)",
      "status.timeline.reason.text": "var(--sys-text-tertiary)",
      "status.timeline.reason.bg": "var(--sys-surface-neutral)",
      "audit.created.badge.text": "var(--text-subtle)",
      "audit.updated.badge.text": "var(--text-subtle)",
      "audit.event.badge.bg": "var(--surface-muted)",
      "classification": {
        "category": {
          "badge": {
            "bg": "var(--sys-surface-raised)",
            "border": "var(--sys-border-strong)"
          }
        },
        "tag": {
          "chip": {
            "bg": "var(--sys-surface-muted)",
            "text": "var(--sys-text-strong)"
          }
        }
      },
      "media.asset.id": "var(--sys-text-strong)",
      "media.asset.type": "var(--sys-badge-neutral-fg)",
      "media.asset.mime": "var(--sys-text-muted)",
      "metric.storage.bytes": "var(--sys-text-subtle)",
      "metric.duration.media": "var(--sys-text-subtle)"
    },
    "warnings": [],
    "filePath": "~/.oods-foundry/runtime/0.18.0-2b9c3aa471be/objects/content/Media.object.yaml",
    "source": "shipped"
  },
  {
    "name": "Organization",
    "version": "1.2.1",
    "domain": "core.account",
    "description": "Canonical account record for tenant and workspace governance across the platform.",
    "tags": [
      "universal",
      "organization",
      "tenant"
    ],
    "maturity": null,
    "traits": [
      {
        "name": "content/Labelled",
        "alias": "OrganizationLabel",
        "parameters": null
      },
      {
        "name": "lifecycle/Stateful",
        "alias": null,
        "parameters": {
          "states": [
            "prospect",
            "onboarding",
            "active",
            "churned"
          ],
          "initialState": "prospect"
        }
      },
      {
        "name": "structural/Ownerable",
        "alias": null,
        "parameters": {
          "ownerTypes": [
            "parent_organization",
            "reseller",
            "platform"
          ],
          "primaryOwnerType": "parent_organization",
          "allowTransfer": true
        }
      },
      {
        "name": "lifecycle/Timestampable",
        "alias": null,
        "parameters": {
          "recordedEvents": [
            "created",
            "plan_upgraded",
            "plan_downgraded",
            "ownership_transferred"
          ],
          "timezone": "UTC"
        }
      },
      {
        "name": "behavioral/Taggable",
        "alias": null,
        "parameters": {
          "maxTags": 16,
          "allowCustomTags": false,
          "allowedTags": [
            "enterprise",
            "smb",
            "nonprofit",
            "startup",
            "strategic"
          ],
          "caseSensitive": false
        }
      },
      {
        "name": "core/Addressable",
        "alias": "OrganizationLocations",
        "parameters": {
          "roles": [
            "headquarters",
            "office",
            "warehouse",
            "branch"
          ],
          "defaultRole": "headquarters"
        }
      },
      {
        "name": "core/Preferenceable",
        "alias": "OrganizationPreferences",
        "parameters": {
          "namespaces": [
            "notifications",
            "display",
            "privacy"
          ],
          "schemaVersion": "2.0.0",
          "registryNamespace": "org-preferences"
        }
      },
      {
        "name": "core/Authable",
        "alias": "OrganizationAuthz",
        "parameters": {
          "hierarchyDepthLimit": 5
        }
      },
      {
        "name": "core/Communicable",
        "alias": "OrganizationCommunications",
        "parameters": null
      }
    ],
    "schema": {
      "label": {
        "type": "string",
        "required": true,
        "description": "Human-readable display name rendered in primary surfaces.",
        "validation": {
          "minLength": 1,
          "maxLengthFromParameter": "maxLabelLength",
          "pattern": "^\\S.*\\S$|^\\S$"
        }
      },
      "description": {
        "type": "string",
        "required": false,
        "requiredFromParameter": "requireDescription",
        "description": "Supporting description used in detail and card contexts.",
        "validation": {
          "maxLengthFromParameter": "maxDescriptionLength"
        }
      },
      "placeholder": {
        "type": "string",
        "required": false,
        "description": "Hint copy surfaced in form fields when the label is empty.",
        "validation": {
          "maxLength": 80
        }
      },
      "status": {
        "type": "string",
        "required": true,
        "description": "Canonical lifecycle state derived from the states parameter. This is the single source\nof truth for the entity's current lifecycle position. Consumed by Colorized to resolve\nvisual tokens, and by view extensions to render StatusBadge and StatusTimeline.\n",
        "validation": {
          "enumFromParameter": "states"
        }
      },
      "state_history": {
        "type": "StateTransition[]",
        "required": false,
        "description": "Chronological log of state transitions. Each entry records the before/after states,\ntimestamp, and (when governance is enabled) the actor, reason, and transition metadata.\nRendered by StatusTimeline in the detail and timeline views.\n\nEntry structure:\n  - from: string (previous state)\n  - to: string (new state)\n  - timestamp: ISO 8601 datetime\n  - actor_id: string (user/system who triggered the transition, optional)\n  - reason: string (human-readable justification, required when requireTransitionReason is true)\n  - transition_metadata: Record<string, unknown> (arbitrary context, optional)\n\nEvery recorded change can name who acted, who it acted for and who approved it. All optional,\nfollowing Relationship's source_id/source_name pattern; only a *_name names a party, and an entry that names\nno one renders as it always has:\n  - actor_name: string (who acted, as shown: \"Billing Agent\")\n  - actor_kind: string (person, agent or system: the Actor trait's kinds)\n  - on_behalf_of_name / on_behalf_of_id: string (the person or organization it acted for)\n  - approved_by_name / approved_by_id: string (who approved the change, when someone did)\nStatusTimeline then reads \"Billing Agent for Tidewater Co-op · approved by Ruth Adeyemi\".\n\nA change someone approved can also say which approval it belongs to and what level of yes it was. Both\noptional; the id stays in the record's data, a pointer and not a link, and an entry without them renders as it\nalways has:\n  - approval_id: string (the Approval record the yes is kept in)\n  - approval_level: string (the level of yes, one of the levels the product declares: \"approval\")\nStatusTimeline then reads \"Billing Agent for Tidewater Co-op · approved by Ruth Adeyemi (level: Approval)\".\n\nA change made as part of a task can also say which task it was. Both optional; the id stays in the record's\ndata, a pointer and not a link, and an entry without them renders as it always has:\n  - task_id: string (the Task record the change was made under)\n  - task_name: string (the task, as shown: \"Get INV-2026-0155 paid\")\nStatusTimeline then reads \"… · approved by Ruth Adeyemi (level: Approval) · task: Get INV-2026-0155 paid\".\n\nA change made under a grant, the standing yes an actor acts under for a person or organization, can also say\nwhich grant it was. Both optional; the id stays in the record's data, a pointer and not a link, and an entry\nwithout them renders as it always has:\n  - grant_id: string (the Grant record the change was made under)\n  - grant_name: string (the grant, as shown: \"Resend returned transfers\")\nStatusTimeline names the grant after any approval and before the task: \"Billing Agent for Tidewater Co-op ·\ngrant: Resend returned transfers\".\n",
        "default": []
      },
      "allowed_transitions": {
        "type": "string[]",
        "required": false,
        "description": "Materialized list of the next states the product allows from the current status, written\nby the product from the transitionRules parameter. When transitionRules is null (open model),\nthis contains all states except the current one. The detail page's StatusTimeline lists it\nwhen the record holds it. A generated StatusSelector reads transitionRules instead: it offers the\ncurrent state and the moves the order allows (every state where no order is declared).\n",
        "default": []
      },
      "owner_id": {
        "type": "string",
        "required": true,
        "description": "Identifier of the owning principal scoped by owner_type."
      },
      "owner_type": {
        "type": "string",
        "required": true,
        "description": "Categorical owner type sourced from the ownerTypes parameter.",
        "validation": {
          "enumFromParameter": "ownerTypes"
        }
      },
      "ownership_role": {
        "type": "string",
        "required": false,
        "description": "Optional role name describing how the owner governs the entity.",
        "validation": {
          "maxLength": 80
        }
      },
      "ownership_transferred_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp recording when ownership was last transferred."
      },
      "created_at": {
        "type": "datetime",
        "required": true,
        "description": "Timestamp recording when the entity was first created."
      },
      "updated_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the most recent modification, when available."
      },
      "last_event": {
        "type": "string",
        "required": true,
        "description": "Lifecycle event associated with the most recent timestamp mutation.",
        "validation": {
          "enumFromParameter": "recordedEvents"
        }
      },
      "last_event_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the lifecycle event captured in last_event."
      },
      "tags": {
        "type": "string[]",
        "required": false,
        "description": "Ordered list of tags assigned to the entity.",
        "default": [],
        "validation": {
          "maxItems": 64
        }
      },
      "tag_count": {
        "type": "number",
        "required": true,
        "description": "Computed number of tags assigned to the entity.",
        "default": 0,
        "validation": {
          "minimum": 0
        }
      },
      "tag_metadata": {
        "type": "object[]",
        "required": false,
        "description": "Per-tag governance metadata. Each entry corresponds to a tag in the tags array and\ntracks provenance and usage for taxonomy health monitoring.\n\nEntry structure:\n  - tag: string (the tag value, matches entry in tags array)\n  - created_at: ISO 8601 datetime\n  - created_by: string (user ID or \"system\" for allow-list tags)\n  - usage_count: number (how many entities use this tag, computed)\n  - moderation_status: \"approved\" | \"pending\" | \"rejected\" (when allowTagModeration is true)\n  - canonical_form: string (resolved synonym target, when synonymResolution is enabled)\n",
        "default": []
      },
      "address_roles": {
        "type": "string[]",
        "required": true,
        "description": "Ordered list of roles that currently have address entries.",
        "default": []
      },
      "default_address_role": {
        "type": "string",
        "required": false,
        "description": "Role surfaced in UI contexts when one address must be highlighted.",
        "validation": {
          "enumFromParameter": "roles"
        }
      },
      "addresses": {
        "type": "AddressableEntry[]",
        "required": false,
        "description": "Collection of { role, address, metadata } entries keyed by role.",
        "default": []
      },
      "preference_document": {
        "type": "PreferenceDocument",
        "required": true,
        "description": "Normalized preference payload captured by PreferenceStore (version, preferences map, metadata).",
        "default": {
          "version": "1.0.0",
          "preferences": {
            "theme": {
              "mode": "system"
            },
            "notifications": {
              "mention": {
                "email": true,
                "push": true
              }
            }
          },
          "metadata": {
            "schemaVersion": "1.0.0",
            "lastUpdated": "2025-11-18T00:00:00Z",
            "source": "system",
            "migrationApplied": []
          }
        }
      },
      "preference_metadata": {
        "type": "PreferenceMetadata",
        "required": true,
        "description": "Tracks schema version, lastUpdated timestamp, migration records, and source."
      },
      "preference_version": {
        "defaultFromParameter": "schemaVersion",
        "type": "string",
        "required": true,
        "description": "SemVer mirror of preference_document.version for indexing and analytics.",
        "validation": {
          "pattern": "^\\d+\\.\\d+\\.\\d+$"
        }
      },
      "preference_namespaces": {
        "defaultFromParameter": "namespaces",
        "type": "string[]",
        "required": true,
        "description": "Materialized namespace list resolved from parameters/registry for auditing.",
        "default": [
          "theme",
          "notifications",
          "display"
        ]
      },
      "preference_mutations": {
        "type": "number",
        "required": false,
        "description": "Monotonic counter incremented whenever preferences mutate (invalidates caches).",
        "default": 0,
        "validation": {
          "minimum": 0
        }
      },
      "role_catalog": {
        "type": "AuthzRoleDocument[]",
        "required": true,
        "description": "Canonical RBAC roles (R21.2 Part 4.2 TABLE 1).",
        "examples": [
          [
            {
              "id": "11111111-1111-4111-8111-111111111111",
              "name": "Owner",
              "description": "Full tenant access + invoice approval (R21.2 Table 1)."
            },
            {
              "id": "22222222-2222-4222-8222-222222222222",
              "name": "Approver",
              "description": "Workflow approver for compliance-sensitive documents."
            },
            {
              "id": "33333333-3333-4333-8333-333333333333",
              "name": "Editor",
              "description": "Contributor allowed to create + update documents in scope."
            }
          ]
        ],
        "default": []
      },
      "permission_catalog": {
        "type": "AuthzPermissionDocument[]",
        "required": true,
        "description": "Atomic permissions following resource:action notation (TABLE 2).",
        "default": []
      },
      "role_permissions": {
        "type": "Record<string, string[]>",
        "required": true,
        "description": "Junction map for role→permission edges (TABLE 3).",
        "default": {}
      },
      "membership_records": {
        "type": "AuthzMembershipDocument[]",
        "required": true,
        "description": "SaaS membership triple (member, organization_id, role_id) with UNIQUE constraint (TABLE 4). The member is a user (user_id) or any other actor (actor_id with actor_kind, such as an agent), exactly one of the two.",
        "default": []
      },
      "role_hierarchy_edges": {
        "type": "AuthzRoleHierarchyEdge[]",
        "required": false,
        "description": "Parent→child adjacency list for hierarchical RBAC (Part 3.1).",
        "default": []
      },
      "session_roles": {
        "type": "string[]",
        "required": false,
        "description": "Materialized roles granted within the current session/token exchange.",
        "default": []
      },
      "channel_catalog": {
        "type": "Channel[]",
        "required": true,
        "description": "Provider configuration for each channel (SMTP/Twilio/FCM/Webhook).",
        "examples": [
          [
            {
              "id": "44444444-dddd-4ddd-8ddd-dddddddddddd",
              "name": "Primary Email (SMTP)",
              "type": "email"
            },
            {
              "id": "55555555-eeee-4eee-8eee-eeeeeeeeeeee",
              "name": "Twilio SMS",
              "type": "sms"
            },
            {
              "id": "66666666-ffff-4fff-8fff-ffffffffffff",
              "name": "FCM Push",
              "type": "push"
            },
            {
              "id": "77777777-0000-4000-8000-000000000000",
              "name": "Realtime In-App",
              "type": "in_app"
            }
          ]
        ],
        "default": []
      },
      "template_catalog": {
        "type": "Template[]",
        "required": true,
        "description": "Localized template definitions with declared variables per R20.1 Part 2.3.",
        "examples": [
          [
            {
              "id": "88888888-1111-4111-8111-111111111111",
              "name": "Welcome Email",
              "channelType": "email",
              "subject": "Welcome to OODS Foundry, {{firstName}}!",
              "body": "Hi {{firstName}},\n\nThanks for joining {{workspaceName}}. Activate your account using {{activationLink}}.",
              "variables": [
                "firstName",
                "workspaceName",
                "activationLink"
              ],
              "locale": "en-US"
            },
            {
              "id": "99999999-2222-4222-8222-222222222222",
              "name": "Password Reset Email",
              "channelType": "email",
              "subject": "Reset your OODS Foundry password",
              "body": "Hello {{firstName}},\n\nWe received a request to reset your password. Use this code: {{resetCode}}.",
              "variables": [
                "firstName",
                "resetCode"
              ],
              "locale": "en-US"
            },
            {
              "id": "aaaaaaa1-3333-4333-8333-333333333333",
              "name": "In-App Notification",
              "channelType": "in_app",
              "subject": "New document shared with you",
              "body": "{{actorName}} shared \"{{documentName}}\" with you. Review it before {{dueDate}}.",
              "variables": [
                "actorName",
                "documentName",
                "dueDate"
              ],
              "locale": "en-US"
            }
          ]
        ],
        "default": []
      },
      "delivery_policies": {
        "type": "DeliveryPolicy[]",
        "required": true,
        "description": "Retry/throttle/quiet-hour policies (R20.1 Part 3 lifecycle).",
        "default": []
      },
      "messages": {
        "type": "Message[]",
        "required": false,
        "description": "Atomic message payloads queued for delivery (R20.6 Part 1.2 primitives).",
        "default": []
      },
      "conversations": {
        "type": "Conversation[]",
        "required": false,
        "description": "Multi-party threaded conversations with membership metadata (R20.6 Part 3.3).",
        "default": []
      },
      "message_statuses": {
        "type": "MessageStatusEntry[]",
        "required": false,
        "description": "Delivery state machine transitions (queued → sent → delivered → failed → retried → read).",
        "default": []
      },
      "organization_id": {
        "type": "uuid",
        "required": true,
        "description": "Primary identifier for the organization tenant."
      },
      "domain": {
        "type": "string",
        "required": true,
        "description": "Verified root domain associated with the organization.",
        "validation": {
          "format": "hostname"
        }
      },
      "plan_tier": {
        "type": "string",
        "required": true,
        "description": "Billing plan currently assigned to the organization.",
        "validation": {
          "enum": [
            "free",
            "growth",
            "enterprise"
          ]
        }
      },
      "billing_status": {
        "type": "string",
        "required": true,
        "default": "good_standing",
        "description": "Coarse account-level financial standing used by the billing subsystem. Intentionally coarser than the subscription lifecycle: this is a 4-state account vocabulary {good_standing, past_due, unpaid, suspended}, NOT the 8-state billing.subscription.status set. See docs/billing/lifecycle-states.md.",
        "validation": {
          "enum": [
            "good_standing",
            "past_due",
            "unpaid",
            "suspended"
          ]
        }
      },
      "industry": {
        "type": "string",
        "required": false,
        "description": "Optional NAICS-derived industry tag."
      },
      "employee_count": {
        "type": "number",
        "required": false,
        "description": "Reported number of active employees.",
        "validation": {
          "minimum": 0
        }
      },
      "billing_contact_email": {
        "type": "email",
        "required": false,
        "description": "Primary contact email for invoicing and finance escalations."
      },
      "data_residency": {
        "type": "string",
        "required": false,
        "description": "Preferred data residency region selected during onboarding.",
        "validation": {
          "enum": [
            "us",
            "eu",
            "apac",
            "latam"
          ]
        }
      },
      "owner_name": {
        "type": "string",
        "required": false,
        "description": "Display name of the owning principal (parent organization, reseller or platform team)."
      }
    },
    "semantics": {
      "label": {
        "semantic_type": "text.label",
        "token_mapping": "tokenMap(text.label.*)",
        "ui_hints": {
          "component": "TextHeading",
          "maxLengthParameter": "maxLabelLength",
          "headingLevel": 2
        }
      },
      "description": {
        "semantic_type": "text.summary",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "TextBody",
          "maxLengthParameter": "maxDescriptionLength"
        }
      },
      "placeholder": {
        "semantic_type": "text.placeholder",
        "token_mapping": "tokenMap(text.placeholder.*)",
        "ui_hints": {
          "component": "FormHint",
          "maxLength": 80
        }
      },
      "status": {
        "semantic_type": "status.state",
        "token_mapping": "tokenMap(status.state.*)",
        "ui_hints": {
          "component": "StatusBadge",
          "showIcon": true
        }
      },
      "state_history": {
        "semantic_type": "timeline.state_transition",
        "token_mapping": "tokenMap(timeline.status.*)",
        "ui_hints": {
          "component": "StatusTimeline",
          "collapseWhenEmpty": true
        }
      },
      "allowed_transitions": {
        "semantic_type": "status.navigation",
        "token_mapping": "computed",
        "ui_hints": {
          "component": "StatusSelector",
          "description": "The next states the product allows, as the product writes them; listed on the detail page, never used to disable an option."
        }
      },
      "owner_id": {
        "semantic_type": "ownership.owner.id",
        "token_mapping": "tokenMap(ownership.owner.id)",
        "ui_hints": {
          "component": "OwnerReference",
          "ownerTypeField": "owner_type",
          "displayLabelField": "owner_name"
        }
      },
      "owner_type": {
        "semantic_type": "ownership.owner.type",
        "token_mapping": "tokenMap(ownership.owner.type)",
        "ui_hints": {
          "component": "OwnerTypeBadge",
          "parameterSource": "ownerTypes"
        }
      },
      "ownership_role": {
        "semantic_type": "ownership.owner.role",
        "token_mapping": "tokenMap(ownership.owner.role)",
        "ui_hints": {
          "component": "OwnerRolePill"
        }
      },
      "ownership_transferred_at": {
        "semantic_type": "ownership.owner.transferred_at",
        "token_mapping": "tokenMap(ownership.owner.timestamp)",
        "ui_hints": {
          "component": "TimelineTimestamp"
        }
      },
      "created_at": {
        "semantic_type": "audit.created_at",
        "token_mapping": "tokenMap(audit.created)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "updated_at": {
        "semantic_type": "audit.updated_at",
        "token_mapping": "tokenMap(audit.updated)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone",
          "allowNullParameter": "allowNullUpdatedAt"
        }
      },
      "last_event": {
        "semantic_type": "audit.event.type",
        "token_mapping": "tokenMap(audit.event.*)",
        "ui_hints": {
          "component": "AuditBadge",
          "parameterSource": "recordedEvents"
        }
      },
      "last_event_at": {
        "semantic_type": "audit.event.timestamp",
        "token_mapping": "tokenMap(audit.event.timestamp)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "tags": {
        "semantic_type": "taxonomy.tag.collection",
        "token_mapping": "tokenMap(taxonomy.tag.*)",
        "ui_hints": {
          "component": "TagCollection",
          "allowCreateParameter": "allowCustomTags",
          "allowListParameter": "allowedTags",
          "caseSensitiveParameter": "caseSensitive"
        }
      },
      "tag_count": {
        "semantic_type": "metric.collection.count",
        "token_mapping": "tokenMap(taxonomy.tag.count)",
        "ui_hints": {
          "component": "MetricBadge",
          "format": "integer"
        }
      },
      "tag_metadata": {
        "semantic_type": "taxonomy.tag.governance",
        "token_mapping": "computed",
        "ui_hints": {
          "component": "TagGovernancePanel",
          "description": "Admin panel for reviewing tag health, moderation queue, and synonym resolution."
        }
      },
      "addresses": {
        "semantic_type": "location.address.collection",
        "token_mapping": "tokenMap(location.address.collection)",
        "ui_hints": {
          "component": "AddressCollection",
          "roleParameter": "roles",
          "defaultRoleField": "default_address_role"
        }
      },
      "default_address_role": {
        "semantic_type": "location.address.default_role",
        "token_mapping": "tokenMap(location.address.default_role)",
        "ui_hints": {
          "component": "AddressRoleBadge",
          "parameterSource": "defaultRole"
        }
      },
      "address_roles": {
        "semantic_type": "location.address.roles",
        "token_mapping": "tokenMap(location.address.roles)",
        "ui_hints": {
          "component": "AddressRolePills"
        }
      },
      "preference_document": {
        "semantic_type": "preferences.document",
        "token_mapping": "tokenMap(preferences.document)",
        "ui_hints": {
          "component": "PreferenceDiffPanel",
          "registryNamespaceParameter": "registryNamespace"
        }
      },
      "preference_metadata": {
        "semantic_type": "preferences.metadata",
        "token_mapping": "tokenMap(preferences.metadata)",
        "ui_hints": {
          "component": "PreferenceDiagnostics"
        }
      },
      "preference_version": {
        "semantic_type": "preferences.version",
        "token_mapping": "tokenMap(preferences.version)",
        "ui_hints": {
          "component": "PreferenceVersionBadge"
        }
      },
      "preference_namespaces": {
        "semantic_type": "preferences.namespaces",
        "token_mapping": "tokenMap(preferences.namespaces)",
        "ui_hints": {
          "component": "PreferenceNamespaceChips"
        }
      },
      "membership_records": {
        "semantic_type": "authorization.memberships",
        "token_mapping": "tokenMap(authorization.memberships)",
        "ui_hints": {
          "component": "MembershipMatrix",
          "uniqueConstraint": "user_id|actor_id+organization_id+role_id"
        }
      },
      "role_catalog": {
        "semantic_type": "authorization.roles",
        "token_mapping": "tokenMap(authorization.roles)",
        "ui_hints": {
          "component": "RoleCatalogPanel"
        }
      },
      "permission_catalog": {
        "semantic_type": "authorization.permissions",
        "token_mapping": "tokenMap(authorization.permissions)",
        "ui_hints": {
          "component": "PermissionList"
        }
      },
      "channel_catalog": {
        "semantic_type": "communication.channels",
        "token_mapping": "--sys-communication-accent",
        "ui_hints": {
          "component": "ChannelGrid",
          "badges": "channel_catalog[].type"
        }
      },
      "template_catalog": {
        "semantic_type": "communication.templates",
        "token_mapping": "--sys-communication-muted",
        "ui_hints": {
          "component": "TemplateDrawer",
          "variableBadge": "template_catalog[].variables"
        }
      },
      "delivery_policies": {
        "semantic_type": "communication.delivery_policy",
        "token_mapping": "--sys-communication-accent",
        "ui_hints": {
          "component": "DeliveryPolicyCapsule"
        }
      },
      "messages": {
        "semantic_type": "communication.messages",
        "token_mapping": "--sys-communication-success",
        "ui_hints": {
          "component": "MessageTimeline"
        }
      },
      "conversations": {
        "semantic_type": "communication.conversations",
        "token_mapping": "--sys-communication-accent",
        "ui_hints": {
          "component": "ConversationViewer"
        }
      },
      "data_residency": {
        "semantic_type": "organization.data_residency",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "enumLabels": {
            "us": "US",
            "eu": "EU",
            "apac": "APAC",
            "latam": "LATAM"
          }
        }
      },
      "organization_id": {
        "semantic_type": "organization.id",
        "token_mapping": "tokenMap(organization.id.primary)"
      },
      "domain": {
        "semantic_type": "organization.domain",
        "token_mapping": "tokenMap(organization.domain.primary)"
      },
      "plan_tier": {
        "semantic_type": "organization.plan.tier",
        "token_mapping": "tokenMap(organization.plan.tier)"
      },
      "billing_status": {
        "semantic_type": "billing.account.status",
        "token_mapping": "tokenMap(billing.account.status)"
      },
      "employee_count": {
        "semantic_type": "organization.metrics.employee_count",
        "token_mapping": "tokenMap(metric.count.primary)"
      }
    },
    "viewExtensions": {
      "list": [
        {
          "component": "LabelCell",
          "priority": 100,
          "props": {
            "field": "label",
            "descriptionField": "description",
            "truncate": true,
            "maxLengthParameter": "maxLabelLength"
          }
        },
        {
          "component": "MessageStatusBadge",
          "position": "before",
          "priority": 90,
          "props": {
            "statusesField": "message_statuses"
          }
        },
        {
          "component": "StatusBadge",
          "props": {
            "field": "status",
            "tone": "lifecycle"
          }
        },
        {
          "component": "OwnerBadge",
          "props": {
            "ownerIdField": "owner_id",
            "ownerTypeField": "owner_type"
          }
        },
        {
          "component": "RelativeTimestamp",
          "props": {
            "field": "updated_at",
            "fallbackField": "created_at",
            "timezoneParameter": "timezone"
          }
        },
        {
          "component": "TagPills",
          "props": {
            "field": "tags",
            "maxVisible": 3,
            "overflowLabel": "+{{ tag_count }}"
          }
        },
        {
          "component": "AddressSummaryBadge",
          "position": "after",
          "props": {
            "field": "default_address_role"
          }
        },
        {
          "component": "PreferenceSummaryBadge",
          "position": "after",
          "props": {
            "namespacesField": "preference_namespaces",
            "versionField": "preference_version"
          }
        },
        {
          "component": "RoleBadgeList",
          "position": "after",
          "props": {
            "rolesField": "session_roles",
            "fallbackRoleParameter": "defaultRoleId"
          }
        }
      ],
      "detail": [
        {
          "component": "DetailHeader",
          "position": "top",
          "priority": 100,
          "props": {
            "titleField": "label",
            "subtitleField": "description",
            "headingLevel": 1
          }
        },
        {
          "component": "CommunicationDetailPanel",
          "position": "main",
          "priority": 80,
          "props": {
            "channelsField": "channel_catalog",
            "templatesField": "template_catalog",
            "policiesField": "delivery_policies",
            "conversationsField": "conversations"
          }
        },
        {
          "component": "MembershipPanel",
          "position": "main",
          "priority": 75,
          "props": {
            "membershipsField": "membership_records",
            "hierarchyField": "role_hierarchy_edges",
            "roleField": "role_catalog",
            "permissionField": "permission_catalog"
          }
        },
        {
          "component": "AddressCollectionPanel",
          "position": "main",
          "priority": 60,
          "props": {
            "field": "addresses",
            "roleField": "address_roles",
            "defaultRoleField": "default_address_role",
            "roleParameter": "roles"
          }
        },
        {
          "component": "PreferencePanel",
          "position": "main",
          "priority": 55,
          "props": {
            "preferencesField": "preference_document",
            "metadataField": "preference_metadata",
            "namespaceField": "preference_namespaces"
          }
        },
        {
          "component": "StatusTimeline",
          "position": "top",
          "priority": 40,
          "props": {
            "field": "status",
            "historyField": "state_history",
            "statesParameter": "states",
            "showActorId": true,
            "showReason": true
          }
        },
        {
          "component": "OwnershipSummary",
          "position": "top",
          "props": {
            "ownerIdField": "owner_id",
            "ownerTypeField": "owner_type",
            "roleField": "ownership_role",
            "transferredAtField": "ownership_transferred_at",
            "allowTransferParameter": "allowTransfer"
          }
        },
        {
          "component": "AuditTimeline",
          "position": "bottom",
          "props": {
            "createdField": "created_at",
            "updatedField": "updated_at",
            "eventField": "last_event",
            "eventTimestampField": "last_event_at",
            "eventOptionsParameter": "recordedEvents"
          }
        },
        {
          "component": "TagSummary",
          "position": "top",
          "props": {
            "field": "tags",
            "countField": "tag_count"
          }
        }
      ],
      "form": [
        {
          "component": "FormLabelGroup",
          "position": "before",
          "priority": 100,
          "props": {
            "labelField": "label",
            "descriptionField": "description",
            "placeholderField": "placeholder",
            "maxLabelLengthParameter": "maxLabelLength",
            "maxDescriptionLengthParameter": "maxDescriptionLength",
            "requireDescriptionParameter": "requireDescription"
          }
        },
        {
          "component": "StatusSelector",
          "position": "top",
          "props": {
            "field": "status",
            "optionsParameter": "states",
            "initialParameter": "initialState",
            "allowedTransitionsField": "allowed_transitions",
            "requireReasonParameter": "requireTransitionReason"
          }
        },
        {
          "component": "TagInput",
          "position": "top",
          "props": {
            "field": "tags",
            "maxTagsParameter": "maxTags",
            "allowCustomParameter": "allowCustomTags",
            "allowListParameter": "allowedTags",
            "minLengthParameter": "tagMinLength",
            "maxLengthParameter": "tagMaxLength",
            "synonymParameter": "synonymResolution"
          }
        },
        {
          "component": "AddressEditor",
          "position": "top",
          "props": {
            "field": "addresses",
            "roleParameter": "roles",
            "allowDynamicParameter": "allowDynamicRoles",
            "defaultRoleField": "default_address_role"
          }
        },
        {
          "component": "PreferenceEditor",
          "position": "main",
          "props": {
            "namespacesField": "preference_namespaces",
            "documentField": "preference_document",
            "registryNamespaceParameter": "registryNamespace"
          }
        },
        {
          "component": "RoleAssignmentForm",
          "position": "main",
          "props": {
            "availableRolesField": "role_catalog",
            "membershipField": "membership_records",
            "defaultRoleParameter": "defaultRoleId"
          }
        },
        {
          "component": "TemplatePicker",
          "position": "main",
          "props": {
            "templatesField": "template_catalog",
            "channelsField": "channel_catalog"
          }
        }
      ],
      "card": [
        {
          "component": "CardHeader",
          "position": "top",
          "priority": 100,
          "props": {
            "titleField": "label",
            "supportingField": "description"
          }
        },
        {
          "component": "StatusBadge",
          "position": "before",
          "props": {
            "field": "status",
            "variant": "subtle"
          }
        },
        {
          "component": "OwnershipMeta",
          "position": "after",
          "props": {
            "ownerIdField": "owner_id",
            "ownerTypeField": "owner_type",
            "roleField": "ownership_role"
          }
        },
        {
          "component": "TagPills",
          "position": "after",
          "props": {
            "field": "tags",
            "maxVisible": 3,
            "overflowLabel": "+{{ tag_count }}"
          }
        }
      ],
      "timeline": [
        {
          "component": "TimelineEntryLabel",
          "props": {
            "field": "label",
            "compact": true
          }
        }
      ],
      "inline": [
        {
          "component": "InlineLabel",
          "props": {
            "field": "label",
            "maxLength": 40
          }
        }
      ]
    },
    "tokens": {
      "text.label.color": "var(--sys-text-strong)",
      "text.label.font-weight": "var(--sys-font-weight-semibold)",
      "text.label.font-size": "var(--sys-font-size-lg)",
      "text.label.line-height": "var(--sys-line-height-tight)",
      "text.body.color": "var(--sys-text-subtle)",
      "text.body.font-weight": "var(--sys-font-weight-regular)",
      "text.body.font-size": "var(--sys-font-size-sm)",
      "text.body.line-height": "var(--sys-line-height-relaxed)",
      "text.placeholder.color": "var(--sys-text-muted)",
      "text.placeholder.font-weight": "var(--sys-font-weight-regular)",
      "text.placeholder.font-size": "var(--sys-font-size-sm)",
      "text.placeholder.line-height": "var(--sys-line-height-normal)",
      "status.state.default.bg": "var(--status-neutral-bg)",
      "status.state.default.text": "var(--status-neutral-text)",
      "status.timeline.connector": "var(--border-subtle)",
      "status.timeline.node.bg": "var(--sys-surface-raised)",
      "status.timeline.node.border": "var(--sys-border-default)",
      "status.timeline.actor.text": "var(--sys-text-secondary)",
      "status.timeline.reason.text": "var(--sys-text-tertiary)",
      "status.timeline.reason.bg": "var(--sys-surface-neutral)",
      "ownership.owner.badge.bg": "var(--surface-subtle)",
      "ownership.owner.badge.text": "var(--text-default)",
      "ownership.owner.role.text": "var(--text-muted)",
      "audit.created.badge.text": "var(--text-subtle)",
      "audit.updated.badge.text": "var(--text-subtle)",
      "audit.event.badge.bg": "var(--surface-muted)",
      "taxonomy.tag.chip.bg": "var(--surface-tag-bg)",
      "taxonomy.tag.chip.text": "var(--surface-tag-text)",
      "taxonomy.tag.chip.border": "var(--sys-border-default)",
      "taxonomy.tag.chip.hover.bg": "var(--sys-surface-hover)",
      "taxonomy.tag.chip.pending.bg": "var(--sys-status-warning-surface)",
      "taxonomy.tag.chip.pending.text": "var(--sys-status-warning-text)",
      "taxonomy.tag.summary.count": "var(--text-subtle)",
      "taxonomy.tag.input.border": "var(--sys-border-default)",
      "taxonomy.tag.input.focus.border": "var(--sys-border-focus)",
      "location.address.card.bg": "var(--sys-surface-raised)",
      "location.address.card.border": "var(--sys-border-subtle)",
      "location.address.role.text": "var(--sys-text-muted)",
      "preferences.panel.bg": "var(--sys-surface-raised)",
      "preferences.panel.border": "var(--sys-border-strong)",
      "preferences.namespace.badge.bg": "var(--sys-surface-muted)",
      "preferences.namespace.badge.text": "var(--sys-text-strong)",
      "auth.roles.badge.bg": "var(--sys-surface-neutral)",
      "auth.roles.badge.text": "var(--sys-text-strong)",
      "auth.membership.card.border": "var(--sys-border-strong)",
      "auth.membership.card.bg": "var(--sys-surface-raised)",
      "communication.card.bg": "var(--sys-surface-raised)",
      "communication.card.border": "var(--sys-communication-muted)",
      "communication.status.success": "var(--sys-communication-success)",
      "communication.status.error": "var(--sys-communication-error)",
      "organization.id.primary": "var(--text-strong)",
      "organization.domain.primary": "var(--text-strong)",
      "billing.account.status.good": "var(--status-success)",
      "billing.account.status.risk": "var(--status-warning)"
    },
    "warnings": [],
    "filePath": "~/.oods-foundry/runtime/0.18.0-2b9c3aa471be/objects/core/Organization.object.yaml",
    "source": "shipped"
  },
  {
    "name": "Plan",
    "version": "1.0.0",
    "domain": "saas.billing",
    "description": "Normalized plan definition capturing pricing, packaging, and entitlement metadata.",
    "tags": [
      "billing",
      "plan",
      "packaging"
    ],
    "maturity": "beta",
    "traits": [
      {
        "name": "SaaSBillingBillable",
        "alias": "Pricing",
        "parameters": null
      },
      {
        "name": "SaaSBillingMetered",
        "alias": "IncludedUsage",
        "parameters": {
          "unit": "seats",
          "rolloverStrategy": "none",
          "sampleWindowDays": 30
        }
      },
      {
        "name": "structural/Ownerable",
        "alias": "PlanOwnership",
        "parameters": null
      }
    ],
    "relationships": [
      {
        "target": "Plan",
        "via": "upgrade_targets",
        "cardinality": "many-to-many",
        "label": "Upgrade destinations"
      },
      {
        "target": "Plan",
        "via": "downgrade_targets",
        "cardinality": "many-to-many",
        "label": "Downgrade destinations"
      }
    ],
    "schema": {
      "plan_code": {
        "type": "string",
        "required": true,
        "description": "Provider specific identifier for the plan or price."
      },
      "plan_name": {
        "type": "string",
        "required": true,
        "description": "Human readable plan label rendered in list and detail contexts."
      },
      "billing_interval": {
        "type": "string",
        "required": true,
        "description": "Billing cadence name selected from supportedIntervals.",
        "validation": {
          "enumFromParameter": "supportedIntervals"
        }
      },
      "interval_count": {
        "type": "integer",
        "required": false,
        "description": "Multiplier for interval (ex: 12 with monthly => yearly cadence).",
        "default": 1
      },
      "amount_minor": {
        "type": "integer",
        "required": true,
        "description": "Contract value expressed in minor currency units."
      },
      "currency": {
        "type": "string",
        "required": true,
        "description": "ISO 4217 currency for the plan price.",
        "defaultFromParameter": "defaultCurrency"
      },
      "trial_period_days": {
        "type": "integer",
        "required": false,
        "description": "Length of introductory trial period in days."
      },
      "collection_method": {
        "type": "string",
        "required": false,
        "description": "How billing is collected (charge_automatically, send_invoice)."
      },
      "billing_anchor_day": {
        "type": "integer",
        "required": false,
        "description": "Day of month used to anchor renewals when prorating.",
        "validation": {
          "minimum": 1,
          "maximum": 31
        }
      },
      "pricing_model": {
        "type": "string",
        "required": false,
        "description": "Price strategy (flat, per_unit, tiered, package).",
        "default": "flat"
      },
      "meter_name": {
        "type": "string",
        "required": true,
        "description": "Friendly metered feature name shown in UI (ex: Analytics Seats)."
      },
      "included_quantity": {
        "type": "integer",
        "required": true,
        "description": "Quantity included in base plan before overages."
      },
      "consumed_quantity": {
        "type": "integer",
        "required": true,
        "description": "Actual quantity consumed in the active period."
      },
      "unit_label": {
        "type": "string",
        "required": true,
        "description": "Label for display, defaults to the unit parameter.",
        "defaultFromParameter": "unit"
      },
      "period_start": {
        "type": "date",
        "required": true,
        "description": "Date the usage accumulation window began."
      },
      "period_end": {
        "type": "date",
        "required": true,
        "description": "Date the usage accumulation window ends."
      },
      "rollover_strategy": {
        "type": "string",
        "required": false,
        "description": "Strategy for unused units (inherits rolloverStrategy parameter).",
        "defaultFromParameter": "rolloverStrategy"
      },
      "overage_rate_minor": {
        "type": "integer",
        "required": false,
        "description": "Cost per additional unit expressed in minor currency units."
      },
      "projected_overage_minor": {
        "type": "integer",
        "required": false,
        "description": "Forecasted overage spend derived from consumption trends."
      },
      "samples": {
        "type": "UsageSample[]",
        "required": false,
        "description": "Rolling usage measurements for charts or anomaly detection.",
        "default": []
      },
      "owner_id": {
        "type": "string",
        "required": true,
        "description": "Identifier of the owning principal scoped by owner_type."
      },
      "owner_type": {
        "type": "string",
        "required": true,
        "description": "Categorical owner type sourced from the ownerTypes parameter.",
        "validation": {
          "enumFromParameter": "ownerTypes"
        }
      },
      "ownership_role": {
        "type": "string",
        "required": false,
        "description": "Optional role name describing how the owner governs the entity.",
        "validation": {
          "maxLength": 80
        }
      },
      "ownership_transferred_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp recording when ownership was last transferred."
      },
      "plan_id": {
        "type": "string",
        "required": true,
        "description": "Stable identifier for the plan within the billing domain."
      },
      "product_family": {
        "type": "string",
        "required": true,
        "description": "High level product family grouping for analytics and reporting."
      },
      "status": {
        "type": "string",
        "required": true,
        "description": "Availability state of the plan (active, deprecated, private_beta).",
        "validation": {
          "enum": [
            "active",
            "deprecated",
            "private_beta",
            "legacy"
          ]
        }
      },
      "feature_matrix": {
        "type": "FeatureDescriptor[]",
        "required": false,
        "description": "Array of feature descriptors listing entitlement tiers.",
        "default": []
      },
      "add_on_ids": {
        "type": "string[]",
        "required": false,
        "description": "Identifiers for add-ons commonly sold with this plan.",
        "default": []
      },
      "upgrade_targets": {
        "type": "string[]",
        "required": false,
        "description": "Plans presented as upgrade destinations.",
        "default": []
      },
      "downgrade_targets": {
        "type": "string[]",
        "required": false,
        "description": "Plans that can be downgraded to from this plan.",
        "default": []
      },
      "notes": {
        "type": "string",
        "required": false,
        "description": "Internal commentary for packaging or finance teams."
      },
      "owner_name": {
        "type": "string",
        "required": false,
        "description": "Display name of the team that owns the plan."
      }
    },
    "semantics": {
      "plan_code": {
        "semantic_type": "billing.plan.code",
        "token_mapping": "tokenMap(billing.plan.code)"
      },
      "plan_name": {
        "semantic_type": "billing.plan.name",
        "token_mapping": "tokenMap(billing.plan.name)"
      },
      "billing_interval": {
        "semantic_type": "billing.plan.interval",
        "token_mapping": "tokenMap(billing.plan.interval)"
      },
      "interval_count": {
        "semantic_type": "billing.plan.interval_count",
        "token_mapping": "tokenMap(billing.plan.interval_count)"
      },
      "amount_minor": {
        "semantic_type": "billing.plan.amount_minor",
        "token_mapping": "tokenMap(billing.plan.amount_minor)",
        "ui_hints": {
          "component": "CurrencyAmount",
          "currencyField": "currency",
          "minorUnits": 100
        }
      },
      "currency": {
        "semantic_type": "billing.plan.currency",
        "token_mapping": "tokenMap(billing.plan.currency)"
      },
      "trial_period_days": {
        "semantic_type": "billing.plan.trial_period_days",
        "token_mapping": "tokenMap(billing.plan.trial_period_days)"
      },
      "collection_method": {
        "semantic_type": "billing.plan.collection_method",
        "token_mapping": "tokenMap(billing.plan.collection_method)"
      },
      "billing_anchor_day": {
        "semantic_type": "billing.plan.billing_anchor_day",
        "token_mapping": "tokenMap(billing.plan.billing_anchor_day)"
      },
      "pricing_model": {
        "semantic_type": "billing.plan.pricing_model",
        "token_mapping": "tokenMap(billing.plan.pricing_model)"
      },
      "meter_name": {
        "semantic_type": "billing.usage.meter_name",
        "token_mapping": "tokenMap(billing.usage.meter_name)"
      },
      "included_quantity": {
        "semantic_type": "billing.usage.included_quantity",
        "token_mapping": "tokenMap(billing.usage.included_quantity)",
        "ui_hints": {
          "format": "quantity"
        }
      },
      "consumed_quantity": {
        "semantic_type": "billing.usage.consumed_quantity",
        "token_mapping": "tokenMap(billing.usage.consumed_quantity)",
        "ui_hints": {
          "format": "quantity"
        }
      },
      "unit_label": {
        "semantic_type": "billing.usage.unit_label",
        "token_mapping": "tokenMap(billing.usage.unit_label)"
      },
      "period_start": {
        "semantic_type": "billing.usage.period_start",
        "token_mapping": "tokenMap(billing.usage.period_start)"
      },
      "period_end": {
        "semantic_type": "billing.usage.period_end",
        "token_mapping": "tokenMap(billing.usage.period_end)"
      },
      "rollover_strategy": {
        "semantic_type": "billing.usage.rollover_strategy",
        "token_mapping": "tokenMap(billing.usage.rollover_strategy)"
      },
      "overage_rate_minor": {
        "semantic_type": "billing.usage.overage_rate_minor",
        "token_mapping": "tokenMap(billing.usage.overage_rate_minor)",
        "ui_hints": {
          "component": "CurrencyAmount",
          "currencyField": "currency",
          "minorUnits": 100
        }
      },
      "projected_overage_minor": {
        "semantic_type": "billing.usage.projected_overage_minor",
        "token_mapping": "tokenMap(billing.usage.projected_overage_minor)",
        "ui_hints": {
          "component": "CurrencyAmount",
          "currencyField": "currency",
          "minorUnits": 100
        }
      },
      "samples": {
        "semantic_type": "billing.usage.samples",
        "token_mapping": "tokenMap(billing.usage.samples)"
      },
      "owner_id": {
        "semantic_type": "ownership.owner.id",
        "token_mapping": "tokenMap(ownership.owner.id)",
        "ui_hints": {
          "component": "OwnerReference",
          "ownerTypeField": "owner_type",
          "displayLabelField": "owner_name"
        }
      },
      "owner_type": {
        "semantic_type": "ownership.owner.type",
        "token_mapping": "tokenMap(ownership.owner.type)",
        "ui_hints": {
          "component": "OwnerTypeBadge",
          "parameterSource": "ownerTypes"
        }
      },
      "ownership_role": {
        "semantic_type": "ownership.owner.role",
        "token_mapping": "tokenMap(ownership.owner.role)",
        "ui_hints": {
          "component": "OwnerRolePill"
        }
      },
      "ownership_transferred_at": {
        "semantic_type": "ownership.owner.transferred_at",
        "token_mapping": "tokenMap(ownership.owner.timestamp)",
        "ui_hints": {
          "component": "TimelineTimestamp"
        }
      },
      "plan_id": {
        "semantic_type": "billing.plan.id",
        "token_mapping": "tokenMap(billing.plan.id)"
      },
      "product_family": {
        "semantic_type": "text.summary",
        "token_mapping": "tokenMap(billing.plan.product_family)"
      },
      "status": {
        "semantic_type": "billing.plan.status",
        "token_mapping": "tokenMap(billing.plan.status)"
      },
      "feature_matrix": {
        "semantic_type": "billing.plan.feature_matrix",
        "token_mapping": "tokenMap(billing.plan.feature_matrix)"
      },
      "add_on_ids": {
        "semantic_type": "billing.plan.add_on_ids",
        "token_mapping": "tokenMap(billing.plan.add_on_ids)"
      },
      "upgrade_targets": {
        "semantic_type": "billing.plan.upgrade_targets",
        "token_mapping": "tokenMap(billing.plan.upgrade_targets)"
      },
      "downgrade_targets": {
        "semantic_type": "billing.plan.downgrade_targets",
        "token_mapping": "tokenMap(billing.plan.downgrade_targets)"
      },
      "notes": {
        "semantic_type": "billing.plan.notes",
        "token_mapping": "tokenMap(billing.plan.notes)"
      }
    },
    "viewExtensions": {
      "list": [
        {
          "component": "BillingSummaryBadge",
          "position": "after",
          "props": {
            "amountField": "amount_minor",
            "currencyField": "currency",
            "intervalField": "billing_interval",
            "minorUnits": 100
          }
        },
        {
          "component": "OwnerBadge",
          "props": {
            "ownerIdField": "owner_id",
            "ownerTypeField": "owner_type"
          }
        }
      ],
      "card": [
        {
          "component": "BillingCardMeta",
          "position": "after",
          "props": {
            "amountField": "amount_minor",
            "currencyField": "currency",
            "intervalField": "billing_interval",
            "minorUnits": 100
          }
        },
        {
          "component": "OwnershipMeta",
          "position": "after",
          "props": {
            "ownerIdField": "owner_id",
            "ownerTypeField": "owner_type",
            "roleField": "ownership_role"
          }
        }
      ],
      "detail": [
        {
          "component": "OwnershipSummary",
          "position": "top",
          "props": {
            "ownerIdField": "owner_id",
            "ownerTypeField": "owner_type",
            "roleField": "ownership_role",
            "transferredAtField": "ownership_transferred_at",
            "allowTransferParameter": "allowTransfer"
          }
        }
      ]
    },
    "tokens": {
      "billing.plan.name": "var(--cmp-text-strong)",
      "billing.plan.amount_minor": "var(--cmp-text-body-strong)",
      "billing.plan.currency": "var(--cmp-text-subtle)",
      "billing.plan.interval": "var(--cmp-text-subtle)",
      "billing.plan.collection_method": "var(--cmp-badge-text-info)",
      "billing.usage.meter_name": "var(--cmp-text-strong)",
      "billing.usage.consumed_quantity": "var(--cmp-text-accent)",
      "billing.usage.projected_overage_minor": "var(--cmp-text-warning)",
      "ownership.owner.badge.bg": "var(--surface-subtle)",
      "ownership.owner.badge.text": "var(--text-default)",
      "ownership.owner.role.text": "var(--text-muted)",
      "billing.plan.id": "var(--cmp-text-strong)",
      "billing.plan.status": "var(--cmp-badge-text-info)",
      "billing.plan.product_family": "var(--cmp-text-subtle)"
    },
    "warnings": [],
    "filePath": "~/.oods-foundry/runtime/0.18.0-2b9c3aa471be/domains/saas-billing/objects/Plan.object.yaml",
    "source": "shipped"
  },
  {
    "name": "Product",
    "version": "1.1.0",
    "domain": "core.catalog",
    "description": "Canonical catalog entry combining pricing, lifecycle, and merchandising metadata.",
    "tags": [
      "universal",
      "product",
      "commerce",
      "taxonomy"
    ],
    "maturity": null,
    "traits": [
      {
        "name": "content/Labelled",
        "alias": "ProductLabel",
        "parameters": null
      },
      {
        "name": "lifecycle/Stateful",
        "alias": null,
        "parameters": {
          "states": [
            "draft",
            "in_review",
            "active",
            "retired"
          ],
          "initialState": "draft"
        }
      },
      {
        "name": "lifecycle/Timestampable",
        "alias": null,
        "parameters": {
          "recordedEvents": [
            "created",
            "spec_updated",
            "price_changed",
            "retired"
          ],
          "timezone": "UTC"
        }
      },
      {
        "name": "financial/Priceable",
        "alias": null,
        "parameters": {
          "supportedCurrencies": [
            "USD",
            "EUR",
            "GBP",
            "AUD"
          ],
          "defaultCurrency": "USD",
          "pricingModels": [
            "one_time",
            "subscription",
            "usage_based"
          ],
          "billingIntervals": [
            "one_time",
            "month",
            "year"
          ],
          "taxBehavior": "exclusive"
        }
      },
      {
        "name": "core/Classifiable",
        "alias": "ProductClassification",
        "parameters": {
          "classification_mode": "taxonomy",
          "hierarchy_storage_model": "materialized_path",
          "tag_policy": "locked",
          "max_tags": 8,
          "require_primary_category": true
        }
      },
      {
        "name": "behavioral/Searchable",
        "alias": null,
        "parameters": {
          "placeholder": "Search products...",
          "debounceMs": 300
        }
      },
      {
        "name": "behavioral/Filterable",
        "alias": null,
        "parameters": {
          "filterMode": "immediate",
          "showFilterCount": true
        }
      },
      {
        "name": "behavioral/Pageable",
        "alias": null,
        "parameters": {
          "defaultPageSize": 25,
          "pageSizeOptions": [
            10,
            25,
            50,
            100
          ]
        }
      }
    ],
    "schema": {
      "label": {
        "type": "string",
        "required": true,
        "description": "Human-readable display name rendered in primary surfaces.",
        "validation": {
          "minLength": 1,
          "maxLengthFromParameter": "maxLabelLength",
          "pattern": "^\\S.*\\S$|^\\S$"
        }
      },
      "description": {
        "type": "string",
        "required": false,
        "requiredFromParameter": "requireDescription",
        "description": "Supporting description used in detail and card contexts.",
        "validation": {
          "maxLengthFromParameter": "maxDescriptionLength"
        }
      },
      "placeholder": {
        "type": "string",
        "required": false,
        "description": "Hint copy surfaced in form fields when the label is empty.",
        "validation": {
          "maxLength": 80
        }
      },
      "status": {
        "type": "string",
        "required": true,
        "description": "Canonical lifecycle state derived from the states parameter. This is the single source\nof truth for the entity's current lifecycle position. Consumed by Colorized to resolve\nvisual tokens, and by view extensions to render StatusBadge and StatusTimeline.\n",
        "validation": {
          "enumFromParameter": "states"
        }
      },
      "state_history": {
        "type": "StateTransition[]",
        "required": false,
        "description": "Chronological log of state transitions. Each entry records the before/after states,\ntimestamp, and (when governance is enabled) the actor, reason, and transition metadata.\nRendered by StatusTimeline in the detail and timeline views.\n\nEntry structure:\n  - from: string (previous state)\n  - to: string (new state)\n  - timestamp: ISO 8601 datetime\n  - actor_id: string (user/system who triggered the transition, optional)\n  - reason: string (human-readable justification, required when requireTransitionReason is true)\n  - transition_metadata: Record<string, unknown> (arbitrary context, optional)\n\nEvery recorded change can name who acted, who it acted for and who approved it. All optional,\nfollowing Relationship's source_id/source_name pattern; only a *_name names a party, and an entry that names\nno one renders as it always has:\n  - actor_name: string (who acted, as shown: \"Billing Agent\")\n  - actor_kind: string (person, agent or system: the Actor trait's kinds)\n  - on_behalf_of_name / on_behalf_of_id: string (the person or organization it acted for)\n  - approved_by_name / approved_by_id: string (who approved the change, when someone did)\nStatusTimeline then reads \"Billing Agent for Tidewater Co-op · approved by Ruth Adeyemi\".\n\nA change someone approved can also say which approval it belongs to and what level of yes it was. Both\noptional; the id stays in the record's data, a pointer and not a link, and an entry without them renders as it\nalways has:\n  - approval_id: string (the Approval record the yes is kept in)\n  - approval_level: string (the level of yes, one of the levels the product declares: \"approval\")\nStatusTimeline then reads \"Billing Agent for Tidewater Co-op · approved by Ruth Adeyemi (level: Approval)\".\n\nA change made as part of a task can also say which task it was. Both optional; the id stays in the record's\ndata, a pointer and not a link, and an entry without them renders as it always has:\n  - task_id: string (the Task record the change was made under)\n  - task_name: string (the task, as shown: \"Get INV-2026-0155 paid\")\nStatusTimeline then reads \"… · approved by Ruth Adeyemi (level: Approval) · task: Get INV-2026-0155 paid\".\n\nA change made under a grant, the standing yes an actor acts under for a person or organization, can also say\nwhich grant it was. Both optional; the id stays in the record's data, a pointer and not a link, and an entry\nwithout them renders as it always has:\n  - grant_id: string (the Grant record the change was made under)\n  - grant_name: string (the grant, as shown: \"Resend returned transfers\")\nStatusTimeline names the grant after any approval and before the task: \"Billing Agent for Tidewater Co-op ·\ngrant: Resend returned transfers\".\n",
        "default": []
      },
      "allowed_transitions": {
        "type": "string[]",
        "required": false,
        "description": "Materialized list of the next states the product allows from the current status, written\nby the product from the transitionRules parameter. When transitionRules is null (open model),\nthis contains all states except the current one. The detail page's StatusTimeline lists it\nwhen the record holds it. A generated StatusSelector reads transitionRules instead: it offers the\ncurrent state and the moves the order allows (every state where no order is declared).\n",
        "default": []
      },
      "created_at": {
        "type": "datetime",
        "required": true,
        "description": "Timestamp recording when the entity was first created."
      },
      "updated_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the most recent modification, when available."
      },
      "last_event": {
        "type": "string",
        "required": true,
        "description": "Lifecycle event associated with the most recent timestamp mutation.",
        "validation": {
          "enumFromParameter": "recordedEvents"
        }
      },
      "last_event_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the lifecycle event captured in last_event."
      },
      "unit_amount_cents": {
        "type": "number",
        "required": true,
        "description": "Base unit price expressed in the smallest currency denomination.",
        "validation": {
          "minimum": 0
        }
      },
      "currency": {
        "type": "string",
        "required": true,
        "description": "ISO currency code for the unit amount.",
        "validation": {
          "enumFromParameter": "supportedCurrencies"
        }
      },
      "pricing_model": {
        "type": "string",
        "required": true,
        "description": "Monetization model applied to the entity.",
        "validation": {
          "enumFromParameter": "pricingModels"
        }
      },
      "billing_interval": {
        "type": "string",
        "required": false,
        "description": "Billing cadence when pricing_model indicates recurring revenue.",
        "validation": {
          "enumFromParameter": "billingIntervals"
        }
      },
      "tax_behavior": {
        "type": "string",
        "required": true,
        "description": "Defines whether taxes are included in the displayed price.",
        "validation": {
          "enum": [
            "exclusive",
            "inclusive"
          ]
        },
        "default": "exclusive"
      },
      "classification_metadata": {
        "type": "ClassificationMetadata",
        "required": true,
        "description": "Operational metadata describing mode, storage model, governance rules, and audit timestamps.\n"
      },
      "categories": {
        "type": "CategoryNode[]",
        "required": false,
        "default": [],
        "description": "Ordered taxonomy nodes scoped to the object."
      },
      "primary_category_id": {
        "type": "string",
        "required": false,
        "description": "Identifier of the canonical taxonomy node."
      },
      "primary_category_path": {
        "type": "string",
        "required": false,
        "description": "Human-readable breadcrumb path (Electronics > Mobile > Android)."
      },
      "tags": {
        "type": "Tag[]",
        "required": false,
        "default": [],
        "description": "Canonical tag collection after synonym collapse."
      },
      "tag_count": {
        "type": "number",
        "required": false,
        "default": 0,
        "description": "Number of canonical tags assigned to the object."
      },
      "tag_preview": {
        "type": "string",
        "required": false,
        "description": "Denormalized comma-delimited preview for list renders."
      },
      "searchQuery": {
        "type": "string",
        "required": false,
        "description": "The current search query string entered by the user.",
        "default": "",
        "validation": {
          "maxLength": 256
        }
      },
      "searchActive": {
        "type": "boolean",
        "required": false,
        "description": "Whether the search input is currently focused or has a non-empty query.",
        "default": false
      },
      "filters": {
        "type": "object[]",
        "required": false,
        "description": "Array of available filter descriptors. Each entry defines a filterable dimension:\n  - field: string (the schema field to filter on)\n  - label: string (display label)\n  - type: \"select\" | \"multi-select\" | \"range\" | \"boolean\" | \"date-range\"\n  - options: array of { value, label } for select/multi-select types\n",
        "default": []
      },
      "activeFilters": {
        "type": "object[]",
        "required": false,
        "description": "Array of currently applied filter values:\n  - field: string (matches a filter descriptor field)\n  - operator: \"eq\" | \"in\" | \"range\" | \"gt\" | \"lt\" | \"between\"\n  - value: unknown (the selected filter value or values)\n",
        "default": []
      },
      "filterCount": {
        "type": "number",
        "required": true,
        "description": "Computed count of currently active filters.",
        "default": 0,
        "validation": {
          "minimum": 0
        }
      },
      "page": {
        "type": "number",
        "required": true,
        "description": "Current page number (1-based).",
        "default": 1,
        "validation": {
          "minimum": 1
        }
      },
      "pageSize": {
        "type": "number",
        "required": true,
        "description": "Number of items displayed per page.",
        "default": 25,
        "validation": {
          "minimum": 1,
          "maximum": 500
        }
      },
      "totalItems": {
        "type": "number",
        "required": false,
        "description": "Total number of items across all pages. Used to compute total page count.",
        "default": 0,
        "validation": {
          "minimum": 0
        }
      },
      "totalPages": {
        "type": "number",
        "required": false,
        "description": "Computed total number of pages (ceil(totalItems / pageSize)).",
        "default": 0,
        "validation": {
          "minimum": 0
        }
      },
      "product_id": {
        "type": "uuid",
        "required": true,
        "description": "Primary identifier for the product listing."
      },
      "sku": {
        "type": "string",
        "required": true,
        "description": "Merchandising SKU exposed to commerce systems."
      },
      "inventory_status": {
        "type": "string",
        "required": true,
        "default": "in_stock",
        "description": "Availability state synchronized with inventory service.",
        "validation": {
          "enum": [
            "in_stock",
            "low_stock",
            "backorder",
            "discontinued"
          ]
        }
      },
      "release_channel": {
        "type": "string",
        "required": true,
        "default": "general_availability",
        "description": "Channel describing how the product is released to customers.",
        "validation": {
          "enum": [
            "alpha",
            "beta",
            "limited",
            "general_availability"
          ]
        }
      },
      "requires_subscription": {
        "type": "boolean",
        "required": true,
        "default": false,
        "description": "Indicates whether access to the product requires an active subscription."
      },
      "support_level": {
        "type": "string",
        "required": false,
        "description": "SLA tier associated with the product.",
        "validation": {
          "enum": [
            "standard",
            "premium",
            "enterprise"
          ]
        }
      },
      "summary_blurb": {
        "type": "string",
        "required": false,
        "description": "Short merchandising description surfaced in marketing contexts.",
        "validation": {
          "maxLength": 160
        }
      }
    },
    "semantics": {
      "label": {
        "semantic_type": "text.label",
        "token_mapping": "tokenMap(text.label.*)",
        "ui_hints": {
          "component": "TextHeading",
          "maxLengthParameter": "maxLabelLength",
          "headingLevel": 2
        }
      },
      "description": {
        "semantic_type": "text.summary",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "TextBody",
          "maxLengthParameter": "maxDescriptionLength"
        }
      },
      "placeholder": {
        "semantic_type": "text.placeholder",
        "token_mapping": "tokenMap(text.placeholder.*)",
        "ui_hints": {
          "component": "FormHint",
          "maxLength": 80
        }
      },
      "status": {
        "semantic_type": "status.state",
        "token_mapping": "tokenMap(status.state.*)",
        "ui_hints": {
          "component": "StatusBadge",
          "showIcon": true
        }
      },
      "state_history": {
        "semantic_type": "timeline.state_transition",
        "token_mapping": "tokenMap(timeline.status.*)",
        "ui_hints": {
          "component": "StatusTimeline",
          "collapseWhenEmpty": true
        }
      },
      "allowed_transitions": {
        "semantic_type": "status.navigation",
        "token_mapping": "computed",
        "ui_hints": {
          "component": "StatusSelector",
          "description": "The next states the product allows, as the product writes them; listed on the detail page, never used to disable an option."
        }
      },
      "created_at": {
        "semantic_type": "audit.created_at",
        "token_mapping": "tokenMap(audit.created)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "updated_at": {
        "semantic_type": "audit.updated_at",
        "token_mapping": "tokenMap(audit.updated)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone",
          "allowNullParameter": "allowNullUpdatedAt"
        }
      },
      "last_event": {
        "semantic_type": "audit.event.type",
        "token_mapping": "tokenMap(audit.event.*)",
        "ui_hints": {
          "component": "AuditBadge",
          "parameterSource": "recordedEvents"
        }
      },
      "last_event_at": {
        "semantic_type": "audit.event.timestamp",
        "token_mapping": "tokenMap(audit.event.timestamp)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "unit_amount_cents": {
        "semantic_type": "commerce.price.amount",
        "token_mapping": "tokenMap(commerce.price.primary)",
        "ui_hints": {
          "minorUnits": 100,
          "component": "CurrencyAmount",
          "currencyField": "currency"
        }
      },
      "currency": {
        "semantic_type": "commerce.price.currency",
        "token_mapping": "tokenMap(commerce.currency.primary)",
        "ui_hints": {
          "component": "CurrencyCode",
          "parameterSource": "supportedCurrencies"
        }
      },
      "pricing_model": {
        "semantic_type": "commerce.price.model",
        "token_mapping": "tokenMap(commerce.pricing.model)",
        "ui_hints": {
          "component": "PricingModelBadge",
          "parameterSource": "pricingModels"
        }
      },
      "billing_interval": {
        "semantic_type": "commerce.price.interval",
        "token_mapping": "tokenMap(commerce.pricing.interval)",
        "ui_hints": {
          "component": "BillingIntervalBadge",
          "parameterSource": "billingIntervals"
        }
      },
      "tax_behavior": {
        "semantic_type": "commerce.price.tax_behavior",
        "token_mapping": "tokenMap(commerce.pricing.tax)",
        "ui_hints": {
          "component": "TaxBehaviorTag"
        }
      },
      "classification_metadata": {
        "semantic_type": "classification.metadata",
        "token_mapping": "tokenMap(classification.metadata)",
        "ui_hints": {
          "component": "ClassificationDiagnostics"
        }
      },
      "categories": {
        "semantic_type": "classification.categories",
        "token_mapping": "tokenMap(classification.categories.*)",
        "ui_hints": {
          "component": "CategoryTree"
        }
      },
      "tags": {
        "semantic_type": "classification.tags",
        "token_mapping": "tokenMap(classification.tags.*)",
        "ui_hints": {
          "component": "TagTokenCloud",
          "policyParameter": "tag_policy"
        }
      },
      "primary_category_id": {
        "semantic_type": "classification.primary",
        "token_mapping": "tokenMap(classification.primary)",
        "ui_hints": {
          "component": "CategoryBreadcrumb"
        }
      },
      "searchQuery": {
        "semantic_type": "input.search.query",
        "token_mapping": "tokenMap(search.input.*)",
        "ui_hints": {
          "component": "SearchInput",
          "placeholderParameter": "placeholder",
          "debounceParameter": "debounceMs"
        }
      },
      "searchActive": {
        "semantic_type": "state.search.active",
        "token_mapping": "computed",
        "ui_hints": {
          "component": "SearchInput",
          "description": "Drives visual active/inactive state of the search region."
        }
      },
      "filters": {
        "semantic_type": "input.filter.descriptors",
        "token_mapping": "tokenMap(filter.panel.*)",
        "ui_hints": {
          "component": "FilterPanel",
          "modeParameter": "filterMode"
        }
      },
      "activeFilters": {
        "semantic_type": "state.filter.active",
        "token_mapping": "computed",
        "ui_hints": {
          "component": "FilterPanel",
          "description": "Drives active filter chip display and clear actions."
        }
      },
      "filterCount": {
        "semantic_type": "metric.filter.count",
        "token_mapping": "tokenMap(filter.badge.*)",
        "ui_hints": {
          "component": "MetricBadge",
          "format": "integer"
        }
      },
      "page": {
        "semantic_type": "state.pagination.page",
        "token_mapping": "computed",
        "ui_hints": {
          "component": "PaginationBar",
          "description": "Current active page, drives page button highlight state."
        }
      },
      "pageSize": {
        "semantic_type": "state.pagination.pageSize",
        "token_mapping": "computed",
        "ui_hints": {
          "component": "PaginationBar",
          "defaultParameter": "defaultPageSize"
        }
      },
      "totalItems": {
        "semantic_type": "metric.pagination.totalItems",
        "token_mapping": "tokenMap(pagination.info.*)",
        "ui_hints": {
          "component": "PaginationBar",
          "format": "integer"
        }
      },
      "totalPages": {
        "semantic_type": "metric.pagination.totalPages",
        "token_mapping": "computed",
        "ui_hints": {
          "component": "PaginationBar",
          "description": "Computed from totalItems and pageSize."
        }
      },
      "product_id": {
        "semantic_type": "product.id",
        "token_mapping": "tokenMap(product.id.primary)"
      },
      "sku": {
        "semantic_type": "product.sku",
        "token_mapping": "tokenMap(product.sku.primary)"
      },
      "inventory_status": {
        "semantic_type": "product.inventory.status",
        "token_mapping": "tokenMap(inventory.status.*)"
      },
      "release_channel": {
        "semantic_type": "product.release.channel",
        "token_mapping": "tokenMap(product.release.channel)"
      },
      "requires_subscription": {
        "semantic_type": "product.access.requires_subscription",
        "token_mapping": "tokenMap(product.access.subscription)"
      }
    },
    "viewExtensions": {
      "list": [
        {
          "component": "LabelCell",
          "priority": 100,
          "props": {
            "field": "label",
            "descriptionField": "description",
            "truncate": true,
            "maxLengthParameter": "maxLabelLength"
          }
        },
        {
          "component": "SearchInput",
          "position": "header",
          "priority": 10,
          "props": {
            "field": "searchQuery",
            "placeholderParameter": "placeholder",
            "debounceParameter": "debounceMs",
            "minQueryLengthParameter": "minQueryLength",
            "clearableParameter": "clearable"
          }
        },
        {
          "component": "PaginationBar",
          "position": "footer",
          "priority": 10,
          "props": {
            "pageField": "page",
            "pageSizeField": "pageSize",
            "totalItemsField": "totalItems",
            "totalPagesField": "totalPages",
            "pageSizeOptionsParameter": "pageSizeOptions",
            "showPageSizeSelectorParameter": "showPageSizeSelector",
            "showGotoPageParameter": "showGotoPage",
            "showItemRangeParameter": "showItemRange"
          }
        },
        {
          "component": "FilterPanel",
          "position": "sidebar",
          "priority": 8,
          "props": {
            "field": "filters",
            "activeField": "activeFilters",
            "modeParameter": "filterMode",
            "maxActiveParameter": "maxActiveFilters",
            "collapsibleParameter": "collapsible"
          }
        },
        {
          "component": "StatusBadge",
          "props": {
            "field": "status",
            "tone": "lifecycle"
          }
        },
        {
          "component": "RelativeTimestamp",
          "props": {
            "field": "updated_at",
            "fallbackField": "created_at",
            "timezoneParameter": "timezone"
          }
        },
        {
          "component": "PriceBadge",
          "props": {
            "amountField": "unit_amount_cents",
            "currencyField": "currency"
          }
        },
        {
          "component": "ClassificationBadge",
          "position": "after",
          "props": {
            "mode": "{classification_mode}",
            "primaryCategoryField": "primary_category_id",
            "tagPreviewField": "tag_preview"
          }
        }
      ],
      "detail": [
        {
          "component": "DetailHeader",
          "position": "top",
          "priority": 100,
          "props": {
            "titleField": "label",
            "subtitleField": "description",
            "headingLevel": 1
          }
        },
        {
          "component": "StatusTimeline",
          "position": "top",
          "priority": 40,
          "props": {
            "field": "status",
            "historyField": "state_history",
            "statesParameter": "states",
            "showActorId": true,
            "showReason": true
          }
        },
        {
          "component": "ClassificationPanel",
          "position": "sidebar",
          "priority": 40,
          "props": {
            "categoriesField": "categories",
            "tagsField": "tags",
            "metadataField": "classification_metadata",
            "modeParameter": "classification_mode"
          }
        },
        {
          "component": "SearchInput",
          "position": "header",
          "priority": 10,
          "props": {
            "field": "searchQuery",
            "placeholderParameter": "placeholder",
            "clearableParameter": "clearable"
          }
        },
        {
          "component": "FilterPanel",
          "position": "sidebar",
          "priority": 8,
          "props": {
            "field": "filters",
            "activeField": "activeFilters",
            "modeParameter": "filterMode",
            "collapsibleParameter": "collapsible"
          }
        },
        {
          "component": "AuditTimeline",
          "position": "bottom",
          "props": {
            "createdField": "created_at",
            "updatedField": "updated_at",
            "eventField": "last_event",
            "eventTimestampField": "last_event_at",
            "eventOptionsParameter": "recordedEvents"
          }
        },
        {
          "component": "PriceSummary",
          "position": "top",
          "props": {
            "amountField": "unit_amount_cents",
            "currencyField": "currency",
            "modelField": "pricing_model",
            "intervalField": "billing_interval",
            "taxBehaviorField": "tax_behavior"
          }
        }
      ],
      "form": [
        {
          "component": "FormLabelGroup",
          "position": "before",
          "priority": 100,
          "props": {
            "labelField": "label",
            "descriptionField": "description",
            "placeholderField": "placeholder",
            "maxLabelLengthParameter": "maxLabelLength",
            "maxDescriptionLengthParameter": "maxDescriptionLength",
            "requireDescriptionParameter": "requireDescription"
          }
        },
        {
          "component": "StatusSelector",
          "position": "top",
          "props": {
            "field": "status",
            "optionsParameter": "states",
            "initialParameter": "initialState",
            "allowedTransitionsField": "allowed_transitions",
            "requireReasonParameter": "requireTransitionReason"
          }
        },
        {
          "component": "ClassificationEditor",
          "position": "main",
          "props": {
            "modeParameter": "classification_mode",
            "tagPolicyParameter": "tag_policy",
            "maxTagsParameter": "max_tags"
          }
        }
      ],
      "card": [
        {
          "component": "CardHeader",
          "position": "top",
          "priority": 100,
          "props": {
            "titleField": "label",
            "supportingField": "description"
          }
        },
        {
          "component": "StatusBadge",
          "position": "before",
          "props": {
            "field": "status",
            "variant": "subtle"
          }
        },
        {
          "component": "PriceBadge",
          "position": "after",
          "props": {
            "amountField": "unit_amount_cents",
            "currencyField": "currency"
          }
        }
      ],
      "timeline": [
        {
          "component": "TimelineEntryLabel",
          "props": {
            "field": "label",
            "compact": true
          }
        }
      ],
      "inline": [
        {
          "component": "InlineLabel",
          "props": {
            "field": "label",
            "maxLength": 40
          }
        }
      ]
    },
    "tokens": {
      "text.label.color": "var(--sys-text-strong)",
      "text.label.font-weight": "var(--sys-font-weight-semibold)",
      "text.label.font-size": "var(--sys-font-size-lg)",
      "text.label.line-height": "var(--sys-line-height-tight)",
      "text.body.color": "var(--sys-text-subtle)",
      "text.body.font-weight": "var(--sys-font-weight-regular)",
      "text.body.font-size": "var(--sys-font-size-sm)",
      "text.body.line-height": "var(--sys-line-height-relaxed)",
      "text.placeholder.color": "var(--sys-text-muted)",
      "text.placeholder.font-weight": "var(--sys-font-weight-regular)",
      "text.placeholder.font-size": "var(--sys-font-size-sm)",
      "text.placeholder.line-height": "var(--sys-line-height-normal)",
      "status.state.default.bg": "var(--status-neutral-bg)",
      "status.state.default.text": "var(--status-neutral-text)",
      "status.timeline.connector": "var(--border-subtle)",
      "status.timeline.node.bg": "var(--sys-surface-raised)",
      "status.timeline.node.border": "var(--sys-border-default)",
      "status.timeline.actor.text": "var(--sys-text-secondary)",
      "status.timeline.reason.text": "var(--sys-text-tertiary)",
      "status.timeline.reason.bg": "var(--sys-surface-neutral)",
      "audit.created.badge.text": "var(--text-subtle)",
      "audit.updated.badge.text": "var(--text-subtle)",
      "audit.event.badge.bg": "var(--surface-muted)",
      "commerce.price.text": "var(--text-strong)",
      "commerce.price.badge.bg": "var(--surface-accent)",
      "commerce.pricing.model.text": "var(--text-default)",
      "classification": {
        "category": {
          "badge": {
            "bg": "var(--sys-surface-raised)",
            "border": "var(--sys-border-strong)"
          }
        },
        "tag": {
          "chip": {
            "bg": "var(--sys-surface-muted)",
            "text": "var(--sys-text-strong)"
          }
        }
      },
      "search.input.bg": "var(--sys-surface-default)",
      "search.input.text": "var(--sys-text-primary)",
      "search.input.placeholder": "var(--sys-text-subtle)",
      "search.input.border": "var(--sys-border-default)",
      "search.input.focus.border": "var(--sys-border-focus)",
      "search.input.focus.ring": "var(--sys-focus-ring)",
      "search.input.icon": "var(--sys-icon-subtle)",
      "search.input.clear.hover": "var(--sys-surface-hover)",
      "filter.panel.bg": "var(--sys-surface-secondary)",
      "filter.panel.border": "var(--sys-border-default)",
      "filter.panel.header.text": "var(--sys-text-primary)",
      "filter.panel.section.divider": "var(--sys-border-subtle)",
      "filter.chip.bg": "var(--sys-surface-accent)",
      "filter.chip.text": "var(--sys-text-on-accent)",
      "filter.chip.remove.hover": "var(--sys-surface-hover)",
      "filter.badge.bg": "var(--sys-surface-accent)",
      "filter.badge.text": "var(--sys-text-on-accent)",
      "filter.apply.bg": "var(--sys-action-primary)",
      "filter.apply.text": "var(--sys-text-on-action)",
      "filter.clear.text": "var(--sys-text-subtle)",
      "pagination.bar.bg": "var(--sys-surface-secondary)",
      "pagination.bar.border": "var(--sys-border-default)",
      "pagination.button.bg": "var(--sys-surface-default)",
      "pagination.button.text": "var(--sys-text-primary)",
      "pagination.button.hover.bg": "var(--sys-surface-hover)",
      "pagination.button.active.bg": "var(--sys-surface-accent)",
      "pagination.button.active.text": "var(--sys-text-on-accent)",
      "pagination.button.disabled.text": "var(--sys-text-disabled)",
      "pagination.info.text": "var(--sys-text-subtle)",
      "pagination.selector.border": "var(--sys-border-default)",
      "product.sku.primary": "var(--text-strong)",
      "inventory.status.low_stock": "var(--status-warning)",
      "inventory.status.discontinued": "var(--status-danger)"
    },
    "warnings": [],
    "filePath": "~/.oods-foundry/runtime/0.18.0-2b9c3aa471be/objects/core/Product.object.yaml",
    "source": "shipped"
  },
  {
    "name": "Relationship",
    "version": "1.3.0",
    "domain": "core.graph",
    "description": "Canonical graph edge linking two entities with lifecycle, ownership, and tagging semantics.",
    "tags": [
      "universal",
      "relationship",
      "graph"
    ],
    "maturity": null,
    "traits": [
      {
        "name": "content/Labelled",
        "alias": "RelationshipLabel",
        "parameters": null
      },
      {
        "name": "lifecycle/Stateful",
        "alias": null,
        "parameters": {
          "states": [
            "proposed",
            "active",
            "paused",
            "completed",
            "terminated"
          ],
          "initialState": "proposed"
        }
      },
      {
        "name": "lifecycle/Timestampable",
        "alias": null,
        "parameters": {
          "recordedEvents": [
            "created",
            "activated",
            "paused",
            "terminated",
            "reactivated"
          ],
          "timezone": "UTC"
        }
      },
      {
        "name": "structural/Ownerable",
        "alias": null,
        "parameters": {
          "ownerTypes": [
            "organization",
            "team",
            "platform"
          ],
          "primaryOwnerType": "organization",
          "allowTransfer": true
        }
      },
      {
        "name": "behavioral/Taggable",
        "alias": null,
        "parameters": {
          "maxTags": 10,
          "allowCustomTags": true,
          "allowedTags": [
            "primary",
            "secondary",
            "inferred",
            "manual",
            "pending_review"
          ],
          "caseSensitive": false
        }
      },
      {
        "name": "viz/MarkGraph",
        "alias": null,
        "parameters": {
          "title": "Connected relationships",
          "description": "This relationship and the others that share one of its endpoints.",
          "chart": {
            "chartType": "force_graph",
            "source": "edge-array",
            "dataField": "neighborhood",
            "edges": {
              "source": "source_id",
              "target": "target_id",
              "bidirectionalField": "is_bidirectional"
            },
            "sampleRows": [
              {
                "source_id": "example-team",
                "target_id": "example-project",
                "is_bidirectional": false
              },
              {
                "source_id": "example-project",
                "target_id": "example-document",
                "is_bidirectional": true
              }
            ]
          }
        }
      }
    ],
    "schema": {
      "label": {
        "type": "string",
        "required": true,
        "description": "Human-readable display name rendered in primary surfaces.",
        "validation": {
          "minLength": 1,
          "maxLengthFromParameter": "maxLabelLength",
          "pattern": "^\\S.*\\S$|^\\S$"
        }
      },
      "description": {
        "type": "string",
        "required": false,
        "requiredFromParameter": "requireDescription",
        "description": "Supporting description used in detail and card contexts.",
        "validation": {
          "maxLengthFromParameter": "maxDescriptionLength"
        }
      },
      "placeholder": {
        "type": "string",
        "required": false,
        "description": "Hint copy surfaced in form fields when the label is empty.",
        "validation": {
          "maxLength": 80
        }
      },
      "status": {
        "type": "string",
        "required": true,
        "description": "Canonical lifecycle state derived from the states parameter. This is the single source\nof truth for the entity's current lifecycle position. Consumed by Colorized to resolve\nvisual tokens, and by view extensions to render StatusBadge and StatusTimeline.\n",
        "validation": {
          "enumFromParameter": "states"
        }
      },
      "state_history": {
        "type": "StateTransition[]",
        "required": false,
        "description": "Chronological log of state transitions. Each entry records the before/after states,\ntimestamp, and (when governance is enabled) the actor, reason, and transition metadata.\nRendered by StatusTimeline in the detail and timeline views.\n\nEntry structure:\n  - from: string (previous state)\n  - to: string (new state)\n  - timestamp: ISO 8601 datetime\n  - actor_id: string (user/system who triggered the transition, optional)\n  - reason: string (human-readable justification, required when requireTransitionReason is true)\n  - transition_metadata: Record<string, unknown> (arbitrary context, optional)\n\nEvery recorded change can name who acted, who it acted for and who approved it. All optional,\nfollowing Relationship's source_id/source_name pattern; only a *_name names a party, and an entry that names\nno one renders as it always has:\n  - actor_name: string (who acted, as shown: \"Billing Agent\")\n  - actor_kind: string (person, agent or system: the Actor trait's kinds)\n  - on_behalf_of_name / on_behalf_of_id: string (the person or organization it acted for)\n  - approved_by_name / approved_by_id: string (who approved the change, when someone did)\nStatusTimeline then reads \"Billing Agent for Tidewater Co-op · approved by Ruth Adeyemi\".\n\nA change someone approved can also say which approval it belongs to and what level of yes it was. Both\noptional; the id stays in the record's data, a pointer and not a link, and an entry without them renders as it\nalways has:\n  - approval_id: string (the Approval record the yes is kept in)\n  - approval_level: string (the level of yes, one of the levels the product declares: \"approval\")\nStatusTimeline then reads \"Billing Agent for Tidewater Co-op · approved by Ruth Adeyemi (level: Approval)\".\n\nA change made as part of a task can also say which task it was. Both optional; the id stays in the record's\ndata, a pointer and not a link, and an entry without them renders as it always has:\n  - task_id: string (the Task record the change was made under)\n  - task_name: string (the task, as shown: \"Get INV-2026-0155 paid\")\nStatusTimeline then reads \"… · approved by Ruth Adeyemi (level: Approval) · task: Get INV-2026-0155 paid\".\n\nA change made under a grant, the standing yes an actor acts under for a person or organization, can also say\nwhich grant it was. Both optional; the id stays in the record's data, a pointer and not a link, and an entry\nwithout them renders as it always has:\n  - grant_id: string (the Grant record the change was made under)\n  - grant_name: string (the grant, as shown: \"Resend returned transfers\")\nStatusTimeline names the grant after any approval and before the task: \"Billing Agent for Tidewater Co-op ·\ngrant: Resend returned transfers\".\n",
        "default": []
      },
      "allowed_transitions": {
        "type": "string[]",
        "required": false,
        "description": "Materialized list of the next states the product allows from the current status, written\nby the product from the transitionRules parameter. When transitionRules is null (open model),\nthis contains all states except the current one. The detail page's StatusTimeline lists it\nwhen the record holds it. A generated StatusSelector reads transitionRules instead: it offers the\ncurrent state and the moves the order allows (every state where no order is declared).\n",
        "default": []
      },
      "created_at": {
        "type": "datetime",
        "required": true,
        "description": "Timestamp recording when the entity was first created."
      },
      "updated_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the most recent modification, when available."
      },
      "last_event": {
        "type": "string",
        "required": true,
        "description": "Lifecycle event associated with the most recent timestamp mutation.",
        "validation": {
          "enumFromParameter": "recordedEvents"
        }
      },
      "last_event_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the lifecycle event captured in last_event."
      },
      "owner_id": {
        "type": "string",
        "required": true,
        "description": "Identifier of the owning principal scoped by owner_type."
      },
      "owner_type": {
        "type": "string",
        "required": true,
        "description": "Categorical owner type sourced from the ownerTypes parameter.",
        "validation": {
          "enumFromParameter": "ownerTypes"
        }
      },
      "ownership_role": {
        "type": "string",
        "required": false,
        "description": "Optional role name describing how the owner governs the entity.",
        "validation": {
          "maxLength": 80
        }
      },
      "ownership_transferred_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp recording when ownership was last transferred."
      },
      "tags": {
        "type": "string[]",
        "required": false,
        "description": "Ordered list of tags assigned to the entity.",
        "default": [],
        "validation": {
          "maxItems": 64
        }
      },
      "tag_count": {
        "type": "number",
        "required": true,
        "description": "Computed number of tags assigned to the entity.",
        "default": 0,
        "validation": {
          "minimum": 0
        }
      },
      "tag_metadata": {
        "type": "object[]",
        "required": false,
        "description": "Per-tag governance metadata. Each entry corresponds to a tag in the tags array and\ntracks provenance and usage for taxonomy health monitoring.\n\nEntry structure:\n  - tag: string (the tag value, matches entry in tags array)\n  - created_at: ISO 8601 datetime\n  - created_by: string (user ID or \"system\" for allow-list tags)\n  - usage_count: number (how many entities use this tag, computed)\n  - moderation_status: \"approved\" | \"pending\" | \"rejected\" (when allowTagModeration is true)\n  - canonical_form: string (resolved synonym target, when synonymResolution is enabled)\n",
        "default": []
      },
      "neighborhood": {
        "type": "array",
        "required": false,
        "description": "This relationship's edge and the edges that share one of its endpoints, each containing source_id and target_id strings and an is_bidirectional boolean."
      },
      "relationship_id": {
        "type": "uuid",
        "required": true,
        "description": "Primary identifier for the relationship edge."
      },
      "source_id": {
        "type": "uuid",
        "required": true,
        "description": "Identifier of the source node in the relationship."
      },
      "source_name": {
        "type": "string",
        "required": false,
        "description": "Display name of the source node."
      },
      "target_id": {
        "type": "uuid",
        "required": true,
        "description": "Identifier of the target node in the relationship."
      },
      "target_name": {
        "type": "string",
        "required": false,
        "description": "Display name of the target node."
      },
      "relationship_type": {
        "type": "string",
        "required": true,
        "description": "Semantic type describing the edge between the source and target; a delegation is the link alone, from the person or organization acted for (the source) to the actor acting for them (the target), and a grant with its terms is a Grant record.",
        "validation": {
          "enum": [
            "membership",
            "ownership",
            "follows",
            "depends_on",
            "references",
            "delegation"
          ]
        }
      },
      "direction": {
        "type": "string",
        "required": true,
        "default": "bidirectional",
        "description": "Directionality applied when traversing the relationship.",
        "validation": {
          "enum": [
            "unidirectional",
            "bidirectional"
          ]
        }
      },
      "strength": {
        "type": "string",
        "required": false,
        "description": "Signal representing how strongly the entities are connected.",
        "validation": {
          "enum": [
            "low",
            "medium",
            "high"
          ]
        }
      },
      "origin_source": {
        "type": "string",
        "required": false,
        "description": "System that originated or inferred the relationship.",
        "validation": {
          "enum": [
            "manual",
            "ingestion",
            "analytics",
            "integration"
          ]
        }
      },
      "is_bidirectional": {
        "type": "boolean",
        "required": true,
        "default": true,
        "description": "Flag indicating whether the relationship is symmetric."
      },
      "owner_name": {
        "type": "string",
        "required": false,
        "description": "Display name of the organization, team or platform that owns the relationship."
      }
    },
    "semantics": {
      "label": {
        "semantic_type": "text.label",
        "token_mapping": "tokenMap(text.label.*)",
        "ui_hints": {
          "component": "TextHeading",
          "maxLengthParameter": "maxLabelLength",
          "headingLevel": 2
        }
      },
      "description": {
        "semantic_type": "text.summary",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "TextBody",
          "maxLengthParameter": "maxDescriptionLength"
        }
      },
      "placeholder": {
        "semantic_type": "text.placeholder",
        "token_mapping": "tokenMap(text.placeholder.*)",
        "ui_hints": {
          "component": "FormHint",
          "maxLength": 80
        }
      },
      "status": {
        "semantic_type": "status.state",
        "token_mapping": "tokenMap(status.state.*)",
        "ui_hints": {
          "component": "StatusBadge",
          "showIcon": true
        }
      },
      "state_history": {
        "semantic_type": "timeline.state_transition",
        "token_mapping": "tokenMap(timeline.status.*)",
        "ui_hints": {
          "component": "StatusTimeline",
          "collapseWhenEmpty": true
        }
      },
      "allowed_transitions": {
        "semantic_type": "status.navigation",
        "token_mapping": "computed",
        "ui_hints": {
          "component": "StatusSelector",
          "description": "The next states the product allows, as the product writes them; listed on the detail page, never used to disable an option."
        }
      },
      "created_at": {
        "semantic_type": "audit.created_at",
        "token_mapping": "tokenMap(audit.created)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "updated_at": {
        "semantic_type": "audit.updated_at",
        "token_mapping": "tokenMap(audit.updated)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone",
          "allowNullParameter": "allowNullUpdatedAt"
        }
      },
      "last_event": {
        "semantic_type": "audit.event.type",
        "token_mapping": "tokenMap(audit.event.*)",
        "ui_hints": {
          "component": "AuditBadge",
          "parameterSource": "recordedEvents"
        }
      },
      "last_event_at": {
        "semantic_type": "audit.event.timestamp",
        "token_mapping": "tokenMap(audit.event.timestamp)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "owner_id": {
        "semantic_type": "ownership.owner.id",
        "token_mapping": "tokenMap(ownership.owner.id)",
        "ui_hints": {
          "component": "OwnerReference",
          "ownerTypeField": "owner_type",
          "displayLabelField": "owner_name"
        }
      },
      "owner_type": {
        "semantic_type": "ownership.owner.type",
        "token_mapping": "tokenMap(ownership.owner.type)",
        "ui_hints": {
          "component": "OwnerTypeBadge",
          "parameterSource": "ownerTypes"
        }
      },
      "ownership_role": {
        "semantic_type": "ownership.owner.role",
        "token_mapping": "tokenMap(ownership.owner.role)",
        "ui_hints": {
          "component": "OwnerRolePill"
        }
      },
      "ownership_transferred_at": {
        "semantic_type": "ownership.owner.transferred_at",
        "token_mapping": "tokenMap(ownership.owner.timestamp)",
        "ui_hints": {
          "component": "TimelineTimestamp"
        }
      },
      "tags": {
        "semantic_type": "taxonomy.tag.collection",
        "token_mapping": "tokenMap(taxonomy.tag.*)",
        "ui_hints": {
          "component": "TagCollection",
          "allowCreateParameter": "allowCustomTags",
          "allowListParameter": "allowedTags",
          "caseSensitiveParameter": "caseSensitive"
        }
      },
      "tag_count": {
        "semantic_type": "metric.collection.count",
        "token_mapping": "tokenMap(taxonomy.tag.count)",
        "ui_hints": {
          "component": "MetricBadge",
          "format": "integer"
        }
      },
      "tag_metadata": {
        "semantic_type": "taxonomy.tag.governance",
        "token_mapping": "computed",
        "ui_hints": {
          "component": "TagGovernancePanel",
          "description": "Admin panel for reviewing tag health, moderation queue, and synonym resolution."
        }
      },
      "relationship_id": {
        "semantic_type": "graph.relationship.id",
        "token_mapping": "tokenMap(graph.relationship.id)"
      },
      "source_id": {
        "semantic_type": "graph.relationship.source_id",
        "token_mapping": "tokenMap(graph.relationship.id)",
        "ui_hints": {
          "displayLabelField": "source_name"
        }
      },
      "target_id": {
        "semantic_type": "graph.relationship.target_id",
        "token_mapping": "tokenMap(graph.relationship.id)",
        "ui_hints": {
          "displayLabelField": "target_name"
        }
      },
      "relationship_type": {
        "semantic_type": "graph.relationship.type",
        "token_mapping": "tokenMap(graph.relationship.type)"
      },
      "direction": {
        "semantic_type": "graph.relationship.direction",
        "token_mapping": "tokenMap(graph.relationship.direction)"
      },
      "strength": {
        "semantic_type": "graph.relationship.strength",
        "token_mapping": "tokenMap(graph.relationship.strength)"
      },
      "origin_source": {
        "semantic_type": "graph.relationship.origin",
        "token_mapping": "tokenMap(graph.relationship.origin)"
      }
    },
    "viewExtensions": {
      "list": [
        {
          "component": "LabelCell",
          "priority": 100,
          "props": {
            "field": "label",
            "descriptionField": "description",
            "truncate": true,
            "maxLengthParameter": "maxLabelLength"
          }
        },
        {
          "component": "StatusBadge",
          "props": {
            "field": "status",
            "tone": "lifecycle"
          }
        },
        {
          "component": "RelativeTimestamp",
          "props": {
            "field": "updated_at",
            "fallbackField": "created_at",
            "timezoneParameter": "timezone"
          }
        },
        {
          "component": "OwnerBadge",
          "props": {
            "ownerIdField": "owner_id",
            "ownerTypeField": "owner_type"
          }
        },
        {
          "component": "TagPills",
          "props": {
            "field": "tags",
            "maxVisible": 3,
            "overflowLabel": "+{{ tag_count }}"
          }
        }
      ],
      "detail": [
        {
          "component": "DetailHeader",
          "position": "top",
          "priority": 100,
          "props": {
            "titleField": "label",
            "subtitleField": "description",
            "headingLevel": 1
          }
        },
        {
          "component": "VizGraphPreview",
          "position": "top",
          "priority": 55,
          "props": {
            "chart": {
              "chartType": "force_graph",
              "source": "edge-array",
              "dataField": "neighborhood",
              "edges": {
                "source": "source_id",
                "target": "target_id",
                "bidirectionalField": "is_bidirectional"
              },
              "sampleRows": [
                {
                  "source_id": "example-team",
                  "target_id": "example-project",
                  "is_bidirectional": false
                },
                {
                  "source_id": "example-project",
                  "target_id": "example-document",
                  "is_bidirectional": true
                }
              ]
            },
            "title": "Connected relationships",
            "description": "This relationship and the others that share one of its endpoints."
          }
        },
        {
          "component": "StatusTimeline",
          "position": "top",
          "priority": 40,
          "props": {
            "field": "status",
            "historyField": "state_history",
            "statesParameter": "states",
            "showActorId": true,
            "showReason": true
          }
        },
        {
          "component": "AuditTimeline",
          "position": "bottom",
          "props": {
            "createdField": "created_at",
            "updatedField": "updated_at",
            "eventField": "last_event",
            "eventTimestampField": "last_event_at",
            "eventOptionsParameter": "recordedEvents"
          }
        },
        {
          "component": "OwnershipSummary",
          "position": "top",
          "props": {
            "ownerIdField": "owner_id",
            "ownerTypeField": "owner_type",
            "roleField": "ownership_role",
            "transferredAtField": "ownership_transferred_at",
            "allowTransferParameter": "allowTransfer"
          }
        },
        {
          "component": "TagSummary",
          "position": "top",
          "props": {
            "field": "tags",
            "countField": "tag_count"
          }
        }
      ],
      "form": [
        {
          "component": "FormLabelGroup",
          "position": "before",
          "priority": 100,
          "props": {
            "labelField": "label",
            "descriptionField": "description",
            "placeholderField": "placeholder",
            "maxLabelLengthParameter": "maxLabelLength",
            "maxDescriptionLengthParameter": "maxDescriptionLength",
            "requireDescriptionParameter": "requireDescription"
          }
        },
        {
          "component": "StatusSelector",
          "position": "top",
          "props": {
            "field": "status",
            "optionsParameter": "states",
            "initialParameter": "initialState",
            "allowedTransitionsField": "allowed_transitions",
            "requireReasonParameter": "requireTransitionReason"
          }
        },
        {
          "component": "TagInput",
          "position": "top",
          "props": {
            "field": "tags",
            "maxTagsParameter": "maxTags",
            "allowCustomParameter": "allowCustomTags",
            "allowListParameter": "allowedTags",
            "minLengthParameter": "tagMinLength",
            "maxLengthParameter": "tagMaxLength",
            "synonymParameter": "synonymResolution"
          }
        }
      ],
      "card": [
        {
          "component": "CardHeader",
          "position": "top",
          "priority": 100,
          "props": {
            "titleField": "label",
            "supportingField": "description"
          }
        },
        {
          "component": "StatusBadge",
          "position": "before",
          "props": {
            "field": "status",
            "variant": "subtle"
          }
        },
        {
          "component": "OwnershipMeta",
          "position": "after",
          "props": {
            "ownerIdField": "owner_id",
            "ownerTypeField": "owner_type",
            "roleField": "ownership_role"
          }
        },
        {
          "component": "TagPills",
          "position": "after",
          "props": {
            "field": "tags",
            "maxVisible": 3,
            "overflowLabel": "+{{ tag_count }}"
          }
        }
      ],
      "timeline": [
        {
          "component": "TimelineEntryLabel",
          "props": {
            "field": "label",
            "compact": true
          }
        }
      ],
      "inline": [
        {
          "component": "InlineLabel",
          "props": {
            "field": "label",
            "maxLength": 40
          }
        }
      ]
    },
    "tokens": {
      "text.label.color": "var(--sys-text-strong)",
      "text.label.font-weight": "var(--sys-font-weight-semibold)",
      "text.label.font-size": "var(--sys-font-size-lg)",
      "text.label.line-height": "var(--sys-line-height-tight)",
      "text.body.color": "var(--sys-text-subtle)",
      "text.body.font-weight": "var(--sys-font-weight-regular)",
      "text.body.font-size": "var(--sys-font-size-sm)",
      "text.body.line-height": "var(--sys-line-height-relaxed)",
      "text.placeholder.color": "var(--sys-text-muted)",
      "text.placeholder.font-weight": "var(--sys-font-weight-regular)",
      "text.placeholder.font-size": "var(--sys-font-size-sm)",
      "text.placeholder.line-height": "var(--sys-line-height-normal)",
      "status.state.default.bg": "var(--status-neutral-bg)",
      "status.state.default.text": "var(--status-neutral-text)",
      "status.timeline.connector": "var(--border-subtle)",
      "status.timeline.node.bg": "var(--sys-surface-raised)",
      "status.timeline.node.border": "var(--sys-border-default)",
      "status.timeline.actor.text": "var(--sys-text-secondary)",
      "status.timeline.reason.text": "var(--sys-text-tertiary)",
      "status.timeline.reason.bg": "var(--sys-surface-neutral)",
      "audit.created.badge.text": "var(--text-subtle)",
      "audit.updated.badge.text": "var(--text-subtle)",
      "audit.event.badge.bg": "var(--surface-muted)",
      "ownership.owner.badge.bg": "var(--surface-subtle)",
      "ownership.owner.badge.text": "var(--text-default)",
      "ownership.owner.role.text": "var(--text-muted)",
      "taxonomy.tag.chip.bg": "var(--surface-tag-bg)",
      "taxonomy.tag.chip.text": "var(--surface-tag-text)",
      "taxonomy.tag.chip.border": "var(--sys-border-default)",
      "taxonomy.tag.chip.hover.bg": "var(--sys-surface-hover)",
      "taxonomy.tag.chip.pending.bg": "var(--sys-status-warning-surface)",
      "taxonomy.tag.chip.pending.text": "var(--sys-status-warning-text)",
      "taxonomy.tag.summary.count": "var(--text-subtle)",
      "taxonomy.tag.input.border": "var(--sys-border-default)",
      "taxonomy.tag.input.focus.border": "var(--sys-border-focus)",
      "graph.relationship.type": "var(--graph-relationship-type)",
      "graph.relationship.direction": "var(--text-default)",
      "graph.relationship.strength.high": "var(--status-success)"
    },
    "warnings": [],
    "filePath": "~/.oods-foundry/runtime/0.18.0-2b9c3aa471be/objects/core/Relationship.object.yaml",
    "source": "shipped"
  },
  {
    "name": "Subscription",
    "version": "2.0.0",
    "domain": "core.billing",
    "description": "Canonical subscription record composing lifecycle, billing, and cancellation semantics.",
    "tags": [
      "billing",
      "lifecycle",
      "monetization"
    ],
    "maturity": "beta",
    "traits": [
      {
        "name": "lifecycle/Stateful",
        "alias": "SubscriptionLifecycle",
        "parameters": {
          "states": [
            "future",
            "trialing",
            "active",
            "paused",
            "pending_cancellation",
            "past_due",
            "unpaid",
            "terminated"
          ],
          "initialState": "future"
        }
      },
      {
        "name": "lifecycle/Cancellable",
        "alias": "SubscriptionCancellation",
        "parameters": {
          "allowCancellationAfterStart": true,
          "requireReason": false
        }
      },
      {
        "name": "lifecycle/Timestampable",
        "alias": "BillingCycleTimeline",
        "parameters": {
          "recordedEvents": [
            "billing_cycle_started",
            "billing_cycle_completed",
            "payment_received",
            "cancellation_requested"
          ],
          "timezone": "UTC"
        }
      },
      {
        "name": "financial/Billable",
        "alias": "SubscriptionBilling",
        "parameters": {
          "defaultCurrency": "usd",
          "billingIntervals": [
            "monthly",
            "yearly"
          ],
          "minorUnits": 100,
          "supportProration": true,
          "prorationBehavior": "always_invoice"
        }
      },
      {
        "name": "lifecycle/Archivable",
        "alias": "SubscriptionArchive",
        "parameters": {
          "gracePeriodDays": 30,
          "retainHistory": true,
          "restoreWindowDays": 30
        }
      },
      {
        "name": "viz/MarkBar",
        "alias": null,
        "parameters": {
          "title": "Payment amounts",
          "description": "Payments recorded for this subscription, in its currency.",
          "chart": {
            "chartType": "bar",
            "source": "payment-events",
            "dateFields": [
              "last_payment_at",
              "next_payment_due_at"
            ],
            "amountField": "amount",
            "minorUnits": 100,
            "currencyField": "currency"
          }
        }
      }
    ],
    "relationships": [
      {
        "target": "Plan",
        "via": "plan_code",
        "cardinality": "many-to-one",
        "label": "Plan code"
      }
    ],
    "schema": {
      "status": {
        "type": "string",
        "required": true,
        "description": "Current lifecycle status of the subscription.",
        "validation": {
          "enum": [
            "future",
            "trialing",
            "active",
            "paused",
            "pending_cancellation",
            "past_due",
            "unpaid",
            "terminated"
          ]
        }
      },
      "state_history": {
        "type": "StateTransition[]",
        "required": false,
        "description": "Chronological log of state transitions. Each entry records the before/after states,\ntimestamp, and (when governance is enabled) the actor, reason, and transition metadata.\nRendered by StatusTimeline in the detail and timeline views.\n\nEntry structure:\n  - from: string (previous state)\n  - to: string (new state)\n  - timestamp: ISO 8601 datetime\n  - actor_id: string (user/system who triggered the transition, optional)\n  - reason: string (human-readable justification, required when requireTransitionReason is true)\n  - transition_metadata: Record<string, unknown> (arbitrary context, optional)\n\nEvery recorded change can name who acted, who it acted for and who approved it. All optional,\nfollowing Relationship's source_id/source_name pattern; only a *_name names a party, and an entry that names\nno one renders as it always has:\n  - actor_name: string (who acted, as shown: \"Billing Agent\")\n  - actor_kind: string (person, agent or system: the Actor trait's kinds)\n  - on_behalf_of_name / on_behalf_of_id: string (the person or organization it acted for)\n  - approved_by_name / approved_by_id: string (who approved the change, when someone did)\nStatusTimeline then reads \"Billing Agent for Tidewater Co-op · approved by Ruth Adeyemi\".\n\nA change someone approved can also say which approval it belongs to and what level of yes it was. Both\noptional; the id stays in the record's data, a pointer and not a link, and an entry without them renders as it\nalways has:\n  - approval_id: string (the Approval record the yes is kept in)\n  - approval_level: string (the level of yes, one of the levels the product declares: \"approval\")\nStatusTimeline then reads \"Billing Agent for Tidewater Co-op · approved by Ruth Adeyemi (level: Approval)\".\n\nA change made as part of a task can also say which task it was. Both optional; the id stays in the record's\ndata, a pointer and not a link, and an entry without them renders as it always has:\n  - task_id: string (the Task record the change was made under)\n  - task_name: string (the task, as shown: \"Get INV-2026-0155 paid\")\nStatusTimeline then reads \"… · approved by Ruth Adeyemi (level: Approval) · task: Get INV-2026-0155 paid\".\n\nA change made under a grant, the standing yes an actor acts under for a person or organization, can also say\nwhich grant it was. Both optional; the id stays in the record's data, a pointer and not a link, and an entry\nwithout them renders as it always has:\n  - grant_id: string (the Grant record the change was made under)\n  - grant_name: string (the grant, as shown: \"Resend returned transfers\")\nStatusTimeline names the grant after any approval and before the task: \"Billing Agent for Tidewater Co-op ·\ngrant: Resend returned transfers\".\n",
        "default": []
      },
      "allowed_transitions": {
        "type": "string[]",
        "required": false,
        "description": "Materialized list of the next states the product allows from the current status, written\nby the product from the transitionRules parameter. When transitionRules is null (open model),\nthis contains all states except the current one. The detail page's StatusTimeline lists it\nwhen the record holds it. A generated StatusSelector reads transitionRules instead: it offers the\ncurrent state and the moves the order allows (every state where no order is declared).\n",
        "default": []
      },
      "cancel_at_period_end": {
        "type": "boolean",
        "required": true,
        "description": "Whether the subscription will cancel at the natural billing period end."
      },
      "cancellation_reason": {
        "type": "string",
        "required": false,
        "description": "Free-form explanation captured during cancellation workflows."
      },
      "cancellation_reason_code": {
        "type": "string",
        "required": false,
        "description": "Structured reason code chosen from the allowedReasons parameter.",
        "validation": {
          "enumFromParameter": "allowedReasons"
        }
      },
      "cancellation_requested_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp when cancellation was initiated."
      },
      "created_at": {
        "type": "datetime",
        "required": true,
        "description": "Timestamp recording when the entity was first created."
      },
      "updated_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the most recent modification, when available."
      },
      "last_event": {
        "type": "string",
        "required": true,
        "description": "Lifecycle event associated with the most recent timestamp mutation.",
        "validation": {
          "enumFromParameter": "recordedEvents"
        }
      },
      "last_event_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the lifecycle event captured in last_event."
      },
      "amount": {
        "type": "integer",
        "required": true,
        "description": "Recurring price expressed in minor units (e.g., cents)."
      },
      "currency": {
        "type": "string",
        "required": true,
        "description": "ISO 4217 currency code used for billing."
      },
      "billing_interval": {
        "type": "string",
        "required": false,
        "description": "Recurrence cadence (monthly, yearly, quarterly, etc.)."
      },
      "payment_status": {
        "type": "string",
        "required": false,
        "description": "Outcome of the most recent collection attempt. Distinct from subscription\nlifecycle status — a subscription can be \"active\" with payment_status \"retrying\".\n",
        "validation": {
          "enum": [
            "pending",
            "succeeded",
            "failed",
            "retrying",
            "refunded"
          ]
        },
        "default": "pending"
      },
      "payment_method_type": {
        "type": "string",
        "required": false,
        "description": "Payment instrument category used for collection.",
        "validation": {
          "enum": [
            "card",
            "ach",
            "wire",
            "invoice",
            "other"
          ]
        }
      },
      "proration_amount": {
        "type": "integer",
        "required": false,
        "description": "Prorated credit or charge in minor currency units generated by a mid-cycle\nplan change. Positive values are charges; negative values are credits.\nOnly populated when the supportProration parameter is true.\n",
        "default": 0
      },
      "proration_date": {
        "type": "integer",
        "required": false,
        "description": "Unix timestamp (epoch SECONDS) at which proration is calculated. Pinned when an\nupcoming-invoice PREVIEW is requested and MUST be passed identically on commit so the\ncommitted charge equals the previewed amount. The preview is read-only and does NOT\nmutate the subscription. Stored as an integer (not a datetime) so the value round-trips\nbyte-identically between preview and commit — an ISO string normalization could shift it\nand desync the previewed vs charged amount. Only populated when supportProration is true.\nSource: docs.stripe.com/billing/subscriptions/prorations.\n",
        "validation": {
          "minimum": 0
        }
      },
      "last_payment_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp of the most recent successful payment."
      },
      "next_payment_due_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp when the next payment attempt should occur."
      },
      "current_period_start": {
        "type": "datetime",
        "required": true,
        "description": "Start timestamp of the current billing cycle."
      },
      "current_period_end": {
        "type": "datetime",
        "required": true,
        "description": "End timestamp of the current billing cycle."
      },
      "current_period_progress": {
        "type": "number",
        "required": false,
        "description": "Decimal progress (0-1) through the active billing cycle."
      },
      "is_archived": {
        "type": "boolean",
        "required": true,
        "description": "Flag indicating whether the entity is currently archived (soft-deleted).",
        "default": false
      },
      "archived_at": {
        "type": "datetime?",
        "required": false,
        "description": "Timestamp for when the entity entered the archived state."
      },
      "restored_at": {
        "type": "datetime?",
        "required": false,
        "description": "Timestamp for when the entity was most recently restored from an archived state."
      },
      "archive_reason": {
        "type": "string",
        "required": false,
        "description": "Human-readable narrative describing why the entity was archived.",
        "validation": {
          "maxLength": 500
        }
      },
      "archived_by": {
        "type": "string",
        "required": false,
        "description": "User ID or system identifier of the actor who archived this entity.\nSet to \"system\" for automated/policy-driven archival. Supports audit trail queries\nlike \"show all entities archived by user X\" or \"show all auto-archived entities\".\n"
      },
      "archive_metadata": {
        "type": "object",
        "required": false,
        "description": "Structured metadata about the archival action for compliance and audit purposes.\n\nProperties:\n  - method: \"manual\" | \"automated\" | \"policy\" — how the archive was triggered\n  - compliance_tags: string[] — regulatory labels (e.g., [\"GDPR\", \"SOX\", \"HIPAA\"])\n  - retention_policy_id: string — reference to the retention policy that triggered archival\n  - original_status: string — the Stateful status before archival\n  - related_entity_count: number — count of related entities also archived (cascade)\n"
      },
      "restoration_metadata": {
        "type": "object",
        "required": false,
        "description": "Metadata about the most recent restoration action.\n\nProperties:\n  - restored_by: string — user ID or \"system\"\n  - restored_fields: string[] — when partial restore, which fields were restored\n  - restoration_reason: string — why the entity was restored\n  - restored_from_snapshot: boolean — whether restored from a point-in-time snapshot\n"
      },
      "subscription_id": {
        "type": "string",
        "required": true,
        "description": "Primary identifier used across billing and lifecycle systems."
      },
      "plan_name": {
        "type": "string",
        "required": true,
        "description": "Human-readable plan label shown in headers."
      },
      "plan_code": {
        "type": "string",
        "required": false,
        "description": "Internal plan code or price identifier."
      },
      "plan_interval": {
        "type": "string",
        "required": false,
        "description": "Billing interval descriptor (monthly, yearly, etc.)."
      },
      "customer_name": {
        "type": "string",
        "required": false,
        "description": "Customer or account name associated with the subscription."
      },
      "customer_email": {
        "type": "email",
        "required": false,
        "description": "Billing contact email address."
      },
      "payment_history": {
        "type": "PaymentRecord[]",
        "required": false,
        "description": "Recorded payments, oldest first, each with its time and amount in minor units. Drawn by the payment chart."
      }
    },
    "semantics": {
      "status": {
        "semantic_type": "billing.subscription.status",
        "token_mapping": "tokenMap(billing.subscription.status.*)"
      },
      "state_history": {
        "semantic_type": "timeline.state_transition",
        "token_mapping": "tokenMap(timeline.status.*)",
        "ui_hints": {
          "component": "StatusTimeline",
          "collapseWhenEmpty": true
        }
      },
      "allowed_transitions": {
        "semantic_type": "status.navigation",
        "token_mapping": "computed",
        "ui_hints": {
          "component": "StatusSelector",
          "description": "The next states the product allows, as the product writes them; listed on the detail page, never used to disable an option."
        }
      },
      "cancel_at_period_end": {
        "semantic_type": "billing.subscription.cancel_at_period_end",
        "token_mapping": "tokenMap(billing.subscription.cancel_at_period_end)"
      },
      "cancellation_reason": {
        "semantic_type": "billing.subscription.cancellation_reason",
        "token_mapping": "tokenMap(billing.subscription.cancellation_reason)"
      },
      "cancellation_reason_code": {
        "semantic_type": "status.cancel.reason_code",
        "token_mapping": "tokenMap(status.cancel.code.*)",
        "ui_hints": {
          "component": "ReasonPicker",
          "parameterSource": "allowedReasons"
        }
      },
      "cancellation_requested_at": {
        "semantic_type": "billing.subscription.cancellation_requested_at",
        "token_mapping": "tokenMap(billing.subscription.cancellation_requested_at)"
      },
      "created_at": {
        "semantic_type": "audit.created_at",
        "token_mapping": "tokenMap(audit.created)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "updated_at": {
        "semantic_type": "audit.updated_at",
        "token_mapping": "tokenMap(audit.updated)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone",
          "allowNullParameter": "allowNullUpdatedAt"
        }
      },
      "last_event": {
        "semantic_type": "audit.event.type",
        "token_mapping": "tokenMap(audit.event.*)",
        "ui_hints": {
          "component": "AuditBadge",
          "parameterSource": "recordedEvents"
        }
      },
      "last_event_at": {
        "semantic_type": "audit.event.timestamp",
        "token_mapping": "tokenMap(audit.event.timestamp)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "amount": {
        "semantic_type": "billing.plan.amount",
        "token_mapping": "tokenMap(billing.plan.amount)",
        "ui_hints": {
          "component": "CurrencyAmount",
          "currencyField": "currency",
          "minorUnitsParameter": "minorUnits"
        }
      },
      "currency": {
        "semantic_type": "billing.plan.currency",
        "token_mapping": "tokenMap(billing.plan.currency)"
      },
      "billing_interval": {
        "semantic_type": "billing.subscription.interval",
        "token_mapping": "tokenMap(billing.subscription.interval)"
      },
      "payment_status": {
        "semantic_type": "billing.cycle.payment_status",
        "token_mapping": "tokenMap(billing.payment.status.*)",
        "ui_hints": {
          "component": "PaymentStatusBadge"
        }
      },
      "payment_method_type": {
        "semantic_type": "billing.cycle.payment_method",
        "token_mapping": "tokenMap(billing.payment.method.*)",
        "ui_hints": {
          "component": "PaymentMethodIcon"
        }
      },
      "proration_amount": {
        "semantic_type": "billing.cycle.proration",
        "token_mapping": "tokenMap(billing.proration.*)",
        "ui_hints": {
          "minorUnitsParameter": "minorUnits",
          "component": "CurrencyAmount",
          "currencyField": "currency",
          "signIndicator": true
        }
      },
      "proration_date": {
        "semantic_type": "billing.cycle.proration_timestamp",
        "token_mapping": "tokenMap(billing.timestamp.proration)",
        "ui_hints": {
          "component": "Timestamp",
          "unixSeconds": true
        }
      },
      "last_payment_at": {
        "semantic_type": "billing.subscription.last_payment_at",
        "token_mapping": "tokenMap(billing.subscription.last_payment_at)"
      },
      "next_payment_due_at": {
        "semantic_type": "billing.subscription.next_payment_due_at",
        "token_mapping": "tokenMap(billing.subscription.next_payment_due_at)"
      },
      "current_period_start": {
        "semantic_type": "billing.subscription.current_period_start",
        "token_mapping": "tokenMap(billing.subscription.current_period_start)"
      },
      "current_period_end": {
        "semantic_type": "billing.subscription.current_period_end",
        "token_mapping": "tokenMap(billing.subscription.current_period_end)"
      },
      "current_period_progress": {
        "semantic_type": "billing.subscription.current_period_progress",
        "token_mapping": "tokenMap(billing.subscription.current_period_progress)"
      },
      "is_archived": {
        "semantic_type": "status.archive.state",
        "token_mapping": "tokenMap(status.archive.*)",
        "ui_hints": {
          "component": "ArchiveBadge",
          "showIcon": true
        }
      },
      "archived_at": {
        "semantic_type": "status.archive.timestamp",
        "token_mapping": "tokenMap(status.archive.timestamp)",
        "ui_hints": {
          "component": "TimelineTimestamp"
        }
      },
      "restored_at": {
        "semantic_type": "status.archive.restore_timestamp",
        "token_mapping": "tokenMap(status.archive.restore)",
        "ui_hints": {
          "component": "TimelineTimestamp"
        }
      },
      "archive_reason": {
        "semantic_type": "status.archive.reason",
        "token_mapping": "tokenMap(status.archive.reason)",
        "ui_hints": {
          "component": "ArchiveReason",
          "maxLength": 500
        }
      },
      "archived_by": {
        "semantic_type": "status.archive.actor",
        "token_mapping": "tokenMap(status.archive.actor)",
        "ui_hints": {
          "component": "ActorLabel"
        }
      },
      "archive_metadata": {
        "semantic_type": "status.archive.compliance",
        "token_mapping": "computed",
        "ui_hints": {
          "component": "ArchiveCompliancePanel"
        }
      },
      "restoration_metadata": {
        "semantic_type": "status.archive.restoration",
        "token_mapping": "computed",
        "ui_hints": {
          "component": "RestorationSummary"
        }
      },
      "subscription_id": {
        "semantic_type": "billing.subscription.id",
        "token_mapping": "tokenMap(billing.subscription.id)"
      },
      "plan_name": {
        "semantic_type": "billing.plan.name",
        "token_mapping": "tokenMap(billing.plan.name)"
      },
      "plan_code": {
        "semantic_type": "billing.plan.code",
        "token_mapping": "tokenMap(billing.plan.code)"
      },
      "plan_interval": {
        "semantic_type": "billing.plan.interval",
        "token_mapping": "tokenMap(billing.plan.interval)"
      },
      "customer_name": {
        "semantic_type": "text.summary",
        "token_mapping": "tokenMap(customer.account.name)"
      },
      "customer_email": {
        "semantic_type": "customer.account.email",
        "token_mapping": "tokenMap(customer.account.email)"
      }
    },
    "viewExtensions": {
      "list": [
        {
          "component": "StatusBadge",
          "props": {
            "field": "status",
            "tone": "lifecycle"
          }
        },
        {
          "component": "RelativeTimestamp",
          "props": {
            "field": "updated_at",
            "fallbackField": "created_at",
            "timezoneParameter": "timezone"
          }
        },
        {
          "component": "BillingSummaryBadge",
          "position": "after",
          "props": {
            "amountField": "amount",
            "currencyField": "currency",
            "intervalField": "billing_interval",
            "minorUnitsParameter": "minorUnits"
          }
        },
        {
          "component": "ArchivedRowOverlay",
          "props": {
            "archivedField": "is_archived",
            "style": "grayed",
            "showBadge": true,
            "separateTab": true,
            "tabLabel": "Archived"
          }
        }
      ],
      "detail": [
        {
          "component": "CycleProgressCard",
          "position": "main",
          "priority": 70,
          "props": {
            "progressField": "current_period_progress",
            "periodStartField": "current_period_start",
            "periodEndField": "current_period_end",
            "intervalField": "billing_interval"
          }
        },
        {
          "component": "PaymentTimeline",
          "position": "main",
          "priority": 60,
          "props": {
            "lastPaymentField": "last_payment_at",
            "nextPaymentField": "next_payment_due_at",
            "paymentStatusField": "payment_status",
            "paymentMethodField": "payment_method_type",
            "amountField": "amount",
            "currencyField": "currency"
          }
        },
        {
          "component": "VizMarkPreview",
          "position": "top",
          "priority": 55,
          "props": {
            "chart": {
              "chartType": "bar",
              "source": "payment-events",
              "dateFields": [
                "last_payment_at",
                "next_payment_due_at"
              ],
              "amountField": "amount",
              "minorUnits": 100,
              "currencyField": "currency"
            },
            "title": "Payment amounts",
            "description": "Payments recorded for this subscription, in its currency."
          }
        },
        {
          "component": "StatusTimeline",
          "position": "top",
          "priority": 40,
          "props": {
            "field": "status",
            "historyField": "state_history",
            "statesParameter": "states",
            "showActorId": true,
            "showReason": true
          }
        },
        {
          "component": "CancellationSummary",
          "position": "top",
          "props": {
            "hideWhenDefault": true,
            "cancelAtPeriodEndField": "cancel_at_period_end",
            "reasonField": "cancellation_reason",
            "codeField": "cancellation_reason_code",
            "requestedAtField": "cancellation_requested_at"
          }
        },
        {
          "component": "AuditTimeline",
          "position": "bottom",
          "props": {
            "createdField": "created_at",
            "updatedField": "updated_at",
            "eventField": "last_event",
            "eventTimestampField": "last_event_at",
            "eventOptionsParameter": "recordedEvents"
          }
        },
        {
          "component": "ArchiveSummary",
          "position": "top",
          "props": {
            "hideWhenDefault": true,
            "archivedField": "is_archived",
            "archivedAtField": "archived_at",
            "restoredAtField": "restored_at",
            "reasonField": "archive_reason",
            "archivedByField": "archived_by",
            "metadataField": "archive_metadata",
            "retainHistoryParameter": "retainHistory",
            "restoreWindowParameter": "restoreWindowDays",
            "allowPartialRestoreParameter": "allowPartialRestore"
          }
        }
      ],
      "form": [
        {
          "component": "BillingIntervalSelector",
          "position": "main",
          "priority": 80,
          "props": {
            "intervalField": "billing_interval",
            "intervalsParameter": "billingIntervals"
          }
        },
        {
          "component": "BillingAmountInput",
          "position": "main",
          "priority": 75,
          "props": {
            "amountField": "amount",
            "currencyField": "currency",
            "minorUnitsParameter": "minorUnits"
          }
        },
        {
          "component": "StatusSelector",
          "position": "top",
          "props": {
            "field": "status",
            "optionsParameter": "states",
            "initialParameter": "initialState",
            "allowedTransitionsField": "allowed_transitions",
            "requireReasonParameter": "requireTransitionReason"
          }
        },
        {
          "component": "CancellationForm",
          "position": "top",
          "props": {
            "reasonField": "cancellation_reason",
            "codeField": "cancellation_reason_code",
            "requireReasonParameter": "requireReason",
            "allowedReasonsParameter": "allowedReasons",
            "windowParameter": "cancellationWindowHours"
          }
        }
      ],
      "card": [
        {
          "component": "StatusBadge",
          "position": "before",
          "props": {
            "field": "status",
            "variant": "subtle"
          }
        },
        {
          "component": "CancellationBadge",
          "position": "before",
          "props": {
            "field": "cancel_at_period_end",
            "hideWhenFalse": true
          }
        },
        {
          "component": "BillingCardMeta",
          "position": "after",
          "props": {
            "amountField": "amount",
            "currencyField": "currency",
            "intervalField": "billing_interval",
            "minorUnitsParameter": "minorUnits"
          }
        },
        {
          "component": "ArchivePill",
          "position": "before",
          "props": {
            "field": "is_archived",
            "archivedAtField": "archived_at",
            "hideWhenFalse": true
          }
        }
      ],
      "timeline": [
        {
          "component": "PaymentEventTimeline",
          "props": {
            "lastPaymentField": "last_payment_at",
            "nextPaymentField": "next_payment_due_at",
            "paymentStatusField": "payment_status",
            "amountField": "amount",
            "currencyField": "currency"
          }
        }
      ],
      "dashboard": [
        {
          "component": "VizMarkPreview",
          "position": "top",
          "priority": 55,
          "props": {
            "chart": {
              "chartType": "bar",
              "source": "payment-events",
              "dateFields": [
                "last_payment_at",
                "next_payment_due_at"
              ],
              "amountField": "amount",
              "minorUnits": 100,
              "currencyField": "currency"
            },
            "title": "Payment amounts",
            "description": "Payments recorded for this subscription, in its currency."
          }
        }
      ]
    },
    "tokens": {
      "status.state.default.bg": "var(--status-neutral-bg)",
      "status.state.default.text": "var(--status-neutral-text)",
      "status.timeline.connector": "var(--border-subtle)",
      "status.timeline.node.bg": "var(--sys-surface-raised)",
      "status.timeline.node.border": "var(--sys-border-default)",
      "status.timeline.actor.text": "var(--sys-text-secondary)",
      "status.timeline.reason.text": "var(--sys-text-tertiary)",
      "status.timeline.reason.bg": "var(--sys-surface-neutral)",
      "status.cancel.primary.bg": "var(--status-cancel-bg)",
      "status.cancel.primary.text": "var(--status-cancel-text)",
      "status.cancel.reason.text": "var(--text-default)",
      "status.cancel.timestamp.text": "var(--text-subtle)",
      "audit.created.badge.text": "var(--text-subtle)",
      "audit.updated.badge.text": "var(--text-subtle)",
      "audit.event.badge.bg": "var(--surface-muted)",
      "cmp.billing.amount.text": "var(--sys-text-strong)",
      "cmp.billing.amount.currency": "var(--sys-text-subtle)",
      "cmp.billing.amount.interval": "var(--sys-text-subtle)",
      "cmp.billing.cycle.progress.track": "var(--sys-surface-neutral)",
      "cmp.billing.cycle.progress.fill": "var(--sys-surface-accent)",
      "cmp.billing.cycle.progress.text": "var(--sys-text-default)",
      "cmp.billing.cycle.progress.height": "var(--space-1)",
      "cmp.billing.cycle.progress.radius": "var(--radius-full)",
      "cmp.billing.payment.succeeded.bg": "var(--sys-surface-success)",
      "cmp.billing.payment.succeeded.text": "var(--sys-text-success)",
      "cmp.billing.payment.failed.bg": "var(--sys-surface-critical)",
      "cmp.billing.payment.failed.text": "var(--sys-text-critical)",
      "cmp.billing.payment.retrying.bg": "var(--sys-surface-warning)",
      "cmp.billing.payment.retrying.text": "var(--sys-text-warning)",
      "cmp.billing.payment.pending.bg": "var(--sys-surface-info)",
      "cmp.billing.payment.pending.text": "var(--sys-text-info)",
      "cmp.billing.timeline.connector": "var(--sys-border-default)",
      "cmp.billing.timeline.dot": "var(--sys-surface-accent)",
      "cmp.billing.timeline.text": "var(--sys-text-default)",
      "status.archive.primary.bg": "var(--status-archive-bg)",
      "status.archive.primary.text": "var(--status-archive-text)",
      "status.archive.primary.border": "var(--sys-border-default)",
      "status.archive.timestamp.text": "var(--text-subtle)",
      "status.archive.reason.text": "var(--text-default)",
      "status.archive.reason.bg": "var(--sys-surface-neutral)",
      "status.archive.overlay.bg": "var(--sys-surface-disabled)",
      "status.archive.overlay.opacity": "0.6",
      "status.archive.actor.text": "var(--sys-text-secondary)",
      "status.archive.compliance.badge.bg": "var(--sys-status-info-surface)",
      "status.archive.compliance.badge.text": "var(--sys-status-info-text)",
      "viz.mark.bar.fill.default": "var(--cmp-viz-mark-bar-fill)",
      "viz.mark.bar.stroke.default": "var(--cmp-viz-mark-bar-stroke)",
      "viz.mark.bar.spacing": "var(--cmp-viz-mark-spacing)",
      "billing.subscription.status.future": "var(--semantic-info)",
      "billing.subscription.status.trialing": "var(--semantic-info)",
      "billing.subscription.status.active": "var(--semantic-success)",
      "billing.subscription.status.paused": "var(--semantic-warning)",
      "billing.subscription.status.pending_cancellation": "var(--semantic-info)",
      "billing.subscription.status.past_due": "var(--semantic-danger)",
      "billing.subscription.status.unpaid": "var(--semantic-danger)",
      "billing.subscription.status.terminated": "var(--semantic-neutral)",
      "billing.subscription.interval.monthly": "var(--text-subtle)",
      "billing.plan.amount": "var(--text-strong)"
    },
    "warnings": [
      "Subscription refines 11 fields its traits define, and its own definitions are used: lifecycle/Stateful (status); lifecycle/Cancellable (cancel_at_period_end, cancellation_reason, cancellation_requested_at); financial/Billable (amount, currency, billing_interval, current_period_start, current_period_end, current_period_progress, next_payment_due_at)."
    ],
    "filePath": "~/.oods-foundry/runtime/0.18.0-2b9c3aa471be/objects/core/Subscription.object.yaml",
    "source": "shipped"
  },
  {
    "name": "Task",
    "version": "1.0.1",
    "domain": "core.work",
    "description": "One ask to one person or agent to do one piece of work, and what became of it.",
    "tags": [
      "universal",
      "work",
      "core",
      "task"
    ],
    "maturity": "alpha",
    "traits": [
      {
        "name": "core/Assignment",
        "alias": null,
        "parameters": null
      },
      {
        "name": "lifecycle/Stateful",
        "alias": "TaskState",
        "parameters": {
          "states": [
            "not_started",
            "working",
            "needs_input",
            "waiting",
            "paused",
            "outcome_unknown",
            "finished",
            "failed",
            "declined",
            "cancelled",
            "handed_over"
          ],
          "initialState": "not_started",
          "transitionRules": {
            "not_started": [
              "working",
              "paused",
              "declined",
              "cancelled",
              "handed_over"
            ],
            "working": [
              "needs_input",
              "waiting",
              "paused",
              "outcome_unknown",
              "finished",
              "failed",
              "declined",
              "cancelled",
              "handed_over"
            ],
            "needs_input": [
              "working",
              "paused",
              "failed",
              "cancelled",
              "handed_over"
            ],
            "waiting": [
              "working",
              "paused",
              "outcome_unknown",
              "finished",
              "failed",
              "cancelled",
              "handed_over"
            ],
            "paused": [
              "working",
              "needs_input",
              "waiting",
              "cancelled",
              "handed_over"
            ],
            "outcome_unknown": [
              "working",
              "waiting",
              "paused",
              "finished",
              "failed",
              "cancelled",
              "handed_over"
            ],
            "finished": [],
            "failed": [],
            "declined": [],
            "cancelled": [],
            "handed_over": []
          }
        }
      },
      {
        "name": "lifecycle/Timestampable",
        "alias": "TaskTimes",
        "parameters": {
          "recordedEvents": [
            "created",
            "started",
            "asked_for_input",
            "paused",
            "ended",
            "updated"
          ],
          "timezone": "UTC"
        }
      },
      {
        "name": "structural/Ownerable",
        "alias": "TaskAnswers",
        "parameters": {
          "ownerTypes": [
            "user",
            "team"
          ],
          "primaryOwnerType": "user",
          "allowTransfer": true
        }
      },
      {
        "name": "lifecycle/Cancellable",
        "alias": "TaskCancellation",
        "parameters": {
          "allowCancellationAfterStart": true,
          "requireReason": true,
          "allowedReasons": [
            "no_longer_needed",
            "asked_in_error",
            "done_another_way"
          ]
        }
      }
    ],
    "schema": {
      "instruction": {
        "type": "string",
        "required": true,
        "readOnly": true,
        "description": "Exactly what was asked, in one line (\"Count the flour and butter in stock before Monday's supplier order\"). It\nis written once: a changed ask is a new task.\n",
        "validation": {
          "maxLength": 240
        }
      },
      "requested_by_id": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "Who asked for the work, by the id the product knows them by. An agent may ask, and may ask itself."
      },
      "requested_by_name": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "Who asked, as shown (\"Billing Agent\"). Kept on the record."
      },
      "requested_by_kind": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "What kind of actor asked (person, agent or system), as the Actor trait names them.",
        "validation": {
          "enum": [
            "person",
            "agent",
            "system"
          ]
        }
      },
      "requested_for_id": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "Who the work is for, the person or organization it serves."
      },
      "requested_for_name": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "Who the work is for, as shown (\"Tidewater Co-op\"). Kept on the record."
      },
      "asked_of_id": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "Who is doing the work, by the id the product knows them by. One record is one ask to one actor, and after the work\nends this still names the one who was asked to do it.\n"
      },
      "asked_of_name": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "Who is doing the work, or did it, as shown (\"Billing Agent\"). Kept on the record."
      },
      "asked_of_kind": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "What kind of actor is doing the work, a person or an agent, as the Actor trait names them.",
        "validation": {
          "enum": [
            "person",
            "agent"
          ]
        }
      },
      "subject_type": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "What kind of thing the work is about (\"Transaction\", \"Invoice\"). A task can be about nothing on record."
      },
      "subject_id": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "The thing the work is about, by the id the product calls it by (a payment's reference)."
      },
      "subject_name": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "The thing the work is about, as shown. Kept on the record, so it still reads after the thing is deleted."
      },
      "due_at": {
        "type": "datetime",
        "required": false,
        "description": "When the work is due, when someone sets a date.",
        "validation": {
          "format": "date-time"
        }
      },
      "waiting_on_type": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "What kind of thing the work waits on, which says what kind of wait it is: an Approval, a person, another task,\nor something outside, such as a payment at the bank. Set only while the work needs input or waits.\n"
      },
      "waiting_on_id": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "What the work waits on, by the id the product knows it by."
      },
      "waiting_on_name": {
        "type": "string",
        "required": false,
        "description": "What the work waits on, in a few words (\"PAY-2026-0429 at the bank\"). Set it only while the work needs input or waits."
      },
      "parent_id": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "The task this one came from, when another task handed it on or asked for it."
      },
      "parent_name": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "The task this one came from, as shown. Kept on the record."
      },
      "origin_id": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "The first ask in a chain of tasks, kept on every task in the chain so a search by its name finds them all."
      },
      "origin_name": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "The first ask in the chain, as shown. Kept on the record."
      },
      "result": {
        "type": "string",
        "required": false,
        "description": "What came of the work, in one line, in the words of whoever did it. Finished is their word, not someone else's acceptance.",
        "validation": {
          "maxLength": 240
        }
      },
      "tries": {
        "type": "integer",
        "required": false,
        "readOnly": true,
        "description": "How many times the work itself has been tried: a send, a payment, a count. Getting ready to do it is not a try. A\ntry is not a change of state, so it is counted here.\n",
        "validation": {
          "minimum": 0
        }
      },
      "last_try": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "When the last try was and how it ended, in one kept line (\"29 Sep, 09:15: sent again; no answer yet\").",
        "validation": {
          "maxLength": 240
        }
      },
      "status": {
        "type": "string",
        "required": true,
        "description": "Canonical lifecycle state derived from the states parameter. This is the single source\nof truth for the entity's current lifecycle position. Consumed by Colorized to resolve\nvisual tokens, and by view extensions to render StatusBadge and StatusTimeline.\n",
        "validation": {
          "enumFromParameter": "states"
        }
      },
      "state_history": {
        "type": "StateTransition[]",
        "required": false,
        "description": "Chronological log of state transitions. Each entry records the before/after states,\ntimestamp, and (when governance is enabled) the actor, reason, and transition metadata.\nRendered by StatusTimeline in the detail and timeline views.\n\nEntry structure:\n  - from: string (previous state)\n  - to: string (new state)\n  - timestamp: ISO 8601 datetime\n  - actor_id: string (user/system who triggered the transition, optional)\n  - reason: string (human-readable justification, required when requireTransitionReason is true)\n  - transition_metadata: Record<string, unknown> (arbitrary context, optional)\n\nEvery recorded change can name who acted, who it acted for and who approved it. All optional,\nfollowing Relationship's source_id/source_name pattern; only a *_name names a party, and an entry that names\nno one renders as it always has:\n  - actor_name: string (who acted, as shown: \"Billing Agent\")\n  - actor_kind: string (person, agent or system: the Actor trait's kinds)\n  - on_behalf_of_name / on_behalf_of_id: string (the person or organization it acted for)\n  - approved_by_name / approved_by_id: string (who approved the change, when someone did)\nStatusTimeline then reads \"Billing Agent for Tidewater Co-op · approved by Ruth Adeyemi\".\n\nA change someone approved can also say which approval it belongs to and what level of yes it was. Both\noptional; the id stays in the record's data, a pointer and not a link, and an entry without them renders as it\nalways has:\n  - approval_id: string (the Approval record the yes is kept in)\n  - approval_level: string (the level of yes, one of the levels the product declares: \"approval\")\nStatusTimeline then reads \"Billing Agent for Tidewater Co-op · approved by Ruth Adeyemi (level: Approval)\".\n\nA change made as part of a task can also say which task it was. Both optional; the id stays in the record's\ndata, a pointer and not a link, and an entry without them renders as it always has:\n  - task_id: string (the Task record the change was made under)\n  - task_name: string (the task, as shown: \"Get INV-2026-0155 paid\")\nStatusTimeline then reads \"… · approved by Ruth Adeyemi (level: Approval) · task: Get INV-2026-0155 paid\".\n\nA change made under a grant, the standing yes an actor acts under for a person or organization, can also say\nwhich grant it was. Both optional; the id stays in the record's data, a pointer and not a link, and an entry\nwithout them renders as it always has:\n  - grant_id: string (the Grant record the change was made under)\n  - grant_name: string (the grant, as shown: \"Resend returned transfers\")\nStatusTimeline names the grant after any approval and before the task: \"Billing Agent for Tidewater Co-op ·\ngrant: Resend returned transfers\".\n",
        "default": []
      },
      "allowed_transitions": {
        "type": "string[]",
        "required": false,
        "description": "Materialized list of the next states the product allows from the current status, written\nby the product from the transitionRules parameter. When transitionRules is null (open model),\nthis contains all states except the current one. The detail page's StatusTimeline lists it\nwhen the record holds it. A generated StatusSelector reads transitionRules instead: it offers the\ncurrent state and the moves the order allows (every state where no order is declared).\n",
        "default": []
      },
      "created_at": {
        "type": "datetime",
        "required": true,
        "description": "Timestamp recording when the entity was first created."
      },
      "updated_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the most recent modification, when available."
      },
      "last_event": {
        "type": "string",
        "required": true,
        "description": "Lifecycle event associated with the most recent timestamp mutation.",
        "validation": {
          "enumFromParameter": "recordedEvents"
        }
      },
      "last_event_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the lifecycle event captured in last_event."
      },
      "owner_id": {
        "type": "string",
        "required": true,
        "description": "Identifier of the owning principal scoped by owner_type."
      },
      "owner_type": {
        "type": "string",
        "required": true,
        "description": "Categorical owner type sourced from the ownerTypes parameter.",
        "validation": {
          "enumFromParameter": "ownerTypes"
        }
      },
      "ownership_role": {
        "type": "string",
        "required": false,
        "description": "Optional role name describing how the owner governs the entity.",
        "validation": {
          "maxLength": 80
        }
      },
      "ownership_transferred_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp recording when ownership was last transferred."
      },
      "cancel_at_period_end": {
        "type": "boolean",
        "required": false,
        "description": "Whether cancellation occurs at the natural period end instead of immediately. When true the entity is in a REVERSIBLE pending-cancellation state: the schedule can be undone (set back to false) any time before period end, returning the entity to active. This is distinct from a terminal cancellation (a `terminated`/canceled subscription), which is irreversible and non-reactivatable. Mirrors Stripe's cancel_at_period_end flag (docs.stripe.com/billing/subscriptions/cancel).",
        "default": false,
        "unavailable": true
      },
      "cancellation_reason": {
        "type": "string",
        "required": false,
        "description": "Free-form detail describing why cancellation occurred.",
        "validation": {
          "maxLength": 160
        }
      },
      "cancellation_reason_code": {
        "type": "string",
        "required": false,
        "description": "Structured reason code chosen from the allowedReasons parameter.",
        "validation": {
          "enumFromParameter": "allowedReasons"
        }
      },
      "cancellation_requested_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp capturing when the cancellation workflow was initiated."
      },
      "task_id": {
        "type": "uuid",
        "required": true,
        "description": "Primary identifier for the task, the id a history entry's task_id points at."
      },
      "name": {
        "type": "string",
        "required": true,
        "description": "What the task is called, in a few words (\"Get INV-2026-0155 paid\").",
        "validation": {
          "minLength": 1,
          "maxLength": 120
        }
      },
      "owner_name": {
        "type": "string",
        "required": false,
        "description": "Who answers for the work, a person or a team, as shown."
      }
    },
    "semantics": {
      "instruction": {
        "semantic_type": "text.summary",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "What was asked"
        }
      },
      "requested_by_id": {
        "semantic_type": "assignment.requested_by.id",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Asked by",
          "displayLabelField": "requested_by_name"
        }
      },
      "requested_by_name": {
        "semantic_type": "assignment.requested_by.name",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Asked by"
        }
      },
      "requested_by_kind": {
        "semantic_type": "assignment.requested_by.kind",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Kind of asker"
        }
      },
      "requested_for_id": {
        "semantic_type": "assignment.requested_for.id",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Asked for",
          "displayLabelField": "requested_for_name"
        }
      },
      "requested_for_name": {
        "semantic_type": "assignment.requested_for.name",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Asked for"
        }
      },
      "asked_of_id": {
        "semantic_type": "assignment.asked_of.id",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Doing it",
          "displayLabelField": "asked_of_name"
        }
      },
      "asked_of_name": {
        "semantic_type": "assignment.asked_of.name",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Doing it"
        }
      },
      "asked_of_kind": {
        "semantic_type": "assignment.asked_of.kind",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Kind of doer"
        }
      },
      "subject_type": {
        "semantic_type": "assignment.subject.type",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Kind of thing"
        }
      },
      "subject_id": {
        "semantic_type": "assignment.subject.id",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "About",
          "displayLabelField": "subject_name"
        }
      },
      "subject_name": {
        "semantic_type": "assignment.subject.name",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "About"
        }
      },
      "due_at": {
        "semantic_type": "assignment.due_at",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "RelativeTimestamp",
          "label": "Due"
        }
      },
      "waiting_on_type": {
        "semantic_type": "assignment.waiting_on.type",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Kind of thing waited on"
        }
      },
      "waiting_on_id": {
        "semantic_type": "assignment.waiting_on.id",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Waiting on",
          "displayLabelField": "waiting_on_name"
        }
      },
      "waiting_on_name": {
        "semantic_type": "assignment.waiting_on.name",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Waiting on"
        }
      },
      "parent_id": {
        "semantic_type": "assignment.parent.id",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Came from",
          "displayLabelField": "parent_name"
        }
      },
      "parent_name": {
        "semantic_type": "assignment.parent.name",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Came from"
        }
      },
      "origin_id": {
        "semantic_type": "assignment.origin.id",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "First ask",
          "displayLabelField": "origin_name"
        }
      },
      "origin_name": {
        "semantic_type": "assignment.origin.name",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "First ask"
        }
      },
      "result": {
        "semantic_type": "assignment.result",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Result"
        }
      },
      "tries": {
        "semantic_type": "assignment.tries",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Tries"
        }
      },
      "last_try": {
        "semantic_type": "assignment.last_try",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Last try"
        }
      },
      "status": {
        "semantic_type": "status.state",
        "token_mapping": "tokenMap(status.state.*)",
        "ui_hints": {
          "component": "StatusBadge",
          "showIcon": true
        }
      },
      "state_history": {
        "semantic_type": "timeline.state_transition",
        "token_mapping": "tokenMap(timeline.status.*)",
        "ui_hints": {
          "component": "StatusTimeline",
          "collapseWhenEmpty": true
        }
      },
      "allowed_transitions": {
        "semantic_type": "status.navigation",
        "token_mapping": "computed",
        "ui_hints": {
          "component": "StatusSelector",
          "description": "The next states the product allows, as the product writes them; listed on the detail page, never used to disable an option."
        }
      },
      "created_at": {
        "semantic_type": "audit.created_at",
        "token_mapping": "tokenMap(audit.created)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "updated_at": {
        "semantic_type": "audit.updated_at",
        "token_mapping": "tokenMap(audit.updated)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone",
          "allowNullParameter": "allowNullUpdatedAt"
        }
      },
      "last_event": {
        "semantic_type": "audit.event.type",
        "token_mapping": "tokenMap(audit.event.*)",
        "ui_hints": {
          "component": "AuditBadge",
          "parameterSource": "recordedEvents"
        }
      },
      "last_event_at": {
        "semantic_type": "audit.event.timestamp",
        "token_mapping": "tokenMap(audit.event.timestamp)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "owner_id": {
        "semantic_type": "ownership.owner.id",
        "token_mapping": "tokenMap(ownership.owner.id)",
        "ui_hints": {
          "component": "OwnerReference",
          "ownerTypeField": "owner_type",
          "displayLabelField": "owner_name"
        }
      },
      "owner_type": {
        "semantic_type": "ownership.owner.type",
        "token_mapping": "tokenMap(ownership.owner.type)",
        "ui_hints": {
          "component": "OwnerTypeBadge",
          "parameterSource": "ownerTypes"
        }
      },
      "ownership_role": {
        "semantic_type": "ownership.owner.role",
        "token_mapping": "tokenMap(ownership.owner.role)",
        "ui_hints": {
          "component": "OwnerRolePill"
        }
      },
      "ownership_transferred_at": {
        "semantic_type": "ownership.owner.transferred_at",
        "token_mapping": "tokenMap(ownership.owner.timestamp)",
        "ui_hints": {
          "component": "TimelineTimestamp"
        }
      },
      "cancel_at_period_end": {
        "semantic_type": "status.cancel.deferred",
        "token_mapping": "tokenMap(status.cancel.*)",
        "ui_hints": {
          "component": "CancellationToggle",
          "emphasizeWhenTrue": true
        }
      },
      "cancellation_reason": {
        "semantic_type": "status.cancel.reason",
        "token_mapping": "tokenMap(status.cancel.reason)",
        "ui_hints": {
          "component": "CancellationReason",
          "multiline": true,
          "maxLength": 160
        }
      },
      "cancellation_reason_code": {
        "semantic_type": "status.cancel.reason_code",
        "token_mapping": "tokenMap(status.cancel.code.*)",
        "ui_hints": {
          "component": "ReasonPicker",
          "parameterSource": "allowedReasons"
        }
      },
      "cancellation_requested_at": {
        "semantic_type": "status.cancel.timestamp",
        "token_mapping": "tokenMap(status.cancel.timestamp)",
        "ui_hints": {
          "component": "TimelineTimestamp"
        }
      },
      "task_id": {
        "semantic_type": "work.task.id",
        "token_mapping": "tokenMap(identity.id.primary)"
      },
      "name": {
        "semantic_type": "text.label",
        "token_mapping": "tokenMap(identity.name.primary)"
      }
    },
    "viewExtensions": {
      "list": [
        {
          "component": "LabelCell",
          "position": "after",
          "props": {
            "field": "asked_of_id",
            "description": "Doing it",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "LabelCell",
          "position": "after",
          "props": {
            "field": "waiting_on_id",
            "description": "Waiting on",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "StatusBadge",
          "props": {
            "field": "status",
            "tone": "lifecycle"
          }
        },
        {
          "component": "RelativeTimestamp",
          "props": {
            "field": "updated_at",
            "fallbackField": "created_at",
            "timezoneParameter": "timezone"
          }
        },
        {
          "component": "OwnerBadge",
          "props": {
            "ownerIdField": "owner_id",
            "ownerTypeField": "owner_type"
          }
        }
      ],
      "card": [
        {
          "component": "LabelCell",
          "position": "after",
          "props": {
            "field": "asked_of_id",
            "description": "Doing it",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "LabelCell",
          "position": "after",
          "props": {
            "field": "waiting_on_id",
            "description": "Waiting on",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "StatusBadge",
          "position": "before",
          "props": {
            "field": "status",
            "variant": "subtle"
          }
        },
        {
          "component": "OwnershipMeta",
          "position": "after",
          "props": {
            "ownerIdField": "owner_id",
            "ownerTypeField": "owner_type",
            "roleField": "ownership_role"
          }
        }
      ],
      "detail": [
        {
          "component": "Text",
          "position": "main",
          "priority": 80,
          "props": {
            "field": "instruction"
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 79,
          "props": {
            "field": "subject_id",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 78,
          "props": {
            "field": "subject_name",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 77,
          "props": {
            "field": "subject_type",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 76,
          "props": {
            "field": "requested_by_id",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 75,
          "props": {
            "field": "requested_by_name",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 74,
          "props": {
            "field": "requested_by_kind",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 73,
          "props": {
            "field": "requested_for_id",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 72,
          "props": {
            "field": "requested_for_name",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 71,
          "props": {
            "field": "asked_of_id",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 70,
          "props": {
            "field": "asked_of_name",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 69,
          "props": {
            "field": "asked_of_kind",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 68,
          "props": {
            "field": "due_at",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 67,
          "props": {
            "field": "waiting_on_id",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 66,
          "props": {
            "field": "waiting_on_name",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 65,
          "props": {
            "field": "waiting_on_type",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 64,
          "props": {
            "field": "result",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 63,
          "props": {
            "field": "tries",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 62,
          "props": {
            "field": "last_try",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 61,
          "props": {
            "field": "parent_id",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 60,
          "props": {
            "field": "parent_name",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 59,
          "props": {
            "field": "origin_id",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 58,
          "props": {
            "field": "origin_name",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "StatusTimeline",
          "position": "top",
          "priority": 40,
          "props": {
            "field": "status",
            "historyField": "state_history",
            "statesParameter": "states",
            "showActorId": true,
            "showReason": true
          }
        },
        {
          "component": "AuditTimeline",
          "position": "bottom",
          "props": {
            "createdField": "created_at",
            "updatedField": "updated_at",
            "eventField": "last_event",
            "eventTimestampField": "last_event_at",
            "eventOptionsParameter": "recordedEvents"
          }
        },
        {
          "component": "OwnershipSummary",
          "position": "top",
          "props": {
            "ownerIdField": "owner_id",
            "ownerTypeField": "owner_type",
            "roleField": "ownership_role",
            "transferredAtField": "ownership_transferred_at",
            "allowTransferParameter": "allowTransfer"
          }
        },
        {
          "component": "CancellationEvent",
          "position": "top",
          "props": {
            "title": "Cancellation",
            "timestampField": "cancellation_requested_at",
            "labelField": "cancellation_reason",
            "codeField": "cancellation_reason_code"
          }
        }
      ],
      "form": [
        {
          "component": "Text",
          "position": "top",
          "priority": 80,
          "fact": true,
          "props": {
            "field": "instruction"
          }
        },
        {
          "component": "Text",
          "position": "top",
          "priority": 79,
          "fact": true,
          "props": {
            "field": "requested_by_id",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "top",
          "priority": 78,
          "fact": true,
          "props": {
            "field": "requested_by_name",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "top",
          "priority": 77,
          "fact": true,
          "props": {
            "field": "requested_for_id",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "top",
          "priority": 76,
          "fact": true,
          "props": {
            "field": "requested_for_name",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "top",
          "priority": 75,
          "fact": true,
          "props": {
            "field": "asked_of_id",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Text",
          "position": "top",
          "priority": 74,
          "fact": true,
          "props": {
            "field": "asked_of_name",
            "data-oods-omit-empty": true
          }
        },
        {
          "component": "Input",
          "position": "main",
          "priority": 60,
          "props": {
            "field": "result"
          }
        },
        {
          "component": "Input",
          "position": "main",
          "priority": 59,
          "props": {
            "field": "due_at"
          }
        },
        {
          "component": "Input",
          "position": "main",
          "priority": 58,
          "props": {
            "field": "waiting_on_name"
          }
        },
        {
          "component": "StatusSelector",
          "position": "top",
          "props": {
            "field": "status",
            "optionsParameter": "states",
            "initialParameter": "initialState",
            "allowedTransitionsField": "allowed_transitions",
            "requireReasonParameter": "requireTransitionReason"
          }
        },
        {
          "component": "CancellationForm",
          "position": "top",
          "props": {
            "reasonField": "cancellation_reason",
            "codeField": "cancellation_reason_code",
            "requireReasonParameter": "requireReason",
            "allowedReasonsParameter": "allowedReasons",
            "windowParameter": "cancellationWindowHours"
          }
        }
      ]
    },
    "tokens": {
      "status.state.default.bg": "var(--status-neutral-bg)",
      "status.state.default.text": "var(--status-neutral-text)",
      "status.timeline.connector": "var(--border-subtle)",
      "status.timeline.node.bg": "var(--sys-surface-raised)",
      "status.timeline.node.border": "var(--sys-border-default)",
      "status.timeline.actor.text": "var(--sys-text-secondary)",
      "status.timeline.reason.text": "var(--sys-text-tertiary)",
      "status.timeline.reason.bg": "var(--sys-surface-neutral)",
      "audit.created.badge.text": "var(--text-subtle)",
      "audit.updated.badge.text": "var(--text-subtle)",
      "audit.event.badge.bg": "var(--surface-muted)",
      "ownership.owner.badge.bg": "var(--surface-subtle)",
      "ownership.owner.badge.text": "var(--text-default)",
      "ownership.owner.role.text": "var(--text-muted)",
      "status.cancel.primary.bg": "var(--status-cancel-bg)",
      "status.cancel.primary.text": "var(--status-cancel-text)",
      "status.cancel.reason.text": "var(--text-default)",
      "status.cancel.timestamp.text": "var(--text-subtle)",
      "identity.id.primary": "var(--text-strong)",
      "identity.name.primary": "var(--text-strong)"
    },
    "warnings": [],
    "filePath": "~/.oods-foundry/runtime/0.18.0-2b9c3aa471be/objects/core/Task.object.yaml",
    "source": "shipped"
  },
  {
    "name": "Transaction",
    "version": "1.3.0",
    "domain": "core.commerce",
    "description": "Canonical transaction record tracking monetary movement, lifecycle, and audit metadata.",
    "tags": [
      "universal",
      "transaction",
      "commerce"
    ],
    "maturity": null,
    "traits": [
      {
        "name": "lifecycle/Stateful",
        "alias": null,
        "parameters": {
          "states": [
            "pending",
            "authorized",
            "settled",
            "failed",
            "refunded",
            "cancelled"
          ],
          "initialState": "pending"
        }
      },
      {
        "name": "lifecycle/Timestampable",
        "alias": null,
        "parameters": {
          "recordedEvents": [
            "initiated",
            "authorized",
            "settled",
            "refunded",
            "failed"
          ],
          "timezone": "UTC"
        }
      },
      {
        "name": "financial/Priceable",
        "alias": null,
        "parameters": {
          "supportedCurrencies": [
            "USD",
            "EUR",
            "GBP",
            "JPY",
            "AUD"
          ],
          "defaultCurrency": "USD",
          "pricingModels": [
            "one_time",
            "usage_based"
          ],
          "billingIntervals": [
            "one_time"
          ],
          "taxBehavior": "exclusive"
        }
      },
      {
        "name": "lifecycle/Cancellable",
        "alias": null,
        "parameters": {
          "allowCancellationAfterStart": false,
          "cancellationWindowHours": 24,
          "requireReason": true,
          "allowedReasons": [
            "customer_request",
            "suspected_fraud",
            "duplicate_charge",
            "payment_method_error"
          ]
        }
      },
      {
        "name": "lifecycle/Archivable",
        "alias": null,
        "parameters": {
          "gracePeriodDays": 365,
          "retainHistory": true,
          "restoreWindowDays": 30
        }
      },
      {
        "name": "core/Approvable",
        "alias": "PaymentApprovals",
        "parameters": {
          "levels": [
            "approval",
            "sign_off"
          ],
          "levelDefinitions": {
            "approval": {
              "who": "A person at the customer who may move its money",
              "permits": "The one resend or refund it was asked for",
              "shown": "The amount, the method, the invoice it is for, and anything this resend must do differently",
              "cost": "Money sent twice, or to the wrong place",
              "act": "A deliberate yes or no",
              "lapses": "Once it is used (the resend is sent and recorded, not when the bank answers), or when the amount changes"
            },
            "sign_off": {
              "who": "The customer's finance lead",
              "permits": "A payment above the customer's own limit",
              "shown": "The amount, the payee and the reason",
              "cost": "A large payment the customer did not mean to make",
              "act": "The most deliberate, with its meaning written down",
              "lapses": "Never for that payment"
            }
          },
          "requiredLevels": {
            "resend": "approval"
          },
          "inAdvance": [
            "resend"
          ],
          "outcomes": [
            "not_required",
            "waiting",
            "approved",
            "allowed_in_advance",
            "declined",
            "out_of_date"
          ]
        }
      }
    ],
    "relationships": [
      {
        "target": "User",
        "via": "user_id",
        "cardinality": "many-to-one",
        "label": "User"
      },
      {
        "target": "Organization",
        "via": "organization_id",
        "cardinality": "many-to-one",
        "label": "Tenant organization"
      }
    ],
    "schema": {
      "status": {
        "type": "string",
        "required": true,
        "description": "Canonical lifecycle state derived from the states parameter. This is the single source\nof truth for the entity's current lifecycle position. Consumed by Colorized to resolve\nvisual tokens, and by view extensions to render StatusBadge and StatusTimeline.\n",
        "validation": {
          "enumFromParameter": "states"
        }
      },
      "state_history": {
        "type": "StateTransition[]",
        "required": false,
        "description": "Chronological log of state transitions. Each entry records the before/after states,\ntimestamp, and (when governance is enabled) the actor, reason, and transition metadata.\nRendered by StatusTimeline in the detail and timeline views.\n\nEntry structure:\n  - from: string (previous state)\n  - to: string (new state)\n  - timestamp: ISO 8601 datetime\n  - actor_id: string (user/system who triggered the transition, optional)\n  - reason: string (human-readable justification, required when requireTransitionReason is true)\n  - transition_metadata: Record<string, unknown> (arbitrary context, optional)\n\nEvery recorded change can name who acted, who it acted for and who approved it. All optional,\nfollowing Relationship's source_id/source_name pattern; only a *_name names a party, and an entry that names\nno one renders as it always has:\n  - actor_name: string (who acted, as shown: \"Billing Agent\")\n  - actor_kind: string (person, agent or system: the Actor trait's kinds)\n  - on_behalf_of_name / on_behalf_of_id: string (the person or organization it acted for)\n  - approved_by_name / approved_by_id: string (who approved the change, when someone did)\nStatusTimeline then reads \"Billing Agent for Tidewater Co-op · approved by Ruth Adeyemi\".\n\nA change someone approved can also say which approval it belongs to and what level of yes it was. Both\noptional; the id stays in the record's data, a pointer and not a link, and an entry without them renders as it\nalways has:\n  - approval_id: string (the Approval record the yes is kept in)\n  - approval_level: string (the level of yes, one of the levels the product declares: \"approval\")\nStatusTimeline then reads \"Billing Agent for Tidewater Co-op · approved by Ruth Adeyemi (level: Approval)\".\n\nA change made as part of a task can also say which task it was. Both optional; the id stays in the record's\ndata, a pointer and not a link, and an entry without them renders as it always has:\n  - task_id: string (the Task record the change was made under)\n  - task_name: string (the task, as shown: \"Get INV-2026-0155 paid\")\nStatusTimeline then reads \"… · approved by Ruth Adeyemi (level: Approval) · task: Get INV-2026-0155 paid\".\n\nA change made under a grant, the standing yes an actor acts under for a person or organization, can also say\nwhich grant it was. Both optional; the id stays in the record's data, a pointer and not a link, and an entry\nwithout them renders as it always has:\n  - grant_id: string (the Grant record the change was made under)\n  - grant_name: string (the grant, as shown: \"Resend returned transfers\")\nStatusTimeline names the grant after any approval and before the task: \"Billing Agent for Tidewater Co-op ·\ngrant: Resend returned transfers\".\n",
        "default": []
      },
      "allowed_transitions": {
        "type": "string[]",
        "required": false,
        "description": "Materialized list of the next states the product allows from the current status, written\nby the product from the transitionRules parameter. When transitionRules is null (open model),\nthis contains all states except the current one. The detail page's StatusTimeline lists it\nwhen the record holds it. A generated StatusSelector reads transitionRules instead: it offers the\ncurrent state and the moves the order allows (every state where no order is declared).\n",
        "default": []
      },
      "created_at": {
        "type": "datetime",
        "required": true,
        "description": "Timestamp recording when the entity was first created."
      },
      "updated_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the most recent modification, when available."
      },
      "last_event": {
        "type": "string",
        "required": true,
        "description": "Lifecycle event associated with the most recent timestamp mutation.",
        "validation": {
          "enumFromParameter": "recordedEvents"
        }
      },
      "last_event_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the lifecycle event captured in last_event."
      },
      "unit_amount_cents": {
        "type": "number",
        "required": true,
        "description": "Base unit price expressed in the smallest currency denomination.",
        "validation": {
          "minimum": 0
        }
      },
      "currency": {
        "type": "string",
        "required": true,
        "description": "ISO currency code for the unit amount.",
        "validation": {
          "enumFromParameter": "supportedCurrencies"
        }
      },
      "pricing_model": {
        "type": "string",
        "required": true,
        "description": "Monetization model applied to the entity.",
        "validation": {
          "enumFromParameter": "pricingModels"
        }
      },
      "billing_interval": {
        "type": "string",
        "required": false,
        "description": "Billing cadence when pricing_model indicates recurring revenue.",
        "validation": {
          "enumFromParameter": "billingIntervals"
        },
        "unavailable": true
      },
      "tax_behavior": {
        "type": "string",
        "required": true,
        "description": "Defines whether taxes are included in the displayed price.",
        "validation": {
          "enum": [
            "exclusive",
            "inclusive"
          ]
        },
        "default": "exclusive"
      },
      "cancel_at_period_end": {
        "type": "boolean",
        "required": false,
        "description": "Whether cancellation occurs at the natural period end instead of immediately. When true the entity is in a REVERSIBLE pending-cancellation state: the schedule can be undone (set back to false) any time before period end, returning the entity to active. This is distinct from a terminal cancellation (a `terminated`/canceled subscription), which is irreversible and non-reactivatable. Mirrors Stripe's cancel_at_period_end flag (docs.stripe.com/billing/subscriptions/cancel).",
        "default": false,
        "unavailable": true
      },
      "cancellation_reason": {
        "type": "string",
        "required": false,
        "description": "Free-form detail describing why cancellation occurred.",
        "validation": {
          "maxLength": 160
        }
      },
      "cancellation_reason_code": {
        "type": "string",
        "required": false,
        "description": "Structured reason code chosen from the allowedReasons parameter.",
        "validation": {
          "enumFromParameter": "allowedReasons"
        }
      },
      "cancellation_requested_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp capturing when the cancellation workflow was initiated."
      },
      "is_archived": {
        "type": "boolean",
        "required": true,
        "description": "Flag indicating whether the entity is currently archived (soft-deleted).",
        "default": false
      },
      "archived_at": {
        "type": "datetime?",
        "required": false,
        "description": "Timestamp for when the entity entered the archived state."
      },
      "restored_at": {
        "type": "datetime?",
        "required": false,
        "description": "Timestamp for when the entity was most recently restored from an archived state."
      },
      "archive_reason": {
        "type": "string",
        "required": false,
        "description": "Human-readable narrative describing why the entity was archived.",
        "validation": {
          "maxLength": 500
        }
      },
      "archived_by": {
        "type": "string",
        "required": false,
        "description": "User ID or system identifier of the actor who archived this entity.\nSet to \"system\" for automated/policy-driven archival. Supports audit trail queries\nlike \"show all entities archived by user X\" or \"show all auto-archived entities\".\n"
      },
      "archive_metadata": {
        "type": "object",
        "required": false,
        "description": "Structured metadata about the archival action for compliance and audit purposes.\n\nProperties:\n  - method: \"manual\" | \"automated\" | \"policy\" — how the archive was triggered\n  - compliance_tags: string[] — regulatory labels (e.g., [\"GDPR\", \"SOX\", \"HIPAA\"])\n  - retention_policy_id: string — reference to the retention policy that triggered archival\n  - original_status: string — the Stateful status before archival\n  - related_entity_count: number — count of related entities also archived (cascade)\n"
      },
      "restoration_metadata": {
        "type": "object",
        "required": false,
        "description": "Metadata about the most recent restoration action.\n\nProperties:\n  - restored_by: string — user ID or \"system\"\n  - restored_fields: string[] — when partial restore, which fields were restored\n  - restoration_reason: string — why the entity was restored\n  - restored_from_snapshot: boolean — whether restored from a point-in-time snapshot\n"
      },
      "approval_state": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "The outcome, worked out by the product from the approvals that still stand and written here. Named apart from\nStateful's `status`, so a thing keeps its lifecycle and its approval outcome side by side. Read-only: it is shown\non the detail page and kept off the form.\n",
        "validation": {
          "enumFromParameter": "outcomes"
        }
      },
      "approval_summary": {
        "type": "string",
        "required": false,
        "readOnly": true,
        "description": "One kept line saying what the outcome rests on (\"Approved by Ruth Adeyemi · version 3 · 2 Nov\"), or why no\napproval was asked. It restates the Approval records, since a thing's own page lists its approvals only where the\nthing declares that list (metadata.relatedLists), and no shipped object does. Read-only.\n",
        "validation": {
          "maxLength": 240
        }
      },
      "transaction_id": {
        "type": "uuid",
        "required": true,
        "description": "Unique identifier for the transaction record."
      },
      "user_id": {
        "type": "uuid",
        "required": true,
        "description": "Identifier of the user associated with the transaction."
      },
      "user_name": {
        "type": "string",
        "required": false,
        "description": "Display name of the user associated with the transaction."
      },
      "organization_id": {
        "type": "uuid",
        "required": false,
        "description": "Tenant organization responsible for the transaction."
      },
      "organization_name": {
        "type": "string",
        "required": false,
        "description": "Display name of the tenant organization responsible for the transaction."
      },
      "occurred_at": {
        "type": "datetime",
        "required": true,
        "description": "Timestamp when the transaction occurred in the source system."
      },
      "payment_method": {
        "type": "string",
        "required": true,
        "description": "Funding source used to complete the transaction.",
        "validation": {
          "enum": [
            "card",
            "bank_transfer",
            "digital_wallet",
            "invoice"
          ]
        }
      },
      "channel": {
        "type": "string",
        "required": true,
        "default": "online",
        "description": "Sales channel through which the transaction was initiated.",
        "validation": {
          "enum": [
            "online",
            "in_app",
            "point_of_sale",
            "partner"
          ]
        }
      },
      "payment_reference": {
        "type": "string",
        "required": false,
        "description": "Provider reference code linking to the payment processor."
      },
      "description": {
        "type": "string",
        "required": false,
        "description": "What the payment was for, as it appears on the customer's statement.",
        "validation": {
          "maxLength": 160
        }
      },
      "risk_score": {
        "type": "number",
        "required": false,
        "description": "Fraud assessment score assigned during authorization.",
        "validation": {
          "minimum": 0,
          "maximum": 100
        }
      }
    },
    "semantics": {
      "status": {
        "semantic_type": "status.state",
        "token_mapping": "tokenMap(status.state.*)",
        "ui_hints": {
          "component": "StatusBadge",
          "showIcon": true
        }
      },
      "state_history": {
        "semantic_type": "timeline.state_transition",
        "token_mapping": "tokenMap(timeline.status.*)",
        "ui_hints": {
          "component": "StatusTimeline",
          "collapseWhenEmpty": true
        }
      },
      "allowed_transitions": {
        "semantic_type": "status.navigation",
        "token_mapping": "computed",
        "ui_hints": {
          "component": "StatusSelector",
          "description": "The next states the product allows, as the product writes them; listed on the detail page, never used to disable an option."
        }
      },
      "created_at": {
        "semantic_type": "audit.created_at",
        "token_mapping": "tokenMap(audit.created)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "updated_at": {
        "semantic_type": "audit.updated_at",
        "token_mapping": "tokenMap(audit.updated)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone",
          "allowNullParameter": "allowNullUpdatedAt"
        }
      },
      "last_event": {
        "semantic_type": "audit.event.type",
        "token_mapping": "tokenMap(audit.event.*)",
        "ui_hints": {
          "component": "AuditBadge",
          "parameterSource": "recordedEvents"
        }
      },
      "last_event_at": {
        "semantic_type": "audit.event.timestamp",
        "token_mapping": "tokenMap(audit.event.timestamp)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "unit_amount_cents": {
        "semantic_type": "commerce.price.amount",
        "token_mapping": "tokenMap(commerce.price.primary)",
        "ui_hints": {
          "minorUnits": 100,
          "component": "CurrencyAmount",
          "currencyField": "currency"
        }
      },
      "currency": {
        "semantic_type": "commerce.price.currency",
        "token_mapping": "tokenMap(commerce.currency.primary)",
        "ui_hints": {
          "component": "CurrencyCode",
          "parameterSource": "supportedCurrencies"
        }
      },
      "pricing_model": {
        "semantic_type": "commerce.price.model",
        "token_mapping": "tokenMap(commerce.pricing.model)",
        "ui_hints": {
          "component": "PricingModelBadge",
          "parameterSource": "pricingModels"
        }
      },
      "billing_interval": {
        "semantic_type": "commerce.price.interval",
        "token_mapping": "tokenMap(commerce.pricing.interval)",
        "ui_hints": {
          "component": "BillingIntervalBadge",
          "parameterSource": "billingIntervals"
        }
      },
      "tax_behavior": {
        "semantic_type": "commerce.price.tax_behavior",
        "token_mapping": "tokenMap(commerce.pricing.tax)",
        "ui_hints": {
          "component": "TaxBehaviorTag"
        }
      },
      "cancel_at_period_end": {
        "semantic_type": "status.cancel.deferred",
        "token_mapping": "tokenMap(status.cancel.*)",
        "ui_hints": {
          "component": "CancellationToggle",
          "emphasizeWhenTrue": true
        }
      },
      "cancellation_reason": {
        "semantic_type": "status.cancel.reason",
        "token_mapping": "tokenMap(status.cancel.reason)",
        "ui_hints": {
          "component": "CancellationReason",
          "multiline": true,
          "maxLength": 160
        }
      },
      "cancellation_reason_code": {
        "semantic_type": "status.cancel.reason_code",
        "token_mapping": "tokenMap(status.cancel.code.*)",
        "ui_hints": {
          "component": "ReasonPicker",
          "parameterSource": "allowedReasons"
        }
      },
      "cancellation_requested_at": {
        "semantic_type": "status.cancel.timestamp",
        "token_mapping": "tokenMap(status.cancel.timestamp)",
        "ui_hints": {
          "component": "TimelineTimestamp"
        }
      },
      "is_archived": {
        "semantic_type": "status.archive.state",
        "token_mapping": "tokenMap(status.archive.*)",
        "ui_hints": {
          "component": "ArchiveBadge",
          "showIcon": true
        }
      },
      "archived_at": {
        "semantic_type": "status.archive.timestamp",
        "token_mapping": "tokenMap(status.archive.timestamp)",
        "ui_hints": {
          "component": "TimelineTimestamp"
        }
      },
      "restored_at": {
        "semantic_type": "status.archive.restore_timestamp",
        "token_mapping": "tokenMap(status.archive.restore)",
        "ui_hints": {
          "component": "TimelineTimestamp"
        }
      },
      "archive_reason": {
        "semantic_type": "status.archive.reason",
        "token_mapping": "tokenMap(status.archive.reason)",
        "ui_hints": {
          "component": "ArchiveReason",
          "maxLength": 500
        }
      },
      "archived_by": {
        "semantic_type": "status.archive.actor",
        "token_mapping": "tokenMap(status.archive.actor)",
        "ui_hints": {
          "component": "ActorLabel"
        }
      },
      "archive_metadata": {
        "semantic_type": "status.archive.compliance",
        "token_mapping": "computed",
        "ui_hints": {
          "component": "ArchiveCompliancePanel"
        }
      },
      "restoration_metadata": {
        "semantic_type": "status.archive.restoration",
        "token_mapping": "computed",
        "ui_hints": {
          "component": "RestorationSummary"
        }
      },
      "approval_state": {
        "semantic_type": "approval.outcome",
        "token_mapping": "tokenMap(status.state.*)",
        "ui_hints": {
          "component": "StatusBadge",
          "showIcon": true
        }
      },
      "approval_summary": {
        "semantic_type": "approval.outcome.summary",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "Text",
          "label": "Approvals"
        }
      },
      "transaction_id": {
        "semantic_type": "commerce.transaction.id",
        "token_mapping": "tokenMap(commerce.transaction.id)"
      },
      "user_id": {
        "semantic_type": "identity.user.id",
        "token_mapping": "tokenMap(identity.id.primary)",
        "ui_hints": {
          "displayLabelField": "user_name"
        }
      },
      "user_name": {
        "semantic_type": "identity.user.name",
        "token_mapping": "tokenMap(identity.name.primary)"
      },
      "organization_id": {
        "semantic_type": "organization.id",
        "token_mapping": "tokenMap(organization.id.primary)",
        "ui_hints": {
          "displayLabelField": "organization_name"
        }
      },
      "organization_name": {
        "semantic_type": "organization.name",
        "token_mapping": "tokenMap(organization.name.primary)"
      },
      "description": {
        "semantic_type": "text.summary",
        "token_mapping": "tokenMap(commerce.transaction.description)"
      },
      "occurred_at": {
        "semantic_type": "commerce.transaction.timestamp",
        "token_mapping": "tokenMap(commerce.transaction.timestamp)"
      },
      "payment_method": {
        "semantic_type": "commerce.payment.method",
        "token_mapping": "tokenMap(commerce.payment.method)"
      },
      "channel": {
        "semantic_type": "commerce.transaction.channel",
        "token_mapping": "tokenMap(commerce.transaction.channel)"
      },
      "payment_reference": {
        "semantic_type": "text.label",
        "token_mapping": "tokenMap(commerce.transaction.id)",
        "ui_hints": {
          "displayFallbackField": "transaction_id"
        }
      },
      "risk_score": {
        "semantic_type": "risk.transaction.score",
        "token_mapping": "tokenMap(risk.score.primary)"
      }
    },
    "viewExtensions": {
      "list": [
        {
          "component": "StatusBadge",
          "props": {
            "field": "status",
            "tone": "lifecycle"
          }
        },
        {
          "component": "RelativeTimestamp",
          "props": {
            "field": "updated_at",
            "fallbackField": "created_at",
            "timezoneParameter": "timezone"
          }
        },
        {
          "component": "PriceBadge",
          "props": {
            "amountField": "unit_amount_cents",
            "currencyField": "currency"
          }
        },
        {
          "component": "ArchivedRowOverlay",
          "props": {
            "archivedField": "is_archived",
            "style": "grayed",
            "showBadge": true,
            "separateTab": true,
            "tabLabel": "Archived"
          }
        }
      ],
      "detail": [
        {
          "component": "StatusBadge",
          "position": "main",
          "priority": 58,
          "props": {
            "statusField": "approval_state",
            "emphasis": "subtle",
            "showIcon": true
          }
        },
        {
          "component": "Text",
          "position": "main",
          "priority": 57,
          "props": {
            "field": "approval_summary"
          }
        },
        {
          "component": "StatusTimeline",
          "position": "top",
          "priority": 40,
          "props": {
            "field": "status",
            "historyField": "state_history",
            "statesParameter": "states",
            "showActorId": true,
            "showReason": true
          }
        },
        {
          "component": "AuditTimeline",
          "position": "bottom",
          "props": {
            "createdField": "created_at",
            "updatedField": "updated_at",
            "eventField": "last_event",
            "eventTimestampField": "last_event_at",
            "eventOptionsParameter": "recordedEvents"
          }
        },
        {
          "component": "PriceSummary",
          "position": "top",
          "props": {
            "amountField": "unit_amount_cents",
            "currencyField": "currency",
            "modelField": "pricing_model",
            "taxBehaviorField": "tax_behavior"
          }
        },
        {
          "component": "CancellationEvent",
          "position": "top",
          "props": {
            "title": "Cancellation",
            "timestampField": "cancellation_requested_at",
            "labelField": "cancellation_reason",
            "codeField": "cancellation_reason_code"
          }
        },
        {
          "component": "ArchiveSummary",
          "position": "top",
          "props": {
            "hideWhenDefault": true,
            "archivedField": "is_archived",
            "archivedAtField": "archived_at",
            "restoredAtField": "restored_at",
            "reasonField": "archive_reason",
            "archivedByField": "archived_by",
            "metadataField": "archive_metadata",
            "retainHistoryParameter": "retainHistory",
            "restoreWindowParameter": "restoreWindowDays",
            "allowPartialRestoreParameter": "allowPartialRestore"
          }
        }
      ],
      "form": [
        {
          "component": "StatusSelector",
          "position": "top",
          "props": {
            "field": "status",
            "optionsParameter": "states",
            "initialParameter": "initialState",
            "allowedTransitionsField": "allowed_transitions",
            "requireReasonParameter": "requireTransitionReason"
          }
        },
        {
          "component": "CancellationForm",
          "position": "top",
          "props": {
            "reasonField": "cancellation_reason",
            "codeField": "cancellation_reason_code",
            "requireReasonParameter": "requireReason",
            "allowedReasonsParameter": "allowedReasons",
            "windowParameter": "cancellationWindowHours"
          }
        }
      ],
      "card": [
        {
          "component": "StatusBadge",
          "position": "before",
          "props": {
            "field": "status",
            "variant": "subtle"
          }
        },
        {
          "component": "PriceBadge",
          "position": "after",
          "props": {
            "amountField": "unit_amount_cents",
            "currencyField": "currency"
          }
        },
        {
          "component": "ArchivePill",
          "position": "before",
          "props": {
            "field": "is_archived",
            "archivedAtField": "archived_at",
            "hideWhenFalse": true
          }
        }
      ]
    },
    "tokens": {
      "status.state.default.bg": "var(--status-neutral-bg)",
      "status.state.default.text": "var(--status-neutral-text)",
      "status.timeline.connector": "var(--border-subtle)",
      "status.timeline.node.bg": "var(--sys-surface-raised)",
      "status.timeline.node.border": "var(--sys-border-default)",
      "status.timeline.actor.text": "var(--sys-text-secondary)",
      "status.timeline.reason.text": "var(--sys-text-tertiary)",
      "status.timeline.reason.bg": "var(--sys-surface-neutral)",
      "audit.created.badge.text": "var(--text-subtle)",
      "audit.updated.badge.text": "var(--text-subtle)",
      "audit.event.badge.bg": "var(--surface-muted)",
      "commerce.price.text": "var(--text-strong)",
      "commerce.price.badge.bg": "var(--surface-accent)",
      "commerce.pricing.model.text": "var(--text-default)",
      "status.cancel.primary.bg": "var(--status-cancel-bg)",
      "status.cancel.primary.text": "var(--status-cancel-text)",
      "status.cancel.reason.text": "var(--text-default)",
      "status.cancel.timestamp.text": "var(--text-subtle)",
      "status.archive.primary.bg": "var(--status-archive-bg)",
      "status.archive.primary.text": "var(--status-archive-text)",
      "status.archive.primary.border": "var(--sys-border-default)",
      "status.archive.timestamp.text": "var(--text-subtle)",
      "status.archive.reason.text": "var(--text-default)",
      "status.archive.reason.bg": "var(--sys-surface-neutral)",
      "status.archive.overlay.bg": "var(--sys-surface-disabled)",
      "status.archive.overlay.opacity": "0.6",
      "status.archive.actor.text": "var(--sys-text-secondary)",
      "status.archive.compliance.badge.bg": "var(--sys-status-info-surface)",
      "status.archive.compliance.badge.text": "var(--sys-status-info-text)",
      "commerce.transaction.id": "var(--text-strong)",
      "commerce.transaction.channel.partner": "var(--status-info)",
      "risk.score.primary": "var(--status-warning)"
    },
    "warnings": [],
    "filePath": "~/.oods-foundry/runtime/0.18.0-2b9c3aa471be/objects/core/Transaction.object.yaml",
    "source": "shipped"
  },
  {
    "name": "Usage",
    "version": "1.0.0",
    "domain": "saas.billing",
    "description": "Metered usage snapshot for consumption based billing supporting trend analysis and overage forecasting.",
    "tags": [
      "billing",
      "usage",
      "analytics"
    ],
    "maturity": "beta",
    "traits": [
      {
        "name": "SaaSBillingMetered",
        "alias": "MeterReading",
        "parameters": {
          "unit": "api_calls",
          "rolloverStrategy": "expire",
          "sampleWindowDays": 7
        }
      },
      {
        "name": "lifecycle/Timestampable",
        "alias": "UsageAudit",
        "parameters": {
          "recordedEvents": [
            "reading_captured",
            "anomaly_detected",
            "reset"
          ],
          "timezone": "UTC",
          "allowNullUpdatedAt": true
        }
      },
      {
        "name": "viz/MarkLine",
        "alias": null,
        "parameters": {
          "title": "Usage readings",
          "description": "Readings recorded for this meter, by the time each was taken.",
          "chart": {
            "chartType": "line",
            "source": "record-array",
            "dataField": "samples",
            "encodings": {
              "x": {
                "field": "timestamp",
                "scale": "temporal",
                "title": "Recorded at"
              },
              "y": {
                "field": "value",
                "titleField": "unit_label"
              }
            },
            "sampleRows": [
              {
                "timestamp": "2025-06-15T00:00:00Z",
                "value": 1200
              },
              {
                "timestamp": "2025-06-20T00:00:00Z",
                "value": 1800
              },
              {
                "timestamp": "2025-06-25T00:00:00Z",
                "value": 1500
              }
            ]
          }
        }
      }
    ],
    "relationships": [
      {
        "target": "Subscription",
        "via": "subscription_id",
        "cardinality": "many-to-one",
        "label": "Subscription"
      }
    ],
    "schema": {
      "meter_name": {
        "type": "string",
        "required": true,
        "description": "Friendly metered feature name shown in UI (ex: Analytics Seats)."
      },
      "included_quantity": {
        "type": "integer",
        "required": true,
        "description": "Quantity included in base plan before overages."
      },
      "consumed_quantity": {
        "type": "integer",
        "required": true,
        "description": "Actual quantity consumed in the active period."
      },
      "unit_label": {
        "type": "string",
        "required": true,
        "description": "Label for display, defaults to the unit parameter.",
        "defaultFromParameter": "unit"
      },
      "period_start": {
        "type": "date",
        "required": true,
        "description": "Date the usage accumulation window began."
      },
      "period_end": {
        "type": "date",
        "required": true,
        "description": "Date the usage accumulation window ends."
      },
      "rollover_strategy": {
        "type": "string",
        "required": false,
        "description": "Strategy for unused units (inherits rolloverStrategy parameter).",
        "defaultFromParameter": "rolloverStrategy"
      },
      "overage_rate_minor": {
        "type": "integer",
        "required": false,
        "description": "Cost per additional unit expressed in minor currency units."
      },
      "projected_overage_minor": {
        "type": "integer",
        "required": false,
        "description": "Forecasted overage spend derived from consumption trends."
      },
      "samples": {
        "type": "UsageSample[]",
        "required": false,
        "description": "Rolling usage measurements for charts or anomaly detection.",
        "default": []
      },
      "created_at": {
        "type": "datetime",
        "required": true,
        "description": "Timestamp recording when the entity was first created."
      },
      "updated_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the most recent modification, when available."
      },
      "last_event": {
        "type": "string",
        "required": true,
        "description": "Lifecycle event associated with the most recent timestamp mutation.",
        "validation": {
          "enumFromParameter": "recordedEvents"
        }
      },
      "last_event_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the lifecycle event captured in last_event."
      },
      "usage_id": {
        "type": "string",
        "required": true,
        "description": "Identifier for this usage record."
      },
      "subscription_id": {
        "type": "string",
        "required": true,
        "description": "Subscription the usage belongs to."
      },
      "customer_name": {
        "type": "string",
        "required": false,
        "description": "Customer account the usage is billed to."
      },
      "meter_id": {
        "type": "string",
        "required": true,
        "description": "Provider specific meter identifier."
      },
      "provider": {
        "type": "string",
        "required": true,
        "description": "Source provider for usage data."
      },
      "status": {
        "type": "string",
        "required": false,
        "description": "Health of the usage feed (ok, delayed, investigating).",
        "default": "ok",
        "validation": {
          "enum": [
            "ok",
            "delayed",
            "investigating"
          ]
        }
      },
      "trend_percent": {
        "type": "number",
        "required": false,
        "description": "Percent delta compared to previous window."
      },
      "currency": {
        "type": "string",
        "required": false,
        "description": "ISO 4217 currency the usage is billed in, the subscription's currency."
      },
      "variance_minor": {
        "type": "integer",
        "required": false,
        "description": "Currency impact of usage variance calculated with overage rate."
      },
      "last_reported_at": {
        "type": "datetime",
        "required": true,
        "description": "Timestamp of the most recent provider usage payload."
      },
      "anomalies": {
        "type": "UsageAnomaly[]",
        "required": false,
        "description": "Detected anomalies with context for investigation.",
        "default": []
      }
    },
    "semantics": {
      "meter_name": {
        "semantic_type": "text.label",
        "token_mapping": "tokenMap(billing.usage.meter_name)"
      },
      "included_quantity": {
        "semantic_type": "billing.usage.included_quantity",
        "token_mapping": "tokenMap(billing.usage.included_quantity)",
        "ui_hints": {
          "format": "quantity"
        }
      },
      "consumed_quantity": {
        "semantic_type": "billing.usage.consumed_quantity",
        "token_mapping": "tokenMap(billing.usage.consumed_quantity)",
        "ui_hints": {
          "format": "quantity"
        }
      },
      "unit_label": {
        "semantic_type": "billing.usage.unit_label",
        "token_mapping": "tokenMap(billing.usage.unit_label)"
      },
      "period_start": {
        "semantic_type": "billing.usage.period_start",
        "token_mapping": "tokenMap(billing.usage.period_start)"
      },
      "period_end": {
        "semantic_type": "billing.usage.period_end",
        "token_mapping": "tokenMap(billing.usage.period_end)"
      },
      "rollover_strategy": {
        "semantic_type": "billing.usage.rollover_strategy",
        "token_mapping": "tokenMap(billing.usage.rollover_strategy)"
      },
      "overage_rate_minor": {
        "semantic_type": "billing.usage.overage_rate_minor",
        "token_mapping": "tokenMap(billing.usage.overage_rate_minor)",
        "ui_hints": {
          "component": "CurrencyAmount",
          "currencyField": "currency",
          "minorUnits": 100
        }
      },
      "projected_overage_minor": {
        "semantic_type": "billing.usage.projected_overage_minor",
        "token_mapping": "tokenMap(billing.usage.projected_overage_minor)",
        "ui_hints": {
          "component": "CurrencyAmount",
          "currencyField": "currency",
          "minorUnits": 100
        }
      },
      "samples": {
        "semantic_type": "billing.usage.samples",
        "token_mapping": "tokenMap(billing.usage.samples)"
      },
      "created_at": {
        "semantic_type": "audit.created_at",
        "token_mapping": "tokenMap(audit.created)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "updated_at": {
        "semantic_type": "audit.updated_at",
        "token_mapping": "tokenMap(audit.updated)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone",
          "allowNullParameter": "allowNullUpdatedAt"
        }
      },
      "last_event": {
        "semantic_type": "audit.event.type",
        "token_mapping": "tokenMap(audit.event.*)",
        "ui_hints": {
          "component": "AuditBadge",
          "parameterSource": "recordedEvents"
        }
      },
      "last_event_at": {
        "semantic_type": "audit.event.timestamp",
        "token_mapping": "tokenMap(audit.event.timestamp)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "usage_id": {
        "semantic_type": "billing.usage.id",
        "token_mapping": "tokenMap(billing.usage.id)"
      },
      "subscription_id": {
        "semantic_type": "billing.usage.subscription_id",
        "token_mapping": "tokenMap(billing.usage.subscription_id)"
      },
      "customer_name": {
        "semantic_type": "text.summary",
        "token_mapping": "tokenMap(billing.usage.customer_name)"
      },
      "meter_id": {
        "semantic_type": "billing.usage.meter_id",
        "token_mapping": "tokenMap(billing.usage.meter_id)"
      },
      "provider": {
        "semantic_type": "billing.usage.provider",
        "token_mapping": "tokenMap(billing.usage.provider)"
      },
      "status": {
        "semantic_type": "billing.usage.status",
        "token_mapping": "tokenMap(billing.usage.status)"
      },
      "trend_percent": {
        "semantic_type": "billing.usage.trend_percent",
        "token_mapping": "tokenMap(billing.usage.trend_percent)",
        "ui_hints": {
          "format": "percent"
        }
      },
      "currency": {
        "semantic_type": "billing.usage.currency",
        "token_mapping": "tokenMap(billing.usage.currency)"
      },
      "variance_minor": {
        "semantic_type": "billing.usage.variance_minor",
        "token_mapping": "tokenMap(billing.usage.variance_minor)",
        "ui_hints": {
          "component": "CurrencyAmount",
          "currencyField": "currency",
          "minorUnits": 100
        }
      },
      "last_reported_at": {
        "semantic_type": "billing.usage.last_reported_at",
        "token_mapping": "tokenMap(billing.usage.last_reported_at)"
      },
      "anomalies": {
        "semantic_type": "billing.usage.anomalies",
        "token_mapping": "tokenMap(billing.usage.anomalies)"
      }
    },
    "viewExtensions": {
      "detail": [
        {
          "component": "VizLinePreview",
          "position": "top",
          "priority": 55,
          "props": {
            "chart": {
              "chartType": "line",
              "source": "record-array",
              "dataField": "samples",
              "encodings": {
                "x": {
                  "field": "timestamp",
                  "scale": "temporal",
                  "title": "Recorded at"
                },
                "y": {
                  "field": "value",
                  "titleField": "unit_label"
                }
              },
              "sampleRows": [
                {
                  "timestamp": "2025-06-15T00:00:00Z",
                  "value": 1200
                },
                {
                  "timestamp": "2025-06-20T00:00:00Z",
                  "value": 1800
                },
                {
                  "timestamp": "2025-06-25T00:00:00Z",
                  "value": 1500
                }
              ]
            },
            "title": "Usage readings",
            "description": "Readings recorded for this meter, by the time each was taken."
          }
        },
        {
          "component": "AuditTimeline",
          "position": "bottom",
          "props": {
            "createdField": "created_at",
            "updatedField": "updated_at",
            "eventField": "last_event",
            "eventTimestampField": "last_event_at",
            "eventOptionsParameter": "recordedEvents"
          }
        }
      ],
      "list": [
        {
          "component": "RelativeTimestamp",
          "props": {
            "field": "updated_at",
            "fallbackField": "created_at",
            "timezoneParameter": "timezone"
          }
        }
      ],
      "dashboard": [
        {
          "component": "VizLinePreview",
          "position": "top",
          "priority": 55,
          "props": {
            "chart": {
              "chartType": "line",
              "source": "record-array",
              "dataField": "samples",
              "encodings": {
                "x": {
                  "field": "timestamp",
                  "scale": "temporal",
                  "title": "Recorded at"
                },
                "y": {
                  "field": "value",
                  "titleField": "unit_label"
                }
              },
              "sampleRows": [
                {
                  "timestamp": "2025-06-15T00:00:00Z",
                  "value": 1200
                },
                {
                  "timestamp": "2025-06-20T00:00:00Z",
                  "value": 1800
                },
                {
                  "timestamp": "2025-06-25T00:00:00Z",
                  "value": 1500
                }
              ]
            },
            "title": "Usage readings",
            "description": "Readings recorded for this meter, by the time each was taken."
          }
        }
      ]
    },
    "tokens": {
      "billing.usage.meter_name": "var(--cmp-text-strong)",
      "billing.usage.consumed_quantity": "var(--cmp-text-accent)",
      "billing.usage.projected_overage_minor": "var(--cmp-text-warning)",
      "audit.created.badge.text": "var(--text-subtle)",
      "audit.updated.badge.text": "var(--text-subtle)",
      "audit.event.badge.bg": "var(--surface-muted)",
      "viz.mark.line.stroke.default": "var(--cmp-viz-mark-line-stroke)",
      "viz.mark.line.stroke.highlight": "var(--cmp-viz-mark-line-highlight)",
      "viz.mark.line.marker.fill": "var(--cmp-viz-mark-point-fill)",
      "billing.usage.status.ok": "var(--cmp-badge-text-success)",
      "billing.usage.status.delayed": "var(--cmp-badge-text-warning)",
      "billing.usage.status.investigating": "var(--cmp-badge-text-critical)",
      "billing.usage.trend_percent": "var(--cmp-text-accent)"
    },
    "warnings": [],
    "filePath": "~/.oods-foundry/runtime/0.18.0-2b9c3aa471be/domains/saas-billing/objects/Usage.object.yaml",
    "source": "shipped"
  },
  {
    "name": "User",
    "version": "1.5.1",
    "domain": "core.identity",
    "description": "Canonical identity record representing a platform user across lifecycle contexts.",
    "tags": [
      "universal",
      "identity",
      "core"
    ],
    "maturity": "stable",
    "traits": [
      {
        "name": "core/Actor",
        "alias": null,
        "parameters": {
          "kind": "person"
        }
      },
      {
        "name": "lifecycle/Stateful",
        "alias": "UserLifecycle",
        "parameters": {
          "states": [
            "invited",
            "active",
            "suspended",
            "deactivated"
          ],
          "initialState": "active"
        }
      },
      {
        "name": "lifecycle/Timestampable",
        "alias": "AuditTrail",
        "parameters": {
          "recordedEvents": [
            "created",
            "profile_updated",
            "status_changed",
            "role_updated"
          ],
          "timezone": "UTC",
          "allowNullUpdatedAt": false
        }
      },
      {
        "name": "behavioral/Taggable",
        "alias": "AffinityTags",
        "parameters": {
          "maxTags": 12,
          "allowCustomTags": false,
          "allowedTags": [
            "admin",
            "beta_tester",
            "vip",
            "suspended"
          ],
          "caseSensitive": false
        }
      },
      {
        "name": "core/Addressable",
        "alias": "UserAddresses",
        "parameters": {
          "roles": [
            "home",
            "billing",
            "shipping"
          ],
          "defaultRole": "home"
        }
      },
      {
        "name": "core/Preferenceable",
        "alias": "UserPreferences",
        "parameters": {
          "namespaces": [
            "theme",
            "notifications",
            "display",
            "privacy"
          ],
          "schemaVersion": "2.0.0",
          "registryNamespace": "user-preferences"
        }
      },
      {
        "name": "core/Authable",
        "alias": "UserAuthz",
        "parameters": {
          "hierarchyDepthLimit": 5
        }
      },
      {
        "name": "core/Communicable",
        "alias": "UserCommunications",
        "parameters": null
      }
    ],
    "schema": {
      "status": {
        "type": "string",
        "required": true,
        "description": "Canonical lifecycle state derived from the states parameter. This is the single source\nof truth for the entity's current lifecycle position. Consumed by Colorized to resolve\nvisual tokens, and by view extensions to render StatusBadge and StatusTimeline.\n",
        "validation": {
          "enumFromParameter": "states"
        }
      },
      "state_history": {
        "type": "StateTransition[]",
        "required": false,
        "description": "Chronological log of state transitions. Each entry records the before/after states,\ntimestamp, and (when governance is enabled) the actor, reason, and transition metadata.\nRendered by StatusTimeline in the detail and timeline views.\n\nEntry structure:\n  - from: string (previous state)\n  - to: string (new state)\n  - timestamp: ISO 8601 datetime\n  - actor_id: string (user/system who triggered the transition, optional)\n  - reason: string (human-readable justification, required when requireTransitionReason is true)\n  - transition_metadata: Record<string, unknown> (arbitrary context, optional)\n\nEvery recorded change can name who acted, who it acted for and who approved it. All optional,\nfollowing Relationship's source_id/source_name pattern; only a *_name names a party, and an entry that names\nno one renders as it always has:\n  - actor_name: string (who acted, as shown: \"Billing Agent\")\n  - actor_kind: string (person, agent or system: the Actor trait's kinds)\n  - on_behalf_of_name / on_behalf_of_id: string (the person or organization it acted for)\n  - approved_by_name / approved_by_id: string (who approved the change, when someone did)\nStatusTimeline then reads \"Billing Agent for Tidewater Co-op · approved by Ruth Adeyemi\".\n\nA change someone approved can also say which approval it belongs to and what level of yes it was. Both\noptional; the id stays in the record's data, a pointer and not a link, and an entry without them renders as it\nalways has:\n  - approval_id: string (the Approval record the yes is kept in)\n  - approval_level: string (the level of yes, one of the levels the product declares: \"approval\")\nStatusTimeline then reads \"Billing Agent for Tidewater Co-op · approved by Ruth Adeyemi (level: Approval)\".\n\nA change made as part of a task can also say which task it was. Both optional; the id stays in the record's\ndata, a pointer and not a link, and an entry without them renders as it always has:\n  - task_id: string (the Task record the change was made under)\n  - task_name: string (the task, as shown: \"Get INV-2026-0155 paid\")\nStatusTimeline then reads \"… · approved by Ruth Adeyemi (level: Approval) · task: Get INV-2026-0155 paid\".\n\nA change made under a grant, the standing yes an actor acts under for a person or organization, can also say\nwhich grant it was. Both optional; the id stays in the record's data, a pointer and not a link, and an entry\nwithout them renders as it always has:\n  - grant_id: string (the Grant record the change was made under)\n  - grant_name: string (the grant, as shown: \"Resend returned transfers\")\nStatusTimeline names the grant after any approval and before the task: \"Billing Agent for Tidewater Co-op ·\ngrant: Resend returned transfers\".\n",
        "default": []
      },
      "allowed_transitions": {
        "type": "string[]",
        "required": false,
        "description": "Materialized list of the next states the product allows from the current status, written\nby the product from the transitionRules parameter. When transitionRules is null (open model),\nthis contains all states except the current one. The detail page's StatusTimeline lists it\nwhen the record holds it. A generated StatusSelector reads transitionRules instead: it offers the\ncurrent state and the moves the order allows (every state where no order is declared).\n",
        "default": []
      },
      "created_at": {
        "type": "datetime",
        "required": true,
        "description": "Timestamp recording when the entity was first created."
      },
      "updated_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the most recent modification, when available."
      },
      "last_event": {
        "type": "string",
        "required": true,
        "description": "Lifecycle event associated with the most recent timestamp mutation.",
        "validation": {
          "enumFromParameter": "recordedEvents"
        }
      },
      "last_event_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the lifecycle event captured in last_event."
      },
      "tags": {
        "type": "string[]",
        "required": false,
        "description": "Ordered list of tags assigned to the entity.",
        "default": [],
        "validation": {
          "maxItems": 64
        }
      },
      "tag_count": {
        "type": "number",
        "required": true,
        "description": "Computed number of tags assigned to the entity.",
        "default": 0,
        "validation": {
          "minimum": 0
        }
      },
      "tag_metadata": {
        "type": "object[]",
        "required": false,
        "description": "Per-tag governance metadata. Each entry corresponds to a tag in the tags array and\ntracks provenance and usage for taxonomy health monitoring.\n\nEntry structure:\n  - tag: string (the tag value, matches entry in tags array)\n  - created_at: ISO 8601 datetime\n  - created_by: string (user ID or \"system\" for allow-list tags)\n  - usage_count: number (how many entities use this tag, computed)\n  - moderation_status: \"approved\" | \"pending\" | \"rejected\" (when allowTagModeration is true)\n  - canonical_form: string (resolved synonym target, when synonymResolution is enabled)\n",
        "default": []
      },
      "address_roles": {
        "type": "string[]",
        "required": true,
        "description": "Ordered list of roles that currently have address entries.",
        "default": []
      },
      "default_address_role": {
        "type": "string",
        "required": false,
        "description": "Role surfaced in UI contexts when one address must be highlighted.",
        "validation": {
          "enumFromParameter": "roles"
        }
      },
      "addresses": {
        "type": "AddressableEntry[]",
        "required": false,
        "description": "Collection of { role, address, metadata } entries keyed by role.",
        "default": []
      },
      "preference_document": {
        "type": "PreferenceDocument",
        "required": true,
        "description": "Normalized preference payload captured by PreferenceStore (version, preferences map, metadata).",
        "default": {
          "version": "1.0.0",
          "preferences": {
            "theme": {
              "mode": "system"
            },
            "notifications": {
              "mention": {
                "email": true,
                "push": true
              }
            }
          },
          "metadata": {
            "schemaVersion": "1.0.0",
            "lastUpdated": "2025-11-18T00:00:00Z",
            "source": "system",
            "migrationApplied": []
          }
        }
      },
      "preference_metadata": {
        "type": "PreferenceMetadata",
        "required": true,
        "description": "Tracks schema version, lastUpdated timestamp, migration records, and source."
      },
      "preference_version": {
        "defaultFromParameter": "schemaVersion",
        "type": "string",
        "required": true,
        "description": "SemVer mirror of preference_document.version for indexing and analytics.",
        "validation": {
          "pattern": "^\\d+\\.\\d+\\.\\d+$"
        }
      },
      "preference_namespaces": {
        "defaultFromParameter": "namespaces",
        "type": "string[]",
        "required": true,
        "description": "Materialized namespace list resolved from parameters/registry for auditing.",
        "default": [
          "theme",
          "notifications",
          "display"
        ]
      },
      "preference_mutations": {
        "type": "number",
        "required": false,
        "description": "Monotonic counter incremented whenever preferences mutate (invalidates caches).",
        "default": 0,
        "validation": {
          "minimum": 0
        }
      },
      "role_catalog": {
        "type": "AuthzRoleDocument[]",
        "required": true,
        "description": "Canonical RBAC roles (R21.2 Part 4.2 TABLE 1).",
        "examples": [
          [
            {
              "id": "11111111-1111-4111-8111-111111111111",
              "name": "Owner",
              "description": "Full tenant access + invoice approval (R21.2 Table 1)."
            },
            {
              "id": "22222222-2222-4222-8222-222222222222",
              "name": "Approver",
              "description": "Workflow approver for compliance-sensitive documents."
            },
            {
              "id": "33333333-3333-4333-8333-333333333333",
              "name": "Editor",
              "description": "Contributor allowed to create + update documents in scope."
            }
          ]
        ],
        "default": []
      },
      "permission_catalog": {
        "type": "AuthzPermissionDocument[]",
        "required": true,
        "description": "Atomic permissions following resource:action notation (TABLE 2).",
        "default": []
      },
      "role_permissions": {
        "type": "Record<string, string[]>",
        "required": true,
        "description": "Junction map for role→permission edges (TABLE 3).",
        "default": {}
      },
      "membership_records": {
        "type": "AuthzMembershipDocument[]",
        "required": true,
        "description": "SaaS membership triple (member, organization_id, role_id) with UNIQUE constraint (TABLE 4). The member is a user (user_id) or any other actor (actor_id with actor_kind, such as an agent), exactly one of the two.",
        "default": []
      },
      "role_hierarchy_edges": {
        "type": "AuthzRoleHierarchyEdge[]",
        "required": false,
        "description": "Parent→child adjacency list for hierarchical RBAC (Part 3.1).",
        "default": []
      },
      "session_roles": {
        "type": "string[]",
        "required": false,
        "description": "Materialized roles granted within the current session/token exchange.",
        "default": []
      },
      "channel_catalog": {
        "type": "Channel[]",
        "required": true,
        "description": "Provider configuration for each channel (SMTP/Twilio/FCM/Webhook).",
        "examples": [
          [
            {
              "id": "44444444-dddd-4ddd-8ddd-dddddddddddd",
              "name": "Primary Email (SMTP)",
              "type": "email"
            },
            {
              "id": "55555555-eeee-4eee-8eee-eeeeeeeeeeee",
              "name": "Twilio SMS",
              "type": "sms"
            },
            {
              "id": "66666666-ffff-4fff-8fff-ffffffffffff",
              "name": "FCM Push",
              "type": "push"
            },
            {
              "id": "77777777-0000-4000-8000-000000000000",
              "name": "Realtime In-App",
              "type": "in_app"
            }
          ]
        ],
        "default": []
      },
      "template_catalog": {
        "type": "Template[]",
        "required": true,
        "description": "Localized template definitions with declared variables per R20.1 Part 2.3.",
        "examples": [
          [
            {
              "id": "88888888-1111-4111-8111-111111111111",
              "name": "Welcome Email",
              "channelType": "email",
              "subject": "Welcome to OODS Foundry, {{firstName}}!",
              "body": "Hi {{firstName}},\n\nThanks for joining {{workspaceName}}. Activate your account using {{activationLink}}.",
              "variables": [
                "firstName",
                "workspaceName",
                "activationLink"
              ],
              "locale": "en-US"
            },
            {
              "id": "99999999-2222-4222-8222-222222222222",
              "name": "Password Reset Email",
              "channelType": "email",
              "subject": "Reset your OODS Foundry password",
              "body": "Hello {{firstName}},\n\nWe received a request to reset your password. Use this code: {{resetCode}}.",
              "variables": [
                "firstName",
                "resetCode"
              ],
              "locale": "en-US"
            },
            {
              "id": "aaaaaaa1-3333-4333-8333-333333333333",
              "name": "In-App Notification",
              "channelType": "in_app",
              "subject": "New document shared with you",
              "body": "{{actorName}} shared \"{{documentName}}\" with you. Review it before {{dueDate}}.",
              "variables": [
                "actorName",
                "documentName",
                "dueDate"
              ],
              "locale": "en-US"
            }
          ]
        ],
        "default": []
      },
      "delivery_policies": {
        "type": "DeliveryPolicy[]",
        "required": true,
        "description": "Retry/throttle/quiet-hour policies (R20.1 Part 3 lifecycle).",
        "default": []
      },
      "messages": {
        "type": "Message[]",
        "required": false,
        "description": "Atomic message payloads queued for delivery (R20.6 Part 1.2 primitives).",
        "default": []
      },
      "conversations": {
        "type": "Conversation[]",
        "required": false,
        "description": "Multi-party threaded conversations with membership metadata (R20.6 Part 3.3).",
        "default": []
      },
      "message_statuses": {
        "type": "MessageStatusEntry[]",
        "required": false,
        "description": "Delivery state machine transitions (queued → sent → delivered → failed → retried → read).",
        "default": []
      },
      "user_id": {
        "type": "uuid",
        "required": true,
        "description": "Primary identifier used to correlate identity across services."
      },
      "name": {
        "type": "string",
        "required": true,
        "description": "Human-friendly name rendered in headers and list contexts.",
        "validation": {
          "minLength": 1,
          "maxLength": 120
        }
      },
      "preferred_name": {
        "type": "string",
        "required": false,
        "description": "Preferred display name surfaced in collaborative tooling."
      },
      "description": {
        "type": "string",
        "required": false,
        "description": "Supporting summary rendered in detail and card contexts.",
        "validation": {
          "maxLength": 160
        }
      },
      "primary_email": {
        "type": "email",
        "required": true,
        "description": "Canonical login email address for the user."
      },
      "role": {
        "type": "string",
        "required": true,
        "default": "end_user",
        "description": "Highest privilege role currently granted to the user.",
        "validation": {
          "enum": [
            "end_user",
            "admin",
            "owner",
            "billing"
          ]
        }
      },
      "timezone": {
        "type": "string",
        "required": false,
        "default": "UTC",
        "description": "The person's preferred time zone, kept for your product. Screens show times in UTC, and a shown date-time says so, as a date-time input's label does."
      }
    },
    "semantics": {
      "status": {
        "semantic_type": "status.state",
        "token_mapping": "tokenMap(status.state.*)",
        "ui_hints": {
          "component": "StatusBadge",
          "showIcon": true
        }
      },
      "state_history": {
        "semantic_type": "timeline.state_transition",
        "token_mapping": "tokenMap(timeline.status.*)",
        "ui_hints": {
          "component": "StatusTimeline",
          "collapseWhenEmpty": true
        }
      },
      "allowed_transitions": {
        "semantic_type": "status.navigation",
        "token_mapping": "computed",
        "ui_hints": {
          "component": "StatusSelector",
          "description": "The next states the product allows, as the product writes them; listed on the detail page, never used to disable an option."
        }
      },
      "created_at": {
        "semantic_type": "audit.created_at",
        "token_mapping": "tokenMap(audit.created)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "updated_at": {
        "semantic_type": "audit.updated_at",
        "token_mapping": "tokenMap(audit.updated)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone",
          "allowNullParameter": "allowNullUpdatedAt"
        }
      },
      "last_event": {
        "semantic_type": "audit.event.type",
        "token_mapping": "tokenMap(audit.event.*)",
        "ui_hints": {
          "component": "AuditBadge",
          "parameterSource": "recordedEvents"
        }
      },
      "last_event_at": {
        "semantic_type": "audit.event.timestamp",
        "token_mapping": "tokenMap(audit.event.timestamp)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "tags": {
        "semantic_type": "taxonomy.tag.collection",
        "token_mapping": "tokenMap(taxonomy.tag.*)",
        "ui_hints": {
          "component": "TagCollection",
          "allowCreateParameter": "allowCustomTags",
          "allowListParameter": "allowedTags",
          "caseSensitiveParameter": "caseSensitive"
        }
      },
      "tag_count": {
        "semantic_type": "metric.collection.count",
        "token_mapping": "tokenMap(taxonomy.tag.count)",
        "ui_hints": {
          "component": "MetricBadge",
          "format": "integer"
        }
      },
      "tag_metadata": {
        "semantic_type": "taxonomy.tag.governance",
        "token_mapping": "computed",
        "ui_hints": {
          "component": "TagGovernancePanel",
          "description": "Admin panel for reviewing tag health, moderation queue, and synonym resolution."
        }
      },
      "addresses": {
        "semantic_type": "location.address.collection",
        "token_mapping": "tokenMap(location.address.collection)",
        "ui_hints": {
          "component": "AddressCollection",
          "roleParameter": "roles",
          "defaultRoleField": "default_address_role"
        }
      },
      "default_address_role": {
        "semantic_type": "location.address.default_role",
        "token_mapping": "tokenMap(location.address.default_role)",
        "ui_hints": {
          "component": "AddressRoleBadge",
          "parameterSource": "defaultRole"
        }
      },
      "address_roles": {
        "semantic_type": "location.address.roles",
        "token_mapping": "tokenMap(location.address.roles)",
        "ui_hints": {
          "component": "AddressRolePills"
        }
      },
      "preference_document": {
        "semantic_type": "preferences.document",
        "token_mapping": "tokenMap(preferences.document)",
        "ui_hints": {
          "component": "PreferenceDiffPanel",
          "registryNamespaceParameter": "registryNamespace"
        }
      },
      "preference_metadata": {
        "semantic_type": "preferences.metadata",
        "token_mapping": "tokenMap(preferences.metadata)",
        "ui_hints": {
          "component": "PreferenceDiagnostics"
        }
      },
      "preference_version": {
        "semantic_type": "preferences.version",
        "token_mapping": "tokenMap(preferences.version)",
        "ui_hints": {
          "component": "PreferenceVersionBadge"
        }
      },
      "preference_namespaces": {
        "semantic_type": "preferences.namespaces",
        "token_mapping": "tokenMap(preferences.namespaces)",
        "ui_hints": {
          "component": "PreferenceNamespaceChips"
        }
      },
      "membership_records": {
        "semantic_type": "authorization.memberships",
        "token_mapping": "tokenMap(authorization.memberships)",
        "ui_hints": {
          "component": "MembershipMatrix",
          "uniqueConstraint": "user_id|actor_id+organization_id+role_id"
        }
      },
      "role_catalog": {
        "semantic_type": "authorization.roles",
        "token_mapping": "tokenMap(authorization.roles)",
        "ui_hints": {
          "component": "RoleCatalogPanel"
        }
      },
      "permission_catalog": {
        "semantic_type": "authorization.permissions",
        "token_mapping": "tokenMap(authorization.permissions)",
        "ui_hints": {
          "component": "PermissionList"
        }
      },
      "channel_catalog": {
        "semantic_type": "communication.channels",
        "token_mapping": "--sys-communication-accent",
        "ui_hints": {
          "component": "ChannelGrid",
          "badges": "channel_catalog[].type"
        }
      },
      "template_catalog": {
        "semantic_type": "communication.templates",
        "token_mapping": "--sys-communication-muted",
        "ui_hints": {
          "component": "TemplateDrawer",
          "variableBadge": "template_catalog[].variables"
        }
      },
      "delivery_policies": {
        "semantic_type": "communication.delivery_policy",
        "token_mapping": "--sys-communication-accent",
        "ui_hints": {
          "component": "DeliveryPolicyCapsule"
        }
      },
      "messages": {
        "semantic_type": "communication.messages",
        "token_mapping": "--sys-communication-success",
        "ui_hints": {
          "component": "MessageTimeline"
        }
      },
      "conversations": {
        "semantic_type": "communication.conversations",
        "token_mapping": "--sys-communication-accent",
        "ui_hints": {
          "component": "ConversationViewer"
        }
      },
      "user_id": {
        "semantic_type": "identity.user.id",
        "token_mapping": "tokenMap(identity.id.primary)"
      },
      "name": {
        "semantic_type": "identity.user.name",
        "token_mapping": "tokenMap(identity.name.primary)"
      },
      "preferred_name": {
        "semantic_type": "identity.user.name_preferred",
        "token_mapping": "tokenMap(identity.name.preferred)"
      },
      "description": {
        "semantic_type": "text.summary",
        "token_mapping": "tokenMap(identity.description.summary)"
      },
      "primary_email": {
        "semantic_type": "identity.user.email",
        "token_mapping": "tokenMap(identity.email.primary)"
      },
      "role": {
        "semantic_type": "identity.user.role",
        "token_mapping": "tokenMap(identity.role.*)"
      },
      "timezone": {
        "semantic_type": "identity.user.timezone",
        "token_mapping": "tokenMap(identity.timezone.primary)"
      }
    },
    "viewExtensions": {
      "list": [
        {
          "component": "MessageStatusBadge",
          "position": "before",
          "priority": 90,
          "props": {
            "statusesField": "message_statuses"
          }
        },
        {
          "component": "StatusBadge",
          "props": {
            "field": "status",
            "tone": "lifecycle"
          }
        },
        {
          "component": "RelativeTimestamp",
          "props": {
            "field": "updated_at",
            "fallbackField": "created_at",
            "timezoneParameter": "timezone"
          }
        },
        {
          "component": "TagPills",
          "props": {
            "field": "tags",
            "maxVisible": 3,
            "overflowLabel": "+{{ tag_count }}"
          }
        },
        {
          "component": "AddressSummaryBadge",
          "position": "after",
          "props": {
            "field": "default_address_role"
          }
        },
        {
          "component": "PreferenceSummaryBadge",
          "position": "after",
          "props": {
            "namespacesField": "preference_namespaces",
            "versionField": "preference_version"
          }
        },
        {
          "component": "RoleBadgeList",
          "position": "after",
          "props": {
            "rolesField": "session_roles",
            "fallbackRoleParameter": "defaultRoleId"
          }
        }
      ],
      "detail": [
        {
          "component": "CommunicationDetailPanel",
          "position": "main",
          "priority": 80,
          "props": {
            "channelsField": "channel_catalog",
            "templatesField": "template_catalog",
            "policiesField": "delivery_policies",
            "conversationsField": "conversations"
          }
        },
        {
          "component": "MembershipPanel",
          "position": "main",
          "priority": 75,
          "props": {
            "membershipsField": "membership_records",
            "hierarchyField": "role_hierarchy_edges",
            "roleField": "role_catalog",
            "permissionField": "permission_catalog"
          }
        },
        {
          "component": "AddressCollectionPanel",
          "position": "main",
          "priority": 60,
          "props": {
            "field": "addresses",
            "roleField": "address_roles",
            "defaultRoleField": "default_address_role",
            "roleParameter": "roles"
          }
        },
        {
          "component": "PreferencePanel",
          "position": "main",
          "priority": 55,
          "props": {
            "preferencesField": "preference_document",
            "metadataField": "preference_metadata",
            "namespaceField": "preference_namespaces"
          }
        },
        {
          "component": "StatusTimeline",
          "position": "top",
          "priority": 40,
          "props": {
            "field": "status",
            "historyField": "state_history",
            "statesParameter": "states",
            "showActorId": true,
            "showReason": true
          }
        },
        {
          "component": "AuditTimeline",
          "position": "bottom",
          "props": {
            "createdField": "created_at",
            "updatedField": "updated_at",
            "eventField": "last_event",
            "eventTimestampField": "last_event_at",
            "eventOptionsParameter": "recordedEvents"
          }
        },
        {
          "component": "TagSummary",
          "position": "top",
          "props": {
            "field": "tags",
            "countField": "tag_count"
          }
        }
      ],
      "form": [
        {
          "component": "StatusSelector",
          "position": "top",
          "props": {
            "field": "status",
            "optionsParameter": "states",
            "initialParameter": "initialState",
            "allowedTransitionsField": "allowed_transitions",
            "requireReasonParameter": "requireTransitionReason"
          }
        },
        {
          "component": "TagInput",
          "position": "top",
          "props": {
            "field": "tags",
            "maxTagsParameter": "maxTags",
            "allowCustomParameter": "allowCustomTags",
            "allowListParameter": "allowedTags",
            "minLengthParameter": "tagMinLength",
            "maxLengthParameter": "tagMaxLength",
            "synonymParameter": "synonymResolution"
          }
        },
        {
          "component": "AddressEditor",
          "position": "top",
          "props": {
            "field": "addresses",
            "roleParameter": "roles",
            "allowDynamicParameter": "allowDynamicRoles",
            "defaultRoleField": "default_address_role"
          }
        },
        {
          "component": "PreferenceEditor",
          "position": "main",
          "props": {
            "namespacesField": "preference_namespaces",
            "documentField": "preference_document",
            "registryNamespaceParameter": "registryNamespace"
          }
        },
        {
          "component": "RoleAssignmentForm",
          "position": "main",
          "props": {
            "availableRolesField": "role_catalog",
            "membershipField": "membership_records",
            "defaultRoleParameter": "defaultRoleId"
          }
        },
        {
          "component": "TemplatePicker",
          "position": "main",
          "props": {
            "templatesField": "template_catalog",
            "channelsField": "channel_catalog"
          }
        }
      ],
      "card": [
        {
          "component": "StatusBadge",
          "position": "before",
          "props": {
            "field": "status",
            "variant": "subtle"
          }
        },
        {
          "component": "TagPills",
          "position": "after",
          "props": {
            "field": "tags",
            "maxVisible": 3,
            "overflowLabel": "+{{ tag_count }}"
          }
        }
      ]
    },
    "tokens": {
      "status.state.default.bg": "var(--status-neutral-bg)",
      "status.state.default.text": "var(--status-neutral-text)",
      "status.timeline.connector": "var(--border-subtle)",
      "status.timeline.node.bg": "var(--sys-surface-raised)",
      "status.timeline.node.border": "var(--sys-border-default)",
      "status.timeline.actor.text": "var(--sys-text-secondary)",
      "status.timeline.reason.text": "var(--sys-text-tertiary)",
      "status.timeline.reason.bg": "var(--sys-surface-neutral)",
      "audit.created.badge.text": "var(--text-subtle)",
      "audit.updated.badge.text": "var(--text-subtle)",
      "audit.event.badge.bg": "var(--surface-muted)",
      "taxonomy.tag.chip.bg": "var(--surface-tag-bg)",
      "taxonomy.tag.chip.text": "var(--surface-tag-text)",
      "taxonomy.tag.chip.border": "var(--sys-border-default)",
      "taxonomy.tag.chip.hover.bg": "var(--sys-surface-hover)",
      "taxonomy.tag.chip.pending.bg": "var(--sys-status-warning-surface)",
      "taxonomy.tag.chip.pending.text": "var(--sys-status-warning-text)",
      "taxonomy.tag.summary.count": "var(--text-subtle)",
      "taxonomy.tag.input.border": "var(--sys-border-default)",
      "taxonomy.tag.input.focus.border": "var(--sys-border-focus)",
      "location.address.card.bg": "var(--sys-surface-raised)",
      "location.address.card.border": "var(--sys-border-subtle)",
      "location.address.role.text": "var(--sys-text-muted)",
      "preferences.panel.bg": "var(--sys-surface-raised)",
      "preferences.panel.border": "var(--sys-border-strong)",
      "preferences.namespace.badge.bg": "var(--sys-surface-muted)",
      "preferences.namespace.badge.text": "var(--sys-text-strong)",
      "auth.roles.badge.bg": "var(--sys-surface-neutral)",
      "auth.roles.badge.text": "var(--sys-text-strong)",
      "auth.membership.card.border": "var(--sys-border-strong)",
      "auth.membership.card.bg": "var(--sys-surface-raised)",
      "communication.card.bg": "var(--sys-surface-raised)",
      "communication.card.border": "var(--sys-communication-muted)",
      "communication.status.success": "var(--sys-communication-success)",
      "communication.status.error": "var(--sys-communication-error)",
      "identity.id.primary": "var(--text-strong)",
      "identity.name.primary": "var(--text-strong)",
      "identity.email.primary": "var(--text-subtle)",
      "identity.role.admin": "var(--status-info)",
      "identity.timezone.primary": "var(--text-muted)",
      "identity.description.summary": "var(--text-subtle)"
    },
    "warnings": [],
    "filePath": "~/.oods-foundry/runtime/0.18.0-2b9c3aa471be/objects/core/User.object.yaml",
    "source": "shipped"
  }
]
