@opencode/ai 0.0.0-dev-21599 → 0.0.0-dev-21603
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/dist/protocols/anthropic-messages.d.ts +0 -4
- package/dist/protocols/anthropic-messages.js +3 -3
- package/dist/protocols/bedrock-converse.d.ts +0 -2
- package/dist/protocols/bedrock-converse.js +2 -3
- package/dist/protocols/gemini.js +2 -2
- package/dist/protocols/google-interactions.js +2 -2
- package/dist/protocols/openai-chat.js +3 -3
- package/dist/protocols/openai-compatible-chat.d.ts +1 -2
- package/dist/protocols/openai-compatible-responses.d.ts +1 -2
- package/dist/protocols/utils/partial-json-options.d.ts +0 -1
- package/dist/protocols/utils/partial-json-options.js +0 -1
- package/dist/providers/cloudflare-ai-gateway.d.ts +1 -1
- package/dist/providers/cloudflare-ai-gateway.js +1 -2
- package/dist/providers/google-vertex.js +2 -2
- package/dist/providers/open-responses-options.d.ts +0 -1
- package/dist/providers/open-responses-options.js +1 -1
- package/dist/providers/openai-compatible.js +1 -1
- package/dist/providers/openai-options.d.ts +0 -1
- package/dist/providers/openai-options.js +0 -1
- package/dist/route/auth-options.d.ts +0 -3
- package/dist/route/auth.d.ts +0 -2
- package/dist/route/auth.js +0 -2
- package/dist/route/client.d.ts +0 -2
- package/dist/route/client.js +3 -4
- package/dist/route/executor-service.js +1 -1
- package/package.json +3 -3
|
@@ -10,7 +10,6 @@ export declare const DEFAULT_BASE_URL = "https://api.anthropic.com/v1";
|
|
|
10
10
|
export declare const PATH = "/messages";
|
|
11
11
|
export declare const DEFAULT_MAX_TOKENS = 32000;
|
|
12
12
|
export declare const framing: Framing.Definition<string>;
|
|
13
|
-
export type ThinkingBlockBinding = typeof AnthropicThinkingBlockBinding.Type;
|
|
14
13
|
export type ThinkingInput = typeof Thinking.Encoded;
|
|
15
14
|
/** Caller-facing provider options; unknown keys are accepted and ignored. `Options.Type` is the wire-ready form. */
|
|
16
15
|
export type OptionsInput = ProviderOptions & typeof Options.Encoded;
|
|
@@ -27,9 +26,6 @@ export declare const ContextManagement: Schema.Struct<{
|
|
|
27
26
|
}>>;
|
|
28
27
|
}>;
|
|
29
28
|
export type ContextManagement = typeof ContextManagement.Type;
|
|
30
|
-
declare const AnthropicThinkingBlockBinding: Schema.Struct<{
|
|
31
|
-
readonly prefix_mismatch_behavior: Schema.optional<Schema.declare<import("../schema/options.js").OpenString<"drop_block" | "error">, import("../schema/options.js").OpenString<"drop_block" | "error">>>;
|
|
32
|
-
}>;
|
|
33
29
|
declare const Thinking: Schema.Union<readonly [Schema.decodeTo<Schema.Struct<{
|
|
34
30
|
readonly display: Schema.optional<Schema.declare<import("../schema/options.js").OpenString<"omitted" | "summarized">, import("../schema/options.js").OpenString<"omitted" | "summarized">>>;
|
|
35
31
|
readonly block_binding: Schema.optional<Schema.Struct<{
|
|
@@ -678,7 +678,7 @@ const requireThinkingSignature = (request) => {
|
|
|
678
678
|
};
|
|
679
679
|
// Opus 4.8 and every Claude 5 model accept mid-conversation system messages; later versions inherit support.
|
|
680
680
|
const supportsNativeSystemUpdates = (request) => {
|
|
681
|
-
const version = claudeVersion(
|
|
681
|
+
const version = claudeVersion(request.model.id);
|
|
682
682
|
if (version === undefined)
|
|
683
683
|
return false;
|
|
684
684
|
if (version.family === "opus" && version.major === 4)
|
|
@@ -723,7 +723,7 @@ const appendToUserTurn = (messages, block) => {
|
|
|
723
723
|
};
|
|
724
724
|
const lowerMessages = Effect.fnUntraced(function* (request, breakpoints) {
|
|
725
725
|
const messages = [];
|
|
726
|
-
const providerMetadataKey = request.model.route.providerMetadataKey ??
|
|
726
|
+
const providerMetadataKey = request.model.route.providerMetadataKey ?? request.model.provider;
|
|
727
727
|
// Text updates stay where they are unless a user turn follows them; then they move after the latest
|
|
728
728
|
// user turn, the nearest spot where Anthropic accepts a native system message.
|
|
729
729
|
const holdUpdates = supportsNativeSystemUpdates(request);
|
|
@@ -1385,7 +1385,7 @@ export const protocol = Protocol.make({
|
|
|
1385
1385
|
initial: (request) => ({
|
|
1386
1386
|
provider: request.model.provider,
|
|
1387
1387
|
compactions: {},
|
|
1388
|
-
providerMetadataKey: request.model.route.providerMetadataKey ??
|
|
1388
|
+
providerMetadataKey: request.model.route.providerMetadataKey ?? request.model.provider,
|
|
1389
1389
|
tools: ToolStream.empty(),
|
|
1390
1390
|
reasoningSignatures: {},
|
|
1391
1391
|
lifecycle: Lifecycle.initial(),
|
|
@@ -2,7 +2,6 @@ import { Schema } from "effect";
|
|
|
2
2
|
import { Route } from "../route/client.js";
|
|
3
3
|
import { Protocol } from "../route/protocol.js";
|
|
4
4
|
import { Usage, type FinishReasonDetails } from "../schema/index.js";
|
|
5
|
-
import { BedrockAuth } from "./utils/bedrock-auth.js";
|
|
6
5
|
import { Lifecycle } from "./utils/lifecycle.js";
|
|
7
6
|
import { ToolStream } from "./utils/tool-stream.js";
|
|
8
7
|
export type { Credentials as BedrockCredentials } from "./utils/bedrock-auth.js";
|
|
@@ -451,5 +450,4 @@ export declare const route: Route<{
|
|
|
451
450
|
readonly [x: string]: unknown;
|
|
452
451
|
readonly rawBody: string;
|
|
453
452
|
}>, import("../route/client.js").CompactionOperations | undefined>;
|
|
454
|
-
export declare const sigV4Auth: typeof BedrockAuth.sigV4;
|
|
455
453
|
export * as BedrockConverse from "./bedrock-converse.js";
|
|
@@ -244,7 +244,7 @@ const lowerMessages = Effect.fnUntraced(function* (request, breakpoints) {
|
|
|
244
244
|
const documentNames = new Set();
|
|
245
245
|
// Mistral can reject replay IDs even when they satisfy Converse's broader ID syntax.
|
|
246
246
|
const normalizeID = request.model.id.includes("mistral.") ? MistralToolID.normalizer(request) : (id) => id;
|
|
247
|
-
const providerMetadataKey = request.model.route.providerMetadataKey ??
|
|
247
|
+
const providerMetadataKey = request.model.route.providerMetadataKey ?? request.model.provider;
|
|
248
248
|
const hoistImages = !keepToolImagesInline(request.model.id);
|
|
249
249
|
// Bedrock expects parallel tool results before any images hoisted beside them.
|
|
250
250
|
const pendingImages = [];
|
|
@@ -693,7 +693,7 @@ export const protocol = Protocol.make({
|
|
|
693
693
|
stream: {
|
|
694
694
|
event: BedrockEventStream.Frame.pipe(Schema.decodeTo(BedrockEvent)),
|
|
695
695
|
initial: (request) => ({
|
|
696
|
-
providerMetadataKey: request.model.route.providerMetadataKey ??
|
|
696
|
+
providerMetadataKey: request.model.route.providerMetadataKey ?? request.model.provider,
|
|
697
697
|
tools: ToolStream.empty(),
|
|
698
698
|
finishReason: undefined,
|
|
699
699
|
usage: undefined,
|
|
@@ -718,5 +718,4 @@ export const route = Route.make({
|
|
|
718
718
|
auth: BedrockAuth.auth,
|
|
719
719
|
framing,
|
|
720
720
|
});
|
|
721
|
-
export const sigV4Auth = BedrockAuth.sigV4;
|
|
722
721
|
export * as BedrockConverse from "./bedrock-converse.js";
|
package/dist/protocols/gemini.js
CHANGED
|
@@ -224,7 +224,7 @@ const lowerToolCall = (part, omitIds, metadataKey) => ({
|
|
|
224
224
|
});
|
|
225
225
|
const lowerMessages = Effect.fnUntraced(function* (request) {
|
|
226
226
|
const contents = [];
|
|
227
|
-
const metadataKey = request.model.route.providerMetadataKey ??
|
|
227
|
+
const metadataKey = request.model.route.providerMetadataKey ?? request.model.provider;
|
|
228
228
|
const omitCallIds = omitsFunctionCallIds(request.model.id);
|
|
229
229
|
const legacyToolMedia = routesLegacyToolMedia(request.model.id);
|
|
230
230
|
let pendingMedia;
|
|
@@ -750,7 +750,7 @@ export const protocol = Protocol.make({
|
|
|
750
750
|
event: Schema.Union([Schema.instanceOf(NextRequest), GeminiEvent]),
|
|
751
751
|
initial: (request) => ({
|
|
752
752
|
route: `${request.model.provider}/${request.model.route.id}`,
|
|
753
|
-
providerMetadataKey: request.model.route.providerMetadataKey ??
|
|
753
|
+
providerMetadataKey: request.model.route.providerMetadataKey ?? request.model.provider,
|
|
754
754
|
hasToolCalls: false,
|
|
755
755
|
lifecycle: Lifecycle.initial(),
|
|
756
756
|
nextReasoningId: 0,
|
|
@@ -184,7 +184,7 @@ const signature = (metadata, key) => {
|
|
|
184
184
|
};
|
|
185
185
|
const lowerMessages = Effect.fnUntraced(function* (request) {
|
|
186
186
|
const steps = [];
|
|
187
|
-
const key = request.model.route.providerMetadataKey ??
|
|
187
|
+
const key = request.model.route.providerMetadataKey ?? request.model.provider;
|
|
188
188
|
for (const message of request.messages) {
|
|
189
189
|
if (message.role === "system") {
|
|
190
190
|
const part = yield* ProviderShared.wrappedSystemUpdate("Google Interactions", message);
|
|
@@ -476,7 +476,7 @@ export const protocol = Protocol.make({
|
|
|
476
476
|
event: Protocol.jsonEvent(Event),
|
|
477
477
|
initial: (request) => ({
|
|
478
478
|
route: `${request.model.provider}/${ADAPTER}`,
|
|
479
|
-
metadataKey: request.model.route.providerMetadataKey ??
|
|
479
|
+
metadataKey: request.model.route.providerMetadataKey ?? request.model.provider,
|
|
480
480
|
lifecycle: Lifecycle.initial(),
|
|
481
481
|
steps: {},
|
|
482
482
|
tools: ToolStream.empty(),
|
|
@@ -419,7 +419,7 @@ const lowerMessages = Effect.fnUntraced(function* (request, options) {
|
|
|
419
419
|
const mistral = ["mistral", "devstral", "codestral", "pixtral", "mixtral"].some((family) => modelID.includes(family));
|
|
420
420
|
const lowering = {
|
|
421
421
|
...options,
|
|
422
|
-
providerMetadataKey: request.model.route.providerMetadataKey ??
|
|
422
|
+
providerMetadataKey: request.model.route.providerMetadataKey ?? request.model.provider,
|
|
423
423
|
toolCallID: (id) => {
|
|
424
424
|
if (mistral)
|
|
425
425
|
return id
|
|
@@ -607,7 +607,7 @@ export const fromRequest = Effect.fn("OpenAIChat.fromRequest")(function* (reques
|
|
|
607
607
|
return yield* ProviderShared.invalidRequest(`OpenAI Chat reasoning field conflicts with reserved field ${reasoningField}`);
|
|
608
608
|
const generation = request.generation;
|
|
609
609
|
const flattened = ProviderShared.flattenToolRequest(request);
|
|
610
|
-
const provider =
|
|
610
|
+
const provider = request.model.provider;
|
|
611
611
|
const baseURL = request.model.route.endpoint.baseURL;
|
|
612
612
|
const detectedMaxTokensField = detectMaxTokensField(provider, baseURL);
|
|
613
613
|
const maxTokensField = request.model.compatibility?.maxTokensField ?? detectedMaxTokensField;
|
|
@@ -1005,7 +1005,7 @@ export const protocol = Protocol.make({
|
|
|
1005
1005
|
stream: {
|
|
1006
1006
|
event: OpenAIChatStreamEvent,
|
|
1007
1007
|
initial: (request) => ({
|
|
1008
|
-
providerMetadataKey: request.model.route.providerMetadataKey ??
|
|
1008
|
+
providerMetadataKey: request.model.route.providerMetadataKey ?? request.model.provider,
|
|
1009
1009
|
tools: ToolStream.empty(),
|
|
1010
1010
|
pendingTools: {},
|
|
1011
1011
|
toolCallEvents: [],
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Route
|
|
2
|
-
export type OpenAICompatibleChatLanguageModelInput = RouteRoutedLanguageModelInput;
|
|
1
|
+
import { Route } from "../route/client.js";
|
|
3
2
|
/**
|
|
4
3
|
* Route for non-OpenAI providers that expose an OpenAI Chat-compatible
|
|
5
4
|
* `/chat/completions` endpoint. Reuses `OpenAIChat.protocol` end-to-end and
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Route
|
|
2
|
-
export type OpenAICompatibleResponsesLanguageModelInput = RouteRoutedLanguageModelInput;
|
|
1
|
+
import { Route } from "../route/client.js";
|
|
3
2
|
/**
|
|
4
3
|
* Deployment adapter for providers that expose an Open Responses-compatible
|
|
5
4
|
* `/responses` endpoint. Provider helpers configure identity, endpoint, and
|
|
@@ -49,4 +49,3 @@ export const ALL = ATOM | COLLECTION;
|
|
|
49
49
|
* The default is to allow all types to be partially parsed, which in most cases is the best option.
|
|
50
50
|
*/
|
|
51
51
|
export const Allow = { STR, NUM, ARR, OBJ, NULL, BOOL, NAN, INFINITY, _INFINITY, INF, SPECIAL, ATOM, COLLECTION, ALL };
|
|
52
|
-
export default Allow;
|
|
@@ -1231,7 +1231,7 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
1231
1231
|
}>)[];
|
|
1232
1232
|
export declare const configure: (input: LanguageModelOptions) => {
|
|
1233
1233
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
1234
|
-
model: (
|
|
1234
|
+
model: (value: string | ModelID) => import("../schema/options.js").LanguageModel<import("./openai-options.js").OpenAIOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
1235
1235
|
configure: typeof configure;
|
|
1236
1236
|
};
|
|
1237
1237
|
export declare const provider: {
|
|
@@ -72,8 +72,7 @@ export const configure = (input) => {
|
|
|
72
72
|
const chat = route.with(rest);
|
|
73
73
|
return {
|
|
74
74
|
id,
|
|
75
|
-
model: (
|
|
76
|
-
const value = String(input);
|
|
75
|
+
model: (value) => {
|
|
77
76
|
if (value.startsWith("openai/"))
|
|
78
77
|
return responses.model({ id: native ? value.slice("openai/".length) : value });
|
|
79
78
|
if (value.startsWith("anthropic/"))
|
|
@@ -28,7 +28,7 @@ const route = Route.make({
|
|
|
28
28
|
providerMetadataKey: "vertex",
|
|
29
29
|
protocol,
|
|
30
30
|
endpoint: Endpoint.path(({ request }) => {
|
|
31
|
-
const model =
|
|
31
|
+
const model = request.model.id;
|
|
32
32
|
return `/${model.startsWith("endpoints/") ? model : `models/${model}`}:streamGenerateContent?alt=sse`;
|
|
33
33
|
}),
|
|
34
34
|
auth: Auth.none,
|
|
@@ -42,7 +42,7 @@ export const routes = [route];
|
|
|
42
42
|
const configuredRoute = (input, modelID) => {
|
|
43
43
|
const { accessToken: _accessToken, apiKey: _apiKey, auth: _auth, baseURL, location: inputLocation, project: inputProject, ...rest } = input;
|
|
44
44
|
const apiKey = GoogleVertexShared.apiKey(input);
|
|
45
|
-
const endpointModel =
|
|
45
|
+
const endpointModel = modelID.startsWith("endpoints/");
|
|
46
46
|
if (apiKey !== undefined && endpointModel)
|
|
47
47
|
throw new ProviderConfigurationError({
|
|
48
48
|
provider: id,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export {};
|
|
@@ -14,9 +14,6 @@ export type RequiredApiKeyAuth = {
|
|
|
14
14
|
readonly auth?: never;
|
|
15
15
|
};
|
|
16
16
|
export type ProviderAuthOption<Mode extends ApiKeyMode> = AuthOverride | (Mode extends "optional" ? OptionalApiKeyAuth : RequiredApiKeyAuth);
|
|
17
|
-
export type LanguageModelOptions<Base, Mode extends ApiKeyMode> = Omit<Base, "apiKey" | "auth"> & ProviderAuthOption<Mode>;
|
|
18
|
-
export type LanguageModelArgs<Base, Mode extends ApiKeyMode> = Mode extends "optional" ? readonly [options?: LanguageModelOptions<Base, Mode>] : readonly [options: LanguageModelOptions<Base, Mode>];
|
|
19
|
-
export type LanguageModelFactory<Base, Mode extends ApiKeyMode, LanguageModel> = (id: string, ...args: LanguageModelArgs<Base, Mode>) => LanguageModel;
|
|
20
17
|
/**
|
|
21
18
|
* Require at least one of the keys in `T`. Use for option shapes where any
|
|
22
19
|
* subset of fields is acceptable but at least one must be present (e.g. Azure
|
package/dist/route/auth.d.ts
CHANGED
|
@@ -31,7 +31,6 @@ export interface Definition {
|
|
|
31
31
|
readonly orElse: (that: Definition) => Definition;
|
|
32
32
|
readonly pipe: <A>(f: (self: Definition) => A) => A;
|
|
33
33
|
}
|
|
34
|
-
export declare const isAuth: (input: unknown) => input is Definition;
|
|
35
34
|
export declare const value: (secret: string, source?: string) => Credential;
|
|
36
35
|
export declare const optional: (secret: Secret | undefined, source?: string) => Credential;
|
|
37
36
|
export declare const config: (name: string) => Credential;
|
|
@@ -42,7 +41,6 @@ export declare const remove: (name: string) => Definition;
|
|
|
42
41
|
export declare const custom: (apply: (input: AuthInput) => Effect.Effect<Headers.Headers, AIError>) => Definition;
|
|
43
42
|
export declare const passthrough: Definition;
|
|
44
43
|
export declare function bearer(source: Secret | Credential): Definition;
|
|
45
|
-
export declare const apiKey: typeof bearer;
|
|
46
44
|
export declare function header(name: string): (source: Secret | Credential) => Definition;
|
|
47
45
|
export declare function header(name: string, source: Secret | Credential): Definition;
|
|
48
46
|
export declare function bearerHeader(name: string): (source: Secret | Credential) => Definition;
|
package/dist/route/auth.js
CHANGED
|
@@ -9,7 +9,6 @@ export class MissingCredentialError extends Error {
|
|
|
9
9
|
this.source = source;
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
export const isAuth = (input) => typeof input === "object" && input !== null && "apply" in input && typeof input.apply === "function";
|
|
13
12
|
const credential = (load) => {
|
|
14
13
|
const self = {
|
|
15
14
|
load,
|
|
@@ -65,7 +64,6 @@ const credentialInput = (source) => typeof source === "string" || Redacted.isRed
|
|
|
65
64
|
export function bearer(source) {
|
|
66
65
|
return credentialInput(source).bearer();
|
|
67
66
|
}
|
|
68
|
-
export const apiKey = bearer;
|
|
69
67
|
export function header(name, source) {
|
|
70
68
|
if (source === undefined) {
|
|
71
69
|
return (next) => credentialInput(next).header(name);
|
package/dist/route/client.d.ts
CHANGED
|
@@ -46,7 +46,6 @@ export interface Route<Body, Prepared = unknown, Compact extends CompactionOpera
|
|
|
46
46
|
readonly streamPrepared: (prepared: Prepared, request: LLMRequest, runtime: TransportRuntime, options?: StreamOptions) => Stream.Stream<LLMEvent, AIError>;
|
|
47
47
|
}
|
|
48
48
|
export type AnyRoute<Compact extends CompactionOperations | undefined = CompactionOperations | undefined> = Route<any, any, Compact>;
|
|
49
|
-
export type HttpOptionsInput = HttpOptions.Input;
|
|
50
49
|
export type RouteLanguageModelInput = Omit<LanguageModel.Input, "provider" | "route">;
|
|
51
50
|
export type RouteRoutedLanguageModelInput = Omit<LanguageModel.Input, "route">;
|
|
52
51
|
export interface RouteDefaults {
|
|
@@ -71,7 +70,6 @@ export interface RoutePatch<Body, Prepared> extends RouteDefaultsInput {
|
|
|
71
70
|
readonly endpoint?: EndpointPatch<Body>;
|
|
72
71
|
}
|
|
73
72
|
type RouteMappedLanguageModelInput = RouteLanguageModelInput | RouteRoutedLanguageModelInput;
|
|
74
|
-
export declare const generationOptions: (input: GenerationOptions.Input | undefined) => GenerationOptions | undefined;
|
|
75
73
|
export interface Interface {
|
|
76
74
|
readonly compact: CompactMethod;
|
|
77
75
|
readonly stream: StreamMethod;
|
package/dist/route/client.js
CHANGED
|
@@ -32,7 +32,7 @@ const mergeRouteDefaults = (base, patch) => {
|
|
|
32
32
|
...base,
|
|
33
33
|
...patch,
|
|
34
34
|
headers,
|
|
35
|
-
generation: mergeGenerationOptions(
|
|
35
|
+
generation: mergeGenerationOptions(base?.generation, patch.generation),
|
|
36
36
|
providerOptions: mergeProviderOptions(base?.providerOptions, patch.providerOptions),
|
|
37
37
|
http: mergeHttpOptions(base?.http, HttpOptions.make(patch.http), headers === undefined ? undefined : new HttpOptions({ headers })),
|
|
38
38
|
};
|
|
@@ -43,7 +43,6 @@ const mergeHeaders = (...items) => {
|
|
|
43
43
|
return undefined;
|
|
44
44
|
return Object.fromEntries(entries);
|
|
45
45
|
};
|
|
46
|
-
export const generationOptions = (input) => input === undefined ? undefined : GenerationOptions.make(input);
|
|
47
46
|
export function canCompact(request, options) {
|
|
48
47
|
if (options?.mechanism === "trigger")
|
|
49
48
|
return request.model.route.compact?.trigger !== undefined;
|
|
@@ -126,8 +125,8 @@ function makeFromTransport(input) {
|
|
|
126
125
|
id: id ?? routeInput.id,
|
|
127
126
|
provider: provider ?? routeInput.provider,
|
|
128
127
|
providerMetadataKey: providerMetadataKey ??
|
|
129
|
-
(provider !== undefined &&
|
|
130
|
-
?
|
|
128
|
+
(provider !== undefined && provider !== routeInput.provider
|
|
129
|
+
? provider
|
|
131
130
|
: routeInput.providerMetadataKey),
|
|
132
131
|
auth: auth ?? routeInput.auth,
|
|
133
132
|
endpoint: endpoint ? Endpoint.merge(routeInput.endpoint, endpoint) : routeInput.endpoint,
|
|
@@ -3,7 +3,7 @@ import { HttpContext } from "../schema/errors.js";
|
|
|
3
3
|
export class RequestExecutorService extends Context.Service()("@opencode/AI/RequestExecutor") {
|
|
4
4
|
}
|
|
5
5
|
export const Service = RequestExecutorService;
|
|
6
|
-
export const headerDetails = (headers) => Object.fromEntries(Object.entries(headers).map(([name, value]) => [name,
|
|
6
|
+
export const headerDetails = (headers) => Object.fromEntries(Object.entries(headers).map(([name, value]) => [name, value]));
|
|
7
7
|
export const responseHttp = (response) => new HttpContext({
|
|
8
8
|
url: response.request.url,
|
|
9
9
|
status: response.status,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-21603",
|
|
4
4
|
"name": "@opencode/ai",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@clack/prompts": "1.0.0-alpha.1",
|
|
36
36
|
"@effect/platform-node": "4.0.1",
|
|
37
|
-
"@opencode/http-recorder": "0.0.0-dev-
|
|
37
|
+
"@opencode/http-recorder": "0.0.0-dev-21603",
|
|
38
38
|
"@tsconfig/bun": "1.0.9",
|
|
39
39
|
"@types/bun": "1.4.3",
|
|
40
40
|
"@typescript/native": "npm:typescript@7.0.2",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@aws-sdk/credential-providers": "3.1057.0",
|
|
45
45
|
"@smithy/eventstream-codec": "4.2.14",
|
|
46
46
|
"@smithy/util-utf8": "4.2.2",
|
|
47
|
-
"@opencode/schema": "0.0.0-dev-
|
|
47
|
+
"@opencode/schema": "0.0.0-dev-21603",
|
|
48
48
|
"aws4fetch": "1.0.20",
|
|
49
49
|
"effect": "4.0.1",
|
|
50
50
|
"google-auth-library": "10.5.0"
|