{
  "specification": "RB-OXML-1.0",
  "edition": "1.0",
  "profile": "rbx.ecmascript.1",
  "hooks": [
    {
      "name": "rb.action.before",
      "version": "1.0",
      "kind": "action",
      "scope": "redbook",
      "phase": "precommit",
      "argumentsSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "array",
        "prefixItems": [
          {
            "type": "string",
            "minLength": 1
          },
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/value.schema.json#/$defs/map"
          },
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/execution-context.schema.json"
          }
        ],
        "items": false,
        "minItems": 3
      },
      "resultSchema": null,
      "description": "Observe this defined staged operation point; no mutation through snapshots.",
      "requires": [
        "rbx.ecmascript.1"
      ],
      "failure": "abort dispatch and enclosing precommit operation",
      "authority": "Selected context intersection activation grant; Annex D restrictions apply."
    },
    {
      "name": "rb.action.completed",
      "version": "1.0",
      "kind": "action",
      "scope": "redbook",
      "phase": "precommit",
      "argumentsSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "array",
        "prefixItems": [
          {
            "type": "string",
            "minLength": 1
          },
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/value.schema.json"
          },
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/execution-context.schema.json"
          }
        ],
        "items": false,
        "minItems": 3
      },
      "resultSchema": null,
      "description": "Observe this defined staged operation point; no mutation through snapshots.",
      "requires": [
        "rbx.ecmascript.1"
      ],
      "failure": "abort dispatch and enclosing precommit operation",
      "authority": "Selected context intersection activation grant; Annex D restrictions apply."
    },
    {
      "name": "rb.record.creating",
      "version": "1.0",
      "kind": "action",
      "scope": "redbook",
      "phase": "precommit",
      "argumentsSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "array",
        "prefixItems": [
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/record.schema.json"
          },
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/execution-context.schema.json"
          }
        ],
        "items": false,
        "minItems": 2
      },
      "resultSchema": null,
      "description": "Observe this defined staged operation point; no mutation through snapshots.",
      "requires": [
        "rbx.ecmascript.1"
      ],
      "failure": "abort dispatch and enclosing precommit operation",
      "authority": "Selected context intersection activation grant; Annex D restrictions apply."
    },
    {
      "name": "rb.record.created",
      "version": "1.0",
      "kind": "action",
      "scope": "redbook",
      "phase": "precommit",
      "argumentsSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "array",
        "prefixItems": [
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/record.schema.json"
          },
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/execution-context.schema.json"
          }
        ],
        "items": false,
        "minItems": 2
      },
      "resultSchema": null,
      "description": "Observe this defined staged operation point; no mutation through snapshots.",
      "requires": [
        "rbx.ecmascript.1"
      ],
      "failure": "abort dispatch and enclosing precommit operation",
      "authority": "Selected context intersection activation grant; Annex D restrictions apply."
    },
    {
      "name": "rb.record.changed",
      "version": "1.0",
      "kind": "action",
      "scope": "redbook",
      "phase": "precommit",
      "argumentsSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "array",
        "prefixItems": [
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/record.schema.json"
          },
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/execution-context.schema.json"
          }
        ],
        "items": false,
        "minItems": 2
      },
      "resultSchema": null,
      "description": "Observe this defined staged operation point; no mutation through snapshots.",
      "requires": [
        "rbx.ecmascript.1"
      ],
      "failure": "abort dispatch and enclosing precommit operation",
      "authority": "Selected context intersection activation grant; Annex D restrictions apply."
    },
    {
      "name": "rb.action.input",
      "version": "1.0",
      "kind": "filter",
      "scope": "redbook",
      "phase": "precommit",
      "argumentsSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "array",
        "prefixItems": [
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/value.schema.json#/$defs/map"
          },
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/action-descriptor.schema.json"
          },
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/execution-context.schema.json"
          }
        ],
        "items": false,
        "minItems": 3
      },
      "resultSchema": {
        "$ref": "https://redbook.fun/specification/1.0/schemas/value.schema.json#/$defs/map"
      },
      "description": "Transform input, then revalidate before action execution.",
      "requires": [
        "rbx.ecmascript.1"
      ],
      "failure": "abort dispatch and enclosing precommit operation",
      "authority": "Selected context intersection activation grant; Annex D restrictions apply."
    },
    {
      "name": "rb.record.patch",
      "version": "1.0",
      "kind": "filter",
      "scope": "redbook",
      "phase": "precommit",
      "argumentsSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "array",
        "prefixItems": [
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/record-patch.schema.json"
          },
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/record.schema.json"
          },
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/execution-context.schema.json"
          }
        ],
        "items": false,
        "minItems": 3
      },
      "resultSchema": {
        "$ref": "https://redbook.fun/specification/1.0/schemas/record-patch.schema.json"
      },
      "description": "Transform permitted current-content patch, then revalidate.",
      "requires": [
        "rbx.ecmascript.1"
      ],
      "failure": "abort dispatch and enclosing precommit operation",
      "authority": "Selected context intersection activation grant; Annex D restrictions apply."
    },
    {
      "name": "rb.action.stage",
      "version": "1.0",
      "kind": "action",
      "scope": "redbook",
      "phase": "precommit",
      "argumentsSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "array",
        "prefixItems": [
          {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1
              },
              "input": {
                "$ref": "https://redbook.fun/specification/1.0/schemas/value.schema.json#/$defs/map"
              },
              "result": {
                "$ref": "https://redbook.fun/specification/1.0/schemas/value.schema.json"
              }
            },
            "required": [
              "name",
              "input",
              "result"
            ],
            "additionalProperties": false
          },
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/execution-context.schema.json"
          },
          {
            "type": "object",
            "description": "Host-control facade; validated by runtime identity, not serializable as a portable value."
          }
        ],
        "items": false,
        "minItems": 3
      },
      "resultSchema": null,
      "description": "Once per outer write; transaction facade can stage checked dependent operations.",
      "requires": [
        "rbx.ecmascript.1"
      ],
      "failure": "abort dispatch and enclosing precommit operation",
      "authority": "Selected context intersection activation grant; Annex D restrictions apply."
    },
    {
      "name": "rb.world.committed",
      "version": "1.0",
      "kind": "action",
      "scope": "redbook",
      "phase": "postcommit",
      "argumentsSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "array",
        "prefixItems": [
          {
            "type": "object",
            "properties": {
              "instanceId": {
                "type": "string",
                "minLength": 1
              },
              "documentId": {
                "type": "string",
                "minLength": 1
              },
              "editCounter": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "name": {
                "type": "string",
                "minLength": 1
              },
              "changedIds": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                },
                "uniqueItems": true
              }
            },
            "required": [
              "instanceId",
              "documentId",
              "editCounter",
              "name",
              "changedIds"
            ],
            "additionalProperties": false
          },
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/execution-context.schema.json"
          }
        ],
        "items": false,
        "minItems": 2
      },
      "resultSchema": null,
      "description": "Observe one accepted changed outer transaction; cannot author from observer.",
      "requires": [
        "rbx.ecmascript.1"
      ],
      "failure": "isolated diagnostic; completed effect remains",
      "authority": "Selected context intersection activation grant; Annex D restrictions apply."
    },
    {
      "name": "rb.query.input",
      "version": "1.0",
      "kind": "filter",
      "scope": "redbook",
      "phase": "query",
      "argumentsSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "array",
        "prefixItems": [
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/query.schema.json"
          },
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/execution-context.schema.json"
          }
        ],
        "items": false,
        "minItems": 2
      },
      "resultSchema": {
        "$ref": "https://redbook.fun/specification/1.0/schemas/query.schema.json"
      },
      "description": "Narrow the authorized selection before sort/paging; cannot widen explicit caller constraints.",
      "requires": [
        "rbx.ecmascript.1"
      ],
      "failure": "abort dispatch and enclosing precommit operation",
      "authority": "Selected context intersection activation grant; Annex D restrictions apply."
    },
    {
      "name": "rb.query.results",
      "version": "1.0",
      "kind": "filter",
      "scope": "redbook",
      "phase": "query",
      "argumentsSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "array",
        "prefixItems": [
          {
            "type": "array",
            "items": {
              "$ref": "https://redbook.fun/specification/1.0/schemas/record.schema.json"
            }
          },
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/query.schema.json"
          },
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/execution-context.schema.json"
          }
        ],
        "items": false,
        "minItems": 3
      },
      "resultSchema": {
        "type": "array",
        "items": {
          "$ref": "https://redbook.fun/specification/1.0/schemas/record.schema.json"
        }
      },
      "description": "Reorder or remove only authorized returned records.",
      "requires": [
        "rbx.ecmascript.1"
      ],
      "failure": "abort dispatch and enclosing precommit operation",
      "authority": "Selected context intersection activation grant; Annex D restrictions apply."
    },
    {
      "name": "rb.presentation.template",
      "version": "1.0",
      "kind": "filter",
      "scope": "viewbox",
      "phase": "render",
      "argumentsSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "array",
        "prefixItems": [
          {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/value.schema.json#/$defs/map"
          },
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/execution-context.schema.json"
          }
        ],
        "items": false,
        "minItems": 3
      },
      "resultSchema": {
        "oneOf": [
          {
            "type": "string",
            "minLength": 1
          },
          {
            "type": "null"
          }
        ]
      },
      "description": "Select a declared available template in the current target.",
      "requires": [
        "rbx.ecmascript.1",
        "rbx.dom.1"
      ],
      "failure": "abort dispatch and enclosing precommit operation",
      "authority": "Selected context intersection activation grant; Annex D restrictions apply."
    },
    {
      "name": "rb.presentation.item",
      "version": "1.0",
      "kind": "filter",
      "scope": "viewbox",
      "phase": "render",
      "argumentsSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "array",
        "prefixItems": [
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/templates.schema.json#/$defs/node"
          },
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/value.schema.json#/$defs/map"
          },
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/execution-context.schema.json"
          }
        ],
        "items": false,
        "minItems": 3
      },
      "resultSchema": {
        "$ref": "https://redbook.fun/specification/1.0/schemas/templates.schema.json#/$defs/node"
      },
      "description": "Transform safe declarative item nodes; no arbitrary HTML or authoring.",
      "requires": [
        "rbx.ecmascript.1",
        "rbx.dom.1"
      ],
      "failure": "abort dispatch and enclosing precommit operation",
      "authority": "Selected context intersection activation grant; Annex D restrictions apply."
    },
    {
      "name": "rb.viewbox.rendered",
      "version": "1.0",
      "kind": "action",
      "scope": "viewbox",
      "phase": "render",
      "argumentsSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "array",
        "prefixItems": [
          {
            "type": "object",
            "description": "Live dedicated DOM Element; not a portable value."
          },
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/view-render-context.schema.json"
          }
        ],
        "items": false,
        "minItems": 2
      },
      "resultSchema": null,
      "description": "Once per completed render handle after DOM changes.",
      "requires": [
        "rbx.ecmascript.1",
        "rbx.dom.1"
      ],
      "failure": "isolated diagnostic after accepted completion; no repeat dispatch or rollback",
      "authority": "Selected context intersection activation grant; Annex D restrictions apply."
    },
    {
      "name": "rb.ui.contributions",
      "version": "1.0",
      "kind": "filter",
      "scope": "viewbox",
      "phase": "render",
      "argumentsSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "array",
        "prefixItems": [
          {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "type": "string",
            "minLength": 1
          },
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/execution-context.schema.json"
          }
        ],
        "items": false,
        "minItems": 3
      },
      "resultSchema": {
        "type": "array",
        "items": {
          "type": "string",
          "minLength": 1
        }
      },
      "description": "Reorder or remove registered contribution IDs for this slot only.",
      "requires": [
        "rbx.ecmascript.1",
        "rbx.dom.1"
      ],
      "failure": "abort dispatch and enclosing precommit operation",
      "authority": "Selected context intersection activation grant; Annex D restrictions apply."
    },
    {
      "name": "reader.file.opening",
      "version": "1.0",
      "kind": "action",
      "scope": "reader",
      "phase": "lifecycle-before",
      "argumentsSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "array",
        "prefixItems": [
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/value.schema.json#/$defs/map"
          },
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/execution-context.schema.json"
          }
        ],
        "items": false,
        "minItems": 2
      },
      "resultSchema": null,
      "description": "Before passive open after accepted bytes are available.",
      "requires": [
        "rbx.ecmascript.1"
      ],
      "failure": "abort dispatch and enclosing precommit operation",
      "authority": "Selected context intersection activation grant; Annex D restrictions apply."
    },
    {
      "name": "reader.file.opened",
      "version": "1.0",
      "kind": "action",
      "scope": "reader",
      "phase": "lifecycle-after",
      "argumentsSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "array",
        "prefixItems": [
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/value.schema.json#/$defs/map"
          },
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/execution-context.schema.json"
          }
        ],
        "items": false,
        "minItems": 2
      },
      "resultSchema": null,
      "description": "After successful passive open; instance identity available.",
      "requires": [
        "rbx.ecmascript.1"
      ],
      "failure": "isolated diagnostic; completed effect remains",
      "authority": "Selected context intersection activation grant; Annex D restrictions apply."
    },
    {
      "name": "reader.file.saving",
      "version": "1.0",
      "kind": "action",
      "scope": "reader",
      "phase": "lifecycle-before",
      "argumentsSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "array",
        "prefixItems": [
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/value.schema.json#/$defs/map"
          },
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/execution-context.schema.json"
          }
        ],
        "items": false,
        "minItems": 2
      },
      "resultSchema": null,
      "description": "Inspect immutable accepted save snapshot; cannot alter it.",
      "requires": [
        "rbx.ecmascript.1"
      ],
      "failure": "abort dispatch and enclosing precommit operation",
      "authority": "Selected context intersection activation grant; Annex D restrictions apply."
    },
    {
      "name": "reader.file.saved",
      "version": "1.0",
      "kind": "action",
      "scope": "reader",
      "phase": "lifecycle-after",
      "argumentsSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "array",
        "prefixItems": [
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/value.schema.json#/$defs/map"
          },
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/execution-context.schema.json"
          }
        ],
        "items": false,
        "minItems": 2
      },
      "resultSchema": null,
      "description": "After durable save under declared storage guarantees.",
      "requires": [
        "rbx.ecmascript.1"
      ],
      "failure": "isolated diagnostic; completed effect remains",
      "authority": "Selected context intersection activation grant; Annex D restrictions apply."
    },
    {
      "name": "reader.library.receiving",
      "version": "1.0",
      "kind": "action",
      "scope": "reader",
      "phase": "lifecycle-before",
      "argumentsSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "array",
        "prefixItems": [
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/value.schema.json#/$defs/map"
          },
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/execution-context.schema.json"
          }
        ],
        "items": false,
        "minItems": 2
      },
      "resultSchema": null,
      "description": "Before accepting a staged item into the library.",
      "requires": [
        "rbx.ecmascript.1"
      ],
      "failure": "abort dispatch and enclosing precommit operation",
      "authority": "Selected context intersection activation grant; Annex D restrictions apply."
    },
    {
      "name": "reader.library.received",
      "version": "1.0",
      "kind": "action",
      "scope": "reader",
      "phase": "lifecycle-after",
      "argumentsSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "array",
        "prefixItems": [
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/value.schema.json#/$defs/map"
          },
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/execution-context.schema.json"
          }
        ],
        "items": false,
        "minItems": 2
      },
      "resultSchema": null,
      "description": "After successful library storage.",
      "requires": [
        "rbx.ecmascript.1"
      ],
      "failure": "isolated diagnostic; completed effect remains",
      "authority": "Selected context intersection activation grant; Annex D restrictions apply."
    },
    {
      "name": "reader.extension.activating",
      "version": "1.0",
      "kind": "action",
      "scope": "reader",
      "phase": "lifecycle-before",
      "argumentsSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "array",
        "prefixItems": [
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/value.schema.json#/$defs/map"
          },
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/execution-context.schema.json"
          }
        ],
        "items": false,
        "minItems": 2
      },
      "resultSchema": null,
      "description": "Before module evaluation/setup with resolved plan.",
      "requires": [
        "rbx.ecmascript.1"
      ],
      "failure": "abort dispatch and enclosing precommit operation",
      "authority": "Selected context intersection activation grant; Annex D restrictions apply."
    },
    {
      "name": "reader.extension.activated",
      "version": "1.0",
      "kind": "action",
      "scope": "reader",
      "phase": "lifecycle-after",
      "argumentsSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "array",
        "prefixItems": [
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/value.schema.json#/$defs/map"
          },
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/execution-context.schema.json"
          }
        ],
        "items": false,
        "minItems": 2
      },
      "resultSchema": null,
      "description": "After successful tracked setup.",
      "requires": [
        "rbx.ecmascript.1"
      ],
      "failure": "isolated diagnostic; completed effect remains",
      "authority": "Selected context intersection activation grant; Annex D restrictions apply."
    },
    {
      "name": "reader.extension.deactivating",
      "version": "1.0",
      "kind": "action",
      "scope": "reader",
      "phase": "lifecycle-before",
      "argumentsSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "array",
        "prefixItems": [
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/value.schema.json#/$defs/map"
          },
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/execution-context.schema.json"
          }
        ],
        "items": false,
        "minItems": 2
      },
      "resultSchema": null,
      "description": "Before revocation; failure is diagnostic and never prevents requested revocation.",
      "requires": [
        "rbx.ecmascript.1"
      ],
      "failure": "diagnostic only; requested revocation and cleanup continue",
      "authority": "Selected context intersection activation grant; Annex D restrictions apply."
    },
    {
      "name": "reader.extension.deactivated",
      "version": "1.0",
      "kind": "action",
      "scope": "reader",
      "phase": "lifecycle-after",
      "argumentsSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "array",
        "prefixItems": [
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/value.schema.json#/$defs/map"
          },
          {
            "$ref": "https://redbook.fun/specification/1.0/schemas/execution-context.schema.json"
          }
        ],
        "items": false,
        "minItems": 2
      },
      "resultSchema": null,
      "description": "After all cleanup attempts; includes cleanup errors.",
      "requires": [
        "rbx.ecmascript.1"
      ],
      "failure": "isolated diagnostic; completed effect remains",
      "authority": "Selected context intersection activation grant; Annex D restrictions apply."
    }
  ],
  "customDescriptorSchema": {
    "$ref": "https://redbook.fun/specification/1.0/schemas/hook-descriptor.schema.json"
  },
  "normativeReference": "/redbook-specification/#annex-d-portable-execution-extensions-and-presentation"
}
