@opencode-ai/schema 0.0.0-next-17255 → 0.0.0-next-17263
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.
- package/dist/session-message.d.ts +126 -1
- package/dist/session-message.js +15 -0
- package/dist/session-transfer.d.ts +61 -0
- package/package.json +1 -1
|
@@ -104,6 +104,70 @@ export declare const ModelSelected: Schema.Struct<{
|
|
|
104
104
|
readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
105
105
|
}>;
|
|
106
106
|
}>;
|
|
107
|
+
export interface LocationSwitched extends Schema.Schema.Type<typeof LocationSwitched> {
|
|
108
|
+
}
|
|
109
|
+
export declare const LocationSwitched: Schema.Struct<{
|
|
110
|
+
readonly type: Schema.tag<"location-switched">;
|
|
111
|
+
readonly location: Schema.Struct<{
|
|
112
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
113
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
114
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
115
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
116
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
117
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
118
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
119
|
+
}>, never, never>;
|
|
120
|
+
}>;
|
|
121
|
+
readonly projectID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Project.ID"> & {
|
|
122
|
+
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
123
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Project.ID"> & {
|
|
124
|
+
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
125
|
+
}>, never, never>;
|
|
126
|
+
readonly subpath: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "RelativePath">>>, Schema.optionalKey<Schema.brand<Schema.String, "RelativePath">>, never, never>;
|
|
127
|
+
readonly previous: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
128
|
+
readonly location: Schema.Struct<{
|
|
129
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
130
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
131
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
132
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
133
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
134
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
135
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
136
|
+
}>, never, never>;
|
|
137
|
+
}>;
|
|
138
|
+
readonly projectID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Project.ID"> & {
|
|
139
|
+
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
140
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Project.ID"> & {
|
|
141
|
+
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
142
|
+
}>, never, never>;
|
|
143
|
+
readonly subpath: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "RelativePath">>>, Schema.optionalKey<Schema.brand<Schema.String, "RelativePath">>, never, never>;
|
|
144
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
145
|
+
readonly location: Schema.Struct<{
|
|
146
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
147
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
148
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
149
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
150
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
151
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
152
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
153
|
+
}>, never, never>;
|
|
154
|
+
}>;
|
|
155
|
+
readonly projectID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Project.ID"> & {
|
|
156
|
+
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
157
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Project.ID"> & {
|
|
158
|
+
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
159
|
+
}>, never, never>;
|
|
160
|
+
readonly subpath: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "RelativePath">>>, Schema.optionalKey<Schema.brand<Schema.String, "RelativePath">>, never, never>;
|
|
161
|
+
}>>, never, never>;
|
|
162
|
+
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
163
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
164
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
165
|
+
};
|
|
166
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
167
|
+
readonly time: Schema.Struct<{
|
|
168
|
+
readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
169
|
+
}>;
|
|
170
|
+
}>;
|
|
107
171
|
export interface User extends Schema.Schema.Type<typeof User> {
|
|
108
172
|
}
|
|
109
173
|
export declare const User: Schema.Struct<{
|
|
@@ -960,6 +1024,67 @@ export declare const Info: Schema.Union<readonly [Schema.Struct<{
|
|
|
960
1024
|
readonly time: Schema.Struct<{
|
|
961
1025
|
readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
962
1026
|
}>;
|
|
1027
|
+
}>, Schema.Struct<{
|
|
1028
|
+
readonly type: Schema.tag<"location-switched">;
|
|
1029
|
+
readonly location: Schema.Struct<{
|
|
1030
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
1031
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
1032
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
1033
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
1034
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
1035
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
1036
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
1037
|
+
}>, never, never>;
|
|
1038
|
+
}>;
|
|
1039
|
+
readonly projectID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Project.ID"> & {
|
|
1040
|
+
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
1041
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Project.ID"> & {
|
|
1042
|
+
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
1043
|
+
}>, never, never>;
|
|
1044
|
+
readonly subpath: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "RelativePath">>>, Schema.optionalKey<Schema.brand<Schema.String, "RelativePath">>, never, never>;
|
|
1045
|
+
readonly previous: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
1046
|
+
readonly location: Schema.Struct<{
|
|
1047
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
1048
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
1049
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
1050
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
1051
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
1052
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
1053
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
1054
|
+
}>, never, never>;
|
|
1055
|
+
}>;
|
|
1056
|
+
readonly projectID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Project.ID"> & {
|
|
1057
|
+
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
1058
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Project.ID"> & {
|
|
1059
|
+
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
1060
|
+
}>, never, never>;
|
|
1061
|
+
readonly subpath: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "RelativePath">>>, Schema.optionalKey<Schema.brand<Schema.String, "RelativePath">>, never, never>;
|
|
1062
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
1063
|
+
readonly location: Schema.Struct<{
|
|
1064
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
1065
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
1066
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
1067
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
1068
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
1069
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
1070
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
1071
|
+
}>, never, never>;
|
|
1072
|
+
}>;
|
|
1073
|
+
readonly projectID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Project.ID"> & {
|
|
1074
|
+
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
1075
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Project.ID"> & {
|
|
1076
|
+
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
1077
|
+
}>, never, never>;
|
|
1078
|
+
readonly subpath: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "RelativePath">>>, Schema.optionalKey<Schema.brand<Schema.String, "RelativePath">>, never, never>;
|
|
1079
|
+
}>>, never, never>;
|
|
1080
|
+
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
1081
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
1082
|
+
fromEvent: (eventID: Event.ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
1083
|
+
};
|
|
1084
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
1085
|
+
readonly time: Schema.Struct<{
|
|
1086
|
+
readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
1087
|
+
}>;
|
|
963
1088
|
}>, Schema.Struct<{
|
|
964
1089
|
readonly text: Schema.String;
|
|
965
1090
|
readonly files: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
|
|
@@ -1377,5 +1502,5 @@ export declare const Info: Schema.Union<readonly [Schema.Struct<{
|
|
|
1377
1502
|
}>;
|
|
1378
1503
|
readonly type: Schema.tag<"compaction">;
|
|
1379
1504
|
}>]>]>;
|
|
1380
|
-
export type Info = AgentSelected | ModelSelected | User | Synthetic | System | Skill | Shell | Assistant | Compaction;
|
|
1505
|
+
export type Info = AgentSelected | ModelSelected | LocationSwitched | User | Synthetic | System | Skill | Shell | Assistant | Compaction;
|
|
1381
1506
|
export type Type = Info["type"];
|
package/dist/session-message.js
CHANGED
|
@@ -2,7 +2,9 @@ export * as SessionMessage from "./session-message.js";
|
|
|
2
2
|
import { Schema } from "effect";
|
|
3
3
|
import { optional } from "./schema.js";
|
|
4
4
|
import { Content } from "./tool.js";
|
|
5
|
+
import { Location } from "./location.js";
|
|
5
6
|
import { Model } from "./model.js";
|
|
7
|
+
import { Project } from "./project.js";
|
|
6
8
|
import { Prompt } from "./prompt.js";
|
|
7
9
|
import { DateTimeUtcFromMillis, PositiveInt, RelativePath, statics } from "./schema.js";
|
|
8
10
|
import { ascending } from "./identifier.js";
|
|
@@ -39,6 +41,18 @@ export const ModelSelected = Schema.Struct({
|
|
|
39
41
|
model: Model.Ref,
|
|
40
42
|
previous: Model.Ref.pipe(optional),
|
|
41
43
|
}).annotate({ identifier: "Session.Message.ModelSelected" });
|
|
44
|
+
export const LocationSwitched = Schema.Struct({
|
|
45
|
+
...Base,
|
|
46
|
+
type: Schema.tag("location-switched"),
|
|
47
|
+
location: Location.Ref,
|
|
48
|
+
projectID: Project.ID.pipe(optional),
|
|
49
|
+
subpath: RelativePath.pipe(optional),
|
|
50
|
+
previous: Schema.Struct({
|
|
51
|
+
location: Location.Ref,
|
|
52
|
+
projectID: Project.ID.pipe(optional),
|
|
53
|
+
subpath: RelativePath.pipe(optional),
|
|
54
|
+
}).pipe(optional),
|
|
55
|
+
}).annotate({ identifier: "Session.Message.LocationSwitched" });
|
|
42
56
|
export const User = Schema.Struct({
|
|
43
57
|
...Base,
|
|
44
58
|
text: Prompt.fields.text,
|
|
@@ -181,6 +195,7 @@ export const Compaction = Schema.Union([CompactionRunning, CompactionCompleted,
|
|
|
181
195
|
export const Info = Schema.Union([
|
|
182
196
|
AgentSelected,
|
|
183
197
|
ModelSelected,
|
|
198
|
+
LocationSwitched,
|
|
184
199
|
User,
|
|
185
200
|
Synthetic,
|
|
186
201
|
System,
|
|
@@ -262,6 +262,67 @@ export declare const Data: Schema.Struct<{
|
|
|
262
262
|
readonly time: Schema.Struct<{
|
|
263
263
|
readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
264
264
|
}>;
|
|
265
|
+
}>, Schema.Struct<{
|
|
266
|
+
readonly type: Schema.tag<"location-switched">;
|
|
267
|
+
readonly location: Schema.Struct<{
|
|
268
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
269
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
270
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
271
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
272
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
273
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
274
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
275
|
+
}>, never, never>;
|
|
276
|
+
}>;
|
|
277
|
+
readonly projectID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Project.ID"> & {
|
|
278
|
+
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
279
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Project.ID"> & {
|
|
280
|
+
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
281
|
+
}>, never, never>;
|
|
282
|
+
readonly subpath: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "RelativePath">>>, Schema.optionalKey<Schema.brand<Schema.String, "RelativePath">>, never, never>;
|
|
283
|
+
readonly previous: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
284
|
+
readonly location: Schema.Struct<{
|
|
285
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
286
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<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
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
290
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
291
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
292
|
+
}>, never, never>;
|
|
293
|
+
}>;
|
|
294
|
+
readonly projectID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Project.ID"> & {
|
|
295
|
+
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
296
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Project.ID"> & {
|
|
297
|
+
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
298
|
+
}>, never, never>;
|
|
299
|
+
readonly subpath: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "RelativePath">>>, Schema.optionalKey<Schema.brand<Schema.String, "RelativePath">>, never, never>;
|
|
300
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
301
|
+
readonly location: Schema.Struct<{
|
|
302
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
303
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
304
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
305
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
306
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
307
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
308
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
309
|
+
}>, never, never>;
|
|
310
|
+
}>;
|
|
311
|
+
readonly projectID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Project.ID"> & {
|
|
312
|
+
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
313
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Project.ID"> & {
|
|
314
|
+
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
315
|
+
}>, never, never>;
|
|
316
|
+
readonly subpath: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "RelativePath">>>, Schema.optionalKey<Schema.brand<Schema.String, "RelativePath">>, never, never>;
|
|
317
|
+
}>>, never, never>;
|
|
318
|
+
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
|
|
319
|
+
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
320
|
+
fromEvent: (eventID: import("./event.js").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
321
|
+
};
|
|
322
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
323
|
+
readonly time: Schema.Struct<{
|
|
324
|
+
readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
325
|
+
}>;
|
|
265
326
|
}>, Schema.Struct<{
|
|
266
327
|
readonly text: Schema.String;
|
|
267
328
|
readonly files: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
|