@omnimedia/omniso 0.1.1-1 → 0.1.1-2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omnimedia/omniso",
3
- "version": "0.1.1-1",
3
+ "version": "0.1.1-2",
4
4
  "description": "Shared contracts, schemas, and utilities for Omniclip and its server",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1,4 +1,48 @@
1
1
  import * as z from "zod";
2
+ import type { TimelineFile } from "@omnimedia/omnitool";
3
+ export declare const assistantContext: z.ZodObject<{
4
+ projectId: z.ZodCustomStringFormat<"hex">;
5
+ settings: z.ZodObject<{
6
+ resolution: z.ZodString;
7
+ timebase: z.ZodNumber;
8
+ dropFrame: z.ZodBoolean;
9
+ aspectRatio: z.ZodEnum<{
10
+ "16:9": "16:9";
11
+ "9:16": "9:16";
12
+ "1:1": "1:1";
13
+ "3:2": "3:2";
14
+ "4:3": "4:3";
15
+ "21:9": "21:9";
16
+ }>;
17
+ colorSpace: z.ZodEnum<{
18
+ rec709: "rec709";
19
+ "display-p3": "display-p3";
20
+ rec2020: "rec2020";
21
+ }>;
22
+ sampleRate: z.ZodEnum<{
23
+ 48000: "48000";
24
+ 44100: "44100";
25
+ 96000: "96000";
26
+ }>;
27
+ channels: z.ZodEnum<{
28
+ stereo: "stereo";
29
+ mono: "mono";
30
+ 5.1: "5.1";
31
+ }>;
32
+ }, z.core.$strict>;
33
+ media: z.ZodArray<z.ZodObject<{
34
+ mediaHash: z.ZodString;
35
+ filename: z.ZodString;
36
+ type: z.ZodString;
37
+ duration: z.ZodNumber;
38
+ }, z.core.$loose>>;
39
+ kinds: z.ZodRecord<z.ZodString, z.ZodNumber>;
40
+ timeline: z.ZodCustom<TimelineFile, TimelineFile>;
41
+ timelineRevision: z.ZodNumber;
42
+ playhead: z.ZodNumber;
43
+ viewedItemId: z.ZodString;
44
+ selectedItemId: z.ZodNullable<z.ZodString>;
45
+ }, z.core.$loose>;
2
46
  export declare const skillCallParameters: z.ZodObject<{
3
47
  skill: z.ZodString;
4
48
  path: z.ZodString;
@@ -1,4 +1,23 @@
1
1
  import * as z from "zod";
2
+ import { projectId } from "../schemas/session.js";
3
+ import { projectSettingsSchema } from "../settings.js";
4
+ export const assistantContext = z.looseObject({
5
+ projectId,
6
+ settings: projectSettingsSchema,
7
+ media: z.array(z.looseObject({
8
+ mediaHash: z.string(),
9
+ filename: z.string(),
10
+ type: z.string(),
11
+ duration: z.number(),
12
+ })),
13
+ kinds: z.record(z.string(), z.number()),
14
+ // TODO: Use Omnitool timeline schema when available.
15
+ timeline: z.custom(value => typeof value === "object" && value !== null && !Array.isArray(value)),
16
+ timelineRevision: z.number(),
17
+ playhead: z.number(),
18
+ viewedItemId: z.string(),
19
+ selectedItemId: z.string().nullable(),
20
+ });
2
21
  const itemIdSchema = z.string().regex(/^[0-9a-f]{32}$/);
3
22
  export const skillCallParameters = z.strictObject({
4
23
  skill: z.string(),
@@ -1,19 +1,4 @@
1
- import type { Id, TimelineFile } from "@omnimedia/omnitool";
2
- import type { Settings } from "../settings.js";
3
- export type MediaInfo = {
4
- mediaHash: string;
5
- filename: string;
6
- type: string;
7
- duration: number;
8
- };
9
- export type AssistantContext = {
10
- projectId: string;
11
- settings: Settings;
12
- media: MediaInfo[];
13
- kinds: Record<string, number>;
14
- timeline: TimelineFile;
15
- timelineRevision: number;
16
- playhead: number;
17
- viewedItemId: Id;
18
- selectedItemId: Id | null;
19
- };
1
+ import type * as z from "zod";
2
+ import type { assistantContext } from "./schema.js";
3
+ export type AssistantContext = z.infer<typeof assistantContext>;
4
+ export type MediaInfo = AssistantContext["media"][number];