@opencode-ai/schema 0.0.0-next-14855 → 0.0.0-reserved.0

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 (147) hide show
  1. package/README.md +3 -0
  2. package/index.js +1 -0
  3. package/package.json +3 -26
  4. package/dist/agent.d.ts +0 -159
  5. package/dist/agent.js +0 -43
  6. package/dist/catalog.d.ts +0 -69
  7. package/dist/catalog.js +0 -4
  8. package/dist/command.d.ts +0 -112
  9. package/dist/command.js +0 -18
  10. package/dist/config.d.ts +0 -69
  11. package/dist/config.js +0 -7
  12. package/dist/connection.d.ts +0 -28
  13. package/dist/connection.js +0 -15
  14. package/dist/credential.d.ts +0 -36
  15. package/dist/credential.js +0 -23
  16. package/dist/durable-event-manifest.d.ts +0 -2370
  17. package/dist/durable-event-manifest.js +0 -9
  18. package/dist/event-log.d.ts +0 -45
  19. package/dist/event-log.js +0 -43
  20. package/dist/event-manifest.d.ts +0 -15273
  21. package/dist/event-manifest.js +0 -52
  22. package/dist/event.d.ts +0 -142
  23. package/dist/event.js +0 -102
  24. package/dist/file-diff.d.ts +0 -11
  25. package/dist/file-diff.js +0 -10
  26. package/dist/filesystem-v1.d.ts +0 -1
  27. package/dist/filesystem-v1.js +0 -1
  28. package/dist/filesystem.d.ts +0 -118
  29. package/dist/filesystem.js +0 -35
  30. package/dist/form.d.ts +0 -1279
  31. package/dist/form.js +0 -112
  32. package/dist/ide-event.d.ts +0 -76
  33. package/dist/ide-event.js +0 -10
  34. package/dist/identifier.d.ts +0 -3
  35. package/dist/identifier.js +0 -24
  36. package/dist/index.d.ts +0 -32
  37. package/dist/index.js +0 -32
  38. package/dist/installation-event.d.ts +0 -149
  39. package/dist/installation-event.js +0 -16
  40. package/dist/integration-id.d.ts +0 -5
  41. package/dist/integration-id.js +0 -3
  42. package/dist/integration.d.ts +0 -532
  43. package/dist/integration.js +0 -93
  44. package/dist/legacy-event.d.ts +0 -1
  45. package/dist/legacy-event.js +0 -1
  46. package/dist/llm.d.ts +0 -28
  47. package/dist/llm.js +0 -19
  48. package/dist/location.d.ts +0 -36
  49. package/dist/location.js +0 -21
  50. package/dist/lsp-event.d.ts +0 -67
  51. package/dist/lsp-event.js +0 -4
  52. package/dist/mcp-event.d.ts +0 -188
  53. package/dist/mcp-event.js +0 -25
  54. package/dist/mcp.d.ts +0 -39
  55. package/dist/mcp.js +0 -38
  56. package/dist/model.d.ts +0 -213
  57. package/dist/model.js +0 -86
  58. package/dist/models-dev.d.ts +0 -69
  59. package/dist/models-dev.js +0 -7
  60. package/dist/permission-saved.d.ts +0 -18
  61. package/dist/permission-saved.js +0 -12
  62. package/dist/permission-v1.d.ts +0 -1
  63. package/dist/permission-v1.js +0 -1
  64. package/dist/permission.d.ts +0 -306
  65. package/dist/permission.js +0 -45
  66. package/dist/plugin.d.ts +0 -85
  67. package/dist/plugin.js +0 -12
  68. package/dist/project-copy.d.ts +0 -29
  69. package/dist/project-copy.js +0 -21
  70. package/dist/project-directories.d.ts +0 -85
  71. package/dist/project-directories.js +0 -8
  72. package/dist/project-id.d.ts +0 -5
  73. package/dist/project-id.js +0 -3
  74. package/dist/project.d.ts +0 -258
  75. package/dist/project.js +0 -44
  76. package/dist/prompt-input.d.ts +0 -106
  77. package/dist/prompt-input.js +0 -19
  78. package/dist/prompt.d.ts +0 -177
  79. package/dist/prompt.js +0 -43
  80. package/dist/provider.d.ts +0 -118
  81. package/dist/provider.js +0 -55
  82. package/dist/pty-ticket.d.ts +0 -8
  83. package/dist/pty-ticket.js +0 -7
  84. package/dist/pty.d.ts +0 -462
  85. package/dist/pty.js +0 -43
  86. package/dist/question-v1.d.ts +0 -1
  87. package/dist/question-v1.js +0 -1
  88. package/dist/question.d.ts +0 -456
  89. package/dist/question.js +0 -64
  90. package/dist/reference.d.ts +0 -120
  91. package/dist/reference.js +0 -31
  92. package/dist/revert.d.ts +0 -35
  93. package/dist/revert.js +0 -19
  94. package/dist/schema.d.ts +0 -10
  95. package/dist/schema.js +0 -14
  96. package/dist/server-event.d.ts +0 -132
  97. package/dist/server-event.js +0 -5
  98. package/dist/session-compaction-event.d.ts +0 -87
  99. package/dist/session-compaction-event.js +0 -10
  100. package/dist/session-context-entry.d.ts +0 -15
  101. package/dist/session-context-entry.js +0 -15
  102. package/dist/session-delivery.d.ts +0 -4
  103. package/dist/session-delivery.js +0 -3
  104. package/dist/session-event.d.ts +0 -12728
  105. package/dist/session-event.js +0 -423
  106. package/dist/session-id.d.ts +0 -6
  107. package/dist/session-id.js +0 -10
  108. package/dist/session-input.d.ts +0 -146
  109. package/dist/session-input.js +0 -18
  110. package/dist/session-message.d.ts +0 -1390
  111. package/dist/session-message.js +0 -175
  112. package/dist/session-status-event.d.ts +0 -299
  113. package/dist/session-status-event.js +0 -43
  114. package/dist/session-todo.d.ts +0 -117
  115. package/dist/session-todo.js +0 -21
  116. package/dist/session-v1.d.ts +0 -1
  117. package/dist/session-v1.js +0 -1
  118. package/dist/session.d.ts +0 -142
  119. package/dist/session.js +0 -43
  120. package/dist/shell.d.ts +0 -381
  121. package/dist/shell.js +0 -58
  122. package/dist/skill.d.ts +0 -126
  123. package/dist/skill.js +0 -45
  124. package/dist/tui-event.d.ts +0 -307
  125. package/dist/tui-event.js +0 -53
  126. package/dist/v1/filesystem.d.ts +0 -78
  127. package/dist/v1/filesystem.js +0 -8
  128. package/dist/v1/legacy-event.d.ts +0 -108
  129. package/dist/v1/legacy-event.js +0 -15
  130. package/dist/v1/permission.d.ts +0 -316
  131. package/dist/v1/permission.js +0 -41
  132. package/dist/v1/question.d.ts +0 -444
  133. package/dist/v1/question.js +0 -57
  134. package/dist/v1/session.d.ts +0 -7657
  135. package/dist/v1/session.js +0 -535
  136. package/dist/vcs-event.d.ts +0 -76
  137. package/dist/vcs-event.js +0 -11
  138. package/dist/vcs.d.ts +0 -12
  139. package/dist/vcs.js +0 -10
  140. package/dist/workspace-event.d.ts +0 -247
  141. package/dist/workspace-event.js +0 -25
  142. package/dist/workspace-id.d.ts +0 -6
  143. package/dist/workspace-id.js +0 -16
  144. package/dist/workspace.d.ts +0 -9
  145. package/dist/workspace.js +0 -5
  146. package/dist/worktree-event.d.ts +0 -153
  147. package/dist/worktree-event.js +0 -18
@@ -1,423 +0,0 @@
1
- export * as SessionEvent from "./session-event.js";
2
- import { Schema } from "effect";
3
- import { optional } from "./schema.js";
4
- import { Event } from "./event.js";
5
- import { ProviderMetadata, ToolContent } from "./llm.js";
6
- import { Delivery } from "./session-delivery.js";
7
- import { Model } from "./model.js";
8
- import { NonNegativeInt, RelativePath } from "./schema.js";
9
- import { FileAttachment, Prompt } from "./prompt.js";
10
- import { SessionID } from "./session-id.js";
11
- import { Location } from "./location.js";
12
- import { SessionMessage } from "./session-message.js";
13
- import { Revert } from "./revert.js";
14
- import { Shell as ShellSchema } from "./shell.js";
15
- export { FileAttachment };
16
- export const Source = Schema.Struct({
17
- start: NonNegativeInt,
18
- end: NonNegativeInt,
19
- text: Schema.String,
20
- }).annotate({
21
- identifier: "session.event.source",
22
- });
23
- const Base = {
24
- sessionID: SessionID,
25
- };
26
- const PromptFields = {
27
- ...Base,
28
- inputID: SessionMessage.ID,
29
- prompt: Prompt,
30
- delivery: Delivery,
31
- };
32
- const options = {
33
- durable: {
34
- aggregate: "sessionID",
35
- version: 1,
36
- },
37
- };
38
- const stepSettlementOptions = {
39
- durable: {
40
- aggregate: "sessionID",
41
- version: 1,
42
- },
43
- };
44
- export const UnknownError = SessionMessage.UnknownError;
45
- export const AgentSelected = Event.durable({
46
- type: "session.agent.selected",
47
- ...options,
48
- schema: {
49
- ...Base,
50
- agent: Schema.String,
51
- },
52
- });
53
- export const ModelSelected = Event.durable({
54
- type: "session.model.selected",
55
- ...options,
56
- schema: {
57
- ...Base,
58
- model: Model.Ref,
59
- },
60
- });
61
- export const Moved = Event.durable({
62
- type: "session.moved",
63
- ...options,
64
- schema: {
65
- ...Base,
66
- location: Location.Ref,
67
- subpath: RelativePath.pipe(optional),
68
- },
69
- });
70
- export const Renamed = Event.durable({
71
- type: "session.renamed",
72
- ...options,
73
- schema: {
74
- ...Base,
75
- title: Schema.String,
76
- },
77
- });
78
- export const Forked = Event.durable({
79
- type: "session.forked",
80
- ...options,
81
- schema: {
82
- ...Base,
83
- parentID: SessionID,
84
- from: SessionMessage.ID.pipe(optional),
85
- },
86
- });
87
- export const PromptPromoted = Event.durable({
88
- type: "session.prompt.promoted",
89
- ...options,
90
- schema: {
91
- sessionID: SessionID,
92
- inputID: SessionMessage.ID,
93
- },
94
- });
95
- export const PromptAdmitted = Event.durable({
96
- type: "session.prompt.admitted",
97
- ...options,
98
- schema: PromptFields,
99
- });
100
- export const ExecutionSettled = Event.ephemeral({
101
- type: "session.execution.settled",
102
- schema: {
103
- ...Base,
104
- outcome: Schema.Literals(["success", "failure", "interrupted"]),
105
- error: UnknownError.pipe(optional),
106
- },
107
- });
108
- export const ContextUpdated = Event.durable({
109
- type: "session.context.updated",
110
- ...options,
111
- schema: {
112
- ...Base,
113
- text: Schema.String,
114
- },
115
- });
116
- export const Synthetic = Event.durable({
117
- type: "session.synthetic",
118
- ...options,
119
- schema: {
120
- ...Base,
121
- text: Schema.String,
122
- description: Schema.String.pipe(optional),
123
- metadata: Schema.Record(Schema.String, Schema.Unknown).pipe(optional),
124
- },
125
- });
126
- export var Skill;
127
- (function (Skill) {
128
- Skill.Activated = Event.durable({
129
- type: "session.skill.activated",
130
- ...options,
131
- schema: {
132
- ...Base,
133
- name: Schema.String,
134
- text: Schema.String,
135
- },
136
- });
137
- })(Skill || (Skill = {}));
138
- export var Shell;
139
- (function (Shell) {
140
- Shell.Started = Event.durable({
141
- type: "session.shell.started",
142
- ...options,
143
- schema: {
144
- ...Base,
145
- shell: ShellSchema.Info,
146
- },
147
- });
148
- Shell.Ended = Event.durable({
149
- type: "session.shell.ended",
150
- ...options,
151
- schema: {
152
- ...Base,
153
- shell: ShellSchema.Info,
154
- output: ShellSchema.Output,
155
- },
156
- });
157
- })(Shell || (Shell = {}));
158
- export var Step;
159
- (function (Step) {
160
- Step.Started = Event.durable({
161
- type: "session.step.started",
162
- ...options,
163
- schema: {
164
- ...Base,
165
- assistantMessageID: SessionMessage.ID,
166
- agent: Schema.String,
167
- model: Model.Ref,
168
- snapshot: Schema.String.pipe(optional),
169
- },
170
- });
171
- Step.Ended = Event.durable({
172
- type: "session.step.ended",
173
- ...stepSettlementOptions,
174
- schema: {
175
- ...Base,
176
- assistantMessageID: SessionMessage.ID,
177
- finish: Schema.String,
178
- cost: Schema.Finite,
179
- tokens: Schema.Struct({
180
- input: Schema.Finite,
181
- output: Schema.Finite,
182
- reasoning: Schema.Finite,
183
- cache: Schema.Struct({
184
- read: Schema.Finite,
185
- write: Schema.Finite,
186
- }),
187
- }),
188
- snapshot: Schema.String.pipe(optional),
189
- files: Schema.Array(RelativePath).pipe(optional),
190
- },
191
- });
192
- Step.Failed = Event.durable({
193
- type: "session.step.failed",
194
- ...stepSettlementOptions,
195
- schema: {
196
- ...Base,
197
- assistantMessageID: SessionMessage.ID,
198
- error: UnknownError,
199
- },
200
- });
201
- })(Step || (Step = {}));
202
- export var Text;
203
- (function (Text) {
204
- Text.Started = Event.durable({
205
- type: "session.text.started",
206
- ...options,
207
- schema: {
208
- ...Base,
209
- assistantMessageID: SessionMessage.ID,
210
- textID: Schema.String,
211
- },
212
- });
213
- // Stream fragments are live-only; Text.Ended is the replayable full-value boundary.
214
- Text.Delta = Event.ephemeral({
215
- type: "session.text.delta",
216
- schema: {
217
- ...Base,
218
- assistantMessageID: SessionMessage.ID,
219
- textID: Schema.String,
220
- delta: Schema.String,
221
- },
222
- });
223
- Text.Ended = Event.durable({
224
- type: "session.text.ended",
225
- ...options,
226
- schema: {
227
- ...Base,
228
- assistantMessageID: SessionMessage.ID,
229
- textID: Schema.String,
230
- text: Schema.String,
231
- },
232
- });
233
- })(Text || (Text = {}));
234
- export var Reasoning;
235
- (function (Reasoning) {
236
- Reasoning.Started = Event.durable({
237
- type: "session.reasoning.started",
238
- ...options,
239
- schema: {
240
- ...Base,
241
- assistantMessageID: SessionMessage.ID,
242
- reasoningID: Schema.String,
243
- providerMetadata: ProviderMetadata.pipe(optional),
244
- },
245
- });
246
- // Stream fragments are live-only; Reasoning.Ended is the replayable full-value boundary.
247
- Reasoning.Delta = Event.ephemeral({
248
- type: "session.reasoning.delta",
249
- schema: {
250
- ...Base,
251
- assistantMessageID: SessionMessage.ID,
252
- reasoningID: Schema.String,
253
- delta: Schema.String,
254
- },
255
- });
256
- Reasoning.Ended = Event.durable({
257
- type: "session.reasoning.ended",
258
- ...options,
259
- schema: {
260
- ...Base,
261
- assistantMessageID: SessionMessage.ID,
262
- reasoningID: Schema.String,
263
- text: Schema.String,
264
- providerMetadata: ProviderMetadata.pipe(optional),
265
- },
266
- });
267
- })(Reasoning || (Reasoning = {}));
268
- export var Tool;
269
- (function (Tool) {
270
- const ToolBase = {
271
- ...Base,
272
- assistantMessageID: SessionMessage.ID,
273
- callID: Schema.String,
274
- };
275
- let Input;
276
- (function (Input) {
277
- Input.Started = Event.durable({
278
- type: "session.tool.input.started",
279
- ...options,
280
- schema: {
281
- ...ToolBase,
282
- name: Schema.String,
283
- },
284
- });
285
- // Stream fragments are live-only; Input.Ended is the replayable raw-input boundary.
286
- Input.Delta = Event.ephemeral({
287
- type: "session.tool.input.delta",
288
- schema: {
289
- ...ToolBase,
290
- delta: Schema.String,
291
- },
292
- });
293
- Input.Ended = Event.durable({
294
- type: "session.tool.input.ended",
295
- ...options,
296
- schema: {
297
- ...ToolBase,
298
- text: Schema.String,
299
- },
300
- });
301
- })(Input = Tool.Input || (Tool.Input = {}));
302
- Tool.Called = Event.durable({
303
- type: "session.tool.called",
304
- ...options,
305
- schema: {
306
- ...ToolBase,
307
- tool: Schema.String,
308
- input: Schema.Record(Schema.String, Schema.Unknown),
309
- provider: Schema.Struct({
310
- executed: Schema.Boolean,
311
- metadata: ProviderMetadata.pipe(optional),
312
- }),
313
- },
314
- });
315
- /**
316
- * Replayable bounded running-tool state. Tools should checkpoint semantic
317
- * transitions or at a bounded cadence, not persist every stdout/stderr chunk.
318
- */
319
- Tool.Progress = Event.durable({
320
- type: "session.tool.progress",
321
- ...options,
322
- schema: {
323
- ...ToolBase,
324
- structured: Schema.Record(Schema.String, Schema.Unknown),
325
- content: Schema.Array(ToolContent),
326
- },
327
- });
328
- Tool.Success = Event.durable({
329
- type: "session.tool.success",
330
- ...options,
331
- schema: {
332
- ...ToolBase,
333
- structured: Schema.Record(Schema.String, Schema.Unknown),
334
- content: Schema.Array(ToolContent),
335
- outputPaths: Schema.Array(Schema.String).pipe(optional),
336
- result: Schema.Unknown.pipe(optional),
337
- provider: Schema.Struct({
338
- executed: Schema.Boolean,
339
- metadata: ProviderMetadata.pipe(optional),
340
- }),
341
- },
342
- });
343
- Tool.Failed = Event.durable({
344
- type: "session.tool.failed",
345
- ...options,
346
- schema: {
347
- ...ToolBase,
348
- error: UnknownError,
349
- result: Schema.Unknown.pipe(optional),
350
- provider: Schema.Struct({
351
- executed: Schema.Boolean,
352
- metadata: ProviderMetadata.pipe(optional),
353
- }),
354
- },
355
- });
356
- })(Tool || (Tool = {}));
357
- export const RetryError = Schema.Struct({
358
- message: Schema.String,
359
- statusCode: Schema.Finite.pipe(optional),
360
- isRetryable: Schema.Boolean,
361
- responseHeaders: Schema.Record(Schema.String, Schema.String).pipe(optional),
362
- responseBody: Schema.String.pipe(optional),
363
- metadata: Schema.Record(Schema.String, Schema.String).pipe(optional),
364
- }).annotate({
365
- identifier: "session.retry.error",
366
- });
367
- export const Retried = Event.durable({
368
- type: "session.retried",
369
- ...options,
370
- schema: {
371
- ...Base,
372
- attempt: Schema.Finite,
373
- error: RetryError,
374
- },
375
- });
376
- export var Compaction;
377
- (function (Compaction) {
378
- Compaction.Started = Event.durable({
379
- type: "session.compaction.started",
380
- ...options,
381
- schema: {
382
- ...Base,
383
- reason: Schema.Union([Schema.Literal("auto"), Schema.Literal("manual")]),
384
- },
385
- });
386
- Compaction.Delta = Event.ephemeral({
387
- type: "session.compaction.delta",
388
- schema: {
389
- ...Base,
390
- text: Schema.String,
391
- },
392
- });
393
- Compaction.Ended = Event.durable({
394
- type: "session.compaction.ended",
395
- ...options,
396
- schema: {
397
- ...Base,
398
- reason: Compaction.Started.data.fields.reason,
399
- text: Schema.String,
400
- recent: Schema.String,
401
- },
402
- });
403
- })(Compaction || (Compaction = {}));
404
- export var RevertEvent;
405
- (function (RevertEvent) {
406
- RevertEvent.Staged = Event.durable({
407
- type: "session.revert.staged",
408
- ...options,
409
- schema: { ...Base, revert: Revert.State },
410
- });
411
- RevertEvent.Cleared = Event.durable({ type: "session.revert.cleared", ...options, schema: Base });
412
- RevertEvent.Committed = Event.durable({
413
- type: "session.revert.committed",
414
- ...options,
415
- schema: { ...Base, messageID: SessionMessage.ID },
416
- });
417
- })(RevertEvent || (RevertEvent = {}));
418
- export const Definitions = Event.inventory(AgentSelected, ModelSelected, Moved, Renamed, Forked, PromptPromoted, PromptAdmitted, ExecutionSettled, ContextUpdated, Synthetic, Skill.Activated, Shell.Started, Shell.Ended, Step.Started, Step.Ended, Step.Failed, Text.Started, Text.Delta, Text.Ended, Reasoning.Started, Reasoning.Delta, Reasoning.Ended, Tool.Input.Started, Tool.Input.Delta, Tool.Input.Ended, Tool.Called, Tool.Progress, Tool.Success, Tool.Failed, Retried, Compaction.Started, Compaction.Delta, Compaction.Ended, RevertEvent.Staged, RevertEvent.Cleared, RevertEvent.Committed);
419
- export const DurableDefinitions = Event.inventory(...Definitions.filter((definition) => definition.durability === "durable"));
420
- export const Durable = Schema.Union(DurableDefinitions, { mode: "oneOf" })
421
- .pipe(Schema.toTaggedUnion("type"))
422
- .annotate({ identifier: "SessionDurableEvent" });
423
- export const All = Schema.Union(Definitions, { mode: "oneOf" }).pipe(Schema.toTaggedUnion("type"));
@@ -1,6 +0,0 @@
1
- import { Schema } from "effect";
2
- export declare const SessionID: Schema.brand<Schema.String, "SessionID"> & {
3
- create: () => string & import("effect/Brand").Brand<"SessionID">;
4
- descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
5
- };
6
- export type SessionID = typeof SessionID.Type;
@@ -1,10 +0,0 @@
1
- import { Schema } from "effect";
2
- import { descending } from "./identifier.js";
3
- import { statics } from "./schema.js";
4
- export const SessionID = Schema.String.check(Schema.isStartsWith("ses")).pipe(Schema.brand("SessionID"), statics((schema) => {
5
- const create = () => schema.make("ses_" + descending());
6
- return {
7
- create,
8
- descending: (id) => (id === undefined ? create() : schema.make(id)),
9
- };
10
- }));
@@ -1,146 +0,0 @@
1
- export * as SessionInput from "./session-input.js";
2
- import { Schema } from "effect";
3
- import { Prompt } from "./prompt.js";
4
- import { SessionDelivery } from "./session-delivery.js";
5
- export declare const Delivery: Schema.Literals<readonly ["steer", "queue"]>;
6
- export type Delivery = SessionDelivery.Delivery;
7
- export interface Admitted extends Schema.Schema.Type<typeof Admitted> {
8
- }
9
- export declare const Admitted: Schema.Struct<{
10
- readonly admittedSeq: Schema.Int;
11
- readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
12
- create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
13
- fromEvent: (eventID: import("./event.js").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
14
- };
15
- readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
16
- create: () => string & import("effect/Brand").Brand<"SessionID">;
17
- descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
18
- };
19
- readonly prompt: Schema.Struct<{
20
- readonly text: Schema.String;
21
- readonly files: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
22
- readonly uri: Schema.String;
23
- readonly mime: Schema.String;
24
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
25
- readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
26
- readonly source: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
27
- readonly start: Schema.Finite;
28
- readonly end: Schema.Finite;
29
- readonly text: Schema.String;
30
- }>>>, Schema.optionalKey<Schema.Struct<{
31
- readonly start: Schema.Finite;
32
- readonly end: Schema.Finite;
33
- readonly text: Schema.String;
34
- }>>, never, never>;
35
- }> & {
36
- create: (input: import("./prompt.js").FileAttachment) => {
37
- readonly uri: string;
38
- readonly mime: string;
39
- readonly name?: string | undefined;
40
- readonly description?: string | undefined;
41
- readonly source?: {
42
- readonly start: number;
43
- readonly end: number;
44
- readonly text: string;
45
- } | undefined;
46
- };
47
- }>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
48
- readonly uri: Schema.String;
49
- readonly mime: Schema.String;
50
- readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
51
- readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
52
- readonly source: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
53
- readonly start: Schema.Finite;
54
- readonly end: Schema.Finite;
55
- readonly text: Schema.String;
56
- }>>>, Schema.optionalKey<Schema.Struct<{
57
- readonly start: Schema.Finite;
58
- readonly end: Schema.Finite;
59
- readonly text: Schema.String;
60
- }>>, never, never>;
61
- }> & {
62
- create: (input: import("./prompt.js").FileAttachment) => {
63
- readonly uri: string;
64
- readonly mime: string;
65
- readonly name?: string | undefined;
66
- readonly description?: string | undefined;
67
- readonly source?: {
68
- readonly start: number;
69
- readonly end: number;
70
- readonly text: string;
71
- } | undefined;
72
- };
73
- }>>, never, never>;
74
- readonly agents: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
75
- readonly name: Schema.String;
76
- readonly source: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
77
- readonly start: Schema.Finite;
78
- readonly end: Schema.Finite;
79
- readonly text: Schema.String;
80
- }>>>, Schema.optionalKey<Schema.Struct<{
81
- readonly start: Schema.Finite;
82
- readonly end: Schema.Finite;
83
- readonly text: Schema.String;
84
- }>>, never, never>;
85
- }>>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
86
- readonly name: Schema.String;
87
- readonly source: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
88
- readonly start: Schema.Finite;
89
- readonly end: Schema.Finite;
90
- readonly text: Schema.String;
91
- }>>>, Schema.optionalKey<Schema.Struct<{
92
- readonly start: Schema.Finite;
93
- readonly end: Schema.Finite;
94
- readonly text: Schema.String;
95
- }>>, never, never>;
96
- }>>>, never, never>;
97
- }> & {
98
- equivalence: import("effect/Equivalence").Equivalence<{
99
- readonly text: string;
100
- readonly files?: readonly {
101
- readonly uri: string;
102
- readonly mime: string;
103
- readonly name?: string | undefined;
104
- readonly description?: string | undefined;
105
- readonly source?: {
106
- readonly start: number;
107
- readonly end: number;
108
- readonly text: string;
109
- } | undefined;
110
- }[] | undefined;
111
- readonly agents?: readonly {
112
- readonly name: string;
113
- readonly source?: {
114
- readonly start: number;
115
- readonly end: number;
116
- readonly text: string;
117
- } | undefined;
118
- }[] | undefined;
119
- }>;
120
- fromUserMessage: (input: Pick<Prompt, "text" | "files" | "agents">) => {
121
- readonly text: string;
122
- readonly files?: readonly {
123
- readonly uri: string;
124
- readonly mime: string;
125
- readonly name?: string | undefined;
126
- readonly description?: string | undefined;
127
- readonly source?: {
128
- readonly start: number;
129
- readonly end: number;
130
- readonly text: string;
131
- } | undefined;
132
- }[] | undefined;
133
- readonly agents?: readonly {
134
- readonly name: string;
135
- readonly source?: {
136
- readonly start: number;
137
- readonly end: number;
138
- readonly text: string;
139
- } | undefined;
140
- }[] | undefined;
141
- };
142
- };
143
- readonly delivery: Schema.Literals<readonly ["steer", "queue"]>;
144
- readonly timeCreated: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
145
- readonly promotedSeq: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
146
- }>;
@@ -1,18 +0,0 @@
1
- export * as SessionInput from "./session-input.js";
2
- import { Schema } from "effect";
3
- import { optional } from "./schema.js";
4
- import { Prompt } from "./prompt.js";
5
- import { DateTimeUtcFromMillis, NonNegativeInt } from "./schema.js";
6
- import { SessionDelivery } from "./session-delivery.js";
7
- import { SessionID } from "./session-id.js";
8
- import { SessionMessage } from "./session-message.js";
9
- export const Delivery = SessionDelivery.Delivery;
10
- export const Admitted = Schema.Struct({
11
- admittedSeq: NonNegativeInt,
12
- id: SessionMessage.ID,
13
- sessionID: SessionID,
14
- prompt: Prompt,
15
- delivery: Delivery,
16
- timeCreated: DateTimeUtcFromMillis,
17
- promotedSeq: NonNegativeInt.pipe(optional),
18
- }).annotate({ identifier: "SessionInput.Admitted" });