events.iterate.com

Event type

events.iterate.com/project/human-approval-requested

A batch of outbound requests matched one `hold` rule and is parked at the egress door awaiting a human — a lone request is a batch of one. Everything is placeholder form — getSecret(...) references, never material. The requested event's offset IS the batch's identity: the decision references it as approvalRequestEventOffset, and each request's position in `requests` is its index within the batch.

Payload schema

requestsobject[]

The held requests, in arrival order. Index within this array is each request's identity inside the batch (verdicts and settlements refer to it).

methodstring

HTTP method of the held request.

urlstring

Destination URL of the held request.

headersRecord<string, string>

All headers as they would be forwarded, placeholder form.

bodyobject | nulloptional

A bounded inspection prefix in placeholder form plus the complete body's SHA-256.

encoding"utf8" | "base64"
contentstring
originalByteLengthintegeroptional
sha256string
truncatedbooleanoptional
secretPathsstring[]optional

Secret paths the request references — the "spends this secret" headline.

ruleKeystring

The one rule that caught every request here.

ruleDescriptionstringoptional

The matched rule's human-readable explanation, snapshotted at gate time.

streamContextobjectoptional

Host-minted durable stream context for the invocation that attempted these requests. Batches with 2+ requests always carry script-execution provenance — only one script run's concurrent burst at one rule ever coalesces.

kind: "script-execution"object
kind"script-execution"
streamPathstring
scriptRunRequestedEventOffsetinteger
executionIdstring
kind: "scope"object
kind"scope"
scopePathstring
kind: "client-session"object
kind"client-session"
principalstring
adminboolean
expiresAtstring

ISO horizon after which the whole batch auto-rejects as expired.

Raw JSON schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "requests": {
      "minItems": 1,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "method": {
            "type": "string",
            "description": "HTTP method of the held request."
          },
          "url": {
            "type": "string",
            "description": "Destination URL of the held request."
          },
          "headers": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "string"
            },
            "description": "All headers as they would be forwarded, placeholder form."
          },
          "body": {
            "description": "A bounded inspection prefix in placeholder form plus the complete body's SHA-256.",
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "encoding": {
                    "type": "string",
                    "enum": [
                      "utf8",
                      "base64"
                    ]
                  },
                  "content": {
                    "type": "string"
                  },
                  "originalByteLength": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "sha256": {
                    "type": "string"
                  },
                  "truncated": {
                    "default": false,
                    "type": "boolean"
                  }
                },
                "required": [
                  "encoding",
                  "content",
                  "sha256"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "secretPaths": {
            "default": [],
            "description": "Secret paths the request references — the \"spends this secret\" headline.",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "method",
          "url",
          "headers"
        ]
      },
      "description": "The held requests, in arrival order. Index within this array is each request's identity inside the batch (verdicts and settlements refer to it)."
    },
    "ruleKey": {
      "type": "string",
      "description": "The one rule that caught every request here."
    },
    "ruleDescription": {
      "default": "",
      "description": "The matched rule's human-readable explanation, snapshotted at gate time.",
      "type": "string"
    },
    "streamContext": {
      "description": "Host-minted durable stream context for the invocation that attempted these requests. Batches with 2+ requests always carry script-execution provenance — only one script run's concurrent burst at one rule ever coalesces.",
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "script-execution"
            },
            "streamPath": {
              "type": "string",
              "pattern": "^\\/.*"
            },
            "scriptRunRequestedEventOffset": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "executionId": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "kind",
            "streamPath",
            "scriptRunRequestedEventOffset",
            "executionId"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "scope"
            },
            "scopePath": {
              "type": "string",
              "pattern": "^\\/.*"
            }
          },
          "required": [
            "kind",
            "scopePath"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "client-session"
            },
            "principal": {
              "type": "string",
              "minLength": 1
            },
            "admin": {
              "type": "boolean"
            }
          },
          "required": [
            "kind",
            "principal",
            "admin"
          ],
          "additionalProperties": false
        }
      ]
    },
    "expiresAt": {
      "type": "string",
      "description": "ISO horizon after which the whole batch auto-rejects as expired."
    }
  },
  "required": [
    "requests",
    "ruleKey",
    "expiresAt"
  ]
}