@opencode/schema 0.0.0-dev-1361 → 0.0.0-dev-1363

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.
@@ -309,6 +309,7 @@ declare const ModelConfig_base: Schema.Class<ModelConfig, Schema.Struct<{
309
309
  readonly cacheFormat: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["anthropic", "alibaba"]>>>, Schema.optionalKey<Schema.Literals<readonly ["anthropic", "alibaba"]>>, never, never>;
310
310
  readonly supportsThinkingBlockBinding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
311
311
  readonly supportsEffortUpdates: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
312
+ readonly supportsSystemUpdates: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
312
313
  readonly mediaInput: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["assets", "state", "root"]>>>, Schema.optionalKey<Schema.Literals<readonly ["assets", "state", "root"]>>, never, never>;
313
314
  }>>>, Schema.optionalKey<Schema.Struct<{
314
315
  readonly reasoningField: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Codec<Model.ReasoningField, Model.ReasoningField, never, never>>>, Schema.optionalKey<Schema.Codec<Model.ReasoningField, Model.ReasoningField, never, never>>, never, never>;
@@ -321,6 +322,7 @@ declare const ModelConfig_base: Schema.Class<ModelConfig, Schema.Struct<{
321
322
  readonly cacheFormat: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["anthropic", "alibaba"]>>>, Schema.optionalKey<Schema.Literals<readonly ["anthropic", "alibaba"]>>, never, never>;
322
323
  readonly supportsThinkingBlockBinding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
323
324
  readonly supportsEffortUpdates: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
325
+ readonly supportsSystemUpdates: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
324
326
  readonly mediaInput: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["assets", "state", "root"]>>>, Schema.optionalKey<Schema.Literals<readonly ["assets", "state", "root"]>>, never, never>;
325
327
  }>>, never, never>;
326
328
  readonly package: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
@@ -31,6 +31,8 @@ export declare const Compatibility: Schema.Struct<{
31
31
  readonly supportsThinkingBlockBinding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
32
32
  /** Anthropic Messages and OpenAI Responses: supports per-message effort updates. Overrides model-ID detection. */
33
33
  readonly supportsEffortUpdates: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
34
+ /** Anthropic Messages: accepts system messages mid-conversation. Overrides model-ID detection. */
35
+ readonly supportsSystemUpdates: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
34
36
  /** System One: where the decision host reads media. Unset keeps the route default. */
35
37
  readonly mediaInput: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["assets", "state", "root"]>>>, Schema.optionalKey<Schema.Literals<readonly ["assets", "state", "root"]>>, never, never>;
36
38
  }>;
@@ -33,7 +33,9 @@ export const Compatibility = Schema.Struct({
33
33
  supportsThinkingBlockBinding: Schema.Boolean.pipe(optional),
34
34
  /** Anthropic Messages and OpenAI Responses: supports per-message effort updates. Overrides model-ID detection. */
35
35
  supportsEffortUpdates: Schema.Boolean.pipe(optional),
36
+ /** Anthropic Messages: accepts system messages mid-conversation. Overrides model-ID detection. */
37
+ supportsSystemUpdates: Schema.Boolean.pipe(optional),
36
38
  /** System One: where the decision host reads media. Unset keeps the route default. */
37
39
  mediaInput: MediaInput.pipe(optional),
38
40
  }).annotate({ identifier: "Model.Compatibility" });
39
- export const ProviderCompatibility = Schema.Struct(Struct.omit(Compatibility.fields, ["supportsThinkingBlockBinding", "supportsEffortUpdates"])).annotate({ identifier: "Provider.Compatibility" });
41
+ export const ProviderCompatibility = Schema.Struct(Struct.omit(Compatibility.fields, ["supportsThinkingBlockBinding", "supportsEffortUpdates", "supportsSystemUpdates"])).annotate({ identifier: "Provider.Compatibility" });
package/dist/model.d.ts CHANGED
@@ -415,6 +415,7 @@ export declare const Info: Schema.Struct<{
415
415
  readonly cacheFormat: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["anthropic", "alibaba"]>>>, Schema.optionalKey<Schema.Literals<readonly ["anthropic", "alibaba"]>>, never, never>;
416
416
  readonly supportsThinkingBlockBinding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
417
417
  readonly supportsEffortUpdates: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
418
+ readonly supportsSystemUpdates: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
418
419
  readonly mediaInput: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["assets", "state", "root"]>>>, Schema.optionalKey<Schema.Literals<readonly ["assets", "state", "root"]>>, never, never>;
419
420
  }>>>, Schema.optionalKey<Schema.Struct<{
420
421
  readonly reasoningField: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Codec<ReasoningField, ReasoningField, never, never>>>, Schema.optionalKey<Schema.Codec<ReasoningField, ReasoningField, never, never>>, never, never>;
@@ -427,6 +428,7 @@ export declare const Info: Schema.Struct<{
427
428
  readonly cacheFormat: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["anthropic", "alibaba"]>>>, Schema.optionalKey<Schema.Literals<readonly ["anthropic", "alibaba"]>>, never, never>;
428
429
  readonly supportsThinkingBlockBinding: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
429
430
  readonly supportsEffortUpdates: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
431
+ readonly supportsSystemUpdates: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
430
432
  readonly mediaInput: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["assets", "state", "root"]>>>, Schema.optionalKey<Schema.Literals<readonly ["assets", "state", "root"]>>, never, never>;
431
433
  }>>, never, never>;
432
434
  readonly package: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
package/dist/space.d.ts CHANGED
@@ -7,7 +7,7 @@ export type Key = typeof Key.Type;
7
7
  /** An opaque string the server stores and sends back unchanged; its format, such as JSON text, is up to the client. */
8
8
  export declare const Value: Schema.String;
9
9
  export type Value = typeof Value.Type;
10
- /** A value always goes out as one event, so a write is capped at 1 MiB of UTF-8. */
10
+ /** A value always goes out as one event, so a write's values are capped at 1 MiB of UTF-8 in total. */
11
11
  export declare const MaxValueBytes: number;
12
12
  export interface Entry extends Schema.Schema.Type<typeof Entry> {
13
13
  }
@@ -15,6 +15,18 @@ export declare const Entry: Schema.Struct<{
15
15
  readonly key: Schema.String;
16
16
  readonly value: Schema.String;
17
17
  }>;
18
+ /** One change of a write: a value sets the space's key, `null` deletes it. */
19
+ export interface Change extends Schema.Schema.Type<typeof Change> {
20
+ }
21
+ export declare const Change: Schema.Struct<{
22
+ readonly space: Schema.String;
23
+ readonly key: Schema.String;
24
+ readonly value: Schema.NullOr<Schema.String>;
25
+ }>;
26
+ /** Changes one write commits at most, across all its spaces. */
27
+ export declare const MaxChanges = 1024;
28
+ /** Spaces one sync, subscribe or unsubscribe names at most. */
29
+ export declare const MaxSpaces = 100;
18
30
  /** Server-issued, per space: every write in a space gets the next revision, and revisions are never reused. */
19
31
  export declare const Revision: Schema.Int;
20
32
  export type Revision = typeof Revision.Type;
@@ -22,7 +34,10 @@ export type Revision = typeof Revision.Type;
22
34
  export declare const Epoch: Schema.String;
23
35
  /** An opaque position in a space, issued by the server. Clients save a page's `cursor` and pass back `next` as is. */
24
36
  export declare const Cursor: Schema.String;
25
- /** A sync page that replaces everything the client held for the space. */
37
+ /**
38
+ * A page of a snapshot, which replaces everything the client held for the space: its entries apply at once, and keys
39
+ * none of the snapshot's pages held are removed after its last one.
40
+ */
26
41
  export interface Snapshot extends Schema.Schema.Type<typeof Snapshot> {
27
42
  }
28
43
  export declare const Snapshot: Schema.Struct<{
package/dist/space.js CHANGED
@@ -11,9 +11,16 @@ export const Key = Schema.String.check(Schema.isMinLength(1), Schema.isMaxLength
11
11
  });
12
12
  /** An opaque string the server stores and sends back unchanged; its format, such as JSON text, is up to the client. */
13
13
  export const Value = Schema.String.annotate({ identifier: "Space.Value" });
14
- /** A value always goes out as one event, so a write is capped at 1 MiB of UTF-8. */
14
+ /** A value always goes out as one event, so a write's values are capped at 1 MiB of UTF-8 in total. */
15
15
  export const MaxValueBytes = 1024 * 1024;
16
16
  export const Entry = Schema.Struct({ key: Key, value: Value }).annotate({ identifier: "Space.Entry" });
17
+ export const Change = Schema.Struct({ space: Name, key: Key, value: Schema.NullOr(Value) }).annotate({
18
+ identifier: "Space.Change",
19
+ });
20
+ /** Changes one write commits at most, across all its spaces. */
21
+ export const MaxChanges = 1024;
22
+ /** Spaces one sync, subscribe or unsubscribe names at most. */
23
+ export const MaxSpaces = 100;
17
24
  /** Server-issued, per space: every write in a space gets the next revision, and revisions are never reused. */
18
25
  export const Revision = NonNegativeInt.annotate({ identifier: "Space.Revision" });
19
26
  /** Identifies the database that issued a space's revisions; a revision is only usable with the same epoch. */
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-1361",
4
+ "version": "0.0.0-dev-1363",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {