@opencode-ai/ai 0.0.0-dev-18332 → 0.0.0-dev-18338
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/route/executor.js +0 -11
- package/dist/schema/errors.d.ts +0 -1
- package/dist/schema/errors.js +0 -1
- package/package.json +3 -3
package/dist/route/executor.js
CHANGED
|
@@ -6,14 +6,6 @@ export class Service extends Context.Service()("@opencode/AI/RequestExecutor") {
|
|
|
6
6
|
}
|
|
7
7
|
const headerDetails = (headers) => Object.fromEntries(Object.entries(headers).map(([name, value]) => [name, String(value)]));
|
|
8
8
|
const normalizedHeaders = (headers) => Object.fromEntries(Object.entries(headers).map(([key, value]) => [key.toLowerCase(), value]));
|
|
9
|
-
const requestId = (headers) => {
|
|
10
|
-
return (headers["x-request-id"] ??
|
|
11
|
-
headers["request-id"] ??
|
|
12
|
-
headers["x-amzn-requestid"] ??
|
|
13
|
-
headers["x-amz-request-id"] ??
|
|
14
|
-
headers["x-goog-request-id"] ??
|
|
15
|
-
headers["cf-ray"]);
|
|
16
|
-
};
|
|
17
9
|
const retryAfterMs = (headers) => {
|
|
18
10
|
const millis = Number(headers["retry-after-ms"]);
|
|
19
11
|
if (Number.isFinite(millis))
|
|
@@ -95,7 +87,6 @@ const responseHttp = (input) => new HttpContext({
|
|
|
95
87
|
request: requestDetails(input.request),
|
|
96
88
|
response: responseDetails(input.response),
|
|
97
89
|
...input.body,
|
|
98
|
-
requestId: input.requestId,
|
|
99
90
|
rateLimit: input.rateLimit,
|
|
100
91
|
});
|
|
101
92
|
const statusError = (request) => (response) => Effect.gen(function* () {
|
|
@@ -118,7 +109,6 @@ const statusError = (request) => (response) => Effect.gen(function* () {
|
|
|
118
109
|
request,
|
|
119
110
|
response,
|
|
120
111
|
body: details,
|
|
121
|
-
requestId: requestId(headers),
|
|
122
112
|
rateLimit,
|
|
123
113
|
}),
|
|
124
114
|
}),
|
|
@@ -146,7 +136,6 @@ export const classifyHttpFailure = (input) => {
|
|
|
146
136
|
? undefined
|
|
147
137
|
: new HttpResponseDetails({ status: input.status, headers: headerDetails(Headers.fromInput(headers)) }),
|
|
148
138
|
...details,
|
|
149
|
-
requestId: requestId(headers),
|
|
150
139
|
rateLimit,
|
|
151
140
|
}),
|
|
152
141
|
});
|
package/dist/schema/errors.d.ts
CHANGED
|
@@ -28,7 +28,6 @@ declare const HttpContext_base: Schema.Class<HttpContext, Schema.Struct<{
|
|
|
28
28
|
readonly response: Schema.optional<typeof HttpResponseDetails>;
|
|
29
29
|
readonly body: Schema.optional<Schema.String>;
|
|
30
30
|
readonly bodyTruncated: Schema.optional<Schema.Boolean>;
|
|
31
|
-
readonly requestId: Schema.optional<Schema.String>;
|
|
32
31
|
readonly rateLimit: Schema.optional<typeof HttpRateLimitDetails>;
|
|
33
32
|
}>, {}>;
|
|
34
33
|
export declare class HttpContext extends HttpContext_base {
|
package/dist/schema/errors.js
CHANGED
|
@@ -26,7 +26,6 @@ export class HttpContext extends Schema.Class("AI.HttpContext")({
|
|
|
26
26
|
response: Schema.optional(HttpResponseDetails),
|
|
27
27
|
body: Schema.optional(Schema.String),
|
|
28
28
|
bodyTruncated: Schema.optional(Schema.Boolean),
|
|
29
|
-
requestId: Schema.optional(Schema.String),
|
|
30
29
|
rateLimit: Schema.optional(HttpRateLimitDetails),
|
|
31
30
|
}) {
|
|
32
31
|
}
|
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-18338",
|
|
4
4
|
"name": "@opencode-ai/ai",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@clack/prompts": "1.0.0-alpha.1",
|
|
32
32
|
"@effect/platform-node": "4.0.0-rc.111",
|
|
33
|
-
"@opencode-ai/http-recorder": "0.0.0-dev-
|
|
33
|
+
"@opencode-ai/http-recorder": "0.0.0-dev-18338",
|
|
34
34
|
"@tsconfig/bun": "1.0.9",
|
|
35
35
|
"@types/bun": "1.3.13",
|
|
36
36
|
"@typescript/native-preview": "7.0.0-dev.20251207.1",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@smithy/eventstream-codec": "4.2.14",
|
|
41
41
|
"@smithy/util-utf8": "4.2.2",
|
|
42
|
-
"@opencode-ai/schema": "0.0.0-dev-
|
|
42
|
+
"@opencode-ai/schema": "0.0.0-dev-18338",
|
|
43
43
|
"aws4fetch": "1.0.20",
|
|
44
44
|
"effect": "4.0.0-rc.111",
|
|
45
45
|
"google-auth-library": "10.5.0"
|