Remove null elements from an array (lodash _.compact, null-only: 0, false and "" are KEPT so plucked data survives): { value }. Pairs with fp::map, whose sporadic misses become null. Mainly useful as a fp::pipe step.
valueunknown*required
Input value (a pipe lands the previous step's value here).
Trigger-binding guard: compare a JSON pointer inside the fired event and answer the condition contract ({ decision: "allow" | "skip", reason }). Config is { path?, op, to?, negate? } with the fp::when ops (==, !=, >, >=, <, <=, exists, not_empty); a pointer that resolves to nothing SKIPS rather than erroring, so "not there yet" is an ordinary answer. Use it as a binding's `conditions` entry so a reaction fires only on events that matter — it is not a fan-in gate (that is state::barrier), it filters one event at a time.
condition_configany of
any of (2)
variant 1
negateboolean
Invert the verdict. The only way to say "fire when this is ABSENT", since a pointer miss fails the guard and there is no `not_exists` op. Note the footgun that comes with it: a path that never resolves then fires on EVERY event.
opall of*required
One of "==", "!=", ">", ">=", "<", "<=", "exists", "not_empty".
… expand 1 nestedcollapse
all of (1)
variant 1
valuestringenum: ==, !=, >, >=, <, <=, …
pathstring
JSON pointer into the EVENT (default: the whole event). Almost always wanted — comparing a whole event object is rarely what you mean.
tounknown
Right-hand side for the comparison ops; rejected for exists/not_empty.
one of (2)
variant 1
decisionstring*requiredenum: allow
variant 2
decisionstring*requiredenum: skip
Count array elements per plucked key (lodash _.countBy): { value, path: "/writer" } -> { "<key>": <count> } (`""` counts by the element itself). Same key rules as fp::groupBy. Pair with fp::groupBy + fp::sum for a per-key total. Mainly useful as a fp::pipe step.
pathstring*required
JSON pointer plucked from each element as the bucket key (`""` = the element itself).
valueunknown*required
Input value (a pipe lands the previous step's value here).
Skip the first n elements of an array or the first n characters of a string (lodash _.drop): { value, n }. Mainly useful as a fp::pipe step.
ninteger· uint32*requiredmin 0
How many array elements / string characters to skip.
valueunknown*required
Input value (a pipe lands the previous step's value here).
Keep array elements whose properties equal a partial object (lodash _.filter with a matches iteratee): { value, matches: { status: "active" } }. matches is a partial OBJECT (never a bare string/number) and only object elements can match. Mainly useful as a fp::pipe step.
matchesobject*required
Partial object an element's top-level properties must equal.
valueunknown*required
Input value (a pipe lands the previous step's value here).
Flatten an array one level (lodash _.flatten): [1,[2],[[3]]] -> [1,2,[3]]. Mainly useful as a fp::pipe step.
valueunknown*required
Input value (a pipe lands the previous step's value here).
Extract the single value at a JSON pointer (lodash _.get): { value, path: "/content" }. A miss names the keys that were available. Mainly useful as a fp::pipe step.
pathstring*required
JSON pointer selecting the value to return (e.g. `/content`).
valueunknown*required
Input value (a pipe lands the previous step's value here).
Extract the value at a JSON pointer, or `default` when the path misses (lodash fp.getOr): { value, path, default }. A stored null is a hit, not a miss. Mainly useful as a fp::pipe step.
defaultunknown*required
Returned when the path matches nothing (a stored null is a hit).
pathstring*required
JSON pointer selecting the value to return (e.g. `/content`).
valueunknown*required
Input value (a pipe lands the previous step's value here).
Bucket array elements by a plucked key (lodash _.groupBy): { value, path: "/writer" } -> { "<key>": [element, ...] } (`""` groups by the element itself). Keys must be a string, number, or boolean; a null or container key errors rather than collapsing distinct groups into one bucket. Mainly useful as a fp::pipe step.
pathstring*required
JSON pointer plucked from each element as the bucket key (`""` = the element itself).
valueunknown*required
Input value (a pipe lands the previous step's value here).
fp::inject-guidance
functionInternal pre_generate hook: appends fp::pipe usage guidance to the agent system prompt. Bound to harness::hook::pre-generate at worker startup; not called directly.
generateobject
system_promptstring
The system prompt assembled so far (base + any prior hook's mutation).
mutationsobject*required
The harness applies `system_prompt` only when the key is present (`HookRunner::run_pre_generate` — `if m.system_prompt.is_some()`), so `None` serializes to an empty object: the safe no-op that preserves the harness's assembled prompt.
system_promptstring
Full replacement system prompt (base + appended guidance). The harness overwrites, it does not merge.
Join array elements into one string (lodash _.join): { value, separator } (separator defaults to ","). Mainly useful as a fp::pipe step.
separatorstring
Separator between elements (default `","`).
valueunknown*required
Input value (a pipe lands the previous step's value here).
Pluck the value at a JSON pointer from each array element (lodash _.map with a property iteratee): { value, path: "/id" }. Sporadic misses become null (fp::compact drops them), but a path matching NO element errors — pointers pluck stored fields, not computed properties like /length (fp::size counts). Mainly useful as a fp::pipe step.
pathstring*required
JSON pointer plucked from each element (e.g. `/id`). Sporadic misses become null; a path matching NO element is an error (stored fields only — no computed properties like `/length`).
valueunknown*required
Input value (a pipe lands the previous step's value here).
Largest number in an array (lodash _.max/_.maxBy): { value }, or { value, path: "/amount" }. Deviates from lodash _.maxBy: returns the NUMBER, not the element holding it, so a fp::when guard can compare it directly. An empty array errors. Mainly useful as a fp::pipe step.
pathstring
Optional JSON pointer plucked from each element before reducing, so `[{amount: 3}, …]` reduces without a separate fp::map step.
valueunknown*required
Input value (a pipe lands the previous step's value here).
Arithmetic mean of an array of numbers (lodash _.mean/_.meanBy): { value }, or { value, path: "/score" }. Deviates from lodash: an EMPTY array errors instead of yielding NaN, which would thread garbage into the next step. Mainly useful as a fp::pipe step.
pathstring
Optional JSON pointer plucked from each element before reducing, so `[{amount: 3}, …]` reduces without a separate fp::map step.
valueunknown*required
Input value (a pipe lands the previous step's value here).
Smallest number in an array (lodash _.min/_.minBy): { value }, or { value, path: "/amount" }. Deviates from lodash _.minBy: returns the NUMBER, not the element holding it, so a fp::when guard can compare it directly. An empty array errors. Mainly useful as a fp::pipe step.
pathstring
Optional JSON pointer plucked from each element before reducing, so `[{amount: 3}, …]` reduces without a separate fp::map step.
valueunknown*required
Input value (a pipe lands the previous step's value here).
Element at index n; negative n counts from the end (lodash _.nth): { value, n: -1 } is the last element. Out of bounds errors naming the length. Mainly useful as a fp::pipe step.
ninteger· int64*required
Index to pluck; negative counts from the end (`-1` = last element).
valueunknown*required
Input value (a pipe lands the previous step's value here).
Drop top-level keys from an object (lodash _.omit): { value, paths: ["a","b"] }. Mainly useful as a fp::pipe step.
pathsstring[]*required
Top-level keys to drop; missing keys are ignored.
valueunknown*required
Input value (a pipe lands the previous step's value here).
Subset an object by top-level keys (lodash _.pick): { value, paths: ["a","b"] } -> {a, b}; missing keys are omitted. Mainly useful as a fp::pipe step.
pathsstring[]*required
Top-level keys to keep; missing keys are silently omitted.
valueunknown*required
Input value (a pipe lands the previous step's value here).
Run a short worker-side pipeline in one call: each step triggers a function and its result lands in the next step's payload at `into` (default "/value") — large values flow worker→worker and never enter the chat. fp::* transform steps (get/pick/omit/take/drop/map/filter/split/join/uniq/size/compact/nth/getOr/flatten/sortBy/reverse/when, lodash semantics) run inline and thread the transformed value itself — the {value} wrapper they return when called directly never appears between steps. A failing fp::when guard STOPS the pipe (`short_circuited: true`), so a trailing write step runs only when its condition holds. The FIRST step receives no threaded value: start with a producing function (a fetch, a state::get) or seed a leading transform via payload.value. Example: fetch an article and persist it trimmed: through=[{function:'scrapling::fetch', payload:{url,format:'markdown'}}, {function:'fp::get', payload:{path:'/content'}}, {function:'fp::take', payload:{n:20000}}, {function:'state::set', payload:{scope,key}}]. Returns per-step sizes and a preview, not the value. shell::*/coder::* steps run under the session's harness-stamped filesystem scope; without one (no working directory, or a non-harness caller) they are refused — call them directly instead. Database write steps are refused only while `approval::gate` is registered.
preview_charsinteger· uint32min 0
Preview length of the final threaded value in the receipt (capped at 8000).
throughobject[]*required
Steps run in order; step N+1 receives step N's threaded value.
functionstring*required
Function id to trigger (e.g. `scrapling::fetch`, `fp::get`, `state::set`).
intostring
JSON pointer in THIS step's payload where the previous step's value lands (default `/value`). Object keys only (`~0`/`~1` escapes are decoded); indexing into arrays is unsupported.
payloadunknown
Base payload for the call.
short_circuitedboolean*required
True when a `fp::when` guard failed and stopped the pipe: the receipts end at the guard and NO later step ran. Absent (false) on a full run.
stepsobject[]*required
charsinteger· uint*requiredmin 0
Size of the value threaded OUT of this step (chars of its string or serialized form).
notestring
Set when the threaded value REPLACED a non-null literal already in this step's payload at the `into` pointer — almost always an omitted `into` on a write step clobbering the value it meant to write.
Reverse an array (lodash _.reverse, immutable like lodash/fp): { value }. Mainly useful as a fp::pipe step.
valueunknown*required
Input value (a pipe lands the previous step's value here).
Count a collection (lodash _.size): array length, string chars, or object key count: { value }. Non-collections error instead of returning 0. Mainly useful as a fp::pipe step.
valueunknown*required
Input value (a pipe lands the previous step's value here).
Sort array elements ascending by the value at a JSON pointer (lodash _.sortBy, stable): { value, path } — path "" sorts the elements themselves (primitives). Keys must all be numbers, strings, or booleans; an element missing the path errors. Pair with fp::reverse for descending. Mainly useful as a fp::pipe step.
pathstring*required
JSON pointer plucked from each element as the sort key (e.g. `/score`).
valueunknown*required
Input value (a pipe lands the previous step's value here).
Split a string into an array of strings (lodash _.split): { value, separator: "\n" }. Mainly useful as a fp::pipe step.
separatorstring*required
Non-empty separator to split on (e.g. `"\n"`).
valueunknown*required
Input value (a pipe lands the previous step's value here).
Total an array of numbers (lodash _.sum/_.sumBy): { value }, or { value, path: "/amount" } to pluck the addend from each element first. An empty array totals 0; a non-numeric element errors rather than being skipped. All-integer inputs total to an integer, so the result compares cleanly in a fp::when guard. Mainly useful as a fp::pipe step.
pathstring
Optional JSON pointer plucked from each element before reducing, so `[{amount: 3}, …]` reduces without a separate fp::map step.
valueunknown*required
Input value (a pipe lands the previous step's value here).
Keep the first n elements of an array or the first n characters of a string (lodash _.take): { value, n }. Mainly useful as a fp::pipe step.
ninteger· uint32*requiredmin 0
How many array elements / string characters to keep.
valueunknown*required
Input value (a pipe lands the previous step's value here).
Deduplicate an array, keeping first occurrences (lodash _.uniq): { value }. Mainly useful as a fp::pipe step.
valueunknown*required
Input value (a pipe lands the previous step's value here).
Guard: test the value at a JSON pointer ({ value, path?, op, to? }; ops ==, !=, >, >=, <, <=, exists, not_empty; path defaults to the whole value; a pointer miss FAILS the guard, it never errors). Direct calls return { passed, value }. As a fp::pipe step, a passing guard threads the ORIGINAL value onward unchanged and a failing one STOPS the pipe (`short_circuited: true`), so a trailing write step (e.g. state::set) runs only when the condition holds.
opall of*required
One of "==", "!=", ">", ">=", "<", "<=", "exists", "not_empty".
all of (1)
variant 1
valuestringenum: ==, !=, >, >=, <, <=, …
pathstring
JSON pointer selecting what to test (default: the whole value).
tounknown
Right-hand side for the comparison ops; meaningless (and rejected) for exists / not_empty.
valueunknown*required
Input value (a pipe lands the previous step's value here).
valueunknown*required
The ORIGINAL input value, untouched — guards test, they never reshape.