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).
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).
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).
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.
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).
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.