@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.
@@ -5,7 +5,7 @@ import { Content } from "./tool.js";
5
5
  import { Location } from "./location.js";
6
6
  import { Model } from "./model.js";
7
7
  import { Project } from "./project.js";
8
- import { Prompt } from "./prompt.js";
8
+ import { Attachment, Prompt } from "./prompt.js";
9
9
  import { DateTimeUtcFromMillis, PositiveInt, RelativePath, statics } from "./schema.js";
10
10
  import { ascending } from "./identifier.js";
11
11
  import { Shell as ShellSchema } from "./shell.js";
@@ -64,6 +64,10 @@ export const User = Schema.Struct({
64
64
  skills: Prompt.fields.skills,
65
65
  type: Schema.tag("user"),
66
66
  }).annotate({ identifier: "Session.Message.User" });
67
+ export const MediaUser = Schema.Struct({
68
+ ...User.fields,
69
+ files: Schema.Array(Attachment).pipe(optional),
70
+ }).annotate({ identifier: "Session.Message.MediaUser" });
67
71
  export const Synthetic = Schema.Struct({
68
72
  ...Base,
69
73
  text: Schema.String,
@@ -232,3 +236,17 @@ export const Info = Schema.Union([
232
236
  Compaction,
233
237
  Idle,
234
238
  ]).annotate({ identifier: "Session.Message.Info" });
239
+ /** {@link Info} with {@link MediaUser} for clients that opt into `experimental-media-uri`. */
240
+ export const MediaInfo = Schema.Union([
241
+ AgentSelected,
242
+ ModelSelected,
243
+ LocationSwitched,
244
+ MediaUser,
245
+ Synthetic,
246
+ System,
247
+ Skill,
248
+ Shell,
249
+ Assistant,
250
+ Compaction,
251
+ Idle,
252
+ ]).annotate({ identifier: "Session.Message.MediaInfo" });
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-21908",
4
+ "version": "0.0.0-dev-21915",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {