@opencode/schema 0.0.0-dev-20465 → 0.0.0-dev-20470

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.
@@ -2,7 +2,6 @@ export * as EventManifest from "./event-manifest.js";
2
2
  import { Schema } from "effect";
3
3
  import { Durable } from "./durable-event-manifest.js";
4
4
  import { Event } from "./event.js";
5
- import { SessionEvent } from "./session-event.js";
6
5
  export declare const ServerDefinitions: readonly [Schema.Struct<{
7
6
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
8
7
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
@@ -1349,7 +1348,7 @@ export declare const ServerDefinitions: readonly [Schema.Struct<{
1349
1348
  readonly text: Schema.String;
1350
1349
  }>>, never, never>;
1351
1350
  }> & {
1352
- create: (input: SessionEvent.FileAttachment) => {
1351
+ create: (input: import("./prompt.js").FileAttachment) => {
1353
1352
  readonly data: string;
1354
1353
  readonly source: {
1355
1354
  readonly type: "inline";
@@ -1387,7 +1386,7 @@ export declare const ServerDefinitions: readonly [Schema.Struct<{
1387
1386
  readonly text: Schema.String;
1388
1387
  }>>, never, never>;
1389
1388
  }> & {
1390
- create: (input: SessionEvent.FileAttachment) => {
1389
+ create: (input: import("./prompt.js").FileAttachment) => {
1391
1390
  readonly data: string;
1392
1391
  readonly source: {
1393
1392
  readonly type: "inline";
@@ -1532,7 +1531,7 @@ export declare const ServerDefinitions: readonly [Schema.Struct<{
1532
1531
  readonly text: Schema.String;
1533
1532
  }>>, never, never>;
1534
1533
  }> & {
1535
- create: (input: SessionEvent.FileAttachment) => {
1534
+ create: (input: import("./prompt.js").FileAttachment) => {
1536
1535
  readonly data: string;
1537
1536
  readonly source: {
1538
1537
  readonly type: "inline";
@@ -1570,7 +1569,7 @@ export declare const ServerDefinitions: readonly [Schema.Struct<{
1570
1569
  readonly text: Schema.String;
1571
1570
  }>>, never, never>;
1572
1571
  }> & {
1573
- create: (input: SessionEvent.FileAttachment) => {
1572
+ create: (input: import("./prompt.js").FileAttachment) => {
1574
1573
  readonly data: string;
1575
1574
  readonly source: {
1576
1575
  readonly type: "inline";
@@ -7685,7 +7684,7 @@ export declare const Definitions: readonly [Schema.Struct<{
7685
7684
  readonly text: Schema.String;
7686
7685
  }>>, never, never>;
7687
7686
  }> & {
7688
- create: (input: SessionEvent.FileAttachment) => {
7687
+ create: (input: import("./prompt.js").FileAttachment) => {
7689
7688
  readonly data: string;
7690
7689
  readonly source: {
7691
7690
  readonly type: "inline";
@@ -7723,7 +7722,7 @@ export declare const Definitions: readonly [Schema.Struct<{
7723
7722
  readonly text: Schema.String;
7724
7723
  }>>, never, never>;
7725
7724
  }> & {
7726
- create: (input: SessionEvent.FileAttachment) => {
7725
+ create: (input: import("./prompt.js").FileAttachment) => {
7727
7726
  readonly data: string;
7728
7727
  readonly source: {
7729
7728
  readonly type: "inline";
@@ -7868,7 +7867,7 @@ export declare const Definitions: readonly [Schema.Struct<{
7868
7867
  readonly text: Schema.String;
7869
7868
  }>>, never, never>;
7870
7869
  }> & {
7871
- create: (input: SessionEvent.FileAttachment) => {
7870
+ create: (input: import("./prompt.js").FileAttachment) => {
7872
7871
  readonly data: string;
7873
7872
  readonly source: {
7874
7873
  readonly type: "inline";
@@ -7906,7 +7905,7 @@ export declare const Definitions: readonly [Schema.Struct<{
7906
7905
  readonly text: Schema.String;
7907
7906
  }>>, never, never>;
7908
7907
  }> & {
7909
- create: (input: SessionEvent.FileAttachment) => {
7908
+ create: (input: import("./prompt.js").FileAttachment) => {
7910
7909
  readonly data: string;
7911
7910
  readonly source: {
7912
7911
  readonly type: "inline";
@@ -1,8 +1,6 @@
1
1
  export * as SessionEvent from "./session-event.js";
2
2
  import { Schema } from "effect";
3
3
  import { Event } from "./event.js";
4
- import { FileAttachment } from "./prompt.js";
5
- export { FileAttachment };
6
4
  export declare const Source: Schema.Struct<{
7
5
  readonly start: Schema.Int;
8
6
  readonly end: Schema.Int;
@@ -1416,7 +1414,7 @@ export declare const InboxEnqueued: Schema.Struct<{
1416
1414
  readonly text: Schema.String;
1417
1415
  }>>, never, never>;
1418
1416
  }> & {
1419
- create: (input: FileAttachment) => {
1417
+ create: (input: import("./prompt.js").FileAttachment) => {
1420
1418
  readonly data: string;
1421
1419
  readonly source: {
1422
1420
  readonly type: "inline";
@@ -1454,7 +1452,7 @@ export declare const InboxEnqueued: Schema.Struct<{
1454
1452
  readonly text: Schema.String;
1455
1453
  }>>, never, never>;
1456
1454
  }> & {
1457
- create: (input: FileAttachment) => {
1455
+ create: (input: import("./prompt.js").FileAttachment) => {
1458
1456
  readonly data: string;
1459
1457
  readonly source: {
1460
1458
  readonly type: "inline";
@@ -1599,7 +1597,7 @@ export declare const InboxEnqueued: Schema.Struct<{
1599
1597
  readonly text: Schema.String;
1600
1598
  }>>, never, never>;
1601
1599
  }> & {
1602
- create: (input: FileAttachment) => {
1600
+ create: (input: import("./prompt.js").FileAttachment) => {
1603
1601
  readonly data: string;
1604
1602
  readonly source: {
1605
1603
  readonly type: "inline";
@@ -1637,7 +1635,7 @@ export declare const InboxEnqueued: Schema.Struct<{
1637
1635
  readonly text: Schema.String;
1638
1636
  }>>, never, never>;
1639
1637
  }> & {
1640
- create: (input: FileAttachment) => {
1638
+ create: (input: import("./prompt.js").FileAttachment) => {
1641
1639
  readonly data: string;
1642
1640
  readonly source: {
1643
1641
  readonly type: "inline";
@@ -5697,7 +5695,7 @@ export declare const Definitions: readonly [Schema.Struct<{
5697
5695
  readonly text: Schema.String;
5698
5696
  }>>, never, never>;
5699
5697
  }> & {
5700
- create: (input: FileAttachment) => {
5698
+ create: (input: import("./prompt.js").FileAttachment) => {
5701
5699
  readonly data: string;
5702
5700
  readonly source: {
5703
5701
  readonly type: "inline";
@@ -5735,7 +5733,7 @@ export declare const Definitions: readonly [Schema.Struct<{
5735
5733
  readonly text: Schema.String;
5736
5734
  }>>, never, never>;
5737
5735
  }> & {
5738
- create: (input: FileAttachment) => {
5736
+ create: (input: import("./prompt.js").FileAttachment) => {
5739
5737
  readonly data: string;
5740
5738
  readonly source: {
5741
5739
  readonly type: "inline";
@@ -5880,7 +5878,7 @@ export declare const Definitions: readonly [Schema.Struct<{
5880
5878
  readonly text: Schema.String;
5881
5879
  }>>, never, never>;
5882
5880
  }> & {
5883
- create: (input: FileAttachment) => {
5881
+ create: (input: import("./prompt.js").FileAttachment) => {
5884
5882
  readonly data: string;
5885
5883
  readonly source: {
5886
5884
  readonly type: "inline";
@@ -5918,7 +5916,7 @@ export declare const Definitions: readonly [Schema.Struct<{
5918
5916
  readonly text: Schema.String;
5919
5917
  }>>, never, never>;
5920
5918
  }> & {
5921
- create: (input: FileAttachment) => {
5919
+ create: (input: import("./prompt.js").FileAttachment) => {
5922
5920
  readonly data: string;
5923
5921
  readonly source: {
5924
5922
  readonly type: "inline";
@@ -9814,7 +9812,7 @@ export declare const DurableDefinitions: readonly [...((Schema.Struct<{
9814
9812
  readonly text: Schema.String;
9815
9813
  }>>, never, never>;
9816
9814
  }> & {
9817
- create: (input: FileAttachment) => {
9815
+ create: (input: import("./prompt.js").FileAttachment) => {
9818
9816
  readonly data: string;
9819
9817
  readonly source: {
9820
9818
  readonly type: "inline";
@@ -9852,7 +9850,7 @@ export declare const DurableDefinitions: readonly [...((Schema.Struct<{
9852
9850
  readonly text: Schema.String;
9853
9851
  }>>, never, never>;
9854
9852
  }> & {
9855
- create: (input: FileAttachment) => {
9853
+ create: (input: import("./prompt.js").FileAttachment) => {
9856
9854
  readonly data: string;
9857
9855
  readonly source: {
9858
9856
  readonly type: "inline";
@@ -9997,7 +9995,7 @@ export declare const DurableDefinitions: readonly [...((Schema.Struct<{
9997
9995
  readonly text: Schema.String;
9998
9996
  }>>, never, never>;
9999
9997
  }> & {
10000
- create: (input: FileAttachment) => {
9998
+ create: (input: import("./prompt.js").FileAttachment) => {
10001
9999
  readonly data: string;
10002
10000
  readonly source: {
10003
10001
  readonly type: "inline";
@@ -10035,7 +10033,7 @@ export declare const DurableDefinitions: readonly [...((Schema.Struct<{
10035
10033
  readonly text: Schema.String;
10036
10034
  }>>, never, never>;
10037
10035
  }> & {
10038
- create: (input: FileAttachment) => {
10036
+ create: (input: import("./prompt.js").FileAttachment) => {
10039
10037
  readonly data: string;
10040
10038
  readonly source: {
10041
10039
  readonly type: "inline";
@@ -14292,7 +14290,7 @@ export declare const Durable: Schema.Union<readonly [...((Schema.Struct<{
14292
14290
  readonly text: Schema.String;
14293
14291
  }>>, never, never>;
14294
14292
  }> & {
14295
- create: (input: FileAttachment) => {
14293
+ create: (input: import("./prompt.js").FileAttachment) => {
14296
14294
  readonly data: string;
14297
14295
  readonly source: {
14298
14296
  readonly type: "inline";
@@ -14330,7 +14328,7 @@ export declare const Durable: Schema.Union<readonly [...((Schema.Struct<{
14330
14328
  readonly text: Schema.String;
14331
14329
  }>>, never, never>;
14332
14330
  }> & {
14333
- create: (input: FileAttachment) => {
14331
+ create: (input: import("./prompt.js").FileAttachment) => {
14334
14332
  readonly data: string;
14335
14333
  readonly source: {
14336
14334
  readonly type: "inline";
@@ -14475,7 +14473,7 @@ export declare const Durable: Schema.Union<readonly [...((Schema.Struct<{
14475
14473
  readonly text: Schema.String;
14476
14474
  }>>, never, never>;
14477
14475
  }> & {
14478
- create: (input: FileAttachment) => {
14476
+ create: (input: import("./prompt.js").FileAttachment) => {
14479
14477
  readonly data: string;
14480
14478
  readonly source: {
14481
14479
  readonly type: "inline";
@@ -14513,7 +14511,7 @@ export declare const Durable: Schema.Union<readonly [...((Schema.Struct<{
14513
14511
  readonly text: Schema.String;
14514
14512
  }>>, never, never>;
14515
14513
  }> & {
14516
- create: (input: FileAttachment) => {
14514
+ create: (input: import("./prompt.js").FileAttachment) => {
14517
14515
  readonly data: string;
14518
14516
  readonly source: {
14519
14517
  readonly type: "inline";
@@ -18444,7 +18442,7 @@ export declare const All: Schema.toTaggedUnion<"type", readonly [Schema.Union<re
18444
18442
  readonly text: Schema.String;
18445
18443
  }>>, never, never>;
18446
18444
  }> & {
18447
- create: (input: FileAttachment) => {
18445
+ create: (input: import("./prompt.js").FileAttachment) => {
18448
18446
  readonly data: string;
18449
18447
  readonly source: {
18450
18448
  readonly type: "inline";
@@ -18482,7 +18480,7 @@ export declare const All: Schema.toTaggedUnion<"type", readonly [Schema.Union<re
18482
18480
  readonly text: Schema.String;
18483
18481
  }>>, never, never>;
18484
18482
  }> & {
18485
- create: (input: FileAttachment) => {
18483
+ create: (input: import("./prompt.js").FileAttachment) => {
18486
18484
  readonly data: string;
18487
18485
  readonly source: {
18488
18486
  readonly type: "inline";
@@ -18627,7 +18625,7 @@ export declare const All: Schema.toTaggedUnion<"type", readonly [Schema.Union<re
18627
18625
  readonly text: Schema.String;
18628
18626
  }>>, never, never>;
18629
18627
  }> & {
18630
- create: (input: FileAttachment) => {
18628
+ create: (input: import("./prompt.js").FileAttachment) => {
18631
18629
  readonly data: string;
18632
18630
  readonly source: {
18633
18631
  readonly type: "inline";
@@ -18665,7 +18663,7 @@ export declare const All: Schema.toTaggedUnion<"type", readonly [Schema.Union<re
18665
18663
  readonly text: Schema.String;
18666
18664
  }>>, never, never>;
18667
18665
  }> & {
18668
- create: (input: FileAttachment) => {
18666
+ create: (input: import("./prompt.js").FileAttachment) => {
18669
18667
  readonly data: string;
18670
18668
  readonly source: {
18671
18669
  readonly type: "inline";
@@ -6,7 +6,6 @@ import { FinishReason } from "./llm.js";
6
6
  import { Content } from "./tool.js";
7
7
  import { Model } from "./model.js";
8
8
  import { NonNegativeInt, PositiveInt, RelativePath } from "./schema.js";
9
- import { FileAttachment } from "./prompt.js";
10
9
  import { SessionID } from "./session-id.js";
11
10
  import { SessionMetadata } from "./session-metadata.js";
12
11
  import { Location } from "./location.js";
@@ -25,7 +24,6 @@ import { SessionInbox } from "./session-inbox.js";
25
24
  import { Project } from "./project.js";
26
25
  import { SessionFork } from "./session-fork.js";
27
26
  import { Permission } from "./permission.js";
28
- export { FileAttachment };
29
27
  export const Source = Schema.Struct({
30
28
  start: NonNegativeInt,
31
29
  end: NonNegativeInt,
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-20465",
4
+ "version": "0.0.0-dev-20470",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -1 +0,0 @@
1
- export * from "./v1/question.js";
@@ -1 +0,0 @@
1
- export * from "./v1/question.js";
@@ -1,444 +0,0 @@
1
- export * as QuestionV1 from "./question.js";
2
- import { Schema } from "effect";
3
- export declare const ID: Schema.brand<Schema.String, "QuestionV1.ID"> & {
4
- ascending: (id?: string) => string & import("effect/Brand").Brand<"QuestionV1.ID">;
5
- };
6
- export declare const Option: Schema.Struct<{
7
- readonly label: Schema.String;
8
- readonly description: Schema.String;
9
- }>;
10
- export declare const Info: Schema.Struct<{
11
- readonly custom: Schema.optional<Schema.Boolean>;
12
- readonly question: Schema.String;
13
- readonly header: Schema.String;
14
- readonly options: Schema.$Array<Schema.Struct<{
15
- readonly label: Schema.String;
16
- readonly description: Schema.String;
17
- }>>;
18
- readonly multiple: Schema.optional<Schema.Boolean>;
19
- }>;
20
- export declare const Prompt: Schema.Struct<{
21
- question: Schema.String;
22
- header: Schema.String;
23
- options: Schema.$Array<Schema.Struct<{
24
- readonly label: Schema.String;
25
- readonly description: Schema.String;
26
- }>>;
27
- multiple: Schema.optional<Schema.Boolean>;
28
- }>;
29
- export declare const Tool: Schema.Struct<{
30
- readonly messageID: Schema.brand<Schema.String, "SessionV1.MessageID"> & {
31
- ascending: (id?: string) => string & import("effect/Brand").Brand<"SessionV1.MessageID">;
32
- };
33
- readonly callID: Schema.String;
34
- }>;
35
- export declare const Request: Schema.Struct<{
36
- readonly id: Schema.brand<Schema.String, "QuestionV1.ID"> & {
37
- ascending: (id?: string) => string & import("effect/Brand").Brand<"QuestionV1.ID">;
38
- };
39
- readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
40
- create: () => string & import("effect/Brand").Brand<"SessionID">;
41
- descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
42
- };
43
- readonly questions: Schema.$Array<Schema.Struct<{
44
- readonly custom: Schema.optional<Schema.Boolean>;
45
- readonly question: Schema.String;
46
- readonly header: Schema.String;
47
- readonly options: Schema.$Array<Schema.Struct<{
48
- readonly label: Schema.String;
49
- readonly description: Schema.String;
50
- }>>;
51
- readonly multiple: Schema.optional<Schema.Boolean>;
52
- }>>;
53
- readonly tool: Schema.optional<Schema.Struct<{
54
- readonly messageID: Schema.brand<Schema.String, "SessionV1.MessageID"> & {
55
- ascending: (id?: string) => string & import("effect/Brand").Brand<"SessionV1.MessageID">;
56
- };
57
- readonly callID: Schema.String;
58
- }>>;
59
- }>;
60
- export declare const Answer: Schema.$Array<Schema.String>;
61
- export declare const Reply: Schema.Struct<{
62
- readonly answers: Schema.$Array<Schema.$Array<Schema.String>>;
63
- }>;
64
- export declare const Replied: Schema.Struct<{
65
- readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
66
- create: () => string & import("effect/Brand").Brand<"SessionID">;
67
- descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
68
- };
69
- readonly requestID: Schema.brand<Schema.String, "QuestionV1.ID"> & {
70
- ascending: (id?: string) => string & import("effect/Brand").Brand<"QuestionV1.ID">;
71
- };
72
- readonly answers: Schema.$Array<Schema.$Array<Schema.String>>;
73
- }>;
74
- export declare const Rejected: Schema.Struct<{
75
- readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
76
- create: () => string & import("effect/Brand").Brand<"SessionID">;
77
- descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
78
- };
79
- readonly requestID: Schema.brand<Schema.String, "QuestionV1.ID"> & {
80
- ascending: (id?: string) => string & import("effect/Brand").Brand<"QuestionV1.ID">;
81
- };
82
- }>;
83
- export declare const Event: {
84
- Asked: 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<"question.asked">;
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
- readonly id: Schema.brand<Schema.String, "QuestionV1.ID"> & {
112
- ascending: (id?: string) => string & import("effect/Brand").Brand<"QuestionV1.ID">;
113
- };
114
- readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
115
- create: () => string & import("effect/Brand").Brand<"SessionID">;
116
- descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
117
- };
118
- readonly questions: Schema.$Array<Schema.Struct<{
119
- readonly custom: Schema.optional<Schema.Boolean>;
120
- readonly question: Schema.String;
121
- readonly header: Schema.String;
122
- readonly options: Schema.$Array<Schema.Struct<{
123
- readonly label: Schema.String;
124
- readonly description: Schema.String;
125
- }>>;
126
- readonly multiple: Schema.optional<Schema.Boolean>;
127
- }>>;
128
- readonly tool: Schema.optional<Schema.Struct<{
129
- readonly messageID: Schema.brand<Schema.String, "SessionV1.MessageID"> & {
130
- ascending: (id?: string) => string & import("effect/Brand").Brand<"SessionV1.MessageID">;
131
- };
132
- readonly callID: Schema.String;
133
- }>>;
134
- }>;
135
- }> & {
136
- type: "question.asked";
137
- durability: "ephemeral";
138
- durable: undefined;
139
- data: Schema.Struct<{
140
- readonly id: Schema.brand<Schema.String, "QuestionV1.ID"> & {
141
- ascending: (id?: string) => string & import("effect/Brand").Brand<"QuestionV1.ID">;
142
- };
143
- readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
144
- create: () => string & import("effect/Brand").Brand<"SessionID">;
145
- descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
146
- };
147
- readonly questions: Schema.$Array<Schema.Struct<{
148
- readonly custom: Schema.optional<Schema.Boolean>;
149
- readonly question: Schema.String;
150
- readonly header: Schema.String;
151
- readonly options: Schema.$Array<Schema.Struct<{
152
- readonly label: Schema.String;
153
- readonly description: Schema.String;
154
- }>>;
155
- readonly multiple: Schema.optional<Schema.Boolean>;
156
- }>>;
157
- readonly tool: Schema.optional<Schema.Struct<{
158
- readonly messageID: Schema.brand<Schema.String, "SessionV1.MessageID"> & {
159
- ascending: (id?: string) => string & import("effect/Brand").Brand<"SessionV1.MessageID">;
160
- };
161
- readonly callID: Schema.String;
162
- }>>;
163
- }>;
164
- };
165
- Replied: Schema.Struct<{
166
- readonly id: Schema.brand<Schema.String, "Event.ID"> & {
167
- create: () => string & import("effect/Brand").Brand<"Event.ID">;
168
- };
169
- readonly created: Schema.Finite;
170
- readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
171
- readonly type: Schema.Literal<"question.replied">;
172
- readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
173
- readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
174
- readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
175
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
176
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
177
- }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
178
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
179
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
180
- }>, never, never>;
181
- }>>>, Schema.optionalKey<Schema.Struct<{
182
- readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
183
- readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
184
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
185
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
186
- }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
187
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
188
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
189
- }>, never, never>;
190
- }>>, never, never>;
191
- readonly data: Schema.Struct<{
192
- readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
193
- create: () => string & import("effect/Brand").Brand<"SessionID">;
194
- descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
195
- };
196
- readonly requestID: Schema.brand<Schema.String, "QuestionV1.ID"> & {
197
- ascending: (id?: string) => string & import("effect/Brand").Brand<"QuestionV1.ID">;
198
- };
199
- readonly answers: Schema.$Array<Schema.$Array<Schema.String>>;
200
- }>;
201
- }> & {
202
- type: "question.replied";
203
- durability: "ephemeral";
204
- durable: undefined;
205
- data: Schema.Struct<{
206
- readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
207
- create: () => string & import("effect/Brand").Brand<"SessionID">;
208
- descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
209
- };
210
- readonly requestID: Schema.brand<Schema.String, "QuestionV1.ID"> & {
211
- ascending: (id?: string) => string & import("effect/Brand").Brand<"QuestionV1.ID">;
212
- };
213
- readonly answers: Schema.$Array<Schema.$Array<Schema.String>>;
214
- }>;
215
- };
216
- Rejected: Schema.Struct<{
217
- readonly id: Schema.brand<Schema.String, "Event.ID"> & {
218
- create: () => string & import("effect/Brand").Brand<"Event.ID">;
219
- };
220
- readonly created: Schema.Finite;
221
- readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
222
- readonly type: Schema.Literal<"question.rejected">;
223
- readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
224
- readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
225
- readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
226
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
227
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
228
- }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
229
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
230
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
231
- }>, never, never>;
232
- }>>>, Schema.optionalKey<Schema.Struct<{
233
- readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
234
- readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
235
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
236
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
237
- }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
238
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
239
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
240
- }>, never, never>;
241
- }>>, never, never>;
242
- readonly data: Schema.Struct<{
243
- readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
244
- create: () => string & import("effect/Brand").Brand<"SessionID">;
245
- descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
246
- };
247
- readonly requestID: Schema.brand<Schema.String, "QuestionV1.ID"> & {
248
- ascending: (id?: string) => string & import("effect/Brand").Brand<"QuestionV1.ID">;
249
- };
250
- }>;
251
- }> & {
252
- type: "question.rejected";
253
- durability: "ephemeral";
254
- durable: undefined;
255
- data: Schema.Struct<{
256
- readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
257
- create: () => string & import("effect/Brand").Brand<"SessionID">;
258
- descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
259
- };
260
- readonly requestID: Schema.brand<Schema.String, "QuestionV1.ID"> & {
261
- ascending: (id?: string) => string & import("effect/Brand").Brand<"QuestionV1.ID">;
262
- };
263
- }>;
264
- };
265
- Definitions: readonly [Schema.Struct<{
266
- readonly id: Schema.brand<Schema.String, "Event.ID"> & {
267
- create: () => string & import("effect/Brand").Brand<"Event.ID">;
268
- };
269
- readonly created: Schema.Finite;
270
- readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
271
- readonly type: Schema.Literal<"question.asked">;
272
- readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
273
- readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
274
- readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
275
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
276
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
277
- }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
278
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
279
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
280
- }>, never, never>;
281
- }>>>, Schema.optionalKey<Schema.Struct<{
282
- readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
283
- readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
284
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
285
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
286
- }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
287
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
288
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
289
- }>, never, never>;
290
- }>>, never, never>;
291
- readonly data: Schema.Struct<{
292
- readonly id: Schema.brand<Schema.String, "QuestionV1.ID"> & {
293
- ascending: (id?: string) => string & import("effect/Brand").Brand<"QuestionV1.ID">;
294
- };
295
- readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
296
- create: () => string & import("effect/Brand").Brand<"SessionID">;
297
- descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
298
- };
299
- readonly questions: Schema.$Array<Schema.Struct<{
300
- readonly custom: Schema.optional<Schema.Boolean>;
301
- readonly question: Schema.String;
302
- readonly header: Schema.String;
303
- readonly options: Schema.$Array<Schema.Struct<{
304
- readonly label: Schema.String;
305
- readonly description: Schema.String;
306
- }>>;
307
- readonly multiple: Schema.optional<Schema.Boolean>;
308
- }>>;
309
- readonly tool: Schema.optional<Schema.Struct<{
310
- readonly messageID: Schema.brand<Schema.String, "SessionV1.MessageID"> & {
311
- ascending: (id?: string) => string & import("effect/Brand").Brand<"SessionV1.MessageID">;
312
- };
313
- readonly callID: Schema.String;
314
- }>>;
315
- }>;
316
- }> & {
317
- type: "question.asked";
318
- durability: "ephemeral";
319
- durable: undefined;
320
- data: Schema.Struct<{
321
- readonly id: Schema.brand<Schema.String, "QuestionV1.ID"> & {
322
- ascending: (id?: string) => string & import("effect/Brand").Brand<"QuestionV1.ID">;
323
- };
324
- readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
325
- create: () => string & import("effect/Brand").Brand<"SessionID">;
326
- descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
327
- };
328
- readonly questions: Schema.$Array<Schema.Struct<{
329
- readonly custom: Schema.optional<Schema.Boolean>;
330
- readonly question: Schema.String;
331
- readonly header: Schema.String;
332
- readonly options: Schema.$Array<Schema.Struct<{
333
- readonly label: Schema.String;
334
- readonly description: Schema.String;
335
- }>>;
336
- readonly multiple: Schema.optional<Schema.Boolean>;
337
- }>>;
338
- readonly tool: Schema.optional<Schema.Struct<{
339
- readonly messageID: Schema.brand<Schema.String, "SessionV1.MessageID"> & {
340
- ascending: (id?: string) => string & import("effect/Brand").Brand<"SessionV1.MessageID">;
341
- };
342
- readonly callID: Schema.String;
343
- }>>;
344
- }>;
345
- }, Schema.Struct<{
346
- readonly id: Schema.brand<Schema.String, "Event.ID"> & {
347
- create: () => string & import("effect/Brand").Brand<"Event.ID">;
348
- };
349
- readonly created: Schema.Finite;
350
- readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
351
- readonly type: Schema.Literal<"question.replied">;
352
- readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
353
- readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
354
- readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
355
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
356
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
357
- }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
358
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
359
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
360
- }>, never, never>;
361
- }>>>, Schema.optionalKey<Schema.Struct<{
362
- readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
363
- readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
364
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
365
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
366
- }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
367
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
368
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
369
- }>, never, never>;
370
- }>>, never, never>;
371
- readonly data: Schema.Struct<{
372
- readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
373
- create: () => string & import("effect/Brand").Brand<"SessionID">;
374
- descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
375
- };
376
- readonly requestID: Schema.brand<Schema.String, "QuestionV1.ID"> & {
377
- ascending: (id?: string) => string & import("effect/Brand").Brand<"QuestionV1.ID">;
378
- };
379
- readonly answers: Schema.$Array<Schema.$Array<Schema.String>>;
380
- }>;
381
- }> & {
382
- type: "question.replied";
383
- durability: "ephemeral";
384
- durable: undefined;
385
- data: Schema.Struct<{
386
- readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
387
- create: () => string & import("effect/Brand").Brand<"SessionID">;
388
- descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
389
- };
390
- readonly requestID: Schema.brand<Schema.String, "QuestionV1.ID"> & {
391
- ascending: (id?: string) => string & import("effect/Brand").Brand<"QuestionV1.ID">;
392
- };
393
- readonly answers: Schema.$Array<Schema.$Array<Schema.String>>;
394
- }>;
395
- }, Schema.Struct<{
396
- readonly id: Schema.brand<Schema.String, "Event.ID"> & {
397
- create: () => string & import("effect/Brand").Brand<"Event.ID">;
398
- };
399
- readonly created: Schema.Finite;
400
- readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
401
- readonly type: Schema.Literal<"question.rejected">;
402
- readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
403
- readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
404
- readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
405
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
406
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
407
- }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
408
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
409
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
410
- }>, never, never>;
411
- }>>>, Schema.optionalKey<Schema.Struct<{
412
- readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
413
- readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
414
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
415
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
416
- }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
417
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
418
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
419
- }>, never, never>;
420
- }>>, never, never>;
421
- readonly data: Schema.Struct<{
422
- readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
423
- create: () => string & import("effect/Brand").Brand<"SessionID">;
424
- descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
425
- };
426
- readonly requestID: Schema.brand<Schema.String, "QuestionV1.ID"> & {
427
- ascending: (id?: string) => string & import("effect/Brand").Brand<"QuestionV1.ID">;
428
- };
429
- }>;
430
- }> & {
431
- type: "question.rejected";
432
- durability: "ephemeral";
433
- durable: undefined;
434
- data: Schema.Struct<{
435
- readonly sessionID: Schema.brand<Schema.String, "SessionID"> & {
436
- create: () => string & import("effect/Brand").Brand<"SessionID">;
437
- descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
438
- };
439
- readonly requestID: Schema.brand<Schema.String, "QuestionV1.ID"> & {
440
- ascending: (id?: string) => string & import("effect/Brand").Brand<"QuestionV1.ID">;
441
- };
442
- }>;
443
- }];
444
- };
@@ -1,57 +0,0 @@
1
- export * as QuestionV1 from "./question.js";
2
- import { Schema } from "effect";
3
- import { ephemeral, inventory } from "../event.js";
4
- import { ascending } from "../identifier.js";
5
- import { statics } from "../schema.js";
6
- import { SessionID } from "../session-id.js";
7
- import { SessionV1 } from "./session.js";
8
- export const ID = Schema.String.check(Schema.isStartsWith("que")).pipe(Schema.brand("QuestionV1.ID"), statics((schema) => ({ ascending: (id) => schema.make(id ?? "que_" + ascending()) })));
9
- export const Option = Schema.Struct({
10
- label: Schema.String.annotate({ description: "Display text (1-5 words, concise)" }),
11
- description: Schema.String.annotate({ description: "Explanation of choice" }),
12
- }).annotate({ identifier: "QuestionV1.Option" });
13
- const base = {
14
- question: Schema.String.annotate({ description: "Complete question" }),
15
- header: Schema.String.annotate({ description: "Very short label (max 30 chars)" }),
16
- options: Schema.Array(Option).annotate({ description: "Available choices" }),
17
- multiple: Schema.optional(Schema.Boolean).annotate({ description: "Allow selecting multiple choices" }),
18
- };
19
- export const Info = Schema.Struct({
20
- ...base,
21
- custom: Schema.optional(Schema.Boolean).annotate({ description: "Allow typing a custom answer (default: true)" }),
22
- }).annotate({ identifier: "QuestionV1.Info" });
23
- export const Prompt = Schema.Struct(base).annotate({ identifier: "QuestionV1.Prompt" });
24
- export const Tool = Schema.Struct({ messageID: SessionV1.MessageID, callID: Schema.String }).annotate({
25
- identifier: "QuestionV1.Tool",
26
- });
27
- export const Request = Schema.Struct({
28
- id: ID,
29
- sessionID: SessionID,
30
- questions: Schema.Array(Info).annotate({ description: "Questions to ask" }),
31
- tool: Schema.optional(Tool),
32
- }).annotate({ identifier: "QuestionV1.Request" });
33
- export const Answer = Schema.Array(Schema.String).annotate({ identifier: "QuestionV1.Answer" });
34
- export const Reply = Schema.Struct({
35
- answers: Schema.Array(Answer).annotate({
36
- description: "User answers in order of questions (each answer is an array of selected labels)",
37
- }),
38
- }).annotate({ identifier: "QuestionV1.Reply" });
39
- export const Replied = Schema.Struct({
40
- sessionID: SessionID,
41
- requestID: ID,
42
- answers: Schema.Array(Answer),
43
- }).annotate({
44
- identifier: "QuestionV1.Replied",
45
- });
46
- export const Rejected = Schema.Struct({ sessionID: SessionID, requestID: ID }).annotate({
47
- identifier: "QuestionV1.Rejected",
48
- });
49
- const Asked = ephemeral({ type: "question.asked", schema: Request.fields });
50
- const RepliedEvent = ephemeral({ type: "question.replied", schema: Replied.fields });
51
- const RejectedEvent = ephemeral({ type: "question.rejected", schema: Rejected.fields });
52
- export const Event = {
53
- Asked,
54
- Replied: RepliedEvent,
55
- Rejected: RejectedEvent,
56
- Definitions: inventory(Asked, RepliedEvent, RejectedEvent),
57
- };