@opencode/schema 0.0.0-dev-19787 → 0.0.0-dev-19790

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/agent.d.ts CHANGED
@@ -57,7 +57,20 @@ export declare const Info: Schema.Struct<{
57
57
  };
58
58
  }>, never, never>;
59
59
  readonly request: Schema.Struct<{
60
- readonly settings: Schema.withConstructorDefault<Schema.$Record<Schema.String, Schema.Any>>;
60
+ readonly settings: Schema.withConstructorDefault<Schema.StructWithRest<Schema.Struct<{
61
+ readonly timeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>, never, never>;
62
+ readonly chunkTimeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
63
+ readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
64
+ readonly type: Schema.Literal<"summary">;
65
+ }>, Schema.Struct<{
66
+ readonly type: Schema.Literal<"native">;
67
+ }>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
68
+ readonly type: Schema.Literal<"summary">;
69
+ }>, Schema.Struct<{
70
+ readonly type: Schema.Literal<"native">;
71
+ }>]>>, never, never>;
72
+ readonly transport: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["http", "websocket"]>>>, Schema.optionalKey<Schema.Literals<readonly ["http", "websocket"]>>, never, never>;
73
+ }>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>;
61
74
  readonly headers: Schema.$Record<Schema.String, Schema.String>;
62
75
  readonly body: Schema.$Record<Schema.String, Schema.Any>;
63
76
  }>;
@@ -1,7 +1,48 @@
1
1
  export * as ConfigProvider from "./provider.js";
2
2
  import { Schema } from "effect";
3
+ export declare const Settings: Schema.StructWithRest<Schema.Struct<{
4
+ readonly timeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>, never, never>;
5
+ readonly chunkTimeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
6
+ readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
7
+ readonly type: Schema.Literal<"summary">;
8
+ }>, Schema.Struct<{
9
+ readonly type: Schema.Literal<"native">;
10
+ }>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
11
+ readonly type: Schema.Literal<"summary">;
12
+ }>, Schema.Struct<{
13
+ readonly type: Schema.Literal<"native">;
14
+ }>]>>, never, never>;
15
+ readonly transport: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["http", "websocket"]>>>, Schema.optionalKey<Schema.Literals<readonly ["http", "websocket"]>>, never, never>;
16
+ }>, readonly [Schema.$Record<Schema.String, Schema.UndefinedOr<Schema.Codec<Schema.Json, Schema.Json, never, never>>>]>;
17
+ export type Settings = typeof Settings.Type;
3
18
  export declare const Overlays: {
4
- settings: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>, never, never>;
19
+ settings: Schema.decodeTo<Schema.optional<Schema.toType<Schema.StructWithRest<Schema.Struct<{
20
+ readonly timeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>, never, never>;
21
+ readonly chunkTimeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
22
+ readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
23
+ readonly type: Schema.Literal<"summary">;
24
+ }>, Schema.Struct<{
25
+ readonly type: Schema.Literal<"native">;
26
+ }>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
27
+ readonly type: Schema.Literal<"summary">;
28
+ }>, Schema.Struct<{
29
+ readonly type: Schema.Literal<"native">;
30
+ }>]>>, never, never>;
31
+ readonly transport: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["http", "websocket"]>>>, Schema.optionalKey<Schema.Literals<readonly ["http", "websocket"]>>, never, never>;
32
+ }>, readonly [Schema.$Record<Schema.String, Schema.UndefinedOr<Schema.Codec<Schema.Json, Schema.Json, never, never>>>]>>>, Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
33
+ readonly timeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>, never, never>;
34
+ readonly chunkTimeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
35
+ readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
36
+ readonly type: Schema.Literal<"summary">;
37
+ }>, Schema.Struct<{
38
+ readonly type: Schema.Literal<"native">;
39
+ }>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
40
+ readonly type: Schema.Literal<"summary">;
41
+ }>, Schema.Struct<{
42
+ readonly type: Schema.Literal<"native">;
43
+ }>]>>, never, never>;
44
+ readonly transport: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["http", "websocket"]>>>, Schema.optionalKey<Schema.Literals<readonly ["http", "websocket"]>>, never, never>;
45
+ }>, readonly [Schema.$Record<Schema.String, Schema.UndefinedOr<Schema.Codec<Schema.Json, Schema.Json, never, never>>>]>>, never, never>;
5
46
  headers: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
6
47
  body: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>, never, never>;
7
48
  };
@@ -73,12 +114,64 @@ declare const Model_base: Schema.Class<Model, Schema.Struct<{
73
114
  };
74
115
  }>, never, never>;
75
116
  readonly variants: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
76
- readonly settings: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>, never, never>;
117
+ readonly settings: Schema.decodeTo<Schema.optional<Schema.toType<Schema.StructWithRest<Schema.Struct<{
118
+ readonly timeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>, never, never>;
119
+ readonly chunkTimeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
120
+ readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
121
+ readonly type: Schema.Literal<"summary">;
122
+ }>, Schema.Struct<{
123
+ readonly type: Schema.Literal<"native">;
124
+ }>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
125
+ readonly type: Schema.Literal<"summary">;
126
+ }>, Schema.Struct<{
127
+ readonly type: Schema.Literal<"native">;
128
+ }>]>>, never, never>;
129
+ readonly transport: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["http", "websocket"]>>>, Schema.optionalKey<Schema.Literals<readonly ["http", "websocket"]>>, never, never>;
130
+ }>, readonly [Schema.$Record<Schema.String, Schema.UndefinedOr<Schema.Codec<Schema.Json, Schema.Json, never, never>>>]>>>, Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
131
+ readonly timeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>, never, never>;
132
+ readonly chunkTimeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
133
+ readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
134
+ readonly type: Schema.Literal<"summary">;
135
+ }>, Schema.Struct<{
136
+ readonly type: Schema.Literal<"native">;
137
+ }>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
138
+ readonly type: Schema.Literal<"summary">;
139
+ }>, Schema.Struct<{
140
+ readonly type: Schema.Literal<"native">;
141
+ }>]>>, never, never>;
142
+ readonly transport: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["http", "websocket"]>>>, Schema.optionalKey<Schema.Literals<readonly ["http", "websocket"]>>, never, never>;
143
+ }>, readonly [Schema.$Record<Schema.String, Schema.UndefinedOr<Schema.Codec<Schema.Json, Schema.Json, never, never>>>]>>, never, never>;
77
144
  readonly headers: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
78
145
  readonly body: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>, never, never>;
79
146
  readonly id: Schema.brand<Schema.String, "Model.VariantID">;
80
147
  }>>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
81
- readonly settings: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>, never, never>;
148
+ readonly settings: Schema.decodeTo<Schema.optional<Schema.toType<Schema.StructWithRest<Schema.Struct<{
149
+ readonly timeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>, never, never>;
150
+ readonly chunkTimeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
151
+ readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
152
+ readonly type: Schema.Literal<"summary">;
153
+ }>, Schema.Struct<{
154
+ readonly type: Schema.Literal<"native">;
155
+ }>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
156
+ readonly type: Schema.Literal<"summary">;
157
+ }>, Schema.Struct<{
158
+ readonly type: Schema.Literal<"native">;
159
+ }>]>>, never, never>;
160
+ readonly transport: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["http", "websocket"]>>>, Schema.optionalKey<Schema.Literals<readonly ["http", "websocket"]>>, never, never>;
161
+ }>, readonly [Schema.$Record<Schema.String, Schema.UndefinedOr<Schema.Codec<Schema.Json, Schema.Json, never, never>>>]>>>, Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
162
+ readonly timeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>, never, never>;
163
+ readonly chunkTimeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
164
+ readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
165
+ readonly type: Schema.Literal<"summary">;
166
+ }>, Schema.Struct<{
167
+ readonly type: Schema.Literal<"native">;
168
+ }>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
169
+ readonly type: Schema.Literal<"summary">;
170
+ }>, Schema.Struct<{
171
+ readonly type: Schema.Literal<"native">;
172
+ }>]>>, never, never>;
173
+ readonly transport: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["http", "websocket"]>>>, Schema.optionalKey<Schema.Literals<readonly ["http", "websocket"]>>, never, never>;
174
+ }>, readonly [Schema.$Record<Schema.String, Schema.UndefinedOr<Schema.Codec<Schema.Json, Schema.Json, never, never>>>]>>, never, never>;
82
175
  readonly headers: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
83
176
  readonly body: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>, never, never>;
84
177
  readonly id: Schema.brand<Schema.String, "Model.VariantID">;
@@ -86,21 +179,35 @@ declare const Model_base: Schema.Class<Model, Schema.Struct<{
86
179
  readonly cost: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [typeof Cost, Schema.$Array<typeof Cost>]>>>, Schema.optionalKey<Schema.Union<readonly [typeof Cost, Schema.$Array<typeof Cost>]>>, never, never>;
87
180
  readonly disabled: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
88
181
  readonly limit: Schema.decodeTo<Schema.optional<Schema.toType<typeof Limit>>, Schema.optionalKey<typeof Limit>, never, never>;
89
- readonly settings: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>, never, never>;
182
+ readonly settings: Schema.decodeTo<Schema.optional<Schema.toType<Schema.StructWithRest<Schema.Struct<{
183
+ readonly timeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>, never, never>;
184
+ readonly chunkTimeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
185
+ readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
186
+ readonly type: Schema.Literal<"summary">;
187
+ }>, Schema.Struct<{
188
+ readonly type: Schema.Literal<"native">;
189
+ }>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
190
+ readonly type: Schema.Literal<"summary">;
191
+ }>, Schema.Struct<{
192
+ readonly type: Schema.Literal<"native">;
193
+ }>]>>, never, never>;
194
+ readonly transport: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["http", "websocket"]>>>, Schema.optionalKey<Schema.Literals<readonly ["http", "websocket"]>>, never, never>;
195
+ }>, readonly [Schema.$Record<Schema.String, Schema.UndefinedOr<Schema.Codec<Schema.Json, Schema.Json, never, never>>>]>>>, Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
196
+ readonly timeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>, never, never>;
197
+ readonly chunkTimeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
198
+ readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
199
+ readonly type: Schema.Literal<"summary">;
200
+ }>, Schema.Struct<{
201
+ readonly type: Schema.Literal<"native">;
202
+ }>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
203
+ readonly type: Schema.Literal<"summary">;
204
+ }>, Schema.Struct<{
205
+ readonly type: Schema.Literal<"native">;
206
+ }>]>>, never, never>;
207
+ readonly transport: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["http", "websocket"]>>>, Schema.optionalKey<Schema.Literals<readonly ["http", "websocket"]>>, never, never>;
208
+ }>, readonly [Schema.$Record<Schema.String, Schema.UndefinedOr<Schema.Codec<Schema.Json, Schema.Json, never, never>>>]>>, never, never>;
90
209
  readonly headers: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
91
210
  readonly body: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>, never, never>;
92
- readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
93
- readonly mode: Schema.Literal<"local">;
94
- }>, Schema.Struct<{
95
- readonly mode: Schema.Literal<"provider">;
96
- readonly threshold: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
97
- }>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
98
- readonly mode: Schema.Literal<"local">;
99
- }>, Schema.Struct<{
100
- readonly mode: Schema.Literal<"provider">;
101
- readonly threshold: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
102
- }>]>>, 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>;
104
211
  readonly modelID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.ID">>, never, never>;
105
212
  readonly family: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.Family">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.Family">>, never, never>;
106
213
  readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
@@ -125,21 +232,35 @@ declare class Model extends Model_base {
125
232
  }
126
233
  declare const Info_base: Schema.Class<Info, Schema.Struct<{
127
234
  readonly models: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, typeof Model>>>, Schema.optionalKey<Schema.$Record<Schema.String, typeof Model>>, never, never>;
128
- readonly settings: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>, never, never>;
235
+ readonly settings: Schema.decodeTo<Schema.optional<Schema.toType<Schema.StructWithRest<Schema.Struct<{
236
+ readonly timeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>, never, never>;
237
+ readonly chunkTimeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
238
+ readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
239
+ readonly type: Schema.Literal<"summary">;
240
+ }>, Schema.Struct<{
241
+ readonly type: Schema.Literal<"native">;
242
+ }>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
243
+ readonly type: Schema.Literal<"summary">;
244
+ }>, Schema.Struct<{
245
+ readonly type: Schema.Literal<"native">;
246
+ }>]>>, never, never>;
247
+ readonly transport: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["http", "websocket"]>>>, Schema.optionalKey<Schema.Literals<readonly ["http", "websocket"]>>, never, never>;
248
+ }>, readonly [Schema.$Record<Schema.String, Schema.UndefinedOr<Schema.Codec<Schema.Json, Schema.Json, never, never>>>]>>>, Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
249
+ readonly timeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>, never, never>;
250
+ readonly chunkTimeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
251
+ readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
252
+ readonly type: Schema.Literal<"summary">;
253
+ }>, Schema.Struct<{
254
+ readonly type: Schema.Literal<"native">;
255
+ }>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
256
+ readonly type: Schema.Literal<"summary">;
257
+ }>, Schema.Struct<{
258
+ readonly type: Schema.Literal<"native">;
259
+ }>]>>, never, never>;
260
+ readonly transport: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["http", "websocket"]>>>, Schema.optionalKey<Schema.Literals<readonly ["http", "websocket"]>>, never, never>;
261
+ }>, readonly [Schema.$Record<Schema.String, Schema.UndefinedOr<Schema.Codec<Schema.Json, Schema.Json, never, never>>>]>>, never, never>;
129
262
  readonly headers: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
130
263
  readonly body: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>, never, never>;
131
- readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
132
- readonly mode: Schema.Literal<"local">;
133
- }>, Schema.Struct<{
134
- readonly mode: Schema.Literal<"provider">;
135
- readonly threshold: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
136
- }>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
137
- readonly mode: Schema.Literal<"local">;
138
- }>, Schema.Struct<{
139
- readonly mode: Schema.Literal<"provider">;
140
- readonly threshold: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
141
- }>]>>, never, never>;
142
- readonly transport: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["http", "websocket"]>>>, Schema.optionalKey<Schema.Literals<readonly ["http", "websocket"]>>, never, never>;
143
264
  readonly canonical: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Provider.ID"> & {
144
265
  opencode: string & import("effect/Brand").Brand<"Provider.ID">;
145
266
  anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
@@ -4,9 +4,15 @@ import { Money } from "../money.js";
4
4
  import { Capabilities, Compatibility, Family, ID, VariantID } from "../model.js";
5
5
  import { Provider } from "../provider.js";
6
6
  import { optional } from "../schema.js";
7
+ export const Settings = Schema.StructWithRest(Schema.Struct({
8
+ timeout: Schema.Union([Schema.Finite, Schema.Literal(false)]).pipe(optional),
9
+ chunkTimeout: Schema.Finite.pipe(optional),
10
+ compaction: Provider.Compaction.pipe(optional),
11
+ transport: Provider.Transport.pipe(optional),
12
+ }), [Schema.Record(Schema.String, Schema.UndefinedOr(Schema.Json))]).annotate({ identifier: "Config.Provider.Settings" });
7
13
  const JsonRecord = Schema.Record(Schema.String, Schema.Json);
8
14
  export const Overlays = {
9
- settings: JsonRecord.pipe(optional),
15
+ settings: Settings.pipe(optional),
10
16
  headers: Schema.Record(Schema.String, Schema.String).pipe(optional),
11
17
  body: JsonRecord.pipe(optional),
12
18
  };
@@ -37,10 +43,6 @@ class Limit extends Schema.Class("Config.Model.Limit")({
37
43
  }) {
38
44
  }
39
45
  class Model extends Schema.Class("Config.Model")({
40
- compaction: Provider.Compaction.pipe(optional),
41
- transport: Provider.Transport.pipe(optional).annotate({
42
- description: "Session transport for this model. Defaults to the provider transport.",
43
- }),
44
46
  modelID: ID.pipe(optional),
45
47
  family: Family.pipe(optional),
46
48
  name: Schema.String.pipe(optional),
@@ -58,10 +60,6 @@ class Model extends Schema.Class("Config.Model")({
58
60
  }) {
59
61
  }
60
62
  export class Info extends Schema.Class("Config.Provider")({
61
- compaction: Provider.Compaction.pipe(optional),
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
- }),
65
63
  canonical: Provider.ID.pipe(optional),
66
64
  name: Schema.String.pipe(optional),
67
65
  env: Schema.String.pipe(Schema.Array, optional),
package/dist/model.d.ts CHANGED
@@ -156,7 +156,33 @@ export declare const Cost: Schema.Struct<{
156
156
  export interface Variant extends Schema.Schema.Type<typeof Variant> {
157
157
  }
158
158
  export declare const Variant: Schema.Struct<{
159
- readonly settings: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Any>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Any>>, never, never>;
159
+ readonly settings: Schema.decodeTo<Schema.optional<Schema.toType<Schema.StructWithRest<Schema.Struct<{
160
+ readonly timeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>, never, never>;
161
+ readonly chunkTimeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
162
+ readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
163
+ readonly type: Schema.Literal<"summary">;
164
+ }>, Schema.Struct<{
165
+ readonly type: Schema.Literal<"native">;
166
+ }>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
167
+ readonly type: Schema.Literal<"summary">;
168
+ }>, Schema.Struct<{
169
+ readonly type: Schema.Literal<"native">;
170
+ }>]>>, never, never>;
171
+ readonly transport: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["http", "websocket"]>>>, Schema.optionalKey<Schema.Literals<readonly ["http", "websocket"]>>, never, never>;
172
+ }>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>>, Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
173
+ readonly timeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>, never, never>;
174
+ readonly chunkTimeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
175
+ readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
176
+ readonly type: Schema.Literal<"summary">;
177
+ }>, Schema.Struct<{
178
+ readonly type: Schema.Literal<"native">;
179
+ }>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
180
+ readonly type: Schema.Literal<"summary">;
181
+ }>, Schema.Struct<{
182
+ readonly type: Schema.Literal<"native">;
183
+ }>]>>, never, never>;
184
+ readonly transport: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["http", "websocket"]>>>, Schema.optionalKey<Schema.Literals<readonly ["http", "websocket"]>>, never, never>;
185
+ }>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>, never, never>;
160
186
  readonly headers: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
161
187
  readonly body: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Any>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Any>>, never, never>;
162
188
  readonly id: Schema.brand<Schema.String, "Model.VariantID">;
@@ -176,7 +202,33 @@ export declare const Info: Schema.Struct<{
176
202
  };
177
203
  };
178
204
  readonly variants: Schema.$Array<Schema.Struct<{
179
- readonly settings: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Any>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Any>>, never, never>;
205
+ readonly settings: Schema.decodeTo<Schema.optional<Schema.toType<Schema.StructWithRest<Schema.Struct<{
206
+ readonly timeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>, never, never>;
207
+ readonly chunkTimeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
208
+ readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
209
+ readonly type: Schema.Literal<"summary">;
210
+ }>, Schema.Struct<{
211
+ readonly type: Schema.Literal<"native">;
212
+ }>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
213
+ readonly type: Schema.Literal<"summary">;
214
+ }>, Schema.Struct<{
215
+ readonly type: Schema.Literal<"native">;
216
+ }>]>>, never, never>;
217
+ readonly transport: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["http", "websocket"]>>>, Schema.optionalKey<Schema.Literals<readonly ["http", "websocket"]>>, never, never>;
218
+ }>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>>, Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
219
+ readonly timeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>, never, never>;
220
+ readonly chunkTimeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
221
+ readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
222
+ readonly type: Schema.Literal<"summary">;
223
+ }>, Schema.Struct<{
224
+ readonly type: Schema.Literal<"native">;
225
+ }>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
226
+ readonly type: Schema.Literal<"summary">;
227
+ }>, Schema.Struct<{
228
+ readonly type: Schema.Literal<"native">;
229
+ }>]>>, never, never>;
230
+ readonly transport: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["http", "websocket"]>>>, Schema.optionalKey<Schema.Literals<readonly ["http", "websocket"]>>, never, never>;
231
+ }>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>, never, never>;
180
232
  readonly headers: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
181
233
  readonly body: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Any>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Any>>, never, never>;
182
234
  readonly id: Schema.brand<Schema.String, "Model.VariantID">;
@@ -214,7 +266,33 @@ export declare const Info: Schema.Struct<{
214
266
  readonly input: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
215
267
  readonly output: Schema.Int;
216
268
  }>;
217
- readonly settings: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Any>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Any>>, never, never>;
269
+ readonly settings: Schema.decodeTo<Schema.optional<Schema.toType<Schema.StructWithRest<Schema.Struct<{
270
+ readonly timeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>, never, never>;
271
+ readonly chunkTimeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
272
+ readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
273
+ readonly type: Schema.Literal<"summary">;
274
+ }>, Schema.Struct<{
275
+ readonly type: Schema.Literal<"native">;
276
+ }>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
277
+ readonly type: Schema.Literal<"summary">;
278
+ }>, Schema.Struct<{
279
+ readonly type: Schema.Literal<"native">;
280
+ }>]>>, never, never>;
281
+ readonly transport: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["http", "websocket"]>>>, Schema.optionalKey<Schema.Literals<readonly ["http", "websocket"]>>, never, never>;
282
+ }>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>>, Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
283
+ readonly timeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>, never, never>;
284
+ readonly chunkTimeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
285
+ readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
286
+ readonly type: Schema.Literal<"summary">;
287
+ }>, Schema.Struct<{
288
+ readonly type: Schema.Literal<"native">;
289
+ }>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
290
+ readonly type: Schema.Literal<"summary">;
291
+ }>, Schema.Struct<{
292
+ readonly type: Schema.Literal<"native">;
293
+ }>]>>, never, never>;
294
+ readonly transport: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["http", "websocket"]>>>, Schema.optionalKey<Schema.Literals<readonly ["http", "websocket"]>>, never, never>;
295
+ }>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>, never, never>;
218
296
  readonly headers: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
219
297
  readonly body: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Any>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Any>>, never, never>;
220
298
  readonly id: Schema.brand<Schema.String, "Model.ID">;
@@ -277,19 +355,6 @@ export declare const Info: Schema.Struct<{
277
355
  readonly supportsPromptCacheKey: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
278
356
  }>>, never, never>;
279
357
  readonly package: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
280
- readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
281
- readonly mode: Schema.Literal<"local">;
282
- }>, Schema.Struct<{
283
- readonly mode: Schema.Literal<"provider">;
284
- readonly threshold: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
285
- }>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
286
- readonly mode: Schema.Literal<"local">;
287
- }>, Schema.Struct<{
288
- readonly mode: Schema.Literal<"provider">;
289
- readonly threshold: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
290
- }>]>>, never, never>;
291
- /** Session transport; omitted inherits the provider transport, then defaults to HTTP. */
292
- readonly transport: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["http", "websocket"]>>>, Schema.optionalKey<Schema.Literals<readonly ["http", "websocket"]>>, never, never>;
293
358
  }> & {
294
359
  default: (providerID: Provider.ID, id: ID) => {
295
360
  id: string & import("effect/Brand").Brand<"Model.ID">;
package/dist/model.js CHANGED
@@ -83,9 +83,6 @@ export const Info = Schema.Struct({
83
83
  name: Schema.String,
84
84
  compatibility: Compatibility.pipe(optional),
85
85
  package: Provider.Package.pipe(optional),
86
- compaction: Provider.Compaction.pipe(optional),
87
- /** Session transport; omitted inherits the provider transport, then defaults to HTTP. */
88
- transport: Provider.Transport.pipe(optional),
89
86
  ...Provider.Overlays,
90
87
  capabilities: Capabilities,
91
88
  variants: Schema.Array(Variant),
@@ -86,34 +86,111 @@ export declare const Package: Schema.String;
86
86
  export type Package = typeof Package.Type;
87
87
  export declare const Activation: Schema.Literals<readonly ["auto", "enabled", "disabled"]>;
88
88
  export type Activation = typeof Activation.Type;
89
- export type Compaction = typeof Compaction.Type;
90
89
  export declare const Compaction: Schema.Union<readonly [Schema.Struct<{
91
- readonly mode: Schema.Literal<"local">;
90
+ readonly type: Schema.Literal<"summary">;
92
91
  }>, Schema.Struct<{
93
- readonly mode: Schema.Literal<"provider">;
94
- readonly threshold: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
92
+ readonly type: Schema.Literal<"native">;
95
93
  }>]>;
94
+ export type Compaction = typeof Compaction.Type;
96
95
  /** "websocket" on a route without a WebSocket channel warns and falls back to HTTP. */
97
96
  export declare const Transport: Schema.Literals<readonly ["http", "websocket"]>;
98
97
  export type Transport = typeof Transport.Type;
98
+ export declare const Settings: Schema.StructWithRest<Schema.Struct<{
99
+ readonly timeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>, never, never>;
100
+ readonly chunkTimeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
101
+ readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
102
+ readonly type: Schema.Literal<"summary">;
103
+ }>, Schema.Struct<{
104
+ readonly type: Schema.Literal<"native">;
105
+ }>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
106
+ readonly type: Schema.Literal<"summary">;
107
+ }>, Schema.Struct<{
108
+ readonly type: Schema.Literal<"native">;
109
+ }>]>>, never, never>;
110
+ readonly transport: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["http", "websocket"]>>>, Schema.optionalKey<Schema.Literals<readonly ["http", "websocket"]>>, never, never>;
111
+ }>, readonly [Schema.$Record<Schema.String, Schema.Any>]>;
112
+ export type Settings = typeof Settings.Type;
99
113
  export declare const Overlays: {
100
- settings: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Any>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Any>>, never, never>;
114
+ settings: Schema.decodeTo<Schema.optional<Schema.toType<Schema.StructWithRest<Schema.Struct<{
115
+ readonly timeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>, never, never>;
116
+ readonly chunkTimeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
117
+ readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
118
+ readonly type: Schema.Literal<"summary">;
119
+ }>, Schema.Struct<{
120
+ readonly type: Schema.Literal<"native">;
121
+ }>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
122
+ readonly type: Schema.Literal<"summary">;
123
+ }>, Schema.Struct<{
124
+ readonly type: Schema.Literal<"native">;
125
+ }>]>>, never, never>;
126
+ readonly transport: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["http", "websocket"]>>>, Schema.optionalKey<Schema.Literals<readonly ["http", "websocket"]>>, never, never>;
127
+ }>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>>, Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
128
+ readonly timeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>, never, never>;
129
+ readonly chunkTimeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
130
+ readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
131
+ readonly type: Schema.Literal<"summary">;
132
+ }>, Schema.Struct<{
133
+ readonly type: Schema.Literal<"native">;
134
+ }>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
135
+ readonly type: Schema.Literal<"summary">;
136
+ }>, Schema.Struct<{
137
+ readonly type: Schema.Literal<"native">;
138
+ }>]>>, never, never>;
139
+ readonly transport: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["http", "websocket"]>>>, Schema.optionalKey<Schema.Literals<readonly ["http", "websocket"]>>, never, never>;
140
+ }>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>, never, never>;
101
141
  headers: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
102
142
  body: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Any>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Any>>, never, never>;
103
143
  };
104
- export declare const Settings: Schema.$Record<Schema.String, Schema.Any>;
105
- export type Settings = typeof Settings.Type;
106
144
  export interface Request extends Schema.Schema.Type<typeof Request> {
107
145
  }
108
146
  export declare const Request: Schema.Struct<{
109
- readonly settings: Schema.withConstructorDefault<Schema.$Record<Schema.String, Schema.Any>>;
147
+ readonly settings: Schema.withConstructorDefault<Schema.StructWithRest<Schema.Struct<{
148
+ readonly timeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>, never, never>;
149
+ readonly chunkTimeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
150
+ readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
151
+ readonly type: Schema.Literal<"summary">;
152
+ }>, Schema.Struct<{
153
+ readonly type: Schema.Literal<"native">;
154
+ }>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
155
+ readonly type: Schema.Literal<"summary">;
156
+ }>, Schema.Struct<{
157
+ readonly type: Schema.Literal<"native">;
158
+ }>]>>, never, never>;
159
+ readonly transport: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["http", "websocket"]>>>, Schema.optionalKey<Schema.Literals<readonly ["http", "websocket"]>>, never, never>;
160
+ }>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>;
110
161
  readonly headers: Schema.$Record<Schema.String, Schema.String>;
111
162
  readonly body: Schema.$Record<Schema.String, Schema.Any>;
112
163
  }>;
113
164
  export interface Info extends Schema.Schema.Type<typeof Info> {
114
165
  }
115
166
  export declare const Info: Schema.Struct<{
116
- readonly settings: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Any>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Any>>, never, never>;
167
+ readonly settings: Schema.decodeTo<Schema.optional<Schema.toType<Schema.StructWithRest<Schema.Struct<{
168
+ readonly timeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>, never, never>;
169
+ readonly chunkTimeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
170
+ readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
171
+ readonly type: Schema.Literal<"summary">;
172
+ }>, Schema.Struct<{
173
+ readonly type: Schema.Literal<"native">;
174
+ }>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
175
+ readonly type: Schema.Literal<"summary">;
176
+ }>, Schema.Struct<{
177
+ readonly type: Schema.Literal<"native">;
178
+ }>]>>, never, never>;
179
+ readonly transport: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["http", "websocket"]>>>, Schema.optionalKey<Schema.Literals<readonly ["http", "websocket"]>>, never, never>;
180
+ }>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>>, Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
181
+ readonly timeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Literal<false>]>>, never, never>;
182
+ readonly chunkTimeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Finite>>, Schema.optionalKey<Schema.Finite>, never, never>;
183
+ readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
184
+ readonly type: Schema.Literal<"summary">;
185
+ }>, Schema.Struct<{
186
+ readonly type: Schema.Literal<"native">;
187
+ }>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
188
+ readonly type: Schema.Literal<"summary">;
189
+ }>, Schema.Struct<{
190
+ readonly type: Schema.Literal<"native">;
191
+ }>]>>, never, never>;
192
+ readonly transport: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["http", "websocket"]>>>, Schema.optionalKey<Schema.Literals<readonly ["http", "websocket"]>>, never, never>;
193
+ }>, readonly [Schema.$Record<Schema.String, Schema.Any>]>>, never, never>;
117
194
  readonly headers: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
118
195
  readonly body: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Any>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Any>>, never, never>;
119
196
  readonly id: Schema.brand<Schema.String, "Provider.ID"> & {
@@ -158,19 +235,6 @@ export declare const Info: Schema.Struct<{
158
235
  readonly name: Schema.String;
159
236
  readonly activation: Schema.Literals<readonly ["auto", "enabled", "disabled"]>;
160
237
  readonly package: Schema.String;
161
- readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
162
- readonly mode: Schema.Literal<"local">;
163
- }>, Schema.Struct<{
164
- readonly mode: Schema.Literal<"provider">;
165
- readonly threshold: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
166
- }>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
167
- readonly mode: Schema.Literal<"local">;
168
- }>, Schema.Struct<{
169
- readonly mode: Schema.Literal<"provider">;
170
- readonly threshold: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
171
- }>]>>, 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>;
174
238
  }> & {
175
239
  empty: (id: ID) => Info;
176
240
  };
package/dist/provider.js CHANGED
@@ -1,7 +1,7 @@
1
1
  export * as Provider from "./provider.js";
2
2
  import { Effect, Schema } from "effect";
3
3
  import { Integration } from "./integration.js";
4
- import { optional, PositiveInt, statics } from "./schema.js";
4
+ import { optional, statics } from "./schema.js";
5
5
  import { ephemeral, inventory } from "./event.js";
6
6
  export const ID = Schema.String.pipe(Schema.brand("Provider.ID"), statics((schema) => ({
7
7
  opencode: schema.make("opencode"),
@@ -21,17 +21,24 @@ export const Event = { Updated, Definitions: inventory(Updated) };
21
21
  export const Package = Schema.String;
22
22
  export const Activation = Schema.Literals(["auto", "enabled", "disabled"]);
23
23
  export const Compaction = Schema.Union([
24
- Schema.Struct({ mode: Schema.Literal("local") }),
25
- Schema.Struct({ mode: Schema.Literal("provider"), threshold: PositiveInt.pipe(optional) }),
26
- ]).annotate({ identifier: "Provider.Compaction" });
24
+ Schema.Struct({ type: Schema.Literal("summary") }),
25
+ Schema.Struct({ type: Schema.Literal("native") }),
26
+ ])
27
+ .pipe(Schema.toTaggedUnion("type"))
28
+ .annotate({ identifier: "Provider.Compaction" });
27
29
  /** "websocket" on a route without a WebSocket channel warns and falls back to HTTP. */
28
30
  export const Transport = Schema.Literals(["http", "websocket"]).annotate({ identifier: "Provider.Transport" });
31
+ export const Settings = Schema.StructWithRest(Schema.Struct({
32
+ timeout: Schema.Union([Schema.Finite, Schema.Literal(false)]).pipe(optional),
33
+ chunkTimeout: Schema.Finite.pipe(optional),
34
+ compaction: Compaction.pipe(optional),
35
+ transport: Transport.pipe(optional),
36
+ }), [Schema.Record(Schema.String, Schema.Any)]).annotate({ identifier: "Provider.Settings" });
29
37
  export const Overlays = {
30
- settings: Schema.Record(Schema.String, Schema.Any).pipe(optional),
38
+ settings: Settings.pipe(optional),
31
39
  headers: Schema.Record(Schema.String, Schema.String).pipe(optional),
32
40
  body: Schema.Record(Schema.String, Schema.Any).pipe(optional),
33
41
  };
34
- export const Settings = Schema.Record(Schema.String, Schema.Any).annotate({ identifier: "Provider.Settings" });
35
42
  export const Request = Schema.Struct({
36
43
  settings: Settings.pipe(Schema.withConstructorDefault(Effect.succeed({}))),
37
44
  headers: Schema.Record(Schema.String, Schema.String),
@@ -44,9 +51,6 @@ export const Info = Schema.Struct({
44
51
  name: Schema.String,
45
52
  activation: Activation,
46
53
  package: Package,
47
- compaction: Compaction.pipe(optional),
48
- /** Session transport for this provider's models; omitted means HTTP. */
49
- transport: Transport.pipe(optional),
50
54
  ...Overlays,
51
55
  })
52
56
  .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-19787",
4
+ "version": "0.0.0-dev-19790",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {