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.
Install
Section titled “Install”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/diffOr 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.
Catalog
Section titled “Catalog”First cut
Section titled “First cut”| Node | Flavor | Job |
|---|---|---|
jq | command wrapper | JSON path / transform (filter param) |
extract-json | class | First fenced json block (or {…} / […]) from agent text |
split-md | class | Chunk on ## headings → JSON array (∀ iterator · json) |
diff | class | Unified diff of named ports a / b → ? Judge |
Second wave
Section titled “Second wave”| Node | Flavor | Job |
|---|---|---|
rg | command wrapper | Search dir. Matching file paths on stdout |
token-estimate | class | chars÷4 estimate. Pair with a ‡ tokens breaker |
test-run | command wrapper | Run argv in dir. Prefix stdout with ok: / err: from exit |
git-status | command wrapper | git status --short in dir |
git-diff | command wrapper | git 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.
Wire patterns
Section titled “Wire patterns”agent → extract-json → ◇ Data(json) → jq → …prompt(markdown) → split-md → ∀ (json) → agent | convertbranch-a ─┐ ├→ diff → ? Judgebranch-b ─┘agent → token-estimate → ‡ tokens breakersplit-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 theok:/err:prefix with Judge or a content breaker.
Why not built-ins?
Section titled “Why not built-ins?”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.
Related
Section titled “Related”- Custom nodes. Descriptor, flavors, trust
- Sharing & importing. Install a folder
- Params & named ports.
diffuses named inputs - Tutorial: Command node. Wrap a PATH binary
- Adding a built-in node. When not to use the pack
- Iterator · Judge · Circuit breakers