@melius-ai/cli 0.50.1 → 0.52.0
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/README.md +12 -1
- package/dist/bin/mel.js +1 -1
- package/dist/{chunk-LZJD32CC.js → chunk-3RVBS56N.js} +1057 -109
- package/dist/src/index.js +1 -1
- package/package.json +1 -1
|
@@ -13178,12 +13178,24 @@ var CanvasPaginationErrorSchema = external_exports.object({
|
|
|
13178
13178
|
});
|
|
13179
13179
|
|
|
13180
13180
|
// ../api-contract/src/cast/creation.ts
|
|
13181
|
-
var CastVideoEngineSchema = external_exports.enum(["seedance"
|
|
13181
|
+
var CastVideoEngineSchema = external_exports.enum(["seedance"]);
|
|
13182
13182
|
var CastVideoStyleIdSchema = external_exports.enum([
|
|
13183
13183
|
"auto",
|
|
13184
13184
|
"self-filmed",
|
|
13185
13185
|
"produced",
|
|
13186
13186
|
"drama",
|
|
13187
|
+
"drama-romance",
|
|
13188
|
+
"drama-dark",
|
|
13189
|
+
"drama-luxury",
|
|
13190
|
+
"drama-fantasy",
|
|
13191
|
+
"drama-coming-of-age",
|
|
13192
|
+
"drama-kdrama",
|
|
13193
|
+
"drama-90s",
|
|
13194
|
+
"drama-anime",
|
|
13195
|
+
"drama-webtoon",
|
|
13196
|
+
"drama-3d",
|
|
13197
|
+
"drama-cgi",
|
|
13198
|
+
"drama-2d",
|
|
13187
13199
|
"vlog",
|
|
13188
13200
|
"podcast",
|
|
13189
13201
|
"unboxing",
|
|
@@ -13207,6 +13219,25 @@ var CastVideoStyleIdSchema = external_exports.enum([
|
|
|
13207
13219
|
"animated-2d"
|
|
13208
13220
|
]);
|
|
13209
13221
|
var CAST_VIDEO_STYLE_IDS = CastVideoStyleIdSchema.options;
|
|
13222
|
+
var CAST_MICRODRAMA_STYLE_IDS = [
|
|
13223
|
+
"drama",
|
|
13224
|
+
"drama-romance",
|
|
13225
|
+
"drama-dark",
|
|
13226
|
+
"drama-luxury",
|
|
13227
|
+
"drama-fantasy",
|
|
13228
|
+
"drama-coming-of-age",
|
|
13229
|
+
"drama-kdrama",
|
|
13230
|
+
"drama-90s",
|
|
13231
|
+
"drama-anime",
|
|
13232
|
+
"drama-webtoon",
|
|
13233
|
+
"drama-3d",
|
|
13234
|
+
"drama-cgi",
|
|
13235
|
+
"drama-2d"
|
|
13236
|
+
];
|
|
13237
|
+
var CastMicrodramaStyleIdSchema = external_exports.enum(CAST_MICRODRAMA_STYLE_IDS);
|
|
13238
|
+
function isCastMicrodramaStyle(id) {
|
|
13239
|
+
return CAST_MICRODRAMA_STYLE_IDS.some((style) => style === id);
|
|
13240
|
+
}
|
|
13210
13241
|
var CastVideoStyleSchema = external_exports.object({
|
|
13211
13242
|
id: CastVideoStyleIdSchema,
|
|
13212
13243
|
version: external_exports.literal(1)
|
|
@@ -13216,12 +13247,19 @@ var CastPronunciationSchema = external_exports.object({
|
|
|
13216
13247
|
pronunciation: external_exports.string().trim().min(1).max(200)
|
|
13217
13248
|
});
|
|
13218
13249
|
var MAX_CAST_PRONUNCIATIONS = 50;
|
|
13250
|
+
var CastAestheticSchema = external_exports.enum(["polished", "natural", "raw"]);
|
|
13219
13251
|
var CastCreationSettingsSchema = external_exports.object({
|
|
13220
13252
|
videoStyle: CastVideoStyleSchema,
|
|
13221
13253
|
speech: external_exports.enum(["on-screen", "narration"]),
|
|
13222
13254
|
visuals: external_exports.enum(["auto", "on", "off"]).optional().describe(
|
|
13223
13255
|
"Auto chooses useful supporting visuals from the script, actions and props across video styles, and may keep generated footage alone. Off skips added visuals. On remains accepted for compatibility. Subtitles are separate; generation eligibility still applies."
|
|
13224
13256
|
),
|
|
13257
|
+
shots: external_exports.enum(["auto", "one-shot"]).optional().describe(
|
|
13258
|
+
"Auto cuts the script into shots, with changes of framing and cutaways where the script and actions call for them. One shot films the video as one continuous take to camera with no cuts, so the script must fit one clip (the model's longest generation); a longer script is refused, never cut. Omitted means Auto."
|
|
13259
|
+
),
|
|
13260
|
+
aesthetic: CastAestheticSchema.optional().describe(
|
|
13261
|
+
"How self-filmed the video looks, on Auto, Self-filmed and Comment reply; other styles ignore it. Polished: a steady phone in soft, even light, focus holding. Natural: a propped phone with small camera flaws. Raw: the phone held in the hand, with shake, late autofocus and an uneven zoom. Set it only when the member asks for a polished, raw, handheld or shaky look; omitted means Natural."
|
|
13262
|
+
),
|
|
13225
13263
|
visualsBrief: external_exports.string().trim().min(1).max(1e3).optional().describe(
|
|
13226
13264
|
"The member's direction for every added visual, in their words: look, colors, type, motion, mood and how many. Never filmed; it asks for added visuals, so Visuals must not be Off."
|
|
13227
13265
|
),
|
|
@@ -13642,6 +13680,12 @@ var MAX_CAST_READ_BEATS = 20;
|
|
|
13642
13680
|
var MAX_CAST_TONE_TAGS_PER_BEAT = 2;
|
|
13643
13681
|
var MIN_CAST_DRAFT_SECONDS = 3;
|
|
13644
13682
|
var MAX_CAST_DRAFT_SECONDS = 600;
|
|
13683
|
+
var CastDraftSecondsSchema = external_exports.object({
|
|
13684
|
+
min: external_exports.number().int().min(MIN_CAST_DRAFT_SECONDS).max(MAX_CAST_DRAFT_SECONDS),
|
|
13685
|
+
max: external_exports.number().int().min(MIN_CAST_DRAFT_SECONDS).max(MAX_CAST_DRAFT_SECONDS)
|
|
13686
|
+
}).refine((slot) => slot.min <= slot.max, {
|
|
13687
|
+
message: "A slot's floor cannot be above its ceiling"
|
|
13688
|
+
});
|
|
13645
13689
|
var CastScriptSpeakersSchema = external_exports.array(external_exports.string().trim().min(1).max(MAX_CUSTOM_AVATAR_NAME_LENGTH)).max(CAST_MAX_LARGE_CAST_AVATARS).optional();
|
|
13646
13690
|
var MAX_CAST_SCRIPT_REFERENCES = 12;
|
|
13647
13691
|
var MAX_CAST_SCRIPT_REFERENCE_NAME_LENGTH = 200;
|
|
@@ -13740,14 +13784,15 @@ var CastScriptTreatmentSchema = external_exports.discriminatedUnion("operation",
|
|
|
13740
13784
|
* never told to fit is a script the member has to cut by hand before
|
|
13741
13785
|
* the press they were reaching for works.
|
|
13742
13786
|
*/
|
|
13743
|
-
seconds:
|
|
13744
|
-
min: external_exports.number().int().min(MIN_CAST_DRAFT_SECONDS).max(MAX_CAST_DRAFT_SECONDS),
|
|
13745
|
-
max: external_exports.number().int().min(MIN_CAST_DRAFT_SECONDS).max(MAX_CAST_DRAFT_SECONDS)
|
|
13746
|
-
}).refine((slot) => slot.min <= slot.max, {
|
|
13747
|
-
message: "A slot's floor cannot be above its ceiling"
|
|
13748
|
-
}).optional(),
|
|
13787
|
+
seconds: CastDraftSecondsSchema.optional(),
|
|
13749
13788
|
/** Who the draft is written for: every section said by one of them. */
|
|
13750
|
-
speakers: CastScriptSpeakersSchema
|
|
13789
|
+
speakers: CastScriptSpeakersSchema,
|
|
13790
|
+
/**
|
|
13791
|
+
* The video style it is filmed in. A style whose people talk to each
|
|
13792
|
+
* other (Microdrama) is written as a scene between them rather than a
|
|
13793
|
+
* read to the camera. Absent writes a read to the camera.
|
|
13794
|
+
*/
|
|
13795
|
+
videoStyle: CastVideoStyleSchema.optional()
|
|
13751
13796
|
})
|
|
13752
13797
|
]);
|
|
13753
13798
|
var EnhancePromptBodySchema = external_exports.object({
|
|
@@ -13787,6 +13832,8 @@ var CastScriptSectionSchema = external_exports.object({
|
|
|
13787
13832
|
* visual-only beat. Absent means a spoken beat.
|
|
13788
13833
|
*/
|
|
13789
13834
|
kind: external_exports.enum(["action"]).optional(),
|
|
13835
|
+
/** On an action beat, a Shot: nobody from the cast is its subject. */
|
|
13836
|
+
cutaway: external_exports.literal(true).optional(),
|
|
13790
13837
|
/**
|
|
13791
13838
|
* Who says it, as the request's `speakers` spell the name. Only on a
|
|
13792
13839
|
* split or a draft asked with a cast.
|
|
@@ -13804,8 +13851,7 @@ var PrepareCastScriptBodySchema = external_exports.object({
|
|
|
13804
13851
|
tone: external_exports.string().trim().min(1).max(MAX_CAST_TONE_LENGTH).optional(),
|
|
13805
13852
|
speakers: CastScriptSpeakersSchema,
|
|
13806
13853
|
references: CastScriptReferencesSchema,
|
|
13807
|
-
longVideo: external_exports.boolean()
|
|
13808
|
-
readPacing: external_exports.boolean()
|
|
13854
|
+
longVideo: external_exports.boolean()
|
|
13809
13855
|
});
|
|
13810
13856
|
var MAX_PREPARED_CAST_SCRIPT_SECTIONS = 100;
|
|
13811
13857
|
var PrepareCastScriptResponseSchema = external_exports.object({
|
|
@@ -14231,6 +14277,8 @@ var CastVideoReviewSchema = external_exports.object({
|
|
|
14231
14277
|
template: external_exports.string(),
|
|
14232
14278
|
/** Auto, Off or Unavailable, for a member who can have added visuals; absent otherwise. */
|
|
14233
14279
|
visuals: external_exports.string().optional(),
|
|
14280
|
+
/** Auto or One shot, for a member offered Camera (`cast-one-shot`); absent otherwise. */
|
|
14281
|
+
camera: external_exports.string().optional(),
|
|
14234
14282
|
/** What preparation changed from the request, said where the member reviews it. */
|
|
14235
14283
|
notice: external_exports.string().optional(),
|
|
14236
14284
|
/** Everyone the video casts, `avatar` first, where it casts several. */
|
|
@@ -14273,7 +14321,15 @@ var RunCastVideoBodySchema = external_exports.object({
|
|
|
14273
14321
|
expectedEstimatedCredits: external_exports.number().finite().nonnegative().optional(),
|
|
14274
14322
|
input: CastVideoInputSchema,
|
|
14275
14323
|
/** Spend a free generation instead of credits; refused, never billed, when none covers the video. */
|
|
14276
|
-
useFreeGeneration: external_exports.boolean().optional()
|
|
14324
|
+
useFreeGeneration: external_exports.boolean().optional(),
|
|
14325
|
+
/**
|
|
14326
|
+
* File the video in this Cast collection: a series' next episode,
|
|
14327
|
+
* which the server numbers. Ignored for a team without Microdrama.
|
|
14328
|
+
* Naming both this and `episodeId` is refused.
|
|
14329
|
+
*/
|
|
14330
|
+
collectionId: external_exports.string().uuid().optional(),
|
|
14331
|
+
/** Make another take of this episode of a series collection. */
|
|
14332
|
+
episodeId: external_exports.string().uuid().optional()
|
|
14277
14333
|
}).strict();
|
|
14278
14334
|
var CastPreparedVideoQuoteSchema = external_exports.object({
|
|
14279
14335
|
estimatedCredits: external_exports.number().finite().nonnegative()
|
|
@@ -14284,7 +14340,12 @@ var videoReference = external_exports.object({
|
|
|
14284
14340
|
bulkNodeRunId: external_exports.string().uuid(),
|
|
14285
14341
|
videoNodeId: external_exports.string().uuid(),
|
|
14286
14342
|
/** The free generation the video holds; absent once a release gave it back. */
|
|
14287
|
-
freeGeneration: FreeGenerationUseSchema.optional()
|
|
14343
|
+
freeGeneration: FreeGenerationUseSchema.optional(),
|
|
14344
|
+
/** The Cast collection the video is in; absent outside one. */
|
|
14345
|
+
collectionId: external_exports.string().uuid().optional(),
|
|
14346
|
+
/** Its series episode, and the number the server gave it; absent outside a series. */
|
|
14347
|
+
episodeId: external_exports.string().uuid().optional(),
|
|
14348
|
+
episodeNumber: external_exports.number().int().positive().optional()
|
|
14288
14349
|
});
|
|
14289
14350
|
var CastVideoResponseSchema = external_exports.discriminatedUnion("status", [
|
|
14290
14351
|
videoReference.extend({ status: external_exports.literal("submitting") }),
|
|
@@ -14352,7 +14413,7 @@ var CastVideoApprovalPreviewSchema = external_exports.object({
|
|
|
14352
14413
|
imageUrl: external_exports.string().nullable()
|
|
14353
14414
|
})
|
|
14354
14415
|
).max(CAST_VIDEO_MAX_PROPS).optional(),
|
|
14355
|
-
/** The model's name, such as Melius Cast
|
|
14416
|
+
/** The model's name, such as Melius Cast. */
|
|
14356
14417
|
model: external_exports.string(),
|
|
14357
14418
|
aspectRatio: OutputAspectRatioSchema,
|
|
14358
14419
|
resolution: OutputResolutionSchema.optional(),
|
|
@@ -16038,6 +16099,12 @@ var ModelVariantResponseSchema = external_exports.object({
|
|
|
16038
16099
|
minInputVideoDurationSeconds: external_exports.number().nullable().optional(),
|
|
16039
16100
|
/** Minimum input audio clip duration (seconds), or null if unconstrained. */
|
|
16040
16101
|
minInputAudioDurationSeconds: external_exports.number().nullable().optional(),
|
|
16102
|
+
/**
|
|
16103
|
+
* The total input audio length (seconds) the variant declares. Null when it
|
|
16104
|
+
* declares none; a run may still be held to a limit taken from its output
|
|
16105
|
+
* length.
|
|
16106
|
+
*/
|
|
16107
|
+
maxCombinedInputAudioDurationSeconds: external_exports.number().nullable().optional(),
|
|
16041
16108
|
/** Maximum prompt length in characters, or null if unconstrained. */
|
|
16042
16109
|
maxPromptLength: external_exports.number().nullable().optional(),
|
|
16043
16110
|
/** Minimum prompt length in characters, or null if unconstrained. */
|
|
@@ -16475,6 +16542,244 @@ var DittoResponseSchema = external_exports.object({
|
|
|
16475
16542
|
url: external_exports.string()
|
|
16476
16543
|
});
|
|
16477
16544
|
|
|
16545
|
+
// ../api-contract/src/preset-avatar/schema.ts
|
|
16546
|
+
var PresetAvatarProductSchema = external_exports.enum(["all", "cast", "ditto"]);
|
|
16547
|
+
var PresetAvatarStudioSchema = PresetAvatarProductSchema.exclude([
|
|
16548
|
+
"all"
|
|
16549
|
+
]);
|
|
16550
|
+
var ListPresetAvatarsQuerySchema = external_exports.object({
|
|
16551
|
+
product: PresetAvatarStudioSchema.optional()
|
|
16552
|
+
});
|
|
16553
|
+
var PresetAvatarDefaultVoiceSchema = external_exports.object({
|
|
16554
|
+
catalog: VoiceCatalogIdSchema,
|
|
16555
|
+
voiceId: external_exports.string().trim().min(1).max(200)
|
|
16556
|
+
});
|
|
16557
|
+
var PresetAvatarBackgroundSchema = external_exports.object({
|
|
16558
|
+
id: external_exports.string().uuid(),
|
|
16559
|
+
presetAvatarId: external_exports.string().uuid(),
|
|
16560
|
+
name: external_exports.string(),
|
|
16561
|
+
imageUrl: external_exports.string().nullable(),
|
|
16562
|
+
createdAt: external_exports.string(),
|
|
16563
|
+
updatedAt: external_exports.string()
|
|
16564
|
+
});
|
|
16565
|
+
var PresetAvatarSummarySchema = external_exports.object({
|
|
16566
|
+
id: external_exports.string().uuid(),
|
|
16567
|
+
name: external_exports.string(),
|
|
16568
|
+
description: external_exports.string(),
|
|
16569
|
+
/**
|
|
16570
|
+
* The character sheet, signed. One image, as a team's own avatar carries —
|
|
16571
|
+
* it is both the likeness and the picker tile. Null only if the stored ref
|
|
16572
|
+
* is unreadable.
|
|
16573
|
+
*/
|
|
16574
|
+
imageUrl: external_exports.string().nullable(),
|
|
16575
|
+
/**
|
|
16576
|
+
* The face, signed — a head-and-shoulders crop staff uploaded beside the
|
|
16577
|
+
* likeness, and what a roster tile draws.
|
|
16578
|
+
*
|
|
16579
|
+
* The counterpart of a team-made avatar's `previewUrl`, and null on the
|
|
16580
|
+
* same terms: a preset published before one existed draws its likeness.
|
|
16581
|
+
* Optional for the deploy, like every other field added to this shape.
|
|
16582
|
+
*/
|
|
16583
|
+
previewUrl: external_exports.string().nullable().optional(),
|
|
16584
|
+
/**
|
|
16585
|
+
* The face (the likeness when there is none) resized to a small width, for
|
|
16586
|
+
* a picture drawn a few dozen points across. The counterpart of a
|
|
16587
|
+
* team-made avatar's `thumbnailUrl`. Null when the stored ref can't be
|
|
16588
|
+
* resized; absent from a server that predates it.
|
|
16589
|
+
*/
|
|
16590
|
+
thumbnailUrl: external_exports.string().nullable().optional(),
|
|
16591
|
+
defaultVoice: PresetAvatarDefaultVoiceSchema.nullable(),
|
|
16592
|
+
/**
|
|
16593
|
+
* @deprecated Always empty. Melius curates avatars, not places — a team
|
|
16594
|
+
* makes its own backgrounds and they are the same list whoever is cast.
|
|
16595
|
+
* Declared so a client built before the move reads an avatar with no plates
|
|
16596
|
+
* of its own rather than crashing on a missing field.
|
|
16597
|
+
*/
|
|
16598
|
+
backgrounds: external_exports.array(PresetAvatarBackgroundSchema),
|
|
16599
|
+
/** True when published to everyone rather than scoped to this team. */
|
|
16600
|
+
isGlobal: external_exports.boolean(),
|
|
16601
|
+
createdAt: external_exports.string(),
|
|
16602
|
+
updatedAt: external_exports.string()
|
|
16603
|
+
});
|
|
16604
|
+
var PresetAvatarOwnOriginalSchema = external_exports.object({
|
|
16605
|
+
presetAvatarId: external_exports.string().uuid(),
|
|
16606
|
+
/** The curated name, which staff may have changed from the original's. */
|
|
16607
|
+
name: external_exports.string(),
|
|
16608
|
+
customAvatarId: external_exports.string().uuid()
|
|
16609
|
+
});
|
|
16610
|
+
var ListPresetAvatarsResponseSchema = external_exports.object({
|
|
16611
|
+
avatars: external_exports.array(PresetAvatarSummarySchema)
|
|
16612
|
+
});
|
|
16613
|
+
var ListTeamPresetAvatarsResponseSchema = ListPresetAvatarsResponseSchema.extend({
|
|
16614
|
+
/** Optional for clients reading a server that predates it. */
|
|
16615
|
+
ownOriginals: external_exports.array(PresetAvatarOwnOriginalSchema).optional()
|
|
16616
|
+
});
|
|
16617
|
+
var ImportPresetAvatarImageBodySchema = external_exports.object({
|
|
16618
|
+
/**
|
|
16619
|
+
* @deprecated Ignored. The character sheet is the only thing this route
|
|
16620
|
+
* copies — there is no curated background library to name. Still accepted
|
|
16621
|
+
* so a client deployed before the move is not rejected outright; it gets
|
|
16622
|
+
* the sheet.
|
|
16623
|
+
*/
|
|
16624
|
+
backgroundId: external_exports.string().uuid().optional()
|
|
16625
|
+
});
|
|
16626
|
+
var ImportPresetAvatarImageResponseSchema = external_exports.object({
|
|
16627
|
+
assetId: external_exports.string().uuid(),
|
|
16628
|
+
/** Presigned, so it expires — never persist this. */
|
|
16629
|
+
url: external_exports.string()
|
|
16630
|
+
});
|
|
16631
|
+
var PresetAvatarTeamBackgroundSchema = CastBackgroundSchema.extend({
|
|
16632
|
+
presetAvatarId: external_exports.string().uuid()
|
|
16633
|
+
});
|
|
16634
|
+
var ListPresetAvatarTeamBackgroundsResponseSchema = external_exports.object({
|
|
16635
|
+
backgrounds: external_exports.array(PresetAvatarTeamBackgroundSchema)
|
|
16636
|
+
});
|
|
16637
|
+
|
|
16638
|
+
// ../api-contract/src/cast-explore/schema.ts
|
|
16639
|
+
var CastUseCaseSchema = external_exports.enum(["ad", "microdrama"]);
|
|
16640
|
+
var CastAdTypeSchema = external_exports.enum([
|
|
16641
|
+
"ai_ugc",
|
|
16642
|
+
"product_demo",
|
|
16643
|
+
"problem_solution",
|
|
16644
|
+
"comparison",
|
|
16645
|
+
"before_after",
|
|
16646
|
+
"explainer",
|
|
16647
|
+
"listicle",
|
|
16648
|
+
"founder_story",
|
|
16649
|
+
"social_proof",
|
|
16650
|
+
"offer",
|
|
16651
|
+
"lifestyle",
|
|
16652
|
+
"interview_podcast",
|
|
16653
|
+
"visual_first",
|
|
16654
|
+
"viral_trend"
|
|
16655
|
+
]);
|
|
16656
|
+
var CastListedGenreSchema = CastMicrodramaStyleIdSchema;
|
|
16657
|
+
var CAST_RETIRED_GENRES = [
|
|
16658
|
+
"romance",
|
|
16659
|
+
"revenge",
|
|
16660
|
+
"billionaire",
|
|
16661
|
+
"hidden_identity",
|
|
16662
|
+
"werewolf",
|
|
16663
|
+
"fantasy",
|
|
16664
|
+
"faith",
|
|
16665
|
+
"family",
|
|
16666
|
+
"thriller",
|
|
16667
|
+
"comedy"
|
|
16668
|
+
];
|
|
16669
|
+
var CastGenreSchema = external_exports.enum([
|
|
16670
|
+
...CastListedGenreSchema.options,
|
|
16671
|
+
...CAST_RETIRED_GENRES
|
|
16672
|
+
]);
|
|
16673
|
+
var CastExploreStreamSchema = external_exports.object({
|
|
16674
|
+
/** API-relative master playlist; each resolution's media is signed by the CDN. */
|
|
16675
|
+
path: external_exports.string().startsWith("/"),
|
|
16676
|
+
/**
|
|
16677
|
+
* The short edges the master playlist lists, lowest first: up to 1440
|
|
16678
|
+
* (2K) for a featured video, up to 1080 for any other.
|
|
16679
|
+
*/
|
|
16680
|
+
qualities: external_exports.array(external_exports.number().int().positive()).min(1)
|
|
16681
|
+
});
|
|
16682
|
+
var CastExploreVideoSchema = external_exports.object({
|
|
16683
|
+
id: external_exports.string().uuid(),
|
|
16684
|
+
revision: external_exports.number().int().positive().safe(),
|
|
16685
|
+
title: external_exports.string().min(1).max(200),
|
|
16686
|
+
templateId: external_exports.string().uuid().nullable(),
|
|
16687
|
+
sourceGenerationId: external_exports.string().uuid().optional(),
|
|
16688
|
+
templateTitle: external_exports.string(),
|
|
16689
|
+
videoUrl: external_exports.string().url(),
|
|
16690
|
+
/**
|
|
16691
|
+
* A small, silent copy of `videoUrl` for grids that play many at once.
|
|
16692
|
+
* Absent until one is made of the file `videoUrl` plays, and from servers
|
|
16693
|
+
* that predate it, so a grid plays `previewVideoUrl ?? videoUrl`.
|
|
16694
|
+
*/
|
|
16695
|
+
previewVideoUrl: external_exports.string().url().optional(),
|
|
16696
|
+
/**
|
|
16697
|
+
* The adaptive stream, once one is made of the file `videoUrl` plays.
|
|
16698
|
+
* Absent before then and from servers that predate it, so a player
|
|
16699
|
+
* falls back to `previewVideoUrl ?? videoUrl`.
|
|
16700
|
+
*/
|
|
16701
|
+
stream: CastExploreStreamSchema.optional(),
|
|
16702
|
+
thumbnailUrl: external_exports.string().url(),
|
|
16703
|
+
width: external_exports.number().int().positive(),
|
|
16704
|
+
height: external_exports.number().int().positive(),
|
|
16705
|
+
durationSeconds: external_exports.number().finite().positive(),
|
|
16706
|
+
/**
|
|
16707
|
+
* How many videos this tile's template has made. Optional for the same
|
|
16708
|
+
* reason it is on `CastTemplateSchema` — a client reading from a deployment
|
|
16709
|
+
* predating the count draws nothing rather than a zero.
|
|
16710
|
+
*/
|
|
16711
|
+
templateUseCount: external_exports.number().int().nonnegative().optional(),
|
|
16712
|
+
/**
|
|
16713
|
+
* The curated avatar the example was shot with, as this team may cast it.
|
|
16714
|
+
* Optional on the same deploy terms as `templateUseCount`: a client reading
|
|
16715
|
+
* from a server that predates the field offers the script alone.
|
|
16716
|
+
*/
|
|
16717
|
+
avatar: PresetAvatarSummarySchema.optional(),
|
|
16718
|
+
/**
|
|
16719
|
+
* Set instead of `avatar` for the team whose own avatar the curated one was
|
|
16720
|
+
* copied from: that team casts its original.
|
|
16721
|
+
*/
|
|
16722
|
+
customAvatarId: external_exports.string().uuid().optional(),
|
|
16723
|
+
/**
|
|
16724
|
+
* The Melius avatars the video stars, one per person; empty when none
|
|
16725
|
+
* traces back to one. Discover keeps cards that share one apart. Optional
|
|
16726
|
+
* so a client reading from a server that predates it reads `avatar`.
|
|
16727
|
+
*/
|
|
16728
|
+
presetAvatarIds: external_exports.array(external_exports.string().uuid()).optional(),
|
|
16729
|
+
/**
|
|
16730
|
+
* Staff feature it, so Discover lists it first, in their order. Optional
|
|
16731
|
+
* so a client reading from a server that predates featuring shows none.
|
|
16732
|
+
*/
|
|
16733
|
+
featured: external_exports.boolean().optional(),
|
|
16734
|
+
/**
|
|
16735
|
+
* The tab staff listed it under. Absent until they choose one, and from
|
|
16736
|
+
* a server that predates use cases.
|
|
16737
|
+
*/
|
|
16738
|
+
useCase: CastUseCaseSchema.optional(),
|
|
16739
|
+
/** The kind of ad it is, its Ads & content row. Absent when staff set none. */
|
|
16740
|
+
adType: CastAdTypeSchema.optional(),
|
|
16741
|
+
/** Its story genre, its Microdramas row. Absent when staff set none. */
|
|
16742
|
+
genre: CastGenreSchema.optional(),
|
|
16743
|
+
/** One line on what it makes, under its title. Absent until staff write one. */
|
|
16744
|
+
description: external_exports.string().optional()
|
|
16745
|
+
});
|
|
16746
|
+
var CastExploreKindSchema = external_exports.enum(["template", "linked"]);
|
|
16747
|
+
var SearchCastExploreBodySchema = createCursorPaginationRequestSchema({
|
|
16748
|
+
defaultPageSize: 24
|
|
16749
|
+
}).extend({
|
|
16750
|
+
/**
|
|
16751
|
+
* Orders the gallery for one visit. A fresh seed per visit reshuffles it;
|
|
16752
|
+
* one seed keeps every page of a traversal in the same order.
|
|
16753
|
+
*/
|
|
16754
|
+
seed: external_exports.string().uuid().optional(),
|
|
16755
|
+
includeLinked: external_exports.boolean().optional(),
|
|
16756
|
+
/** One kind only; `linked` needs no `includeLinked`. Absent lists both. */
|
|
16757
|
+
kind: CastExploreKindSchema.optional(),
|
|
16758
|
+
/**
|
|
16759
|
+
* True lists only the featured videos, in staff order. A server that
|
|
16760
|
+
* predates it lists every video, so a client keeps those with `featured`.
|
|
16761
|
+
*/
|
|
16762
|
+
featured: external_exports.boolean().optional(),
|
|
16763
|
+
/**
|
|
16764
|
+
* One tab's videos only. A server that predates it lists every video, so
|
|
16765
|
+
* a client keeps those whose `useCase` matches.
|
|
16766
|
+
*/
|
|
16767
|
+
useCase: CastUseCaseSchema.optional(),
|
|
16768
|
+
/**
|
|
16769
|
+
* One ad type only. A server that predates it lists every video, so a
|
|
16770
|
+
* client keeps those whose `adType` matches.
|
|
16771
|
+
*/
|
|
16772
|
+
adType: CastAdTypeSchema.optional(),
|
|
16773
|
+
/**
|
|
16774
|
+
* One genre only. A server that predates it lists every video, so a
|
|
16775
|
+
* client keeps those whose `genre` matches.
|
|
16776
|
+
*/
|
|
16777
|
+
genre: CastGenreSchema.optional()
|
|
16778
|
+
});
|
|
16779
|
+
var CastExplorePageSchema = createPaginatedResponseSchema(
|
|
16780
|
+
CastExploreVideoSchema
|
|
16781
|
+
);
|
|
16782
|
+
|
|
16478
16783
|
// ../api-contract/src/cast/schema.ts
|
|
16479
16784
|
var CAST_TREATMENT_IDS = ["self-filmed", "produced", "vlog"];
|
|
16480
16785
|
var CAST_SCRIPT_ENTRY_METHODS = [
|
|
@@ -16891,6 +17196,15 @@ var CreateCastGenerationBodySchema = external_exports.object({
|
|
|
16891
17196
|
/** Opt in to server-owned submission reporting; absent preserves old clients. */
|
|
16892
17197
|
reportSubmissionEvent: external_exports.boolean().optional().catch(void 0),
|
|
16893
17198
|
canvasId: external_exports.string().uuid(),
|
|
17199
|
+
/**
|
|
17200
|
+
* File the video in this collection: a series' next episode, which the
|
|
17201
|
+
* server numbers. Without this or `episodeId` the video is in none.
|
|
17202
|
+
* Ignored for a team without Microdrama. A request naming both this and
|
|
17203
|
+
* `episodeId` is refused.
|
|
17204
|
+
*/
|
|
17205
|
+
collectionId: external_exports.string().uuid().optional(),
|
|
17206
|
+
/** Make another take of this series episode, keeping its number. */
|
|
17207
|
+
episodeId: external_exports.string().uuid().optional(),
|
|
16894
17208
|
/** The run this record belongs to — the join to credits and analytics. */
|
|
16895
17209
|
bulkNodeRunId: external_exports.string().uuid().optional(),
|
|
16896
17210
|
config: CastGenerationConfigSchema.extend({
|
|
@@ -16919,6 +17233,16 @@ var CastGenerationCreatorSchema = external_exports.object({
|
|
|
16919
17233
|
name: external_exports.string(),
|
|
16920
17234
|
avatarUrl: external_exports.string().nullable()
|
|
16921
17235
|
});
|
|
17236
|
+
var CastCollectionKindSchema = external_exports.enum(["series", "group"]);
|
|
17237
|
+
var CastGenerationCollectionSchema = external_exports.object({
|
|
17238
|
+
id: external_exports.string().uuid(),
|
|
17239
|
+
kind: CastCollectionKindSchema,
|
|
17240
|
+
title: external_exports.string(),
|
|
17241
|
+
/** The episode this video is a take of, what another take sends back; null outside a series. */
|
|
17242
|
+
episodeId: external_exports.string().uuid().nullable(),
|
|
17243
|
+
episodeNumber: external_exports.number().int().positive().nullable(),
|
|
17244
|
+
episodeCount: external_exports.number().int().nonnegative()
|
|
17245
|
+
});
|
|
16922
17246
|
var CastGenerationResponseSchema = external_exports.object({
|
|
16923
17247
|
id: external_exports.string().uuid(),
|
|
16924
17248
|
canvasId: external_exports.string().uuid(),
|
|
@@ -17010,7 +17334,12 @@ var CastGenerationResponseSchema = external_exports.object({
|
|
|
17010
17334
|
*/
|
|
17011
17335
|
addSubtitles: CastAddSubtitlesSchema.nullable().optional(),
|
|
17012
17336
|
/** Set on a take that is another with subtitles added. Null otherwise. */
|
|
17013
|
-
subtitledFrom: CastSubtitledFromSchema.nullable().optional()
|
|
17337
|
+
subtitledFrom: CastSubtitledFromSchema.nullable().optional(),
|
|
17338
|
+
/**
|
|
17339
|
+
* The collection this video is in; absent for a video in none, and from a
|
|
17340
|
+
* server built before collections.
|
|
17341
|
+
*/
|
|
17342
|
+
collection: CastGenerationCollectionSchema.nullable().optional()
|
|
17014
17343
|
});
|
|
17015
17344
|
var CreateCastGenerationResponseSchema = CastGenerationResponseSchema.extend({
|
|
17016
17345
|
/** Ownership acknowledgment, not a guarantee of delivery to PostHog. */
|
|
@@ -17037,10 +17366,116 @@ var SearchCastGenerationsBodySchema = createCursorPaginationRequestSchema({
|
|
|
17037
17366
|
* `includeReplacements`; a replacement is still listed only
|
|
17038
17367
|
* for its author.
|
|
17039
17368
|
*/
|
|
17040
|
-
operation: CastGenerationOperationSchema.optional()
|
|
17369
|
+
operation: CastGenerationOperationSchema.optional(),
|
|
17370
|
+
/**
|
|
17371
|
+
* One Cast home tab's videos: Microdrama-style videos on
|
|
17372
|
+
* Microdramas, every other video on Ads & content. Absent lists
|
|
17373
|
+
* both.
|
|
17374
|
+
*/
|
|
17375
|
+
useCase: CastUseCaseSchema.optional(),
|
|
17376
|
+
/**
|
|
17377
|
+
* Only videos in a collection (true), or only videos outside
|
|
17378
|
+
* one (false). Absent lists both.
|
|
17379
|
+
*/
|
|
17380
|
+
inCollection: external_exports.boolean().optional(),
|
|
17381
|
+
/** Only this collection's videos: every take of a series' episodes. */
|
|
17382
|
+
collectionId: external_exports.string().uuid().optional()
|
|
17041
17383
|
}).default({})
|
|
17042
17384
|
});
|
|
17043
17385
|
var SearchCastGenerationsResponseSchema = createPaginatedResponseSchema(CastGenerationResponseSchema);
|
|
17386
|
+
var CastCollectionSchema = external_exports.object({
|
|
17387
|
+
id: external_exports.string().uuid(),
|
|
17388
|
+
kind: CastCollectionKindSchema,
|
|
17389
|
+
title: external_exports.string(),
|
|
17390
|
+
/**
|
|
17391
|
+
* A series' genre, a label for now: it changes neither the script nor the
|
|
17392
|
+
* filming. Null for a collection that is not a series.
|
|
17393
|
+
*/
|
|
17394
|
+
genre: CastGenreSchema.nullable(),
|
|
17395
|
+
/**
|
|
17396
|
+
* The style every episode of a series is filmed in. Null for a collection
|
|
17397
|
+
* that is not a series.
|
|
17398
|
+
*/
|
|
17399
|
+
videoStyleId: CastVideoStyleIdSchema.nullable(),
|
|
17400
|
+
/** A series' live episodes, however many takes each has. */
|
|
17401
|
+
episodeCount: external_exports.number().int().nonnegative(),
|
|
17402
|
+
/**
|
|
17403
|
+
* The number a series' new episode gets. Another episode starting first
|
|
17404
|
+
* can take it. Null for a collection that is not a series.
|
|
17405
|
+
*/
|
|
17406
|
+
nextEpisodeNumber: external_exports.number().int().positive().nullable(),
|
|
17407
|
+
createdAt: external_exports.string().datetime(),
|
|
17408
|
+
/** When its last video was made, or it was renamed: the list's order. */
|
|
17409
|
+
updatedAt: external_exports.string().datetime()
|
|
17410
|
+
});
|
|
17411
|
+
var CastCollectionTitleSchema = external_exports.string().trim().min(1).max(120);
|
|
17412
|
+
function castSeriesRequestProblem(request) {
|
|
17413
|
+
if (request.series === void 0 && request.episode === void 0)
|
|
17414
|
+
return void 0;
|
|
17415
|
+
if (request.series !== void 0 && request.episode !== void 0)
|
|
17416
|
+
return "series-and-episode";
|
|
17417
|
+
return isCastMicrodramaStyle(request.videoStyleId) ? void 0 : "not-microdrama";
|
|
17418
|
+
}
|
|
17419
|
+
var CreateCastCollectionBodySchema = external_exports.object({
|
|
17420
|
+
/** Only a series is started today. */
|
|
17421
|
+
kind: external_exports.literal("series"),
|
|
17422
|
+
title: CastCollectionTitleSchema,
|
|
17423
|
+
/** Optional: a series' genre can be set later. */
|
|
17424
|
+
genre: CastGenreSchema.optional(),
|
|
17425
|
+
/**
|
|
17426
|
+
* The style every episode is filmed in, kept for the whole series.
|
|
17427
|
+
* Absent films the series as a Microdrama.
|
|
17428
|
+
*/
|
|
17429
|
+
videoStyleId: CastMicrodramaStyleIdSchema.optional(),
|
|
17430
|
+
/**
|
|
17431
|
+
* A Microdrama made outside a series, filed as the series' Episode 1 with
|
|
17432
|
+
* its upscaled and subtitled copies. The series takes its style.
|
|
17433
|
+
*/
|
|
17434
|
+
fromGenerationId: external_exports.string().uuid().optional()
|
|
17435
|
+
});
|
|
17436
|
+
var UpdateCastCollectionBodySchema = external_exports.object({
|
|
17437
|
+
title: CastCollectionTitleSchema.optional(),
|
|
17438
|
+
genre: CastGenreSchema.nullable().optional()
|
|
17439
|
+
});
|
|
17440
|
+
var CastCollectionListItemSchema = CastCollectionSchema.extend({
|
|
17441
|
+
/**
|
|
17442
|
+
* The newest take the reader may see of its newest episode that has one.
|
|
17443
|
+
* Null while none does.
|
|
17444
|
+
*/
|
|
17445
|
+
cover: CastGenerationResponseSchema.nullable()
|
|
17446
|
+
});
|
|
17447
|
+
var SearchCastCollectionsBodySchema = createCursorPaginationRequestSchema({
|
|
17448
|
+
defaultPageSize: 24
|
|
17449
|
+
}).extend({
|
|
17450
|
+
filters: external_exports.object({
|
|
17451
|
+
/** Only collections of this kind; absent lists every kind. */
|
|
17452
|
+
kind: CastCollectionKindSchema.optional()
|
|
17453
|
+
}).default({})
|
|
17454
|
+
});
|
|
17455
|
+
var SearchCastCollectionsResponseSchema = createPaginatedResponseSchema(CastCollectionListItemSchema);
|
|
17456
|
+
var CastCollectionEpisodeSchema = external_exports.object({
|
|
17457
|
+
id: external_exports.string().uuid(),
|
|
17458
|
+
number: external_exports.number().int().positive(),
|
|
17459
|
+
take: CastGenerationResponseSchema
|
|
17460
|
+
});
|
|
17461
|
+
var SearchCastCollectionEpisodesBodySchema = createCursorPaginationRequestSchema({ defaultPageSize: 24 });
|
|
17462
|
+
var SearchCastCollectionEpisodesResponseSchema = createPaginatedResponseSchema(CastCollectionEpisodeSchema);
|
|
17463
|
+
var DraftCastCollectionEpisodeBodySchema = external_exports.object({
|
|
17464
|
+
/** What this episode does, in the member's words; absent continues the story. */
|
|
17465
|
+
brief: external_exports.string().trim().min(1).max(MAX_PROMPT_ENHANCE_INPUT_LENGTH).optional(),
|
|
17466
|
+
seconds: CastDraftSecondsSchema.optional(),
|
|
17467
|
+
/** The cast's names, lead first: every line is said by one of them. */
|
|
17468
|
+
speakers: CastScriptSpeakersSchema,
|
|
17469
|
+
/**
|
|
17470
|
+
* The episode to write: one already made, written again from the episodes
|
|
17471
|
+
* before it, or absent (or past the last) for the series' next episode.
|
|
17472
|
+
*/
|
|
17473
|
+
episodeNumber: external_exports.number().int().positive().optional()
|
|
17474
|
+
});
|
|
17475
|
+
var DraftCastCollectionEpisodeResponseSchema = external_exports.object({
|
|
17476
|
+
episodeNumber: external_exports.number().int().positive(),
|
|
17477
|
+
sections: external_exports.array(CastScriptSectionSchema).min(1)
|
|
17478
|
+
});
|
|
17044
17479
|
|
|
17045
17480
|
// ../api-contract/src/templates/constants.ts
|
|
17046
17481
|
var TEMPLATE_TAG_MAX_LENGTH = 40;
|
|
@@ -18119,6 +18554,7 @@ var InAppExperience;
|
|
|
18119
18554
|
InAppExperience2["TemplateRequestBanner"] = "template_request_banner";
|
|
18120
18555
|
InAppExperience2["BuildTemplateIntro"] = "build_template_intro";
|
|
18121
18556
|
InAppExperience2["CastControlsGuide"] = "cast_controls_guide";
|
|
18557
|
+
InAppExperience2["CastMicrodramaGuide"] = "cast_microdrama_guide";
|
|
18122
18558
|
InAppExperience2["CastScriptGuide"] = "cast_script_guide";
|
|
18123
18559
|
InAppExperience2["CastIntro"] = "cast_intro";
|
|
18124
18560
|
InAppExperience2["CastActionsGuide"] = "cast_actions_guide";
|
|
@@ -18162,6 +18598,7 @@ var IN_APP_EXPERIENCE_REGISTRY = {
|
|
|
18162
18598
|
[InAppExperience.TemplateRequestBanner]: ON_OUTCOME,
|
|
18163
18599
|
[InAppExperience.BuildTemplateIntro]: ON_OUTCOME,
|
|
18164
18600
|
[InAppExperience.CastControlsGuide]: ON_OUTCOME,
|
|
18601
|
+
[InAppExperience.CastMicrodramaGuide]: ON_OUTCOME,
|
|
18165
18602
|
[InAppExperience.CastScriptGuide]: ON_OUTCOME,
|
|
18166
18603
|
[InAppExperience.CastIntro]: ON_OUTCOME,
|
|
18167
18604
|
[InAppExperience.CastActionsGuide]: ON_OUTCOME,
|
|
@@ -18809,13 +19246,99 @@ var ProjectMemoryResponseSchema = external_exports.object({
|
|
|
18809
19246
|
markdown: external_exports.string(),
|
|
18810
19247
|
/** 0 until the first save. */
|
|
18811
19248
|
revision: external_exports.number().int().nonnegative(),
|
|
18812
|
-
updatedAt: external_exports.string().datetime().nullable()
|
|
19249
|
+
updatedAt: external_exports.string().datetime().nullable(),
|
|
19250
|
+
/**
|
|
19251
|
+
* While on, Mel also saves lasting project facts it notices in chat. On
|
|
19252
|
+
* for a project that has never changed it.
|
|
19253
|
+
*/
|
|
19254
|
+
autoUpdate: external_exports.boolean()
|
|
18813
19255
|
});
|
|
18814
19256
|
var UpdateProjectMemoryBodySchema = external_exports.object({
|
|
18815
19257
|
markdown: external_exports.string().max(MAX_PROJECT_MEMORY_LENGTH).refine((text) => !text.includes("\0"), "Remove null characters"),
|
|
18816
19258
|
/** The revision the editor loaded; a different saved revision is a 409. */
|
|
18817
19259
|
revision: external_exports.number().int().nonnegative().max(MAX_SAVED_REVISION)
|
|
18818
19260
|
});
|
|
19261
|
+
var UpdateProjectMemoryAutoUpdateBodySchema = external_exports.object({
|
|
19262
|
+
autoUpdate: external_exports.boolean()
|
|
19263
|
+
});
|
|
19264
|
+
|
|
19265
|
+
// ../api-contract/src/project/memory-save-schema.ts
|
|
19266
|
+
var MAX_PROJECT_MEMORY_LINE_LENGTH = 1e3;
|
|
19267
|
+
var memoryLine = external_exports.string().trim().min(1).max(MAX_PROJECT_MEMORY_LINE_LENGTH).regex(/^[^\r\n]+$/, "One line");
|
|
19268
|
+
var revision = external_exports.number().int().nonnegative().max(MAX_SAVED_REVISION);
|
|
19269
|
+
var ProjectMemoryLineChangeSchema = external_exports.object({
|
|
19270
|
+
replacements: external_exports.array(
|
|
19271
|
+
external_exports.object({
|
|
19272
|
+
/** The 1-based line number at the revision the change was built from. */
|
|
19273
|
+
line: external_exports.number().int().positive(),
|
|
19274
|
+
before: external_exports.string(),
|
|
19275
|
+
/** Null removes the line. */
|
|
19276
|
+
after: external_exports.string().nullable()
|
|
19277
|
+
})
|
|
19278
|
+
),
|
|
19279
|
+
additions: external_exports.array(external_exports.string())
|
|
19280
|
+
});
|
|
19281
|
+
var ProjectMemoryChangeResponseSchema = external_exports.object({
|
|
19282
|
+
approvalId: external_exports.string().uuid(),
|
|
19283
|
+
projectId: external_exports.string().uuid(),
|
|
19284
|
+
/**
|
|
19285
|
+
* `expired` is a change nobody can approve any more: memory moved on, or
|
|
19286
|
+
* the card closed, before a member approved it.
|
|
19287
|
+
*/
|
|
19288
|
+
state: external_exports.enum(["awaiting_approval", "applied", "denied", "expired"]),
|
|
19289
|
+
/** The memory revision the change was built from. */
|
|
19290
|
+
baseRevision: revision,
|
|
19291
|
+
change: ProjectMemoryLineChangeSchema
|
|
19292
|
+
});
|
|
19293
|
+
var ProjectMemoryProposalResponseSchema = ProjectMemoryChangeResponseSchema.omit({ approvalId: true }).extend({
|
|
19294
|
+
proposalId: external_exports.string().uuid()
|
|
19295
|
+
});
|
|
19296
|
+
var ApproveProjectMemoryProposalBodySchema = external_exports.object({
|
|
19297
|
+
/** The revision the card was built from; memory at another one is left as it is. */
|
|
19298
|
+
baseRevision: revision
|
|
19299
|
+
});
|
|
19300
|
+
var EditProjectMemoryChangeBodySchema = external_exports.object({
|
|
19301
|
+
/** The revision the card was built from; a different one is a 409. */
|
|
19302
|
+
baseRevision: revision,
|
|
19303
|
+
/** One entry per rewritten line of the change, with its new text. */
|
|
19304
|
+
replacements: external_exports.array(
|
|
19305
|
+
external_exports.object({ line: external_exports.number().int().positive(), after: memoryLine })
|
|
19306
|
+
),
|
|
19307
|
+
/** The change's added lines, in the order the card shows them. */
|
|
19308
|
+
additions: external_exports.array(memoryLine)
|
|
19309
|
+
});
|
|
19310
|
+
var ProjectMemorySaveResponseSchema = external_exports.object({
|
|
19311
|
+
id: external_exports.string().uuid(),
|
|
19312
|
+
projectId: external_exports.string().uuid(),
|
|
19313
|
+
/** The lines the save added. */
|
|
19314
|
+
added: external_exports.array(external_exports.string()),
|
|
19315
|
+
/** `none` is a save that added nothing at once. */
|
|
19316
|
+
state: external_exports.enum(["added", "undone", "none"]),
|
|
19317
|
+
/** The added lines memory still holds as added: what Undo would remove now. */
|
|
19318
|
+
removable: external_exports.array(external_exports.string()),
|
|
19319
|
+
/** Memory was saved again after this save, so Undo asks before removing. */
|
|
19320
|
+
editedSince: external_exports.boolean(),
|
|
19321
|
+
/** Memory's revision as read; a confirmed Undo sends it back. */
|
|
19322
|
+
revision
|
|
19323
|
+
});
|
|
19324
|
+
var UndoProjectMemorySaveBodySchema = external_exports.object({
|
|
19325
|
+
/**
|
|
19326
|
+
* Sent to confirm a removal the server asked about: the memory revision
|
|
19327
|
+
* that removal was shown for.
|
|
19328
|
+
*/
|
|
19329
|
+
confirmRevision: revision.optional()
|
|
19330
|
+
});
|
|
19331
|
+
var UndoProjectMemorySaveResponseSchema = external_exports.object({
|
|
19332
|
+
/**
|
|
19333
|
+
* `needs_confirmation`: memory was edited after the save, so nothing was
|
|
19334
|
+
* removed yet; `lines` are what Undo would remove from memory as it is at
|
|
19335
|
+
* `revision`. `not_found`: memory holds none of the lines as the save
|
|
19336
|
+
* added them (a member deleted or reworded them), so nothing was removed.
|
|
19337
|
+
*/
|
|
19338
|
+
status: external_exports.enum(["undone", "needs_confirmation", "not_found"]),
|
|
19339
|
+
lines: external_exports.array(external_exports.string()),
|
|
19340
|
+
revision
|
|
19341
|
+
});
|
|
18819
19342
|
|
|
18820
19343
|
// ../api-contract/src/template-port-summary.ts
|
|
18821
19344
|
var TemplatePortSummarySchema = external_exports.object({
|
|
@@ -21061,6 +21584,16 @@ var canvasContract = c5.router({
|
|
|
21061
21584
|
404: MessageResponseSchema
|
|
21062
21585
|
}
|
|
21063
21586
|
},
|
|
21587
|
+
getNodeDownloadUrl: {
|
|
21588
|
+
method: "GET",
|
|
21589
|
+
path: "/nodes/:nodeId/download-url",
|
|
21590
|
+
pathParams: external_exports.object({ nodeId: external_exports.string().uuid() }),
|
|
21591
|
+
query: external_exports.object({ nodeVersionId: external_exports.string().uuid().optional() }),
|
|
21592
|
+
responses: {
|
|
21593
|
+
200: AssetDownloadResponseSchema,
|
|
21594
|
+
404: MessageResponseSchema
|
|
21595
|
+
}
|
|
21596
|
+
},
|
|
21064
21597
|
getNode: {
|
|
21065
21598
|
method: "GET",
|
|
21066
21599
|
path: "/nodes/:nodeId",
|
|
@@ -24391,6 +24924,117 @@ var projectContract = c14.router({
|
|
|
24391
24924
|
404: MessageResponseSchema,
|
|
24392
24925
|
409: MessageResponseSchema
|
|
24393
24926
|
}
|
|
24927
|
+
},
|
|
24928
|
+
updateProjectMemoryAutoUpdate: {
|
|
24929
|
+
method: "PUT",
|
|
24930
|
+
path: "/projects/:projectId/memory/auto-update",
|
|
24931
|
+
pathParams: ProjectIdParamsSchema,
|
|
24932
|
+
body: UpdateProjectMemoryAutoUpdateBodySchema,
|
|
24933
|
+
responses: {
|
|
24934
|
+
200: ProjectMemoryResponseSchema,
|
|
24935
|
+
403: MessageResponseSchema,
|
|
24936
|
+
404: MessageResponseSchema
|
|
24937
|
+
}
|
|
24938
|
+
},
|
|
24939
|
+
// ── What Mel saves to project memory from chat ──────────────────
|
|
24940
|
+
getProjectMemoryChange: {
|
|
24941
|
+
method: "GET",
|
|
24942
|
+
path: "/agent/approvals/:approvalId/memory-change",
|
|
24943
|
+
pathParams: external_exports.object({ approvalId: external_exports.string().uuid() }),
|
|
24944
|
+
responses: {
|
|
24945
|
+
200: ProjectMemoryChangeResponseSchema,
|
|
24946
|
+
404: MessageResponseSchema
|
|
24947
|
+
},
|
|
24948
|
+
summary: "The lines a project memory approval card asks to change, and what became of it"
|
|
24949
|
+
},
|
|
24950
|
+
editProjectMemoryChange: {
|
|
24951
|
+
method: "POST",
|
|
24952
|
+
path: "/agent/approvals/:approvalId/memory-change/edit",
|
|
24953
|
+
pathParams: external_exports.object({ approvalId: external_exports.string().uuid() }),
|
|
24954
|
+
body: EditProjectMemoryChangeBodySchema,
|
|
24955
|
+
responses: {
|
|
24956
|
+
200: ProjectMemoryChangeResponseSchema,
|
|
24957
|
+
403: MessageResponseSchema,
|
|
24958
|
+
404: MessageResponseSchema,
|
|
24959
|
+
/** Memory changed, or the card was already answered. */
|
|
24960
|
+
409: MessageResponseSchema,
|
|
24961
|
+
/** The edited text cannot be saved as written; the message says why. */
|
|
24962
|
+
422: MessageResponseSchema
|
|
24963
|
+
},
|
|
24964
|
+
summary: "Reword a pending project memory change before approving it"
|
|
24965
|
+
},
|
|
24966
|
+
getProjectMemoryProposal: {
|
|
24967
|
+
method: "GET",
|
|
24968
|
+
path: "/project-memory-proposals/:proposalId",
|
|
24969
|
+
pathParams: external_exports.object({ proposalId: external_exports.string().uuid() }),
|
|
24970
|
+
responses: {
|
|
24971
|
+
200: ProjectMemoryProposalResponseSchema,
|
|
24972
|
+
404: MessageResponseSchema
|
|
24973
|
+
},
|
|
24974
|
+
summary: "The lines the memory job asks to change under a reply, and what became of it"
|
|
24975
|
+
},
|
|
24976
|
+
approveProjectMemoryProposal: {
|
|
24977
|
+
method: "POST",
|
|
24978
|
+
path: "/project-memory-proposals/:proposalId/approve",
|
|
24979
|
+
pathParams: external_exports.object({ proposalId: external_exports.string().uuid() }),
|
|
24980
|
+
body: ApproveProjectMemoryProposalBodySchema,
|
|
24981
|
+
responses: {
|
|
24982
|
+
/** `expired` when memory moved on from the revision the card showed. */
|
|
24983
|
+
200: ProjectMemoryProposalResponseSchema,
|
|
24984
|
+
403: MessageResponseSchema,
|
|
24985
|
+
404: MessageResponseSchema
|
|
24986
|
+
},
|
|
24987
|
+
summary: "Apply the change the memory job asked about"
|
|
24988
|
+
},
|
|
24989
|
+
denyProjectMemoryProposal: {
|
|
24990
|
+
method: "POST",
|
|
24991
|
+
path: "/project-memory-proposals/:proposalId/deny",
|
|
24992
|
+
pathParams: external_exports.object({ proposalId: external_exports.string().uuid() }),
|
|
24993
|
+
body: external_exports.object({}),
|
|
24994
|
+
responses: {
|
|
24995
|
+
200: ProjectMemoryProposalResponseSchema,
|
|
24996
|
+
403: MessageResponseSchema,
|
|
24997
|
+
404: MessageResponseSchema
|
|
24998
|
+
},
|
|
24999
|
+
summary: "Decline the change the memory job asked about"
|
|
25000
|
+
},
|
|
25001
|
+
editProjectMemoryProposal: {
|
|
25002
|
+
method: "POST",
|
|
25003
|
+
path: "/project-memory-proposals/:proposalId/edit",
|
|
25004
|
+
pathParams: external_exports.object({ proposalId: external_exports.string().uuid() }),
|
|
25005
|
+
body: EditProjectMemoryChangeBodySchema,
|
|
25006
|
+
responses: {
|
|
25007
|
+
200: ProjectMemoryProposalResponseSchema,
|
|
25008
|
+
403: MessageResponseSchema,
|
|
25009
|
+
404: MessageResponseSchema,
|
|
25010
|
+
/** Memory changed, or the card was already answered. */
|
|
25011
|
+
409: MessageResponseSchema,
|
|
25012
|
+
/** The edited text cannot be saved as written; the message says why. */
|
|
25013
|
+
422: MessageResponseSchema
|
|
25014
|
+
},
|
|
25015
|
+
summary: "Reword the change the memory job asked about before approving it"
|
|
25016
|
+
},
|
|
25017
|
+
getProjectMemorySave: {
|
|
25018
|
+
method: "GET",
|
|
25019
|
+
path: "/project-memory-saves/:saveId",
|
|
25020
|
+
pathParams: external_exports.object({ saveId: external_exports.string().uuid() }),
|
|
25021
|
+
responses: {
|
|
25022
|
+
200: ProjectMemorySaveResponseSchema,
|
|
25023
|
+
404: MessageResponseSchema
|
|
25024
|
+
},
|
|
25025
|
+
summary: "What one save from chat added to project memory"
|
|
25026
|
+
},
|
|
25027
|
+
undoProjectMemorySave: {
|
|
25028
|
+
method: "POST",
|
|
25029
|
+
path: "/project-memory-saves/:saveId/undo",
|
|
25030
|
+
pathParams: external_exports.object({ saveId: external_exports.string().uuid() }),
|
|
25031
|
+
body: UndoProjectMemorySaveBodySchema,
|
|
25032
|
+
responses: {
|
|
25033
|
+
200: UndoProjectMemorySaveResponseSchema,
|
|
25034
|
+
403: MessageResponseSchema,
|
|
25035
|
+
404: MessageResponseSchema
|
|
25036
|
+
},
|
|
25037
|
+
summary: "Remove the lines one save from chat added to project memory"
|
|
24394
25038
|
}
|
|
24395
25039
|
});
|
|
24396
25040
|
|
|
@@ -24867,44 +25511,10 @@ var CastVideoStyleReadBodySchema = external_exports.object({
|
|
|
24867
25511
|
).min(1).max(CAST_VIDEO_STYLE_READ_MAX_SECTIONS)
|
|
24868
25512
|
}).strict();
|
|
24869
25513
|
var CastVideoStyleReadSchema = external_exports.object({
|
|
24870
|
-
/**
|
|
24871
|
-
* The style Auto films the script in. Absent when the read could not run
|
|
24872
|
-
* or the team does not have `cast-auto-video-style`: Auto then renders as
|
|
24873
|
-
* its own Self-filmed base.
|
|
24874
|
-
*/
|
|
25514
|
+
/** Always absent: Auto films as Self-filmed. Kept for studio builds that still ask. */
|
|
24875
25515
|
videoStyle: CastVideoStyleIdSchema.exclude(["auto"]).optional()
|
|
24876
25516
|
});
|
|
24877
25517
|
|
|
24878
|
-
// ../api-contract/src/cast/choreography.ts
|
|
24879
|
-
var CAST_CHOREOGRAPHY_MAX_SECTIONS = 30;
|
|
24880
|
-
var SectionTextSchema = external_exports.string().max(4e3);
|
|
24881
|
-
var CastShotStepSchema = external_exports.object({
|
|
24882
|
-
action: external_exports.string().max(500).optional(),
|
|
24883
|
-
lines: external_exports.array(external_exports.string().max(4e3)).max(100)
|
|
24884
|
-
});
|
|
24885
|
-
var CastChoreographyBodySchema = external_exports.object({
|
|
24886
|
-
/**
|
|
24887
|
-
* Each spoken section, by id, in script order: its words and the
|
|
24888
|
-
* member's direction for what is done across them.
|
|
24889
|
-
*/
|
|
24890
|
-
sections: external_exports.array(
|
|
24891
|
-
external_exports.object({
|
|
24892
|
-
id: external_exports.string().max(100),
|
|
24893
|
-
text: SectionTextSchema,
|
|
24894
|
-
action: SectionTextSchema.optional()
|
|
24895
|
-
}).strict()
|
|
24896
|
-
).min(1).max(CAST_CHOREOGRAPHY_MAX_SECTIONS)
|
|
24897
|
-
}).strict();
|
|
24898
|
-
var CastChoreographySchema = external_exports.object({
|
|
24899
|
-
/**
|
|
24900
|
-
* Each directed section the read placed, by id, its lines verbatim. A
|
|
24901
|
-
* section left out keeps its one action, and an empty list is no read.
|
|
24902
|
-
*/
|
|
24903
|
-
sections: external_exports.array(
|
|
24904
|
-
external_exports.object({ id: external_exports.string(), steps: external_exports.array(CastShotStepSchema) })
|
|
24905
|
-
)
|
|
24906
|
-
});
|
|
24907
|
-
|
|
24908
25518
|
// ../api-contract/src/cast/prop-precheck.ts
|
|
24909
25519
|
var CastPropPrecheckCategorySchema = SeedancePrecheckCategorySchema.extract(["intimate_sexual"]);
|
|
24910
25520
|
var PrecheckCastPropsBodySchema = external_exports.object({
|
|
@@ -25130,18 +25740,7 @@ var castContract = c18.router({
|
|
|
25130
25740
|
400: MessageResponseSchema,
|
|
25131
25741
|
403: MessageResponseSchema
|
|
25132
25742
|
},
|
|
25133
|
-
summary: "
|
|
25134
|
-
},
|
|
25135
|
-
readCastChoreography: {
|
|
25136
|
-
method: "POST",
|
|
25137
|
-
path: "/cast/choreography",
|
|
25138
|
-
body: CastChoreographyBodySchema,
|
|
25139
|
-
responses: {
|
|
25140
|
-
200: CastChoreographySchema,
|
|
25141
|
-
400: MessageResponseSchema,
|
|
25142
|
-
403: MessageResponseSchema
|
|
25143
|
-
},
|
|
25144
|
-
summary: "Place each Cast section's actions before the lines they go with"
|
|
25743
|
+
summary: "Retired: answers no style, since Auto films as Self-filmed"
|
|
25145
25744
|
},
|
|
25146
25745
|
precheckCastProps: {
|
|
25147
25746
|
method: "POST",
|
|
@@ -25300,6 +25899,87 @@ var castContract = c18.router({
|
|
|
25300
25899
|
400: MessageResponseSchema
|
|
25301
25900
|
}
|
|
25302
25901
|
},
|
|
25902
|
+
createCastCollection: {
|
|
25903
|
+
method: "POST",
|
|
25904
|
+
path: "/cast/collections",
|
|
25905
|
+
body: CreateCastCollectionBodySchema,
|
|
25906
|
+
responses: {
|
|
25907
|
+
201: CastCollectionListItemSchema,
|
|
25908
|
+
400: MessageResponseSchema,
|
|
25909
|
+
404: MessageResponseSchema,
|
|
25910
|
+
409: MessageResponseSchema
|
|
25911
|
+
},
|
|
25912
|
+
summary: "Start a Cast collection: a Microdrama series"
|
|
25913
|
+
},
|
|
25914
|
+
searchCastCollections: {
|
|
25915
|
+
method: "POST",
|
|
25916
|
+
path: "/cast/collections/search",
|
|
25917
|
+
body: SearchCastCollectionsBodySchema,
|
|
25918
|
+
responses: {
|
|
25919
|
+
200: SearchCastCollectionsResponseSchema,
|
|
25920
|
+
400: MessageResponseSchema,
|
|
25921
|
+
404: MessageResponseSchema
|
|
25922
|
+
},
|
|
25923
|
+
summary: "The team's Cast collections, most recently active first, each with its cover take"
|
|
25924
|
+
},
|
|
25925
|
+
getCastCollection: {
|
|
25926
|
+
method: "GET",
|
|
25927
|
+
path: "/cast/collections/:collectionId",
|
|
25928
|
+
pathParams: external_exports.object({ collectionId: external_exports.string().uuid() }),
|
|
25929
|
+
responses: {
|
|
25930
|
+
200: CastCollectionListItemSchema,
|
|
25931
|
+
404: MessageResponseSchema
|
|
25932
|
+
},
|
|
25933
|
+
summary: "A Cast collection, with the take its cover shows"
|
|
25934
|
+
},
|
|
25935
|
+
searchCastCollectionEpisodes: {
|
|
25936
|
+
method: "POST",
|
|
25937
|
+
path: "/cast/collections/:collectionId/episodes/search",
|
|
25938
|
+
pathParams: external_exports.object({ collectionId: external_exports.string().uuid() }),
|
|
25939
|
+
body: SearchCastCollectionEpisodesBodySchema,
|
|
25940
|
+
responses: {
|
|
25941
|
+
200: SearchCastCollectionEpisodesResponseSchema,
|
|
25942
|
+
400: MessageResponseSchema,
|
|
25943
|
+
404: MessageResponseSchema
|
|
25944
|
+
},
|
|
25945
|
+
summary: "A series collection's episodes in order, each with the take shown"
|
|
25946
|
+
},
|
|
25947
|
+
draftCastCollectionEpisode: {
|
|
25948
|
+
method: "POST",
|
|
25949
|
+
path: "/cast/collections/:collectionId/episodes/draft",
|
|
25950
|
+
pathParams: external_exports.object({ collectionId: external_exports.string().uuid() }),
|
|
25951
|
+
body: DraftCastCollectionEpisodeBodySchema,
|
|
25952
|
+
responses: {
|
|
25953
|
+
200: DraftCastCollectionEpisodeResponseSchema,
|
|
25954
|
+
400: MessageResponseSchema,
|
|
25955
|
+
404: MessageResponseSchema,
|
|
25956
|
+
422: MessageResponseSchema
|
|
25957
|
+
},
|
|
25958
|
+
summary: "Write a series' next episode as a scene, continuing from the episodes before it"
|
|
25959
|
+
},
|
|
25960
|
+
updateCastCollection: {
|
|
25961
|
+
method: "PATCH",
|
|
25962
|
+
path: "/cast/collections/:collectionId",
|
|
25963
|
+
pathParams: external_exports.object({ collectionId: external_exports.string().uuid() }),
|
|
25964
|
+
body: UpdateCastCollectionBodySchema,
|
|
25965
|
+
responses: {
|
|
25966
|
+
200: CastCollectionSchema,
|
|
25967
|
+
400: MessageResponseSchema,
|
|
25968
|
+
404: MessageResponseSchema
|
|
25969
|
+
},
|
|
25970
|
+
summary: "Rename a Cast collection, or set a series' genre"
|
|
25971
|
+
},
|
|
25972
|
+
deleteCastCollection: {
|
|
25973
|
+
method: "DELETE",
|
|
25974
|
+
path: "/cast/collections/:collectionId",
|
|
25975
|
+
pathParams: external_exports.object({ collectionId: external_exports.string().uuid() }),
|
|
25976
|
+
body: null,
|
|
25977
|
+
responses: {
|
|
25978
|
+
204: c18.noBody(),
|
|
25979
|
+
404: MessageResponseSchema
|
|
25980
|
+
},
|
|
25981
|
+
summary: "Delete a Cast collection; its videos stay in History, in no collection"
|
|
25982
|
+
},
|
|
25303
25983
|
listCastGenerations: {
|
|
25304
25984
|
method: "GET",
|
|
25305
25985
|
path: "/cast/generations",
|
|
@@ -25373,6 +26053,14 @@ var publicContract = c19.router(
|
|
|
25373
26053
|
search: castTemplateContract.search,
|
|
25374
26054
|
get: castTemplateContract.get
|
|
25375
26055
|
},
|
|
26056
|
+
// Collections (Microdrama series today); each answers 404 for a team without `cast-drama-style`.
|
|
26057
|
+
castCollections: {
|
|
26058
|
+
create: castContract.createCastCollection,
|
|
26059
|
+
search: castContract.searchCastCollections,
|
|
26060
|
+
get: castContract.getCastCollection,
|
|
26061
|
+
episodes: castContract.searchCastCollectionEpisodes,
|
|
26062
|
+
rename: castContract.updateCastCollection
|
|
26063
|
+
},
|
|
25376
26064
|
ditto: {
|
|
25377
26065
|
listModels: dittoContract.listReplacementModels,
|
|
25378
26066
|
listAvatars: dittoContract.listAvatars,
|
|
@@ -26423,7 +27111,7 @@ function isMajorUpgrade(current, latest) {
|
|
|
26423
27111
|
return l[0] > c20[0];
|
|
26424
27112
|
}
|
|
26425
27113
|
function shouldShowUpgradeNotice(ctx = {}) {
|
|
26426
|
-
const current = ctx.current ?? "0.
|
|
27114
|
+
const current = ctx.current ?? "0.52.0";
|
|
26427
27115
|
const latest = ctx.latest ?? serverLatestVersion;
|
|
26428
27116
|
const env = ctx.env ?? process.env;
|
|
26429
27117
|
const isTty = ctx.isTty ?? Boolean(process.stderr.isTTY);
|
|
@@ -26444,7 +27132,7 @@ Upgrade: npm install -g @melius-ai/cli@latest (or: brew update && brew upgrade
|
|
|
26444
27132
|
function printUpgradeNoticeIfNeeded(ctx = {}) {
|
|
26445
27133
|
try {
|
|
26446
27134
|
if (!shouldShowUpgradeNotice(ctx)) return;
|
|
26447
|
-
const current = ctx.current ?? "0.
|
|
27135
|
+
const current = ctx.current ?? "0.52.0";
|
|
26448
27136
|
const latest = ctx.latest ?? serverLatestVersion;
|
|
26449
27137
|
process.stderr.write(formatUpgradeNotice(current, latest));
|
|
26450
27138
|
} catch {
|
|
@@ -26551,7 +27239,7 @@ function createClient(config) {
|
|
|
26551
27239
|
"Bypass-Tunnel-Reminder": "true",
|
|
26552
27240
|
[CUSTOM_REQUEST_HEADERS.meliusClient]: buildMeliusClientHeader({
|
|
26553
27241
|
surface: "cli",
|
|
26554
|
-
version: "0.
|
|
27242
|
+
version: "0.52.0"
|
|
26555
27243
|
})
|
|
26556
27244
|
};
|
|
26557
27245
|
if (config.teamId) {
|
|
@@ -28077,10 +28765,11 @@ Input: { sourceAssetId, replacements: [{ referenceAssetId | avatar, targetKind,
|
|
|
28077
28765
|
Use 1-30 ordered replacement items, each with one reference image. All items share one attempt, one quote, and one output.
|
|
28078
28766
|
avatar: { kind: custom | curated, id } casts an avatar from mel ditto avatars in place of referenceAssetId; prepare returns its image as referenceAssetId beside it.
|
|
28079
28767
|
targetKind: character | prop | background. audioMode: original (default) | mute.
|
|
28768
|
+
modelId: omit for Melius Ditto; to pick another model, send the modelId of a row in prepare's models, whose label names it.
|
|
28080
28769
|
resolution: 480p | 720p | 1080p, subject to the selected model's supported values.
|
|
28081
28770
|
sourceRange: { startMs, endMs }; both endpoints are explicit milliseconds. The source is never automatically shortened.
|
|
28082
28771
|
models includes incompatible models with structured duration and reference-count reasons. targetDescription is optional for characters: Ditto chooses the main person automatically, or distinct prominent people in reference order for several avatars. Descriptions remain required for repeated prop or background targets.
|
|
28083
|
-
|
|
28772
|
+
Melius Ditto supports up to 30 replacement images. Items are never dropped or split into paid runs.
|
|
28084
28773
|
Legacy single-item input with top-level referenceAssetId, targetKind and targetDescription remains accepted; do not mix it with replacements.
|
|
28085
28774
|
Save attemptId, input and quote.id for mel ditto run. No credits are reserved by prepare.
|
|
28086
28775
|
Examples:
|
|
@@ -28328,6 +29017,36 @@ Examples:
|
|
|
28328
29017
|
});
|
|
28329
29018
|
}
|
|
28330
29019
|
|
|
29020
|
+
// src/lib/cast-pages.ts
|
|
29021
|
+
function pageOptions(command) {
|
|
29022
|
+
return command.option(
|
|
29023
|
+
"--page-size <number>",
|
|
29024
|
+
"Items per page (integer 1-100; default shown below)"
|
|
29025
|
+
).option(
|
|
29026
|
+
"--cursor <cursor>",
|
|
29027
|
+
"nextCursor from pagination on stderr (1-4096 characters)"
|
|
29028
|
+
).option(
|
|
29029
|
+
"--include-count",
|
|
29030
|
+
"Request the exact total count (omitted by default)"
|
|
29031
|
+
);
|
|
29032
|
+
}
|
|
29033
|
+
function pageInput(options) {
|
|
29034
|
+
return {
|
|
29035
|
+
pageSize: options.pageSize === void 0 ? void 0 : Number(options.pageSize),
|
|
29036
|
+
cursor: options.cursor,
|
|
29037
|
+
includeCount: options.includeCount
|
|
29038
|
+
};
|
|
29039
|
+
}
|
|
29040
|
+
function writePage(page, output2) {
|
|
29041
|
+
writeJson(page.data, output2);
|
|
29042
|
+
const { pageSize, count, hasMore, nextCursor } = page;
|
|
29043
|
+
process.stderr.write(
|
|
29044
|
+
JSON.stringify({
|
|
29045
|
+
pagination: { pageSize, count, hasMore, nextCursor }
|
|
29046
|
+
}) + "\n"
|
|
29047
|
+
);
|
|
29048
|
+
}
|
|
29049
|
+
|
|
28331
29050
|
// ../utils/src/retry/backoff.ts
|
|
28332
29051
|
function fixedBackoff(delaysMs) {
|
|
28333
29052
|
return {
|
|
@@ -28557,35 +29276,222 @@ async function downloadCastFile(url, output2, generationId) {
|
|
|
28557
29276
|
}
|
|
28558
29277
|
}
|
|
28559
29278
|
|
|
28560
|
-
// src/commands/cast.ts
|
|
28561
|
-
|
|
28562
|
-
|
|
28563
|
-
|
|
28564
|
-
|
|
28565
|
-
|
|
28566
|
-
|
|
28567
|
-
"
|
|
28568
|
-
).option(
|
|
28569
|
-
"--include-count",
|
|
28570
|
-
"Request the exact total count (omitted by default)"
|
|
29279
|
+
// src/commands/cast-series.ts
|
|
29280
|
+
var GENRES = CastListedGenreSchema.options.join(", ");
|
|
29281
|
+
var STYLES = CAST_MICRODRAMA_STYLE_IDS.join(", ");
|
|
29282
|
+
function seriesParams(id) {
|
|
29283
|
+
return parseCastValue(
|
|
29284
|
+
publicContract.castCollections.get.pathParams,
|
|
29285
|
+
{ collectionId: id },
|
|
29286
|
+
"Use a seriesId from mel cast series list or mel cast series create"
|
|
28571
29287
|
);
|
|
28572
29288
|
}
|
|
28573
|
-
function
|
|
28574
|
-
|
|
28575
|
-
|
|
28576
|
-
|
|
28577
|
-
|
|
28578
|
-
|
|
28579
|
-
|
|
28580
|
-
|
|
28581
|
-
|
|
28582
|
-
|
|
28583
|
-
|
|
28584
|
-
|
|
28585
|
-
|
|
28586
|
-
|
|
29289
|
+
function addCastSeriesSubcommands(cast, getOutputOpts) {
|
|
29290
|
+
const series = cast.command("series").description(
|
|
29291
|
+
"Start and read Microdrama series; returns series and their episodes in order"
|
|
29292
|
+
).addHelpText(
|
|
29293
|
+
"after",
|
|
29294
|
+
`
|
|
29295
|
+
Returns: a series (id, title, genre, videoStyleId, episodeCount, nextEpisodeNumber) or arrays of series and episodes.
|
|
29296
|
+
A series' episodes are Microdrama videos the server numbers, all filmed in the series' videoStyleId. Make the next one with mel cast run --series-id <seriesId>, another take of one with --episode-id <episodeId>.
|
|
29297
|
+
Available to teams with Microdramas; other teams get a 404.
|
|
29298
|
+
Examples:
|
|
29299
|
+
$ mel cast series create --title "The Heiress Returns" --genre drama-dark
|
|
29300
|
+
$ mel cast series episodes --id <seriesId>`
|
|
29301
|
+
);
|
|
29302
|
+
series.command("create").description("Start a Microdrama series; returns the new series").requiredOption("--title <title>", "Series title (1-120 characters)").option("--genre <genre>", `Genre, optional: ${GENRES}`).option(
|
|
29303
|
+
"--from <generationId>",
|
|
29304
|
+
"A Microdrama made outside a series (from mel cast history), to become Episode 1; the series takes its style"
|
|
29305
|
+
).option(
|
|
29306
|
+
"--style <videoStyleId>",
|
|
29307
|
+
`Style every episode is filmed in, kept for the whole series: ${STYLES} (default drama)`
|
|
29308
|
+
).addHelpText(
|
|
29309
|
+
"after",
|
|
29310
|
+
`
|
|
29311
|
+
Returns: id, title, genre, videoStyleId, episodeCount (0), nextEpisodeNumber (1). Free; makes no video.
|
|
29312
|
+
The genre labels the series; it doesn't change the script or the filming. The style can't change later.
|
|
29313
|
+
Examples:
|
|
29314
|
+
$ mel cast series create --title "The Heiress Returns"
|
|
29315
|
+
$ mel cast series create --title "The Heiress Returns" --genre drama-dark --style drama
|
|
29316
|
+
$ mel cast series create --title "The Heiress Returns" --from <generationId>`
|
|
29317
|
+
).action(
|
|
29318
|
+
async (options) => {
|
|
29319
|
+
const body = parseCastValue(
|
|
29320
|
+
publicContract.castCollections.create.body,
|
|
29321
|
+
{
|
|
29322
|
+
kind: "series",
|
|
29323
|
+
title: options.title,
|
|
29324
|
+
genre: options.genre,
|
|
29325
|
+
videoStyleId: options.style,
|
|
29326
|
+
fromGenerationId: options.from
|
|
29327
|
+
},
|
|
29328
|
+
"Run: mel cast series create --help"
|
|
29329
|
+
);
|
|
29330
|
+
const result = await getClient().castCollections.create({
|
|
29331
|
+
body
|
|
29332
|
+
});
|
|
29333
|
+
if (result.status !== 201)
|
|
29334
|
+
handleApiError(
|
|
29335
|
+
result.status,
|
|
29336
|
+
result.body,
|
|
29337
|
+
"Check for it with mel cast series list"
|
|
29338
|
+
);
|
|
29339
|
+
writeJson(result.body, getOutputOpts());
|
|
29340
|
+
}
|
|
29341
|
+
);
|
|
29342
|
+
pageOptions(series.command("list")).description(
|
|
29343
|
+
"List the team's Microdrama series, most recently active first; returns a series array"
|
|
29344
|
+
).addHelpText(
|
|
29345
|
+
"after",
|
|
29346
|
+
`
|
|
29347
|
+
Returns: series array, each with cover (its newest episode's take, or null); pagination on stderr. Default page size: 24.
|
|
29348
|
+
Examples:
|
|
29349
|
+
$ mel cast series list
|
|
29350
|
+
$ mel cast series list --cursor <nextCursor>`
|
|
29351
|
+
).action(async (options) => {
|
|
29352
|
+
const body = parseCastValue(
|
|
29353
|
+
publicContract.castCollections.search.body,
|
|
29354
|
+
// A Microdrama series; other kinds of collection list elsewhere.
|
|
29355
|
+
{ ...pageInput(options), filters: { kind: "series" } },
|
|
29356
|
+
"Run: mel cast series list --help"
|
|
29357
|
+
);
|
|
29358
|
+
const client = getClient();
|
|
29359
|
+
writePage(
|
|
29360
|
+
await castRequest(
|
|
29361
|
+
(signal) => client.castCollections.search({
|
|
29362
|
+
body,
|
|
29363
|
+
fetchOptions: { signal }
|
|
29364
|
+
}),
|
|
29365
|
+
{
|
|
29366
|
+
label: "Cast series",
|
|
29367
|
+
suggestion: "Retry: mel cast series list"
|
|
29368
|
+
}
|
|
29369
|
+
),
|
|
29370
|
+
getOutputOpts()
|
|
29371
|
+
);
|
|
29372
|
+
});
|
|
29373
|
+
series.command("get").description("Read one Microdrama series; returns the series").requiredOption(
|
|
29374
|
+
"--id <id>",
|
|
29375
|
+
"Series UUID from mel cast series list or create"
|
|
29376
|
+
).addHelpText(
|
|
29377
|
+
"after",
|
|
29378
|
+
`
|
|
29379
|
+
Returns: id, title, genre, episodeCount, nextEpisodeNumber, createdAt, updatedAt.
|
|
29380
|
+
Examples:
|
|
29381
|
+
$ mel cast series get --id <seriesId>
|
|
29382
|
+
$ mel cast series get --id <seriesId> --fields title,nextEpisodeNumber`
|
|
29383
|
+
).action(async (options) => {
|
|
29384
|
+
const params = seriesParams(options.id);
|
|
29385
|
+
const client = getClient();
|
|
29386
|
+
writeJson(
|
|
29387
|
+
await castRequest(
|
|
29388
|
+
(signal) => client.castCollections.get({
|
|
29389
|
+
params,
|
|
29390
|
+
fetchOptions: { signal }
|
|
29391
|
+
}),
|
|
29392
|
+
{
|
|
29393
|
+
label: "Cast series",
|
|
29394
|
+
suggestion: "Run: mel cast series list"
|
|
29395
|
+
}
|
|
29396
|
+
),
|
|
29397
|
+
getOutputOpts()
|
|
29398
|
+
);
|
|
29399
|
+
});
|
|
29400
|
+
pageOptions(series.command("episodes")).description(
|
|
29401
|
+
"List a series' episodes in order; returns an episode array"
|
|
29402
|
+
).requiredOption(
|
|
29403
|
+
"--id <id>",
|
|
29404
|
+
"Series UUID from mel cast series list or create"
|
|
29405
|
+
).addHelpText(
|
|
29406
|
+
"after",
|
|
29407
|
+
`
|
|
29408
|
+
Returns: episode array (id, number, take), each with the newest take you may see; pagination on stderr. Default page size: 24.
|
|
29409
|
+
Pass an episode's id to mel cast run --episode-id for another take of it.
|
|
29410
|
+
Examples:
|
|
29411
|
+
$ mel cast series episodes --id <seriesId>
|
|
29412
|
+
$ mel cast series episodes --id <seriesId> --cursor <nextCursor>`
|
|
29413
|
+
).action(async (options) => {
|
|
29414
|
+
const params = seriesParams(options.id);
|
|
29415
|
+
const body = parseCastValue(
|
|
29416
|
+
publicContract.castCollections.episodes.body,
|
|
29417
|
+
pageInput(options),
|
|
29418
|
+
"Run: mel cast series episodes --help"
|
|
29419
|
+
);
|
|
29420
|
+
const client = getClient();
|
|
29421
|
+
writePage(
|
|
29422
|
+
await castRequest(
|
|
29423
|
+
(signal) => client.castCollections.episodes({
|
|
29424
|
+
params,
|
|
29425
|
+
body,
|
|
29426
|
+
fetchOptions: { signal }
|
|
29427
|
+
}),
|
|
29428
|
+
{
|
|
29429
|
+
label: "Cast series episodes",
|
|
29430
|
+
suggestion: "Run: mel cast series list"
|
|
29431
|
+
}
|
|
29432
|
+
),
|
|
29433
|
+
getOutputOpts()
|
|
29434
|
+
);
|
|
29435
|
+
});
|
|
29436
|
+
series.command("update").alias("rename").description(
|
|
29437
|
+
"Rename a Microdrama series or set its genre; returns the series"
|
|
29438
|
+
).requiredOption(
|
|
29439
|
+
"--id <id>",
|
|
29440
|
+
"Series UUID from mel cast series list or create"
|
|
29441
|
+
).option("--title <title>", "New title (1-120 characters)").option("--genre <genre>", `Genre: ${GENRES}, or none to remove it`).addHelpText(
|
|
29442
|
+
"after",
|
|
29443
|
+
`
|
|
29444
|
+
Pass --title, --genre, or both. Returns: the series.
|
|
29445
|
+
Examples:
|
|
29446
|
+
$ mel cast series update --id <seriesId> --genre drama-dark
|
|
29447
|
+
$ mel cast series update --id <seriesId> --title "Season 2"
|
|
29448
|
+
$ mel cast series update --id <seriesId> --genre none`
|
|
29449
|
+
).action(
|
|
29450
|
+
async (options) => {
|
|
29451
|
+
const params = seriesParams(options.id);
|
|
29452
|
+
if (options.title === void 0 && options.genre === void 0)
|
|
29453
|
+
writeError(
|
|
29454
|
+
formatError(
|
|
29455
|
+
"VALIDATION_ERROR",
|
|
29456
|
+
"Pass --title, --genre, or both",
|
|
29457
|
+
{
|
|
29458
|
+
suggestion: "Run: mel cast series update --help"
|
|
29459
|
+
}
|
|
29460
|
+
),
|
|
29461
|
+
EXIT_USAGE_ERROR
|
|
29462
|
+
);
|
|
29463
|
+
const body = parseCastValue(
|
|
29464
|
+
publicContract.castCollections.rename.body,
|
|
29465
|
+
{
|
|
29466
|
+
...options.title !== void 0 && {
|
|
29467
|
+
title: options.title
|
|
29468
|
+
},
|
|
29469
|
+
...options.genre !== void 0 && {
|
|
29470
|
+
genre: options.genre === "none" ? null : options.genre
|
|
29471
|
+
}
|
|
29472
|
+
},
|
|
29473
|
+
"Run: mel cast series update --help"
|
|
29474
|
+
);
|
|
29475
|
+
const client = getClient();
|
|
29476
|
+
writeJson(
|
|
29477
|
+
await castRequest(
|
|
29478
|
+
(signal) => client.castCollections.rename({
|
|
29479
|
+
params,
|
|
29480
|
+
body,
|
|
29481
|
+
fetchOptions: { signal }
|
|
29482
|
+
}),
|
|
29483
|
+
{
|
|
29484
|
+
label: "Cast series",
|
|
29485
|
+
suggestion: "Run: mel cast series get --id <seriesId>"
|
|
29486
|
+
}
|
|
29487
|
+
),
|
|
29488
|
+
getOutputOpts()
|
|
29489
|
+
);
|
|
29490
|
+
}
|
|
28587
29491
|
);
|
|
28588
29492
|
}
|
|
29493
|
+
|
|
29494
|
+
// src/commands/cast.ts
|
|
28589
29495
|
function generationParams(id) {
|
|
28590
29496
|
return parseCastValue(
|
|
28591
29497
|
publicContract.cast.get.pathParams,
|
|
@@ -28593,6 +29499,30 @@ function generationParams(id) {
|
|
|
28593
29499
|
"Use the attemptId from mel cast prepare or generationId from mel cast history"
|
|
28594
29500
|
);
|
|
28595
29501
|
}
|
|
29502
|
+
function castSeriesFields(options, videoStyleId) {
|
|
29503
|
+
const problem = castSeriesRequestProblem({
|
|
29504
|
+
series: options.seriesId,
|
|
29505
|
+
episode: options.episodeId,
|
|
29506
|
+
videoStyleId
|
|
29507
|
+
});
|
|
29508
|
+
if (problem)
|
|
29509
|
+
writeError(
|
|
29510
|
+
formatError(
|
|
29511
|
+
"VALIDATION_ERROR",
|
|
29512
|
+
problem === "series-and-episode" ? "Pass --series-id for a series' next episode or --episode-id for another take, not both" : `A series episode is a Microdrama: prepare it with "creationSettings": {"videoStyle": {"id": "<the series' videoStyleId>", "version": 1}}`,
|
|
29513
|
+
{ suggestion: "Run: mel cast run --help" }
|
|
29514
|
+
),
|
|
29515
|
+
EXIT_USAGE_ERROR
|
|
29516
|
+
);
|
|
29517
|
+
return parseCastValue(
|
|
29518
|
+
publicContract.cast.run.body.pick({
|
|
29519
|
+
collectionId: true,
|
|
29520
|
+
episodeId: true
|
|
29521
|
+
}),
|
|
29522
|
+
{ collectionId: options.seriesId, episodeId: options.episodeId },
|
|
29523
|
+
"Use a series id from mel cast series list or an episode id from mel cast series episodes"
|
|
29524
|
+
);
|
|
29525
|
+
}
|
|
28596
29526
|
function recovery(generationId) {
|
|
28597
29527
|
return `Run: mel cast wait --id ${generationId}. To retry submission, use mel cast run --input-file <prepared.json> with the same prepared file`;
|
|
28598
29528
|
}
|
|
@@ -28791,6 +29721,12 @@ Examples:
|
|
|
28791
29721
|
).requiredOption(
|
|
28792
29722
|
"--input-file <path>",
|
|
28793
29723
|
"Complete ready JSON response saved from mel cast prepare"
|
|
29724
|
+
).option(
|
|
29725
|
+
"--series-id <id>",
|
|
29726
|
+
"Make this Microdrama the next episode of a series (from mel cast series create or list); the server numbers it"
|
|
29727
|
+
).option(
|
|
29728
|
+
"--episode-id <id>",
|
|
29729
|
+
"Make this Microdrama another take of a series episode (from mel cast series episodes)"
|
|
28794
29730
|
).addHelpText(
|
|
28795
29731
|
"after",
|
|
28796
29732
|
`
|
|
@@ -28798,24 +29734,35 @@ Returns: generationId, canvasId, bulkNodeRunId, videoNodeId, status, and exact o
|
|
|
28798
29734
|
Only ready preparations are accepted. The attemptId and input are reused unchanged on every retry.
|
|
28799
29735
|
Changed input under an accepted ID is a conflict. Prepare again only for a deliberately new render.
|
|
28800
29736
|
Use mel cast wait --id <attemptId> after a lost response; rerunning the same prepared file also recovers it.
|
|
29737
|
+
A series episode is a Microdrama: prepare it with creationSettings.videoStyle { id: <the series' videoStyleId from mel cast series get>, version: 1 }. Pass --series-id or --episode-id, not both, and the same one when recovering.
|
|
28801
29738
|
Examples:
|
|
28802
29739
|
$ mel cast run --input-file <prepared.json>
|
|
28803
|
-
$ mel cast run --input-file <prepared.json> --fields generationId,status
|
|
28804
|
-
|
|
28805
|
-
|
|
28806
|
-
|
|
28807
|
-
|
|
28808
|
-
|
|
28809
|
-
|
|
28810
|
-
|
|
28811
|
-
|
|
28812
|
-
|
|
28813
|
-
|
|
28814
|
-
|
|
28815
|
-
)
|
|
28816
|
-
|
|
28817
|
-
|
|
28818
|
-
|
|
29740
|
+
$ mel cast run --input-file <prepared.json> --fields generationId,status
|
|
29741
|
+
$ mel cast run --input-file <prepared.json> --series-id <seriesId>`
|
|
29742
|
+
).action(
|
|
29743
|
+
async (options) => {
|
|
29744
|
+
const submission = readCastSubmission(options.inputFile);
|
|
29745
|
+
const body = {
|
|
29746
|
+
...submission,
|
|
29747
|
+
...castSeriesFields(
|
|
29748
|
+
options,
|
|
29749
|
+
submission.input.creationSettings?.videoStyle.id
|
|
29750
|
+
)
|
|
29751
|
+
};
|
|
29752
|
+
const client = getClient();
|
|
29753
|
+
writeJson(
|
|
29754
|
+
await castRequest(
|
|
29755
|
+
(signal) => client.cast.run({ body, fetchOptions: { signal } }),
|
|
29756
|
+
{
|
|
29757
|
+
label: "Cast submission",
|
|
29758
|
+
generationId: body.attemptId,
|
|
29759
|
+
suggestion: recovery(body.attemptId)
|
|
29760
|
+
}
|
|
29761
|
+
),
|
|
29762
|
+
getOutputOpts()
|
|
29763
|
+
);
|
|
29764
|
+
}
|
|
29765
|
+
);
|
|
28819
29766
|
for (const name of ["status", "result"]) {
|
|
28820
29767
|
cast.command(name).description(
|
|
28821
29768
|
"Read one saved Cast render; returns current progress or its exact output and subtitle warning"
|
|
@@ -29012,6 +29959,7 @@ Examples:
|
|
|
29012
29959
|
getOutputOpts()
|
|
29013
29960
|
);
|
|
29014
29961
|
});
|
|
29962
|
+
addCastSeriesSubcommands(cast, getOutputOpts);
|
|
29015
29963
|
addDittoSubcommands(
|
|
29016
29964
|
cast.command("replacement").description(
|
|
29017
29965
|
"Replace content in a supplied video with Ditto; returns review, progress, and one result"
|
|
@@ -33786,7 +34734,7 @@ function withDefaultHelp(args) {
|
|
|
33786
34734
|
}
|
|
33787
34735
|
function createProgram() {
|
|
33788
34736
|
const program2 = new Command();
|
|
33789
|
-
program2.name("mel").description("Mel \u2014 Melius agent CLI").version("0.
|
|
34737
|
+
program2.name("mel").description("Mel \u2014 Melius agent CLI").version("0.52.0").showSuggestionAfterError(true).option("--json", "Force JSON output (default)").option("--text", "Human-readable output").option(
|
|
33790
34738
|
"--fields <fields>",
|
|
33791
34739
|
"Select specific output fields (comma-separated)"
|
|
33792
34740
|
).option("--quiet", "Suppress output, exit code only").option("--verbose", "Log request/response metadata to stderr").addHelpText(
|