@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.
@@ -86,10 +86,12 @@ declare const Model_base: Schema.Class<Model, Schema.Struct<{
86
86
  readonly reasoningField: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Codec<import("../model.js").ReasoningField, import("../model.js").ReasoningField, never, never>>>, Schema.optionalKey<Schema.Codec<import("../model.js").ReasoningField, import("../model.js").ReasoningField, never, never>>, never, never>;
87
87
  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>;
88
88
  readonly requireFinishReason: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
89
+ readonly requireAssistantAfterTool: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
89
90
  }>>>, Schema.optionalKey<Schema.Struct<{
90
91
  readonly reasoningField: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Codec<import("../model.js").ReasoningField, import("../model.js").ReasoningField, never, never>>>, Schema.optionalKey<Schema.Codec<import("../model.js").ReasoningField, import("../model.js").ReasoningField, never, never>>, never, never>;
91
92
  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>;
92
93
  readonly requireFinishReason: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
94
+ readonly requireAssistantAfterTool: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
93
95
  }>>, never, never>;
94
96
  readonly package: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
95
97
  }>, {}>;
@@ -4,6 +4,159 @@ export declare const ID: Schema.brand<Schema.String, "Credential.ID"> & {
4
4
  create: () => string & import("effect/Brand").Brand<"Credential.ID">;
5
5
  };
6
6
  export type ID = typeof ID.Type;
7
+ export declare const Event: {
8
+ Updated: Schema.Struct<{
9
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
10
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
11
+ };
12
+ readonly created: Schema.Finite;
13
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
14
+ readonly type: Schema.Literal<"credential.updated">;
15
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
16
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
17
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
18
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
19
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
20
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
21
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
22
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
23
+ }>, never, never>;
24
+ }>>>, Schema.optionalKey<Schema.Struct<{
25
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
26
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
27
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
28
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
29
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
30
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
31
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
32
+ }>, never, never>;
33
+ }>>, never, never>;
34
+ readonly data: Schema.Struct<{}>;
35
+ }> & {
36
+ type: "credential.updated";
37
+ durability: "ephemeral";
38
+ durable: undefined;
39
+ data: Schema.Struct<{}>;
40
+ };
41
+ Switched: Schema.Struct<{
42
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
43
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
44
+ };
45
+ readonly created: Schema.Finite;
46
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
47
+ readonly type: Schema.Literal<"credential.switched">;
48
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
49
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
50
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
51
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
52
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
53
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
54
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
55
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
56
+ }>, never, never>;
57
+ }>>>, Schema.optionalKey<Schema.Struct<{
58
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
59
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
60
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
61
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
62
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
63
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
64
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
65
+ }>, never, never>;
66
+ }>>, never, never>;
67
+ readonly data: Schema.Struct<{
68
+ readonly integrationID: Schema.brand<Schema.String, "Integration.ID">;
69
+ readonly credentialID: Schema.NullOr<Schema.brand<Schema.String, "Credential.ID"> & {
70
+ create: () => string & import("effect/Brand").Brand<"Credential.ID">;
71
+ }>;
72
+ }>;
73
+ }> & {
74
+ type: "credential.switched";
75
+ durability: "ephemeral";
76
+ durable: undefined;
77
+ data: Schema.Struct<{
78
+ readonly integrationID: Schema.brand<Schema.String, "Integration.ID">;
79
+ readonly credentialID: Schema.NullOr<Schema.brand<Schema.String, "Credential.ID"> & {
80
+ create: () => string & import("effect/Brand").Brand<"Credential.ID">;
81
+ }>;
82
+ }>;
83
+ };
84
+ Definitions: readonly [Schema.Struct<{
85
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
86
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
87
+ };
88
+ readonly created: Schema.Finite;
89
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
90
+ readonly type: Schema.Literal<"credential.updated">;
91
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
92
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
93
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
94
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
95
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
96
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
97
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
98
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
99
+ }>, never, never>;
100
+ }>>>, Schema.optionalKey<Schema.Struct<{
101
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
102
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
103
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
104
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
105
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
106
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
107
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
108
+ }>, never, never>;
109
+ }>>, never, never>;
110
+ readonly data: Schema.Struct<{}>;
111
+ }> & {
112
+ type: "credential.updated";
113
+ durability: "ephemeral";
114
+ durable: undefined;
115
+ data: Schema.Struct<{}>;
116
+ }, Schema.Struct<{
117
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
118
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
119
+ };
120
+ readonly created: Schema.Finite;
121
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
122
+ readonly type: Schema.Literal<"credential.switched">;
123
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
124
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
125
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
126
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
127
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
128
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
129
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
130
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
131
+ }>, never, never>;
132
+ }>>>, Schema.optionalKey<Schema.Struct<{
133
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
134
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
135
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
136
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
137
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
138
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
139
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
140
+ }>, never, never>;
141
+ }>>, never, never>;
142
+ readonly data: Schema.Struct<{
143
+ readonly integrationID: Schema.brand<Schema.String, "Integration.ID">;
144
+ readonly credentialID: Schema.NullOr<Schema.brand<Schema.String, "Credential.ID"> & {
145
+ create: () => string & import("effect/Brand").Brand<"Credential.ID">;
146
+ }>;
147
+ }>;
148
+ }> & {
149
+ type: "credential.switched";
150
+ durability: "ephemeral";
151
+ durable: undefined;
152
+ data: Schema.Struct<{
153
+ readonly integrationID: Schema.brand<Schema.String, "Integration.ID">;
154
+ readonly credentialID: Schema.NullOr<Schema.brand<Schema.String, "Credential.ID"> & {
155
+ create: () => string & import("effect/Brand").Brand<"Credential.ID">;
156
+ }>;
157
+ }>;
158
+ }];
159
+ };
7
160
  export interface OAuth extends Schema.Schema.Type<typeof OAuth> {
8
161
  }
9
162
  export declare const OAuth: Schema.Struct<{
@@ -1,11 +1,25 @@
1
1
  export * as Credential from "./credential.js";
2
2
  import { Schema } from "effect";
3
3
  import { optional } from "./schema.js";
4
- import { IntegrationMethodID } from "./integration-id.js";
4
+ import { ephemeral, inventory } from "./event.js";
5
+ import { IntegrationID, IntegrationMethodID } from "./integration-id.js";
5
6
  import { ascending } from "./identifier.js";
6
7
  import { NonNegativeInt, statics } from "./schema.js";
7
8
  import { Form } from "./form.js";
8
9
  export const ID = Schema.String.pipe(Schema.brand("Credential.ID"), statics((schema) => ({ create: () => schema.make("cred_" + ascending()) })));
10
+ const Updated = ephemeral({
11
+ type: "credential.updated",
12
+ schema: {},
13
+ });
14
+ const Switched = ephemeral({
15
+ type: "credential.switched",
16
+ schema: { integrationID: IntegrationID, credentialID: Schema.NullOr(ID) },
17
+ });
18
+ export const Event = {
19
+ Updated,
20
+ Switched,
21
+ Definitions: inventory(Updated, Switched),
22
+ };
9
23
  export const OAuth = Schema.Struct({
10
24
  type: Schema.Literal("oauth"),
11
25
  methodID: IntegrationMethodID,