@opencode-ai/schema 0.0.0-dev-19251 → 0.0.0-dev-19253
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/config/provider.d.ts +22 -10
- package/dist/model.d.ts +11 -5
- package/dist/provider.d.ts +18 -10
- package/dist/provider.js +5 -4
- package/package.json +1 -1
|
@@ -91,11 +91,17 @@ declare const Model_base: Schema.Class<Model, Schema.Struct<{
|
|
|
91
91
|
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>;
|
|
92
92
|
readonly headers: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
|
|
93
93
|
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>;
|
|
94
|
-
readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
95
|
-
readonly mode: Schema.
|
|
96
|
-
}
|
|
97
|
-
readonly mode: Schema.
|
|
98
|
-
|
|
94
|
+
readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
|
|
95
|
+
readonly mode: Schema.Literal<"local">;
|
|
96
|
+
}>, Schema.Struct<{
|
|
97
|
+
readonly mode: Schema.Literal<"provider">;
|
|
98
|
+
readonly threshold: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
99
|
+
}>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
100
|
+
readonly mode: Schema.Literal<"local">;
|
|
101
|
+
}>, Schema.Struct<{
|
|
102
|
+
readonly mode: Schema.Literal<"provider">;
|
|
103
|
+
readonly threshold: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
104
|
+
}>]>>, never, never>;
|
|
99
105
|
readonly modelID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.ID">>, never, never>;
|
|
100
106
|
readonly family: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.Family">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.Family">>, never, never>;
|
|
101
107
|
readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
@@ -121,11 +127,17 @@ declare const Info_base: Schema.Class<Info, Schema.Struct<{
|
|
|
121
127
|
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>;
|
|
122
128
|
readonly headers: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
|
|
123
129
|
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>;
|
|
124
|
-
readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
125
|
-
readonly mode: Schema.
|
|
126
|
-
}
|
|
127
|
-
readonly mode: Schema.
|
|
128
|
-
|
|
130
|
+
readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
|
|
131
|
+
readonly mode: Schema.Literal<"local">;
|
|
132
|
+
}>, Schema.Struct<{
|
|
133
|
+
readonly mode: Schema.Literal<"provider">;
|
|
134
|
+
readonly threshold: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
135
|
+
}>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
136
|
+
readonly mode: Schema.Literal<"local">;
|
|
137
|
+
}>, Schema.Struct<{
|
|
138
|
+
readonly mode: Schema.Literal<"provider">;
|
|
139
|
+
readonly threshold: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
140
|
+
}>]>>, never, never>;
|
|
129
141
|
readonly canonical: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Provider.ID"> & {
|
|
130
142
|
opencode: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
131
143
|
anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
|
package/dist/model.d.ts
CHANGED
|
@@ -208,11 +208,17 @@ export declare const Info: Schema.Struct<{
|
|
|
208
208
|
readonly requireAssistantAfterTool: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
209
209
|
}>>, never, never>;
|
|
210
210
|
readonly package: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
211
|
-
readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
212
|
-
readonly mode: Schema.
|
|
213
|
-
}
|
|
214
|
-
readonly mode: Schema.
|
|
215
|
-
|
|
211
|
+
readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
|
|
212
|
+
readonly mode: Schema.Literal<"local">;
|
|
213
|
+
}>, Schema.Struct<{
|
|
214
|
+
readonly mode: Schema.Literal<"provider">;
|
|
215
|
+
readonly threshold: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
216
|
+
}>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
217
|
+
readonly mode: Schema.Literal<"local">;
|
|
218
|
+
}>, Schema.Struct<{
|
|
219
|
+
readonly mode: Schema.Literal<"provider">;
|
|
220
|
+
readonly threshold: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
221
|
+
}>]>>, never, never>;
|
|
216
222
|
}> & {
|
|
217
223
|
default: (providerID: Provider.ID, id: ID) => {
|
|
218
224
|
id: string & import("effect/Brand").Brand<"Model.ID">;
|
package/dist/provider.d.ts
CHANGED
|
@@ -18,11 +18,13 @@ export declare const Package: Schema.String;
|
|
|
18
18
|
export type Package = typeof Package.Type;
|
|
19
19
|
export declare const Activation: Schema.Literals<readonly ["auto", "enabled", "disabled"]>;
|
|
20
20
|
export type Activation = typeof Activation.Type;
|
|
21
|
-
export
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
export type Compaction = typeof Compaction.Type;
|
|
22
|
+
export declare const Compaction: Schema.Union<readonly [Schema.Struct<{
|
|
23
|
+
readonly mode: Schema.Literal<"local">;
|
|
24
|
+
}>, Schema.Struct<{
|
|
25
|
+
readonly mode: Schema.Literal<"provider">;
|
|
26
|
+
readonly threshold: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
27
|
+
}>]>;
|
|
26
28
|
export declare const Overlays: {
|
|
27
29
|
settings: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Any>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Any>>, never, never>;
|
|
28
30
|
headers: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
|
|
@@ -85,11 +87,17 @@ export declare const Info: Schema.Struct<{
|
|
|
85
87
|
readonly name: Schema.String;
|
|
86
88
|
readonly activation: Schema.Literals<readonly ["auto", "enabled", "disabled"]>;
|
|
87
89
|
readonly package: Schema.String;
|
|
88
|
-
readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
89
|
-
readonly mode: Schema.
|
|
90
|
-
}
|
|
91
|
-
readonly mode: Schema.
|
|
92
|
-
|
|
90
|
+
readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
|
|
91
|
+
readonly mode: Schema.Literal<"local">;
|
|
92
|
+
}>, 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>;
|
|
95
|
+
}>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
96
|
+
readonly mode: Schema.Literal<"local">;
|
|
97
|
+
}>, Schema.Struct<{
|
|
98
|
+
readonly mode: Schema.Literal<"provider">;
|
|
99
|
+
readonly threshold: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
100
|
+
}>]>>, never, never>;
|
|
93
101
|
}> & {
|
|
94
102
|
empty: (id: ID) => Info;
|
|
95
103
|
};
|
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, statics } from "./schema.js";
|
|
4
|
+
import { optional, PositiveInt, statics } from "./schema.js";
|
|
5
5
|
export const ID = Schema.String.pipe(Schema.brand("Provider.ID"), statics((schema) => ({
|
|
6
6
|
opencode: schema.make("opencode"),
|
|
7
7
|
anthropic: schema.make("anthropic"),
|
|
@@ -17,9 +17,10 @@ export const ID = Schema.String.pipe(Schema.brand("Provider.ID"), statics((schem
|
|
|
17
17
|
})));
|
|
18
18
|
export const Package = Schema.String;
|
|
19
19
|
export const Activation = Schema.Literals(["auto", "enabled", "disabled"]);
|
|
20
|
-
export const Compaction = Schema.
|
|
21
|
-
mode: Schema.
|
|
22
|
-
|
|
20
|
+
export const Compaction = Schema.Union([
|
|
21
|
+
Schema.Struct({ mode: Schema.Literal("local") }),
|
|
22
|
+
Schema.Struct({ mode: Schema.Literal("provider"), threshold: PositiveInt.pipe(optional) }),
|
|
23
|
+
]).annotate({ identifier: "Provider.Compaction" });
|
|
23
24
|
export const Overlays = {
|
|
24
25
|
settings: Schema.Record(Schema.String, Schema.Any).pipe(optional),
|
|
25
26
|
headers: Schema.Record(Schema.String, Schema.String).pipe(optional),
|