@opencode/ai 2.0.28 → 2.0.30

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.
@@ -206,7 +206,7 @@ export declare const protocol: Protocol<{
206
206
  readonly type: string;
207
207
  readonly id?: string | undefined;
208
208
  readonly name?: string | undefined;
209
- readonly namespace?: string | undefined;
209
+ readonly namespace?: string | null | undefined;
210
210
  readonly arguments?: string | undefined;
211
211
  readonly call_id?: string | undefined;
212
212
  readonly encrypted_content?: string | null | undefined;
@@ -237,7 +237,7 @@ export declare const protocol: Protocol<{
237
237
  readonly type: string;
238
238
  readonly id?: string | undefined;
239
239
  readonly name?: string | undefined;
240
- readonly namespace?: string | undefined;
240
+ readonly namespace?: string | null | undefined;
241
241
  readonly arguments?: string | undefined;
242
242
  readonly call_id?: string | undefined;
243
243
  readonly encrypted_content?: string | null | undefined;
@@ -217,7 +217,7 @@ export declare const protocol: Protocol<{
217
217
  readonly type: string;
218
218
  readonly id?: string | undefined;
219
219
  readonly name?: string | undefined;
220
- readonly namespace?: string | undefined;
220
+ readonly namespace?: string | null | undefined;
221
221
  readonly arguments?: string | undefined;
222
222
  readonly call_id?: string | undefined;
223
223
  readonly encrypted_content?: string | null | undefined;
@@ -248,7 +248,7 @@ export declare const protocol: Protocol<{
248
248
  readonly type: string;
249
249
  readonly id?: string | undefined;
250
250
  readonly name?: string | undefined;
251
- readonly namespace?: string | undefined;
251
+ readonly namespace?: string | null | undefined;
252
252
  readonly arguments?: string | undefined;
253
253
  readonly call_id?: string | undefined;
254
254
  readonly encrypted_content?: string | null | undefined;
@@ -577,13 +577,14 @@ export declare const StreamItem: Schema.StructWithRest<Schema.Struct<{
577
577
  readonly id: Schema.optional<Schema.String>;
578
578
  readonly call_id: Schema.optional<Schema.String>;
579
579
  readonly name: Schema.optional<Schema.String>;
580
- readonly namespace: Schema.optional<Schema.String>;
580
+ readonly namespace: Schema.optional<Schema.NullOr<Schema.String>>;
581
581
  readonly arguments: Schema.optional<Schema.String>;
582
582
  readonly encrypted_content: Schema.optional<Schema.NullOr<Schema.String>>;
583
583
  }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
584
584
  export type StreamItem = Schema.Schema.Type<typeof StreamItem>;
585
585
  export type OutputItem = StreamItem & {
586
586
  readonly id: string;
587
+ readonly namespace?: string;
587
588
  };
588
589
  export declare const Event: Schema.StructWithRest<Schema.Struct<{
589
590
  readonly type: Schema.String;
@@ -598,7 +599,7 @@ export declare const Event: Schema.StructWithRest<Schema.Struct<{
598
599
  readonly id: Schema.optional<Schema.String>;
599
600
  readonly call_id: Schema.optional<Schema.String>;
600
601
  readonly name: Schema.optional<Schema.String>;
601
- readonly namespace: Schema.optional<Schema.String>;
602
+ readonly namespace: Schema.optional<Schema.NullOr<Schema.String>>;
602
603
  readonly arguments: Schema.optional<Schema.String>;
603
604
  readonly encrypted_content: Schema.optional<Schema.NullOr<Schema.String>>;
604
605
  }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>;
@@ -613,7 +614,7 @@ export declare const Event: Schema.StructWithRest<Schema.Struct<{
613
614
  readonly id: Schema.optional<Schema.String>;
614
615
  readonly call_id: Schema.optional<Schema.String>;
615
616
  readonly name: Schema.optional<Schema.String>;
616
- readonly namespace: Schema.optional<Schema.String>;
617
+ readonly namespace: Schema.optional<Schema.NullOr<Schema.String>>;
617
618
  readonly arguments: Schema.optional<Schema.String>;
618
619
  readonly encrypted_content: Schema.optional<Schema.NullOr<Schema.String>>;
619
620
  }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>;
@@ -662,7 +663,7 @@ export declare const decodeChannelEvent: (frame: string) => Effect.Effect<{
662
663
  readonly type: string;
663
664
  readonly id?: string | undefined;
664
665
  readonly name?: string | undefined;
665
- readonly namespace?: string | undefined;
666
+ readonly namespace?: string | null | undefined;
666
667
  readonly arguments?: string | undefined;
667
668
  readonly call_id?: string | undefined;
668
669
  readonly encrypted_content?: string | null | undefined;
@@ -693,7 +694,7 @@ export declare const decodeChannelEvent: (frame: string) => Effect.Effect<{
693
694
  readonly type: string;
694
695
  readonly id?: string | undefined;
695
696
  readonly name?: string | undefined;
696
- readonly namespace?: string | undefined;
697
+ readonly namespace?: string | null | undefined;
697
698
  readonly arguments?: string | undefined;
698
699
  readonly call_id?: string | undefined;
699
700
  readonly encrypted_content?: string | null | undefined;
@@ -1717,7 +1718,7 @@ export declare const protocol: Protocol<{
1717
1718
  readonly type: string;
1718
1719
  readonly id?: string | undefined;
1719
1720
  readonly name?: string | undefined;
1720
- readonly namespace?: string | undefined;
1721
+ readonly namespace?: string | null | undefined;
1721
1722
  readonly arguments?: string | undefined;
1722
1723
  readonly call_id?: string | undefined;
1723
1724
  readonly encrypted_content?: string | null | undefined;
@@ -1748,7 +1749,7 @@ export declare const protocol: Protocol<{
1748
1749
  readonly type: string;
1749
1750
  readonly id?: string | undefined;
1750
1751
  readonly name?: string | undefined;
1751
- readonly namespace?: string | undefined;
1752
+ readonly namespace?: string | null | undefined;
1752
1753
  readonly arguments?: string | undefined;
1753
1754
  readonly call_id?: string | undefined;
1754
1755
  readonly encrypted_content?: string | null | undefined;
@@ -241,7 +241,7 @@ export const StreamItem = Schema.StructWithRest(Schema.Struct({
241
241
  id: Schema.optional(Schema.String),
242
242
  call_id: Schema.optional(Schema.String),
243
243
  name: Schema.optional(Schema.String),
244
- namespace: Schema.optional(Schema.String),
244
+ namespace: optionalNull(Schema.String),
245
245
  arguments: Schema.optional(Schema.String),
246
246
  encrypted_content: optionalNull(Schema.String),
247
247
  }), [Schema.Record(Schema.String, Schema.Unknown)]);
@@ -714,6 +714,8 @@ const ITEM_ID_PREFIX = {
714
714
  // otherwise it gets a locally minted one.
715
715
  const resolveItem = (state, item, index) => ({
716
716
  ...item,
717
+ // Some gateways serialize an absent namespace as null.
718
+ namespace: item.namespace ?? undefined,
717
719
  id: item.id ??
718
720
  (index === undefined ? undefined : state.outputItems[index]) ??
719
721
  `${ITEM_ID_PREFIX[item.type] ?? "item"}_${crypto.randomUUID().replaceAll("-", "")}`,
@@ -422,7 +422,7 @@ export declare const protocol: Protocol<{
422
422
  readonly type: string;
423
423
  readonly id?: string | undefined;
424
424
  readonly name?: string | undefined;
425
- readonly namespace?: string | undefined;
425
+ readonly namespace?: string | null | undefined;
426
426
  readonly arguments?: string | undefined;
427
427
  readonly call_id?: string | undefined;
428
428
  readonly encrypted_content?: string | null | undefined;
@@ -453,7 +453,7 @@ export declare const protocol: Protocol<{
453
453
  readonly type: string;
454
454
  readonly id?: string | undefined;
455
455
  readonly name?: string | undefined;
456
- readonly namespace?: string | undefined;
456
+ readonly namespace?: string | null | undefined;
457
457
  readonly arguments?: string | undefined;
458
458
  readonly call_id?: string | undefined;
459
459
  readonly encrypted_content?: string | null | undefined;
@@ -193,7 +193,7 @@ export declare const protocol: Protocol<{
193
193
  readonly type: string;
194
194
  readonly id?: string | undefined;
195
195
  readonly name?: string | undefined;
196
- readonly namespace?: string | undefined;
196
+ readonly namespace?: string | null | undefined;
197
197
  readonly arguments?: string | undefined;
198
198
  readonly call_id?: string | undefined;
199
199
  readonly encrypted_content?: string | null | undefined;
@@ -224,7 +224,7 @@ export declare const protocol: Protocol<{
224
224
  readonly type: string;
225
225
  readonly id?: string | undefined;
226
226
  readonly name?: string | undefined;
227
- readonly namespace?: string | undefined;
227
+ readonly namespace?: string | null | undefined;
228
228
  readonly arguments?: string | undefined;
229
229
  readonly call_id?: string | undefined;
230
230
  readonly encrypted_content?: string | null | undefined;
@@ -2,7 +2,7 @@ import { HttpOptions, ProviderID } from "../schema/index.js";
2
2
  import { AuthOptions } from "../route/auth-options.js";
3
3
  import { SystemOne } from "../experimental/system-one.js";
4
4
  export const id = ProviderID.make("opencode");
5
- const baseURL = "https://opencode.ai/inference/v1";
5
+ const baseURL = "https://opencode.ai/inference/systemone/v1";
6
6
  export const configure = (input = {}) => {
7
7
  const evaluation = (modelID) => SystemOne.model({
8
8
  id: modelID,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
- "version": "2.0.28",
3
+ "version": "2.0.30",
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.1",
37
- "@opencode/http-recorder": "2.0.28",
37
+ "@opencode/http-recorder": "2.0.30",
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": "2.0.28",
47
+ "@opencode/schema": "2.0.30",
48
48
  "aws4fetch": "1.0.20",
49
49
  "effect": "4.0.1",
50
50
  "google-auth-library": "10.5.0"