Skip to content

Stdlib pack

The stdlib pack is a curated set of utility custom nodes that live in the threadle repo under examples/nodes/stdlib/. They use the same import UX as any custom node. No new graph types, no Vue chrome, no runner cases.

Tutorial / typed-lane demos (hello-world, char-stats, head-tail, …) stay in examples/nodes/. Prefer the pack for day-to-day glue. Prefer a built-in only when threadle itself must own the type.


Import one folder at a time via Settings → custom nodes → ⇣ Import (absolute path, ~/…, or ⌸ Browse):

/path/to/threadle/examples/nodes/stdlib/jq
/path/to/threadle/examples/nodes/stdlib/extract-json
/path/to/threadle/examples/nodes/stdlib/split-md
/path/to/threadle/examples/nodes/stdlib/diff

Or copy/symlink each folder into ~/.config/threadle/nodes/.

Command wrappers (jq, rg, git-*, test-run) need the binary on PATH and fail with stderr if missing. threadle does not bundle them. Nodes that search a repo (rg, git-*, test-run) take an absolute dir param (custom nodes do not receive the workflow projectDir).

See Sharing & importing for git / path / picker details.


NodeFlavorJob
jqcommand wrapperJSON path / transform (filter param)
extract-jsonclassFirst fenced json block (or {…} / […]) from agent text
split-mdclassChunk on ## headings → JSON array (∀ iterator · json)
diffclassUnified diff of named ports a / b → ? Judge
NodeFlavorJob
rgcommand wrapperSearch dir. Matching file paths on stdout
token-estimateclasschars÷4 estimate. Pair with a ‡ tokens breaker
test-runcommand wrapperRun argv in dir. Prefix stdout with ok: / err: from exit
git-statuscommand wrappergit status --short in dir
git-diffcommand wrappergit diff in dir (optional pathspec / staged)

Folded into demos: slug / head. Use head-tail instead.

Full install notes and wire patterns also live in the repo PACK.md. Docs site path: Extend → Stdlib pack.


agent → extract-json → ◇ Data(json) → jq → …
prompt(markdown) → split-md → ∀ (json) → agent | convert
branch-a ─┐
├→ diff → ? Judge
branch-b ─┘
agent → token-estimate → ‡ tokens breaker
  • split-md + iterator. Set the iterator split mode to JSON array. Parallel map still needs an agent + Merge. See Iterator.
  • diff + Judge. Empty diff vs non-empty is a natural pass / fail matcher. See Judge.
  • test-run. The node itself always exits 0. Read the ok: / err: prefix with Judge or a content breaker.

Growing core for jq / rg / diff would fight the product shape: custom nodes already cover stdin/stdout, params, and named ports. The pack keeps vocabulary small while shipping the transforms graphs keep reinventing.