@usenaive-sdk/cli 1.0.3 → 1.0.4
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.js +164 -37
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -28590,6 +28590,10 @@ var PayoutDetailsSchema = external_exports.object({
|
|
|
28590
28590
|
var CreatorStatusSchema = external_exports.enum(["active", "suspended", "archived"]);
|
|
28591
28591
|
var CreatorSourceSchema = external_exports.enum(["youtube", "channel_license", "doomscroll"]);
|
|
28592
28592
|
var CreatorStudioBudgetSchema = MicroUsdField.positive().max(1e10);
|
|
28593
|
+
var CreatorModeSchema = external_exports.enum(["ai_clips", "sports_clips", "movie_clips", "dance_clips"]);
|
|
28594
|
+
var VIDEO_CREATOR_MODES = ["sports_clips", "movie_clips", "dance_clips"];
|
|
28595
|
+
var VideoCreatorModeSchema = external_exports.enum(VIDEO_CREATOR_MODES);
|
|
28596
|
+
var CreatorModesSchema = external_exports.array(CreatorModeSchema).min(1, "keep at least one account type").refine((modes) => new Set(modes).size === modes.length, "each account type at most once");
|
|
28593
28597
|
var CreatorSchema = external_exports.object({
|
|
28594
28598
|
id: idOf("crt"),
|
|
28595
28599
|
object: external_exports.literal("creator"),
|
|
@@ -28603,6 +28607,8 @@ var CreatorSchema = external_exports.object({
|
|
|
28603
28607
|
clicks: external_exports.number().int().nonnegative(),
|
|
28604
28608
|
/** This creator's per-draft studio cap, overriding `CREATOR_PROGRAM.studio`; `null` = the default. */
|
|
28605
28609
|
studio_budget_micro_usd: CreatorStudioBudgetSchema.nullable(),
|
|
28610
|
+
/** Its campaign modes (migration 0181); a row read before it parses as `ai_clips` only. */
|
|
28611
|
+
modes: CreatorModesSchema.default(["ai_clips"]),
|
|
28606
28612
|
created_at: Timestamp,
|
|
28607
28613
|
updated_at: Timestamp
|
|
28608
28614
|
});
|
|
@@ -28715,7 +28721,9 @@ var CREATOR_PROGRAM = {
|
|
|
28715
28721
|
review_check_budget_micro_usd: 5e6,
|
|
28716
28722
|
/** A `video` origin build (§42.14): one raw clip and its characters, recast by Mira. */
|
|
28717
28723
|
video: {
|
|
28718
|
-
|
|
28724
|
+
/** The object swap refuses a clip under 4 s (§42.15). */
|
|
28725
|
+
min_seconds: 4,
|
|
28726
|
+
/** The longest part of a clip a render uses: a longer upload is taken and cut to its first 15 s (ADR-2204). */
|
|
28719
28727
|
max_seconds: 15,
|
|
28720
28728
|
video_max_bytes: 95 * 1024 * 1024,
|
|
28721
28729
|
image_max_bytes: 10 * 1024 * 1024,
|
|
@@ -28723,8 +28731,8 @@ var CREATOR_PROGRAM = {
|
|
|
28723
28731
|
characters_max: 3,
|
|
28724
28732
|
/** After the first render. A refused or failed render does not use one up. */
|
|
28725
28733
|
revisions: 5,
|
|
28726
|
-
/** Per doomscroll account, until one of its templates is approved. */
|
|
28727
|
-
unapproved_templates:
|
|
28734
|
+
/** Per doomscroll account, until one of its templates is approved. Only drafts that rendered a video count. */
|
|
28735
|
+
unapproved_templates: 5,
|
|
28728
28736
|
/** Upload tickets a doomscroll account may ask for, per template. */
|
|
28729
28737
|
upload_tickets: 20,
|
|
28730
28738
|
/** A draft never submitted loses its source and character bytes this long after `updated_at`. */
|
|
@@ -28852,8 +28860,11 @@ var StudioCharacterSchema = external_exports.object({
|
|
|
28852
28860
|
file_id: external_exports.string().nullable(),
|
|
28853
28861
|
bytes: external_exports.number().int().positive().max(CREATOR_PROGRAM.studio.video.image_max_bytes),
|
|
28854
28862
|
content_type: StudioImageContentTypeSchema,
|
|
28855
|
-
filename: external_exports.string().min(1).max(200)
|
|
28863
|
+
filename: external_exports.string().min(1).max(200),
|
|
28864
|
+
/** Who this is in the clip, in the creator's words ("the driver"): the render is told which photo is whom. */
|
|
28865
|
+
label: external_exports.string().min(1).max(80).optional()
|
|
28856
28866
|
});
|
|
28867
|
+
var StudioEditModeSchema = external_exports.enum(["edit", "motion_transfer"]);
|
|
28857
28868
|
var CreatorStudioSchema = external_exports.object({
|
|
28858
28869
|
uploads: external_exports.array(StudioUploadSchema).max(CREATOR_PROGRAM.studio.uploads).default([]),
|
|
28859
28870
|
/** `links`: built from 1–3 reel links (`imports`), prompts optional; `upload`: the creator's three videos; `video`: one raw clip recast by Mira (§42.14). */
|
|
@@ -28872,7 +28883,11 @@ var CreatorStudioSchema = external_exports.object({
|
|
|
28872
28883
|
/** A `video` origin's raw clip, its characters, and the round submitted (§42.14). */
|
|
28873
28884
|
source_video: StudioSourceVideoSchema.nullable().default(null),
|
|
28874
28885
|
characters: external_exports.array(StudioCharacterSchema).max(CREATOR_PROGRAM.studio.video.characters_max).default([]),
|
|
28875
|
-
chosen_round: external_exports.number().int().positive().nullable().default(null)
|
|
28886
|
+
chosen_round: external_exports.number().int().positive().nullable().default(null),
|
|
28887
|
+
/** A `video` origin's campaign mode (§42.15); absent on a draft made before modes, which reads as generic. */
|
|
28888
|
+
mode: VideoCreatorModeSchema.optional(),
|
|
28889
|
+
/** A `video` origin's kind of Mira edit (ADR-2410); absent is `edit`. Not `mode`, which is the campaign mode. */
|
|
28890
|
+
edit_mode: StudioEditModeSchema.optional()
|
|
28876
28891
|
});
|
|
28877
28892
|
var CreatorTemplateListingSchema = external_exports.object({
|
|
28878
28893
|
listed: external_exports.boolean(),
|
|
@@ -29044,19 +29059,28 @@ var CreatorAnalyticsSchema = external_exports.object({
|
|
|
29044
29059
|
var CreatorTemplateCreateKindSchema = external_exports.object({
|
|
29045
29060
|
kind: CreatorTemplateKindSchema.default("crew"),
|
|
29046
29061
|
/** `video` makes a draft built from one raw clip (§42.14); it needs `kind: niche`. */
|
|
29047
|
-
origin: external_exports.literal("video").optional()
|
|
29062
|
+
origin: external_exports.literal("video").optional(),
|
|
29063
|
+
/** Required with `origin: "video"`: one of the creator's video modes (§42.15). */
|
|
29064
|
+
mode: VideoCreatorModeSchema.optional(),
|
|
29065
|
+
/** Only with `origin: "video"`: how its rounds are made on Mira (ADR-2410); absent is `edit`. */
|
|
29066
|
+
edit_mode: StudioEditModeSchema.optional()
|
|
29048
29067
|
});
|
|
29049
29068
|
var StudioUploadCreateSchema = external_exports.object({
|
|
29050
29069
|
purpose: external_exports.enum(["source", "character"]).optional(),
|
|
29051
29070
|
position: UploadPosition.optional(),
|
|
29052
29071
|
filename: external_exports.string().min(1).max(200),
|
|
29053
29072
|
content_type: external_exports.union([StudioUploadContentTypeSchema, StudioImageContentTypeSchema]),
|
|
29054
|
-
bytes: external_exports.number().int().positive()
|
|
29073
|
+
bytes: external_exports.number().int().positive(),
|
|
29074
|
+
/** A `source` only: its length as the browser read it. Prices the render, held to the program's 4–15 s (§42.15). */
|
|
29075
|
+
seconds: external_exports.number().positive().max(600).optional(),
|
|
29076
|
+
/** A `character` only: who it is in the clip. */
|
|
29077
|
+
label: external_exports.string().trim().min(1).max(80).optional()
|
|
29055
29078
|
}).superRefine((body2, ctx) => {
|
|
29056
29079
|
const { video, upload_max_bytes } = CREATOR_PROGRAM.studio;
|
|
29057
29080
|
const character2 = body2.purpose === "character";
|
|
29058
29081
|
const issue2 = (path, message4) => ctx.addIssue({ code: "custom", path: [path], message: message4 });
|
|
29059
29082
|
if (body2.purpose !== "source" && body2.position === void 0) issue2("position", "position is required");
|
|
29083
|
+
if (body2.label !== void 0 && !character2) issue2("label", "only a character takes a label");
|
|
29060
29084
|
if (character2 !== StudioImageContentTypeSchema.safeParse(body2.content_type).success) {
|
|
29061
29085
|
issue2("content_type", character2 ? "a character must be a PNG, JPEG or WebP image" : "this upload must be an MP4, MOV or WebM video");
|
|
29062
29086
|
}
|
|
@@ -29097,8 +29121,16 @@ var CreatorStudioViewSchema = external_exports.object({
|
|
|
29097
29121
|
studio: CreatorStudioSchema.extend({
|
|
29098
29122
|
source_video: StudioSourceVideoSchema.extend({ url: external_exports.string().nullable().optional() }).nullable().default(null)
|
|
29099
29123
|
}),
|
|
29100
|
-
/**
|
|
29101
|
-
|
|
29124
|
+
/**
|
|
29125
|
+
* Newest first. A `video` round also carries a signed `sample_url`; a `motion_transfer` build's ended
|
|
29126
|
+
* round carries `rendered_as`, how Mira made it (`edit` when the motion could not be copied, ADR-2410).
|
|
29127
|
+
*/
|
|
29128
|
+
rounds: external_exports.array(
|
|
29129
|
+
CreatorTemplateRoundSchema.extend({
|
|
29130
|
+
sample_url: external_exports.string().nullable().optional(),
|
|
29131
|
+
rendered_as: external_exports.enum(["edit", "motion_transfer"]).nullable().optional()
|
|
29132
|
+
})
|
|
29133
|
+
),
|
|
29102
29134
|
budget: StudioBudgetSchema
|
|
29103
29135
|
});
|
|
29104
29136
|
var NicheSubmitSchema = external_exports.object({
|
|
@@ -30948,7 +30980,9 @@ var MusicGenerationSchema = external_exports.object({
|
|
|
30948
30980
|
duration_seconds: Seconds2.nullable(),
|
|
30949
30981
|
cost_micro_usd: MicroUsdField
|
|
30950
30982
|
});
|
|
30951
|
-
var EditModeSchema = external_exports.enum(["scene", "outfit_or_object", "person_swap", "recast"])
|
|
30983
|
+
var EditModeSchema = external_exports.enum(["edit", "scene", "outfit_or_object", "person_swap", "recast", "motion_transfer"]).describe(
|
|
30984
|
+
`What kind of edit. "edit" (the default): the regular editor, reading what to do from the prompt. "scene", "outfit_or_object", "person_swap" and "recast" narrow it. "motion_transfer": copy the clip's exact motion onto the characters in the reference photos (fil_ images, at most 3 used), keeping the place; best for 5-15 s fights and dances; with 2-3 photos, start the prompt with <Character1>who photo 1 replaces<Character2>who photo 2 replaces and a new line. A clip it cannot take is made by the regular editor.`
|
|
30985
|
+
);
|
|
30952
30986
|
var EditRequestSchema = external_exports.object({
|
|
30953
30987
|
video: external_exports.string().min(1),
|
|
30954
30988
|
prompt: external_exports.string().min(1).max(1e3),
|
|
@@ -30964,6 +30998,12 @@ var EditJobSchema = external_exports.object({
|
|
|
30964
30998
|
prompt: external_exports.string(),
|
|
30965
30999
|
references: external_exports.array(external_exports.string()),
|
|
30966
31000
|
mode: EditModeSchema.nullable(),
|
|
31001
|
+
/**
|
|
31002
|
+
* How the finished edit was made: `motion_transfer` when the motion was copied, `edit` when the regular
|
|
31003
|
+
* editor made it (every other mode, or a motion transfer that fell back). `null` until it is completed, and
|
|
31004
|
+
* from a server older than the field.
|
|
31005
|
+
*/
|
|
31006
|
+
rendered_as: external_exports.enum(["edit", "motion_transfer"]).nullable().default(null).describe("How the finished edit was made: motion_transfer, or edit (the regular editor). null until completed."),
|
|
30967
31007
|
result: external_exports.object({ file_id: external_exports.string().startsWith("fil_") }).nullable(),
|
|
30968
31008
|
error: external_exports.object({ code: EditFailureCodeSchema, message: external_exports.string() }).nullable(),
|
|
30969
31009
|
cost_micro_usd: MicroUsdField.nullable(),
|
|
@@ -33960,6 +34000,10 @@ var PayoutDetailsSchema2 = external_exports.object({
|
|
|
33960
34000
|
var CreatorStatusSchema2 = external_exports.enum(["active", "suspended", "archived"]);
|
|
33961
34001
|
var CreatorSourceSchema2 = external_exports.enum(["youtube", "channel_license", "doomscroll"]);
|
|
33962
34002
|
var CreatorStudioBudgetSchema2 = MicroUsdField2.positive().max(1e10);
|
|
34003
|
+
var CreatorModeSchema2 = external_exports.enum(["ai_clips", "sports_clips", "movie_clips", "dance_clips"]);
|
|
34004
|
+
var VIDEO_CREATOR_MODES2 = ["sports_clips", "movie_clips", "dance_clips"];
|
|
34005
|
+
var VideoCreatorModeSchema2 = external_exports.enum(VIDEO_CREATOR_MODES2);
|
|
34006
|
+
var CreatorModesSchema2 = external_exports.array(CreatorModeSchema2).min(1, "keep at least one account type").refine((modes) => new Set(modes).size === modes.length, "each account type at most once");
|
|
33963
34007
|
var CreatorSchema2 = external_exports.object({
|
|
33964
34008
|
id: idOf2("crt"),
|
|
33965
34009
|
object: external_exports.literal("creator"),
|
|
@@ -33973,6 +34017,8 @@ var CreatorSchema2 = external_exports.object({
|
|
|
33973
34017
|
clicks: external_exports.number().int().nonnegative(),
|
|
33974
34018
|
/** This creator's per-draft studio cap, overriding `CREATOR_PROGRAM.studio`; `null` = the default. */
|
|
33975
34019
|
studio_budget_micro_usd: CreatorStudioBudgetSchema2.nullable(),
|
|
34020
|
+
/** Its campaign modes (migration 0181); a row read before it parses as `ai_clips` only. */
|
|
34021
|
+
modes: CreatorModesSchema2.default(["ai_clips"]),
|
|
33976
34022
|
created_at: Timestamp2,
|
|
33977
34023
|
updated_at: Timestamp2
|
|
33978
34024
|
});
|
|
@@ -34085,7 +34131,9 @@ var CREATOR_PROGRAM2 = {
|
|
|
34085
34131
|
review_check_budget_micro_usd: 5e6,
|
|
34086
34132
|
/** A `video` origin build (§42.14): one raw clip and its characters, recast by Mira. */
|
|
34087
34133
|
video: {
|
|
34088
|
-
|
|
34134
|
+
/** The object swap refuses a clip under 4 s (§42.15). */
|
|
34135
|
+
min_seconds: 4,
|
|
34136
|
+
/** The longest part of a clip a render uses: a longer upload is taken and cut to its first 15 s (ADR-2204). */
|
|
34089
34137
|
max_seconds: 15,
|
|
34090
34138
|
video_max_bytes: 95 * 1024 * 1024,
|
|
34091
34139
|
image_max_bytes: 10 * 1024 * 1024,
|
|
@@ -34093,8 +34141,8 @@ var CREATOR_PROGRAM2 = {
|
|
|
34093
34141
|
characters_max: 3,
|
|
34094
34142
|
/** After the first render. A refused or failed render does not use one up. */
|
|
34095
34143
|
revisions: 5,
|
|
34096
|
-
/** Per doomscroll account, until one of its templates is approved. */
|
|
34097
|
-
unapproved_templates:
|
|
34144
|
+
/** Per doomscroll account, until one of its templates is approved. Only drafts that rendered a video count. */
|
|
34145
|
+
unapproved_templates: 5,
|
|
34098
34146
|
/** Upload tickets a doomscroll account may ask for, per template. */
|
|
34099
34147
|
upload_tickets: 20,
|
|
34100
34148
|
/** A draft never submitted loses its source and character bytes this long after `updated_at`. */
|
|
@@ -34222,8 +34270,11 @@ var StudioCharacterSchema2 = external_exports.object({
|
|
|
34222
34270
|
file_id: external_exports.string().nullable(),
|
|
34223
34271
|
bytes: external_exports.number().int().positive().max(CREATOR_PROGRAM2.studio.video.image_max_bytes),
|
|
34224
34272
|
content_type: StudioImageContentTypeSchema2,
|
|
34225
|
-
filename: external_exports.string().min(1).max(200)
|
|
34273
|
+
filename: external_exports.string().min(1).max(200),
|
|
34274
|
+
/** Who this is in the clip, in the creator's words ("the driver"): the render is told which photo is whom. */
|
|
34275
|
+
label: external_exports.string().min(1).max(80).optional()
|
|
34226
34276
|
});
|
|
34277
|
+
var StudioEditModeSchema2 = external_exports.enum(["edit", "motion_transfer"]);
|
|
34227
34278
|
var CreatorStudioSchema2 = external_exports.object({
|
|
34228
34279
|
uploads: external_exports.array(StudioUploadSchema2).max(CREATOR_PROGRAM2.studio.uploads).default([]),
|
|
34229
34280
|
/** `links`: built from 1–3 reel links (`imports`), prompts optional; `upload`: the creator's three videos; `video`: one raw clip recast by Mira (§42.14). */
|
|
@@ -34242,7 +34293,11 @@ var CreatorStudioSchema2 = external_exports.object({
|
|
|
34242
34293
|
/** A `video` origin's raw clip, its characters, and the round submitted (§42.14). */
|
|
34243
34294
|
source_video: StudioSourceVideoSchema2.nullable().default(null),
|
|
34244
34295
|
characters: external_exports.array(StudioCharacterSchema2).max(CREATOR_PROGRAM2.studio.video.characters_max).default([]),
|
|
34245
|
-
chosen_round: external_exports.number().int().positive().nullable().default(null)
|
|
34296
|
+
chosen_round: external_exports.number().int().positive().nullable().default(null),
|
|
34297
|
+
/** A `video` origin's campaign mode (§42.15); absent on a draft made before modes, which reads as generic. */
|
|
34298
|
+
mode: VideoCreatorModeSchema2.optional(),
|
|
34299
|
+
/** A `video` origin's kind of Mira edit (ADR-2410); absent is `edit`. Not `mode`, which is the campaign mode. */
|
|
34300
|
+
edit_mode: StudioEditModeSchema2.optional()
|
|
34246
34301
|
});
|
|
34247
34302
|
var CreatorTemplateListingSchema2 = external_exports.object({
|
|
34248
34303
|
listed: external_exports.boolean(),
|
|
@@ -34414,19 +34469,28 @@ var CreatorAnalyticsSchema2 = external_exports.object({
|
|
|
34414
34469
|
var CreatorTemplateCreateKindSchema2 = external_exports.object({
|
|
34415
34470
|
kind: CreatorTemplateKindSchema2.default("crew"),
|
|
34416
34471
|
/** `video` makes a draft built from one raw clip (§42.14); it needs `kind: niche`. */
|
|
34417
|
-
origin: external_exports.literal("video").optional()
|
|
34472
|
+
origin: external_exports.literal("video").optional(),
|
|
34473
|
+
/** Required with `origin: "video"`: one of the creator's video modes (§42.15). */
|
|
34474
|
+
mode: VideoCreatorModeSchema2.optional(),
|
|
34475
|
+
/** Only with `origin: "video"`: how its rounds are made on Mira (ADR-2410); absent is `edit`. */
|
|
34476
|
+
edit_mode: StudioEditModeSchema2.optional()
|
|
34418
34477
|
});
|
|
34419
34478
|
var StudioUploadCreateSchema2 = external_exports.object({
|
|
34420
34479
|
purpose: external_exports.enum(["source", "character"]).optional(),
|
|
34421
34480
|
position: UploadPosition2.optional(),
|
|
34422
34481
|
filename: external_exports.string().min(1).max(200),
|
|
34423
34482
|
content_type: external_exports.union([StudioUploadContentTypeSchema2, StudioImageContentTypeSchema2]),
|
|
34424
|
-
bytes: external_exports.number().int().positive()
|
|
34483
|
+
bytes: external_exports.number().int().positive(),
|
|
34484
|
+
/** A `source` only: its length as the browser read it. Prices the render, held to the program's 4–15 s (§42.15). */
|
|
34485
|
+
seconds: external_exports.number().positive().max(600).optional(),
|
|
34486
|
+
/** A `character` only: who it is in the clip. */
|
|
34487
|
+
label: external_exports.string().trim().min(1).max(80).optional()
|
|
34425
34488
|
}).superRefine((body2, ctx) => {
|
|
34426
34489
|
const { video, upload_max_bytes } = CREATOR_PROGRAM2.studio;
|
|
34427
34490
|
const character2 = body2.purpose === "character";
|
|
34428
34491
|
const issue2 = (path, message4) => ctx.addIssue({ code: "custom", path: [path], message: message4 });
|
|
34429
34492
|
if (body2.purpose !== "source" && body2.position === void 0) issue2("position", "position is required");
|
|
34493
|
+
if (body2.label !== void 0 && !character2) issue2("label", "only a character takes a label");
|
|
34430
34494
|
if (character2 !== StudioImageContentTypeSchema2.safeParse(body2.content_type).success) {
|
|
34431
34495
|
issue2("content_type", character2 ? "a character must be a PNG, JPEG or WebP image" : "this upload must be an MP4, MOV or WebM video");
|
|
34432
34496
|
}
|
|
@@ -34467,8 +34531,16 @@ var CreatorStudioViewSchema2 = external_exports.object({
|
|
|
34467
34531
|
studio: CreatorStudioSchema2.extend({
|
|
34468
34532
|
source_video: StudioSourceVideoSchema2.extend({ url: external_exports.string().nullable().optional() }).nullable().default(null)
|
|
34469
34533
|
}),
|
|
34470
|
-
/**
|
|
34471
|
-
|
|
34534
|
+
/**
|
|
34535
|
+
* Newest first. A `video` round also carries a signed `sample_url`; a `motion_transfer` build's ended
|
|
34536
|
+
* round carries `rendered_as`, how Mira made it (`edit` when the motion could not be copied, ADR-2410).
|
|
34537
|
+
*/
|
|
34538
|
+
rounds: external_exports.array(
|
|
34539
|
+
CreatorTemplateRoundSchema2.extend({
|
|
34540
|
+
sample_url: external_exports.string().nullable().optional(),
|
|
34541
|
+
rendered_as: external_exports.enum(["edit", "motion_transfer"]).nullable().optional()
|
|
34542
|
+
})
|
|
34543
|
+
),
|
|
34472
34544
|
budget: StudioBudgetSchema2
|
|
34473
34545
|
});
|
|
34474
34546
|
var NicheSubmitSchema2 = external_exports.object({
|
|
@@ -36275,7 +36347,9 @@ var MusicGenerationSchema2 = external_exports.object({
|
|
|
36275
36347
|
duration_seconds: Seconds22.nullable(),
|
|
36276
36348
|
cost_micro_usd: MicroUsdField2
|
|
36277
36349
|
});
|
|
36278
|
-
var EditModeSchema2 = external_exports.enum(["scene", "outfit_or_object", "person_swap", "recast"])
|
|
36350
|
+
var EditModeSchema2 = external_exports.enum(["edit", "scene", "outfit_or_object", "person_swap", "recast", "motion_transfer"]).describe(
|
|
36351
|
+
`What kind of edit. "edit" (the default): the regular editor, reading what to do from the prompt. "scene", "outfit_or_object", "person_swap" and "recast" narrow it. "motion_transfer": copy the clip's exact motion onto the characters in the reference photos (fil_ images, at most 3 used), keeping the place; best for 5-15 s fights and dances; with 2-3 photos, start the prompt with <Character1>who photo 1 replaces<Character2>who photo 2 replaces and a new line. A clip it cannot take is made by the regular editor.`
|
|
36352
|
+
);
|
|
36279
36353
|
var EditRequestSchema2 = external_exports.object({
|
|
36280
36354
|
video: external_exports.string().min(1),
|
|
36281
36355
|
prompt: external_exports.string().min(1).max(1e3),
|
|
@@ -36291,6 +36365,12 @@ var EditJobSchema2 = external_exports.object({
|
|
|
36291
36365
|
prompt: external_exports.string(),
|
|
36292
36366
|
references: external_exports.array(external_exports.string()),
|
|
36293
36367
|
mode: EditModeSchema2.nullable(),
|
|
36368
|
+
/**
|
|
36369
|
+
* How the finished edit was made: `motion_transfer` when the motion was copied, `edit` when the regular
|
|
36370
|
+
* editor made it (every other mode, or a motion transfer that fell back). `null` until it is completed, and
|
|
36371
|
+
* from a server older than the field.
|
|
36372
|
+
*/
|
|
36373
|
+
rendered_as: external_exports.enum(["edit", "motion_transfer"]).nullable().default(null).describe("How the finished edit was made: motion_transfer, or edit (the regular editor). null until completed."),
|
|
36294
36374
|
result: external_exports.object({ file_id: external_exports.string().startsWith("fil_") }).nullable(),
|
|
36295
36375
|
error: external_exports.object({ code: EditFailureCodeSchema2, message: external_exports.string() }).nullable(),
|
|
36296
36376
|
cost_micro_usd: MicroUsdField2.nullable(),
|
|
@@ -42984,6 +43064,10 @@ var PayoutDetailsSchema3 = external_exports.object({
|
|
|
42984
43064
|
var CreatorStatusSchema3 = external_exports.enum(["active", "suspended", "archived"]);
|
|
42985
43065
|
var CreatorSourceSchema3 = external_exports.enum(["youtube", "channel_license", "doomscroll"]);
|
|
42986
43066
|
var CreatorStudioBudgetSchema3 = MicroUsdField3.positive().max(1e10);
|
|
43067
|
+
var CreatorModeSchema3 = external_exports.enum(["ai_clips", "sports_clips", "movie_clips", "dance_clips"]);
|
|
43068
|
+
var VIDEO_CREATOR_MODES3 = ["sports_clips", "movie_clips", "dance_clips"];
|
|
43069
|
+
var VideoCreatorModeSchema3 = external_exports.enum(VIDEO_CREATOR_MODES3);
|
|
43070
|
+
var CreatorModesSchema3 = external_exports.array(CreatorModeSchema3).min(1, "keep at least one account type").refine((modes) => new Set(modes).size === modes.length, "each account type at most once");
|
|
42987
43071
|
var CreatorSchema3 = external_exports.object({
|
|
42988
43072
|
id: idOf3("crt"),
|
|
42989
43073
|
object: external_exports.literal("creator"),
|
|
@@ -42997,6 +43081,8 @@ var CreatorSchema3 = external_exports.object({
|
|
|
42997
43081
|
clicks: external_exports.number().int().nonnegative(),
|
|
42998
43082
|
/** This creator's per-draft studio cap, overriding `CREATOR_PROGRAM.studio`; `null` = the default. */
|
|
42999
43083
|
studio_budget_micro_usd: CreatorStudioBudgetSchema3.nullable(),
|
|
43084
|
+
/** Its campaign modes (migration 0181); a row read before it parses as `ai_clips` only. */
|
|
43085
|
+
modes: CreatorModesSchema3.default(["ai_clips"]),
|
|
43000
43086
|
created_at: Timestamp3,
|
|
43001
43087
|
updated_at: Timestamp3
|
|
43002
43088
|
});
|
|
@@ -43109,7 +43195,9 @@ var CREATOR_PROGRAM3 = {
|
|
|
43109
43195
|
review_check_budget_micro_usd: 5e6,
|
|
43110
43196
|
/** A `video` origin build (§42.14): one raw clip and its characters, recast by Mira. */
|
|
43111
43197
|
video: {
|
|
43112
|
-
|
|
43198
|
+
/** The object swap refuses a clip under 4 s (§42.15). */
|
|
43199
|
+
min_seconds: 4,
|
|
43200
|
+
/** The longest part of a clip a render uses: a longer upload is taken and cut to its first 15 s (ADR-2204). */
|
|
43113
43201
|
max_seconds: 15,
|
|
43114
43202
|
video_max_bytes: 95 * 1024 * 1024,
|
|
43115
43203
|
image_max_bytes: 10 * 1024 * 1024,
|
|
@@ -43117,8 +43205,8 @@ var CREATOR_PROGRAM3 = {
|
|
|
43117
43205
|
characters_max: 3,
|
|
43118
43206
|
/** After the first render. A refused or failed render does not use one up. */
|
|
43119
43207
|
revisions: 5,
|
|
43120
|
-
/** Per doomscroll account, until one of its templates is approved. */
|
|
43121
|
-
unapproved_templates:
|
|
43208
|
+
/** Per doomscroll account, until one of its templates is approved. Only drafts that rendered a video count. */
|
|
43209
|
+
unapproved_templates: 5,
|
|
43122
43210
|
/** Upload tickets a doomscroll account may ask for, per template. */
|
|
43123
43211
|
upload_tickets: 20,
|
|
43124
43212
|
/** A draft never submitted loses its source and character bytes this long after `updated_at`. */
|
|
@@ -43246,8 +43334,11 @@ var StudioCharacterSchema3 = external_exports.object({
|
|
|
43246
43334
|
file_id: external_exports.string().nullable(),
|
|
43247
43335
|
bytes: external_exports.number().int().positive().max(CREATOR_PROGRAM3.studio.video.image_max_bytes),
|
|
43248
43336
|
content_type: StudioImageContentTypeSchema3,
|
|
43249
|
-
filename: external_exports.string().min(1).max(200)
|
|
43337
|
+
filename: external_exports.string().min(1).max(200),
|
|
43338
|
+
/** Who this is in the clip, in the creator's words ("the driver"): the render is told which photo is whom. */
|
|
43339
|
+
label: external_exports.string().min(1).max(80).optional()
|
|
43250
43340
|
});
|
|
43341
|
+
var StudioEditModeSchema3 = external_exports.enum(["edit", "motion_transfer"]);
|
|
43251
43342
|
var CreatorStudioSchema3 = external_exports.object({
|
|
43252
43343
|
uploads: external_exports.array(StudioUploadSchema3).max(CREATOR_PROGRAM3.studio.uploads).default([]),
|
|
43253
43344
|
/** `links`: built from 1–3 reel links (`imports`), prompts optional; `upload`: the creator's three videos; `video`: one raw clip recast by Mira (§42.14). */
|
|
@@ -43266,7 +43357,11 @@ var CreatorStudioSchema3 = external_exports.object({
|
|
|
43266
43357
|
/** A `video` origin's raw clip, its characters, and the round submitted (§42.14). */
|
|
43267
43358
|
source_video: StudioSourceVideoSchema3.nullable().default(null),
|
|
43268
43359
|
characters: external_exports.array(StudioCharacterSchema3).max(CREATOR_PROGRAM3.studio.video.characters_max).default([]),
|
|
43269
|
-
chosen_round: external_exports.number().int().positive().nullable().default(null)
|
|
43360
|
+
chosen_round: external_exports.number().int().positive().nullable().default(null),
|
|
43361
|
+
/** A `video` origin's campaign mode (§42.15); absent on a draft made before modes, which reads as generic. */
|
|
43362
|
+
mode: VideoCreatorModeSchema3.optional(),
|
|
43363
|
+
/** A `video` origin's kind of Mira edit (ADR-2410); absent is `edit`. Not `mode`, which is the campaign mode. */
|
|
43364
|
+
edit_mode: StudioEditModeSchema3.optional()
|
|
43270
43365
|
});
|
|
43271
43366
|
var CreatorTemplateListingSchema3 = external_exports.object({
|
|
43272
43367
|
listed: external_exports.boolean(),
|
|
@@ -43438,19 +43533,28 @@ var CreatorAnalyticsSchema3 = external_exports.object({
|
|
|
43438
43533
|
var CreatorTemplateCreateKindSchema3 = external_exports.object({
|
|
43439
43534
|
kind: CreatorTemplateKindSchema3.default("crew"),
|
|
43440
43535
|
/** `video` makes a draft built from one raw clip (§42.14); it needs `kind: niche`. */
|
|
43441
|
-
origin: external_exports.literal("video").optional()
|
|
43536
|
+
origin: external_exports.literal("video").optional(),
|
|
43537
|
+
/** Required with `origin: "video"`: one of the creator's video modes (§42.15). */
|
|
43538
|
+
mode: VideoCreatorModeSchema3.optional(),
|
|
43539
|
+
/** Only with `origin: "video"`: how its rounds are made on Mira (ADR-2410); absent is `edit`. */
|
|
43540
|
+
edit_mode: StudioEditModeSchema3.optional()
|
|
43442
43541
|
});
|
|
43443
43542
|
var StudioUploadCreateSchema3 = external_exports.object({
|
|
43444
43543
|
purpose: external_exports.enum(["source", "character"]).optional(),
|
|
43445
43544
|
position: UploadPosition3.optional(),
|
|
43446
43545
|
filename: external_exports.string().min(1).max(200),
|
|
43447
43546
|
content_type: external_exports.union([StudioUploadContentTypeSchema3, StudioImageContentTypeSchema3]),
|
|
43448
|
-
bytes: external_exports.number().int().positive()
|
|
43547
|
+
bytes: external_exports.number().int().positive(),
|
|
43548
|
+
/** A `source` only: its length as the browser read it. Prices the render, held to the program's 4–15 s (§42.15). */
|
|
43549
|
+
seconds: external_exports.number().positive().max(600).optional(),
|
|
43550
|
+
/** A `character` only: who it is in the clip. */
|
|
43551
|
+
label: external_exports.string().trim().min(1).max(80).optional()
|
|
43449
43552
|
}).superRefine((body2, ctx) => {
|
|
43450
43553
|
const { video, upload_max_bytes } = CREATOR_PROGRAM3.studio;
|
|
43451
43554
|
const character2 = body2.purpose === "character";
|
|
43452
43555
|
const issue2 = (path, message32) => ctx.addIssue({ code: "custom", path: [path], message: message32 });
|
|
43453
43556
|
if (body2.purpose !== "source" && body2.position === void 0) issue2("position", "position is required");
|
|
43557
|
+
if (body2.label !== void 0 && !character2) issue2("label", "only a character takes a label");
|
|
43454
43558
|
if (character2 !== StudioImageContentTypeSchema3.safeParse(body2.content_type).success) {
|
|
43455
43559
|
issue2("content_type", character2 ? "a character must be a PNG, JPEG or WebP image" : "this upload must be an MP4, MOV or WebM video");
|
|
43456
43560
|
}
|
|
@@ -43491,8 +43595,16 @@ var CreatorStudioViewSchema3 = external_exports.object({
|
|
|
43491
43595
|
studio: CreatorStudioSchema3.extend({
|
|
43492
43596
|
source_video: StudioSourceVideoSchema3.extend({ url: external_exports.string().nullable().optional() }).nullable().default(null)
|
|
43493
43597
|
}),
|
|
43494
|
-
/**
|
|
43495
|
-
|
|
43598
|
+
/**
|
|
43599
|
+
* Newest first. A `video` round also carries a signed `sample_url`; a `motion_transfer` build's ended
|
|
43600
|
+
* round carries `rendered_as`, how Mira made it (`edit` when the motion could not be copied, ADR-2410).
|
|
43601
|
+
*/
|
|
43602
|
+
rounds: external_exports.array(
|
|
43603
|
+
CreatorTemplateRoundSchema3.extend({
|
|
43604
|
+
sample_url: external_exports.string().nullable().optional(),
|
|
43605
|
+
rendered_as: external_exports.enum(["edit", "motion_transfer"]).nullable().optional()
|
|
43606
|
+
})
|
|
43607
|
+
),
|
|
43496
43608
|
budget: StudioBudgetSchema3
|
|
43497
43609
|
});
|
|
43498
43610
|
var NicheSubmitSchema3 = external_exports.object({
|
|
@@ -45305,7 +45417,9 @@ var MusicGenerationSchema3 = external_exports.object({
|
|
|
45305
45417
|
duration_seconds: Seconds23.nullable(),
|
|
45306
45418
|
cost_micro_usd: MicroUsdField3
|
|
45307
45419
|
});
|
|
45308
|
-
var EditModeSchema3 = external_exports.enum(["scene", "outfit_or_object", "person_swap", "recast"])
|
|
45420
|
+
var EditModeSchema3 = external_exports.enum(["edit", "scene", "outfit_or_object", "person_swap", "recast", "motion_transfer"]).describe(
|
|
45421
|
+
`What kind of edit. "edit" (the default): the regular editor, reading what to do from the prompt. "scene", "outfit_or_object", "person_swap" and "recast" narrow it. "motion_transfer": copy the clip's exact motion onto the characters in the reference photos (fil_ images, at most 3 used), keeping the place; best for 5-15 s fights and dances; with 2-3 photos, start the prompt with <Character1>who photo 1 replaces<Character2>who photo 2 replaces and a new line. A clip it cannot take is made by the regular editor.`
|
|
45422
|
+
);
|
|
45309
45423
|
var EditRequestSchema3 = external_exports.object({
|
|
45310
45424
|
video: external_exports.string().min(1),
|
|
45311
45425
|
prompt: external_exports.string().min(1).max(1e3),
|
|
@@ -45321,6 +45435,12 @@ var EditJobSchema3 = external_exports.object({
|
|
|
45321
45435
|
prompt: external_exports.string(),
|
|
45322
45436
|
references: external_exports.array(external_exports.string()),
|
|
45323
45437
|
mode: EditModeSchema3.nullable(),
|
|
45438
|
+
/**
|
|
45439
|
+
* How the finished edit was made: `motion_transfer` when the motion was copied, `edit` when the regular
|
|
45440
|
+
* editor made it (every other mode, or a motion transfer that fell back). `null` until it is completed, and
|
|
45441
|
+
* from a server older than the field.
|
|
45442
|
+
*/
|
|
45443
|
+
rendered_as: external_exports.enum(["edit", "motion_transfer"]).nullable().default(null).describe("How the finished edit was made: motion_transfer, or edit (the regular editor). null until completed."),
|
|
45324
45444
|
result: external_exports.object({ file_id: external_exports.string().startsWith("fil_") }).nullable(),
|
|
45325
45445
|
error: external_exports.object({ code: EditFailureCodeSchema3, message: external_exports.string() }).nullable(),
|
|
45326
45446
|
cost_micro_usd: MicroUsdField3.nullable(),
|
|
@@ -48973,12 +49093,11 @@ var media6 = {
|
|
|
48973
49093
|
...args.bool("loop") ? { loop: true } : {}
|
|
48974
49094
|
})
|
|
48975
49095
|
}),
|
|
48976
|
-
// §55: `naive media edit "<prompt>" --video <fil_|url>`. `--wait` follows the edit job.
|
|
49096
|
+
// §55: `naive media edit "<prompt>" --video <fil_|url>`. `--wait` follows the edit job. `--mode` is
|
|
49097
|
+
// `edit` (the default) or a narrower mode, or `motion_transfer`, which copies the clip's exact motion onto
|
|
49098
|
+
// the characters in the `--reference` photos (ADR-2410).
|
|
48977
49099
|
edit: async ({ client, args }) => {
|
|
48978
|
-
const mode = args.str("mode");
|
|
48979
|
-
if (mode !== void 0 && mode !== "scene" && mode !== "outfit_or_object" && mode !== "person_swap" && mode !== "recast") {
|
|
48980
|
-
throw new UsageError("--mode must be scene, outfit_or_object, person_swap or recast");
|
|
48981
|
-
}
|
|
49100
|
+
const mode = editMode(args.str("mode"));
|
|
48982
49101
|
const references = args.list("reference");
|
|
48983
49102
|
let job = await client.media.edits.create({
|
|
48984
49103
|
video: args.need("video"),
|
|
@@ -49014,6 +49133,13 @@ var media6 = {
|
|
|
49014
49133
|
})
|
|
49015
49134
|
})
|
|
49016
49135
|
};
|
|
49136
|
+
var EDIT_MODES = ["edit", "scene", "outfit_or_object", "person_swap", "recast", "motion_transfer"];
|
|
49137
|
+
function editMode(mode) {
|
|
49138
|
+
if (mode === void 0) return void 0;
|
|
49139
|
+
const known = EDIT_MODES.find((value) => value === mode);
|
|
49140
|
+
if (known !== void 0) return known;
|
|
49141
|
+
throw new UsageError("--mode must be edit, scene, outfit_or_object, person_swap, recast or motion_transfer");
|
|
49142
|
+
}
|
|
49017
49143
|
function jobKind(kind) {
|
|
49018
49144
|
if (kind === void 0 || kind === "video" || kind === "clip" || kind === "transcription" || kind === "mesh")
|
|
49019
49145
|
return kind;
|
|
@@ -51497,7 +51623,8 @@ var FLAGS = {
|
|
|
51497
51623
|
"sound-effect": "seconds loop",
|
|
51498
51624
|
// core-gaps: U12-music — prompt is the positional; `--seconds` (3–300) and `--instrumental` are optional.
|
|
51499
51625
|
music: "seconds instrumental",
|
|
51500
|
-
// §55: a Mira edit. Prompt is the positional; `--video` is the clip, `--reference` repeats
|
|
51626
|
+
// §55: a Mira edit. Prompt is the positional; `--video` is the clip, `--reference` repeats; `--mode` is
|
|
51627
|
+
// edit (default), scene, outfit_or_object, person_swap, recast or motion_transfer (ADR-2410).
|
|
51501
51628
|
edit: "video reference mode wait",
|
|
51502
51629
|
show: "",
|
|
51503
51630
|
list: "kind status session limit after"
|
|
@@ -51893,7 +52020,7 @@ var ALIASES = {
|
|
|
51893
52020
|
};
|
|
51894
52021
|
|
|
51895
52022
|
// src/cli.ts
|
|
51896
|
-
var VERSION = true ? "1.0.
|
|
52023
|
+
var VERSION = true ? "1.0.4" : "0.0.0-dev";
|
|
51897
52024
|
var GLOBAL_FLAGS_HELP = "global flags: --json (default) --human --profile <name> --api-key <key> --org <org_id> --api-base-url <url>";
|
|
51898
52025
|
function usage() {
|
|
51899
52026
|
const groups = [...Object.keys(GROUPS), ...Object.keys(ALIASES)].sort().join(", ");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@usenaive-sdk/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Naive Managed Agents command line — create agents, run sessions, watch events, see cost.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"esbuild": "0.28.2",
|
|
28
28
|
"yaml": "^2.9.0",
|
|
29
29
|
"@vetta/core": "0.0.0",
|
|
30
|
-
"@usenaive-sdk/
|
|
31
|
-
"@usenaive-sdk/
|
|
30
|
+
"@usenaive-sdk/blueprints": "0.18.0",
|
|
31
|
+
"@usenaive-sdk/managed-agents": "0.12.4"
|
|
32
32
|
},
|
|
33
33
|
"scripts": {
|
|
34
34
|
"build": "node build.mjs",
|