@opencode/schema 0.0.0-dev-19633 → 0.0.0-dev-19635

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.
@@ -55,7 +55,6 @@ declare const Model_base: Schema.Class<Model, Schema.Struct<{
55
55
  readonly tools: Schema.Boolean;
56
56
  readonly input: Schema.$Array<Schema.String>;
57
57
  readonly output: Schema.$Array<Schema.String>;
58
- readonly responsesWebsockets: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
59
58
  }> & {
60
59
  default: () => {
61
60
  tools: true;
@@ -66,7 +65,6 @@ declare const Model_base: Schema.Class<Model, Schema.Struct<{
66
65
  readonly tools: Schema.Boolean;
67
66
  readonly input: Schema.$Array<Schema.String>;
68
67
  readonly output: Schema.$Array<Schema.String>;
69
- readonly responsesWebsockets: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
70
68
  }> & {
71
69
  default: () => {
72
70
  tools: true;
@@ -102,7 +100,7 @@ declare const Model_base: Schema.Class<Model, Schema.Struct<{
102
100
  readonly mode: Schema.Literal<"provider">;
103
101
  readonly threshold: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
104
102
  }>]>>, never, never>;
105
- readonly websocket: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
103
+ readonly transport: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["http", "websocket"]>>>, Schema.optionalKey<Schema.Literals<readonly ["http", "websocket"]>>, never, never>;
106
104
  readonly modelID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.ID">>, never, never>;
107
105
  readonly family: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.Family">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.Family">>, never, never>;
108
106
  readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
@@ -139,7 +137,7 @@ declare const Info_base: Schema.Class<Info, Schema.Struct<{
139
137
  readonly mode: Schema.Literal<"provider">;
140
138
  readonly threshold: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
141
139
  }>]>>, never, never>;
142
- readonly websocket: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
140
+ readonly transport: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["http", "websocket"]>>>, Schema.optionalKey<Schema.Literals<readonly ["http", "websocket"]>>, never, never>;
143
141
  readonly canonical: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Provider.ID"> & {
144
142
  opencode: string & import("effect/Brand").Brand<"Provider.ID">;
145
143
  anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
@@ -38,8 +38,8 @@ class Limit extends Schema.Class("Config.Model.Limit")({
38
38
  }
39
39
  class Model extends Schema.Class("Config.Model")({
40
40
  compaction: Provider.Compaction.pipe(optional),
41
- websocket: Schema.Boolean.pipe(optional).annotate({
42
- description: "Use the provider's WebSocket transport for this model. Defaults to the provider policy.",
41
+ transport: Provider.Transport.pipe(optional).annotate({
42
+ description: "Session transport for this model. Defaults to the provider transport.",
43
43
  }),
44
44
  modelID: ID.pipe(optional),
45
45
  family: Family.pipe(optional),
@@ -59,8 +59,8 @@ class Model extends Schema.Class("Config.Model")({
59
59
  }
60
60
  export class Info extends Schema.Class("Config.Provider")({
61
61
  compaction: Provider.Compaction.pipe(optional),
62
- websocket: Schema.Boolean.pipe(optional).annotate({
63
- description: "Use the provider's WebSocket transport when the route supports it. Defaults to the built-in policy.",
62
+ transport: Provider.Transport.pipe(optional).annotate({
63
+ description: "Session transport for this provider's models. Defaults to the built-in policy; \"websocket\" on a route without a WebSocket channel warns and falls back to HTTP.",
64
64
  }),
65
65
  canonical: Provider.ID.pipe(optional),
66
66
  name: Schema.String.pipe(optional),
package/dist/model.d.ts CHANGED
@@ -120,7 +120,6 @@ export declare const Capabilities: Schema.Struct<{
120
120
  readonly tools: Schema.Boolean;
121
121
  readonly input: Schema.$Array<Schema.String>;
122
122
  readonly output: Schema.$Array<Schema.String>;
123
- readonly responsesWebsockets: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
124
123
  }> & {
125
124
  default: () => {
126
125
  tools: true;
@@ -168,7 +167,6 @@ export declare const Info: Schema.Struct<{
168
167
  readonly tools: Schema.Boolean;
169
168
  readonly input: Schema.$Array<Schema.String>;
170
169
  readonly output: Schema.$Array<Schema.String>;
171
- readonly responsesWebsockets: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
172
170
  }> & {
173
171
  default: () => {
174
172
  tools: true;
@@ -287,8 +285,8 @@ export declare const Info: Schema.Struct<{
287
285
  readonly mode: Schema.Literal<"provider">;
288
286
  readonly threshold: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
289
287
  }>]>>, never, never>;
290
- /** Session WebSocket policy; omitted inherits the provider policy, then defaults to disabled. */
291
- readonly websocket: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
288
+ /** Session transport; omitted inherits the provider transport, then defaults to HTTP. */
289
+ readonly transport: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["http", "websocket"]>>>, Schema.optionalKey<Schema.Literals<readonly ["http", "websocket"]>>, never, never>;
292
290
  }> & {
293
291
  default: (providerID: Provider.ID, id: ID) => {
294
292
  id: string & import("effect/Brand").Brand<"Model.ID">;
package/dist/model.js CHANGED
@@ -52,7 +52,6 @@ export const Capabilities = Schema.Struct({
52
52
  tools: Schema.Boolean,
53
53
  input: Schema.Array(Schema.String),
54
54
  output: Schema.Array(Schema.String),
55
- responsesWebsockets: Schema.Boolean.pipe(optional),
56
55
  })
57
56
  .annotate({ identifier: "Model.Capabilities" })
58
57
  .pipe(statics(() => ({
@@ -84,8 +83,8 @@ export const Info = Schema.Struct({
84
83
  compatibility: Compatibility.pipe(optional),
85
84
  package: Provider.Package.pipe(optional),
86
85
  compaction: Provider.Compaction.pipe(optional),
87
- /** Session WebSocket policy; omitted inherits the provider policy, then defaults to disabled. */
88
- websocket: Schema.Boolean.pipe(optional),
86
+ /** Session transport; omitted inherits the provider transport, then defaults to HTTP. */
87
+ transport: Provider.Transport.pipe(optional),
89
88
  ...Provider.Overlays,
90
89
  capabilities: Capabilities,
91
90
  variants: Schema.Array(Variant),
@@ -93,6 +93,9 @@ export declare const Compaction: Schema.Union<readonly [Schema.Struct<{
93
93
  readonly mode: Schema.Literal<"provider">;
94
94
  readonly threshold: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
95
95
  }>]>;
96
+ /** "websocket" on a route without a WebSocket channel warns and falls back to HTTP. */
97
+ export declare const Transport: Schema.Literals<readonly ["http", "websocket"]>;
98
+ export type Transport = typeof Transport.Type;
96
99
  export declare const Overlays: {
97
100
  settings: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Any>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Any>>, never, never>;
98
101
  headers: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
@@ -166,8 +169,8 @@ export declare const Info: Schema.Struct<{
166
169
  readonly mode: Schema.Literal<"provider">;
167
170
  readonly threshold: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
168
171
  }>]>>, never, never>;
169
- /** Session WebSocket policy for routes that support it; omitted means disabled. */
170
- readonly websocket: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
172
+ /** Session transport for this provider's models; omitted means HTTP. */
173
+ readonly transport: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["http", "websocket"]>>>, Schema.optionalKey<Schema.Literals<readonly ["http", "websocket"]>>, never, never>;
171
174
  }> & {
172
175
  empty: (id: ID) => Info;
173
176
  };
package/dist/provider.js CHANGED
@@ -24,6 +24,8 @@ export const Compaction = Schema.Union([
24
24
  Schema.Struct({ mode: Schema.Literal("local") }),
25
25
  Schema.Struct({ mode: Schema.Literal("provider"), threshold: PositiveInt.pipe(optional) }),
26
26
  ]).annotate({ identifier: "Provider.Compaction" });
27
+ /** "websocket" on a route without a WebSocket channel warns and falls back to HTTP. */
28
+ export const Transport = Schema.Literals(["http", "websocket"]).annotate({ identifier: "Provider.Transport" });
27
29
  export const Overlays = {
28
30
  settings: Schema.Record(Schema.String, Schema.Any).pipe(optional),
29
31
  headers: Schema.Record(Schema.String, Schema.String).pipe(optional),
@@ -43,8 +45,8 @@ export const Info = Schema.Struct({
43
45
  activation: Activation,
44
46
  package: Package,
45
47
  compaction: Compaction.pipe(optional),
46
- /** Session WebSocket policy for routes that support it; omitted means disabled. */
47
- websocket: Schema.Boolean.pipe(optional),
48
+ /** Session transport for this provider's models; omitted means HTTP. */
49
+ transport: Transport.pipe(optional),
48
50
  ...Overlays,
49
51
  })
50
52
  .annotate({ identifier: "Provider.Info" })
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode/schema",
4
- "version": "0.0.0-dev-19633",
4
+ "version": "0.0.0-dev-19635",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {