@opencode/ai 0.0.0-dev-20282 → 0.0.0-dev-20284
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/cache-policy.js
CHANGED
|
@@ -36,9 +36,15 @@ const resolve = (policy) => {
|
|
|
36
36
|
// prefix caching, Gemini's implicit + out-of-band CachedContent). Skip the
|
|
37
37
|
// whole policy pass for these — emitting hints would be harmless but pointless.
|
|
38
38
|
const RESPECTS_INLINE_HINTS = new Set([
|
|
39
|
+
"alibaba-messages",
|
|
39
40
|
"anthropic-messages",
|
|
40
41
|
"anthropic-compatible-messages",
|
|
42
|
+
"cloudflare-ai-gateway-messages",
|
|
41
43
|
"google-vertex-messages",
|
|
44
|
+
"meta-messages",
|
|
45
|
+
"minimax-messages",
|
|
46
|
+
"moonshot-messages",
|
|
47
|
+
"zai-coding-messages",
|
|
42
48
|
"bedrock-converse",
|
|
43
49
|
"openrouter",
|
|
44
50
|
]);
|
|
@@ -203,11 +203,15 @@ export declare const protocol: Protocol<{
|
|
|
203
203
|
readonly timezone?: string | undefined;
|
|
204
204
|
} | undefined;
|
|
205
205
|
} | {
|
|
206
|
-
readonly name: string;
|
|
207
206
|
readonly description: string;
|
|
207
|
+
readonly name: string;
|
|
208
208
|
readonly input_schema: {
|
|
209
209
|
readonly [x: string]: unknown;
|
|
210
210
|
};
|
|
211
|
+
readonly cache_control?: {
|
|
212
|
+
readonly type: "ephemeral";
|
|
213
|
+
readonly ttl?: "1h" | "5m" | undefined;
|
|
214
|
+
} | undefined;
|
|
211
215
|
})[] | undefined;
|
|
212
216
|
readonly system?: readonly {
|
|
213
217
|
readonly type: "text";
|
|
@@ -8,12 +8,19 @@ const WebSearch = Schema.Struct({
|
|
|
8
8
|
name: Schema.Literal("web_search"),
|
|
9
9
|
user_location: MetaResponses.WebSearch.fields.user_location,
|
|
10
10
|
});
|
|
11
|
+
const MetaCacheControl = Schema.Struct({
|
|
12
|
+
type: Schema.tag("ephemeral"),
|
|
13
|
+
ttl: Schema.optional(Schema.Literals(["5m", "1h"])),
|
|
14
|
+
});
|
|
15
|
+
const FunctionTool = Schema.Struct({
|
|
16
|
+
name: Schema.String,
|
|
17
|
+
description: Schema.String,
|
|
18
|
+
input_schema: JsonObject,
|
|
19
|
+
cache_control: Schema.optional(MetaCacheControl),
|
|
20
|
+
});
|
|
11
21
|
const Body = Schema.Struct({
|
|
12
22
|
...AnthropicMessages.AnthropicMessagesBody.fields,
|
|
13
|
-
tools: optionalArray(Schema.Union([
|
|
14
|
-
Schema.Struct({ name: Schema.String, description: Schema.String, input_schema: JsonObject }),
|
|
15
|
-
WebSearch,
|
|
16
|
-
])),
|
|
23
|
+
tools: optionalArray(Schema.Union([FunctionTool, WebSearch])),
|
|
17
24
|
});
|
|
18
25
|
const fromRequest = Effect.fn("MetaMessages.fromRequest")(function* (request) {
|
|
19
26
|
const projected = ProviderShared.flattenToolRequest(request);
|
package/dist/providers/meta.d.ts
CHANGED
|
@@ -547,11 +547,15 @@ export declare const routes: (Route<{
|
|
|
547
547
|
readonly timezone?: string | undefined;
|
|
548
548
|
} | undefined;
|
|
549
549
|
} | {
|
|
550
|
-
readonly name: string;
|
|
551
550
|
readonly description: string;
|
|
551
|
+
readonly name: string;
|
|
552
552
|
readonly input_schema: {
|
|
553
553
|
readonly [x: string]: unknown;
|
|
554
554
|
};
|
|
555
|
+
readonly cache_control?: {
|
|
556
|
+
readonly type: "ephemeral";
|
|
557
|
+
readonly ttl?: "1h" | "5m" | undefined;
|
|
558
|
+
} | undefined;
|
|
555
559
|
})[] | undefined;
|
|
556
560
|
readonly system?: readonly {
|
|
557
561
|
readonly type: "text";
|
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-20284",
|
|
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.0-rc.112",
|
|
37
|
-
"@opencode/http-recorder": "0.0.0-dev-
|
|
37
|
+
"@opencode/http-recorder": "0.0.0-dev-20284",
|
|
38
38
|
"@tsconfig/bun": "1.0.9",
|
|
39
39
|
"@types/bun": "1.4.0",
|
|
40
40
|
"@typescript/native-preview": "7.0.0-dev.20251207.1",
|
|
@@ -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-20284",
|
|
48
48
|
"aws4fetch": "1.0.20",
|
|
49
49
|
"effect": "4.0.0-rc.112",
|
|
50
50
|
"google-auth-library": "10.5.0"
|