@opencode/ai 0.0.0-dev-513 → 0.0.0-dev-519
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/llm.d.ts +0 -1
- package/dist/llm.js +0 -1
- package/dist/protocols/cohere-chat.js +0 -3
- package/dist/protocols/shared.d.ts +0 -3
- package/dist/schema/messages.d.ts +0 -16
- package/dist/schema/messages.js +0 -7
- package/dist/tool-history.js +0 -1
- package/package.json +3 -3
package/dist/llm.d.ts
CHANGED
|
@@ -25,7 +25,6 @@ interface TextRequestFields<Model extends LanguageModel> {
|
|
|
25
25
|
readonly cache?: CachePolicy;
|
|
26
26
|
/** Stable cache affinity for protocols that support provider-managed prompt caching. */
|
|
27
27
|
readonly promptCacheKey?: string;
|
|
28
|
-
readonly metadata?: Record<string, unknown>;
|
|
29
28
|
/** Emit a `raw` event with each provider frame before the events parsed from it. */
|
|
30
29
|
readonly includeRaw?: boolean;
|
|
31
30
|
}
|
package/dist/llm.js
CHANGED
|
@@ -304,9 +304,6 @@ export const protocol = Protocol.make({
|
|
|
304
304
|
initial: () => ({ lifecycle: Lifecycle.initial(), tools: ToolStream.empty(), finished: false }),
|
|
305
305
|
step,
|
|
306
306
|
terminal: (event) => event.type === "message-end",
|
|
307
|
-
onHalt: (state) => state.finished
|
|
308
|
-
? Effect.succeed([])
|
|
309
|
-
: Effect.fail(ProviderShared.eventError(ADAPTER, "Cohere stream ended without message-end")),
|
|
310
307
|
},
|
|
311
308
|
});
|
|
312
309
|
export const route = Route.make({
|
|
@@ -113,9 +113,6 @@ export declare const systemUpdateText: (route: string, message: Message) => Effe
|
|
|
113
113
|
readonly type: "text";
|
|
114
114
|
readonly text: string;
|
|
115
115
|
readonly cache?: import("../schema/options.js").CacheHint | undefined;
|
|
116
|
-
readonly metadata?: {
|
|
117
|
-
readonly [x: string]: unknown;
|
|
118
|
-
} | undefined;
|
|
119
116
|
readonly providerMetadata?: {
|
|
120
117
|
readonly [x: string]: {
|
|
121
118
|
readonly [x: string]: unknown;
|
|
@@ -25,7 +25,6 @@ export declare const TextPart: Schema.Struct<{
|
|
|
25
25
|
readonly type: Schema.Literal<"text">;
|
|
26
26
|
readonly text: Schema.String;
|
|
27
27
|
readonly cache: Schema.optional<typeof CacheHint>;
|
|
28
|
-
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
29
28
|
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
30
29
|
}>;
|
|
31
30
|
export type TextPart = Schema.Schema.Type<typeof TextPart>;
|
|
@@ -162,7 +161,6 @@ export declare const ToolCallPart: Schema.Struct<{
|
|
|
162
161
|
readonly input: Schema.Unknown;
|
|
163
162
|
readonly providerExecuted: Schema.optional<Schema.Boolean>;
|
|
164
163
|
readonly cache: Schema.optional<typeof CacheHint>;
|
|
165
|
-
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
166
164
|
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
167
165
|
}> & {
|
|
168
166
|
make: (input: Omit<ToolCallPart, "type">) => ToolCallPart;
|
|
@@ -219,7 +217,6 @@ export declare const ToolResultPart: Schema.Struct<{
|
|
|
219
217
|
};
|
|
220
218
|
readonly providerExecuted: Schema.optional<Schema.Boolean>;
|
|
221
219
|
readonly cache: Schema.optional<typeof CacheHint>;
|
|
222
|
-
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
223
220
|
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
224
221
|
}> & {
|
|
225
222
|
make: (input: Omit<ToolResultPart, "type" | "result"> & {
|
|
@@ -233,7 +230,6 @@ export declare const ReasoningPart: Schema.Struct<{
|
|
|
233
230
|
readonly text: Schema.String;
|
|
234
231
|
readonly encrypted: Schema.optional<Schema.String>;
|
|
235
232
|
readonly cache: Schema.optional<typeof CacheHint>;
|
|
236
|
-
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
237
233
|
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
238
234
|
}>;
|
|
239
235
|
export type ReasoningPart = Schema.Schema.Type<typeof ReasoningPart>;
|
|
@@ -287,7 +283,6 @@ export declare const ContentPart: Schema.toTaggedUnion<"type", readonly [Schema.
|
|
|
287
283
|
readonly type: Schema.Literal<"text">;
|
|
288
284
|
readonly text: Schema.String;
|
|
289
285
|
readonly cache: Schema.optional<typeof CacheHint>;
|
|
290
|
-
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
291
286
|
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
292
287
|
}>, Schema.Struct<{
|
|
293
288
|
readonly type: Schema.Literal<"media">;
|
|
@@ -334,7 +329,6 @@ export declare const ContentPart: Schema.toTaggedUnion<"type", readonly [Schema.
|
|
|
334
329
|
readonly input: Schema.Unknown;
|
|
335
330
|
readonly providerExecuted: Schema.optional<Schema.Boolean>;
|
|
336
331
|
readonly cache: Schema.optional<typeof CacheHint>;
|
|
337
|
-
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
338
332
|
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
339
333
|
}> & {
|
|
340
334
|
make: (input: Omit<ToolCallPart, "type">) => ToolCallPart;
|
|
@@ -389,7 +383,6 @@ export declare const ContentPart: Schema.toTaggedUnion<"type", readonly [Schema.
|
|
|
389
383
|
};
|
|
390
384
|
readonly providerExecuted: Schema.optional<Schema.Boolean>;
|
|
391
385
|
readonly cache: Schema.optional<typeof CacheHint>;
|
|
392
|
-
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
393
386
|
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
394
387
|
}> & {
|
|
395
388
|
make: (input: Omit<ToolResultPart, "type" | "result"> & {
|
|
@@ -401,7 +394,6 @@ export declare const ContentPart: Schema.toTaggedUnion<"type", readonly [Schema.
|
|
|
401
394
|
readonly text: Schema.String;
|
|
402
395
|
readonly encrypted: Schema.optional<Schema.String>;
|
|
403
396
|
readonly cache: Schema.optional<typeof CacheHint>;
|
|
404
|
-
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
405
397
|
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
406
398
|
}>, Schema.refine<{
|
|
407
399
|
readonly type: "compaction";
|
|
@@ -431,7 +423,6 @@ declare const Message_base: Schema.Class<Message, Schema.Struct<{
|
|
|
431
423
|
readonly type: Schema.Literal<"text">;
|
|
432
424
|
readonly text: Schema.String;
|
|
433
425
|
readonly cache: Schema.optional<typeof CacheHint>;
|
|
434
|
-
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
435
426
|
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
436
427
|
}>, Schema.Struct<{
|
|
437
428
|
readonly type: Schema.Literal<"media">;
|
|
@@ -478,7 +469,6 @@ declare const Message_base: Schema.Class<Message, Schema.Struct<{
|
|
|
478
469
|
readonly input: Schema.Unknown;
|
|
479
470
|
readonly providerExecuted: Schema.optional<Schema.Boolean>;
|
|
480
471
|
readonly cache: Schema.optional<typeof CacheHint>;
|
|
481
|
-
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
482
472
|
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
483
473
|
}> & {
|
|
484
474
|
make: (input: Omit<ToolCallPart, "type">) => ToolCallPart;
|
|
@@ -533,7 +523,6 @@ declare const Message_base: Schema.Class<Message, Schema.Struct<{
|
|
|
533
523
|
};
|
|
534
524
|
readonly providerExecuted: Schema.optional<Schema.Boolean>;
|
|
535
525
|
readonly cache: Schema.optional<typeof CacheHint>;
|
|
536
|
-
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
537
526
|
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
538
527
|
}> & {
|
|
539
528
|
make: (input: Omit<ToolResultPart, "type" | "result"> & {
|
|
@@ -545,7 +534,6 @@ declare const Message_base: Schema.Class<Message, Schema.Struct<{
|
|
|
545
534
|
readonly text: Schema.String;
|
|
546
535
|
readonly encrypted: Schema.optional<Schema.String>;
|
|
547
536
|
readonly cache: Schema.optional<typeof CacheHint>;
|
|
548
|
-
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
549
537
|
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
550
538
|
}>, Schema.refine<{
|
|
551
539
|
readonly type: "compaction";
|
|
@@ -567,7 +555,6 @@ declare const Message_base: Schema.Class<Message, Schema.Struct<{
|
|
|
567
555
|
readonly effort: Schema.optional<Schema.declare<ReasoningEffort, ReasoningEffort>>;
|
|
568
556
|
readonly previous: Schema.optional<Schema.declare<ReasoningEffort, ReasoningEffort>>;
|
|
569
557
|
}>]>>;
|
|
570
|
-
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
571
558
|
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
572
559
|
readonly native: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
573
560
|
}>, {}>;
|
|
@@ -627,7 +614,6 @@ declare const toolDefinitionFields: {
|
|
|
627
614
|
readonly grammar: Schema.String;
|
|
628
615
|
}>]>>;
|
|
629
616
|
cache: Schema.optional<typeof CacheHint>;
|
|
630
|
-
metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
631
617
|
native: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
632
618
|
};
|
|
633
619
|
export type ToolDefinitionInput = Schema.Struct.Type<typeof toolDefinitionFields>;
|
|
@@ -646,7 +632,6 @@ declare const ToolDefinition_base: Schema.Class<ToolDefinition, Schema.Struct<{
|
|
|
646
632
|
readonly grammar: Schema.String;
|
|
647
633
|
}>]>>;
|
|
648
634
|
readonly cache: Schema.optional<typeof CacheHint>;
|
|
649
|
-
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
650
635
|
readonly native: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
651
636
|
readonly type: Schema.Literal<"tool">;
|
|
652
637
|
}>, {}>;
|
|
@@ -712,7 +697,6 @@ export interface LLMRequest<Model extends LanguageModel = LanguageModel> {
|
|
|
712
697
|
readonly cache?: CachePolicy;
|
|
713
698
|
/** Stable cache affinity for protocols that support provider-managed prompt caching. */
|
|
714
699
|
readonly promptCacheKey?: string;
|
|
715
|
-
readonly metadata?: Record<string, unknown>;
|
|
716
700
|
/** Emit a `raw` event with each provider frame before the events parsed from it. */
|
|
717
701
|
readonly includeRaw?: boolean;
|
|
718
702
|
}
|
package/dist/schema/messages.js
CHANGED
|
@@ -25,7 +25,6 @@ export const TextPart = Schema.Struct({
|
|
|
25
25
|
type: Schema.Literal("text"),
|
|
26
26
|
text: Schema.String,
|
|
27
27
|
cache: Schema.optional(CacheHint),
|
|
28
|
-
metadata: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),
|
|
29
28
|
providerMetadata: Schema.optional(ProviderMetadata),
|
|
30
29
|
}).annotate({ identifier: "LLM.Content.Text" });
|
|
31
30
|
export const MediaPart = Schema.Struct({
|
|
@@ -104,7 +103,6 @@ export const ToolCallPart = withStatics(Schema.Struct({
|
|
|
104
103
|
input: Schema.Unknown,
|
|
105
104
|
providerExecuted: Schema.optional(Schema.Boolean),
|
|
106
105
|
cache: Schema.optional(CacheHint),
|
|
107
|
-
metadata: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),
|
|
108
106
|
providerMetadata: Schema.optional(ProviderMetadata),
|
|
109
107
|
}).annotate({ identifier: "LLM.Content.ToolCall" }), {
|
|
110
108
|
make: (input) => ({ type: "tool-call", ...input }),
|
|
@@ -117,7 +115,6 @@ export const ToolResultPart = withStatics(Schema.Struct({
|
|
|
117
115
|
result: ToolResultValue,
|
|
118
116
|
providerExecuted: Schema.optional(Schema.Boolean),
|
|
119
117
|
cache: Schema.optional(CacheHint),
|
|
120
|
-
metadata: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),
|
|
121
118
|
providerMetadata: Schema.optional(ProviderMetadata),
|
|
122
119
|
}).annotate({ identifier: "LLM.Content.ToolResult" }), {
|
|
123
120
|
make: (input) => ({
|
|
@@ -128,7 +125,6 @@ export const ToolResultPart = withStatics(Schema.Struct({
|
|
|
128
125
|
result: ToolResultValue.make(input.result, input.resultType),
|
|
129
126
|
providerExecuted: input.providerExecuted,
|
|
130
127
|
cache: input.cache,
|
|
131
|
-
metadata: input.metadata,
|
|
132
128
|
providerMetadata: input.providerMetadata,
|
|
133
129
|
}),
|
|
134
130
|
});
|
|
@@ -137,7 +133,6 @@ export const ReasoningPart = Schema.Struct({
|
|
|
137
133
|
text: Schema.String,
|
|
138
134
|
encrypted: Schema.optional(Schema.String),
|
|
139
135
|
cache: Schema.optional(CacheHint),
|
|
140
|
-
metadata: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),
|
|
141
136
|
providerMetadata: Schema.optional(ProviderMetadata),
|
|
142
137
|
}).annotate({ identifier: "LLM.Content.Reasoning" });
|
|
143
138
|
const compactionPartSchema = Schema.Struct({
|
|
@@ -172,7 +167,6 @@ export class Message extends Schema.Class("LLM.Message")({
|
|
|
172
167
|
id: Schema.optional(Schema.String),
|
|
173
168
|
role: MessageRole,
|
|
174
169
|
content: Schema.Array(ContentPart),
|
|
175
|
-
metadata: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),
|
|
176
170
|
providerMetadata: Schema.optional(ProviderMetadata),
|
|
177
171
|
native: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),
|
|
178
172
|
}) {
|
|
@@ -218,7 +212,6 @@ const toolDefinitionFields = {
|
|
|
218
212
|
outputSchema: Schema.optional(JsonSchema),
|
|
219
213
|
freeform: Schema.optional(Freeform),
|
|
220
214
|
cache: Schema.optional(CacheHint),
|
|
221
|
-
metadata: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),
|
|
222
215
|
native: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),
|
|
223
216
|
};
|
|
224
217
|
export class ToolDefinition extends Schema.Class("LLM.ToolDefinition")({
|
package/dist/tool-history.js
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-519",
|
|
4
4
|
"name": "@opencode/ai",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -520,7 +520,7 @@
|
|
|
520
520
|
"devDependencies": {
|
|
521
521
|
"@clack/prompts": "1.0.0-alpha.1",
|
|
522
522
|
"@effect/platform-node": "4.1.0",
|
|
523
|
-
"@opencode/http-recorder": "0.0.0-dev-
|
|
523
|
+
"@opencode/http-recorder": "0.0.0-dev-519",
|
|
524
524
|
"@tsconfig/bun": "1.0.9",
|
|
525
525
|
"@types/bun": "1.4.3",
|
|
526
526
|
"@typescript/native": "npm:typescript@7.1.0-beta",
|
|
@@ -530,7 +530,7 @@
|
|
|
530
530
|
"@aws-sdk/credential-providers": "3.1057.0",
|
|
531
531
|
"@smithy/eventstream-codec": "4.2.14",
|
|
532
532
|
"@smithy/util-utf8": "4.2.2",
|
|
533
|
-
"@opencode/schema": "0.0.0-dev-
|
|
533
|
+
"@opencode/schema": "0.0.0-dev-519",
|
|
534
534
|
"aws4fetch": "1.0.20",
|
|
535
535
|
"effect": "4.1.0",
|
|
536
536
|
"google-auth-library": "10.5.0"
|