repo.blue

JavaScript Code

ConversationV0.2
Blue ID: 3hYcmWMtMUPAzXBLFLb7BpuG9537tuTJPCr7pxWXvTZK

Conversation workflow step that executes provided JavaScript source as part of a sequential workflow. - Gas accounting (when & what is charged): - Base step charge (once per run of this step): 100 + ceil(bytes(code)/100) where bytes(code) is the UTF-8 length of the JavaScript source. - Document snapshot reads (via document(<pointer>) inside the code): 8 + depth(pointer) + ceil(snapshotBytes/100) per call, where: - depth("/") = 0, depth("/a/b") = 2 (number of path segments), - snapshotBytes is the canonical JSON size of the retrieved snapshot. - Event emissions (if the returned result contains events: [...]): 20 + ceil(eventBytes/100) per emitted event, where eventBytes is the canonical JSON size of that event. (Delivery/handling of those events may incur additional charges elsewhere, outside this step.) - JavaScript bindings available to the code: - `event`: triggering event rendered via the `'simple'` JSON strategy (plain values/arrays, no metadata). - `eventCanonical`: triggering event rendered via the `'official'` strategy. - `document(pointer?)`: document snapshot (absolute path or scope-relative) rendered with the `'simple'` strategy; defaults to `/` when omitted. - `document.canonical(pointer?)`: snapshot rendered using the `'official'` strategy for canonical metadata. - `steps`: results of previously executed steps. - `canon.unwrap(canonical, deep=true)`: converts canonical JSON back to plain values. - `canon.at(canonical, pointer)`: JSON Pointer navigation helper for canonical JSON objects.

Type Definition
YAML representation of the type document
Loading...