effect-uai 0.1.0 → 0.5.2

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.
package/CHANGELOG.md ADDED
@@ -0,0 +1,89 @@
1
+ # effect-uai
2
+
3
+ ## 0.5.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 1509883: Two related refactors. Both are breaking but mechanical — a one-line
8
+ rewrite per affected call site.
9
+
10
+ ### `Retry` is its own module
11
+
12
+ `LanguageModel.retry` and `LanguageModel.Retryable` were not
13
+ LanguageModel-specific — the implementation was a generic `AiError`
14
+ combinator. Hoisted out into `@effect-uai/core/Retry`, with two
15
+ carriers so it covers every model surface:
16
+ - `Retry.stream(schedule)` — for `Stream<A, AiError, R>` (`streamTurn`,
17
+ `streamSynthesis`, `streamTranscriptionFrom`).
18
+ - `Retry.effect(schedule)` — for `Effect<A, AiError, R>` (`turn`,
19
+ `embed`, `embedMany`, `synthesize`, `transcribe`).
20
+
21
+ Both gate on the `RateLimited | Unavailable | Timeout` subset; other
22
+ `AiError`s propagate unchanged. The namespace deliberately doesn't
23
+ shadow Effect's own `Stream.retry` / `Effect.retry`.
24
+
25
+ ```ts
26
+ // Before
27
+ import { retry } from "@effect-uai/core/LanguageModel";
28
+ streamTurn(req).pipe(retry(schedule));
29
+
30
+ // After
31
+ import * as Retry from "@effect-uai/core/Retry";
32
+ streamTurn(req).pipe(Retry.stream(schedule));
33
+ embed(req).pipe(Retry.effect(schedule));
34
+ ```
35
+
36
+ `Retryable` and `isRetryable` move to the same module.
37
+
38
+ ### `turn` is now on `LanguageModelService`
39
+
40
+ `turn(request): Effect<Turn, AiError>` is now a method on the service
41
+ alongside `streamTurn`. Providers without a native non-streaming
42
+ endpoint derive it from `streamTurn` via the new
43
+ `LanguageModel.turnFromStream(streamTurn)` helper; providers with a
44
+ native complete endpoint can override.
45
+
46
+ The top-level `LanguageModel.turn(request)` helper is unchanged at
47
+ call sites — it now delegates to the service method instead of
48
+ draining `streamTurn` inline.
49
+
50
+ Hand-rolled `LanguageModelService` values (most commonly in tests)
51
+ must now supply a `turn` field. Use `turnFromStream`:
52
+
53
+ ```ts
54
+ // Before
55
+ const service: LanguageModelService = {
56
+ streamTurn: () => Stream.fromIterable([...]),
57
+ }
58
+
59
+ // After
60
+ import { turnFromStream } from "@effect-uai/core/LanguageModel"
61
+ const streamTurn: LanguageModelService["streamTurn"] = () => Stream.fromIterable([...])
62
+ const service: LanguageModelService = { streamTurn, turn: turnFromStream(streamTurn) }
63
+ ```
64
+
65
+ ## 0.5.1
66
+
67
+ ### Patch Changes
68
+
69
+ - 4d83b13: The bare `effect-uai` name-squat package now ships in lockstep with
70
+ every `@effect-uai/*` scoped package via changesets' `fixed` group —
71
+ no more drift between the placeholder and the real packages. No
72
+ functional changes in this release; the package remains a name
73
+ reservation, install [`@effect-uai/core`](https://www.npmjs.com/package/@effect-uai/core)
74
+ and the provider packages.
75
+
76
+ ## 0.5.0
77
+
78
+ ### Minor Changes
79
+
80
+ - Catch-up bump to align with the rest of the workspace. From here on,
81
+ `effect-uai` (the bare name-squat) moves in lockstep with every
82
+ `@effect-uai/*` package via changesets' `fixed` group. No functional
83
+ payload — the package remains a name reservation; install
84
+ [`@effect-uai/core`](https://www.npmjs.com/package/@effect-uai/core)
85
+ and the provider packages instead.
86
+
87
+ ## 0.1.0
88
+
89
+ Initial name reservation.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Betalyra Sociedade Unipessoal Lda.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
package/README.md CHANGED
@@ -1,11 +1,23 @@
1
1
  # effect-uai
2
2
 
3
3
  This npm name is **reserved** for the `effect-uai` project. The functional
4
- packages live under the `@betalyra` scope:
4
+ packages live under the `@effect-uai/*` scope:
5
5
 
6
- - [`@betalyra/effect-uai-core`](https://www.npmjs.com/package/@betalyra/effect-uai-core)
7
- - low-level primitives (loop, conversation, items, tools, streaming codecs).
8
- - [`@betalyra/effect-uai-responses`](https://www.npmjs.com/package/@betalyra/effect-uai-responses)
9
- - OpenAI Responses API provider.
6
+ - [`@effect-uai/core`](https://www.npmjs.com/package/@effect-uai/core) —
7
+ low-level primitives (loop, conversation, items, tools, streaming codecs).
8
+ - [`@effect-uai/responses`](https://www.npmjs.com/package/@effect-uai/responses) —
9
+ OpenAI Responses API provider.
10
+ - [`@effect-uai/anthropic`](https://www.npmjs.com/package/@effect-uai/anthropic) —
11
+ Anthropic Messages provider.
12
+ - [`@effect-uai/google`](https://www.npmjs.com/package/@effect-uai/google) —
13
+ Google Gemini language model, embeddings, speech, and Lyria music.
14
+ - [`@effect-uai/openai`](https://www.npmjs.com/package/@effect-uai/openai) —
15
+ OpenAI speech (STT + TTS).
16
+ - [`@effect-uai/elevenlabs`](https://www.npmjs.com/package/@effect-uai/elevenlabs) —
17
+ ElevenLabs speech.
18
+ - [`@effect-uai/inworld`](https://www.npmjs.com/package/@effect-uai/inworld) —
19
+ Inworld speech.
20
+ - [`@effect-uai/jina`](https://www.npmjs.com/package/@effect-uai/jina) —
21
+ Jina embeddings (dense / sparse / multivector).
10
22
 
11
23
  Project repository: https://github.com/betalyra/effect-uai
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "effect-uai",
3
- "version": "0.1.0",
4
- "description": "Reserved name. See @betalyra/effect-uai-core and @betalyra/effect-uai-responses.",
3
+ "version": "0.5.2",
4
+ "description": "Reserved name. See @effect-uai/core and the @effect-uai/* provider packages.",
5
5
  "homepage": "https://github.com/betalyra/effect-uai#readme",
6
6
  "bugs": {
7
7
  "url": "https://github.com/betalyra/effect-uai/issues"
@@ -15,4 +15,4 @@
15
15
  "scripts": {
16
16
  "typecheck": "echo 'no-op'"
17
17
  }
18
- }
18
+ }