Schema Reference
The authoritative reference for all VhyxSeal types. Interfaces are exact copies from packages/core/src/schema/. Do not modify the schema without leadership approval — all changes must be logged in .claude/decisions.md.
ComponentContract
The core primitive. Describes what a component does, what an agent must verify before interacting, what changes after interaction, and how carefully the agent must proceed.
| Field | Type | Required | Description |
|---|---|---|---|
| id | string | required | Unique identifier for this component on the page |
| type | ComponentType | required | Category of component — how agents interpret it |
| intent | string | required | Machine-readable intent e.g. place-order |
| description | string | required | Human-readable explanation for agent reasoning |
| requires | Condition[] | required | Preconditions that must all be satisfied |
| requiredPermissions | string[] | required | Permission scopes required |
| consequence | string | required | Plain description of what changes after interaction |
| affects | string[] | required | System areas affected e.g. [cart, orders] |
| reversible | boolean | required | Whether the action can be undone |
| reversibleWindow | number | optional | Seconds within which undo is possible |
| safetyLevel | SafetyLevel | required | How carefully the agent must proceed |
| requiresConfirmation | boolean | required | Agent must obtain human approval first |
| destructive | boolean | required | Permanently deletes or modifies data |
| alternatives | string[] | optional | Other component ids with similar function |
| nextExpected | string[] | optional | Component ids typically following this one |
| errorStates | ErrorState[] | optional | Known failure modes and recovery paths |
| contractVersion | string | required | Developer-managed semver e.g. 1.0.0 |
| fingerprint | string | optional | Auto-generated — hash of contract content |
| lastVerified | string | optional | ISO date — when contract was last confirmed |
| verifiedBy | auto | manual | test | optional | How the contract was verified |
| changelog | ContractChangelog[] | optional | History of changes to this contract |
Condition
A precondition that must be satisfied before an agent interacts. Always use abstract field references — never expose internal data structure or database field names.
| Field | Type | Required | Description |
|---|---|---|---|
| field | string | required | Abstract reference e.g. user.hasPaymentMethod — never internal DB field names |
| operator | === | !== | > | < | >= | <= | includes | excludes | required | Comparison operator |
| value | unknown | required | The value to compare against |
| description | string | required | Human-readable e.g. User must have a payment method saved |
ErrorState
A known failure mode for a component and how an agent should recover. Include every failure mode that an agent might encounter.
| Field | Type | Description |
|---|---|---|
| trigger | string | What causes this error e.g. payment declined |
| display | string | What the UI shows e.g. red banner with payment failed message |
| recovery | string | What the agent should do e.g. navigate to update-payment-method |
ComponentType
The five categories of UI component. Determines how agents interpret and interact with a component.
| Value | Use when |
|---|---|
| action | Buttons, triggers — the component causes something to happen |
| input | Forms, search fields, filters — the component collects data |
| navigation | Links, menus, tabs — the component moves to another location |
| display | Read-only content showing current state — agent reads, does not act |
| confirmation | Modals, dialogs — the component gates a decision |
SafetyLevel
Controls how carefully an agent must proceed. Higher levels require explicit human confirmation. When in doubt, choose the higher level.
| Value | Confirmation | Examples |
|---|---|---|
| low | Not required | Search, filter, sort, navigate, sign-out |
| medium | Not required | Send message, save draft, update profile, upload file |
| high | Required | Place order, submit form, publish content, cancel booking |
| critical | Always required | Delete account, make payment, irreversible data changes |
| sensitive | Required | Medical data, financial information, passwords |
Relationship Types
Three relationship types cover all component interactions. Use relationships to describe flows that span multiple components.
CompositionRelationship
Components that belong together structurally. Used when a parent requires specific children to be valid before it can act.
SequenceRelationship
Components with a defined order. Used for multi-step flows like checkout or onboarding where the agent must follow steps in sequence.
DependencyRelationship
One component's state gates another's behavior. Used when filling an input enables a button, or selecting a plan shows additional fields.
Capability
The highest level of abstraction. Agents think in capabilities — not individual components. A capability groups all relationships and components needed to accomplish a user-facing goal.
| Field | Type | Required | Description |
|---|---|---|---|
| id | string | required | Unique capability identifier e.g. purchase-item |
| description | string | required | Human and agent readable description |
| entryPoint | string | required | Component id where the capability starts |
| exitPoints | ExitPoint[] | required | All possible end states (success, failure, cancelled) |
| relationships | CapabilityRelationshipRef[] | required | Relationships that make up this capability |
| estimatedSteps | number | required | Approximate step count — helps agent plan |
| requiresAuth | boolean | required | User must be authenticated |
| safetyLevel | SafetyLevel | required | Highest safety level in the capability chain |
| spanPages | string[] | optional | Routes this capability spans across multiple pages |
VhyxSealManifest
The complete manifest served at /__agent__/manifest.json. Auto-generated — never hand-written. Contains all contracts, relationships, capabilities, and the site's agent access policy.
AgentPolicy
Access policy controlling which agents may act on a site. Site owners set this in SealProvider config. The default policy allows all agents with reasonable rate limits.
| Field | Default | Description |
|---|---|---|
| allowedAgents | ["*"] | Use specific agent identifiers to restrict access |
| blockedAgents | [] | Patterns to explicitly block |
| requireAgentIdentification | false | Agents must identify before acting |
| allowedActions | ["*"] | Restrict to specific intent ids |
| blockedActions | [] | Explicitly blocked intent ids |
| requiresConfirmation | [] | Intent ids always needing human confirmation |
| requiresHumanPresent | [] | Intent ids needing verified human in loop |
| manifestAccess | "public" | Set to private to require bearer token |
RateLimits
Per-agent rate limits. Configured within AgentPolicy.rateLimits. Rate limit enforcement is schema-defined but not yet enforced by VhyxSeal middleware in 1.0.0-rc — see the Security guide for details.
| Field | Default | Description |
|---|---|---|
| actionsPerMinute | 60 | Maximum agent actions per minute |
| actionsPerHour | 500 | Maximum agent actions per hour |
| manifestRequestsPerMinute | 10 | Maximum manifest fetches per minute |
| perAgentSession | true | Apply limits per agent session (true) or globally (false) |