@effect-uai/anthropic 0.16.0 → 0.18.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.
@@ -1,5 +1,6 @@
1
1
  //#region \0rolldown/runtime.js
2
2
  var __defProp = Object.defineProperty;
3
+ var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
3
4
  var __exportAll = (all, no_symbols) => {
4
5
  let target = {};
5
6
  for (var name in all) __defProp(target, name, {
@@ -10,4 +11,4 @@ var __exportAll = (all, no_symbols) => {
10
11
  return target;
11
12
  };
12
13
  //#endregion
13
- export { __exportAll as t };
14
+ export { __exportAll as n, __commonJSMin as t };
@@ -1,4 +1,4 @@
1
- import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
1
+ import { n as __exportAll } from "./rolldown-runtime-EAsCxrDo.mjs";
2
2
  import { WireContentBlock, appendInputJsonDelta, appendSignatureDelta, appendTextDelta, appendThinkingDelta, mergeUsage, setStopReason, startBlock } from "./codec.mjs";
3
3
  import { Match, Schema } from "effect";
4
4
  //#region src/streamEvents.ts
@@ -1,6 +1,6 @@
1
1
  import { emptyAccumulator, mergeUsage } from "./codec.mjs";
2
2
  import { applyEvent } from "./streamEvents.mjs";
3
- import { n as describe, r as it, t as globalExpect } from "./test.DNmyFkvJ-N3QqMRwZ.mjs";
3
+ import { n as describe, r as it, t as globalExpect } from "./index.C4tKZ0yW-xEu55bU4.mjs";
4
4
  //#region src/usage.test.ts
5
5
  const wire = {
6
6
  input_tokens: 94,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect-uai/anthropic",
3
- "version": "0.16.0",
3
+ "version": "0.18.0",
4
4
  "description": "Anthropic Messages API provider for @effect-uai/core.",
5
5
  "keywords": [
6
6
  "ai",
@@ -43,13 +43,13 @@
43
43
  "access": "public"
44
44
  },
45
45
  "devDependencies": {
46
- "effect": "4.0.0-rc.111",
46
+ "effect": "4.0.1",
47
47
  "typescript": "^7.0.2",
48
- "@effect-uai/core": "0.16.0"
48
+ "@effect-uai/core": "0.18.0"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "@effect-uai/core": ">=0.2.0 <1",
52
- "effect": ">=4.0.0-rc.111 <5.0.0"
52
+ "effect": ">=4.0.1 <5.0.0"
53
53
  },
54
54
  "scripts": {
55
55
  "build": "tsdown",
package/src/Anthropic.ts CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  Stream,
11
11
  pipe,
12
12
  } from "effect"
13
- import { HttpClient, HttpClientRequest } from "effect/unstable/http"
13
+ import { HttpClient, HttpClientRequest } from "effect/http"
14
14
  import * as AiError from "@effect-uai/core/AiError"
15
15
  import * as Capabilities from "@effect-uai/core/Capabilities"
16
16
  import {
package/src/codec.ts CHANGED
@@ -1,4 +1,5 @@
1
- import { Array as Arr, Encoding, Match, Option, Order, Result, Schema, pipe } from "effect"
1
+ import { Array as Arr, Match, Option, Order, Result, Schema, pipe } from "effect"
2
+ import { Base64 } from "effect/encoding"
2
3
  import * as Items from "@effect-uai/core/Items"
3
4
  import { JsonParseError } from "@effect-uai/core/JSONL"
4
5
  import type { Turn } from "@effect-uai/core/Turn"
@@ -129,7 +130,7 @@ const imageSourceToWire = Match.type<Items.InputImage["source"]>().pipe(
129
130
  Match.tag("bytes", (s): RequestImageContent["source"] => ({
130
131
  type: "base64",
131
132
  media_type: s.mimeType,
132
- data: Encoding.encodeBase64(s.bytes),
133
+ data: Base64.encode(s.bytes),
133
134
  })),
134
135
  Match.exhaustive,
135
136
  )