[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M780029SC37WH3X47MW8G5Y0":3,"skill-same:01M780029SC37WH3X47MW8G5Y0":45},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M780029SC37WH3X47MW8G5Y0","effect-v4-module-index",null,"The routing map for Effect v4 core — every module in one table, what it is, when to reach for it, and where to read it in the vendored source. Use FIRST when asking \"what module do I reach for\", \"does Effect have a Sink\u002FPool\u002FTrie\u002Fpattern-matcher\", \"what is Sink\u002FChannel\u002FDeferred\u002FRcMap for\", \"where does X live in the source\", or before designing ANY capability (the contract-inventory gate greps this map's territory). Opens with a routing-by-task table for the ones people miss by name — spawning a subprocess, a TTL cache with in-flight de-duplication, writing to stdout from a library. Rows route; they do not teach — patterns live in the other effect-v4-* skills, and the source is the authority on signatures and semantics.","spencerbeggs\u002Feffected","spencerbeggs","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F109114?v=4","01M77ZTHB70K5Y2VVTRCFY50A5","C. Spencer Beggs","01M77ZTHCC41NXBT3X906K6QM1",8,"MIT","https:\u002F\u002Fgithub.com\u002Fspencerbeggs\u002Feffected\u002Fblob\u002Fmain\u002Fplugin\u002Fbuilds\u002Fclaude\u002Fskills\u002Feffect-v4-module-index\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: effect-v4-module-index\ndescription: The routing map for Effect v4 core — every module in one table, what it is, when to reach for it, and where to read it in the vendored source. Use FIRST when asking \"what module do I reach for\", \"does Effect have a Sink\u002FPool\u002FTrie\u002Fpattern-matcher\", \"what is Sink\u002FChannel\u002FDeferred\u002FRcMap for\", \"where does X live in the source\", or before designing ANY capability (the contract-inventory gate greps this map's territory). Opens with a routing-by-task table for the ones people miss by name — spawning a subprocess, a TTL cache with in-flight de-duplication, writing to stdout from a library. Rows route; they do not teach — patterns live in the other effect-v4-* skills, and the source is the authority on signatures and semantics.\n---\n\n# Effect v4 module index\n\nEvery module of `effect@4` core, one row each: **what it is**, **when to reach\nfor it**. This skill exists so the other skills can stop explaining what things\nare and spend their space on patterns — and so no one designs a capability core\nalready ships (the `effect-v4-planning` contract-inventory gate).\n\n**Where things live.** Every row's source is the vendored tree's\n`packages\u002Feffect\u002Fsrc\u002F\u003CName>.ts` (testing modules under\n`src\u002Ftesting\u002F`, the namespace modules below under `src\u002F\u003Cns>\u002F`; resolve the\ntree root via `effect-v4-source-lookup`). The vendored\nsubmodule is pinned to the installed `effect` release and is the authority on existence,\nsignatures, and — read alongside a probe — semantics (`effect-v4-source-lookup`\nowns the evidence ladder). It is also the **style oracle**: before building\nanything module-shaped, read how core writes the analogous module.\n\n**Stability split.** A module's stability is an annotation, not a separate\nimport path — every module in core imports as `effect\u002F\u003CName>` or\n`effect\u002F\u003Cns>\u002F\u003CName>` alike. Every module and every directly importable export\ncarries an explicit `@stability` tag: `stable` follows strict semver,\n`unstable` may break in a minor release. The namespace modules below (`ai`,\n`cli`, `http`, `http-api`, `sql`, and the rest of the table under \"The\nunstable-stability namespaces\") are `unstable`, and so are these top-level\nmodules — **including the platform contracts**: `Arbitrary`, `ByteSize`, `Bytes`,\n`ChannelSchema`, `ErrorReporter`, `ExecutionPlan`, `FileSystem`,\n`Glob` (`experimental`), `Graph`, `HashRing`, `LayerMap`, `LayerRef`, `Newtype`,\n`PartitionedSemaphore`, `Path`, `PlatformError`, `SemVer`, `SemVerRange`,\n`Stdio`, `Terminal`, `TxChunk`, `Version`, `TextDiff` (`experimental`), plus `testing\u002FTestConsole` and `testing\u002FTestSchema`.\nUnder `effect\u002Fencoding`, `Base64`, `Base64Url`, `EncodingError` and `Hex` are\n`stable`; the rest are `unstable`. Every `effect\u002Fcrypto` and `effect\u002Fjose`\nmodule is `unstable`. A few symbols in otherwise-stable modules\ncarry the tag too — the network-address, cookie, header, URL-params, `Graph` and `ByteSize` schemas\nin `Schema`, `Effect.withExecutionPlan`\u002F`withErrorReporting`,\n`Stream.withExecutionPlan`\u002F`limitBytes`, `Config.ByteSize`, `Logger.toFile` —\nand so does any API that exposes a third-party dependency's types. Read the tag\nin the vendored source before building on an API\n(`grep -n \"@stability\" $SRC\u002Fpackages\u002Feffect\u002Fsrc\u002F\u003CName>.ts`), and keep unstable\nones behind one seam of your own so a minor release has a single place to fix.\nRequiring an unstable platform contract such as `FileSystem` in `R` is still\nthe house default (`effect-v4-services-layers`); the tag means a minor release\ncan change its shape, so re-verify your usage when the installed `effect`\nmoves.\n\n## Routing by task\n\nThe module tables below are keyed by *name*. These rows are keyed by what you\nwere about to go build, because each one has been reached for by its task\nphrasing and missed on its module name.\n\n| You want to… | Reach for | Note |\n| --- | --- | --- |\n| **spawn a subprocess \u002F run a command \u002F shell out** | `effect\u002Fprocess` — `ChildProcess` (command values) + `ChildProcessSpawner` (the service) | NOT `cli`'s `Command`, which is the CLI *declaration*. Core declares the contract and ships **no layer**: require `ChildProcessSpawner` in `R`, let the app provide `NodeServices.layer`. Never hand-roll `node:child_process`. Arguments are `CommandLine.Word` (`string \\| Redacted\u003Cstring>`), and a template with shell syntax (`\\|`, `$HOME`, `*`) throws `CommandLineError` when `make` is called. |\n| **hash, HMAC, sign, encrypt, derive a key, or draw secure random bytes \u002F a UUID** | `effect\u002Fcrypto` — `Digest`, `Mac`, `Signature`, `Aead`\u002F`Cipher`, `Kdf`, `SecureRandom` (each a service) | No `effect\u002FCrypto` module exists. Require the service in `R` and provide it at the edge: `NodeCrypto.layer` (every family) or a family layer such as `NodeCrypto.layerDigest` from `@effect\u002Fplatform-node`, or core's `\u003CFamily>.layerWebCrypto` on any WebCrypto runtime. **`NodeServices.layer` carries no crypto.** JOSE (JWS\u002FJWE\u002FJWT\u002FJWK\u002FJWKS) is `effect\u002Fjose`. |\n| **cache an effectful lookup with a TTL and in-flight de-duplication** | core `Cache` — `Cache.makeWith(lookup, { capacity, timeToLive })`, or `Cache.make` for a fixed TTL | Already does both jobs: it \"shares an in-progress lookup when multiple callers request the same missing key\" (`Cache.ts:4`) and expires by `timeToLive` (`Cache.ts:118`). Do not build a promise-map de-duplicator beside it — but read the two `Cache` sharp corners below before choosing a TTL. |\n| **write to stdout\u002Fstderr, or read argv\u002Fstdin, from a library** | core `Stdio` — require `Stdio` in `R` | `Stdio.layerTest(impl)` (`Stdio.ts:166`) takes a `Partial\u003CStdio>` and lets you echo-test the output **with no platform package installed**. The real implementation still comes from `@effect\u002Fplatform-*` at the app edge. Do not `console.log` from library code to dodge the wiring. |\n\n## Core modules\n\n| Module | What it is | When to reach for it |\n| --- | --- | --- |\n| `Array` | helpers over JS arrays, readonly and non-empty arrays (map\u002Fsort\u002Fgroup\u002Fsplit\u002Freduce) | transforming, grouping, or combining array-shaped collections immutably |\n| `BigDecimal` | arbitrary-precision decimal (bigint digits + scale) with arithmetic and formatting | exact decimal math for money\u002Fquantities where `number` rounding fails |\n| `BigInt` | helpers over native `bigint`: arithmetic, comparison, safe parsing to `Option` | working with `bigint` values and needing safe parse\u002Faggregate\u002Forder |\n| `Boolean` | helpers over `boolean`: logical ops, lazy branching, ordering, reducing | combining booleans or choosing between lazy branches |\n| `Brand` | compile-time nominal tags on structurally-identical values, optionally validating | keeping `Positive`\u002F`UserId`-style values from mixing without runtime cost |\n| `ByteSize` | a branded non-negative `bigint` byte count (`ByteSize.ts:32`) with unit constructors (`bytes`, `kilobytes`\u002F`kibibytes` … `quettabytes`), `fromInput`\u002F`fromInputUnsafe` over `ByteSize.Input = ByteSize \\| bigint \\| number \\| string`, `toBigInt`\u002F`toNumber` (Option)\u002F`toNumberUnsafe`, `sum`\u002F`subtract`\u002F`times`\u002F`divide`, `Order`\u002F`Equivalence`\u002F`between`\u002F`clamp`, `format` | any byte quantity — it **replaces `FileSystem.Size`\u002F`SizeInput`**, which do not exist: `File.Info.size` and `blksize` are `ByteSize` (`FileSystem.ts:1103-1104`), `FileSystem.stream`'s `bytesToRead`\u002F`offset` are `ByteSize.Input` (`:378-380`), `File.seek` takes a `bigint` and returns one (`:958`), `read`\u002F`write` return `number` (`:964`, `:975`), `readAlloc`\u002F`truncate` take `number` (`:970-974`). Reach for `ByteSize.toNumberUnsafe(info.size)` at a `Buffer` boundary, never `Number(info.size)` spelled by hand |\n| `Bytes` | helpers over `Uint8Array`: `concat`, `Equivalence`, `Order` | joining or comparing byte arrays without a `Buffer` dependency |\n| `Cache` | concurrent cache of Effect lookup results with capacity\u002FTTL and in-flight sharing (`make` = fixed TTL, `makeWith` = per-entry TTL from the `Exit`) | memoizing an effectful lookup by key with dedupe\u002Fexpiry — this is the whole feature; do not hand-roll an in-flight promise map |\n| `Cause` | full structured failure record: typed errors, defects, interruptions, annotations | inspecting or formatting why an Effect failed without collapsing it |\n| `Channel` | low-level bidirectional streaming primitive underlying Stream and Sink | implementing custom stream operators; app code uses Stream\u002FSink instead |\n| `ChannelSchema` | schema encode\u002Fdecode adapters wrapping a Channel's typed boundaries | crossing a channel boundary with schema-typed input\u002Foutput |\n| `Chunk` | immutable ordered collection optimized for append\u002Fprepend\u002Fconcat | building\u002Ftransforming sequences without mutating the original |\n| `Clock` | service for reading current time (ms\u002Fnanos) and sleeping | time\u002Fsleep access you want to fake in tests via a service |\n| `Combiner` | strategy interface `combine(a,b)` for merging two same-type values (no identity) | passing a reusable merge rule; use `Reducer` if you need an empty value |\n| `Config` | declarative descriptions of config values decoded from a ConfigProvider | reading\u002Fvalidating typed configuration keys with defaults and fallbacks |\n| `ConfigProvider` | data sources (env, objects, .env, dirs) that feed raw values to Config | supplying or composing where `Config` reads its raw values from |\n| `Console` | Effect wrapper over console (log\u002Fgroup\u002Fcount\u002Ftable\u002Ftimer) as a swappable service | logging\u002Fconsole side effects you want swappable in tests |\n| `Context` | typed map of service implementations keyed by Service\u002FReference | building or reading the service environment `R` of effects |\n| `Cron` | recurring calendar schedule from cron expressions or field constraints | matching dates or computing next\u002Fprevious scheduled occurrences |\n| `Data` | constructors for immutable value classes, tagged classes\u002Funions, typed errors | defining `_tag`-carrying domain values and errors with structural equality |\n| `DateTime` | absolute instants plus optional time-zone-aware date-times and arithmetic | zone-aware timestamps, date math, and formatting |\n| `Deferred` | one-time set-once async variable many fibers can await | cross-fiber coordination on a single result\u002Fsignal |\n| `Differ` | interface to compute\u002Fcombine\u002Fapply patches describing value changes | modeling incremental patch-based updates to a value |\n| `Duration` | immutable time span (finite or infinite) for delays\u002Ftimeouts\u002FTTL; ISO 8601 via `formatIso` (`Option\u003Cstring>`, `none` for infinite) and `fromIso` (`Option\u003CDuration>`) | expressing delays, timeouts, intervals, or TTLs; `Schema.DurationFromIsoString` is the schema form of the ISO codec |\n| `Effect` | core `Effect\u003CA,E,R>` type and the main API for building\u002Frunning workflows | creating, composing, recovering, or running effectful programs |\n| `Effectable` | internal: prototype builder + base class to make custom values act as Effects | rarely — making a domain value yieldable in `Effect.gen` |\n| `Equal` | structural equality (`equals`) plus the Equal interface, guards, adapters | comparing values structurally or implementing custom equality |\n| `Equivalence` | reusable `Equivalence\u003CA>` equality predicates and combinators | defining\u002Fcombining custom same-type equality for a purpose |\n| `ErrorReporter` | forwards non-interruption `Cause`s to a callback for logging\u002Fmonitoring | routing Effect failures to external error-tracking systems |\n| `ExecutionPlan` | ordered fallback steps (context\u002Flayer + retries) tried until success | declaring fallback providers\u002Fretry tiers for effects or streams |\n| `Exit` | `Exit\u003CA,E>` value form of a finished Effect (success or `Cause` failure) | inspecting\u002Fmatching a completed Effect result synchronously as data |\n| `Fiber` | handle to a forked effect: await\u002Fjoin\u002Finterrupt, current fiber access | managing forked concurrent work and its lifecycle |\n| `FiberHandle` | scope-bound holder of at most one fiber, replacing\u002Finterrupting prior | tracking a single swappable background fiber tied to a scope |\n| `FiberMap` | scope-bound map of fibers keyed by K, auto-removed on completion | managing keyed background fibers under one scope |\n| `FiberSet` | scope-bound set of many fibers, all interrupted when scope closes | managing a dynamic group of background fibers under one scope |\n| `FileSystem` | portable file system service (read\u002Fwrite\u002Fstream\u002Fglob\u002Fwatch), fails `PlatformError`; sizes are `ByteSize` (see that row), and `File.seek` before the start of the file fails `BadArgument` and leaves the cursor unchanged (`FileSystem.ts:956-958`; the Node implementation is `@effect\u002Fplatform-node-shared`, which the vendored tree does not carry — `effect-v4-source-lookup` says where to read it). `glob` is core's own walk on every platform: wildcard segments match **case-sensitively** even on a case-insensitive volume, while leading literal segments use `stat` and keep the pattern's spelling (`FileSystem.ts:154-156`); patterns use `\u002F` separators | file IO; contract, platform layer provides implementation. **A custom implementation** must supply `readDirectoryEntries` (each entry's `name` and `type`, `\"Unknown\"` allowed). `FileSystem.make(impl)` derives `glob` (with `exists`, `readFileString`, `stream`, `sink`, `writeFileString`) and accepts none of them; apply a custom `glob` afterwards with `FileSystem.FileSystem.of({ ...FileSystem.make(impl), glob })`. A wrapper that changes `readDirectory` must change `readDirectoryEntries` the same way |\n| `Filter` | composable check returning `Result` (pass\u002Ffail) that can also narrow\u002Ftransform | selective matching\u002Frecovery where a predicate must also refine or transform |\n| `Formatter` | renders arbitrary JS values to readable strings with redaction\u002Fcycle handling | formatting values for logs, diagnostics, or error messages |\n| `Function` | core composition helpers: `pipe`, `flow`, `dual`, identity\u002Fconst\u002Fmemoize | composing functions or writing dual direct\u002Fpipe APIs |\n| `Glob` | `experimental` pure matcher over `\u002F`-separated paths with `FileSystem.glob`'s pattern syntax: `make(pattern, { dot? })`, `match` (dual), `escape` | testing a path against a glob with no file-system access; use `FileSystem.glob` to walk a tree |\n| `Graph` | immutable indexed node+edge graph carrying user data on both, mutated only inside a scoped window (`mutate(g, draft => …)`, or `beginMutation`\u002F`endMutation`); directed-vs-undirected is a `Kind` type parameter. 95 exports — `dfs`\u002F`bfs`\u002F`topo`\u002F`externals` walkers, the named algorithms (`dijkstra`, `bellmanFord`, `floydWarshall`, `astar`, `isAcyclic`, `isBipartite`, `connectedComponents`, `stronglyConnectedComponents`), graph set algebra (`compose`, `intersection`, `difference`, `symmetricDifference`, `complement`, `sum`), and `toMermaid` \u002F `toGraphViz` emitters returning a diagram `string` | any graph problem — **do not hand-roll shortest path, topological sort, cycle detection, or SCCs beside it.** `Kind` gates the algorithms at the type level: `topo`\u002F`stronglyConnectedComponents` take `\"directed\"` only, `isBipartite`\u002F`connectedComponents` `\"undirected\"` only, so pick the constructor for the analysis you need (`stronglyConnectedComponents` also throws `GraphError` on an undirected graph at runtime). Reach for `toMermaid` whenever you want a diagram of anything you can model as nodes and edges |\n| `Hash` | computes non-cryptographic structural hashes; interface for custom hash | implementing custom hashing for Equal-based collections |\n| `HashMap` | immutable key\u002Fvalue map (HAMT) keyed by structural equality | need immutable map with object\u002Fstructural keys |\n| `HashRing` | weighted consistent-hashing ring keyed by `PrimaryKey` | routing keys\u002Fshards to nodes with minimal remapping |\n| `HashSet` | immutable set of unique values by Equal\u002FHash | need immutable set with structural-equality membership |\n| `HKT` | type-level: `TypeLambda`\u002F`Kind` higher-kinded encoding | only when authoring generic type classes; agents skip |\n| `Inspectable` | internal: log\u002Finspect formatting protocol for Effect values | implementing custom log\u002Fconsole\u002FJSON rendering; rarely needed |\n| `Iterable` | lazy combinators over any `[Symbol.iterator]` value | transform\u002Fsearch\u002Fgroup iterables without materializing arrays |\n| `JsonPatch` | computes\u002Fapplies deterministic RFC6902 add\u002Fremove\u002Freplace patches | diffing two JSON docs or replaying JSON changes |\n| `JsonPointer` | RFC6901 token escape\u002Funescape helpers | escaping `~`\u002F`\u002F` in JSON Pointer path segments |\n| `JsonSchema` | normalize\u002Fconvert JSON Schema & OpenAPI dialect documents | converting between Draft-07\u002F2020-12\u002FOpenAPI schemas, `$ref` resolution. **Generation lives in `Schema`**: `Schema.toJsonSchemaDocument` (2020-12; `includeAnnotationKey` admits custom keys) then `JsonSchema.toDocumentDraft07` to lower. **The lowering carries unknown and custom keywords through as opaque values**, in place — so an annotation admitted at 2020-12 reaches draft-07 unchanged, and there is nothing to re-graft — the failure to guard against is publishing a key you assumed could not escape. The `$defs` pool maps key-for-key, and annotations move with their node across the coordinate moves (`prefixItems[i]`→`items[i]`, trailing `items`→`additionalItems`). Filtering is the caller's job, upstream of the lowering. Probe evidence: `@effected\u002Fschemastore`'s `__test__\u002Fannotation-carrying.test.ts`, which asserts on raw core output. |\n| `Latch` | reusable open\u002Fclosed fiber coordination primitive | gating fibers until an explicit open\u002Frelease signal |\n| `Layer` | describes acquiring\u002Fwiring services with deps and errors | constructing and composing service dependencies |\n| `LayerMap` | keyed cache of scoped layer-built service contexts | per-tenant\u002Fper-region resource families built on demand |\n| `LayerRef` | refreshable single layer-built context with invalidation | share one scoped layer resource, rebuild on invalidate |\n| `Logger` | loggers, formatters, console\u002Ffile routing, install layers | configuring\u002Fcustomizing how log events are emitted |\n| `LogLevel` | log-level types, ordering, threshold\u002Fenabled helpers | comparing or checking log severities |\n| `ManagedRuntime` | runs many effects against services built once from a Layer | bridging Effect to promise\u002Fcallback\u002Fsync entry points |\n| `Match` | ordered pattern matcher (`Match.type`\u002F`Match.value`); `Match.literals({ ... })` handles a subset of literal values by key, `literalsExhaustive` all of them | pattern-matching on tags, shapes, predicates, literals |\n| `Metric` | counters\u002Fgauges\u002Fhistograms\u002Ffrequencies\u002Fsummaries\u002Ftimers, attached to effects via `Effect.track` | metering an operation — boundaries only; see `effect-v4-observability`. NB there is no `Metric.tagged`\u002F`taggedWithLabels`; attributes are `Metric.withAttributes` |\n| `MutableHashMap` | in-place map mixing native and Equal\u002FHash keys | fast mutable map needing structural-key lookup |\n| `MutableHashSet` | in-place unique set built on MutableHashMap | fast mutable set with structural-equality members |\n| `MutableList` | in-place ordered list; append\u002Fprepend, drain from front | buffering values and draining FIFO in place |\n| `MutableRef` | synchronous in-place single-value reference | non-effectful mutable cell (vs `Ref`) |\n| `Newtype` | compile-time-only branded wrappers over a carrier type | distinguishing same-shape values (e.g. two string ids) |\n| `NonEmptyIterable` | type-level: `Iterable` branded as having ≥1 element | typing guaranteed-non-empty iterables; rarely imported directly |\n| `Number` | helpers over `number`: parse, math, compare, clamp, aggregate | numeric parsing, safe division, ordering, range checks |\n| `Optic` | lens\u002Fprism\u002Foptional focus for immutable read\u002Fupdate | reading\u002Fupdating nested immutable structures without mutation |\n| `Option` | present\u002Fabsent value `Some`\u002F`None`, plus `Option.gen` | modeling optional values instead of null\u002Fundefined |\n| `Order` | comparison functions for ordered values | sorting, min\u002Fmax, ranges, ordered structures |\n| `Ordering` | the `-1\u002F0\u002F1` comparison result plus combinators | working with the output of an `Order` comparison |\n| `PartitionedSemaphore` | concurrency limiter over shared permits grouped by key | fair bounded concurrency across independent key groups |\n| `Path` | path ops service (join\u002Fnormalize\u002Fparse\u002Fresolve); POSIX `Path.layer` built in | path manipulation; contract, platform layer provides (POSIX layer in core) |\n| `Pipeable` | internal: `.pipe(...)` method-chaining interface | only when authoring a pipeable data type; agents skip |\n| `PlatformError` | normalized platform error model (`BadArgument`\u002F`SystemError` reasons) | typing\u002Fhandling FileSystem\u002FTerminal\u002Fsubprocess\u002Fhost IO failures |\n| `Pool` | shares scoped resources borrowed across fibers; `Pool.stats` snapshots `{ idle, used, pending, min, max }` | pooling connections\u002Fclients with TTL and invalidation; `stats` for occupancy metrics (`idle + used` can briefly exceed `max` while an invalidated item is replaced) |\n| `Predicate` | runtime guards and refinements with combinators | type guards, tag\u002Fshape checks, composing predicates — never hand-write `isString`\u002Fobject guards (NB: no `isRecord` on the v4 line; the record-ish guards are `isObject`\u002F`isReadonlyObject`\u002F`isObjectOrArray`) |\n| `PrimaryKey` | protocol exposing a stable string identifier | giving a value a stable string key (requests, ring nodes) |\n| `PubSub` | broadcast hub; each subscriber gets every message | fan-out messaging where subscribers don't compete |\n| `Pull` | internal: one low-level stream pull step (value\u002Ferror\u002Fdone) | only when writing custom Stream\u002FChannel internals; agents skip |\n| `Queue` | async fiber-to-fiber queue; one consumer per value | backpressured\u002Fbounded work handoff between fibers |\n| `Random` | pseudo-random generator exposed as a replaceable Effect service | need effectful\u002Fseeded random numbers, shuffles, or deterministic test randomness |\n| `Rational` | exact fractions over `bigint` numerator and denominator (`makeUnsafe`, `fromBigInt`, arithmetic, `equals`, `toBigDecimal(r, { scale })`), with `Schema.Rational` and `Schema.RationalFromString` | exact ratios such as one third, where `BigDecimal` would have to round; convert to `BigDecimal` at a display or storage edge |\n| `RcMap` | reference-counted map of scoped resources keyed, released when idle\u002Funused | sharing per-key clients\u002Fconnections\u002Fsessions with lifecycle, not general caching |\n| `RcRef` | reference-counted handle sharing one scoped resource across borrowers | share a single lazily-acquired resource; finalize when last borrower leaves |\n| `Record` | immutable helpers over plain string\u002Fsymbol-keyed object dictionaries | working with `{}` dictionaries functionally: map\u002Ffilter\u002Fmerge\u002Flookup without mutation |\n| `Redactable` | protocol for context-aware alternate representations of sensitive objects | building a type that masks itself in logs\u002Ftraces\u002Fserialization |\n| `Redacted` | wrapper hiding a value in string\u002FJSON\u002Finspect output while retaining it | carry secrets\u002Ftokens through code without leaking them in diagnostics |\n| `Reducer` | `Combiner` plus an initial value and fold-an-iterable operation | fold many values into one with an identity\u002Fempty case |\n| `Ref` | fiber-safe mutable cell with effectful get\u002Fset\u002Fupdate\u002Fmodify | hold shared mutable state that composes with Effect concurrency |\n| `References` | built-in `Context.Reference` runtime keys — logging, tracing, stack frames, loggers | read or override runtime diagnostic settings for an effect. **No concurrency key exists** despite the module's own header prose claiming one — concurrency is a per-call `{ concurrency }` option |\n| `RegExp` | native `RegExp` constructor, guard, and literal-escaping helper | build patterns from data-driven text or narrow `unknown` to RegExp |\n| `Request` | typed request value describing one data-load with error\u002Frequirements | define a batchable\u002Fcacheable data query for `Effect.request` |\n| `RequestResolver` | resolver that batches, groups, and completes pending `Request` entries | implement backend batching\u002Fdedup\u002Fcaching behind `Effect.request` |\n| `Resource` | refreshable scoped value caching last acquisition, auto\u002Fmanual refresh | cache a scoped value that must refresh on schedule or on demand |\n| `Result` | plain `Success`\u002F`Failure` data holding an already-computed outcome | represent a settled success-or-error value without running effects (v4's Either successor) |\n| `Runtime` | low-level `makeRunMain` for turning an Effect into a process entry point, the `Teardown` that maps an `Exit` to an exit code (`defaultTeardown`), and `InterruptExitCode`, a service annotated onto an interruption to choose its exit code | writing a platform runner; app code uses platform-provided runners instead. Annotate an interrupt your program raises at a clean end with `Context.make(Runtime.InterruptExitCode, 0)` instead of writing a custom teardown; an unannotated interrupt, such as a signal's, still exits `130` |\n| `Schedule` | policy stepping inputs into outputs plus delays for retry\u002Frepeat\u002Fpace | decide when\u002Fhow often to retry, repeat, or pace an effect |\n| `Scheduler` | controls how runnable fiber tasks are queued, dispatched, and yielded | internal\u002Fadvanced: tune or disable fiber scheduling and yields — usually skip |\n| `Schema` | validate\u002Fdecode\u002Fencode data shapes with codecs, classes, refinements | the primary entry point for any schema, codec, or data validation. Checks include `Schema.isAscii()` (`U+0000`–`U+007F`); codecs include `Schema.DurationFromIsoString` (ISO 8601 string ↔ `Duration`) |\n| `SchemaAST` | runtime tree representation of schemas (nodes, checks, annotations) | advanced machinery: inspect\u002Fbuild\u002Frewrite schema ASTs programmatically |\n| `Schema.SchemaError` | the error a schema decode\u002Fencode fails with: a `SchemaIssue` tree plus a formatted `message`. **Not a module** — it is a class exported from `Schema.ts` (`Schema.ts:1220`), so `import … from \"effect\u002FSchemaError\"` fails to resolve; there is no `src\u002FSchemaError.ts` and no `.\u002FSchemaError` export. Import it as `Schema.SchemaError` | catching\u002Fnormalizing schema failures at a boundary — `Effect.catchTag(\"SchemaError\", …)`. v4 exposes no `Schema` for the issue tree, so it rides in a domain error as `Schema.Defect()` |\n| `SchemaGetter` | one-way optional-in\u002Foptional-out conversions used inside transformations | consumer-facing when authoring a custom decode\u002Fencode direction |\n| `SchemaIssue` | describes and formats decode\u002Fencode\u002Fcheck failures with location | consumer-facing: inspect or format schema validation errors |\n| `SchemaParser` | runs a schema against values (decode\u002Fencode\u002Fvalidate) in many result styles | consumer-facing: execute a schema returning Effect\u002FExit\u002FOption\u002FResult\u002Fsync |\n| `SchemaRepresentation` | JSON-serializable descriptions of schemas plus TS-codegen | machinery: serialize schemas, convert to\u002Ffrom JSON Schema, generate code |\n| `SchemaTransformation` | two-way encode\u002Fdecode conversions connecting two representations | consumer-facing when building a custom bidirectional codec |\n| `SemVer` | strict Semantic Versioning 2.0.0 values: `parse`\u002F`fromInput`, `format`, comparison (`isGreaterThan`, `between`, `clamp`, `Order`\u002F`Equivalence`), `bump*` (major\u002Fminor\u002Fpatch\u002Fpre*), `isPrerelease`, `difference`, plus schemas and string codecs | parsing, comparing or bumping a version string — do not hand-roll a semver regex. Core is enough for a plain compare or bump in code with no kit edge; reach for kit `@effected\u002Fsemver` when the value crosses a kit API or you need a `FromString` codec, an error carrying `input` and `position`, or a `Result` twin (`parseResult`). Never mix kit and core values in one `HashSet`\u002F`HashMap`: kit equality ignores build metadata |\n| `SemVerRange` | npm-style ranges: `parse`, `matches`, `caret`\u002F`tilde`\u002F`exact`\u002F`any`\u002Fcomparators, `maxSatisfying`\u002F`minSatisfying` | asking whether a version satisfies a range, or picking the best match from a list. Core is enough for a plain match; reach for kit `@effected\u002Fsemver`'s `Range` for range algebra (`intersect`, `isSubset`, `simplify`), parse errors with a position, or a `Result` twin |\n| `Scope` | lifetime boundary collecting finalizers run with an `Exit` on close | directly create\u002Ffork\u002Fclose scopes; most code uses `Effect.scoped`\u002F`Layer` |\n| `ScopedCache` | cache whose entries own scopes, releasing resources on eviction | cache resource-backed values with per-entry cleanup and expiry |\n| `ScopedRef` | current value plus the scope owning it; swaps acquire\u002Frelease atomically | hold a swappable resource handle (client\u002Fconnection) with clean replacement |\n| `Semaphore` | permit pool limiting concurrent access to a shared resource | bound concurrency around an effect via acquire\u002Frelease of permits; `Semaphore.takeScoped(sem, n)` holds permits until the surrounding `Scope` closes |\n| `Sink` | stream consumer folding\u002Fcollecting a `Stream`'s output into one result | terminating a Stream: collect, fold, count, or search its elements |\n| `Stdio` | argv and stdin\u002Fstdout\u002Fstderr of the CURRENT process as an Effect service | standard-IO access (not spawning); contract, platform layer provides — but core ships `Stdio.layerTest(Partial\u003CStdio>)` for echo-testing without one |\n| `Stream` | effectful source emitting many values over time with error\u002Frequirements | model pull-based\u002Fstreaming data: queues, callbacks, files, paginated sources |\n| `String` | pipe-friendly helpers over TypeScript `string` values | functional string ops: trim\u002Fcase\u002Fslice\u002Freplace\u002FOption-returning search |\n| `Struct` | immutable helpers over plain TypeScript objects (pick\u002Fomit\u002Frename) | transform object shapes functionally and derive comparisons |\n| `SubscriptionRef` | `Ref` that publishes every committed change as a `changes` stream | hold state others must observe reactively over time |\n| `Symbol` | runtime predicate narrowing `unknown` to a primitive `symbol` | guarding an `unknown` before using it as a symbol key\u002Fdiscriminant |\n| `SynchronizedRef` | `Ref` whose updates run one-at-a-time, safe for effectful transitions | serialize state updates when the next value is computed by an effect |\n| `Take` | stored representation of one stream pull: batch, failure, or done | low-level stream plumbing: inspecting buffered pull results |\n| `Terminal` | interactive terminal service (size, line\u002Fkey input, output); `size` is a scoped queue that starts with the current `Size` and receives each resize | terminal capabilities; contract, platform layer provides. A hand-built `Terminal.make` must supply `size` beside `columns`, `rows`, `readInput`, `readLine` and `display` |\n| `TextDiff` | `experimental` edit scripts over arrays, lines or code points: `diff`\u002F`diffWith`, `apply`\u002F`applyText`, `invert`, `unified` formatting, `maxEdits` to bound search | computing a diff or a unified patch — do not pull in a diff library |\n| `Tracer` | low-level span\u002Ftracing model and tracer service | define\u002Finspect spans or a custom tracer; usually via higher-level tracing APIs |\n| `Trie` | immutable string-keyed prefix tree for prefix\u002Flongest-match lookup | autocomplete, route tables, dictionaries, prefix-based key lookup |\n| `Tuple` | immutable helpers over fixed-length arrays preserving element positions | build\u002Ftransform positional tuples and derive tuple comparisons |\n| `TxChunk` | transactional `Chunk` stored in a `TxRef` | STM-family: atomic sequence\u002Fbuffer updates within a transaction |\n| `TxDeferred` | write-once transactional cell completing to a `Result`, retrying readers | STM-family: coordinate\u002Fawait a one-shot value across transactions |\n| `TxHashMap` | transactional `HashMap` in a `TxRef` | STM-family: atomic keyed registry\u002Fcounter\u002Findex updates |\n| `TxHashSet` | transactional `HashSet` in a `TxRef` | STM-family: atomic set membership changes alongside other state |\n| `TxPriorityQueue` | transactional priority queue ordered by an `Order`, retrying take\u002Fpeek | STM-family: ordered coordination queue with transactional waiting |\n| `TxPubSub` | transactional publish\u002Fsubscribe hub over `TxQueue` subscribers | STM-family: broadcast values atomically within transactions |\n| `TxQueue` | transactional queue with enqueue\u002Fdequeue handles, retrying when blocked | STM-family: coordinate producers\u002Fconsumers within transactions |\n| `TxReentrantLock` | transactional reentrant read\u002Fwrite lock tracked by fiber | STM-family: shared\u002Fexclusive locking that composes in transactions |\n| `TxRef` | core transactional reference journaled and committed via `Effect.tx` | STM-family: the base transactional cell all Tx collections build on |\n| `TxSemaphore` | transactional fixed-capacity permit pool in a `TxRef` | STM-family: permit acquisition that commits with other transactional state |\n| `TxSubscriptionRef` | transactional `Ref` publishing committed changes to subscribers | STM-family: observable transactional state with current-value replay |\n| `Types` | compile-time-only utility types (tuples, unions, variance, mutability) | type-level plumbing — no runtime; agents skip unless authoring types |\n| `UndefinedOr` | helpers for plain `A \\| undefined` values | handle optionality with `undefined` without wrapping in `Option` |\n| `Unify` | type-level unification protocol collapsing unions to public data types | maintainer\u002Fadvanced type plumbing — skip |\n| `Utils` | internal generator machinery behind `Effect.gen`\u002FHKT | internal — skip |\n| `Version` | the `effect` version string core stamps into telemetry headers, resources and scopes: `getCurrentVersion()` \u002F `setCurrentVersion(v)`. `@stability unstable` | reading or overriding the version an exporter reports — layers already built keep the value they read |\n| `testing\u002FTestClock` | controllable `Clock` service driving virtual time | make sleep\u002Ftimeout\u002Fschedule\u002Fretry tests deterministic by advancing time |\n| `testing\u002FTestConsole` | test `Console` capturing log\u002Ferror calls in memory. `@stability unstable` | assert on console output deterministically in tests |\n| `testing\u002FTestSchema` | assertions for one schema: `new TestSchema.Asserts(schema)` with `make`, `decoding()` \u002F `encoding()` (`succeed`\u002F`fail` as Promises, `succeedEffect`\u002F`failEffect` as lazy Effects), `arbitrary()` and `verifyRoundTrip` \u002F `verifyRoundTripEffect`; the property checks run `Arbitrary.checkEffect`. `@stability unstable` | testing that a schema constructs, decodes, encodes and round-trips correctly. The `Effect`-suffixed forms use the calling fiber's services, so they compose inside `it.effect`. **There is no `testing\u002FFastCheck`** — there is no fast-check bridge; property generation is `Arbitrary` |\n\n## The unstable-stability namespaces (`effect\u002F\u003Cns>`)\n\nBreaking changes allowed in minors; the `@stability unstable` annotation is what\nmarks these, not a separate import path — they import exactly like any other\ncore module. These namespaces are where the consolidated core put functionality that ships as\nseparate packages nowhere else: HTTP, RPC, cluster, SQL, CLI and the rest live\nhere, and the only packages outside `effect` are platform-, provider- or\ntechnology-specific *implementations* (`@effect\u002Fplatform-*`, `@effect\u002Fsql-*`,\n`@effect\u002Fai-*`, `@effect\u002Fopentelemetry`, `@effect\u002Fvitest`). See\n`effect-v4-services-layers` for the require-in-`R`-never-own-a-backend rule that\nfollows from it.\n\n| Namespace | What it is | When to reach for it |\n| --- | --- | --- |\n| `ai` | provider-neutral AI: `LanguageModel`, `Chat`, `Tool`\u002F`Toolkit`, MCP schema\u002Fserver, an `experimental` scoped MCP **client** (`McpClient.layerStdio`\u002F`layerHttp`, `McpClient.toolkit`), `experimental` AG-UI protocol support (`AgUiSchema` events, `AgUi`, `AgUiServer`), and `WorkloadIdentity`, which authenticates an `HttpClient` by exchanging a workload identity token for a cached access token (the providers' `AnthropicWorkloadIdentity`, `OpenAiWorkloadIdentity` and `OpenRouterWorkloadIdentity` wrap it) | building AI features against a provider-agnostic surface (`@effect\u002Fai-*` provides). `Tool.make`\u002F`Tool.dynamic` take `toModelOutput` to send text, images and files to the model in place of the serialized result; `Tool.ParametersDecodingServices\u003CT>` names the services a tool's parameter schema needs to decode. `McpTest.makeClient(registrations, options?)` builds an in-process MCP client and server in the surrounding `Scope` for tests; MCP wiring → `effect-v4-mcp` |\n| `arbitrary` | the native property-testing engine, one module `Arbitrary`: `schema`, `Constant`, `map`\u002F`filter`\u002F`filterMap`\u002F`flatMap`\u002F`all`, `sampleEffect`, `checkEffect`, `formatCheckFailure`, `CheckOptions` | deriving generators from a Schema for `it.prop`\u002F`it.effect.prop`, or running a property outside vitest — replaced `effect\u002Ftesting\u002FFastCheck` and `Schema.toArbitrary`. It has **no** `oneof`\u002F`constantFrom`; choice and collections are Schemas — see `effect-v4-schema\u002Freferences\u002F11-generation-and-tooling.md` for the one collection combinator (`Arbitrary.array`) that does exist independent of Schema. Traps and translations → `effect-v4-testing`, surface → `effect-v4-schema\u002Freferences\u002F11-generation-and-tooling.md` |\n| `cli` | the v4 CLI framework: `Command`, `Flag`, `Argument`, `Prompt`, completions, `TerminalCapabilities` (the colour\u002FTTY reference built-in help follows), and `CommandSpec` (`resolve(cli, path)` gives a lossless projection of one command path, its flags' scope, requiredness, fallbacks and `Flag.annotate`\u002F`Argument.annotate` metadata) | building a command-line tool — see `effect-v4-cli`. `CommandSpec` when generating documentation or a reference page from the command tree instead of walking `Command` internals |\n| `cluster` | entity sharding runtime: `Sharding`, `Entity`, runners, message storage, and `MessageRetention.make` (deletes a persisted entity's old completed requests through `MessageStorage.deleteProcessed`, which a custom storage must implement) | distributing stateful entities across machines |\n| `crypto` | `Digest` (MD5, SHA-1\u002F256\u002F384\u002F512, one-shot), `SecureRandom` (bytes, ints, shuffle, UUIDv4\u002Fv7, ULID), `Mac` (HMAC, plus `Mac.timingSafeEqual`), `Signature` (Ed25519, ECDSA, RSA-PSS, RSASSA-PKCS1-v1_5), `Aead` (AES-GCM, ChaCha20-Poly1305), `Cipher` (AES-CTR\u002FCBC, unauthenticated), `Kdf` (HKDF, PBKDF2, Argon2id), `KeyAgreement` (X25519, ECDH), `KeyWrap` (AES-KW, RSA-OAEP), `KeyFormat` (SPKI\u002FPKCS#8\u002FJWK\u002FPEM import and export), `WebCrypto` (the `Context.Reference` the layers run on, default `globalThis.crypto`) and `CryptoError` | any cryptography — require the family service in `R`; see the sharp corners below for what to provide and how `Digest` fails |\n| `devtools` | client\u002Fserver wiring an Effect runtime to the devtools tracer | connecting a program to Effect devtools |\n| `encoding` | `Base64`, `Base64Url`, `Hex` and `EncodingError` (the `stable` ones: encode\u002Fdecode between strings, UTF-8 and bytes with `Result`-typed decode errors); `Ndjson` and `Sse` channel codecs; `SchemaBinary` (a compact binary codec derived from a Schema's encoded side); `Toml`, `Yaml` and `Ini` parsers; `Jsonc` and `Json5` (`parse` returns a `Result` failing with `EncodingError`); `Csv` (RFC 4180 stream encode\u002Fdecode with a configurable delimiter and schema adapters); streaming archive and document codecs: `Tar` (unstable), `Zip` and `Xml` (`experimental`), and `JsonArray` (one JSON array as a stream of elements, optionally by JSON Pointer) | Base64\u002Fhex conversion; framing streams as NDJSON or server-sent events; parsing a config document when the `@effected\u002Ftoml`\u002F`@effected\u002Fyaml`\u002F`@effected\u002Fjsonc` fidelity guarantee is not needed |\n| `eventlog` | typed, replicated (optionally encrypted) event journal with SQL backends; `EventRow` for convergent row `set`\u002F`patch`\u002F`remove` events | event-sourced state that syncs\u002Freplicates |\n| `graphql` | typed GraphQL operations: `GraphQL`, `GraphQLGroup`, `GraphQLResolver`, `GraphQLClient`, `GraphQLMiddleware`, `GraphQLProtocol` (HTTP and subscription transports, partial results, serializable errors, cursor pagination). `@stability experimental` | calling a GraphQL API from Effect — the module is client-side (operations, a client, its transports and batching resolvers); it does not serve one. **Talking to GitHub's GraphQL API is `@effected\u002Fgithub`'s job**, not this module's |\n| `http` | HTTP client + server: `HttpClient`, `FetchHttpClient`, router, middleware | any HTTP work — clients (see runtimes precedent) or servers. Branching on a client failure: see the `reason` trap below; MIME lookup is `http\u002FMime` (`getType`\u002F`getExtension`\u002F`getAllExtensions`) — there is no `mime` npm dependency; `HttpClient.TracerPropagationEnabled` (a `Context.Reference`, on by default) controls whether requests carry `b3`\u002F`traceparent`, so turn it off for a client talking to a third party; `HttpTraceContext.fromHeaders` reads inbound trace context; `HttpClient.timeout(duration)` fails a request that runs too long with an `HttpClientError`; `ProblemDetails` is the RFC 9457 `application\u002Fproblem+json` value, codec and response constructor |\n| `net` | `IpInterface`, `IpNetwork`, `NetAddress` — pure, canonical IPv4\u002FIPv6 addresses and CIDR prefixes (`NetAddress.loopbackAddresses` names both loopbacks); `Host` — host names and unresolved `host:port` endpoints, plus `toFullyQualified`\u002F`toRelative` and a pure `parseHostsFile`; `Dns` and `AddressResolver` — resolution services a runtime package provides | parsing\u002Fnormalizing an address, network prefix, host name or hosts file without a third-party `ipaddr`-style library; require `Dns`\u002F`AddressResolver` in `R` when the program must resolve names |\n| `http-api` | schema-first declarative HTTP APIs with OpenAPI\u002FSwagger output | defining a typed HTTP API contract shared by server and client. `HttpApiClient.decodeResponse` decodes a raw endpoint response with the endpoint's declared success and error schemas, e.g. after a `responseMode: \"response-only\"` call |\n| `jose` | `Jwk` (import\u002Fexport, thumbprints, SPKI\u002FPKCS#8 DER or PEM), `Jwks` (key-set resolution), `Jws`, `Jwe` (`dir`\u002FA256GCM), `Jwt` (schema-typed claims, verified before decoding) and `JoseError`; compact serialization only, HS\u002FRS\u002FPS\u002FES 256\u002F384\u002F512 and EdDSA | signing or verifying JWTs and JWS without a third-party JOSE library. Bound untrusted token length yourself before verifying or decoding; the module imposes no limit. The kit's `@effected\u002Fjwt` and `@effected\u002Foidc` are the house JWT and OIDC surfaces |\n| `observability` | OTLP + Prometheus exporters for traces\u002Fmetrics\u002Flogs; `OtlpProxy` (`layer`\u002F`layerFromConfig`\u002F`make`) mounts `POST \u002Fv1\u002Ftraces`, `\u002Fv1\u002Flogs` and `\u002Fv1\u002Fmetrics` on an `HttpRouter` and forwards browser OTLP exports upstream, adding credentials on the server | exporting telemetry without the `@effect\u002Fopentelemetry` SDK; `OtlpProxy` when a browser exports OTLP and the vendor key must stay out of its bundle |\n| `persistence` | `KeyValueStore` (memory\u002Ffs\u002FSQL; a `make`\u002F`makeStringOnly` store must implement `keys`), `PersistedCache`\u002F`PersistedQueue`, `RateLimiter`, `UserDirectories` (home\u002Fconfig\u002Fdata\u002Fcache\u002Fstate directories by XDG and platform convention; `layerPlatform`), `Redis` (the client contract; `Redis.reserve` leases a dedicated pooled connection for blocking commands such as `XREAD BLOCK`\u002F`BLPOP`), and `CircuitBreaker` (`@stability experimental`: keyed circuits, `consecutive`\u002F`rate` trip policies, `layerStoreMemory`\u002F`layerStoreRedis`; `HttpClient.withCircuitBreaker` wraps a client) | durable KV, request-level durable caching, rate limiting, failing fast on an unreliable dependency (`CircuitBreaker` never waits — put `Effect.retry`\u002F`Effect.timeout` inside it). For per-application directories, `UserDirectories` folds the XDG variable and the native directory into one answer per kind; reach for kit `@effected\u002Fxdg` when you need XDG search paths (`XDG_CONFIG_DIRS`\u002F`XDG_DATA_DIRS`), the runtime directory, or the native directories kept separate from XDG |\n| `process` | `ChildProcess` Command values + `ChildProcessSpawner` service; `CommandLine` — `Word` (`string \\| Redacted\u003Cstring>`), `template` (template text to argument list), and `quote`\u002F`join`\u002F`display` for one command-line string in an explicit `format` (`\"posix\"`, `\"powershell\"`, `\"windows\"`), with `display` masking `Redacted` arguments | spawning subprocesses (`@effected\u002Fgit` is the house example; require in `R`); `CommandLine` when building a string for a shell or SSH, or rendering a command for a log |\n| `reactivity` | atom-based reactive state (`Atom`, `AtomRegistry`, hydration) | framework-facing reactive state (`@effect\u002Fatom-*` binds it) |\n| `rpc` | schema-backed RPC: groups, client\u002Fserver, serialization, worker transport; `OpenRpc.fromRpcGroup` derives an OpenRPC document from a group | typed request\u002Fresponse between processes without hand-rolling HTTP |\n| `schema` | `Model` (DB-vs-JSON variant models) + `VariantSchema` | one model with per-context variants (insert\u002Fupdate\u002Fjson) |\n| `socket` | `Socket` + `SocketServer` contracts | raw bidirectional connections |\n| `sql` | the SQL core: `SqlClient`, `Statement`, `Migrator`, models\u002Fresolvers | any SQL — drivers live in `@effect\u002Fsql-*` (`@effected\u002Fstore` is the house example). A driver's own client (`SqliteClient.SqliteClient`) extends `SqlClient.Base`, not `SqlClient`, so it is not assignable to the generic service: a migration or helper that needs `SqlClient` yields `SqlClient.SqlClient`, which every driver layer also provides |\n| `workflow` | durable workflows: `Workflow`, `Activity`, durable clock\u002Fdeferred\u002Fqueue | long-running resumable multi-step operations (application tier — see roadmap note) |\n| `workers` | `Worker`\u002F`WorkerRunner`\u002F`Transferable` for worker threads | offloading work to browser\u002FNode\u002FBun workers |\n\n## Sharp corners the index surfaced (not covered elsewhere)\n\n- `Queue` is `Queue\u003CA, E>` in v4 — it carries an error channel and can\n  `fail`\u002F`done`, not just hold values.\n- `Optic` is in core (there is no `@effect\u002Foptic` to install) and is Schema-aware.\n- Transactional state is the `Tx*` family: `TxRef` + `Effect.tx`, with a core\n  module per collection. There is no `STM`\u002F`TRef`\u002F`TMap`\u002F`TQueue`.\n- Runtime knobs (concurrency, logging, tracing settings) live in `References`\n  as `Context.Reference` keys; scheduling internals in `Scheduler`.\n- `UndefinedOr` exists for `A | undefined` ergonomics — not every optional\n  needs `Option`.\n- Testing utilities live in core under `effect\u002Ftesting\u002F*` — no separate\n  test-support package.\n- **`effect\u002Fcrypto` is where crypto lives, and nothing in the platform bundles\n  provides it.** Each family (`Digest`, `SecureRandom`, `Mac`, `Signature`,\n  `Aead`, `Cipher`, `Kdf`, `KeyAgreement`, `KeyWrap`) is a `Context.Service`\n  you require in `R`. `NodeServices.layer` carries none of them: provide\n  `NodeCrypto.layer` (every family) or one family layer such as\n  `NodeCrypto.layerDigest` from `@effect\u002Fplatform-node`, or the core\n  `\u003CFamily>.layerWebCrypto` on any runtime with WebCrypto (Workers included).\n  In a test, provide the real `layerWebCrypto` or `Layer.mock(Digest.Digest,\n  { digestHex })`; there is no `TestCrypto`.\n- **`Digest` cannot fail typed, so a missing `crypto.subtle` is a defect.** Both\n  members return `Effect\u003C…>` with a `never` error channel (`crypto\u002FDigest.ts:135-144`).\n  `Digest.layerWebCrypto` builds even where `crypto.subtle` is absent (a\n  browser's insecure context), and then every SHA digest **dies**; MD5 keeps\n  working because it is pure TypeScript (`crypto\u002FDigest.ts:151-153`). Never\n  model \"digest failed\" as a domain error reason — there is nothing to catch.\n- **`Digest.digest` is one-shot, and that is a dependency decision.** The\n  signature is `digest(algorithm, data: Uint8Array)` — it takes the whole\n  payload at once and there is **no incremental\u002Fstreaming form**. So hashing a\n  file, a tarball or any input without a known upper bound means buffering all\n  of it in memory, where `node:crypto`'s `createHash(...).update(chunk)` walks a\n  stream at constant cost. Digesting a key, a token or a short manifest is a\n  fit; digesting an artifact is not. In the kit this is exactly why\n  `github-actions`' `Artifact` and `PackageManagerInstaller` stay on\n  `node:crypto` — both fold a `Stream` chunk-by-chunk on purpose.\n- **Core `Cache` is interrupt-clean, like `Effect.cached`.** Interrupting the\n  only awaiter **discards** the in-flight entry and the next `get` re-runs the\n  lookup; concurrent gets still de-dupe to one lookup. Probed with a\n  poisoning control that fired. Neither primitive stores an interrupt, so the\n  hazard they share is the failed lookup, below.\n- **…but a default-TTL `Cache` memoizes a FAILED lookup for the process\n  lifetime.** `defaultTimeToLive` is `Duration.infinity` (`Cache.ts:332`), and\n  the cache \"stores successful **and failed** lookup results\" (`Cache.ts:4`).\n  One transient network blip is therefore permanent. Wherever failures are\n  transient, make the TTL exit-dependent — the `timeToLive` option takes\n  `(exit, key)` for exactly this (`Cache.ts:206`; the same two-argument shape on\n  the cache's own field at `Cache.ts:118`). Note `Cache.make`'s `timeToLive` is\n  a plain `Duration.Input` with no exit access (`Cache.ts:307`) — the\n  exit-dependent form requires `makeWith`:\n\n  ```ts\n  Cache.makeWith(lookup, {\n   capacity: 1000,\n   timeToLive: (exit) => (Exit.isSuccess(exit) ? \"1 hour\" : Duration.zero),\n  })\n  ```\n\n- `HttpClientRequest.bearerToken` accepts a **`Redacted` directly**\n  (`token: string | Redacted.Redacted`, `http\u002FHttpClientRequest.ts:445`;\n  `basicAuth` likewise). A runtime token flows into request construction with **no\n  declassification step at all** — which is what lets a package keep its\n  secret-handling seam to one module instead of granting every request builder an\n  exception to it. Do not reach for `Redacted.value` here.\n\n## How the skills divide the territory\n\nThis index routes. For patterns: `effect-v4-idioms` (errors, resources,\nfibers), `effect-v4-schema` (everything Schema), `effect-v4-services-layers`\n(Context\u002FLayer discipline), `effect-v4-testing` (the test idioms),\n`effect-v4-observability` (spans\u002Flogs\u002Fmetrics), `effect-v4-cli` (`cli`),\n`effect-v4-source-lookup` (how to verify any row here against the source).\n\n### `HttpClientError`: the `reason` tags are not the type names\n\nA client failure is one `HttpClientError` whose top-level `_tag` is always\n`\"HttpClientError\"`, so branch on `error.reason._tag`. The values are the trap.\nThe reason type is declared in two layers, and **both layer names are\nthemselves unions, so neither ever appears as a `_tag`** (verified against\n`http\u002FHttpClientError.ts:402,411,420`):\n\n```ts\nexport type RequestError = TransportError | EncodeError | InvalidUrlError\nexport type ResponseError = StatusCodeError | DecodeError | EmptyBodyError\nexport type HttpClientErrorReason = RequestError | ResponseError\n```\n\nSo `error.reason._tag` is exactly one of **six** values: `\"TransportError\"`,\n`\"EncodeError\"`, `\"InvalidUrlError\"`, `\"StatusCodeError\"`, `\"DecodeError\"`,\n`\"EmptyBodyError\"`. A retry policy written `error.reason._tag === \"ResponseError\"`\n(or `=== \"RequestError\"`) **never matches**, so it silently retries nothing —\na live-looking branch that is dead code, and green tests will not catch it.\n\nWhat makes the wrong guess feel confirmed: `ResponseError` *is* a real tagged\nclass elsewhere, at `http\u002FHttpServerError.ts:210`. Same name, different\nmodule, and it is a server error rather than a client one. Timeouts are separate\nagain — `Cause.isTimeoutError`, not a `reason`.\n","# Effect v4 module index\n\nEvery module of `effect@4` core, one row each: **what it is**, **when to reach\nfor it**. This skill exists so the other skills can stop explaining what things\nare and spend their space on patterns — and so no one designs a capability core\nalready ships (the `effect-v4-planning` contract-inventory gate).\n\n**Where things live.** Every row's source is the vendored tree's\n`packages\u002Feffect\u002Fsrc\u002F\u003CName>.ts` (testing modules under\n`src\u002Ftesting\u002F`, the namespace modules below under `src\u002F\u003Cns>\u002F`; resolve the\ntree root via `effect-v4-source-lookup`). The vendored\nsubmodule is pinned to the installed `effect` release and is the authority on existence,\nsignatures, and — read alongside a probe — semantics (`effect-v4-source-lookup`\nowns the evidence ladder). It is also the **style oracle**: before building\nanything module-shaped, read how core writes the analogous module.\n\n**Stability split.** A module's stability is an annotation, not a separate\nimport path — every module in core imports as `effect\u002F\u003CName>` or\n`effect\u002F\u003Cns>\u002F\u003CName>` alike. Every module and every directly importable export\ncarries an explicit `@stability` tag: `stable` follows strict semver,\n`unstable` may break in a minor release. The namespace modules below (`ai`,\n`cli`, `http`, `http-api`, `sql`, and the rest of the table under \"The\nunstable-stability namespaces\") are `unstable`, and so are these top-level\nmodules — **including the platform contracts**: `Arbitrary`, `ByteSize`, `Bytes`,\n`ChannelSchema`, `ErrorReporter`, `ExecutionPlan`, `FileSystem`,\n`Glob` (`experimental`), `Graph`, `HashRing`, `LayerMap`, `LayerRef`, `Newtype`,\n`PartitionedSemaphore`, `Path`, `PlatformError`, `SemVer`, `SemVerRange`,\n`Stdio`, `Terminal`, `TxChunk`, `Version`, `TextDiff` (`experimental`), plus `testing\u002FTestConsole` and `testing\u002FTestSchema`.\nUnder `effect\u002Fencoding`, `Base64`, `Base64Url`, `EncodingError` and `Hex` are\n`stable`; the rest are `unstable`. Every `effect\u002Fcrypto` and `effect\u002Fjose`\nmodule is `unstable`. A few symbols in otherwise-stable modules\ncarry the tag too — the network-address, cookie, header, URL-params, `Graph` and `ByteSize` schemas\nin `Schema`, `Effect.withExecutionPlan`\u002F`withErrorReporting`,\n`Stream.withExecutionPlan`\u002F`limitBytes`, `Config.ByteSize`, `Logger.toFile` —\nand so does any API that exposes a third-party dependency's types. Read the tag\nin the vendored source before building on an API\n(`grep -n \"@stability\" $SRC\u002Fpackages\u002Feffect\u002Fsrc\u002F\u003CName>.ts`), and keep unstable\nones behind one seam of your own so a minor release has a single place to fix.\nRequiring an unstable platform contract such as `FileSystem` in `R` is still\nthe house default (`effect-v4-services-layers`); the tag means a minor release\ncan change its shape, so re-verify your usage when the installed `effect`\nmoves.\n\n## Routing by task\n\nThe module tables below are keyed by *name*. These rows are keyed by what you\nwere about to go build, because each one has been reached for by its task\nphrasing and missed on its module name.\n\n| You want to… | Reach for | Note |\n| --- | --- | --- |\n| **spawn a subprocess \u002F run a command \u002F shell out** | `effect\u002Fprocess` — `ChildProcess` (command values) + `ChildProcessSpawner` (the service) | NOT `cli`'s `Command`, which is the CLI *declaration*. Core declares the contract and ships **no layer**: require `ChildProcessSpawner` in `R`, let the app provide `NodeServices.layer`. Never hand-roll `node:child_process`. Arguments are `CommandLine.Word` (`string \\| Redacted\u003Cstring>`), and a template with shell syntax (`\\|`, `$HOME`, `*`) throws `CommandLineError` when `make` is called. |\n| **hash, HMAC, sign, encrypt, derive a key, or draw secure random bytes \u002F a UUID** | `effect\u002Fcrypto` — `Digest`, `Mac`, `Signature`, `Aead`\u002F`Cipher`, `Kdf`, `SecureRandom` (each a service) | No `effect\u002FCrypto` module exists. Require the service in `R` and provide it at the edge: `NodeCrypto.layer` (every family) or a family layer such as `NodeCrypto.layerDigest` from `@effect\u002Fplatform-node`, or core's `\u003CFamily>.layerWebCrypto` on any WebCrypto runtime. **`NodeServices.layer` carries no crypto.** JOSE (JWS\u002FJWE\u002FJWT\u002FJWK\u002FJWKS) is `effect\u002Fjose`. |\n| **cache an effectful lookup with a TTL and in-flight de-duplication** | core `Cache` — `Cache.makeWith(lookup, { capacity, timeToLive })`, or `Cache.make` for a fixed TTL | Already does both jobs: it \"shares an in-progress lookup when multiple callers request the same missing key\" (`Cache.ts:4`) and expires by `timeToLive` (`Cache.ts:118`). Do not build a promise-map de-duplicator beside it — but read the two `Cache` sharp corners below before choosing a TTL. |\n| **write to stdout\u002Fstderr, or read argv\u002Fstdin, from a library** | core `Stdio` — require `Stdio` in `R` | `Stdio.layerTest(impl)` (`Stdio.ts:166`) takes a `Partial\u003CStdio>` and lets you echo-test the output **with no platform package installed**. The real implementation still comes from `@effect\u002Fplatform-*` at the app edge. Do not `console.log` from library code to dodge the wiring. |\n\n## Core modules\n\n| Module | What it is | When to reach for it |\n| --- | --- | --- |\n| `Array` | helpers over JS arrays, readonly and non-empty arrays (map\u002Fsort\u002Fgroup\u002Fsplit\u002Freduce) | transforming, grouping, or combining array-shaped collections immutably |\n| `BigDecimal` | arbitrary-precision decimal (bigint digits + scale) with arithmetic and formatting | exact decimal math for money\u002Fquantities where `number` rounding fails |\n| `BigInt` | helpers over native `bigint`: arithmetic, comparison, safe parsing to `Option` | working with `bigint` values and needing safe parse\u002Faggregate\u002Forder |\n| `Boolean` | helpers over `boolean`: logical ops, lazy branching, ordering, reducing | combining booleans or choosing between lazy branches |\n| `Brand` | compile-time nominal tags on structurally-identical values, optionally validating | keeping `Positive`\u002F`UserId`-style values from mixing without runtime cost |\n| `ByteSize` | a branded non-negative `bigint` byte count (`ByteSize.ts:32`) with unit constructors (`bytes`, `kilobytes`\u002F`kibibytes` … `quettabytes`), `fromInput`\u002F`fromInputUnsafe` over `ByteSize.Input = ByteSize \\| bigint \\| number \\| string`, `toBigInt`\u002F`toNumber` (Option)\u002F`toNumberUnsafe`, `sum`\u002F`subtract`\u002F`times`\u002F`divide`, `Order`\u002F`Equivalence`\u002F`between`\u002F`clamp`, `format` | any byte quantity — it **replaces `FileSystem.Size`\u002F`SizeInput`**, which do not exist: `File.Info.size` and `blksize` are `ByteSize` (`FileSystem.ts:1103-1104`), `FileSystem.stream`'s `bytesToRead`\u002F`offset` are `ByteSize.Input` (`:378-380`), `File.seek` takes a `bigint` and returns one (`:958`), `read`\u002F`write` return `number` (`:964`, `:975`), `readAlloc`\u002F`truncate` take `number` (`:970-974`). Reach for `ByteSize.toNumberUnsafe(info.size)` at a `Buffer` boundary, never `Number(info.size)` spelled by hand |\n| `Bytes` | helpers over `Uint8Array`: `concat`, `Equivalence`, `Order` | joining or comparing byte arrays without a `Buffer` dependency |\n| `Cache` | concurrent cache of Effect lookup results with capacity\u002FTTL and in-flight sharing (`make` = fixed TTL, `makeWith` = per-entry TTL from the `Exit`) | memoizing an effectful lookup by key with dedupe\u002Fexpiry — this is the whole feature; do not hand-roll an in-flight promise map |\n| `Cause` | full structured failure record: typed errors, defects, interruptions, annotations | inspecting or formatting why an Effect failed without collapsing it |\n| `Channel` | low-level bidirectional streaming primitive underlying Stream and Sink | implementing custom stream operators; app code uses Stream\u002FSink instead |\n| `ChannelSchema` | schema encode\u002Fdecode adapters wrapping a Channel's typed boundaries | crossing a channel boundary with schema-typed input\u002Foutput |\n| `Chunk` | immutable ordered collection optimized for append\u002Fprepend\u002Fconcat | building\u002Ftransforming sequences without mutating the original |\n| `Clock` | service for reading current time (ms\u002Fnanos) and sleeping | time\u002Fsleep access you want to fake in tests via a service |\n| `Combiner` | strategy interface `combine(a,b)` for merging two same-type values (no identity) | passing a reusable merge rule; use `Reducer` if you need an empty value |\n| `Config` | declarative descriptions of config values decoded from a ConfigProvider | reading\u002Fvalidating typed configuration keys with defaults and fallbacks |\n| `ConfigProvider` | data sources (env, objects, .env, dirs) that feed raw values to Config | supplying or composing where `Config` reads its raw values from |\n| `Console` | Effect wrapper over console (log\u002Fgroup\u002Fcount\u002Ftable\u002Ftimer) as a swappable service | logging\u002Fconsole side effects you want swappable in tests |\n| `Context` | typed map of service implementations keyed by Service\u002FReference | building or reading the service environment `R` of effects |\n| `Cron` | recurring calendar schedule from cron expressions or field constraints | matching dates or computing next\u002Fprevious scheduled occurrences |\n| `Data` | constructors for immutable value classes, tagged classes\u002Funions, typed errors | defining `_tag`-carrying domain values and errors with structural equality |\n| `DateTime` | absolute instants plus optional time-zone-aware date-times and arithmetic | zone-aware timestamps, date math, and formatting |\n| `Deferred` | one-time set-once async variable many fibers can await | cross-fiber coordination on a single result\u002Fsignal |\n| `Differ` | interface to compute\u002Fcombine\u002Fapply patches describing value changes | modeling incremental patch-based updates to a value |\n| `Duration` | immutable time span (finite or infinite) for delays\u002Ftimeouts\u002FTTL; ISO 8601 via `formatIso` (`Option\u003Cstring>`, `none` for infinite) and `fromIso` (`Option\u003CDuration>`) | expressing delays, timeouts, intervals, or TTLs; `Schema.DurationFromIsoString` is the schema form of the ISO codec |\n| `Effect` | core `Effect\u003CA,E,R>` type and the main API for building\u002Frunning workflows | creating, composing, recovering, or running effectful programs |\n| `Effectable` | internal: prototype builder + base class to make custom values act as Effects | rarely — making a domain value yieldable in `Effect.gen` |\n| `Equal` | structural equality (`equals`) plus the Equal interface, guards, adapters | comparing values structurally or implementing custom equality |\n| `Equivalence` | reusable `Equivalence\u003CA>` equality predicates and combinators | defining\u002Fcombining custom same-type equality for a purpose |\n| `ErrorReporter` | forwards non-interruption `Cause`s to a callback for logging\u002Fmonitoring | routing Effect failures to external error-tracking systems |\n| `ExecutionPlan` | ordered fallback steps (context\u002Flayer + retries) tried until success | declaring fallback providers\u002Fretry tiers for effects or streams |\n| `Exit` | `Exit\u003CA,E>` value form of a finished Effect (success or `Cause` failure) | inspecting\u002Fmatching a completed Effect result synchronously as data |\n| `Fiber` | handle to a forked effect: await\u002Fjoin\u002Finterrupt, current fiber access | managing forked concurrent work and its lifecycle |\n| `FiberHandle` | scope-bound holder of at most one fiber, replacing\u002Finterrupting prior | tracking a single swappable background fiber tied to a scope |\n| `FiberMap` | scope-bound map of fibers keyed by K, auto-removed on completion | managing keyed background fibers under one scope |\n| `FiberSet` | scope-bound set of many fibers, all interrupted when scope closes | managing a dynamic group of background fibers under one scope |\n| `FileSystem` | portable file system service (read\u002Fwrite\u002Fstream\u002Fglob\u002Fwatch), fails `PlatformError`; sizes are `ByteSize` (see that row), and `File.seek` before the start of the file fails `BadArgument` and leaves the cursor unchanged (`FileSystem.ts:956-958`; the Node implementation is `@effect\u002Fplatform-node-shared`, which the vendored tree does not carry — `effect-v4-source-lookup` says where to read it). `glob` is core's own walk on every platform: wildcard segments match **case-sensitively** even on a case-insensitive volume, while leading literal segments use `stat` and keep the pattern's spelling (`FileSystem.ts:154-156`); patterns use `\u002F` separators | file IO; contract, platform layer provides implementation. **A custom implementation** must supply `readDirectoryEntries` (each entry's `name` and `type`, `\"Unknown\"` allowed). `FileSystem.make(impl)` derives `glob` (with `exists`, `readFileString`, `stream`, `sink`, `writeFileString`) and accepts none of them; apply a custom `glob` afterwards with `FileSystem.FileSystem.of({ ...FileSystem.make(impl), glob })`. A wrapper that changes `readDirectory` must change `readDirectoryEntries` the same way |\n| `Filter` | composable check returning `Result` (pass\u002Ffail) that can also narrow\u002Ftransform | selective matching\u002Frecovery where a predicate must also refine or transform |\n| `Formatter` | renders arbitrary JS values to readable strings with redaction\u002Fcycle handling | formatting values for logs, diagnostics, or error messages |\n| `Function` | core composition helpers: `pipe`, `flow`, `dual`, identity\u002Fconst\u002Fmemoize | composing functions or writing dual direct\u002Fpipe APIs |\n| `Glob` | `experimental` pure matcher over `\u002F`-separated paths with `FileSystem.glob`'s pattern syntax: `make(pattern, { dot? })`, `match` (dual), `escape` | testing a path against a glob with no file-system access; use `FileSystem.glob` to walk a tree |\n| `Graph` | immutable indexed node+edge graph carrying user data on both, mutated only inside a scoped window (`mutate(g, draft => …)`, or `beginMutation`\u002F`endMutation`); directed-vs-undirected is a `Kind` type parameter. 95 exports — `dfs`\u002F`bfs`\u002F`topo`\u002F`externals` walkers, the named algorithms (`dijkstra`, `bellmanFord`, `floydWarshall`, `astar`, `isAcyclic`, `isBipartite`, `connectedComponents`, `stronglyConnectedComponents`), graph set algebra (`compose`, `intersection`, `difference`, `symmetricDifference`, `complement`, `sum`), and `toMermaid` \u002F `toGraphViz` emitters returning a diagram `string` | any graph problem — **do not hand-roll shortest path, topological sort, cycle detection, or SCCs beside it.** `Kind` gates the algorithms at the type level: `topo`\u002F`stronglyConnectedComponents` take `\"directed\"` only, `isBipartite`\u002F`connectedComponents` `\"undirected\"` only, so pick the constructor for the analysis you need (`stronglyConnectedComponents` also throws `GraphError` on an undirected graph at runtime). Reach for `toMermaid` whenever you want a diagram of anything you can model as nodes and edges |\n| `Hash` | computes non-cryptographic structural hashes; interface for custom hash | implementing custom hashing for Equal-based collections |\n| `HashMap` | immutable key\u002Fvalue map (HAMT) keyed by structural equality | need immutable map with object\u002Fstructural keys |\n| `HashRing` | weighted consistent-hashing ring keyed by `PrimaryKey` | routing keys\u002Fshards to nodes with minimal remapping |\n| `HashSet` | immutable set of unique values by Equal\u002FHash | need immutable set with structural-equality membership |\n| `HKT` | type-level: `TypeLambda`\u002F`Kind` higher-kinded encoding | only when authoring generic type classes; agents skip |\n| `Inspectable` | internal: log\u002Finspect formatting protocol for Effect values | implementing custom log\u002Fconsole\u002FJSON rendering; rarely needed |\n| `Iterable` | lazy combinators over any `[Symbol.iterator]` value | transform\u002Fsearch\u002Fgroup iterables without materializing arrays |\n| `JsonPatch` | computes\u002Fapplies deterministic RFC6902 add\u002Fremove\u002Freplace patches | diffing two JSON docs or replaying JSON changes |\n| `JsonPointer` | RFC6901 token escape\u002Funescape helpers | escaping `~`\u002F`\u002F` in JSON Pointer path segments |\n| `JsonSchema` | normalize\u002Fconvert JSON Schema & OpenAPI dialect documents | converting between Draft-07\u002F2020-12\u002FOpenAPI schemas, `$ref` resolution. **Generation lives in `Schema`**: `Schema.toJsonSchemaDocument` (2020-12; `includeAnnotationKey` admits custom keys) then `JsonSchema.toDocumentDraft07` to lower. **The lowering carries unknown and custom keywords through as opaque values**, in place — so an annotation admitted at 2020-12 reaches draft-07 unchanged, and there is nothing to re-graft — the failure to guard against is publishing a key you assumed could not escape. The `$defs` pool maps key-for-key, and annotations move with their node across the coordinate moves (`prefixItems[i]`→`items[i]`, trailing `items`→`additionalItems`). Filtering is the caller's job, upstream of the lowering. Probe evidence: `@effected\u002Fschemastore`'s `__test__\u002Fannotation-carrying.test.ts`, which asserts on raw core output. |\n| `Latch` | reusable open\u002Fclosed fiber coordination primitive | gating fibers until an explicit open\u002Frelease signal |\n| `Layer` | describes acquiring\u002Fwiring services with deps and errors | constructing and composing service dependencies |\n| `LayerMap` | keyed cache of scoped layer-built service contexts | per-tenant\u002Fper-region resource families built on demand |\n| `LayerRef` | refreshable single layer-built context with invalidation | share one scoped layer resource, rebuild on invalidate |\n| `Logger` | loggers, formatters, console\u002Ffile routing, install layers | configuring\u002Fcustomizing how log events are emitted |\n| `LogLevel` | log-level types, ordering, threshold\u002Fenabled helpers | comparing or checking log severities |\n| `ManagedRuntime` | runs many effects against services built once from a Layer | bridging Effect to promise\u002Fcallback\u002Fsync entry points |\n| `Match` | ordered pattern matcher (`Match.type`\u002F`Match.value`); `Match.literals({ ... })` handles a subset of literal values by key, `literalsExhaustive` all of them | pattern-matching on tags, shapes, predicates, literals |\n| `Metric` | counters\u002Fgauges\u002Fhistograms\u002Ffrequencies\u002Fsummaries\u002Ftimers, attached to effects via `Effect.track` | metering an operation — boundaries only; see `effect-v4-observability`. NB there is no `Metric.tagged`\u002F`taggedWithLabels`; attributes are `Metric.withAttributes` |\n| `MutableHashMap` | in-place map mixing native and Equal\u002FHash keys | fast mutable map needing structural-key lookup |\n| `MutableHashSet` | in-place unique set built on MutableHashMap | fast mutable set with structural-equality members |\n| `MutableList` | in-place ordered list; append\u002Fprepend, drain from front | buffering values and draining FIFO in place |\n| `MutableRef` | synchronous in-place single-value reference | non-effectful mutable cell (vs `Ref`) |\n| `Newtype` | compile-time-only branded wrappers over a carrier type | distinguishing same-shape values (e.g. two string ids) |\n| `NonEmptyIterable` | type-level: `Iterable` branded as having ≥1 element | typing guaranteed-non-empty iterables; rarely imported directly |\n| `Number` | helpers over `number`: parse, math, compare, clamp, aggregate | numeric parsing, safe division, ordering, range checks |\n| `Optic` | lens\u002Fprism\u002Foptional focus for immutable read\u002Fupdate | reading\u002Fupdating nested immutable structures without mutation |\n| `Option` | present\u002Fabsent value `Some`\u002F`None`, plus `Option.gen` | modeling optional values instead of null\u002Fundefined |\n| `Order` | comparison functions for ordered values | sorting, min\u002Fmax, ranges, ordered structures |\n| `Ordering` | the `-1\u002F0\u002F1` comparison result plus combinators | working with the output of an `Order` comparison |\n| `PartitionedSemaphore` | concurrency limiter over shared permits grouped by key | fair bounded concurrency across independent key groups |\n| `Path` | path ops service (join\u002Fnormalize\u002Fparse\u002Fresolve); POSIX `Path.layer` built in | path manipulation; contract, platform layer provides (POSIX layer in core) |\n| `Pipeable` | internal: `.pipe(...)` method-chaining interface | only when authoring a pipeable data type; agents skip |\n| `PlatformError` | normalized platform error model (`BadArgument`\u002F`SystemError` reasons) | typing\u002Fhandling FileSystem\u002FTerminal\u002Fsubprocess\u002Fhost IO failures |\n| `Pool` | shares scoped resources borrowed across fibers; `Pool.stats` snapshots `{ idle, used, pending, min, max }` | pooling connections\u002Fclients with TTL and invalidation; `stats` for occupancy metrics (`idle + used` can briefly exceed `max` while an invalidated item is replaced) |\n| `Predicate` | runtime guards and refinements with combinators | type guards, tag\u002Fshape checks, composing predicates — never hand-write `isString`\u002Fobject guards (NB: no `isRecord` on the v4 line; the record-ish guards are `isObject`\u002F`isReadonlyObject`\u002F`isObjectOrArray`) |\n| `PrimaryKey` | protocol exposing a stable string identifier | giving a value a stable string key (requests, ring nodes) |\n| `PubSub` | broadcast hub; each subscriber gets every message | fan-out messaging where subscribers don't compete |\n| `Pull` | internal: one low-level stream pull step (value\u002Ferror\u002Fdone) | only when writing custom Stream\u002FChannel internals; agents skip |\n| `Queue` | async fiber-to-fiber queue; one consumer per value | backpressured\u002Fbounded work handoff between fibers |\n| `Random` | pseudo-random generator exposed as a replaceable Effect service | need effectful\u002Fseeded random numbers, shuffles, or deterministic test randomness |\n| `Rational` | exact fractions over `bigint` numerator and denominator (`makeUnsafe`, `fromBigInt`, arithmetic, `equals`, `toBigDecimal(r, { scale })`), with `Schema.Rational` and `Schema.RationalFromString` | exact ratios such as one third, where `BigDecimal` would have to round; convert to `BigDecimal` at a display or storage edge |\n| `RcMap` | reference-counted map of scoped resources keyed, released when idle\u002Funused | sharing per-key clients\u002Fconnections\u002Fsessions with lifecycle, not general caching |\n| `RcRef` | reference-counted handle sharing one scoped resource across borrowers | share a single lazily-acquired resource; finalize when last borrower leaves |\n| `Record` | immutable helpers over plain string\u002Fsymbol-keyed object dictionaries | working with `{}` dictionaries functionally: map\u002Ffilter\u002Fmerge\u002Flookup without mutation |\n| `Redactable` | protocol for context-aware alternate representations of sensitive objects | building a type that masks itself in logs\u002Ftraces\u002Fserialization |\n| `Redacted` | wrapper hiding a value in string\u002FJSON\u002Finspect output while retaining it | carry secrets\u002Ftokens through code without leaking them in diagnostics |\n| `Reducer` | `Combiner` plus an initial value and fold-an-iterable operation | fold many values into one with an identity\u002Fempty case |\n| `Ref` | fiber-safe mutable cell with effectful get\u002Fset\u002Fupdate\u002Fmodify | hold shared mutable state that composes with Effect concurrency |\n| `References` | built-in `Context.Reference` runtime keys — logging, tracing, stack frames, loggers | read or override runtime diagnostic settings for an effect. **No concurrency key exists** despite the module's own header prose claiming one — concurrency is a per-call `{ concurrency }` option |\n| `RegExp` | native `RegExp` constructor, guard, and literal-escaping helper | build patterns from data-driven text or narrow `unknown` to RegExp |\n| `Request` | typed request value describing one data-load with error\u002Frequirements | define a batchable\u002Fcacheable data query for `Effect.request` |\n| `RequestResolver` | resolver that batches, groups, and completes pending `Request` entries | implement backend batching\u002Fdedup\u002Fcaching behind `Effect.request` |\n| `Resource` | refreshable scoped value caching last acquisition, auto\u002Fmanual refresh | cache a scoped value that must refresh on schedule or on demand |\n| `Result` | plain `Success`\u002F`Failure` data holding an already-computed outcome | represent a settled success-or-error value without running effects (v4's Either successor) |\n| `Runtime` | low-level `makeRunMain` for turning an Effect into a process entry point, the `Teardown` that maps an `Exit` to an exit code (`defaultTeardown`), and `InterruptExitCode`, a service annotated onto an interruption to choose its exit code | writing a platform runner; app code uses platform-provided runners instead. Annotate an interrupt your program raises at a clean end with `Context.make(Runtime.InterruptExitCode, 0)` instead of writing a custom teardown; an unannotated interrupt, such as a signal's, still exits `130` |\n| `Schedule` | policy stepping inputs into outputs plus delays for retry\u002Frepeat\u002Fpace | decide when\u002Fhow often to retry, repeat, or pace an effect |\n| `Scheduler` | controls how runnable fiber tasks are queued, dispatched, and yielded | internal\u002Fadvanced: tune or disable fiber scheduling and yields — usually skip |\n| `Schema` | validate\u002Fdecode\u002Fencode data shapes with codecs, classes, refinements | the primary entry point for any schema, codec, or data validation. Checks include `Schema.isAscii()` (`U+0000`–`U+007F`); codecs include `Schema.DurationFromIsoString` (ISO 8601 string ↔ `Duration`) |\n| `SchemaAST` | runtime tree representation of schemas (nodes, checks, annotations) | advanced machinery: inspect\u002Fbuild\u002Frewrite schema ASTs programmatically |\n| `Schema.SchemaError` | the error a schema decode\u002Fencode fails with: a `SchemaIssue` tree plus a formatted `message`. **Not a module** — it is a class exported from `Schema.ts` (`Schema.ts:1220`), so `import … from \"effect\u002FSchemaError\"` fails to resolve; there is no `src\u002FSchemaError.ts` and no `.\u002FSchemaError` export. Import it as `Schema.SchemaError` | catching\u002Fnormalizing schema failures at a boundary — `Effect.catchTag(\"SchemaError\", …)`. v4 exposes no `Schema` for the issue tree, so it rides in a domain error as `Schema.Defect()` |\n| `SchemaGetter` | one-way optional-in\u002Foptional-out conversions used inside transformations | consumer-facing when authoring a custom decode\u002Fencode direction |\n| `SchemaIssue` | describes and formats decode\u002Fencode\u002Fcheck failures with location | consumer-facing: inspect or format schema validation errors |\n| `SchemaParser` | runs a schema against values (decode\u002Fencode\u002Fvalidate) in many result styles | consumer-facing: execute a schema returning Effect\u002FExit\u002FOption\u002FResult\u002Fsync |\n| `SchemaRepresentation` | JSON-serializable descriptions of schemas plus TS-codegen | machinery: serialize schemas, convert to\u002Ffrom JSON Schema, generate code |\n| `SchemaTransformation` | two-way encode\u002Fdecode conversions connecting two representations | consumer-facing when building a custom bidirectional codec |\n| `SemVer` | strict Semantic Versioning 2.0.0 values: `parse`\u002F`fromInput`, `format`, comparison (`isGreaterThan`, `between`, `clamp`, `Order`\u002F`Equivalence`), `bump*` (major\u002Fminor\u002Fpatch\u002Fpre*), `isPrerelease`, `difference`, plus schemas and string codecs | parsing, comparing or bumping a version string — do not hand-roll a semver regex. Core is enough for a plain compare or bump in code with no kit edge; reach for kit `@effected\u002Fsemver` when the value crosses a kit API or you need a `FromString` codec, an error carrying `input` and `position`, or a `Result` twin (`parseResult`). Never mix kit and core values in one `HashSet`\u002F`HashMap`: kit equality ignores build metadata |\n| `SemVerRange` | npm-style ranges: `parse`, `matches`, `caret`\u002F`tilde`\u002F`exact`\u002F`any`\u002Fcomparators, `maxSatisfying`\u002F`minSatisfying` | asking whether a version satisfies a range, or picking the best match from a list. Core is enough for a plain match; reach for kit `@effected\u002Fsemver`'s `Range` for range algebra (`intersect`, `isSubset`, `simplify`), parse errors with a position, or a `Result` twin |\n| `Scope` | lifetime boundary collecting finalizers run with an `Exit` on close | directly create\u002Ffork\u002Fclose scopes; most code uses `Effect.scoped`\u002F`Layer` |\n| `ScopedCache` | cache whose entries own scopes, releasing resources on eviction | cache resource-backed values with per-entry cleanup and expiry |\n| `ScopedRef` | current value plus the scope owning it; swaps acquire\u002Frelease atomically | hold a swappable resource handle (client\u002Fconnection) with clean replacement |\n| `Semaphore` | permit pool limiting concurrent access to a shared resource | bound concurrency around an effect via acquire\u002Frelease of permits; `Semaphore.takeScoped(sem, n)` holds permits until the surrounding `Scope` closes |\n| `Sink` | stream consumer folding\u002Fcollecting a `Stream`'s output into one result | terminating a Stream: collect, fold, count, or search its elements |\n| `Stdio` | argv and stdin\u002Fstdout\u002Fstderr of the CURRENT process as an Effect service | standard-IO access (not spawning); contract, platform layer provides — but core ships `Stdio.layerTest(Partial\u003CStdio>)` for echo-testing without one |\n| `Stream` | effectful source emitting many values over time with error\u002Frequirements | model pull-based\u002Fstreaming data: queues, callbacks, files, paginated sources |\n| `String` | pipe-friendly helpers over TypeScript `string` values | functional string ops: trim\u002Fcase\u002Fslice\u002Freplace\u002FOption-returning search |\n| `Struct` | immutable helpers over plain TypeScript objects (pick\u002Fomit\u002Frename) | transform object shapes functionally and derive comparisons |\n| `SubscriptionRef` | `Ref` that publishes every committed change as a `changes` stream | hold state others must observe reactively over time |\n| `Symbol` | runtime predicate narrowing `unknown` to a primitive `symbol` | guarding an `unknown` before using it as a symbol key\u002Fdiscriminant |\n| `SynchronizedRef` | `Ref` whose updates run one-at-a-time, safe for effectful transitions | serialize state updates when the next value is computed by an effect |\n| `Take` | stored representation of one stream pull: batch, failure, or done | low-level stream plumbing: inspecting buffered pull results |\n| `Terminal` | interactive terminal service (size, line\u002Fkey input, output); `size` is a scoped queue that starts with the current `Size` and receives each resize | terminal capabilities; contract, platform layer provides. A hand-built `Terminal.make` must supply `size` beside `columns`, `rows`, `readInput`, `readLine` and `display` |\n| `TextDiff` | `experimental` edit scripts over arrays, lines or code points: `diff`\u002F`diffWith`, `apply`\u002F`applyText`, `invert`, `unified` formatting, `maxEdits` to bound search | computing a diff or a unified patch — do not pull in a diff library |\n| `Tracer` | low-level span\u002Ftracing model and tracer service | define\u002Finspect spans or a custom tracer; usually via higher-level tracing APIs |\n| `Trie` | immutable string-keyed prefix tree for prefix\u002Flongest-match lookup | autocomplete, route tables, dictionaries, prefix-based key lookup |\n| `Tuple` | immutable helpers over fixed-length arrays preserving element positions | build\u002Ftransform positional tuples and derive tuple comparisons |\n| `TxChunk` | transactional `Chunk` stored in a `TxRef` | STM-family: atomic sequence\u002Fbuffer updates within a transaction |\n| `TxDeferred` | write-once transactional cell completing to a `Result`, retrying readers | STM-family: coordinate\u002Fawait a one-shot value across transactions |\n| `TxHashMap` | transactional `HashMap` in a `TxRef` | STM-family: atomic keyed registry\u002Fcounter\u002Findex updates |\n| `TxHashSet` | transactional `HashSet` in a `TxRef` | STM-family: atomic set membership changes alongside other state |\n| `TxPriorityQueue` | transactional priority queue ordered by an `Order`, retrying take\u002Fpeek | STM-family: ordered coordination queue with transactional waiting |\n| `TxPubSub` | transactional publish\u002Fsubscribe hub over `TxQueue` subscribers | STM-family: broadcast values atomically within transactions |\n| `TxQueue` | transactional queue with enqueue\u002Fdequeue handles, retrying when blocked | STM-family: coordinate producers\u002Fconsumers within transactions |\n| `TxReentrantLock` | transactional reentrant read\u002Fwrite lock tracked by fiber | STM-family: shared\u002Fexclusive locking that composes in transactions |\n| `TxRef` | core transactional reference journaled and committed via `Effect.tx` | STM-family: the base transactional cell all Tx collections build on |\n| `TxSemaphore` | transactional fixed-capacity permit pool in a `TxRef` | STM-family: permit acquisition that commits with other transactional state |\n| `TxSubscriptionRef` | transactional `Ref` publishing committed changes to subscribers | STM-family: observable transactional state with current-value replay |\n| `Types` | compile-time-only utility types (tuples, unions, variance, mutability) | type-level plumbing — no runtime; agents skip unless authoring types |\n| `UndefinedOr` | helpers for plain `A \\| undefined` values | handle optionality with `undefined` without wrapping in `Option` |\n| `Unify` | type-level unification protocol collapsing unions to public data types | maintainer\u002Fadvanced type plumbing — skip |\n| `Utils` | internal generator machinery behind `Effect.gen`\u002FHKT | internal — skip |\n| `Version` | the `effect` version string core stamps into telemetry headers, resources and scopes: `getCurrentVersion()` \u002F `setCurrentVersion(v)`. `@stability unstable` | reading or overriding the version an exporter reports — layers already built keep the value they read |\n| `testing\u002FTestClock` | controllable `Clock` service driving virtual time | make sleep\u002Ftimeout\u002Fschedule\u002Fretry tests deterministic by advancing time |\n| `testing\u002FTestConsole` | test `Console` capturing log\u002Ferror calls in memory. `@stability unstable` | assert on console output deterministically in tests |\n| `testing\u002FTestSchema` | assertions for one schema: `new TestSchema.Asserts(schema)` with `make`, `decoding()` \u002F `encoding()` (`succeed`\u002F`fail` as Promises, `succeedEffect`\u002F`failEffect` as lazy Effects), `arbitrary()` and `verifyRoundTrip` \u002F `verifyRoundTripEffect`; the property checks run `Arbitrary.checkEffect`. `@stability unstable` | testing that a schema constructs, decodes, encodes and round-trips correctly. The `Effect`-suffixed forms use the calling fiber's services, so they compose inside `it.effect`. **There is no `testing\u002FFastCheck`** — there is no fast-check bridge; property generation is `Arbitrary` |\n\n## The unstable-stability namespaces (`effect\u002F\u003Cns>`)\n\nBreaking changes allowed in minors; the `@stability unstable` annotation is what\nmarks these, not a separate import path — they import exactly like any other\ncore module. These namespaces are where the consolidated core put functionality that ships as\nseparate packages nowhere else: HTTP, RPC, cluster, SQL, CLI and the rest live\nhere, and the only packages outside `effect` are platform-, provider- or\ntechnology-specific *implementations* (`@effect\u002Fplatform-*`, `@effect\u002Fsql-*`,\n`@effect\u002Fai-*`, `@effect\u002Fopentelemetry`, `@effect\u002Fvitest`). See\n`effect-v4-services-layers` for the require-in-`R`-never-own-a-backend rule that\nfollows from it.\n\n| Namespace | What it is | When to reach for it |\n| --- | --- | --- |\n| `ai` | provider-neutral AI: `LanguageModel`, `Chat`, `Tool`\u002F`Toolkit`, MCP schema\u002Fserver, an `experimental` scoped MCP **client** (`McpClient.layerStdio`\u002F`layerHttp`, `McpClient.toolkit`), `experimental` AG-UI protocol support (`AgUiSchema` events, `AgUi`, `AgUiServer`), and `WorkloadIdentity`, which authenticates an `HttpClient` by exchanging a workload identity token for a cached access token (the providers' `AnthropicWorkloadIdentity`, `OpenAiWorkloadIdentity` and `OpenRouterWorkloadIdentity` wrap it) | building AI features against a provider-agnostic surface (`@effect\u002Fai-*` provides). `Tool.make`\u002F`Tool.dynamic` take `toModelOutput` to send text, images and files to the model in place of the serialized result; `Tool.ParametersDecodingServices\u003CT>` names the services a tool's parameter schema needs to decode. `McpTest.makeClient(registrations, options?)` builds an in-process MCP client and server in the surrounding `Scope` for tests; MCP wiring → `effect-v4-mcp` |\n| `arbitrary` | the native property-testing engine, one module `Arbitrary`: `schema`, `Constant`, `map`\u002F`filter`\u002F`filterMap`\u002F`flatMap`\u002F`all`, `sampleEffect`, `checkEffect`, `formatCheckFailure`, `CheckOptions` | deriving generators from a Schema for `it.prop`\u002F`it.effect.prop`, or running a property outside vitest — replaced `effect\u002Ftesting\u002FFastCheck` and `Schema.toArbitrary`. It has **no** `oneof`\u002F`constantFrom`; choice and collections are Schemas — see `effect-v4-schema\u002Freferences\u002F11-generation-and-tooling.md` for the one collection combinator (`Arbitrary.array`) that does exist independent of Schema. Traps and translations → `effect-v4-testing`, surface → `effect-v4-schema\u002Freferences\u002F11-generation-and-tooling.md` |\n| `cli` | the v4 CLI framework: `Command`, `Flag`, `Argument`, `Prompt`, completions, `TerminalCapabilities` (the colour\u002FTTY reference built-in help follows), and `CommandSpec` (`resolve(cli, path)` gives a lossless projection of one command path, its flags' scope, requiredness, fallbacks and `Flag.annotate`\u002F`Argument.annotate` metadata) | building a command-line tool — see `effect-v4-cli`. `CommandSpec` when generating documentation or a reference page from the command tree instead of walking `Command` internals |\n| `cluster` | entity sharding runtime: `Sharding`, `Entity`, runners, message storage, and `MessageRetention.make` (deletes a persisted entity's old completed requests through `MessageStorage.deleteProcessed`, which a custom storage must implement) | distributing stateful entities across machines |\n| `crypto` | `Digest` (MD5, SHA-1\u002F256\u002F384\u002F512, one-shot), `SecureRandom` (bytes, ints, shuffle, UUIDv4\u002Fv7, ULID), `Mac` (HMAC, plus `Mac.timingSafeEqual`), `Signature` (Ed25519, ECDSA, RSA-PSS, RSASSA-PKCS1-v1_5), `Aead` (AES-GCM, ChaCha20-Poly1305), `Cipher` (AES-CTR\u002FCBC, unauthenticated), `Kdf` (HKDF, PBKDF2, Argon2id), `KeyAgreement` (X25519, ECDH), `KeyWrap` (AES-KW, RSA-OAEP), `KeyFormat` (SPKI\u002FPKCS#8\u002FJWK\u002FPEM import and export), `WebCrypto` (the `Context.Reference` the layers run on, default `globalThis.crypto`) and `CryptoError` | any cryptography — require the family service in `R`; see the sharp corners below for what to provide and how `Digest` fails |\n| `devtools` | client\u002Fserver wiring an Effect runtime to the devtools tracer | connecting a program to Effect devtools |\n| `encoding` | `Base64`, `Base64Url`, `Hex` and `EncodingError` (the `stable` ones: encode\u002Fdecode between strings, UTF-8 and bytes with `Result`-typed decode errors); `Ndjson` and `Sse` channel codecs; `SchemaBinary` (a compact binary codec derived from a Schema's encoded side); `Toml`, `Yaml` and `Ini` parsers; `Jsonc` and `Json5` (`parse` returns a `Result` failing with `EncodingError`); `Csv` (RFC 4180 stream encode\u002Fdecode with a configurable delimiter and schema adapters); streaming archive and document codecs: `Tar` (unstable), `Zip` and `Xml` (`experimental`), and `JsonArray` (one JSON array as a stream of elements, optionally by JSON Pointer) | Base64\u002Fhex conversion; framing streams as NDJSON or server-sent events; parsing a config document when the `@effected\u002Ftoml`\u002F`@effected\u002Fyaml`\u002F`@effected\u002Fjsonc` fidelity guarantee is not needed |\n| `eventlog` | typed, replicated (optionally encrypted) event journal with SQL backends; `EventRow` for convergent row `set`\u002F`patch`\u002F`remove` events | event-sourced state that syncs\u002Freplicates |\n| `graphql` | typed GraphQL operations: `GraphQL`, `GraphQLGroup`, `GraphQLResolver`, `GraphQLClient`, `GraphQLMiddleware`, `GraphQLProtocol` (HTTP and subscription transports, partial results, serializable errors, cursor pagination). `@stability experimental` | calling a GraphQL API from Effect — the module is client-side (operations, a client, its transports and batching resolvers); it does not serve one. **Talking to GitHub's GraphQL API is `@effected\u002Fgithub`'s job**, not this module's |\n| `http` | HTTP client + server: `HttpClient`, `FetchHttpClient`, router, middleware | any HTTP work — clients (see runtimes precedent) or servers. Branching on a client failure: see the `reason` trap below; MIME lookup is `http\u002FMime` (`getType`\u002F`getExtension`\u002F`getAllExtensions`) — there is no `mime` npm dependency; `HttpClient.TracerPropagationEnabled` (a `Context.Reference`, on by default) controls whether requests carry `b3`\u002F`traceparent`, so turn it off for a client talking to a third party; `HttpTraceContext.fromHeaders` reads inbound trace context; `HttpClient.timeout(duration)` fails a request that runs too long with an `HttpClientError`; `ProblemDetails` is the RFC 9457 `application\u002Fproblem+json` value, codec and response constructor |\n| `net` | `IpInterface`, `IpNetwork`, `NetAddress` — pure, canonical IPv4\u002FIPv6 addresses and CIDR prefixes (`NetAddress.loopbackAddresses` names both loopbacks); `Host` — host names and unresolved `host:port` endpoints, plus `toFullyQualified`\u002F`toRelative` and a pure `parseHostsFile`; `Dns` and `AddressResolver` — resolution services a runtime package provides | parsing\u002Fnormalizing an address, network prefix, host name or hosts file without a third-party `ipaddr`-style library; require `Dns`\u002F`AddressResolver` in `R` when the program must resolve names |\n| `http-api` | schema-first declarative HTTP APIs with OpenAPI\u002FSwagger output | defining a typed HTTP API contract shared by server and client. `HttpApiClient.decodeResponse` decodes a raw endpoint response with the endpoint's declared success and error schemas, e.g. after a `responseMode: \"response-only\"` call |\n| `jose` | `Jwk` (import\u002Fexport, thumbprints, SPKI\u002FPKCS#8 DER or PEM), `Jwks` (key-set resolution), `Jws`, `Jwe` (`dir`\u002FA256GCM), `Jwt` (schema-typed claims, verified before decoding) and `JoseError`; compact serialization only, HS\u002FRS\u002FPS\u002FES 256\u002F384\u002F512 and EdDSA | signing or verifying JWTs and JWS without a third-party JOSE library. Bound untrusted token length yourself before verifying or decoding; the module imposes no limit. The kit's `@effected\u002Fjwt` and `@effected\u002Foidc` are the house JWT and OIDC surfaces |\n| `observability` | OTLP + Prometheus exporters for traces\u002Fmetrics\u002Flogs; `OtlpProxy` (`layer`\u002F`layerFromConfig`\u002F`make`) mounts `POST \u002Fv1\u002Ftraces`, `\u002Fv1\u002Flogs` and `\u002Fv1\u002Fmetrics` on an `HttpRouter` and forwards browser OTLP exports upstream, adding credentials on the server | exporting telemetry without the `@effect\u002Fopentelemetry` SDK; `OtlpProxy` when a browser exports OTLP and the vendor key must stay out of its bundle |\n| `persistence` | `KeyValueStore` (memory\u002Ffs\u002FSQL; a `make`\u002F`makeStringOnly` store must implement `keys`), `PersistedCache`\u002F`PersistedQueue`, `RateLimiter`, `UserDirectories` (home\u002Fconfig\u002Fdata\u002Fcache\u002Fstate directories by XDG and platform convention; `layerPlatform`), `Redis` (the client contract; `Redis.reserve` leases a dedicated pooled connection for blocking commands such as `XREAD BLOCK`\u002F`BLPOP`), and `CircuitBreaker` (`@stability experimental`: keyed circuits, `consecutive`\u002F`rate` trip policies, `layerStoreMemory`\u002F`layerStoreRedis`; `HttpClient.withCircuitBreaker` wraps a client) | durable KV, request-level durable caching, rate limiting, failing fast on an unreliable dependency (`CircuitBreaker` never waits — put `Effect.retry`\u002F`Effect.timeout` inside it). For per-application directories, `UserDirectories` folds the XDG variable and the native directory into one answer per kind; reach for kit `@effected\u002Fxdg` when you need XDG search paths (`XDG_CONFIG_DIRS`\u002F`XDG_DATA_DIRS`), the runtime directory, or the native directories kept separate from XDG |\n| `process` | `ChildProcess` Command values + `ChildProcessSpawner` service; `CommandLine` — `Word` (`string \\| Redacted\u003Cstring>`), `template` (template text to argument list), and `quote`\u002F`join`\u002F`display` for one command-line string in an explicit `format` (`\"posix\"`, `\"powershell\"`, `\"windows\"`), with `display` masking `Redacted` arguments | spawning subprocesses (`@effected\u002Fgit` is the house example; require in `R`); `CommandLine` when building a string for a shell or SSH, or rendering a command for a log |\n| `reactivity` | atom-based reactive state (`Atom`, `AtomRegistry`, hydration) | framework-facing reactive state (`@effect\u002Fatom-*` binds it) |\n| `rpc` | schema-backed RPC: groups, client\u002Fserver, serialization, worker transport; `OpenRpc.fromRpcGroup` derives an OpenRPC document from a group | typed request\u002Fresponse between processes without hand-rolling HTTP |\n| `schema` | `Model` (DB-vs-JSON variant models) + `VariantSchema` | one model with per-context variants (insert\u002Fupdate\u002Fjson) |\n| `socket` | `Socket` + `SocketServer` contracts | raw bidirectional connections |\n| `sql` | the SQL core: `SqlClient`, `Statement`, `Migrator`, models\u002Fresolvers | any SQL — drivers live in `@effect\u002Fsql-*` (`@effected\u002Fstore` is the house example). A driver's own client (`SqliteClient.SqliteClient`) extends `SqlClient.Base`, not `SqlClient`, so it is not assignable to the generic service: a migration or helper that needs `SqlClient` yields `SqlClient.SqlClient`, which every driver layer also provides |\n| `workflow` | durable workflows: `Workflow`, `Activity`, durable clock\u002Fdeferred\u002Fqueue | long-running resumable multi-step operations (application tier — see roadmap note) |\n| `workers` | `Worker`\u002F`WorkerRunner`\u002F`Transferable` for worker threads | offloading work to browser\u002FNode\u002FBun workers |\n\n## Sharp corners the index surfaced (not covered elsewhere)\n\n- `Queue` is `Queue\u003CA, E>` in v4 — it carries an error channel and can\n  `fail`\u002F`done`, not just hold values.\n- `Optic` is in core (there is no `@effect\u002Foptic` to install) and is Schema-aware.\n- Transactional state is the `Tx*` family: `TxRef` + `Effect.tx`, with a core\n  module per collection. There is no `STM`\u002F`TRef`\u002F`TMap`\u002F`TQueue`.\n- Runtime knobs (concurrency, logging, tracing settings) live in `References`\n  as `Context.Reference` keys; scheduling internals in `Scheduler`.\n- `UndefinedOr` exists for `A | undefined` ergonomics — not every optional\n  needs `Option`.\n- Testing utilities live in core under `effect\u002Ftesting\u002F*` — no separate\n  test-support package.\n- **`effect\u002Fcrypto` is where crypto lives, and nothing in the platform bundles\n  provides it.** Each family (`Digest`, `SecureRandom`, `Mac`, `Signature`,\n  `Aead`, `Cipher`, `Kdf`, `KeyAgreement`, `KeyWrap`) is a `Context.Service`\n  you require in `R`. `NodeServices.layer` carries none of them: provide\n  `NodeCrypto.layer` (every family) or one family layer such as\n  `NodeCrypto.layerDigest` from `@effect\u002Fplatform-node`, or the core\n  `\u003CFamily>.layerWebCrypto` on any runtime with WebCrypto (Workers included).\n  In a test, provide the real `layerWebCrypto` or `Layer.mock(Digest.Digest,\n  { digestHex })`; there is no `TestCrypto`.\n- **`Digest` cannot fail typed, so a missing `crypto.subtle` is a defect.** Both\n  members return `Effect\u003C…>` with a `never` error channel (`crypto\u002FDigest.ts:135-144`).\n  `Digest.layerWebCrypto` builds even where `crypto.subtle` is absent (a\n  browser's insecure context), and then every SHA digest **dies**; MD5 keeps\n  working because it is pure TypeScript (`crypto\u002FDigest.ts:151-153`). Never\n  model \"digest failed\" as a domain error reason — there is nothing to catch.\n- **`Digest.digest` is one-shot, and that is a dependency decision.** The\n  signature is `digest(algorithm, data: Uint8Array)` — it takes the whole\n  payload at once and there is **no incremental\u002Fstreaming form**. So hashing a\n  file, a tarball or any input without a known upper bound means buffering all\n  of it in memory, where `node:crypto`'s `createHash(...).update(chunk)` walks a\n  stream at constant cost. Digesting a key, a token or a short manifest is a\n  fit; digesting an artifact is not. In the kit this is exactly why\n  `github-actions`' `Artifact` and `PackageManagerInstaller` stay on\n  `node:crypto` — both fold a `Stream` chunk-by-chunk on purpose.\n- **Core `Cache` is interrupt-clean, like `Effect.cached`.** Interrupting the\n  only awaiter **discards** the in-flight entry and the next `get` re-runs the\n  lookup; concurrent gets still de-dupe to one lookup. Probed with a\n  poisoning control that fired. Neither primitive stores an interrupt, so the\n  hazard they share is the failed lookup, below.\n- **…but a default-TTL `Cache` memoizes a FAILED lookup for the process\n  lifetime.** `defaultTimeToLive` is `Duration.infinity` (`Cache.ts:332`), and\n  the cache \"stores successful **and failed** lookup results\" (`Cache.ts:4`).\n  One transient network blip is therefore permanent. Wherever failures are\n  transient, make the TTL exit-dependent — the `timeToLive` option takes\n  `(exit, key)` for exactly this (`Cache.ts:206`; the same two-argument shape on\n  the cache's own field at `Cache.ts:118`). Note `Cache.make`'s `timeToLive` is\n  a plain `Duration.Input` with no exit access (`Cache.ts:307`) — the\n  exit-dependent form requires `makeWith`:\n\n  ```ts\n  Cache.makeWith(lookup, {\n   capacity: 1000,\n   timeToLive: (exit) => (Exit.isSuccess(exit) ? \"1 hour\" : Duration.zero),\n  })\n  ```\n\n- `HttpClientRequest.bearerToken` accepts a **`Redacted` directly**\n  (`token: string | Redacted.Redacted`, `http\u002FHttpClientRequest.ts:445`;\n  `basicAuth` likewise). A runtime token flows into request construction with **no\n  declassification step at all** — which is what lets a package keep its\n  secret-handling seam to one module instead of granting every request builder an\n  exception to it. Do not reach for `Redacted.value` here.\n\n## How the skills divide the territory\n\nThis index routes. For patterns: `effect-v4-idioms` (errors, resources,\nfibers), `effect-v4-schema` (everything Schema), `effect-v4-services-layers`\n(Context\u002FLayer discipline), `effect-v4-testing` (the test idioms),\n`effect-v4-observability` (spans\u002Flogs\u002Fmetrics), `effect-v4-cli` (`cli`),\n`effect-v4-source-lookup` (how to verify any row here against the source).\n\n### `HttpClientError`: the `reason` tags are not the type names\n\nA client failure is one `HttpClientError` whose top-level `_tag` is always\n`\"HttpClientError\"`, so branch on `error.reason._tag`. The values are the trap.\nThe reason type is declared in two layers, and **both layer names are\nthemselves unions, so neither ever appears as a `_tag`** (verified against\n`http\u002FHttpClientError.ts:402,411,420`):\n\n```ts\nexport type RequestError = TransportError | EncodeError | InvalidUrlError\nexport type ResponseError = StatusCodeError | DecodeError | EmptyBodyError\nexport type HttpClientErrorReason = RequestError | ResponseError\n```\n\nSo `error.reason._tag` is exactly one of **six** values: `\"TransportError\"`,\n`\"EncodeError\"`, `\"InvalidUrlError\"`, `\"StatusCodeError\"`, `\"DecodeError\"`,\n`\"EmptyBodyError\"`. A retry policy written `error.reason._tag === \"ResponseError\"`\n(or `=== \"RequestError\"`) **never matches**, so it silently retries nothing —\na live-looking branch that is dead code, and green tests will not catch it.\n\nWhat makes the wrong guess feel confirmed: `ResponseError` *is* a real tagged\nclass elsewhere, at `http\u002FHttpServerError.ts:210`. Same name, different\nmodule, and it is a server error rather than a client one. Timeouts are separate\nagain — `Cause.isTimeoutError`, not a `reason`.\n",{"name":5,"description":7},"main","3beb0433e15650b598c22b7b7299eb6fa411b9b4","plugin\u002Fbuilds\u002Fclaude\u002Fskills\u002Feffect-v4-module-index",2,"https:\u002F\u002Fgithub.com\u002Fspencerbeggs\u002Feffected","https:\u002F\u002Fgithub.com\u002Fspencerbeggs","2026-11-14 07:03:25",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add spencerbeggs\u002Feffected --skill effect-v4-module-index",{"tool":37,"command":38},"bunx","bunx skills add spencerbeggs\u002Feffected --skill effect-v4-module-index",{"tool":40,"command":41},"pnpm","pnpm dlx skills add spencerbeggs\u002Feffected --skill effect-v4-module-index","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fspencerbeggs\u002Feffected\u002Fblob\u002Fmain\u002Fplugin\u002Fbuilds\u002Fclaude\u002Fskills\u002Feffect-v4-module-index\u002FSKILL.md",true,[],[46,53,60,67,74,81],{"skillNo":47,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":19},"01M780NVTD800KMFV869YNZED6","testing-actions","Use when writing or reviewing tests for @effected\u002Fgithub-actions, @effected\u002Fgithub, @effected\u002Fsbom or @effected\u002Fcommands — stubbing the GitHub API, writing a service's layerTest or makeTest double, testing the pre\u002Fmain\u002Fpost lifecycle through Action.run, or debugging why a test hits the real network or hangs.","https:\u002F\u002Fgithub.com\u002Fspencerbeggs\u002Feffected\u002Fblob\u002Fmain\u002Fplugin\u002Fskills\u002Ftesting-actions\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":19},"01M780NPDSGFC0FCP7696NW11J","supply-chain-attestation","Use when generating a CycloneDX SBOM, checking NTIA minimum elements, building an in-toto statement or a SLSA provenance predicate, signing into a Sigstore DSSE bundle, or uploading an attestation to GitHub.","https:\u002F\u002Fgithub.com\u002Fspencerbeggs\u002Feffected\u002Fblob\u002Fmain\u002Fplugin\u002Fskills\u002Fsupply-chain-attestation\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M780NGP4QNZDH8T8Q8WZ18SA","structuring-an-action","Use when laying out a new GitHub Action repository on the @effected suite, deciding where a piece of code belongs (an entry point, a step, a shared service, a shim), or reviewing an existing action's file structure against the canonical shape.","https:\u002F\u002Fgithub.com\u002Fspencerbeggs\u002Feffected\u002Fblob\u002Fmain\u002Fplugin\u002Fskills\u002Fstructuring-an-action\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M780NCD52H1Y03FS83WJ8BT5","running-commands-and-tools","Use when running a subprocess in Effect v4, spawning a command, capturing stdout\u002Fstderr\u002Fexit code, checking whether a CLI tool is installed or which copy to run, running a package-manager script through the project's launcher, detaching a background process, or redacting a secret from argv or captured output.","https:\u002F\u002Fgithub.com\u002Fspencerbeggs\u002Feffected\u002Fblob\u002Fmain\u002Fplugin\u002Fskills\u002Frunning-commands-and-tools\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M780N823DWNRMSY5X2NT5MSR","release-and-publish","Use when publishing a package to npm, reading the npm registry from Effect v4, checking whether a version is already published, cutting a release tag or GitHub release from an action, applying a release-age gate, or deriving tracking tags for GitHub Actions distribution.","https:\u002F\u002Fgithub.com\u002Fspencerbeggs\u002Feffected\u002Fblob\u002Fmain\u002Fplugin\u002Fskills\u002Frelease-and-publish\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M780MXRF6H20KCESTSSFB3HQ","hardening-a-parser-port","Use when porting or writing a recursive-descent parser, lexer, or tree-walker over untrusted text in the @effected monorepo — the class of hardening the cloud reviewer scans for on every migration. Covers stack-overflow depth guards (on EVERY recursion surface, which a facade has N of — not two), numeric bound guards that must reject NaN and non-integers, code-point range checks scoped to formats with wide escapes, prototype-pollution, control-character rejection, and the invariant that malformed input must fail through the typed error channel, never as an unhandled defect.","https:\u002F\u002Fgithub.com\u002Fspencerbeggs\u002Feffected\u002Fblob\u002Fmain\u002Fplugin\u002Fskills\u002Fhardening-a-parser-port\u002FSKILL.md",[],[]]