@opencode-ai/schema 0.0.0-beta-18155 → 0.0.0-beta-18230

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.
@@ -4,6 +4,7 @@ import { Agent } from "./agent.js";
4
4
  import { Catalog } from "./catalog.js";
5
5
  import { Command } from "./command.js";
6
6
  import { Config } from "./config.js";
7
+ import { Credential } from "./credential.js";
7
8
  import { Durable } from "./durable-event-manifest.js";
8
9
  import { Event } from "./event.js";
9
10
  import { FileSystem } from "./filesystem.js";
@@ -16,6 +17,7 @@ import { LspEvent } from "./lsp-event.js";
16
17
  import { McpEvent } from "./mcp-event.js";
17
18
  import { ModelsDev } from "./models-dev.js";
18
19
  import { Permission } from "./permission.js";
20
+ import { PersistentPty } from "./persistent-pty.js";
19
21
  import { Plugin } from "./plugin.js";
20
22
  import { Project } from "./project.js";
21
23
  import { Worktree } from "./worktree.js";
@@ -33,13 +35,13 @@ import { WorkspaceEvent } from "./workspace-event.js";
33
35
  import { WorktreeEvent } from "./worktree-event.js";
34
36
  import { WebSearch } from "./websearch.js";
35
37
  const coreDefinitions = Event.inventory(...SessionEvent.Definitions);
36
- const foundationDefinitions = Event.inventory(...ModelsDev.Event.Definitions, ...Integration.Event.Definitions, ...Catalog.Event.Definitions, ...Agent.Event.Definitions, ...coreDefinitions);
37
- const featureDefinitions = Event.inventory(...FileSystem.Event.Definitions, ...Reference.Event.Definitions, ...Permission.Event.Definitions, ...Plugin.Event.Definitions, ...Worktree.Event.Definitions, ...Command.Event.Definitions, ...Config.Event.Definitions, ...Skill.Event.Definitions, ...Pty.Event.Definitions, ...Shell.Event.Definitions, ...Form.Event.Definitions, ...WebSearch.Event.Definitions);
38
+ const foundationDefinitions = Event.inventory(...ModelsDev.Event.Definitions, ...Credential.Event.Definitions, ...Integration.Event.Definitions, ...Catalog.Event.Definitions, ...Agent.Event.Definitions, ...coreDefinitions);
39
+ const featureDefinitions = Event.inventory(...FileSystem.Event.Definitions, ...Reference.Event.Definitions, ...Permission.Event.Definitions, ...Plugin.Event.Definitions, ...Project.Event.Definitions, ...Worktree.Event.Definitions, ...Command.Event.Definitions, ...Config.Event.Definitions, ...Skill.Event.Definitions, ...Pty.Event.Definitions, ...PersistentPty.Event.Definitions, ...Shell.Event.Definitions, ...Form.Event.Definitions, ...WebSearch.Event.Definitions);
38
40
  export const ServerDefinitions = Event.inventory(...foundationDefinitions, ...featureDefinitions,
39
41
  // Current events the TUI consumes from the public stream.
40
42
  ...SessionStatusEvent.Definitions, ...TuiEvent.Definitions, ...InstallationEvent.Definitions, ...VcsEvent.Definitions, McpEvent.StatusChanged, McpEvent.ResourcesChanged);
41
43
  export const Server = Event.latest(ServerDefinitions);
42
44
  export const isServer = (event) => Server.has(event.type);
43
- export const Definitions = Event.inventory(...foundationDefinitions, ...InstallationEvent.Definitions, ...featureDefinitions, ...LspEvent.Definitions, ...TuiEvent.Definitions, ...McpEvent.Definitions, ...LegacyEventV1.Definitions, ...FileSystemV1.Event.Definitions, ...Project.Event.Definitions, ...SessionStatusEvent.Definitions, ...SessionCompactionEvent.Definitions, ...VcsEvent.Definitions, ...WorkspaceEvent.Definitions, ...WorktreeEvent.Definitions, ...ServerEvent.Definitions);
45
+ export const Definitions = Event.inventory(...foundationDefinitions, ...InstallationEvent.Definitions, ...featureDefinitions, ...LspEvent.Definitions, ...TuiEvent.Definitions, ...McpEvent.Definitions, ...LegacyEventV1.Definitions, ...FileSystemV1.Event.Definitions, ...SessionStatusEvent.Definitions, ...SessionCompactionEvent.Definitions, ...VcsEvent.Definitions, ...WorkspaceEvent.Definitions, ...WorktreeEvent.Definitions, ...ServerEvent.Definitions);
44
46
  export const Latest = Event.latest(Definitions);
45
47
  export { Durable };
package/dist/index.d.ts CHANGED
@@ -31,6 +31,7 @@ export { Shell } from "./shell.js";
31
31
  export { Skill } from "./skill.js";
32
32
  export { TokenUsage } from "./token-usage.js";
33
33
  export { Pty } from "./pty.js";
34
+ export { PersistentPty } from "./persistent-pty.js";
34
35
  export { PtyTicket } from "./pty-ticket.js";
35
36
  export { Question } from "./question.js";
36
37
  export { Workspace } from "./workspace.js";
package/dist/index.js CHANGED
@@ -31,6 +31,7 @@ export { Shell } from "./shell.js";
31
31
  export { Skill } from "./skill.js";
32
32
  export { TokenUsage } from "./token-usage.js";
33
33
  export { Pty } from "./pty.js";
34
+ export { PersistentPty } from "./persistent-pty.js";
34
35
  export { PtyTicket } from "./pty-ticket.js";
35
36
  export { Question } from "./question.js";
36
37
  export { Workspace } from "./workspace.js";
@@ -990,43 +990,6 @@ export declare const Event: {
990
990
  durable: undefined;
991
991
  data: Schema.Struct<{}>;
992
992
  };
993
- ConnectionUpdated: Schema.Struct<{
994
- readonly id: Schema.brand<Schema.String, "Event.ID"> & {
995
- create: () => string & import("effect/Brand").Brand<"Event.ID">;
996
- };
997
- readonly created: Schema.Finite;
998
- readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
999
- readonly type: Schema.Literal<"integration.connection.updated">;
1000
- readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1001
- readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
1002
- readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
1003
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
1004
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
1005
- }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
1006
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
1007
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
1008
- }>, never, never>;
1009
- }>>>, Schema.optionalKey<Schema.Struct<{
1010
- readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
1011
- readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
1012
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
1013
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
1014
- }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
1015
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
1016
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
1017
- }>, never, never>;
1018
- }>>, never, never>;
1019
- readonly data: Schema.Struct<{
1020
- readonly integrationID: Schema.brand<Schema.String, "Integration.ID">;
1021
- }>;
1022
- }> & {
1023
- type: "integration.connection.updated";
1024
- durability: "ephemeral";
1025
- durable: undefined;
1026
- data: Schema.Struct<{
1027
- readonly integrationID: Schema.brand<Schema.String, "Integration.ID">;
1028
- }>;
1029
- };
1030
993
  Definitions: readonly [Schema.Struct<{
1031
994
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
1032
995
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
@@ -1059,42 +1022,6 @@ export declare const Event: {
1059
1022
  durability: "ephemeral";
1060
1023
  durable: undefined;
1061
1024
  data: Schema.Struct<{}>;
1062
- }, Schema.Struct<{
1063
- readonly id: Schema.brand<Schema.String, "Event.ID"> & {
1064
- create: () => string & import("effect/Brand").Brand<"Event.ID">;
1065
- };
1066
- readonly created: Schema.Finite;
1067
- readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1068
- readonly type: Schema.Literal<"integration.connection.updated">;
1069
- readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1070
- readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
1071
- readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
1072
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
1073
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
1074
- }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
1075
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
1076
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
1077
- }>, never, never>;
1078
- }>>>, Schema.optionalKey<Schema.Struct<{
1079
- readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
1080
- readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
1081
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
1082
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
1083
- }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
1084
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
1085
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
1086
- }>, never, never>;
1087
- }>>, never, never>;
1088
- readonly data: Schema.Struct<{
1089
- readonly integrationID: Schema.brand<Schema.String, "Integration.ID">;
1090
- }>;
1091
- }> & {
1092
- type: "integration.connection.updated";
1093
- durability: "ephemeral";
1094
- durable: undefined;
1095
- data: Schema.Struct<{
1096
- readonly integrationID: Schema.brand<Schema.String, "Integration.ID">;
1097
- }>;
1098
1025
  }];
1099
1026
  };
1100
1027
  export interface Ref extends Schema.Schema.Type<typeof Ref> {
@@ -37,11 +37,7 @@ const Updated = ephemeral({
37
37
  type: "integration.updated",
38
38
  schema: {},
39
39
  });
40
- const ConnectionUpdated = ephemeral({
41
- type: "integration.connection.updated",
42
- schema: { integrationID: ID },
43
- });
44
- export const Event = { Updated, ConnectionUpdated, Definitions: inventory(Updated, ConnectionUpdated) };
40
+ export const Event = { Updated, Definitions: inventory(Updated) };
45
41
  export const Ref = Schema.Struct({
46
42
  id: ID,
47
43
  name: Schema.String,
package/dist/model.d.ts CHANGED
@@ -42,6 +42,7 @@ export declare const Compatibility: Schema.Struct<{
42
42
  readonly reasoningField: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Codec<ReasoningField, ReasoningField, never, never>>>, Schema.optionalKey<Schema.Codec<ReasoningField, ReasoningField, never, never>>, never, never>;
43
43
  readonly maxTokensField: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["max_completion_tokens", "max_tokens"]>>>, Schema.optionalKey<Schema.Literals<readonly ["max_completion_tokens", "max_tokens"]>>, never, never>;
44
44
  readonly requireFinishReason: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
45
+ readonly requireAssistantAfterTool: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
45
46
  }>;
46
47
  export interface Capabilities extends Schema.Schema.Type<typeof Capabilities> {
47
48
  }
@@ -156,10 +157,12 @@ export declare const Info: Schema.Struct<{
156
157
  readonly reasoningField: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Codec<ReasoningField, ReasoningField, never, never>>>, Schema.optionalKey<Schema.Codec<ReasoningField, ReasoningField, never, never>>, never, never>;
157
158
  readonly maxTokensField: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["max_completion_tokens", "max_tokens"]>>>, Schema.optionalKey<Schema.Literals<readonly ["max_completion_tokens", "max_tokens"]>>, never, never>;
158
159
  readonly requireFinishReason: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
160
+ readonly requireAssistantAfterTool: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
159
161
  }>>>, Schema.optionalKey<Schema.Struct<{
160
162
  readonly reasoningField: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Codec<ReasoningField, ReasoningField, never, never>>>, Schema.optionalKey<Schema.Codec<ReasoningField, ReasoningField, never, never>>, never, never>;
161
163
  readonly maxTokensField: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["max_completion_tokens", "max_tokens"]>>>, Schema.optionalKey<Schema.Literals<readonly ["max_completion_tokens", "max_tokens"]>>, never, never>;
162
164
  readonly requireFinishReason: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
165
+ readonly requireAssistantAfterTool: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
163
166
  }>>, never, never>;
164
167
  readonly package: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
165
168
  }> & {
package/dist/model.js CHANGED
@@ -41,6 +41,7 @@ export const Compatibility = Schema.Struct({
41
41
  reasoningField: ReasoningField.pipe(optional),
42
42
  maxTokensField: MaxTokensField.pipe(optional),
43
43
  requireFinishReason: Schema.Boolean.pipe(optional),
44
+ requireAssistantAfterTool: Schema.Boolean.pipe(optional),
44
45
  }).annotate({ identifier: "Model.Compatibility" });
45
46
  export const Capabilities = Schema.Struct({
46
47
  tools: Schema.Boolean,
@@ -28,6 +28,7 @@ export declare const Request: Schema.Struct<{
28
28
  readonly messageID: Schema.String;
29
29
  readonly id: Schema.String;
30
30
  }>]>>, never, never>;
31
+ readonly message: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
31
32
  readonly id: Schema.brand<Schema.String, "Permission.ID"> & {
32
33
  create: (id?: string) => string & import("effect/Brand").Brand<"Permission.ID">;
33
34
  };
@@ -81,6 +82,7 @@ export declare const Event: {
81
82
  readonly messageID: Schema.String;
82
83
  readonly id: Schema.String;
83
84
  }>]>>, never, never>;
85
+ readonly message: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
84
86
  readonly id: Schema.brand<Schema.String, "Permission.ID"> & {
85
87
  create: (id?: string) => string & import("effect/Brand").Brand<"Permission.ID">;
86
88
  };
@@ -107,6 +109,7 @@ export declare const Event: {
107
109
  readonly messageID: Schema.String;
108
110
  readonly id: Schema.String;
109
111
  }>]>>, never, never>;
112
+ readonly message: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
110
113
  readonly id: Schema.brand<Schema.String, "Permission.ID"> & {
111
114
  create: (id?: string) => string & import("effect/Brand").Brand<"Permission.ID">;
112
115
  };
@@ -207,6 +210,7 @@ export declare const Event: {
207
210
  readonly messageID: Schema.String;
208
211
  readonly id: Schema.String;
209
212
  }>]>>, never, never>;
213
+ readonly message: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
210
214
  readonly id: Schema.brand<Schema.String, "Permission.ID"> & {
211
215
  create: (id?: string) => string & import("effect/Brand").Brand<"Permission.ID">;
212
216
  };
@@ -233,6 +237,7 @@ export declare const Event: {
233
237
  readonly messageID: Schema.String;
234
238
  readonly id: Schema.String;
235
239
  }>]>>, never, never>;
240
+ readonly message: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
236
241
  readonly id: Schema.brand<Schema.String, "Permission.ID"> & {
237
242
  create: (id?: string) => string & import("effect/Brand").Brand<"Permission.ID">;
238
243
  };
@@ -20,6 +20,7 @@ const RequestFields = {
20
20
  save: Schema.Array(Schema.String).pipe(optional),
21
21
  metadata: Schema.Record(Schema.String, Schema.Unknown).pipe(optional),
22
22
  source: Source.pipe(optional),
23
+ message: Schema.String.pipe(optional),
23
24
  };
24
25
  export const Request = Schema.Struct({
25
26
  id: ID,