events.iterate.com

Event type

events.iterate.com/capability-host/preamble-set

Upserts one preamble entry: TypeScript injected above every later script in this scope, at typecheck and at execution. Keyed — a re-set at the same key replaces the code but keeps the entry's injection position (first-set offset). Entries recorded through setPreamble were compiled against the scope's assembled preamble at set time; a stale entry that stops compiling later never blocks a script (the run gate downgrades preamble-line errors to unchecked).

Payload schema

keystring

The entry's identity.

codestring

TypeScript statements to inject.

Raw JSON schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "key": {
      "type": "string",
      "minLength": 1,
      "description": "The entry's identity."
    },
    "code": {
      "type": "string",
      "description": "TypeScript statements to inject."
    }
  },
  "required": [
    "key",
    "code"
  ],
  "additionalProperties": false
}