@opencode-ai/ai
Advanced tools
@@ -9,10 +9,2 @@ import { Cause, Context, Effect, Layer, Option, Schema, Stream } from "effect"; | ||
| const normalizedHeaders = (headers) => Object.fromEntries(Object.entries(headers).map(([key, value]) => [key.toLowerCase(), value])); | ||
| const requestId = (headers) => { | ||
| return (headers["x-request-id"] ?? | ||
| headers["request-id"] ?? | ||
| headers["x-amzn-requestid"] ?? | ||
| headers["x-amz-request-id"] ?? | ||
| headers["x-goog-request-id"] ?? | ||
| headers["cf-ray"]); | ||
| }; | ||
| const retryAfterMs = (headers) => { | ||
@@ -99,3 +91,2 @@ const millis = Number(headers["retry-after-ms"]); | ||
| ...input.body, | ||
| requestId: input.requestId, | ||
| rateLimit: input.rateLimit, | ||
@@ -123,3 +114,2 @@ }); | ||
| body: details, | ||
| requestId: requestId(headers), | ||
| rateLimit, | ||
@@ -152,3 +142,2 @@ }), | ||
| ...details, | ||
| requestId: requestId(headers), | ||
| rateLimit, | ||
@@ -155,0 +144,0 @@ }), |
@@ -31,3 +31,2 @@ import { Schema } from "effect"; | ||
| readonly bodyTruncated: Schema.optional<Schema.Boolean>; | ||
| readonly requestId: Schema.optional<Schema.String>; | ||
| readonly rateLimit: Schema.optional<typeof HttpRateLimitDetails>; | ||
@@ -34,0 +33,0 @@ }>, {}>; |
@@ -29,3 +29,2 @@ import { Schema } from "effect"; | ||
| bodyTruncated: Schema.optional(Schema.Boolean), | ||
| requestId: Schema.optional(Schema.String), | ||
| rateLimit: Schema.optional(HttpRateLimitDetails), | ||
@@ -32,0 +31,0 @@ }) { |
+3
-3
| { | ||
| "$schema": "https://json.schemastore.org/package.json", | ||
| "version": "0.0.0-dev-18332", | ||
| "version": "0.0.0-dev-18334", | ||
| "name": "@opencode-ai/ai", | ||
@@ -33,3 +33,3 @@ "type": "module", | ||
| "@effect/platform-node": "4.0.0-rc.111", | ||
| "@opencode-ai/http-recorder": "0.0.0-dev-18332", | ||
| "@opencode-ai/http-recorder": "0.0.0-dev-18334", | ||
| "@tsconfig/bun": "1.0.9", | ||
@@ -43,3 +43,3 @@ "@types/bun": "1.3.13", | ||
| "@smithy/util-utf8": "4.2.2", | ||
| "@opencode-ai/schema": "0.0.0-dev-18332", | ||
| "@opencode-ai/schema": "0.0.0-dev-18334", | ||
| "aws4fetch": "1.0.20", | ||
@@ -46,0 +46,0 @@ "effect": "4.0.0-rc.111", |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
1365789
-0.04%31414
-0.04%+ Added
- Removed