# Prelude > pnpm workspace of small, focused TypeScript utility packages published under the @prelude/* scope. Packages are ESM-only, require Node.js 22 or later and follow one AbortSignal cancellation convention. Exact signatures live in the API reference; the package guides describe semantics and idioms; the agent skill describes how the packages are meant to be used together. ## Overview - [Repository README](https://mirekrusin.com/prelude/): workspace layout, quality gate, runtime support, cancellation convention - [API reference](https://mirekrusin.com/prelude/api/): generated from the TypeScript sources of every package - [Every guide as one file](https://mirekrusin.com/prelude/llms-full.txt) ## Agent skill - [prelude SKILL.md](https://mirekrusin.com/prelude/.well-known/agent-skills/prelude/SKILL.md): how to choose and combine @prelude/* packages - [Skill discovery index](https://mirekrusin.com/prelude/.well-known/agent-skills/index.json) ## Packages - [@prelude/actor](https://mirekrusin.com/prelude/packages/actor/): Actor module: stateful message processors with ask/reply, bounded mailboxes, failure directives and supervision hooks. - [@prelude/array](https://mirekrusin.com/prelude/packages/array/): Array utilities: safe indexing, sampling and shuffling, sorting and searching, grouping, swap-delete and vector helpers. - [@prelude/assert](https://mirekrusin.com/prelude/packages/assert/): Composable runtime assertions that narrow unknown values to typed ones and throw AssertionError with the failing path; built on @prelude/validation. - [@prelude/async-generator](https://mirekrusin.com/prelude/packages/async-generator/): Composable async iterable transforms: map, filter, batch, window, buffered and concurrent processing with backpressure. - [@prelude/channel](https://mirekrusin.com/prelude/packages/channel/): Go-style channels for async code: buffered or unbuffered, async-iterable, with select over reads and writes. - [@prelude/cmp](https://mirekrusin.com/prelude/packages/cmp/): Sound comparators: strict -1 | 0 | 1 results, composition, reversal and helpers for sorting and searching. - [@prelude/emitter](https://mirekrusin.com/prelude/packages/emitter/): Type-safe event emitter with once, predicate-filtered listeners and promise-based waits with timeouts. - [@prelude/eq](https://mirekrusin.com/prelude/packages/eq/): Structural equality combinators for primitives, arrays, tuples, records and partial objects. - [@prelude/err](https://mirekrusin.com/prelude/packages/err/): Errors with a severity and a code, plus helpers to create, inspect and rethrow them consistently. - [@prelude/fs](https://mirekrusin.com/prelude/packages/fs/): Node.js file-system helpers: JSON and string read/write, existence checks and deterministic depth-first traversal. - [@prelude/function](https://mirekrusin.com/prelude/packages/function/): Function utilities: pipe, memoize, throttle, timeout, retry (eventually), sleep, serial execution and logic combinators. - [@prelude/generator](https://mirekrusin.com/prelude/packages/generator/): Iterable and generator utilities: lazy map, filter, flatMap, batch, group, permutations, primes and other transforms over sync iterables. - [@prelude/json](https://mirekrusin.com/prelude/packages/json/) (private, not published): JSON encoding and decoding of non-JSON-native values (Set, Map, Date, RegExp, bigint, errors) through tagged coders. - [@prelude/jsonrpc](https://mirekrusin.com/prelude/packages/jsonrpc/): JSON-RPC 2.0 client and request handling over any message transport, with request timeouts, abort signals and typed payloads. - [@prelude/log](https://mirekrusin.com/prelude/packages/log/): Lightweight logger with severity levels, namespaces, pluggable targets and environment-variable level control. - [@prelude/parser](https://mirekrusin.com/prelude/packages/parser/): Parser combinators over string readers with location-aware failures, plus an RFC 8259 JSON grammar. - [@prelude/predicate](https://mirekrusin.com/prelude/packages/predicate/): Type-guard combinators for primitives, objects, arrays, tuples, records and unions; built on @prelude/validation. - [@prelude/prelude](https://mirekrusin.com/prelude/packages/prelude/): Low-level primitives shared by @prelude/* packages: pipe and common utility types. - [@prelude/progress](https://mirekrusin.com/prelude/packages/progress/): Terminal progress display for Node.js: multi-worker progress bars, spinners and percentages on stdout. - [@prelude/radix-trie](https://mirekrusin.com/prelude/packages/radix-trie/): Radix (compressed prefix) trie for string sets: insert, membership and shortest/longest prefix matching. - [@prelude/range-set](https://mirekrusin.com/prelude/packages/range-set/): Sets of value-carrying ranges over ordered keys with union, intersection and difference under pluggable value merges. - [@prelude/rb-tree](https://mirekrusin.com/prelude/packages/rb-tree/): Persistent red-black tree with duplicate counts, range counting and Bag/Map wrappers, with exported invariant checks. - [@prelude/refute](https://mirekrusin.com/prelude/packages/refute/): Validators that return ok/refuted results with a reason instead of throwing, with predicate and assertion interpreters; built on @prelude/validation. - [@prelude/remote-actor](https://mirekrusin.com/prelude/packages/remote-actor/): Remote actor module: send/ask to an actor over any message transport (MessagePort, workers, sockets). - [@prelude/remote-clock](https://mirekrusin.com/prelude/packages/remote-clock/): Clock synchronisation against a remote time source: offset estimation, remote now/date and mid-second ticks. - [@prelude/repl](https://mirekrusin.com/prelude/packages/repl/): Node.js REPL helpers: run code snippets extracted from Markdown in a sandbox with builtin modules and globals. - [@prelude/semver](https://mirekrusin.com/prelude/packages/semver/): Semantic Versioning 2.0 parsing, comparison and precedence ordering. - [@prelude/serial-queue](https://mirekrusin.com/prelude/packages/serial-queue/): Promise-returning serial task queue: pushed work runs one at a time, in order, with bulk rejection. - [@prelude/set](https://mirekrusin.com/prelude/packages/set/): Set helpers over the native Set: union, intersection, difference, equality, numeric ranges and sorted/shuffled views. - [@prelude/sorted-array](https://mirekrusin.com/prelude/packages/sorted-array/): Arrays kept sorted by a comparator with binary search, insert, insert-ignore and upsert. - [@prelude/string](https://mirekrusin.com/prelude/packages/string/): String utilities: blank checks, case conversion, indentation, truncation, line operations, search-replace and edit distance. - [@prelude/supervisor](https://mirekrusin.com/prelude/packages/supervisor/): Supervisor module: restart strategies (one-for-one, all-for-one, rest-for-one) and restart limits for @prelude/actor. - [@prelude/testing](https://mirekrusin.com/prelude/packages/testing/) (private, not published): Workspace-internal test helpers: seeded pseudo-random generation and trace-based model checking with shrinking. - [@prelude/tsconfig](https://mirekrusin.com/prelude/packages/tsconfig/): Shared TypeScript configurations for the prelude monorepo. - [@prelude/validation](https://mirekrusin.com/prelude/packages/validation/): Shared validator core behind @prelude/assert, @prelude/predicate and @prelude/refute: one implementation of the primitive, container and combinator checks producing structured, path-carrying failures. - [@prelude/wait-group](https://mirekrusin.com/prelude/packages/wait-group/): Go-style WaitGroup: count outstanding work and await completion, with invalid-counter protection. - [@prelude/xml](https://mirekrusin.com/prelude/packages/xml/): XML 1.0 parser with namespace processing, precise error locations and JSON conversion helpers; no DTD processing or external resources. ## Changelogs - [@prelude/actor](https://mirekrusin.com/prelude/packages/actor/changelog.html) - [@prelude/array](https://mirekrusin.com/prelude/packages/array/changelog.html) - [@prelude/assert](https://mirekrusin.com/prelude/packages/assert/changelog.html) - [@prelude/async-generator](https://mirekrusin.com/prelude/packages/async-generator/changelog.html) - [@prelude/channel](https://mirekrusin.com/prelude/packages/channel/changelog.html) - [@prelude/cmp](https://mirekrusin.com/prelude/packages/cmp/changelog.html) - [@prelude/emitter](https://mirekrusin.com/prelude/packages/emitter/changelog.html) - [@prelude/eq](https://mirekrusin.com/prelude/packages/eq/changelog.html) - [@prelude/err](https://mirekrusin.com/prelude/packages/err/changelog.html) - [@prelude/fs](https://mirekrusin.com/prelude/packages/fs/changelog.html) - [@prelude/function](https://mirekrusin.com/prelude/packages/function/changelog.html) - [@prelude/generator](https://mirekrusin.com/prelude/packages/generator/changelog.html) - [@prelude/jsonrpc](https://mirekrusin.com/prelude/packages/jsonrpc/changelog.html) - [@prelude/log](https://mirekrusin.com/prelude/packages/log/changelog.html) - [@prelude/parser](https://mirekrusin.com/prelude/packages/parser/changelog.html) - [@prelude/predicate](https://mirekrusin.com/prelude/packages/predicate/changelog.html) - [@prelude/prelude](https://mirekrusin.com/prelude/packages/prelude/changelog.html) - [@prelude/progress](https://mirekrusin.com/prelude/packages/progress/changelog.html) - [@prelude/radix-trie](https://mirekrusin.com/prelude/packages/radix-trie/changelog.html) - [@prelude/range-set](https://mirekrusin.com/prelude/packages/range-set/changelog.html) - [@prelude/rb-tree](https://mirekrusin.com/prelude/packages/rb-tree/changelog.html) - [@prelude/refute](https://mirekrusin.com/prelude/packages/refute/changelog.html) - [@prelude/remote-actor](https://mirekrusin.com/prelude/packages/remote-actor/changelog.html) - [@prelude/remote-clock](https://mirekrusin.com/prelude/packages/remote-clock/changelog.html) - [@prelude/repl](https://mirekrusin.com/prelude/packages/repl/changelog.html) - [@prelude/semver](https://mirekrusin.com/prelude/packages/semver/changelog.html) - [@prelude/serial-queue](https://mirekrusin.com/prelude/packages/serial-queue/changelog.html) - [@prelude/set](https://mirekrusin.com/prelude/packages/set/changelog.html) - [@prelude/sorted-array](https://mirekrusin.com/prelude/packages/sorted-array/changelog.html) - [@prelude/string](https://mirekrusin.com/prelude/packages/string/changelog.html) - [@prelude/supervisor](https://mirekrusin.com/prelude/packages/supervisor/changelog.html) - [@prelude/tsconfig](https://mirekrusin.com/prelude/packages/tsconfig/changelog.html) - [@prelude/validation](https://mirekrusin.com/prelude/packages/validation/changelog.html) - [@prelude/wait-group](https://mirekrusin.com/prelude/packages/wait-group/changelog.html) - [@prelude/xml](https://mirekrusin.com/prelude/packages/xml/changelog.html)