@effect-uai/responses 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,5 @@
1
1
  import { resolveHost } from "./region.mjs";
2
- import { n as describe, r as it, t as globalExpect } from "./test.DNmyFkvJ-N3QqMRwZ.mjs";
2
+ import { n as describe, r as it, t as globalExpect } from "./index.C4tKZ0yW-xEu55bU4.mjs";
3
3
  //#region src/region.test.ts
4
4
  describe("responses/region.resolveHost", () => {
5
5
  it("returns default host when no region or baseUrl", () => {
@@ -1,6 +1,6 @@
1
1
  import { codeInterpreterTool, fileSearchTool, renderProviderTools, webSearchTool } from "./ResponsesTools.mjs";
2
2
  import { KnownProviderEvent, eventToDeltas, makeCallIdLookup } 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
  import { Result, Schema } from "effect";
5
5
  import * as Tool from "@effect-uai/core/Tool";
6
6
  import { providerToolsOf } from "@effect-uai/core/Tool";
@@ -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 { WireAnnotation, WireOutputItem, WireResponseCompleted, turnFromCompleted } from "./codec.mjs";
3
3
  import { Match, Schema } from "effect";
4
4
  import { TurnEvent } from "@effect-uai/core/Turn";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect-uai/responses",
3
- "version": "0.16.0",
3
+ "version": "0.18.0",
4
4
  "description": "OpenAI Responses API provider for @effect-uai/core.",
5
5
  "keywords": [
6
6
  "ai",
@@ -55,13 +55,13 @@
55
55
  "access": "public"
56
56
  },
57
57
  "devDependencies": {
58
- "effect": "4.0.0-rc.111",
58
+ "effect": "4.0.1",
59
59
  "typescript": "^7.0.2",
60
- "@effect-uai/core": "0.16.0"
60
+ "@effect-uai/core": "0.18.0"
61
61
  },
62
62
  "peerDependencies": {
63
63
  "@effect-uai/core": ">=0.2.0 <1",
64
- "effect": ">=4.0.0-rc.111 <5.0.0"
64
+ "effect": ">=4.0.1 <5.0.0"
65
65
  },
66
66
  "scripts": {
67
67
  "build": "tsdown",
@@ -1,5 +1,5 @@
1
1
  import { Context, Effect, Layer, Match, Option, Redacted, Schema, Stream } from "effect"
2
- import { HttpClient, HttpClientRequest } from "effect/unstable/http"
2
+ import { HttpClient, HttpClientRequest } from "effect/http"
3
3
  import * as AiError from "@effect-uai/core/AiError"
4
4
  import {
5
5
  DeepResearch,
@@ -1,5 +1,5 @@
1
1
  import { Context, Effect, Layer, Redacted, Schema } from "effect"
2
- import { HttpClient, HttpClientRequest } from "effect/unstable/http"
2
+ import { HttpClient, HttpClientRequest } from "effect/http"
3
3
  import * as AiError from "@effect-uai/core/AiError"
4
4
  import * as Capabilities from "@effect-uai/core/Capabilities"
5
5
  import type {
package/src/Responses.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Context, Effect, Layer, Match, Option, Redacted, Result, Schema, Stream } from "effect"
2
- import { HttpClient, HttpClientRequest, HttpClientResponse } from "effect/unstable/http"
2
+ import { HttpClient, HttpClientRequest, HttpClientResponse } from "effect/http"
3
3
  import * as AiError from "@effect-uai/core/AiError"
4
4
  import * as Capabilities from "@effect-uai/core/Capabilities"
5
5
  import * as StructuredFormat from "@effect-uai/core/StructuredFormat"
package/src/codec.ts CHANGED
@@ -1,4 +1,5 @@
1
- import { Array as Arr, Encoding, Match, Option, Result, Schema, pipe } from "effect"
1
+ import { Array as Arr, Match, Option, Result, Schema, pipe } from "effect"
2
+ import { Base64 } from "effect/encoding"
2
3
  import type { ContentBlock, InputImage, HistoryItem } from "@effect-uai/core/Items"
3
4
  import type { Turn } from "@effect-uai/core/Turn"
4
5
 
@@ -198,7 +199,7 @@ const passthrough = (item: HistoryItem): StoredItem | undefined =>
198
199
  const imageSourceToUrl = Match.type<InputImage["source"]>().pipe(
199
200
  Match.tag("url", (s) => s.url),
200
201
  Match.tag("base64", (s) => `data:${s.mimeType};base64,${s.base64}`),
201
- Match.tag("bytes", (s) => `data:${s.mimeType};base64,${Encoding.encodeBase64(s.bytes)}`),
202
+ Match.tag("bytes", (s) => `data:${s.mimeType};base64,${Base64.encode(s.bytes)}`),
202
203
  Match.exhaustive,
203
204
  )
204
205