@opencode/schema 0.0.0-dev-21908 → 0.0.0-dev-21915
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/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/prompt.d.ts +96 -0
- package/dist/prompt.js +15 -0
- package/dist/session-inbox.d.ts +714 -86
- package/dist/session-inbox.js +10 -1
- package/dist/session-message.d.ts +968 -0
- package/dist/session-message.js +19 -1
- package/package.json +1 -1
package/dist/session-inbox.js
CHANGED
|
@@ -2,7 +2,7 @@ export * as SessionInbox from "./session-inbox.js";
|
|
|
2
2
|
import { Schema } from "effect";
|
|
3
3
|
import { Location } from "./location.js";
|
|
4
4
|
import { Project } from "./project.js";
|
|
5
|
-
import { Prompt } from "./prompt.js";
|
|
5
|
+
import { Attachment, Prompt } from "./prompt.js";
|
|
6
6
|
import { DateTimeUtcFromMillis, optional, RelativePath } from "./schema.js";
|
|
7
7
|
import { SessionID } from "./session-id.js";
|
|
8
8
|
import { SessionMessage } from "./session-message.js";
|
|
@@ -11,6 +11,10 @@ export const UserPayload = Schema.Struct({
|
|
|
11
11
|
...Prompt.fields,
|
|
12
12
|
metadata: Schema.Record(Schema.String, Schema.Unknown).pipe(optional),
|
|
13
13
|
}).annotate({ identifier: "Session.Inbox.UserPayload" });
|
|
14
|
+
export const MediaUserPayload = Schema.Struct({
|
|
15
|
+
...UserPayload.fields,
|
|
16
|
+
files: Schema.Array(Attachment).pipe(optional),
|
|
17
|
+
}).annotate({ identifier: "Session.Inbox.MediaUserPayload" });
|
|
14
18
|
export const SyntheticPayload = Schema.Struct({
|
|
15
19
|
text: Schema.String,
|
|
16
20
|
description: Schema.String.pipe(optional),
|
|
@@ -37,6 +41,9 @@ const Enqueued = {
|
|
|
37
41
|
time: Schema.Struct({ created: DateTimeUtcFromMillis }),
|
|
38
42
|
};
|
|
39
43
|
export const User = Schema.Struct({ ...Enqueued, ...UserItem.fields }).annotate({ identifier: "Session.Inbox.User" });
|
|
44
|
+
export const MediaUser = Schema.Struct({ ...User.fields, payload: MediaUserPayload }).annotate({
|
|
45
|
+
identifier: "Session.Inbox.MediaUser",
|
|
46
|
+
});
|
|
40
47
|
export const Synthetic = Schema.Struct({ ...Enqueued, ...SyntheticItem.fields }).annotate({
|
|
41
48
|
identifier: "Session.Inbox.Synthetic",
|
|
42
49
|
});
|
|
@@ -45,3 +52,5 @@ export const Compaction = Schema.Struct({ ...Enqueued, ...CompactionItem.fields
|
|
|
45
52
|
});
|
|
46
53
|
export const Move = Schema.Struct({ ...Enqueued, ...MoveItem.fields }).annotate({ identifier: "Session.Inbox.Move" });
|
|
47
54
|
export const Info = Schema.Union([User, Synthetic, Compaction, Move]).pipe(Schema.toTaggedUnion("type"), Schema.annotate({ identifier: "Session.Inbox.Info" }));
|
|
55
|
+
/** {@link Info} with {@link MediaUser} for clients that opt into `experimental-media-uri`. */
|
|
56
|
+
export const MediaInfo = Schema.Union([MediaUser, Synthetic, Compaction, Move]).pipe(Schema.toTaggedUnion("type"), Schema.annotate({ identifier: "Session.Inbox.MediaInfo" }));
|