Skip to main content
VhyxSealPlayground

Level 2 — Partial Contract

Specify the fields most relevant to your use case. Preconditions, permissions, and consequences are defined. Agents know what must be true before acting and what changes after.

Button with partial contract — 2 preconditions, 1 permission

PARTIAL — developer specified key fields

  • requires: 2 preconditions (auth + cart items)
  • requiredPermissions: write:orders
  • reversibleWindow: 300s
  • affects: cart, orders

Resulting contract — partial but richer than Level 1

{
  "safetyLevel": "high",
  "reversible": true,
  "requiresConfirmation": true,
  "destructive": false,
  "id": "level-2-checkout-btn",
  "type": "action",
  "intent": "place-order",
  "description": "Submits the current cart as a purchase order",
  "requires": [
    {
      "field": "user.authenticated",
      "operator": "===",
      "value": true,
      "description": "User must be logged in"
    },
    {
      "field": "cart.hasItems",
      "operator": "===",
      "value": true,
      "description": "Cart must have at least one item"
    }
  ],
  "requiredPermissions": [
    "write:orders"
  ],
  "consequence": "Creates order and charges payment method",
  "affects": [
    "cart",
    "orders"
  ],
  "reversibleWindow": 300,
  "contractVersion": "1.0.0",
  "fingerprint": "vhyxs_5968ae39",
  "lastVerified": "2026-10-04T17:10:35.934Z",
  "verifiedBy": "auto"
}