@opencode-ai/schema 0.0.0-beta-18721 → 0.0.0-beta-18866

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.
@@ -116,6 +116,31 @@ declare const Info_base: Schema.Class<Info, Schema.Struct<{
116
116
  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
117
  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
118
  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>;
119
+ readonly canonical: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Provider.ID"> & {
120
+ opencode: string & import("effect/Brand").Brand<"Provider.ID">;
121
+ anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
122
+ openai: string & import("effect/Brand").Brand<"Provider.ID">;
123
+ google: string & import("effect/Brand").Brand<"Provider.ID">;
124
+ googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
125
+ githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
126
+ amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
127
+ azure: string & import("effect/Brand").Brand<"Provider.ID">;
128
+ openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
129
+ mistral: string & import("effect/Brand").Brand<"Provider.ID">;
130
+ gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
131
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Provider.ID"> & {
132
+ opencode: string & import("effect/Brand").Brand<"Provider.ID">;
133
+ anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
134
+ openai: string & import("effect/Brand").Brand<"Provider.ID">;
135
+ google: string & import("effect/Brand").Brand<"Provider.ID">;
136
+ googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
137
+ githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
138
+ amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
139
+ azure: string & import("effect/Brand").Brand<"Provider.ID">;
140
+ openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
141
+ mistral: string & import("effect/Brand").Brand<"Provider.ID">;
142
+ gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
143
+ }>, never, never>;
119
144
  readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
120
145
  readonly env: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.String>>>, Schema.optionalKey<Schema.$Array<Schema.String>>, never, never>;
121
146
  readonly package: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
@@ -2,6 +2,7 @@ export * as ConfigProvider from "./provider.js";
2
2
  import { Schema } from "effect";
3
3
  import { Money } from "../money.js";
4
4
  import { Capabilities, Compatibility, Family, ID, VariantID } from "../model.js";
5
+ import { Provider } from "../provider.js";
5
6
  import { optional } from "../schema.js";
6
7
  const JsonRecord = Schema.Record(Schema.String, Schema.Json);
7
8
  export const Overlays = {
@@ -53,6 +54,7 @@ class Model extends Schema.Class("Config.Model")({
53
54
  }) {
54
55
  }
55
56
  export class Info extends Schema.Class("Config.Provider")({
57
+ canonical: Provider.ID.pipe(optional),
56
58
  name: Schema.String.pipe(optional),
57
59
  env: Schema.String.pipe(Schema.Array, optional),
58
60
  package: Schema.String.pipe(optional),
package/dist/model.d.ts CHANGED
@@ -165,6 +165,31 @@ export declare const Info: Schema.Struct<{
165
165
  mistral: string & import("effect/Brand").Brand<"Provider.ID">;
166
166
  gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
167
167
  };
168
+ readonly canonical: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Provider.ID"> & {
169
+ opencode: string & import("effect/Brand").Brand<"Provider.ID">;
170
+ anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
171
+ openai: string & import("effect/Brand").Brand<"Provider.ID">;
172
+ google: string & import("effect/Brand").Brand<"Provider.ID">;
173
+ googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
174
+ githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
175
+ amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
176
+ azure: string & import("effect/Brand").Brand<"Provider.ID">;
177
+ openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
178
+ mistral: string & import("effect/Brand").Brand<"Provider.ID">;
179
+ gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
180
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Provider.ID"> & {
181
+ opencode: string & import("effect/Brand").Brand<"Provider.ID">;
182
+ anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
183
+ openai: string & import("effect/Brand").Brand<"Provider.ID">;
184
+ google: string & import("effect/Brand").Brand<"Provider.ID">;
185
+ googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
186
+ githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
187
+ amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
188
+ azure: string & import("effect/Brand").Brand<"Provider.ID">;
189
+ openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
190
+ mistral: string & import("effect/Brand").Brand<"Provider.ID">;
191
+ gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
192
+ }>, never, never>;
168
193
  readonly family: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Model.Family">>>, Schema.optionalKey<Schema.brand<Schema.String, "Model.Family">>, never, never>;
169
194
  readonly name: Schema.String;
170
195
  readonly compatibility: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
package/dist/model.js CHANGED
@@ -75,6 +75,7 @@ export const Info = Schema.Struct({
75
75
  id: ID,
76
76
  modelID: ID,
77
77
  providerID: Provider.ID,
78
+ canonical: Provider.ID.pipe(optional),
78
79
  family: Family.pipe(optional),
79
80
  name: Schema.String,
80
81
  compatibility: Compatibility.pipe(optional),
package/dist/plugin.d.ts CHANGED
@@ -6,7 +6,10 @@ export declare const Source: Schema.Union<readonly [Schema.Struct<{
6
6
  readonly type: Schema.Literal<"builtin">;
7
7
  }>, Schema.Struct<{
8
8
  readonly type: Schema.Literal<"package">;
9
- readonly package: Schema.String;
9
+ readonly target: Schema.String;
10
+ readonly version: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
11
+ readonly outdated: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literal<true>>>, Schema.optionalKey<Schema.Literal<true>>, never, never>;
12
+ readonly updating: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literal<true>>>, Schema.optionalKey<Schema.Literal<true>>, never, never>;
10
13
  }>, Schema.Struct<{
11
14
  readonly type: Schema.Literal<"local">;
12
15
  readonly path: Schema.String;
@@ -25,6 +28,7 @@ export declare const State: Schema.Union<readonly [Schema.Struct<{
25
28
  }>, Schema.Struct<{
26
29
  readonly status: Schema.Literal<"failed">;
27
30
  readonly error: Schema.String;
31
+ readonly ref: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
28
32
  }>]>;
29
33
  export type State = typeof State.Type;
30
34
  export interface Info extends Schema.Schema.Type<typeof Info> {
@@ -35,7 +39,10 @@ export declare const Info: Schema.Struct<{
35
39
  readonly type: Schema.Literal<"builtin">;
36
40
  }>, Schema.Struct<{
37
41
  readonly type: Schema.Literal<"package">;
38
- readonly package: Schema.String;
42
+ readonly target: Schema.String;
43
+ readonly version: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
44
+ readonly outdated: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literal<true>>>, Schema.optionalKey<Schema.Literal<true>>, never, never>;
45
+ readonly updating: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literal<true>>>, Schema.optionalKey<Schema.Literal<true>>, never, never>;
39
46
  }>, Schema.Struct<{
40
47
  readonly type: Schema.Literal<"local">;
41
48
  readonly path: Schema.String;
@@ -52,6 +59,7 @@ export declare const Info: Schema.Struct<{
52
59
  }>, Schema.Struct<{
53
60
  readonly status: Schema.Literal<"failed">;
54
61
  readonly error: Schema.String;
62
+ readonly ref: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
55
63
  }>]>;
56
64
  }>;
57
65
  export declare const Event: {
package/dist/plugin.js CHANGED
@@ -5,7 +5,13 @@ import { optional } from "./schema.js";
5
5
  export const ID = Schema.String.pipe(Schema.brand("Plugin.ID"));
6
6
  export const Source = Schema.Union([
7
7
  Schema.Struct({ type: Schema.Literal("builtin") }),
8
- Schema.Struct({ type: Schema.Literal("package"), package: Schema.String }),
8
+ Schema.Struct({
9
+ type: Schema.Literal("package"),
10
+ target: Schema.String,
11
+ version: Schema.String.pipe(optional),
12
+ outdated: Schema.Literal(true).pipe(optional),
13
+ updating: Schema.Literal(true).pipe(optional),
14
+ }),
9
15
  Schema.Struct({ type: Schema.Literal("local"), path: Schema.String }),
10
16
  Schema.Struct({ type: Schema.Literal("sdk") }),
11
17
  ]).annotate({ identifier: "Plugin.Source" });
@@ -16,7 +22,7 @@ export const Features = Schema.Struct({
16
22
  }).annotate({ identifier: "Plugin.Features" });
17
23
  export const State = Schema.Union([
18
24
  Schema.Struct({ status: Schema.Literal("active") }),
19
- Schema.Struct({ status: Schema.Literal("failed"), error: Schema.String }),
25
+ Schema.Struct({ status: Schema.Literal("failed"), error: Schema.String, ref: Schema.String.pipe(optional) }),
20
26
  ]).annotate({ identifier: "Plugin.State" });
21
27
  export const Info = Schema.Struct({
22
28
  id: ID.pipe(optional),
@@ -51,6 +51,31 @@ export declare const Info: Schema.Struct<{
51
51
  mistral: string & import("effect/Brand").Brand<"Provider.ID">;
52
52
  gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
53
53
  };
54
+ readonly canonical: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Provider.ID"> & {
55
+ opencode: string & import("effect/Brand").Brand<"Provider.ID">;
56
+ anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
57
+ openai: string & import("effect/Brand").Brand<"Provider.ID">;
58
+ google: string & import("effect/Brand").Brand<"Provider.ID">;
59
+ googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
60
+ githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
61
+ amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
62
+ azure: string & import("effect/Brand").Brand<"Provider.ID">;
63
+ openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
64
+ mistral: string & import("effect/Brand").Brand<"Provider.ID">;
65
+ gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
66
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Provider.ID"> & {
67
+ opencode: string & import("effect/Brand").Brand<"Provider.ID">;
68
+ anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
69
+ openai: string & import("effect/Brand").Brand<"Provider.ID">;
70
+ google: string & import("effect/Brand").Brand<"Provider.ID">;
71
+ googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
72
+ githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
73
+ amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
74
+ azure: string & import("effect/Brand").Brand<"Provider.ID">;
75
+ openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
76
+ mistral: string & import("effect/Brand").Brand<"Provider.ID">;
77
+ gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
78
+ }>, never, never>;
54
79
  readonly integrationID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Integration.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Integration.ID">>, never, never>;
55
80
  readonly name: Schema.String;
56
81
  readonly activation: Schema.Literals<readonly ["auto", "enabled", "disabled"]>;
package/dist/provider.js CHANGED
@@ -30,6 +30,7 @@ export const Request = Schema.Struct({
30
30
  }).annotate({ identifier: "Provider.Request" });
31
31
  export const Info = Schema.Struct({
32
32
  id: ID,
33
+ canonical: ID.pipe(optional),
33
34
  integrationID: Integration.ID.pipe(optional),
34
35
  name: Schema.String,
35
36
  activation: Activation,
@@ -11,3 +11,4 @@ export declare const Info: Schema.Struct<{
11
11
  readonly write: Schema.Finite;
12
12
  }>;
13
13
  }>;
14
+ export declare function total(tokens: Info): number;
@@ -9,3 +9,6 @@ export const Info = Schema.Struct({
9
9
  write: Schema.Finite,
10
10
  }),
11
11
  }).annotate({ identifier: "TokenUsage.Info" });
12
+ export function total(tokens) {
13
+ return tokens.input + tokens.output + tokens.reasoning + tokens.cache.read + tokens.cache.write;
14
+ }
package/dist/tool.d.ts CHANGED
@@ -14,6 +14,10 @@ export interface Context {
14
14
  readonly id: CallID;
15
15
  readonly progress: (update: Metadata) => Effect.Effect<void>;
16
16
  }
17
+ export interface Namespace {
18
+ readonly name: string;
19
+ readonly description: string;
20
+ }
17
21
  interface BaseOptions {
18
22
  readonly namespace?: string;
19
23
  readonly permission?: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode-ai/schema",
4
- "version": "0.0.0-beta-18721",
4
+ "version": "0.0.0-beta-18866",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {