@danieljvdm/dev-kit 0.11.3 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/README.md +111 -78
  2. package/dev-kit.example.jsonc +0 -4
  3. package/package.json +10 -6
  4. package/schema/dev-kit.schema.json +1 -46
  5. package/skills/build-effect-apis/SKILL.md +77 -0
  6. package/skills/build-effect-apis/agents/openai.yaml +4 -0
  7. package/skills/build-effect-apis/references/cloudflare-workers.md +71 -0
  8. package/skills/build-effect-apis/references/effect-atom-client.md +161 -0
  9. package/skills/build-effect-apis/references/effect-atom-lifecycle.md +78 -0
  10. package/skills/build-effect-apis/references/effect-atom-testing.md +74 -0
  11. package/skills/build-effect-apis/references/runtime-assembly.md +56 -0
  12. package/skills/build-effect-apis/references/server-and-middleware.md +174 -0
  13. package/skills/build-effect-apis/references/shared-contracts.md +108 -0
  14. package/skills/build-effect-apis/references/tanstack-start.md +86 -0
  15. package/skills/build-effect-apis/references/verification.md +50 -0
  16. package/skills/build-effect-clis/SKILL.md +61 -0
  17. package/skills/build-effect-clis/agents/openai.yaml +4 -0
  18. package/skills/build-effect-clis/references/command-design.md +93 -0
  19. package/skills/build-effect-clis/references/entrypoints-and-testing.md +59 -0
  20. package/skills/build-effect-clis/references/processes-and-platform.md +73 -0
  21. package/skills/dev-kit/SKILL.md +77 -48
  22. package/skills/effect-architecture-audit/SKILL.md +26 -0
  23. package/skills/effect-architecture-audit/agents/openai.yaml +4 -0
  24. package/skills/effect-architecture-audit/references/service-and-boundary-audit.md +150 -0
  25. package/skills/effect-ts/SKILL.md +21 -256
  26. package/skills/effect-ts/agents/openai.yaml +3 -3
  27. package/skills/testing/SKILL.md +5 -0
  28. package/src/catalog-manager.ts +16 -17
  29. package/src/catalog.ts +71 -16
  30. package/src/effect-source.ts +46 -24
  31. package/src/effect-tsgo.ts +86 -24
  32. package/src/gitignore.ts +5 -5
  33. package/src/index.ts +3 -6
  34. package/src/manifest.ts +0 -34
  35. package/src/node-symbolic-link.ts +2 -2
  36. package/src/oxfmt.js +5 -0
  37. package/src/oxfmt.ts +5 -0
  38. package/src/oxlint.js +5 -0
  39. package/src/oxlint.ts +5 -0
  40. package/src/package-skill-source.ts +51 -59
  41. package/src/path-digest.ts +7 -7
  42. package/src/project-package.ts +8 -7
  43. package/src/project-process-lock.ts +17 -12
  44. package/src/project-state.ts +1 -1
  45. package/src/skill-manager.ts +18 -16
  46. package/src/skill-selector.ts +12 -0
  47. package/src/sync.ts +181 -131
  48. package/src/tool-ignore-patterns.js +9 -0
  49. package/src/tool-ignore-patterns.ts +15 -0
  50. package/src/vendor.ts +67 -61
  51. package/src/vite-plus-dependency.ts +10 -11
  52. package/src/vite-plus-hooks.ts +24 -14
  53. package/src/vite-plus-quality.ts +21 -172
  54. package/src/vite-plus.js +81 -0
  55. package/src/vite-plus.ts +102 -0
  56. package/templates/AGENTS.md +1 -1
  57. package/skills/effect-ts/UPSTREAM.md +0 -28
  58. package/skills/effect-ts/references/atom-cache-lifecycle.md +0 -78
  59. package/skills/effect-ts/references/atom-http-and-invalidation.md +0 -97
  60. package/skills/effect-ts/references/atom-tanstack-start.md +0 -69
  61. package/skills/effect-ts/references/atom-testing.md +0 -67
  62. package/skills/effect-ts/references/audit-services.md +0 -144
  63. package/skills/effect-ts/references/features.md +0 -525
  64. package/skills/effect-ts/references/guide-atom-data-fetching.md +0 -44
  65. package/skills/effect-ts/references/guide-cli.md +0 -107
  66. package/skills/effect-ts/references/guide-datetime.md +0 -72
  67. package/skills/effect-ts/references/guide-effect.md +0 -440
  68. package/skills/effect-ts/references/guide-error-handling.md +0 -565
  69. package/skills/effect-ts/references/guide-http-boundaries.md +0 -55
  70. package/skills/effect-ts/references/guide-layers.md +0 -989
  71. package/skills/effect-ts/references/guide-observability.md +0 -746
  72. package/skills/effect-ts/references/guide-retries.md +0 -434
  73. package/skills/effect-ts/references/guide-schedule.md +0 -343
  74. package/skills/effect-ts/references/guide-schema.md +0 -664
  75. package/skills/effect-ts/references/guide-sql.md +0 -536
  76. package/skills/effect-ts/references/guide-testing.md +0 -532
  77. package/skills/effect-ts/references/guide-type-safety-and-boundaries.md +0 -131
  78. package/skills/effect-ts/references/version-and-source.md +0 -86
  79. package/templates/vite-plus/vite.config.ts +0 -22
@@ -1,525 +0,0 @@
1
- # Features
2
-
3
- This index is a discovery map, not a version guarantee. Confirm every module,
4
- export, and source path against the target repository's resolved Effect
5
- version as described in `version-and-source.md`.
6
-
7
- Public package and module surface area to be aware of when researching or implementing a solution. Each module entry includes its canonical repository path so it can be located quickly.
8
-
9
- ## `effect` Package
10
-
11
- Package path: `packages/effect`
12
-
13
- - `Array` - `packages/effect/src/Array.ts` - Immutable array utilities. Use: transform arrays immutably.
14
- - `BigDecimal` - `packages/effect/src/BigDecimal.ts` - Arbitrary-precision decimal arithmetic. Use: avoid floating-point errors.
15
- - `BigInt` - `packages/effect/src/BigInt.ts` - `bigint` utilities and instances. Use: work with large integers.
16
- - `Boolean` - `packages/effect/src/Boolean.ts` - Boolean utilities and instances. Use: compose boolean logic.
17
- - `Brand` - `packages/effect/src/Brand.ts` - Branded type helpers. Use: prevent accidental type mixing.
18
- - `Cache` - `packages/effect/src/Cache.ts` - Effect cache utilities. Use: memoize effectful lookups.
19
- - `Cause` - `packages/effect/src/Cause.ts` - Structured effect failure representation. Use: inspect failures and defects.
20
- - `Channel` - `packages/effect/src/Channel.ts` - Bidirectional streaming I/O abstraction. Use: build stream pipelines.
21
- - `ChannelSchema` - `packages/effect/src/ChannelSchema.ts` - Schema helpers for channels. Use: type channel protocols.
22
- - `Chunk` - `packages/effect/src/Chunk.ts` - Immutable high-performance sequence. Use: efficient functional sequences.
23
- - `Clock` - `packages/effect/src/Clock.ts` - Time service and sleep utilities. Use: schedule and measure time.
24
- - `Combiner` - `packages/effect/src/Combiner.ts` - Combine two values of one type. Use: merge values consistently.
25
- - `Config` - `packages/effect/src/Config.ts` - Schema-driven configuration loading. Use: read typed app config.
26
- - `ConfigProvider` - `packages/effect/src/ConfigProvider.ts` - Configuration data source abstraction. Use: load config from env/files.
27
- - `Console` - `packages/effect/src/Console.ts` - Effectful console operations. Use: log and debug safely.
28
- - `Context` - `packages/effect/src/Context.ts` - Dependency injection context table. Use: provide and access services.
29
- - `Cron` - `packages/effect/src/Cron.ts` - Cron scheduling utilities. Use: express recurring schedules.
30
- - `Crypto` - `packages/effect/src/Crypto.ts` - Cryptography service and helpers. Use: generate secure random values and digests through the runtime.
31
- - `Data` - `packages/effect/src/Data.ts` - Immutable data and tagged unions. Use: model domain data and errors.
32
- - `DateTime` - `packages/effect/src/DateTime.ts` - Date-time utilities. Use: handle timestamps and calendars.
33
- - `Deferred` - `packages/effect/src/Deferred.ts` - Single-assignment async variable. Use: coordinate concurrent fibers.
34
- - `Differ` - `packages/effect/src/Differ.ts` - Value diffing utilities. Use: compute incremental updates.
35
- - `Duration` - `packages/effect/src/Duration.ts` - Precise time span type. Use: represent delays and intervals.
36
- - `Effect` - `packages/effect/src/Effect.ts` - Core effect type and operators. Use: model async and concurrent work.
37
- - `Effectable` - `packages/effect/src/Effectable.ts` - Protocols for effect-like values. Use: integrate custom yieldables.
38
- - `Encoding` - `packages/effect/src/Encoding.ts` - Base64, Base64Url, and Hex codecs. Use: encode binary/text values.
39
- - `Equal` - `packages/effect/src/Equal.ts` - Structural and custom equality. Use: compare immutable values deeply.
40
- - `Equivalence` - `packages/effect/src/Equivalence.ts` - Equivalence relation helpers. Use: dedupe or compare with custom rules.
41
- - `ErrorReporter` - `packages/effect/src/ErrorReporter.ts` - Pluggable error reporting. Use: forward failures to observability tools.
42
- - `ExecutionPlan` - `packages/effect/src/ExecutionPlan.ts` - Execution plan utilities. Use: inspect planned work.
43
- - `Exit` - `packages/effect/src/Exit.ts` - Synchronous effect outcome value. Use: inspect success or failure.
44
- - `Fiber` - `packages/effect/src/Fiber.ts` - Lightweight concurrency primitive. Use: fork and join work.
45
- - `FiberHandle` - `packages/effect/src/FiberHandle.ts` - Managed fiber handle helpers. Use: control child fibers.
46
- - `FiberMap` - `packages/effect/src/FiberMap.ts` - Fiber map utilities. Use: track fibers by key.
47
- - `FiberSet` - `packages/effect/src/FiberSet.ts` - Fiber set utilities. Use: manage groups of fibers.
48
- - `FileSystem` - `packages/effect/src/FileSystem.ts` - Effectful file system abstraction. Use: read and write files safely.
49
- - `Filter` - `packages/effect/src/Filter.ts` - Filter result utilities. Use: compose filtering operations.
50
- - `Formatter` - `packages/effect/src/Formatter.ts` - Human-readable value formatting. Use: pretty-print data for logs.
51
- - `Function` - `packages/effect/src/Function.ts` - Core function helpers. Use: pipe and compose functions.
52
- - `Graph` - `packages/effect/src/Graph.ts` - Graph utilities. Use: model dependency graphs.
53
- - `Hash` - `packages/effect/src/Hash.ts` - Hashing utilities. Use: hash values for collections.
54
- - `HashMap` - `packages/effect/src/HashMap.ts` - Immutable hash map. Use: keyed immutable storage.
55
- - `HashRing` - `packages/effect/src/HashRing.ts` - Consistent hashing utilities. Use: distribute keys across nodes.
56
- - `HashSet` - `packages/effect/src/HashSet.ts` - Immutable hash set. Use: store unique immutable values.
57
- - `HKT` - `packages/effect/src/HKT.ts` - Higher-kinded type utilities. Use: define generic type classes.
58
- - `Inspectable` - `packages/effect/src/Inspectable.ts` - Custom inspection helpers. Use: improve debugging output.
59
- - `Iterable` - `packages/effect/src/Iterable.ts` - Functional iterable utilities. Use: process lazy iterables.
60
- - `JsonPatch` - `packages/effect/src/JsonPatch.ts` - JSON Patch operations. Use: diff and patch JSON documents.
61
- - `JsonPointer` - `packages/effect/src/JsonPointer.ts` - JSON Pointer token helpers. Use: escape pointer path segments.
62
- - `JsonSchema` - `packages/effect/src/JsonSchema.ts` - JSON Schema dialect conversion. Use: convert schemas between formats.
63
- - `Latch` - `packages/effect/src/Latch.ts` - Latch synchronization primitive. Use: gate concurrent progress.
64
- - `Layer` - `packages/effect/src/Layer.ts` - Service construction recipes. Use: build and wire dependencies.
65
- - `LayerRef` - `packages/effect/src/LayerRef.ts` - Layer-backed service references. Use: replace or update provided implementations safely.
66
- - `LayerMap` - `packages/effect/src/LayerMap.ts` - Layer registry helpers. Use: share and look up layers.
67
- - `Logger` - `packages/effect/src/Logger.ts` - Structured logging system. Use: emit runtime logs.
68
- - `LogLevel` - `packages/effect/src/LogLevel.ts` - Log level utilities. Use: filter logs by severity.
69
- - `ManagedRuntime` - `packages/effect/src/ManagedRuntime.ts` - Managed runtime helpers. Use: own runtime lifecycle.
70
- - `Match` - `packages/effect/src/Match.ts` - Type-safe pattern matching. Use: replace switch-heavy branching.
71
- - `Metric` - `packages/effect/src/Metric.ts` - Application metrics system. Use: count, gauge, and histogram events.
72
- - `MutableHashMap` - `packages/effect/src/MutableHashMap.ts` - Mutable hash map. Use: high-performance mutable key-value storage.
73
- - `MutableHashSet` - `packages/effect/src/MutableHashSet.ts` - Mutable hash set. Use: high-performance mutable uniqueness checks.
74
- - `MutableList` - `packages/effect/src/MutableList.ts` - Mutable linked-list-like buffer. Use: efficient append/prepend workloads.
75
- - `MutableRef` - `packages/effect/src/MutableRef.ts` - Mutable reference container. Use: hold local mutable state.
76
- - `Newtype` - `packages/effect/src/Newtype.ts` - Zero-cost wrapper types. Use: distinguish same-shaped values.
77
- - `NonEmptyIterable` - `packages/effect/src/NonEmptyIterable.ts` - Non-empty iterable helpers. Use: require at least one element.
78
- - `Number` - `packages/effect/src/Number.ts` - Number utilities and instances. Use: do typed numeric operations.
79
- - `Optic` - `packages/effect/src/Optic.ts` - Immutable data accessors and updaters. Use: read or update nested state.
80
- - `Option` - `packages/effect/src/Option.ts` - Optional value type. Use: model absence safely.
81
- - `Order` - `packages/effect/src/Order.ts` - Total ordering type class. Use: sort and compare values.
82
- - `Ordering` - `packages/effect/src/Ordering.ts` - Comparison result helpers. Use: combine sort outcomes.
83
- - `PartitionedSemaphore` - `packages/effect/src/PartitionedSemaphore.ts` - Partition-aware semaphore. Use: limit concurrency by key.
84
- - `Path` - `packages/effect/src/Path.ts` - Path utilities. Use: work with filesystem-style paths.
85
- - `Pipeable` - `packages/effect/src/Pipeable.ts` - Pipeable protocol helpers. Use: support fluent pipelines.
86
- - `PlatformError` - `packages/effect/src/PlatformError.ts` - Platform error types. Use: normalize platform-specific failures.
87
- - `Pool` - `packages/effect/src/Pool.ts` - Resource pool utilities. Use: reuse scarce resources.
88
- - `Predicate` - `packages/effect/src/Predicate.ts` - Predicate and refinement helpers. Use: filter and narrow values.
89
- - `PrimaryKey` - `packages/effect/src/PrimaryKey.ts` - Primary key helpers. Use: define stable string identifiers.
90
- - `PubSub` - `packages/effect/src/PubSub.ts` - Publish-subscribe hub. Use: broadcast messages to subscribers.
91
- - `Pull` - `packages/effect/src/Pull.ts` - Pull protocol helpers. Use: model pull-based streaming.
92
- - `Queue` - `packages/effect/src/Queue.ts` - Effect queue utilities. Use: buffer producer-consumer work.
93
- - `Random` - `packages/effect/src/Random.ts` - Randomness service. Use: generate testable random values.
94
- - `RcMap` - `packages/effect/src/RcMap.ts` - Reference-counted map. Use: share keyed resources.
95
- - `RcRef` - `packages/effect/src/RcRef.ts` - Reference-counted ref. Use: share scoped resources.
96
- - `Record` - `packages/effect/src/Record.ts` - Record utilities. Use: transform string-keyed objects.
97
- - `Redactable` - `packages/effect/src/Redactable.ts` - Context-aware redaction protocol. Use: mask sensitive values.
98
- - `Redacted` - `packages/effect/src/Redacted.ts` - Sensitive value wrapper. Use: keep secrets out of logs.
99
- - `Reducer` - `packages/effect/src/Reducer.ts` - Fold values into one result. Use: aggregate collections.
100
- - `Ref` - `packages/effect/src/Ref.ts` - Atomic mutable reference. Use: manage concurrent state.
101
- - `References` - `packages/effect/src/References.ts` - Runtime reference services. Use: tune runtime configuration.
102
- - `RegExp` - `packages/effect/src/RegExp.ts` - RegExp utilities. Use: work with regular expressions.
103
- - `Request` - `packages/effect/src/Request.ts` - External request description. Use: batch and cache data fetching.
104
- - `RequestResolver` - `packages/effect/src/RequestResolver.ts` - Request execution abstraction. Use: resolve batched requests.
105
- - `Resource` - `packages/effect/src/Resource.ts` - Resource utilities. Use: acquire and release shared resources.
106
- - `Result` - `packages/effect/src/Result.ts` - Synchronous success/failure type. Use: validate without effects.
107
- - `Runtime` - `packages/effect/src/Runtime.ts` - Effect runtime helpers. Use: run main programs.
108
- - `Schedule` - `packages/effect/src/Schedule.ts` - Retry and repetition schedules. Use: control retry timing.
109
- - `Scheduler` - `packages/effect/src/Scheduler.ts` - Scheduler utilities. Use: control task execution.
110
- - `Schema` - `packages/effect/src/Schema.ts` - Data schema, validation, and codecs. Use: decode and encode typed data.
111
- - `SchemaAST` - `packages/effect/src/SchemaAST.ts` - Runtime schema AST. Use: inspect or transform schemas.
112
- - `SchemaError` - `packages/effect/src/SchemaError.ts` - Schema decoding and encoding failure type. Use: expose validation failures in the Effect error channel.
113
- - `SchemaGetter` - `packages/effect/src/SchemaGetter.ts` - One-way schema transformations. Use: decode individual fields.
114
- - `SchemaIssue` - `packages/effect/src/SchemaIssue.ts` - Structured schema validation errors. Use: inspect parse failures.
115
- - `SchemaParser` - `packages/effect/src/SchemaParser.ts` - Schema parsing helpers. Use: build parsing workflows.
116
- - `SchemaRepresentation` - `packages/effect/src/SchemaRepresentation.ts` - Serializable schema IR. Use: round-trip schemas through JSON/codegen.
117
- - `SchemaTransformation` - `packages/effect/src/SchemaTransformation.ts` - Bidirectional schema transformations. Use: map encoded and decoded forms.
118
- - `Scope` - `packages/effect/src/Scope.ts` - Resource lifetime scope. Use: ensure cleanup of acquired resources.
119
- - `ScopedCache` - `packages/effect/src/ScopedCache.ts` - Scoped cache utilities. Use: cache scoped resources.
120
- - `ScopedRef` - `packages/effect/src/ScopedRef.ts` - Scoped mutable reference. Use: swap scoped resources safely.
121
- - `Semaphore` - `packages/effect/src/Semaphore.ts` - Concurrency semaphore. Use: limit parallel access.
122
- - `Sink` - `packages/effect/src/Sink.ts` - Stream consumer abstraction. Use: fold or write stream inputs.
123
- - `Stdio` - `packages/effect/src/Stdio.ts` - Standard I/O utilities. Use: access stdin/stdout/stderr.
124
- - `Stream` - `packages/effect/src/Stream.ts` - Functional stream abstraction. Use: process streaming data.
125
- - `String` - `packages/effect/src/String.ts` - String utilities and instances. Use: manipulate text functionally.
126
- - `Struct` - `packages/effect/src/Struct.ts` - Immutable object utilities. Use: transform plain objects.
127
- - `SubscriptionRef` - `packages/effect/src/SubscriptionRef.ts` - Subscribable reference. Use: observe state changes.
128
- - `Symbol` - `packages/effect/src/Symbol.ts` - Symbol utilities. Use: work with JavaScript symbols.
129
- - `SynchronizedRef` - `packages/effect/src/SynchronizedRef.ts` - Effect-synchronized ref. Use: update state with effects.
130
- - `Take` - `packages/effect/src/Take.ts` - Stream take representation. Use: carry chunk, end, or error.
131
- - `Terminal` - `packages/effect/src/Terminal.ts` - Terminal interaction utilities. Use: build CLI prompts/output.
132
- - `Tracer` - `packages/effect/src/Tracer.ts` - Tracing abstractions. Use: create spans and traces.
133
- - `Trie` - `packages/effect/src/Trie.ts` - Prefix tree for strings. Use: do prefix lookups.
134
- - `Tuple` - `packages/effect/src/Tuple.ts` - Immutable tuple utilities. Use: transform fixed-length arrays.
135
- - `TxChunk` - `packages/effect/src/TxChunk.ts` - Transactional chunk. Use: mutate chunk state in STM.
136
- - `TxDeferred` - `packages/effect/src/TxDeferred.ts` - Transactional deferred cell. Use: coordinate STM completion.
137
- - `TxHashMap` - `packages/effect/src/TxHashMap.ts` - Transactional hash map. Use: keyed STM state.
138
- - `TxHashSet` - `packages/effect/src/TxHashSet.ts` - Transactional hash set. Use: unique STM state.
139
- - `TxPriorityQueue` - `packages/effect/src/TxPriorityQueue.ts` - Transactional priority queue. Use: ordered STM queueing.
140
- - `TxPubSub` - `packages/effect/src/TxPubSub.ts` - Transactional pub-sub hub. Use: broadcast within STM.
141
- - `TxQueue` - `packages/effect/src/TxQueue.ts` - Transactional queue. Use: queue data within STM.
142
- - `TxReentrantLock` - `packages/effect/src/TxReentrantLock.ts` - Transactional reentrant RW lock. Use: coordinate STM access.
143
- - `TxRef` - `packages/effect/src/TxRef.ts` - Transactional reference. Use: read and write STM state.
144
- - `TxSemaphore` - `packages/effect/src/TxSemaphore.ts` - Transactional semaphore. Use: limit STM concurrency.
145
- - `TxSubscriptionRef` - `packages/effect/src/TxSubscriptionRef.ts` - Transactional subscribable ref. Use: observe committed STM changes.
146
- - `Types` - `packages/effect/src/Types.ts` - Type-level utility aliases. Use: shape complex TypeScript types.
147
- - `UndefinedOr` - `packages/effect/src/UndefinedOr.ts` - Helpers for `A | undefined`. Use: model lightweight optional values.
148
- - `Unify` - `packages/effect/src/Unify.ts` - Type unification helpers. Use: simplify inferred types.
149
- - `Utils` - `packages/effect/src/Utils.ts` - Generator and HKT internals. Use: support yieldable APIs.
150
-
151
- ### `effect/testing`
152
-
153
- - `FastCheck` - `packages/effect/src/testing/FastCheck.ts` - Re-export of fast-check for property testing. Use: generate random test cases.
154
- - `TestClock` - `packages/effect/src/testing/TestClock.ts` - Controllable clock for tests. Use: advance time deterministically.
155
- - `TestConsole` - `packages/effect/src/testing/TestConsole.ts` - Test console implementation. Use: assert console output.
156
- - `TestSchema` - `packages/effect/src/testing/TestSchema.ts` - Schema assertion helpers. Use: verify decode/encode behavior.
157
-
158
- ### `effect/unstable/ai`
159
-
160
- - `AiError` - `packages/effect/src/unstable/ai/AiError.ts` - AI-related error types. Use: handle model failures.
161
- - `AnthropicStructuredOutput` - `packages/effect/src/unstable/ai/AnthropicStructuredOutput.ts` - Anthropic structured-output codec helpers. Use: parse structured model responses.
162
- - `Chat` - `packages/effect/src/unstable/ai/Chat.ts` - Stateful AI conversation API. Use: manage chat sessions.
163
- - `EmbeddingModel` - `packages/effect/src/unstable/ai/EmbeddingModel.ts` - Provider-agnostic embedding API. Use: generate text vectors.
164
- - `IdGenerator` - `packages/effect/src/unstable/ai/IdGenerator.ts` - Pluggable ID generation. Use: issue stable request IDs.
165
- - `LanguageModel` - `packages/effect/src/unstable/ai/LanguageModel.ts` - AI text generation with tools. Use: call LLMs.
166
- - `McpSchema` - `packages/effect/src/unstable/ai/McpSchema.ts` - MCP schema helpers. Use: type MCP messages.
167
- - `McpServer` - `packages/effect/src/unstable/ai/McpServer.ts` - MCP server support. Use: expose model context tools.
168
- - `Model` - `packages/effect/src/unstable/ai/Model.ts` - Unified AI provider interface. Use: swap AI backends.
169
- - `OpenAiStructuredOutput` - `packages/effect/src/unstable/ai/OpenAiStructuredOutput.ts` - OpenAI structured-output codecs. Use: decode typed model output.
170
- - `Prompt` - `packages/effect/src/unstable/ai/Prompt.ts` - Prompt-building data structures. Use: compose prompts.
171
- - `Response` - `packages/effect/src/unstable/ai/Response.ts` - AI response data structures. Use: inspect completions.
172
- - `ResponseIdTracker` - `packages/effect/src/unstable/ai/ResponseIdTracker.ts` - Response ID tracking utilities. Use: correlate model replies.
173
- - `Telemetry` - `packages/effect/src/unstable/ai/Telemetry.ts` - OpenTelemetry integration for AI operations. Use: trace model calls.
174
- - `Tokenizer` - `packages/effect/src/unstable/ai/Tokenizer.ts` - Tokenization and truncation utilities. Use: enforce token budgets.
175
- - `Tool` - `packages/effect/src/unstable/ai/Tool.ts` - Tool definition and management. Use: expose callable tools.
176
- - `Toolkit` - `packages/effect/src/unstable/ai/Toolkit.ts` - Collection of tools. Use: bundle tool implementations.
177
-
178
- ### `effect/unstable/cli`
179
-
180
- - `Argument` - `packages/effect/src/unstable/cli/Argument.ts` - CLI argument definitions. Use: positional arguments.
181
- - `CliConfig` - `packages/effect/src/unstable/cli/CliConfig.ts` - CLI parser and built-in flag configuration. Use: customize command parsing behavior.
182
- - `CliError` - `packages/effect/src/unstable/cli/CliError.ts` - CLI error types. Use: report parse failures.
183
- - `CliOutput` - `packages/effect/src/unstable/cli/CliOutput.ts` - CLI rendering/output helpers. Use: format command output.
184
- - `Command` - `packages/effect/src/unstable/cli/Command.ts` - CLI command definitions. Use: build subcommands.
185
- - `Completions` - `packages/effect/src/unstable/cli/Completions.ts` - Shell completion generation. Use: generate completion scripts.
186
- - `Flag` - `packages/effect/src/unstable/cli/Flag.ts` - CLI flag definitions. Use: parse options.
187
- - `GlobalFlag` - `packages/effect/src/unstable/cli/GlobalFlag.ts` - Global CLI flags. Use: shared top-level options.
188
- - `HelpDoc` - `packages/effect/src/unstable/cli/HelpDoc.ts` - CLI help document model. Use: render usage text.
189
- - `Param` - `packages/effect/src/unstable/cli/Param.ts` - CLI parameter helpers. Use: define typed params.
190
- - `Primitive` - `packages/effect/src/unstable/cli/Primitive.ts` - Primitive CLI parsers. Use: parse numbers or strings.
191
- - `Prompt` - `packages/effect/src/unstable/cli/Prompt.ts` - Interactive CLI prompts. Use: ask users for input.
192
-
193
- ### `effect/unstable/cluster`
194
-
195
- - `ClusterCron` - `packages/effect/src/unstable/cluster/ClusterCron.ts` - Cluster cron scheduling. Use: distributed recurring jobs.
196
- - `ClusterError` - `packages/effect/src/unstable/cluster/ClusterError.ts` - Cluster error types. Use: classify cluster failures.
197
- - `ClusterMetrics` - `packages/effect/src/unstable/cluster/ClusterMetrics.ts` - Cluster metrics helpers. Use: observe cluster health.
198
- - `ClusterSchema` - `packages/effect/src/unstable/cluster/ClusterSchema.ts` - Cluster schema types. Use: encode cluster messages.
199
- - `ClusterWorkflowEngine` - `packages/effect/src/unstable/cluster/ClusterWorkflowEngine.ts` - Workflow engine for clusters. Use: run distributed workflows.
200
- - `DeliverAt` - `packages/effect/src/unstable/cluster/DeliverAt.ts` - Deferred delivery scheduling. Use: schedule message delivery.
201
- - `Entity` - `packages/effect/src/unstable/cluster/Entity.ts` - Cluster entity abstraction. Use: model sharded actors.
202
- - `EntityAddress` - `packages/effect/src/unstable/cluster/EntityAddress.ts` - Entity addressing types. Use: route entity messages.
203
- - `EntityId` - `packages/effect/src/unstable/cluster/EntityId.ts` - Typed entity identifiers. Use: identify actor instances.
204
- - `EntityProxy` - `packages/effect/src/unstable/cluster/EntityProxy.ts` - Client proxy for entities. Use: call remote entities.
205
- - `EntityProxyServer` - `packages/effect/src/unstable/cluster/EntityProxyServer.ts` - Server for entity proxies. Use: serve entity calls.
206
- - `EntityResource` - `packages/effect/src/unstable/cluster/EntityResource.ts` - Entity-backed resource helpers. Use: manage entity state.
207
- - `EntityType` - `packages/effect/src/unstable/cluster/EntityType.ts` - Entity type descriptors. Use: register entity kinds.
208
- - `Envelope` - `packages/effect/src/unstable/cluster/Envelope.ts` - Message envelope types. Use: wrap cluster messages.
209
- - `HttpRunner` - `packages/effect/src/unstable/cluster/HttpRunner.ts` - HTTP-based runner. Use: transport cluster traffic over HTTP.
210
- - `K8sHttpClient` - `packages/effect/src/unstable/cluster/K8sHttpClient.ts` - Kubernetes HTTP client helpers. Use: discover cluster peers.
211
- - `MachineId` - `packages/effect/src/unstable/cluster/MachineId.ts` - Machine identifier utilities. Use: label cluster nodes.
212
- - `Message` - `packages/effect/src/unstable/cluster/Message.ts` - Cluster message model. Use: send typed payloads.
213
- - `MessageStorage` - `packages/effect/src/unstable/cluster/MessageStorage.ts` - Message persistence abstraction. Use: durable message storage.
214
- - `Reply` - `packages/effect/src/unstable/cluster/Reply.ts` - Reply message helpers. Use: respond to cluster requests.
215
- - `Runner` - `packages/effect/src/unstable/cluster/Runner.ts` - Cluster runner abstraction. Use: host cluster workloads.
216
- - `RunnerAddress` - `packages/effect/src/unstable/cluster/RunnerAddress.ts` - Runner addressing types. Use: locate a runner.
217
- - `RunnerHealth` - `packages/effect/src/unstable/cluster/RunnerHealth.ts` - Runner health reporting. Use: track node readiness.
218
- - `Runners` - `packages/effect/src/unstable/cluster/Runners.ts` - Runner collection utilities. Use: manage active runners.
219
- - `RunnerServer` - `packages/effect/src/unstable/cluster/RunnerServer.ts` - Runner server implementation. Use: expose runner endpoints.
220
- - `RunnerStorage` - `packages/effect/src/unstable/cluster/RunnerStorage.ts` - Runner persistence abstraction. Use: store runner metadata.
221
- - `ShardId` - `packages/effect/src/unstable/cluster/ShardId.ts` - Shard identifier type. Use: map keys to shards.
222
- - `Sharding` - `packages/effect/src/unstable/cluster/Sharding.ts` - Sharding utilities. Use: distribute entities.
223
- - `ShardingConfig` - `packages/effect/src/unstable/cluster/ShardingConfig.ts` - Sharding configuration. Use: tune partitioning behavior.
224
- - `ShardingRegistrationEvent` - `packages/effect/src/unstable/cluster/ShardingRegistrationEvent.ts` - Sharding registration events. Use: observe topology changes.
225
- - `SingleRunner` - `packages/effect/src/unstable/cluster/SingleRunner.ts` - Single-process runner. Use: local cluster execution.
226
- - `Singleton` - `packages/effect/src/unstable/cluster/Singleton.ts` - Cluster singleton abstraction. Use: one active service instance.
227
- - `SingletonAddress` - `packages/effect/src/unstable/cluster/SingletonAddress.ts` - Singleton addressing types. Use: route singleton calls.
228
- - `Snowflake` - `packages/effect/src/unstable/cluster/Snowflake.ts` - Snowflake-style ID generation. Use: unique distributed IDs.
229
- - `SocketRunner` - `packages/effect/src/unstable/cluster/SocketRunner.ts` - Socket-based runner. Use: cluster transport over sockets.
230
- - `SqlMessageStorage` - `packages/effect/src/unstable/cluster/SqlMessageStorage.ts` - SQL-backed message storage. Use: persist cluster messages.
231
- - `SqlRunnerStorage` - `packages/effect/src/unstable/cluster/SqlRunnerStorage.ts` - SQL-backed runner storage. Use: persist runner state.
232
- - `TestRunner` - `packages/effect/src/unstable/cluster/TestRunner.ts` - Test runner utilities. Use: simulate cluster execution.
233
-
234
- ### `effect/unstable/devtools`
235
-
236
- - `DevTools` - `packages/effect/src/unstable/devtools/DevTools.ts` - Devtools integration. Use: inspect runtime behavior.
237
- - `DevToolsClient` - `packages/effect/src/unstable/devtools/DevToolsClient.ts` - Devtools client API. Use: connect to devtools server.
238
- - `DevToolsSchema` - `packages/effect/src/unstable/devtools/DevToolsSchema.ts` - Devtools message schemas. Use: type devtools payloads.
239
- - `DevToolsServer` - `packages/effect/src/unstable/devtools/DevToolsServer.ts` - Devtools server API. Use: expose inspection endpoints.
240
-
241
- ### `effect/unstable/encoding`
242
-
243
- - `Msgpack` - `packages/effect/src/unstable/encoding/Msgpack.ts` - MessagePack encoding helpers. Use: compact binary serialization.
244
- - `Ndjson` - `packages/effect/src/unstable/encoding/Ndjson.ts` - NDJSON encoding helpers. Use: stream JSON lines.
245
- - `Sse` - `packages/effect/src/unstable/encoding/Sse.ts` - Server-sent event encoding helpers. Use: emit SSE streams.
246
-
247
- ### `effect/unstable/eventlog`
248
-
249
- - `Event` - `packages/effect/src/unstable/eventlog/Event.ts` - Event model types. Use: represent domain events.
250
- - `EventGroup` - `packages/effect/src/unstable/eventlog/EventGroup.ts` - Event grouping helpers. Use: batch related events.
251
- - `EventJournal` - `packages/effect/src/unstable/eventlog/EventJournal.ts` - Event journal abstraction. Use: append and read events.
252
- - `EventLog` - `packages/effect/src/unstable/eventlog/EventLog.ts` - Event log API. Use: stream recorded events.
253
- - `EventLogEncryption` - `packages/effect/src/unstable/eventlog/EventLogEncryption.ts` - Event log encryption helpers. Use: protect event payloads.
254
- - `EventLogMessage` - `packages/effect/src/unstable/eventlog/EventLogMessage.ts` - Event log message types. Use: transport log entries.
255
- - `EventLogRemote` - `packages/effect/src/unstable/eventlog/EventLogRemote.ts` - Remote event log client/server helpers. Use: access remote logs.
256
- - `EventLogServer` - `packages/effect/src/unstable/eventlog/EventLogServer.ts` - Event log server support. Use: host event streams.
257
- - `EventLogServerEncrypted` - `packages/effect/src/unstable/eventlog/EventLogServerEncrypted.ts` - Encrypted event log server. Use: secure event serving.
258
- - `EventLogServerUnencrypted` - `packages/effect/src/unstable/eventlog/EventLogServerUnencrypted.ts` - Unencrypted event log server. Use: plain local serving.
259
- - `EventLogSessionAuth` - `packages/effect/src/unstable/eventlog/EventLogSessionAuth.ts` - Event log session auth helpers. Use: authorize event sessions.
260
- - `SqlEventJournal` - `packages/effect/src/unstable/eventlog/SqlEventJournal.ts` - SQL-backed event journal. Use: persist events in SQL.
261
- - `SqlEventLogServerEncrypted` - `packages/effect/src/unstable/eventlog/SqlEventLogServerEncrypted.ts` - SQL-backed encrypted event server. Use: secure persisted logs.
262
- - `SqlEventLogServerUnencrypted` - `packages/effect/src/unstable/eventlog/SqlEventLogServerUnencrypted.ts` - SQL-backed plain event server. Use: simple persisted logs.
263
-
264
- ### `effect/unstable/http`
265
-
266
- - `Cookies` - `packages/effect/src/unstable/http/Cookies.ts` - HTTP cookie helpers. Use: parse and set cookies.
267
- - `Etag` - `packages/effect/src/unstable/http/Etag.ts` - ETag utilities. Use: cache validation headers.
268
- - `FetchHttpClient` - `packages/effect/src/unstable/http/FetchHttpClient.ts` - Fetch-based HTTP client. Use: run requests in browsers.
269
- - `FindMyWay` - `packages/effect/src/unstable/http/FindMyWay.ts` - `find-my-way` router integration. Use: path routing.
270
- - `Headers` - `packages/effect/src/unstable/http/Headers.ts` - HTTP header utilities. Use: manage request headers.
271
- - `HttpBody` - `packages/effect/src/unstable/http/HttpBody.ts` - HTTP body representations. Use: send JSON or bytes.
272
- - `HttpClient` - `packages/effect/src/unstable/http/HttpClient.ts` - Effect HTTP client API. Use: perform outbound requests.
273
- - `HttpClientError` - `packages/effect/src/unstable/http/HttpClientError.ts` - HTTP client error types. Use: handle request failures.
274
- - `HttpClientRequest` - `packages/effect/src/unstable/http/HttpClientRequest.ts` - HTTP client request builders. Use: construct requests.
275
- - `HttpClientResponse` - `packages/effect/src/unstable/http/HttpClientResponse.ts` - HTTP client response utilities. Use: read status and body.
276
- - `HttpEffect` - `packages/effect/src/unstable/http/HttpEffect.ts` - HTTP-specific effect helpers. Use: compose HTTP workflows.
277
- - `HttpIncomingMessage` - `packages/effect/src/unstable/http/HttpIncomingMessage.ts` - Incoming message abstraction. Use: read request bodies.
278
- - `HttpMethod` - `packages/effect/src/unstable/http/HttpMethod.ts` - HTTP method helpers. Use: branch on verbs.
279
- - `HttpMiddleware` - `packages/effect/src/unstable/http/HttpMiddleware.ts` - HTTP middleware utilities. Use: add auth or logging.
280
- - `HttpPlatform` - `packages/effect/src/unstable/http/HttpPlatform.ts` - Platform HTTP integration. Use: supply runtime adapters.
281
- - `HttpRouter` - `packages/effect/src/unstable/http/HttpRouter.ts` - HTTP routing abstraction. Use: define endpoints.
282
- - `HttpServer` - `packages/effect/src/unstable/http/HttpServer.ts` - HTTP server API. Use: serve requests.
283
- - `HttpServerError` - `packages/effect/src/unstable/http/HttpServerError.ts` - HTTP server error types. Use: render server failures.
284
- - `HttpServerRequest` - `packages/effect/src/unstable/http/HttpServerRequest.ts` - Server request utilities. Use: inspect inbound requests.
285
- - `HttpServerRespondable` - `packages/effect/src/unstable/http/HttpServerRespondable.ts` - Response conversion protocol. Use: return custom response types.
286
- - `HttpServerResponse` - `packages/effect/src/unstable/http/HttpServerResponse.ts` - Server response builders. Use: send JSON or text.
287
- - `HttpStaticServer` - `packages/effect/src/unstable/http/HttpStaticServer.ts` - Static file serving helpers. Use: serve assets.
288
- - `HttpTraceContext` - `packages/effect/src/unstable/http/HttpTraceContext.ts` - HTTP trace-context propagation. Use: carry tracing headers.
289
- - `Multipart` - `packages/effect/src/unstable/http/Multipart.ts` - Multipart form-data helpers. Use: file uploads.
290
- - `Multipasta` - `packages/effect/src/unstable/http/Multipasta.ts` - Multipasta integration. Use: parse multipart streams.
291
- - `Template` - `packages/effect/src/unstable/http/Template.ts` - HTTP templating helpers. Use: generate responses from templates.
292
- - `Url` - `packages/effect/src/unstable/http/Url.ts` - URL utilities. Use: parse and build URLs.
293
- - `UrlParams` - `packages/effect/src/unstable/http/UrlParams.ts` - URL parameter helpers. Use: encode query strings.
294
-
295
- ### `effect/unstable/httpapi`
296
-
297
- - `HttpApi` - `packages/effect/src/unstable/httpapi/HttpApi.ts` - Typed HTTP API description. Use: define an API contract.
298
- - `HttpApiBuilder` - `packages/effect/src/unstable/httpapi/HttpApiBuilder.ts` - Build servers from `HttpApi`. Use: implement typed endpoints.
299
- - `HttpApiClient` - `packages/effect/src/unstable/httpapi/HttpApiClient.ts` - Client generation for `HttpApi`. Use: call typed APIs.
300
- - `HttpApiEndpoint` - `packages/effect/src/unstable/httpapi/HttpApiEndpoint.ts` - Endpoint descriptors. Use: define route inputs/outputs.
301
- - `HttpApiError` - `packages/effect/src/unstable/httpapi/HttpApiError.ts` - HTTP API error types. Use: model typed API failures.
302
- - `HttpApiGroup` - `packages/effect/src/unstable/httpapi/HttpApiGroup.ts` - Group API endpoints. Use: organize related routes.
303
- - `HttpApiMiddleware` - `packages/effect/src/unstable/httpapi/HttpApiMiddleware.ts` - API middleware helpers. Use: add auth policies.
304
- - `HttpApiScalar` - `packages/effect/src/unstable/httpapi/HttpApiScalar.ts` - Scalar UI/integration helpers. Use: expose API docs tooling.
305
- - `HttpApiSchema` - `packages/effect/src/unstable/httpapi/HttpApiSchema.ts` - Schema annotations for HTTP metadata. Use: tag schema fields for APIs.
306
- - `HttpApiSecurity` - `packages/effect/src/unstable/httpapi/HttpApiSecurity.ts` - Security scheme helpers. Use: define auth requirements.
307
- - `HttpApiSwagger` - `packages/effect/src/unstable/httpapi/HttpApiSwagger.ts` - Swagger/OpenAPI integration. Use: serve interactive docs.
308
- - `HttpApiTest` - `packages/effect/src/unstable/httpapi/HttpApiTest.ts` - HttpApi test helpers. Use: test typed endpoints.
309
- - `OpenApi` - `packages/effect/src/unstable/httpapi/OpenApi.ts` - OpenAPI generation helpers. Use: export API specs.
310
-
311
- ### `effect/unstable/observability`
312
-
313
- - `Otlp` - `packages/effect/src/unstable/observability/Otlp.ts` - OTLP integration entrypoint. Use: configure OTLP telemetry.
314
- - `OtlpExporter` - `packages/effect/src/unstable/observability/OtlpExporter.ts` - OTLP exporter utilities. Use: send telemetry externally.
315
- - `OtlpLogger` - `packages/effect/src/unstable/observability/OtlpLogger.ts` - OTLP log export support. Use: ship structured logs.
316
- - `OtlpMetrics` - `packages/effect/src/unstable/observability/OtlpMetrics.ts` - OTLP metrics export support. Use: export counters and histograms.
317
- - `OtlpResource` - `packages/effect/src/unstable/observability/OtlpResource.ts` - OTLP resource metadata helpers. Use: tag service identity.
318
- - `OtlpSerialization` - `packages/effect/src/unstable/observability/OtlpSerialization.ts` - OTLP serialization helpers. Use: encode telemetry payloads.
319
- - `OtlpTracer` - `packages/effect/src/unstable/observability/OtlpTracer.ts` - OTLP tracing export support. Use: export spans.
320
- - `PrometheusMetrics` - `packages/effect/src/unstable/observability/PrometheusMetrics.ts` - Prometheus metrics exporter. Use: expose scrape endpoint.
321
-
322
- ### `effect/unstable/persistence`
323
-
324
- - `KeyValueStore` - `packages/effect/src/unstable/persistence/KeyValueStore.ts` - Key-value storage abstraction. Use: persist simple state.
325
- - `Persistable` - `packages/effect/src/unstable/persistence/Persistable.ts` - Persistable type helpers. Use: encode stored values.
326
- - `PersistedCache` - `packages/effect/src/unstable/persistence/PersistedCache.ts` - Durable cache. Use: cache across restarts.
327
- - `PersistedQueue` - `packages/effect/src/unstable/persistence/PersistedQueue.ts` - Durable queue. Use: persist work items.
328
- - `Persistence` - `packages/effect/src/unstable/persistence/Persistence.ts` - Persistence service APIs. Use: back durable components.
329
- - `RateLimiter` - `packages/effect/src/unstable/persistence/RateLimiter.ts` - Persistent rate limiter. Use: enforce cross-process limits.
330
- - `Redis` - `packages/effect/src/unstable/persistence/Redis.ts` - Redis-backed persistence helpers. Use: store state in Redis.
331
-
332
- ### `effect/unstable/process`
333
-
334
- - `ChildProcess` - `packages/effect/src/unstable/process/ChildProcess.ts` - Child process abstractions. Use: manage spawned commands.
335
- - `ChildProcessSpawner` - `packages/effect/src/unstable/process/ChildProcessSpawner.ts` - Generic child-process spawning service. Use: launch subprocesses.
336
-
337
- ### `effect/unstable/reactivity`
338
-
339
- - `AsyncResult` - `packages/effect/src/unstable/reactivity/AsyncResult.ts` - Reactive async result type. Use: represent loading/error/data.
340
- - `Atom` - `packages/effect/src/unstable/reactivity/Atom.ts` - Reactive atom state primitive. Use: local reactive state.
341
- - `AtomHttpApi` - `packages/effect/src/unstable/reactivity/AtomHttpApi.ts` - HttpApi integration for atoms. Use: sync state over HTTP.
342
- - `AtomRef` - `packages/effect/src/unstable/reactivity/AtomRef.ts` - Ref-backed atom helpers. Use: bridge refs to reactivity.
343
- - `AtomRegistry` - `packages/effect/src/unstable/reactivity/AtomRegistry.ts` - Atom registry utilities. Use: track application atoms.
344
- - `AtomRpc` - `packages/effect/src/unstable/reactivity/AtomRpc.ts` - RPC integration for atoms. Use: sync state over RPC.
345
- - `Hydration` - `packages/effect/src/unstable/reactivity/Hydration.ts` - Hydration helpers. Use: restore reactive state.
346
- - `Reactivity` - `packages/effect/src/unstable/reactivity/Reactivity.ts` - Core reactivity utilities. Use: compose reactive computations.
347
-
348
- ### `effect/unstable/rpc`
349
-
350
- - `Rpc` - `packages/effect/src/unstable/rpc/Rpc.ts` - Typed RPC description. Use: define RPC contracts.
351
- - `RpcClient` - `packages/effect/src/unstable/rpc/RpcClient.ts` - RPC client API. Use: call remote procedures.
352
- - `RpcClientError` - `packages/effect/src/unstable/rpc/RpcClientError.ts` - RPC client error types. Use: handle transport failures.
353
- - `RpcGroup` - `packages/effect/src/unstable/rpc/RpcGroup.ts` - Group RPC endpoints. Use: organize procedures.
354
- - `RpcMessage` - `packages/effect/src/unstable/rpc/RpcMessage.ts` - RPC message model. Use: encode request/response payloads.
355
- - `RpcMiddleware` - `packages/effect/src/unstable/rpc/RpcMiddleware.ts` - RPC middleware helpers. Use: add auth or tracing.
356
- - `RpcSchema` - `packages/effect/src/unstable/rpc/RpcSchema.ts` - Schema helpers for RPC. Use: type RPC payloads.
357
- - `RpcSerialization` - `packages/effect/src/unstable/rpc/RpcSerialization.ts` - RPC serialization helpers. Use: encode wire formats.
358
- - `RpcServer` - `packages/effect/src/unstable/rpc/RpcServer.ts` - RPC server API. Use: expose procedures.
359
- - `RpcTest` - `packages/effect/src/unstable/rpc/RpcTest.ts` - RPC testing helpers. Use: test RPC handlers.
360
- - `RpcWorker` - `packages/effect/src/unstable/rpc/RpcWorker.ts` - Worker integration for RPC. Use: run RPC over workers.
361
- - `Utils` - `packages/effect/src/unstable/rpc/Utils.ts` - Shared RPC utilities. Use: support custom RPC plumbing.
362
-
363
- ### `effect/unstable/schema`
364
-
365
- - `Model` - `packages/effect/src/unstable/schema/Model.ts` - Unstable schema model helpers. Use: define schema-backed models.
366
- - `VariantSchema` - `packages/effect/src/unstable/schema/VariantSchema.ts` - Variant/discriminated schema helpers. Use: model tagged unions.
367
-
368
- ### `effect/unstable/socket`
369
-
370
- - `Socket` - `packages/effect/src/unstable/socket/Socket.ts` - Socket abstractions. Use: connect stream transports.
371
- - `SocketServer` - `packages/effect/src/unstable/socket/SocketServer.ts` - Socket server helpers. Use: accept socket clients.
372
-
373
- ### `effect/unstable/sql`
374
-
375
- - `Migrator` - `packages/effect/src/unstable/sql/Migrator.ts` - SQL migration helpers. Use: run schema migrations.
376
- - `SqlClient` - `packages/effect/src/unstable/sql/SqlClient.ts` - SQL client API. Use: execute queries.
377
- - `SqlConnection` - `packages/effect/src/unstable/sql/SqlConnection.ts` - SQL connection abstraction. Use: manage DB sessions.
378
- - `SqlError` - `packages/effect/src/unstable/sql/SqlError.ts` - SQL error types. Use: classify database failures.
379
- - `SqlModel` - `packages/effect/src/unstable/sql/SqlModel.ts` - SQL-backed model helpers. Use: map tables to models.
380
- - `SqlResolver` - `packages/effect/src/unstable/sql/SqlResolver.ts` - SQL request resolution helpers. Use: batch DB-backed requests.
381
- - `SqlSchema` - `packages/effect/src/unstable/sql/SqlSchema.ts` - Schema helpers for SQL. Use: type query values.
382
- - `SqlStream` - `packages/effect/src/unstable/sql/SqlStream.ts` - Streaming SQL query helpers. Use: consume large result sets.
383
- - `Statement` - `packages/effect/src/unstable/sql/Statement.ts` - SQL statement builders/types. Use: prepare typed statements.
384
-
385
- ### `effect/unstable/workers`
386
-
387
- - `Transferable` - `packages/effect/src/unstable/workers/Transferable.ts` - Transferable value helpers. Use: send data between workers.
388
- - `Worker` - `packages/effect/src/unstable/workers/Worker.ts` - Worker abstractions. Use: run isolated tasks.
389
- - `WorkerError` - `packages/effect/src/unstable/workers/WorkerError.ts` - Worker error types. Use: handle worker failures.
390
- - `WorkerRunner` - `packages/effect/src/unstable/workers/WorkerRunner.ts` - Worker runner utilities. Use: host jobs in workers.
391
-
392
- ### `effect/unstable/workflow`
393
-
394
- - `Activity` - `packages/effect/src/unstable/workflow/Activity.ts` - Workflow activity helpers. Use: define durable steps.
395
- - `DurableClock` - `packages/effect/src/unstable/workflow/DurableClock.ts` - Durable clock API. Use: schedule workflow time.
396
- - `DurableDeferred` - `packages/effect/src/unstable/workflow/DurableDeferred.ts` - Durable deferred primitive. Use: await external completion.
397
- - `DurableQueue` - `packages/effect/src/unstable/workflow/DurableQueue.ts` - Durable queue primitive. Use: persist workflow worklists.
398
- - `Workflow` - `packages/effect/src/unstable/workflow/Workflow.ts` - Workflow definition API. Use: declare durable workflows.
399
- - `WorkflowEngine` - `packages/effect/src/unstable/workflow/WorkflowEngine.ts` - Workflow engine runtime. Use: execute workflows.
400
- - `WorkflowProxy` - `packages/effect/src/unstable/workflow/WorkflowProxy.ts` - Workflow client proxy. Use: call workflow instances.
401
- - `WorkflowProxyServer` - `packages/effect/src/unstable/workflow/WorkflowProxyServer.ts` - Workflow proxy server. Use: expose workflow endpoints.
402
-
403
- ## `@effect/opentelemetry` Package
404
-
405
- Package path: `packages/opentelemetry`
406
-
407
- - `OtelLogger` - `packages/opentelemetry/src/OtelLogger.ts` - OpenTelemetry logging integration. Use: export structured logs.
408
- - `OtelMetrics` - `packages/opentelemetry/src/OtelMetrics.ts` - OpenTelemetry metrics integration. Use: publish application metrics.
409
- - `NodeSdk` - `packages/opentelemetry/src/NodeSdk.ts` - Node OpenTelemetry SDK wiring. Use: bootstrap telemetry in Node.
410
- - `Resource` - `packages/opentelemetry/src/Resource.ts` - OpenTelemetry resource helpers. Use: describe service metadata.
411
- - `OtelTracer` - `packages/opentelemetry/src/OtelTracer.ts` - OpenTelemetry tracing integration. Use: create and export spans.
412
- - `WebSdk` - `packages/opentelemetry/src/WebSdk.ts` - Web OpenTelemetry SDK wiring. Use: bootstrap telemetry in browsers.
413
-
414
- ## `@effect/platform-browser` Package
415
-
416
- Package path: `packages/platform-browser`
417
-
418
- - `BrowserCrypto` - `packages/platform-browser/src/BrowserCrypto.ts` - Browser cryptography service. Use: provide Effect Crypto from Web Crypto.
419
- - `BrowserHttpClient` - `packages/platform-browser/src/BrowserHttpClient.ts` - Browser HTTP client implementation. Use: make fetch-based requests.
420
- - `BrowserKeyValueStore` - `packages/platform-browser/src/BrowserKeyValueStore.ts` - Browser key-value storage adapter. Use: persist small client values.
421
- - `BrowserPersistence` - `packages/platform-browser/src/BrowserPersistence.ts` - Browser persistence services. Use: store app state locally.
422
- - `BrowserRuntime` - `packages/platform-browser/src/BrowserRuntime.ts` - Browser runtime entrypoints. Use: run Effect apps in browsers.
423
- - `BrowserSocket` - `packages/platform-browser/src/BrowserSocket.ts` - Browser socket implementation. Use: open WebSocket-style connections.
424
- - `BrowserStream` - `packages/platform-browser/src/BrowserStream.ts` - Browser stream adapters. Use: bridge web streams.
425
- - `BrowserWorker` - `packages/platform-browser/src/BrowserWorker.ts` - Browser worker integration. Use: communicate with web workers.
426
- - `BrowserWorkerRunner` - `packages/platform-browser/src/BrowserWorkerRunner.ts` - Worker-side runtime helpers. Use: run Effect code inside workers.
427
- - `Clipboard` - `packages/platform-browser/src/Clipboard.ts` - Clipboard API wrappers. Use: read or write clipboard data.
428
- - `Geolocation` - `packages/platform-browser/src/Geolocation.ts` - Geolocation API wrappers. Use: access device location.
429
- - `IndexedDb` - `packages/platform-browser/src/IndexedDb.ts` - IndexedDB integration. Use: build browser databases.
430
- - `IndexedDbDatabase` - `packages/platform-browser/src/IndexedDbDatabase.ts` - IndexedDB database helpers. Use: define database handles.
431
- - `IndexedDbQueryBuilder` - `packages/platform-browser/src/IndexedDbQueryBuilder.ts` - IndexedDB query builder. Use: compose indexed queries.
432
- - `IndexedDbTable` - `packages/platform-browser/src/IndexedDbTable.ts` - IndexedDB table helpers. Use: work with object stores.
433
- - `IndexedDbVersion` - `packages/platform-browser/src/IndexedDbVersion.ts` - IndexedDB versioning helpers. Use: manage schema upgrades.
434
- - `Permissions` - `packages/platform-browser/src/Permissions.ts` - Permissions API wrappers. Use: query browser permissions.
435
-
436
- ## `@effect/platform-bun` Package
437
-
438
- Package path: `packages/platform-bun`
439
-
440
- - `BunChildProcessSpawner` - `packages/platform-bun/src/BunChildProcessSpawner.ts` - Bun child-process spawner. Use: launch subprocesses.
441
- - `BunCrypto` - `packages/platform-bun/src/BunCrypto.ts` - Bun cryptography service. Use: provide Effect Crypto on Bun.
442
- - `BunClusterHttp` - `packages/platform-bun/src/BunClusterHttp.ts` - Bun clustered HTTP helpers. Use: scale HTTP servers.
443
- - `BunClusterSocket` - `packages/platform-bun/src/BunClusterSocket.ts` - Bun clustered socket helpers. Use: scale socket servers.
444
- - `BunFileSystem` - `packages/platform-bun/src/BunFileSystem.ts` - Bun file system implementation. Use: do Bun-based file I/O.
445
- - `BunHttpClient` - `packages/platform-bun/src/BunHttpClient.ts` - Bun HTTP client implementation. Use: make outbound HTTP requests.
446
- - `BunHttpPlatform` - `packages/platform-bun/src/BunHttpPlatform.ts` - Bun HTTP platform services. Use: provide HTTP runtime pieces.
447
- - `BunHttpServer` - `packages/platform-bun/src/BunHttpServer.ts` - Bun HTTP server implementation. Use: serve HTTP endpoints.
448
- - `BunHttpServerRequest` - `packages/platform-bun/src/BunHttpServerRequest.ts` - Bun request adapters. Use: read incoming HTTP requests.
449
- - `BunMultipart` - `packages/platform-bun/src/BunMultipart.ts` - Bun multipart parsing. Use: handle form uploads.
450
- - `BunPath` - `packages/platform-bun/src/BunPath.ts` - Bun path service. Use: resolve filesystem paths.
451
- - `BunRedis` - `packages/platform-bun/src/BunRedis.ts` - Bun Redis integration. Use: talk to Redis.
452
- - `BunRuntime` - `packages/platform-bun/src/BunRuntime.ts` - Bun runtime entrypoints. Use: run Effect apps on Bun.
453
- - `BunServices` - `packages/platform-bun/src/BunServices.ts` - Bun service bundle. Use: provide common Bun services.
454
- - `BunSink` - `packages/platform-bun/src/BunSink.ts` - Bun sink adapters. Use: write streamed output.
455
- - `BunSocket` - `packages/platform-bun/src/BunSocket.ts` - Bun socket implementation. Use: manage socket connections.
456
- - `BunSocketServer` - `packages/platform-bun/src/BunSocketServer.ts` - Bun socket server implementation. Use: accept socket clients.
457
- - `BunStdio` - `packages/platform-bun/src/BunStdio.ts` - Bun stdio integration. Use: access stdin/stdout/stderr.
458
- - `BunStream` - `packages/platform-bun/src/BunStream.ts` - Bun stream adapters. Use: bridge Bun streams.
459
- - `BunTerminal` - `packages/platform-bun/src/BunTerminal.ts` - Bun terminal integration. Use: build CLI terminal interactions.
460
- - `BunWorker` - `packages/platform-bun/src/BunWorker.ts` - Bun worker integration. Use: communicate with workers.
461
- - `BunWorkerRunner` - `packages/platform-bun/src/BunWorkerRunner.ts` - Bun worker runtime helpers. Use: run Effect code in workers.
462
-
463
- ## `@effect/platform-node` Package
464
-
465
- Package path: `packages/platform-node`
466
-
467
- - `Mime` - `packages/platform-node/src/Mime.ts` - MIME type helpers. Use: detect or assign content types.
468
- - `NodeChildProcessSpawner` - `packages/platform-node/src/NodeChildProcessSpawner.ts` - Node child-process spawner. Use: launch subprocesses.
469
- - `NodeClusterHttp` - `packages/platform-node/src/NodeClusterHttp.ts` - Node clustered HTTP helpers. Use: scale HTTP servers.
470
- - `NodeClusterSocket` - `packages/platform-node/src/NodeClusterSocket.ts` - Node clustered socket helpers. Use: scale socket servers.
471
- - `NodeCrypto` - `packages/platform-node/src/NodeCrypto.ts` - Node cryptography service. Use: provide Effect Crypto from Node APIs.
472
- - `NodeFileSystem` - `packages/platform-node/src/NodeFileSystem.ts` - Node file system implementation. Use: do Node-based file I/O.
473
- - `NodeHttpClient` - `packages/platform-node/src/NodeHttpClient.ts` - Node HTTP client implementation. Use: make outbound HTTP requests.
474
- - `NodeHttpIncomingMessage` - `packages/platform-node/src/NodeHttpIncomingMessage.ts` - Node incoming message adapters. Use: read raw Node HTTP messages.
475
- - `NodeHttpPlatform` - `packages/platform-node/src/NodeHttpPlatform.ts` - Node HTTP platform services. Use: provide HTTP runtime pieces.
476
- - `NodeHttpServer` - `packages/platform-node/src/NodeHttpServer.ts` - Node HTTP server implementation. Use: serve HTTP endpoints.
477
- - `NodeHttpServerRequest` - `packages/platform-node/src/NodeHttpServerRequest.ts` - Node request adapters. Use: read incoming HTTP requests.
478
- - `NodeMultipart` - `packages/platform-node/src/NodeMultipart.ts` - Node multipart parsing. Use: handle form uploads.
479
- - `NodePath` - `packages/platform-node/src/NodePath.ts` - Node path service. Use: resolve filesystem paths.
480
- - `NodeRedis` - `packages/platform-node/src/NodeRedis.ts` - Node Redis integration. Use: talk to Redis.
481
- - `NodeRuntime` - `packages/platform-node/src/NodeRuntime.ts` - Node runtime entrypoints. Use: run Effect apps on Node.
482
- - `NodeServices` - `packages/platform-node/src/NodeServices.ts` - Node service bundle. Use: provide common Node services.
483
- - `NodeSink` - `packages/platform-node/src/NodeSink.ts` - Node sink adapters. Use: write streamed output.
484
- - `NodeSocket` - `packages/platform-node/src/NodeSocket.ts` - Node socket implementation. Use: manage socket connections.
485
- - `NodeSocketServer` - `packages/platform-node/src/NodeSocketServer.ts` - Node socket server implementation. Use: accept socket clients.
486
- - `NodeStdio` - `packages/platform-node/src/NodeStdio.ts` - Node stdio integration. Use: access stdin/stdout/stderr.
487
- - `NodeStream` - `packages/platform-node/src/NodeStream.ts` - Node stream adapters. Use: bridge Node streams.
488
- - `NodeTerminal` - `packages/platform-node/src/NodeTerminal.ts` - Node terminal integration. Use: build CLI terminal interactions.
489
- - `NodeWorker` - `packages/platform-node/src/NodeWorker.ts` - Node worker integration. Use: communicate with worker threads.
490
- - `NodeWorkerRunner` - `packages/platform-node/src/NodeWorkerRunner.ts` - Node worker runtime helpers. Use: run Effect code in workers.
491
- - `Undici` - `packages/platform-node/src/Undici.ts` - Undici integration helpers. Use: use Undici-based HTTP features.
492
-
493
- ## `@effect/platform-node-shared` Package
494
-
495
- Package path: `packages/platform-node-shared`
496
-
497
- - `NodeChildProcessSpawner` - `packages/platform-node-shared/src/NodeChildProcessSpawner.ts` - Shared Node child-process spawner. Use: launch subprocesses across Node-compatible runtimes.
498
- - `NodeClusterSocket` - `packages/platform-node-shared/src/NodeClusterSocket.ts` - Shared cluster socket integration. Use: run Effect cluster transports on Node-compatible runtimes.
499
- - `NodeCrypto` - `packages/platform-node-shared/src/NodeCrypto.ts` - Shared Node cryptography service. Use: provide Effect Crypto from Node APIs.
500
- - `NodeFileSystem` - `packages/platform-node-shared/src/NodeFileSystem.ts` - Shared Node filesystem service. Use: provide Effect FileSystem from Node APIs.
501
- - `NodePath` - `packages/platform-node-shared/src/NodePath.ts` - Shared Node path service. Use: provide Effect Path from Node APIs.
502
- - `NodeRuntime` - `packages/platform-node-shared/src/NodeRuntime.ts` - Shared Node runtime entrypoint. Use: run main Effect programs with process lifecycle handling.
503
- - `NodeSink` - `packages/platform-node-shared/src/NodeSink.ts` - Shared Node sink adapters. Use: write Effect streams to Node sinks.
504
- - `NodeSocket` - `packages/platform-node-shared/src/NodeSocket.ts` - Shared Node socket adapters. Use: bridge Effect sockets to Node transports.
505
- - `NodeSocketServer` - `packages/platform-node-shared/src/NodeSocketServer.ts` - Shared Node socket server. Use: accept Effect socket connections.
506
- - `NodeStdio` - `packages/platform-node-shared/src/NodeStdio.ts` - Shared Node standard I/O service. Use: provide arguments and stdio streams.
507
- - `NodeStream` - `packages/platform-node-shared/src/NodeStream.ts` - Shared Node stream adapters. Use: bridge Node and Effect streams.
508
- - `NodeTerminal` - `packages/platform-node-shared/src/NodeTerminal.ts` - Shared Node terminal service. Use: support interactive CLI programs.
509
-
510
- ## `@effect/vitest` Package
511
-
512
- Package path: `packages/vitest`
513
-
514
- - `vitest` - `packages/vitest/src/index.ts` - Re-export of `vitest` APIs. Use: use standard Vitest APIs.
515
- - `API` - `packages/vitest/src/index.ts` - Test API type alias. Use: type custom test helpers.
516
- - `Vitest` - `packages/vitest/src/index.ts` - Effect-aware Vitest namespace types. Use: type Effect-based tests.
517
- - `addEqualityTesters` - `packages/vitest/src/index.ts` - Installs equality testers. Use: compare Effect values in assertions.
518
- - `effect` - `packages/vitest/src/index.ts` - Effect-aware `it` variant. Use: write scoped Effect tests.
519
- - `live` - `packages/vitest/src/index.ts` - Live-service test variant. Use: run tests with live services.
520
- - `layer` - `packages/vitest/src/index.ts` - Share a `Layer` across tests. Use: provide services to test groups.
521
- - `flakyTest` - `packages/vitest/src/index.ts` - Flaky-test wrapper. Use: stabilize eventually consistent checks.
522
- - `prop` - `packages/vitest/src/index.ts` - Property-test helper. Use: generate property-based cases.
523
- - `it` - `packages/vitest/src/index.ts` - Extended Vitest `it`. Use: mix regular and Effect tests.
524
- - `makeMethods` - `packages/vitest/src/index.ts` - Build extended test methods. Use: wrap a custom test API.
525
- - `describeWrapped` - `packages/vitest/src/index.ts` - `describe` helper with Effect methods. Use: define grouped Effect test suites.
@@ -1,44 +0,0 @@
1
- # Effect Atom Data Fetching
2
-
3
- Model server data as stable atoms owned outside React renders. Give the application one intentional registry boundary and one compatible runtime factory; then choose cache retention, freshness, polling, and invalidation independently.
4
-
5
- ## Workflow
6
-
7
- 1. Inspect the installed `effect` and `@effect/atom-react` versions and their source before copying signatures. These APIs live under `effect/unstable/reactivity` and may move.
8
- 2. Locate every `RegistryProvider`, runtime factory, query atom, mutation atom, and route-level `AsyncResult.all`. Draw the ownership boundary before changing behavior.
9
- 3. Keep one `RegistryProvider` for the intended client application lifetime. Define the shared runtime factory, API service, query families, and mutation atoms at module scope rather than in components.
10
- 4. Choose each lifecycle control for its actual job:
11
- - idle `timeToLive`: retain an unused registry value before disposal;
12
- - `Atom.swr({ staleTime })`: decide when mount/focus revalidation is needed;
13
- - `Atom.withRefresh`: force periodic refresh while mounted.
14
- 5. Give queries stable identities and matching reactivity keys. Let successful mutations invalidate those keys rather than manually coordinating every consumer.
15
- 6. Keep browser-only signals behind an SSR-safe boundary. Decide explicitly whether initial data is client-only or hydrated from a request-scoped server registry.
16
- 7. Verify lifecycle behavior with fake time and request counters, not sleeps.
17
-
18
- ## Ownership rules
19
-
20
- - Treat a query as shared read state: export one atom or `Atom.family` and let components subscribe.
21
- - Treat an action as an event owned by the initiating UI or workflow: export the mutation atom, invoke it with `useAtomSet`, and observe its result only where useful.
22
- - Never allocate a query atom in render. For parameterized queries, use a stable scalar or Effect `Hash`/`Equal` value as the family argument.
23
- - Ensure every input to a route-level `AsyncResult.all` has stable atom identity and compatible retention. One newly allocated or immediately evicted input returns to `Initial` and makes the whole aggregate appear reset even when the other inputs remain cached.
24
- - Do not describe manual refresh or polling as freshness caching. Refresh is forceful; `staleTime` only gates SWR's automatic mount/focus decisions.
25
-
26
- ## React hooks and action lifetime
27
-
28
- Choose the hook that expresses the component's ownership:
29
-
30
- - `useAtomValue(atom)` subscribes for rendering without returning a setter;
31
- - `useAtomSet(atom)` mounts a writable atom and returns a setter without rendering from its value;
32
- - `useAtom(atom)` subscribes and returns a setter when the same component both renders and writes the atom.
33
-
34
- Do not pair `useAtomValue(atom)` with `useAtomSet(atom)` for the same atom in one component. The split form creates both a value subscription and a separate mount. Use `useAtom(atom)` instead. Calling an `Atom.family` directly with a stable primitive during render already returns the stable family member; a surrounding `useMemo` is not needed merely to preserve atom identity.
35
-
36
- The React hooks release their subscriptions and mounts when their component lifetime ends. Registry node removal then follows the atom's idle TTL and remaining consumers, and node disposal runs the atom lifetime finalizers. Do not confuse hook cleanup, idle retention, and operation cancellation: another consumer or a nonzero TTL can intentionally keep the node and its work alive after one component unmounts.
37
-
38
- Do not add a cleanup-only effect such as `useEffect(() => () => set(Atom.Interrupt), [set])` merely to mirror component unmount. `Atom.Interrupt` is a write that publishes an interrupted `AsyncResult.Failure`, not a passive release function. The cleanup also runs on dependency changes and during React Strict Mode's development effect replay, and it can interrupt work still owned by another consumer. Use `Atom.Interrupt` for an explicit user cancellation or a deliberately scoped cancellation policy, and test that ownership under Strict Mode.
39
-
40
- Decide whether an action must survive its initiating component before choosing its owner. A sequential client fan-out can partially complete if route unmount disposes its owner after earlier mutations succeed but before later ones start. If the whole sequence must be durable, move it to a stable workflow owner or one server-side command instead of relying on a route component's hook lifetime.
41
-
42
- ## Completion check
43
-
44
- Confirm one registry boundary, stable atom identity, deliberate TTL/staleness/polling values, matching query and mutation keys, an intentional React hook and action lifetime, SSR-safe browser access, and tests for every lifecycle behavior changed.