@opencode-ai/ai 0.0.0-dev-17604 → 0.0.0-dev-17635
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.js +2 -0
- package/dist/protocols/open-responses.d.ts +18 -0
- package/dist/protocols/open-responses.js +5 -9
- package/dist/protocols/openai-compatible-responses.d.ts +3 -0
- package/dist/protocols/openai-responses.d.ts +15 -0
- package/dist/providers/amazon-bedrock-mantle.d.ts +3 -0
- package/dist/providers/azure.d.ts +3 -0
- package/dist/providers/google-vertex-responses.d.ts +3 -0
- package/dist/providers/openai-compatible-responses.d.ts +3 -0
- package/dist/providers/openai.d.ts +3 -0
- package/dist/providers/xai.d.ts +3 -0
- package/package.json +3 -3
|
@@ -747,6 +747,8 @@ const onContentBlockDelta = Effect.fn("AnthropicMessages.onContentBlockDelta")(f
|
|
|
747
747
|
if (delta?.type === "input_json_delta" && event.index !== undefined) {
|
|
748
748
|
if (!delta.partial_json)
|
|
749
749
|
return [state, NO_EVENTS];
|
|
750
|
+
if (!state.tools[event.index])
|
|
751
|
+
return [state, NO_EVENTS];
|
|
750
752
|
const result = ToolStream.appendExisting(ADAPTER, state.tools, event.index, delta.partial_json, "Anthropic Messages tool argument delta is missing its tool call");
|
|
751
753
|
if (ToolStream.isError(result))
|
|
752
754
|
return yield* result;
|
|
@@ -21,6 +21,9 @@ type MessagePhase = Schema.Schema.Type<typeof MessagePhase>;
|
|
|
21
21
|
export declare const InputItem: Schema.Union<readonly [Schema.Struct<{
|
|
22
22
|
readonly role: Schema.tag<"system">;
|
|
23
23
|
readonly content: Schema.String;
|
|
24
|
+
}>, Schema.Struct<{
|
|
25
|
+
readonly role: Schema.tag<"developer">;
|
|
26
|
+
readonly content: Schema.String;
|
|
24
27
|
}>, Schema.Struct<{
|
|
25
28
|
readonly role: Schema.tag<"user">;
|
|
26
29
|
readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
@@ -99,6 +102,9 @@ export declare const coreFields: {
|
|
|
99
102
|
input: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
100
103
|
readonly role: Schema.tag<"system">;
|
|
101
104
|
readonly content: Schema.String;
|
|
105
|
+
}>, Schema.Struct<{
|
|
106
|
+
readonly role: Schema.tag<"developer">;
|
|
107
|
+
readonly content: Schema.String;
|
|
102
108
|
}>, Schema.Struct<{
|
|
103
109
|
readonly role: Schema.tag<"user">;
|
|
104
110
|
readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
@@ -185,6 +191,9 @@ declare const OpenResponsesBody: Schema.Struct<{
|
|
|
185
191
|
readonly input: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
186
192
|
readonly role: Schema.tag<"system">;
|
|
187
193
|
readonly content: Schema.String;
|
|
194
|
+
}>, Schema.Struct<{
|
|
195
|
+
readonly role: Schema.tag<"developer">;
|
|
196
|
+
readonly content: Schema.String;
|
|
188
197
|
}>, Schema.Struct<{
|
|
189
198
|
readonly role: Schema.tag<"user">;
|
|
190
199
|
readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
@@ -452,6 +461,9 @@ export declare const fromRequest: (request: LLMRequest) => Effect.Effect<{
|
|
|
452
461
|
} | {
|
|
453
462
|
readonly role: "system";
|
|
454
463
|
readonly content: string;
|
|
464
|
+
} | {
|
|
465
|
+
readonly role: "developer";
|
|
466
|
+
readonly content: string;
|
|
455
467
|
} | {
|
|
456
468
|
readonly role: "user";
|
|
457
469
|
readonly content: readonly ({
|
|
@@ -733,6 +745,9 @@ export declare const protocol: Protocol<{
|
|
|
733
745
|
} | {
|
|
734
746
|
readonly role: "system";
|
|
735
747
|
readonly content: string;
|
|
748
|
+
} | {
|
|
749
|
+
readonly role: "developer";
|
|
750
|
+
readonly content: string;
|
|
736
751
|
} | {
|
|
737
752
|
readonly role: "user";
|
|
738
753
|
readonly content: readonly ({
|
|
@@ -875,6 +890,9 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
|
|
|
875
890
|
} | {
|
|
876
891
|
readonly role: "system";
|
|
877
892
|
readonly content: string;
|
|
893
|
+
} | {
|
|
894
|
+
readonly role: "developer";
|
|
895
|
+
readonly content: string;
|
|
878
896
|
} | {
|
|
879
897
|
readonly role: "user";
|
|
880
898
|
readonly content: readonly ({
|
|
@@ -63,6 +63,7 @@ const OpenResponsesFunctionCallOutput = Schema.Union([
|
|
|
63
63
|
]);
|
|
64
64
|
export const InputItem = Schema.Union([
|
|
65
65
|
Schema.Struct({ role: Schema.tag("system"), content: Schema.String }),
|
|
66
|
+
Schema.Struct({ role: Schema.tag("developer"), content: Schema.String }),
|
|
66
67
|
Schema.Struct({ role: Schema.tag("user"), content: Schema.Array(OpenResponsesInputContent) }),
|
|
67
68
|
Schema.Struct({
|
|
68
69
|
role: Schema.tag("assistant"),
|
|
@@ -285,15 +286,10 @@ const lowerMessages = Effect.fn("OpenResponses.lowerMessages")(function* (reques
|
|
|
285
286
|
const providerMetadataKey = request.model.route.providerMetadataKey ?? "openresponses";
|
|
286
287
|
for (const message of request.messages) {
|
|
287
288
|
if (message.role === "system") {
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
role: "user",
|
|
293
|
-
content: [...previous.content, { type: "input_text", text: part.text }],
|
|
294
|
-
};
|
|
295
|
-
else
|
|
296
|
-
input.push({ role: "user", content: [{ type: "input_text", text: part.text }] });
|
|
289
|
+
input.push({
|
|
290
|
+
role: "developer",
|
|
291
|
+
content: ProviderShared.joinText(yield* ProviderShared.systemUpdateText(extension.name, message)),
|
|
292
|
+
});
|
|
297
293
|
continue;
|
|
298
294
|
}
|
|
299
295
|
if (message.role === "user") {
|
|
@@ -17,6 +17,9 @@ declare const OpenAIResponsesBody: Schema.Struct<{
|
|
|
17
17
|
}>, Schema.Union<readonly [Schema.Struct<{
|
|
18
18
|
readonly role: Schema.tag<"system">;
|
|
19
19
|
readonly content: Schema.String;
|
|
20
|
+
}>, Schema.Struct<{
|
|
21
|
+
readonly role: Schema.tag<"developer">;
|
|
22
|
+
readonly content: Schema.String;
|
|
20
23
|
}>, Schema.Struct<{
|
|
21
24
|
readonly role: Schema.tag<"user">;
|
|
22
25
|
readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
@@ -126,6 +129,9 @@ export declare const protocol: Protocol<{
|
|
|
126
129
|
} | {
|
|
127
130
|
readonly role: "system";
|
|
128
131
|
readonly content: string;
|
|
132
|
+
} | {
|
|
133
|
+
readonly role: "developer";
|
|
134
|
+
readonly content: string;
|
|
129
135
|
} | {
|
|
130
136
|
readonly role: "user";
|
|
131
137
|
readonly content: readonly ({
|
|
@@ -287,6 +293,9 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
|
|
|
287
293
|
} | {
|
|
288
294
|
readonly role: "system";
|
|
289
295
|
readonly content: string;
|
|
296
|
+
} | {
|
|
297
|
+
readonly role: "developer";
|
|
298
|
+
readonly content: string;
|
|
290
299
|
} | {
|
|
291
300
|
readonly role: "user";
|
|
292
301
|
readonly content: readonly ({
|
|
@@ -394,6 +403,9 @@ export declare const transport: import("../route/transport/index.js").Transport<
|
|
|
394
403
|
} | {
|
|
395
404
|
readonly role: "system";
|
|
396
405
|
readonly content: string;
|
|
406
|
+
} | {
|
|
407
|
+
readonly role: "developer";
|
|
408
|
+
readonly content: string;
|
|
397
409
|
} | {
|
|
398
410
|
readonly role: "user";
|
|
399
411
|
readonly content: readonly ({
|
|
@@ -501,6 +513,9 @@ export declare const route: Route<{
|
|
|
501
513
|
} | {
|
|
502
514
|
readonly role: "system";
|
|
503
515
|
readonly content: string;
|
|
516
|
+
} | {
|
|
517
|
+
readonly role: "developer";
|
|
518
|
+
readonly content: string;
|
|
504
519
|
} | {
|
|
505
520
|
readonly role: "user";
|
|
506
521
|
readonly content: readonly ({
|
|
@@ -130,6 +130,9 @@ export declare const routes: (RouteDef<{
|
|
|
130
130
|
} | {
|
|
131
131
|
readonly role: "system";
|
|
132
132
|
readonly content: string;
|
|
133
|
+
} | {
|
|
134
|
+
readonly role: "developer";
|
|
135
|
+
readonly content: string;
|
|
133
136
|
} | {
|
|
134
137
|
readonly role: "user";
|
|
135
138
|
readonly content: readonly ({
|
|
@@ -133,6 +133,9 @@ export declare const routes: (RouteDef<{
|
|
|
133
133
|
} | {
|
|
134
134
|
readonly role: "system";
|
|
135
135
|
readonly content: string;
|
|
136
|
+
} | {
|
|
137
|
+
readonly role: "developer";
|
|
138
|
+
readonly content: string;
|
|
136
139
|
} | {
|
|
137
140
|
readonly role: "user";
|
|
138
141
|
readonly content: readonly ({
|
|
@@ -33,6 +33,9 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
33
33
|
} | {
|
|
34
34
|
readonly role: "system";
|
|
35
35
|
readonly content: string;
|
|
36
|
+
} | {
|
|
37
|
+
readonly role: "developer";
|
|
38
|
+
readonly content: string;
|
|
36
39
|
} | {
|
|
37
40
|
readonly role: "user";
|
|
38
41
|
readonly content: readonly ({
|
|
@@ -31,6 +31,9 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
31
31
|
} | {
|
|
32
32
|
readonly role: "system";
|
|
33
33
|
readonly content: string;
|
|
34
|
+
} | {
|
|
35
|
+
readonly role: "developer";
|
|
36
|
+
readonly content: string;
|
|
34
37
|
} | {
|
|
35
38
|
readonly role: "user";
|
|
36
39
|
readonly content: readonly ({
|
package/dist/providers/xai.d.ts
CHANGED
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-17635",
|
|
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-beta.107",
|
|
33
|
-
"@opencode-ai/http-recorder": "0.0.0-dev-
|
|
33
|
+
"@opencode-ai/http-recorder": "0.0.0-dev-17635",
|
|
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-17635",
|
|
43
43
|
"aws4fetch": "1.0.20",
|
|
44
44
|
"effect": "4.0.0-beta.107",
|
|
45
45
|
"google-auth-library": "10.5.0"
|