@opencode/schema 2.1.4 → 2.2.1

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 (43) hide show
  1. package/dist/agent.d.ts +5 -0
  2. package/dist/config/experimental.d.ts +39 -0
  3. package/dist/config/experimental.js +19 -0
  4. package/dist/config/provider.d.ts +57 -11
  5. package/dist/config/provider.js +15 -16
  6. package/dist/config.d.ts +1 -0
  7. package/dist/config.js +3 -0
  8. package/dist/event-manifest.d.ts +8 -0
  9. package/dist/file-diff.d.ts +2 -0
  10. package/dist/file-diff.js +2 -0
  11. package/dist/generate.d.ts +355 -0
  12. package/dist/generate.js +134 -0
  13. package/dist/goal.d.ts +126 -0
  14. package/dist/goal.js +40 -0
  15. package/dist/index.d.ts +1 -1
  16. package/dist/index.js +1 -1
  17. package/dist/mcp.d.ts +1 -0
  18. package/dist/mcp.js +2 -0
  19. package/dist/model-compatibility.d.ts +15 -4
  20. package/dist/model-compatibility.js +15 -4
  21. package/dist/model.d.ts +39 -8
  22. package/dist/model.js +12 -7
  23. package/dist/plugin.d.ts +15 -0
  24. package/dist/plugin.js +11 -1
  25. package/dist/prompt.d.ts +96 -0
  26. package/dist/prompt.js +17 -1
  27. package/dist/provider.d.ts +40 -0
  28. package/dist/provider.js +14 -3
  29. package/dist/schedule.d.ts +220 -0
  30. package/dist/schedule.js +110 -0
  31. package/dist/session-event.d.ts +20 -0
  32. package/dist/session-inbox.d.ts +714 -86
  33. package/dist/session-inbox.js +10 -1
  34. package/dist/session-message.d.ts +968 -0
  35. package/dist/session-message.js +19 -1
  36. package/dist/session-revert.d.ts +37 -0
  37. package/dist/session-transfer.d.ts +4 -0
  38. package/dist/session.d.ts +4 -0
  39. package/dist/usage-limits.d.ts +227 -0
  40. package/dist/usage-limits.js +59 -0
  41. package/dist/vcs.d.ts +3 -0
  42. package/dist/vcs.js +2 -0
  43. package/package.json +2 -1
@@ -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" }));