@decartai/sdk 0.0.16 → 0.0.18

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.
@@ -8,13 +8,12 @@ declare const realTimeClientInitialStateSchema: z.ZodObject<{
8
8
  text: z.ZodString;
9
9
  enhance: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
10
10
  }, z.core.$strip>>;
11
- mirror: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
12
11
  }, z.core.$strip>;
13
12
  type OnRemoteStreamFn = (stream: MediaStream) => void;
14
13
  type RealTimeClientInitialState = z.infer<typeof realTimeClientInitialStateSchema>;
15
14
  declare const realTimeClientConnectOptionsSchema: z.ZodObject<{
16
15
  model: z.ZodObject<{
17
- name: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodLiteral<"mirage">, z.ZodLiteral<"mirage_v2">, z.ZodLiteral<"lucy_v2v_720p_rt">]>, z.ZodUnion<readonly [z.ZodLiteral<"lucy-dev-i2v">, z.ZodLiteral<"lucy-dev-v2v">, z.ZodLiteral<"lucy-pro-t2v">, z.ZodLiteral<"lucy-pro-i2v">, z.ZodLiteral<"lucy-pro-v2v">, z.ZodLiteral<"lucy-pro-flf2v">, z.ZodLiteral<"lucy-motion">]>, z.ZodUnion<readonly [z.ZodLiteral<"lucy-pro-t2i">, z.ZodLiteral<"lucy-pro-i2i">]>]>;
16
+ name: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodLiteral<"mirage">, z.ZodLiteral<"mirage_v2">, z.ZodLiteral<"lucy_v2v_720p_rt">]>, z.ZodUnion<readonly [z.ZodLiteral<"lucy-dev-i2v">, z.ZodLiteral<"lucy-fast-v2v">, z.ZodLiteral<"lucy-pro-t2v">, z.ZodLiteral<"lucy-pro-i2v">, z.ZodLiteral<"lucy-pro-v2v">, z.ZodLiteral<"lucy-pro-flf2v">, z.ZodLiteral<"lucy-motion">]>, z.ZodUnion<readonly [z.ZodLiteral<"lucy-pro-t2i">, z.ZodLiteral<"lucy-pro-i2i">]>]>;
18
17
  urlPath: z.ZodString;
19
18
  fps: z.ZodNumber;
20
19
  width: z.ZodNumber;
@@ -27,7 +26,6 @@ declare const realTimeClientConnectOptionsSchema: z.ZodObject<{
27
26
  text: z.ZodString;
28
27
  enhance: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
29
28
  }, z.core.$strip>>;
30
- mirror: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
31
29
  }, z.core.$strip>>;
32
30
  customizeOffer: z.ZodOptional<z.ZodCustom<z.core.$InferInnerFunctionTypeAsync<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>, z.core.$InferInnerFunctionTypeAsync<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>>;
33
31
  }, z.core.$strip>;
@@ -42,7 +40,6 @@ type RealTimeClient = {
42
40
  }?: {
43
41
  enhance?: boolean;
44
42
  }) => void;
45
- setMirror: (enabled: boolean) => void;
46
43
  isConnected: () => boolean;
47
44
  getConnectionState: () => "connected" | "connecting" | "disconnected";
48
45
  disconnect: () => void;
@@ -51,11 +51,9 @@ const createRealTimeClient = (opts) => {
51
51
  const { text, enhance } = options.initialState.prompt;
52
52
  methods.setPrompt(text, { enhance });
53
53
  }
54
- if (options.initialState.mirror) methods.setMirror(options.initialState.mirror);
55
54
  }
56
55
  return {
57
56
  setPrompt: methods.setPrompt,
58
- setMirror: methods.setMirror,
59
57
  isConnected: () => webrtcManager.isConnected(),
60
58
  getConnectionState: () => webrtcManager.getConnectionState(),
61
59
  disconnect: () => webrtcManager.cleanup(),
@@ -17,18 +17,7 @@ const realtimeMethods = (webrtcManager) => {
17
17
  enhance_prompt: parsedInput.data.enhance
18
18
  });
19
19
  };
20
- const setMirror = (enabled) => {
21
- const parsedInput = z.object({ enabled: z.boolean() }).safeParse({ enabled });
22
- if (!parsedInput.success) throw parsedInput.error;
23
- webrtcManager.sendMessage({
24
- type: "switch_camera",
25
- rotateY: parsedInput.data.enabled ? 2 : 0
26
- });
27
- };
28
- return {
29
- setPrompt,
30
- setMirror
31
- };
20
+ return { setPrompt };
32
21
  };
33
22
 
34
23
  //#endregion
@@ -2,9 +2,9 @@ import { z } from "zod";
2
2
 
3
3
  //#region src/shared/model.d.ts
4
4
  declare const realtimeModels: z.ZodUnion<readonly [z.ZodLiteral<"mirage">, z.ZodLiteral<"mirage_v2">, z.ZodLiteral<"lucy_v2v_720p_rt">]>;
5
- declare const videoModels: z.ZodUnion<readonly [z.ZodLiteral<"lucy-dev-i2v">, z.ZodLiteral<"lucy-dev-v2v">, z.ZodLiteral<"lucy-pro-t2v">, z.ZodLiteral<"lucy-pro-i2v">, z.ZodLiteral<"lucy-pro-v2v">, z.ZodLiteral<"lucy-pro-flf2v">, z.ZodLiteral<"lucy-motion">]>;
5
+ declare const videoModels: z.ZodUnion<readonly [z.ZodLiteral<"lucy-dev-i2v">, z.ZodLiteral<"lucy-fast-v2v">, z.ZodLiteral<"lucy-pro-t2v">, z.ZodLiteral<"lucy-pro-i2v">, z.ZodLiteral<"lucy-pro-v2v">, z.ZodLiteral<"lucy-pro-flf2v">, z.ZodLiteral<"lucy-motion">]>;
6
6
  declare const imageModels: z.ZodUnion<readonly [z.ZodLiteral<"lucy-pro-t2i">, z.ZodLiteral<"lucy-pro-i2i">]>;
7
- declare const modelSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodLiteral<"mirage">, z.ZodLiteral<"mirage_v2">, z.ZodLiteral<"lucy_v2v_720p_rt">]>, z.ZodUnion<readonly [z.ZodLiteral<"lucy-dev-i2v">, z.ZodLiteral<"lucy-dev-v2v">, z.ZodLiteral<"lucy-pro-t2v">, z.ZodLiteral<"lucy-pro-i2v">, z.ZodLiteral<"lucy-pro-v2v">, z.ZodLiteral<"lucy-pro-flf2v">, z.ZodLiteral<"lucy-motion">]>, z.ZodUnion<readonly [z.ZodLiteral<"lucy-pro-t2i">, z.ZodLiteral<"lucy-pro-i2i">]>]>;
7
+ declare const modelSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodLiteral<"mirage">, z.ZodLiteral<"mirage_v2">, z.ZodLiteral<"lucy_v2v_720p_rt">]>, z.ZodUnion<readonly [z.ZodLiteral<"lucy-dev-i2v">, z.ZodLiteral<"lucy-fast-v2v">, z.ZodLiteral<"lucy-pro-t2v">, z.ZodLiteral<"lucy-pro-i2v">, z.ZodLiteral<"lucy-pro-v2v">, z.ZodLiteral<"lucy-pro-flf2v">, z.ZodLiteral<"lucy-motion">]>, z.ZodUnion<readonly [z.ZodLiteral<"lucy-pro-t2i">, z.ZodLiteral<"lucy-pro-i2i">]>]>;
8
8
  type Model = z.infer<typeof modelSchema>;
9
9
  type RealTimeModels = z.infer<typeof realtimeModels>;
10
10
  type VideoModels = z.infer<typeof videoModels>;
@@ -51,11 +51,11 @@ declare const modelInputSchemas: {
51
51
  enhance_prompt: z.ZodOptional<z.ZodBoolean>;
52
52
  num_inference_steps: z.ZodOptional<z.ZodNumber>;
53
53
  }, z.core.$strip>;
54
- readonly "lucy-dev-v2v": z.ZodObject<{
54
+ readonly "lucy-fast-v2v": z.ZodObject<{
55
55
  prompt: z.ZodString;
56
56
  data: z.ZodUnion<readonly [z.ZodCustom<File, File>, z.ZodCustom<Blob, Blob>, z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>, z.ZodCustom<URL, URL>, z.ZodURL]>;
57
57
  seed: z.ZodOptional<z.ZodNumber>;
58
- resolution: z.ZodOptional<z.ZodDefault<z.ZodLiteral<"720p">>>;
58
+ resolution: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"720p">>>;
59
59
  enhance_prompt: z.ZodOptional<z.ZodBoolean>;
60
60
  }, z.core.$strip>;
61
61
  readonly "lucy-pro-flf2v": z.ZodObject<{
@@ -109,7 +109,7 @@ declare const models: {
109
109
  * - `"lucy-pro-v2v"` - Video-to-video
110
110
  * - `"lucy-pro-flf2v"` - First-last-frame-to-video
111
111
  * - `"lucy-dev-i2v"` - Image-to-video (Dev quality)
112
- * - `"lucy-dev-v2v"` - Video-to-video (Dev quality)
112
+ * - `"lucy-fast-v2v"` - Video-to-video (Fast quality)
113
113
  */
114
114
  video: <T extends VideoModels>(model: T) => ModelDefinition<T>;
115
115
  /**
@@ -9,7 +9,7 @@ const realtimeModels = z.union([
9
9
  ]);
10
10
  const videoModels = z.union([
11
11
  z.literal("lucy-dev-i2v"),
12
- z.literal("lucy-dev-v2v"),
12
+ z.literal("lucy-fast-v2v"),
13
13
  z.literal("lucy-pro-t2v"),
14
14
  z.literal("lucy-pro-i2v"),
15
15
  z.literal("lucy-pro-v2v"),
@@ -81,11 +81,11 @@ const modelInputSchemas = {
81
81
  enhance_prompt: z.boolean().optional().describe("Whether to enhance the prompt"),
82
82
  num_inference_steps: z.number().optional().describe("The number of inference steps")
83
83
  }),
84
- "lucy-dev-v2v": z.object({
84
+ "lucy-fast-v2v": z.object({
85
85
  prompt: z.string().min(1).max(1e3).describe("The prompt to use for the generation"),
86
86
  data: fileInputSchema.describe("The video data to use for generation (File, Blob, ReadableStream, URL, or string URL)"),
87
87
  seed: z.number().optional().describe("The seed to use for the generation"),
88
- resolution: devResolutionSchema,
88
+ resolution: proV2vResolutionSchema,
89
89
  enhance_prompt: z.boolean().optional().describe("Whether to enhance the prompt")
90
90
  }),
91
91
  "lucy-pro-flf2v": z.object({
@@ -175,13 +175,13 @@ const _models = {
175
175
  height: 704,
176
176
  inputSchema: modelInputSchemas["lucy-dev-i2v"]
177
177
  },
178
- "lucy-dev-v2v": {
179
- urlPath: "/v1/generate/lucy-dev-v2v",
180
- name: "lucy-dev-v2v",
178
+ "lucy-fast-v2v": {
179
+ urlPath: "/v1/generate/lucy-fast-v2v",
180
+ name: "lucy-fast-v2v",
181
181
  fps: 25,
182
182
  width: 1280,
183
- height: 704,
184
- inputSchema: modelInputSchemas["lucy-dev-v2v"]
183
+ height: 720,
184
+ inputSchema: modelInputSchemas["lucy-fast-v2v"]
185
185
  },
186
186
  "lucy-pro-t2v": {
187
187
  urlPath: "/v1/generate/lucy-pro-t2v",
@@ -6,7 +6,6 @@ declare const modelStateSchema: z.ZodObject<{
6
6
  text: z.ZodString;
7
7
  enhance: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
8
8
  }, z.core.$strip>>;
9
- mirror: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
10
9
  }, z.core.$strip>;
11
10
  type ModelState = z.infer<typeof modelStateSchema>;
12
11
  //#endregion
@@ -1,13 +1,10 @@
1
1
  import { z } from "zod";
2
2
 
3
3
  //#region src/shared/types.ts
4
- const modelStateSchema = z.object({
5
- prompt: z.object({
6
- text: z.string().min(1),
7
- enhance: z.boolean().optional().default(true)
8
- }).optional(),
9
- mirror: z.boolean().optional().default(false)
10
- });
4
+ const modelStateSchema = z.object({ prompt: z.object({
5
+ text: z.string().min(1),
6
+ enhance: z.boolean().optional().default(true)
7
+ }).optional() });
11
8
 
12
9
  //#endregion
13
10
  export { modelStateSchema };
package/dist/version.js CHANGED
@@ -4,7 +4,7 @@
4
4
  * Injected at build time from package.json.
5
5
  * Falls back to '0.0.0-dev' in development.
6
6
  */
7
- const VERSION = "0.0.16";
7
+ const VERSION = "0.0.18";
8
8
 
9
9
  //#endregion
10
10
  export { VERSION };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decartai/sdk",
3
- "version": "0.0.16",
3
+ "version": "0.0.18",
4
4
  "description": "Decart's JavaScript SDK",
5
5
  "type": "module",
6
6
  "license": "MIT",