@opencode/schema 0.0.0-dev-19587 → 0.0.0-dev-19588

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.
@@ -10,6 +10,8 @@ export type OAuth = Mcp.OAuthConfig;
10
10
  export declare const Remote: typeof Mcp.RemoteConfig;
11
11
  export type Remote = Mcp.RemoteConfig;
12
12
  export declare const Server: Schema.toTaggedUnion<"type", readonly [typeof Mcp.LocalConfig, typeof Mcp.RemoteConfig]>;
13
+ export declare const Protocol: Schema.Literals<readonly ["legacy", "auto", "2026-07-28"]>;
14
+ export type Protocol = Mcp.Protocol;
13
15
  declare const Info_base: Schema.Class<Info, Schema.Struct<{
14
16
  readonly timeout: Schema.decodeTo<Schema.optional<Schema.toType<typeof Mcp.TimeoutConfig>>, Schema.optionalKey<typeof Mcp.TimeoutConfig>, never, never>;
15
17
  readonly servers: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.toTaggedUnion<"type", readonly [typeof Mcp.LocalConfig, typeof Mcp.RemoteConfig]>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.toTaggedUnion<"type", readonly [typeof Mcp.LocalConfig, typeof Mcp.RemoteConfig]>>>, never, never>;
@@ -7,6 +7,7 @@ export const Local = Mcp.LocalConfig;
7
7
  export const OAuth = Mcp.OAuthConfig;
8
8
  export const Remote = Mcp.RemoteConfig;
9
9
  export const Server = Mcp.ServerConfig;
10
+ export const Protocol = Mcp.Protocol;
10
11
  export class Info extends Schema.Class("Config.MCP")({
11
12
  timeout: Timeout.pipe(optional),
12
13
  servers: Schema.Record(Schema.String, Server).pipe(optional),
package/dist/mcp.d.ts CHANGED
@@ -7,6 +7,8 @@ declare const TimeoutConfig_base: Schema.Class<TimeoutConfig, Schema.Struct<{
7
7
  }>, {}>;
8
8
  export declare class TimeoutConfig extends TimeoutConfig_base {
9
9
  }
10
+ export type Protocol = typeof Protocol.Type;
11
+ export declare const Protocol: Schema.Literals<readonly ["legacy", "auto", "2026-07-28"]>;
10
12
  declare const LocalConfig_base: Schema.Class<LocalConfig, Schema.Struct<{
11
13
  readonly type: Schema.Literal<"local">;
12
14
  readonly command: Schema.$Array<Schema.String>;
@@ -15,6 +17,7 @@ declare const LocalConfig_base: Schema.Class<LocalConfig, Schema.Struct<{
15
17
  readonly disabled: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
16
18
  readonly codemode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
17
19
  readonly timeout: Schema.decodeTo<Schema.optional<Schema.toType<typeof TimeoutConfig>>, Schema.optionalKey<typeof TimeoutConfig>, never, never>;
20
+ readonly protocol: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["legacy", "auto", "2026-07-28"]>>>, Schema.optionalKey<Schema.Literals<readonly ["legacy", "auto", "2026-07-28"]>>, never, never>;
18
21
  }>, {}>;
19
22
  export declare class LocalConfig extends LocalConfig_base {
20
23
  }
@@ -35,6 +38,7 @@ declare const RemoteConfig_base: Schema.Class<RemoteConfig, Schema.Struct<{
35
38
  readonly disabled: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
36
39
  readonly codemode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
37
40
  readonly timeout: Schema.decodeTo<Schema.optional<Schema.toType<typeof TimeoutConfig>>, Schema.optionalKey<typeof TimeoutConfig>, never, never>;
41
+ readonly protocol: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["legacy", "auto", "2026-07-28"]>>>, Schema.optionalKey<Schema.Literals<readonly ["legacy", "auto", "2026-07-28"]>>, never, never>;
38
42
  }>, {}>;
39
43
  export declare class RemoteConfig extends RemoteConfig_base {
40
44
  }
package/dist/mcp.js CHANGED
@@ -14,6 +14,10 @@ export class TimeoutConfig extends Schema.Class("Mcp.TimeoutConfig")({
14
14
  }),
15
15
  }) {
16
16
  }
17
+ export const Protocol = Schema.Literals(["legacy", "auto", "2026-07-28"]).annotate({
18
+ identifier: "Mcp.Protocol",
19
+ description: 'MCP protocol negotiation. "legacy" (default) opens with the initialize handshake and speaks protocol revisions up to 2025-11-25. "auto" probes for the 2026-07-28 revision and falls back to legacy when the server does not support it. "2026-07-28" requires that revision and fails otherwise.',
20
+ });
17
21
  export class LocalConfig extends Schema.Class("Mcp.LocalConfig")({
18
22
  type: Schema.Literal("local"),
19
23
  command: Schema.String.pipe(Schema.Array),
@@ -26,6 +30,7 @@ export class LocalConfig extends Schema.Class("Mcp.LocalConfig")({
26
30
  description: "Expose this server's tools through Code Mode. Defaults to true.",
27
31
  }),
28
32
  timeout: TimeoutConfig.pipe(optional),
33
+ protocol: Protocol.pipe(optional),
29
34
  }) {
30
35
  }
31
36
  export class OAuthConfig extends Schema.Class("Mcp.OAuthConfig")({
@@ -46,6 +51,7 @@ export class RemoteConfig extends Schema.Class("Mcp.RemoteConfig")({
46
51
  description: "Expose this server's tools through Code Mode. Defaults to true.",
47
52
  }),
48
53
  timeout: TimeoutConfig.pipe(optional),
54
+ protocol: Protocol.pipe(optional),
49
55
  }) {
50
56
  }
51
57
  export const ServerConfig = Schema.Union([LocalConfig, RemoteConfig]).pipe(Schema.toTaggedUnion("type"));
@@ -510,7 +510,7 @@ export declare const PersistedRevert: Schema.decodeTo<Schema.toType<Schema.Struc
510
510
  readonly diff?: string | undefined;
511
511
  };
512
512
  }) => any) | undefined;
513
- } & { [K in Exclude<keyof Cases, "current" | "legacy">]: never; }, OrElse extends (value: Exclude<{
513
+ } & { [K in Exclude<keyof Cases, "legacy" | "current">]: never; }, OrElse extends (value: Exclude<{
514
514
  readonly source: "current";
515
515
  readonly revert: {
516
516
  readonly messageID: string & import("effect/Brand").Brand<"Session.Message.ID">;
@@ -605,7 +605,7 @@ export declare const PersistedRevert: Schema.decodeTo<Schema.toType<Schema.Struc
605
605
  readonly diff?: string | undefined;
606
606
  };
607
607
  }) => any) | undefined;
608
- } & { [K in Exclude<keyof Cases, "current" | "legacy">]: never; }, OrElse extends (value: Exclude<{
608
+ } & { [K in Exclude<keyof Cases, "legacy" | "current">]: never; }, OrElse extends (value: Exclude<{
609
609
  readonly source: "current";
610
610
  readonly revert: {
611
611
  readonly messageID: string & import("effect/Brand").Brand<"Session.Message.ID">;
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-19587",
4
+ "version": "0.0.0-dev-19588",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {