@opencode-ai/schema 0.0.0-dev-17471

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.
Files changed (193) hide show
  1. package/dist/agent.d.ts +164 -0
  2. package/dist/agent.js +46 -0
  3. package/dist/ai.d.ts +4 -0
  4. package/dist/ai.js +5 -0
  5. package/dist/catalog.d.ts +69 -0
  6. package/dist/catalog.js +4 -0
  7. package/dist/command.d.ts +124 -0
  8. package/dist/command.js +19 -0
  9. package/dist/config/agent.d.ts +42 -0
  10. package/dist/config/agent.js +20 -0
  11. package/dist/config/command.d.ts +27 -0
  12. package/dist/config/command.js +12 -0
  13. package/dist/config/compaction.d.ts +14 -0
  14. package/dist/config/compaction.js +13 -0
  15. package/dist/config/experimental.d.ts +17 -0
  16. package/dist/config/experimental.js +16 -0
  17. package/dist/config/formatter.d.ts +11 -0
  18. package/dist/config/formatter.js +11 -0
  19. package/dist/config/lsp.d.ts +20 -0
  20. package/dist/config/lsp.js +16 -0
  21. package/dist/config/mcp.d.ts +18 -0
  22. package/dist/config/mcp.js +14 -0
  23. package/dist/config/media.d.ts +15 -0
  24. package/dist/config/media.js +14 -0
  25. package/dist/config/model.d.ts +18 -0
  26. package/dist/config/model.js +28 -0
  27. package/dist/config/plugin.d.ts +11 -0
  28. package/dist/config/plugin.js +10 -0
  29. package/dist/config/policy.d.ts +10 -0
  30. package/dist/config/policy.js +8 -0
  31. package/dist/config/provider.d.ts +106 -0
  32. package/dist/config/provider.js +62 -0
  33. package/dist/config/reference.d.ts +21 -0
  34. package/dist/config/reference.js +18 -0
  35. package/dist/config/tool-output.d.ts +8 -0
  36. package/dist/config/tool-output.js +8 -0
  37. package/dist/config/warming.d.ts +10 -0
  38. package/dist/config/warming.js +16 -0
  39. package/dist/config/watcher.d.ts +7 -0
  40. package/dist/config/watcher.js +7 -0
  41. package/dist/config/websearch.d.ts +9 -0
  42. package/dist/config/websearch.js +8 -0
  43. package/dist/config.d.ts +175 -0
  44. package/dist/config.js +136 -0
  45. package/dist/connection.d.ts +28 -0
  46. package/dist/connection.js +15 -0
  47. package/dist/credential.d.ts +38 -0
  48. package/dist/credential.js +25 -0
  49. package/dist/durable-event-manifest.d.ts +3 -0
  50. package/dist/durable-event-manifest.js +5 -0
  51. package/dist/event-log.d.ts +14 -0
  52. package/dist/event-log.js +17 -0
  53. package/dist/event-manifest.d.ts +11372 -0
  54. package/dist/event-manifest.js +45 -0
  55. package/dist/event.d.ts +142 -0
  56. package/dist/event.js +110 -0
  57. package/dist/file-diff.d.ts +21 -0
  58. package/dist/file-diff.js +18 -0
  59. package/dist/filesystem-v1.d.ts +1 -0
  60. package/dist/filesystem-v1.js +1 -0
  61. package/dist/filesystem.d.ts +118 -0
  62. package/dist/filesystem.js +35 -0
  63. package/dist/form.d.ts +1259 -0
  64. package/dist/form.js +120 -0
  65. package/dist/ide-event.d.ts +76 -0
  66. package/dist/ide-event.js +10 -0
  67. package/dist/identifier.d.ts +3 -0
  68. package/dist/identifier.js +24 -0
  69. package/dist/index.d.ts +39 -0
  70. package/dist/index.js +39 -0
  71. package/dist/installation-event.d.ts +149 -0
  72. package/dist/installation-event.js +16 -0
  73. package/dist/instruction-entry.d.ts +23 -0
  74. package/dist/instruction-entry.js +22 -0
  75. package/dist/instruction.d.ts +13 -0
  76. package/dist/instruction.js +8 -0
  77. package/dist/integration-id.d.ts +5 -0
  78. package/dist/integration-id.js +3 -0
  79. package/dist/integration.d.ts +1675 -0
  80. package/dist/integration.js +87 -0
  81. package/dist/legacy-event.d.ts +1 -0
  82. package/dist/legacy-event.js +1 -0
  83. package/dist/llm.d.ts +4 -0
  84. package/dist/llm.js +3 -0
  85. package/dist/location.d.ts +37 -0
  86. package/dist/location.js +22 -0
  87. package/dist/lsp-event.d.ts +67 -0
  88. package/dist/lsp-event.js +4 -0
  89. package/dist/mcp-event.d.ts +222 -0
  90. package/dist/mcp-event.js +24 -0
  91. package/dist/mcp.d.ts +138 -0
  92. package/dist/mcp.js +111 -0
  93. package/dist/model.d.ts +186 -0
  94. package/dist/model.js +104 -0
  95. package/dist/models-dev.d.ts +69 -0
  96. package/dist/models-dev.js +7 -0
  97. package/dist/money.d.ts +10 -0
  98. package/dist/money.js +5 -0
  99. package/dist/permission-saved.d.ts +18 -0
  100. package/dist/permission-saved.js +12 -0
  101. package/dist/permission-v1.d.ts +1 -0
  102. package/dist/permission-v1.js +1 -0
  103. package/dist/permission.d.ts +306 -0
  104. package/dist/permission.js +45 -0
  105. package/dist/plugin.d.ts +150 -0
  106. package/dist/plugin.js +16 -0
  107. package/dist/project-id.d.ts +5 -0
  108. package/dist/project-id.js +3 -0
  109. package/dist/project.d.ts +241 -0
  110. package/dist/project.js +37 -0
  111. package/dist/prompt-input.d.ts +143 -0
  112. package/dist/prompt-input.js +25 -0
  113. package/dist/prompt.d.ts +297 -0
  114. package/dist/prompt.js +61 -0
  115. package/dist/provider.d.ts +60 -0
  116. package/dist/provider.js +42 -0
  117. package/dist/pty-ticket.d.ts +8 -0
  118. package/dist/pty-ticket.js +7 -0
  119. package/dist/pty.d.ts +462 -0
  120. package/dist/pty.js +43 -0
  121. package/dist/question-v1.d.ts +1 -0
  122. package/dist/question-v1.js +1 -0
  123. package/dist/question.d.ts +15 -0
  124. package/dist/question.js +15 -0
  125. package/dist/reference.d.ts +120 -0
  126. package/dist/reference.js +30 -0
  127. package/dist/schema.d.ts +10 -0
  128. package/dist/schema.js +14 -0
  129. package/dist/server-event.d.ts +132 -0
  130. package/dist/server-event.js +5 -0
  131. package/dist/session-compaction-event.d.ts +87 -0
  132. package/dist/session-compaction-event.js +10 -0
  133. package/dist/session-error.d.ts +9 -0
  134. package/dist/session-error.js +8 -0
  135. package/dist/session-event.d.ts +17994 -0
  136. package/dist/session-event.js +499 -0
  137. package/dist/session-fork.d.ts +26 -0
  138. package/dist/session-fork.js +11 -0
  139. package/dist/session-id.d.ts +6 -0
  140. package/dist/session-id.js +10 -0
  141. package/dist/session-inbox.d.ts +748 -0
  142. package/dist/session-inbox.js +47 -0
  143. package/dist/session-message.d.ts +1512 -0
  144. package/dist/session-message.js +209 -0
  145. package/dist/session-revert.d.ts +480 -0
  146. package/dist/session-revert.js +63 -0
  147. package/dist/session-status-event.d.ts +299 -0
  148. package/dist/session-status-event.js +43 -0
  149. package/dist/session-transfer.d.ts +744 -0
  150. package/dist/session-transfer.js +8 -0
  151. package/dist/session-v1.d.ts +1 -0
  152. package/dist/session-v1.js +1 -0
  153. package/dist/session.d.ts +218 -0
  154. package/dist/session.js +45 -0
  155. package/dist/shell.d.ts +381 -0
  156. package/dist/shell.js +58 -0
  157. package/dist/skill.d.ts +133 -0
  158. package/dist/skill.js +48 -0
  159. package/dist/snapshot.d.ts +4 -0
  160. package/dist/snapshot.js +3 -0
  161. package/dist/token-usage.d.ts +13 -0
  162. package/dist/token-usage.js +11 -0
  163. package/dist/tool.d.ts +74 -0
  164. package/dist/tool.js +22 -0
  165. package/dist/tui-event.d.ts +307 -0
  166. package/dist/tui-event.js +53 -0
  167. package/dist/v1/filesystem.d.ts +78 -0
  168. package/dist/v1/filesystem.js +8 -0
  169. package/dist/v1/legacy-event.d.ts +108 -0
  170. package/dist/v1/legacy-event.js +15 -0
  171. package/dist/v1/permission.d.ts +316 -0
  172. package/dist/v1/permission.js +41 -0
  173. package/dist/v1/question.d.ts +444 -0
  174. package/dist/v1/question.js +57 -0
  175. package/dist/v1/session.d.ts +7657 -0
  176. package/dist/v1/session.js +535 -0
  177. package/dist/vcs-event.d.ts +76 -0
  178. package/dist/vcs-event.js +11 -0
  179. package/dist/vcs.d.ts +26 -0
  180. package/dist/vcs.js +17 -0
  181. package/dist/websearch.d.ts +108 -0
  182. package/dist/websearch.js +31 -0
  183. package/dist/workspace-event.d.ts +247 -0
  184. package/dist/workspace-event.js +25 -0
  185. package/dist/workspace-id.d.ts +6 -0
  186. package/dist/workspace-id.js +16 -0
  187. package/dist/workspace.d.ts +9 -0
  188. package/dist/workspace.js +5 -0
  189. package/dist/worktree-event.d.ts +153 -0
  190. package/dist/worktree-event.js +18 -0
  191. package/dist/worktree.d.ts +255 -0
  192. package/dist/worktree.js +61 -0
  193. package/package.json +42 -0
@@ -0,0 +1,297 @@
1
+ import { Schema } from "effect";
2
+ export interface PromptMention extends Schema.Schema.Type<typeof PromptMention> {
3
+ }
4
+ export declare const PromptMention: Schema.Struct<{
5
+ readonly start: Schema.Finite;
6
+ readonly end: Schema.Finite;
7
+ readonly text: Schema.String;
8
+ }>;
9
+ export declare const FileSource: Schema.Union<readonly [Schema.Struct<{
10
+ readonly type: Schema.Literal<"inline">;
11
+ }>, Schema.Struct<{
12
+ readonly type: Schema.Literal<"uri">;
13
+ readonly uri: Schema.String;
14
+ }>]>;
15
+ export type FileSource = typeof FileSource.Type;
16
+ export declare const Base64: Schema.String;
17
+ export type Base64 = typeof Base64.Type;
18
+ export interface FileAttachment extends Schema.Schema.Type<typeof FileAttachment> {
19
+ }
20
+ export declare const FileAttachment: Schema.Struct<{
21
+ readonly data: Schema.String;
22
+ readonly mime: Schema.String;
23
+ readonly source: Schema.Union<readonly [Schema.Struct<{
24
+ readonly type: Schema.Literal<"inline">;
25
+ }>, Schema.Struct<{
26
+ readonly type: Schema.Literal<"uri">;
27
+ readonly uri: Schema.String;
28
+ }>]>;
29
+ readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
30
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
31
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
32
+ readonly start: Schema.Finite;
33
+ readonly end: Schema.Finite;
34
+ readonly text: Schema.String;
35
+ }>>>, Schema.optionalKey<Schema.Struct<{
36
+ readonly start: Schema.Finite;
37
+ readonly end: Schema.Finite;
38
+ readonly text: Schema.String;
39
+ }>>, never, never>;
40
+ }> & {
41
+ create: (input: FileAttachment) => {
42
+ readonly data: string;
43
+ readonly source: {
44
+ readonly type: "inline";
45
+ } | {
46
+ readonly type: "uri";
47
+ readonly uri: string;
48
+ };
49
+ readonly mime: string;
50
+ readonly description?: string | undefined;
51
+ readonly name?: string | undefined;
52
+ readonly mention?: {
53
+ readonly start: number;
54
+ readonly end: number;
55
+ readonly text: string;
56
+ } | undefined;
57
+ };
58
+ };
59
+ export interface AgentAttachment extends Schema.Schema.Type<typeof AgentAttachment> {
60
+ }
61
+ export declare const AgentAttachment: Schema.Struct<{
62
+ readonly name: Schema.String;
63
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
64
+ readonly start: Schema.Finite;
65
+ readonly end: Schema.Finite;
66
+ readonly text: Schema.String;
67
+ }>>>, Schema.optionalKey<Schema.Struct<{
68
+ readonly start: Schema.Finite;
69
+ readonly end: Schema.Finite;
70
+ readonly text: Schema.String;
71
+ }>>, never, never>;
72
+ }>;
73
+ export interface SkillAttachment extends Schema.Schema.Type<typeof SkillAttachment> {
74
+ }
75
+ export declare const SkillAttachment: Schema.Struct<{
76
+ readonly id: Schema.brand<Schema.String, "Skill.ID">;
77
+ readonly name: Schema.brand<Schema.String, "Skill.Name">;
78
+ readonly text: Schema.String;
79
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
80
+ readonly start: Schema.Finite;
81
+ readonly end: Schema.Finite;
82
+ readonly text: Schema.String;
83
+ }>>>, Schema.optionalKey<Schema.Struct<{
84
+ readonly start: Schema.Finite;
85
+ readonly end: Schema.Finite;
86
+ readonly text: Schema.String;
87
+ }>>, never, never>;
88
+ }>;
89
+ export interface Prompt extends Schema.Schema.Type<typeof Prompt> {
90
+ }
91
+ export declare const Prompt: Schema.Struct<{
92
+ readonly text: Schema.String;
93
+ readonly files: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
94
+ readonly data: Schema.String;
95
+ readonly mime: Schema.String;
96
+ readonly source: Schema.Union<readonly [Schema.Struct<{
97
+ readonly type: Schema.Literal<"inline">;
98
+ }>, Schema.Struct<{
99
+ readonly type: Schema.Literal<"uri">;
100
+ readonly uri: Schema.String;
101
+ }>]>;
102
+ readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
103
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
104
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
105
+ readonly start: Schema.Finite;
106
+ readonly end: Schema.Finite;
107
+ readonly text: Schema.String;
108
+ }>>>, Schema.optionalKey<Schema.Struct<{
109
+ readonly start: Schema.Finite;
110
+ readonly end: Schema.Finite;
111
+ readonly text: Schema.String;
112
+ }>>, never, never>;
113
+ }> & {
114
+ create: (input: FileAttachment) => {
115
+ readonly data: string;
116
+ readonly source: {
117
+ readonly type: "inline";
118
+ } | {
119
+ readonly type: "uri";
120
+ readonly uri: string;
121
+ };
122
+ readonly mime: string;
123
+ readonly description?: string | undefined;
124
+ readonly name?: string | undefined;
125
+ readonly mention?: {
126
+ readonly start: number;
127
+ readonly end: number;
128
+ readonly text: string;
129
+ } | undefined;
130
+ };
131
+ }>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
132
+ readonly data: Schema.String;
133
+ readonly mime: Schema.String;
134
+ readonly source: Schema.Union<readonly [Schema.Struct<{
135
+ readonly type: Schema.Literal<"inline">;
136
+ }>, Schema.Struct<{
137
+ readonly type: Schema.Literal<"uri">;
138
+ readonly uri: Schema.String;
139
+ }>]>;
140
+ readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
141
+ readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
142
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
143
+ readonly start: Schema.Finite;
144
+ readonly end: Schema.Finite;
145
+ readonly text: Schema.String;
146
+ }>>>, Schema.optionalKey<Schema.Struct<{
147
+ readonly start: Schema.Finite;
148
+ readonly end: Schema.Finite;
149
+ readonly text: Schema.String;
150
+ }>>, never, never>;
151
+ }> & {
152
+ create: (input: FileAttachment) => {
153
+ readonly data: string;
154
+ readonly source: {
155
+ readonly type: "inline";
156
+ } | {
157
+ readonly type: "uri";
158
+ readonly uri: string;
159
+ };
160
+ readonly mime: string;
161
+ readonly description?: string | undefined;
162
+ readonly name?: string | undefined;
163
+ readonly mention?: {
164
+ readonly start: number;
165
+ readonly end: number;
166
+ readonly text: string;
167
+ } | undefined;
168
+ };
169
+ }>>, never, never>;
170
+ readonly agents: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
171
+ readonly name: Schema.String;
172
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
173
+ readonly start: Schema.Finite;
174
+ readonly end: Schema.Finite;
175
+ readonly text: Schema.String;
176
+ }>>>, Schema.optionalKey<Schema.Struct<{
177
+ readonly start: Schema.Finite;
178
+ readonly end: Schema.Finite;
179
+ readonly text: Schema.String;
180
+ }>>, never, never>;
181
+ }>>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
182
+ readonly name: Schema.String;
183
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
184
+ readonly start: Schema.Finite;
185
+ readonly end: Schema.Finite;
186
+ readonly text: Schema.String;
187
+ }>>>, Schema.optionalKey<Schema.Struct<{
188
+ readonly start: Schema.Finite;
189
+ readonly end: Schema.Finite;
190
+ readonly text: Schema.String;
191
+ }>>, never, never>;
192
+ }>>>, never, never>;
193
+ readonly skills: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
194
+ readonly id: Schema.brand<Schema.String, "Skill.ID">;
195
+ readonly name: Schema.brand<Schema.String, "Skill.Name">;
196
+ readonly text: Schema.String;
197
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
198
+ readonly start: Schema.Finite;
199
+ readonly end: Schema.Finite;
200
+ readonly text: Schema.String;
201
+ }>>>, Schema.optionalKey<Schema.Struct<{
202
+ readonly start: Schema.Finite;
203
+ readonly end: Schema.Finite;
204
+ readonly text: Schema.String;
205
+ }>>, never, never>;
206
+ }>>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
207
+ readonly id: Schema.brand<Schema.String, "Skill.ID">;
208
+ readonly name: Schema.brand<Schema.String, "Skill.Name">;
209
+ readonly text: Schema.String;
210
+ readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
211
+ readonly start: Schema.Finite;
212
+ readonly end: Schema.Finite;
213
+ readonly text: Schema.String;
214
+ }>>>, Schema.optionalKey<Schema.Struct<{
215
+ readonly start: Schema.Finite;
216
+ readonly end: Schema.Finite;
217
+ readonly text: Schema.String;
218
+ }>>, never, never>;
219
+ }>>>, never, never>;
220
+ }> & {
221
+ equivalence: import("effect/Equivalence").Equivalence<{
222
+ readonly text: string;
223
+ readonly agents?: readonly {
224
+ readonly name: string;
225
+ readonly mention?: {
226
+ readonly start: number;
227
+ readonly end: number;
228
+ readonly text: string;
229
+ } | undefined;
230
+ }[] | undefined;
231
+ readonly skills?: readonly {
232
+ readonly id: string & import("effect/Brand").Brand<"Skill.ID">;
233
+ readonly name: string & import("effect/Brand").Brand<"Skill.Name">;
234
+ readonly text: string;
235
+ readonly mention?: {
236
+ readonly start: number;
237
+ readonly end: number;
238
+ readonly text: string;
239
+ } | undefined;
240
+ }[] | undefined;
241
+ readonly files?: readonly {
242
+ readonly data: string;
243
+ readonly source: {
244
+ readonly type: "inline";
245
+ } | {
246
+ readonly type: "uri";
247
+ readonly uri: string;
248
+ };
249
+ readonly mime: string;
250
+ readonly description?: string | undefined;
251
+ readonly name?: string | undefined;
252
+ readonly mention?: {
253
+ readonly start: number;
254
+ readonly end: number;
255
+ readonly text: string;
256
+ } | undefined;
257
+ }[] | undefined;
258
+ }>;
259
+ fromUserMessage: (input: Pick<Prompt, "text" | "files" | "agents" | "skills">) => {
260
+ readonly text: string;
261
+ readonly agents?: readonly {
262
+ readonly name: string;
263
+ readonly mention?: {
264
+ readonly start: number;
265
+ readonly end: number;
266
+ readonly text: string;
267
+ } | undefined;
268
+ }[] | undefined;
269
+ readonly skills?: readonly {
270
+ readonly id: string & import("effect/Brand").Brand<"Skill.ID">;
271
+ readonly name: string & import("effect/Brand").Brand<"Skill.Name">;
272
+ readonly text: string;
273
+ readonly mention?: {
274
+ readonly start: number;
275
+ readonly end: number;
276
+ readonly text: string;
277
+ } | undefined;
278
+ }[] | undefined;
279
+ readonly files?: readonly {
280
+ readonly data: string;
281
+ readonly source: {
282
+ readonly type: "inline";
283
+ } | {
284
+ readonly type: "uri";
285
+ readonly uri: string;
286
+ };
287
+ readonly mime: string;
288
+ readonly description?: string | undefined;
289
+ readonly name?: string | undefined;
290
+ readonly mention?: {
291
+ readonly start: number;
292
+ readonly end: number;
293
+ readonly text: string;
294
+ } | undefined;
295
+ }[] | undefined;
296
+ };
297
+ };
package/dist/prompt.js ADDED
@@ -0,0 +1,61 @@
1
+ import { Schema } from "effect";
2
+ import { optional } from "./schema.js";
3
+ import { statics } from "./schema.js";
4
+ import { Skill } from "./skill.js";
5
+ export const PromptMention = Schema.Struct({
6
+ start: Schema.Finite,
7
+ end: Schema.Finite,
8
+ text: Schema.String,
9
+ }).annotate({ identifier: "Prompt.Mention" });
10
+ export const FileSource = Schema.Union([
11
+ Schema.Struct({ type: Schema.Literal("inline") }),
12
+ Schema.Struct({ type: Schema.Literal("uri"), uri: Schema.String }),
13
+ ])
14
+ .pipe(Schema.toTaggedUnion("type"))
15
+ .annotate({ identifier: "Prompt.FileSource" });
16
+ export const Base64 = Schema.String.check(Schema.isPattern(/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/)).annotate({ identifier: "Prompt.Base64" });
17
+ export const FileAttachment = Schema.Struct({
18
+ data: Base64,
19
+ mime: Schema.String,
20
+ source: FileSource,
21
+ name: Schema.String.pipe(optional),
22
+ description: Schema.String.pipe(optional),
23
+ mention: PromptMention.pipe(optional),
24
+ })
25
+ .annotate({ identifier: "Prompt.FileAttachment" })
26
+ .pipe(statics((schema) => ({
27
+ create: (input) => schema.make({
28
+ data: input.data,
29
+ mime: input.mime,
30
+ source: input.source,
31
+ name: input.name,
32
+ description: input.description,
33
+ mention: input.mention,
34
+ }),
35
+ })));
36
+ export const AgentAttachment = Schema.Struct({
37
+ name: Schema.String,
38
+ mention: PromptMention.pipe(optional),
39
+ }).annotate({ identifier: "Prompt.AgentAttachment" });
40
+ export const SkillAttachment = Schema.Struct({
41
+ id: Skill.ID,
42
+ name: Skill.Name,
43
+ text: Schema.String,
44
+ mention: PromptMention.pipe(optional),
45
+ }).annotate({ identifier: "Prompt.SkillAttachment" });
46
+ export const Prompt = Schema.Struct({
47
+ text: Schema.String,
48
+ files: Schema.Array(FileAttachment).pipe(optional),
49
+ agents: Schema.Array(AgentAttachment).pipe(optional),
50
+ skills: Schema.Array(SkillAttachment).pipe(optional),
51
+ })
52
+ .annotate({ identifier: "Prompt" })
53
+ .pipe(statics((schema) => ({
54
+ equivalence: Schema.toEquivalence(schema),
55
+ fromUserMessage: (input) => schema.make({
56
+ text: input.text,
57
+ ...(input.files === undefined ? {} : { files: input.files }),
58
+ ...(input.agents === undefined ? {} : { agents: input.agents }),
59
+ ...(input.skills === undefined ? {} : { skills: input.skills }),
60
+ }),
61
+ })));
@@ -0,0 +1,60 @@
1
+ export * as Provider from "./provider.js";
2
+ import { Schema } from "effect";
3
+ export declare const ID: Schema.brand<Schema.String, "Provider.ID"> & {
4
+ opencode: string & import("effect/Brand").Brand<"Provider.ID">;
5
+ anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
6
+ openai: string & import("effect/Brand").Brand<"Provider.ID">;
7
+ google: string & import("effect/Brand").Brand<"Provider.ID">;
8
+ googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
9
+ githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
10
+ amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
11
+ azure: string & import("effect/Brand").Brand<"Provider.ID">;
12
+ openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
13
+ mistral: string & import("effect/Brand").Brand<"Provider.ID">;
14
+ gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
15
+ };
16
+ export type ID = typeof ID.Type;
17
+ export declare const Package: Schema.String;
18
+ export type Package = typeof Package.Type;
19
+ export declare const Activation: Schema.Literals<readonly ["auto", "enabled", "disabled"]>;
20
+ export type Activation = typeof Activation.Type;
21
+ export declare const Overlays: {
22
+ settings: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Any>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Any>>, never, never>;
23
+ headers: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
24
+ body: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Any>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Any>>, never, never>;
25
+ };
26
+ export declare const Settings: Schema.$Record<Schema.String, Schema.Any>;
27
+ export type Settings = typeof Settings.Type;
28
+ export interface Request extends Schema.Schema.Type<typeof Request> {
29
+ }
30
+ export declare const Request: Schema.Struct<{
31
+ readonly settings: Schema.withConstructorDefault<Schema.$Record<Schema.String, Schema.Any>>;
32
+ readonly headers: Schema.$Record<Schema.String, Schema.String>;
33
+ readonly body: Schema.$Record<Schema.String, Schema.Any>;
34
+ }>;
35
+ export interface Info extends Schema.Schema.Type<typeof Info> {
36
+ }
37
+ export declare const Info: Schema.Struct<{
38
+ readonly settings: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Any>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Any>>, never, never>;
39
+ readonly headers: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.String>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>, never, never>;
40
+ readonly body: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Any>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Any>>, never, never>;
41
+ readonly id: Schema.brand<Schema.String, "Provider.ID"> & {
42
+ opencode: string & import("effect/Brand").Brand<"Provider.ID">;
43
+ anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
44
+ openai: string & import("effect/Brand").Brand<"Provider.ID">;
45
+ google: string & import("effect/Brand").Brand<"Provider.ID">;
46
+ googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
47
+ githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
48
+ amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
49
+ azure: string & import("effect/Brand").Brand<"Provider.ID">;
50
+ openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
51
+ mistral: string & import("effect/Brand").Brand<"Provider.ID">;
52
+ gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
53
+ };
54
+ readonly integrationID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Integration.ID">>>, Schema.optionalKey<Schema.brand<Schema.String, "Integration.ID">>, never, never>;
55
+ readonly name: Schema.String;
56
+ readonly activation: Schema.Literals<readonly ["auto", "enabled", "disabled"]>;
57
+ readonly package: Schema.String;
58
+ }> & {
59
+ empty: (id: ID) => Info;
60
+ };
@@ -0,0 +1,42 @@
1
+ export * as Provider from "./provider.js";
2
+ import { Effect, Schema } from "effect";
3
+ import { Integration } from "./integration.js";
4
+ import { optional, statics } from "./schema.js";
5
+ export const ID = Schema.String.pipe(Schema.brand("Provider.ID"), statics((schema) => ({
6
+ opencode: schema.make("opencode"),
7
+ anthropic: schema.make("anthropic"),
8
+ openai: schema.make("openai"),
9
+ google: schema.make("google"),
10
+ googleVertex: schema.make("google-vertex"),
11
+ githubCopilot: schema.make("github-copilot"),
12
+ amazonBedrock: schema.make("amazon-bedrock"),
13
+ azure: schema.make("azure"),
14
+ openrouter: schema.make("openrouter"),
15
+ mistral: schema.make("mistral"),
16
+ gitlab: schema.make("gitlab"),
17
+ })));
18
+ export const Package = Schema.String;
19
+ export const Activation = Schema.Literals(["auto", "enabled", "disabled"]);
20
+ export const Overlays = {
21
+ settings: Schema.Record(Schema.String, Schema.Any).pipe(optional),
22
+ headers: Schema.Record(Schema.String, Schema.String).pipe(optional),
23
+ body: Schema.Record(Schema.String, Schema.Any).pipe(optional),
24
+ };
25
+ export const Settings = Schema.Record(Schema.String, Schema.Any).annotate({ identifier: "Provider.Settings" });
26
+ export const Request = Schema.Struct({
27
+ settings: Settings.pipe(Schema.withConstructorDefault(Effect.succeed({}))),
28
+ headers: Schema.Record(Schema.String, Schema.String),
29
+ body: Schema.Record(Schema.String, Schema.Any),
30
+ }).annotate({ identifier: "Provider.Request" });
31
+ export const Info = Schema.Struct({
32
+ id: ID,
33
+ integrationID: Integration.ID.pipe(optional),
34
+ name: Schema.String,
35
+ activation: Activation,
36
+ package: Package,
37
+ ...Overlays,
38
+ })
39
+ .annotate({ identifier: "Provider.Info" })
40
+ .pipe(statics(() => ({
41
+ empty: (id) => ({ id, name: id, activation: "auto", package: "" }),
42
+ })));
@@ -0,0 +1,8 @@
1
+ export * as PtyTicket from "./pty-ticket.js";
2
+ import { Schema } from "effect";
3
+ export declare const ConnectToken: Schema.Struct<{
4
+ readonly ticket: Schema.String;
5
+ readonly expires_in: Schema.Int;
6
+ }>;
7
+ export interface ConnectToken extends Schema.Schema.Type<typeof ConnectToken> {
8
+ }
@@ -0,0 +1,7 @@
1
+ export * as PtyTicket from "./pty-ticket.js";
2
+ import { Schema } from "effect";
3
+ import { PositiveInt } from "./schema.js";
4
+ export const ConnectToken = Schema.Struct({
5
+ ticket: Schema.String,
6
+ expires_in: PositiveInt,
7
+ }).annotate({ identifier: "PtyTicket.ConnectToken" });