@opencode/schema 0.0.0-dev-20417 → 0.0.0-dev-20423

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.
@@ -108,26 +108,14 @@ declare class Limit extends Limit_base {
108
108
  }
109
109
  declare const Model_base: Schema.Class<Model, Schema.Struct<{
110
110
  readonly capabilities: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
111
- readonly tools: Schema.Boolean;
112
- readonly input: Schema.$Array<Schema.String>;
113
- readonly output: Schema.$Array<Schema.String>;
114
- }> & {
115
- default: () => {
116
- tools: true;
117
- input: string[];
118
- output: string[];
119
- };
120
- }>>, Schema.optionalKey<Schema.Struct<{
121
- readonly tools: Schema.Boolean;
122
- readonly input: Schema.$Array<Schema.String>;
123
- readonly output: Schema.$Array<Schema.String>;
124
- }> & {
125
- default: () => {
126
- tools: true;
127
- input: string[];
128
- output: string[];
129
- };
130
- }>, never, never>;
111
+ readonly tools: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
112
+ readonly input: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.String>>>, Schema.optionalKey<Schema.$Array<Schema.String>>, never, never>;
113
+ readonly output: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.String>>>, Schema.optionalKey<Schema.$Array<Schema.String>>, never, never>;
114
+ }>>>, Schema.optionalKey<Schema.Struct<{
115
+ readonly tools: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
116
+ readonly input: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.String>>>, Schema.optionalKey<Schema.$Array<Schema.String>>, never, never>;
117
+ readonly output: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.String>>>, Schema.optionalKey<Schema.$Array<Schema.String>>, never, never>;
118
+ }>>, never, never>;
131
119
  readonly variants: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
132
120
  readonly settings: Schema.decodeTo<Schema.optional<Schema.toType<Schema.StructWithRest<Schema.Struct<{
133
121
  readonly compaction: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{
@@ -58,7 +58,14 @@ class Model extends Schema.Class("Config.Model")({
58
58
  compatibility: Compatibility.pipe(optional),
59
59
  package: Schema.String.pipe(optional),
60
60
  ...ModelOverlays,
61
- capabilities: Capabilities.pipe(optional),
61
+ // Partial: unset fields fall back to the base model's capabilities, then the defaults.
62
+ capabilities: Capabilities.mapFields((fields) => ({
63
+ tools: optional(fields.tools),
64
+ input: optional(fields.input),
65
+ output: optional(fields.output),
66
+ }))
67
+ .annotate({ identifier: "Config.Model.Capabilities" })
68
+ .pipe(optional),
62
69
  variants: Schema.Struct({
63
70
  id: VariantID,
64
71
  ...ModelOverlays,
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-20417",
4
+ "version": "0.0.0-dev-20423",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {