@melius-ai/cli 0.50.1 → 0.51.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-QW6BJWR4.js} +1017 -103
- package/dist/src/index.js +1 -1
- package/package.json +1 -1
|
@@ -13178,12 +13178,16 @@ 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",
|
|
13187
13191
|
"vlog",
|
|
13188
13192
|
"podcast",
|
|
13189
13193
|
"unboxing",
|
|
@@ -13207,6 +13211,17 @@ var CastVideoStyleIdSchema = external_exports.enum([
|
|
|
13207
13211
|
"animated-2d"
|
|
13208
13212
|
]);
|
|
13209
13213
|
var CAST_VIDEO_STYLE_IDS = CastVideoStyleIdSchema.options;
|
|
13214
|
+
var CAST_MICRODRAMA_STYLE_IDS = [
|
|
13215
|
+
"drama",
|
|
13216
|
+
"drama-romance",
|
|
13217
|
+
"drama-dark",
|
|
13218
|
+
"drama-luxury",
|
|
13219
|
+
"drama-fantasy"
|
|
13220
|
+
];
|
|
13221
|
+
var CastMicrodramaStyleIdSchema = external_exports.enum(CAST_MICRODRAMA_STYLE_IDS);
|
|
13222
|
+
function isCastMicrodramaStyle(id) {
|
|
13223
|
+
return CAST_MICRODRAMA_STYLE_IDS.some((style) => style === id);
|
|
13224
|
+
}
|
|
13210
13225
|
var CastVideoStyleSchema = external_exports.object({
|
|
13211
13226
|
id: CastVideoStyleIdSchema,
|
|
13212
13227
|
version: external_exports.literal(1)
|
|
@@ -13222,6 +13237,9 @@ var CastCreationSettingsSchema = external_exports.object({
|
|
|
13222
13237
|
visuals: external_exports.enum(["auto", "on", "off"]).optional().describe(
|
|
13223
13238
|
"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
13239
|
),
|
|
13240
|
+
shots: external_exports.enum(["auto", "one-shot"]).optional().describe(
|
|
13241
|
+
"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."
|
|
13242
|
+
),
|
|
13225
13243
|
visualsBrief: external_exports.string().trim().min(1).max(1e3).optional().describe(
|
|
13226
13244
|
"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
13245
|
),
|
|
@@ -13642,6 +13660,12 @@ var MAX_CAST_READ_BEATS = 20;
|
|
|
13642
13660
|
var MAX_CAST_TONE_TAGS_PER_BEAT = 2;
|
|
13643
13661
|
var MIN_CAST_DRAFT_SECONDS = 3;
|
|
13644
13662
|
var MAX_CAST_DRAFT_SECONDS = 600;
|
|
13663
|
+
var CastDraftSecondsSchema = external_exports.object({
|
|
13664
|
+
min: external_exports.number().int().min(MIN_CAST_DRAFT_SECONDS).max(MAX_CAST_DRAFT_SECONDS),
|
|
13665
|
+
max: external_exports.number().int().min(MIN_CAST_DRAFT_SECONDS).max(MAX_CAST_DRAFT_SECONDS)
|
|
13666
|
+
}).refine((slot) => slot.min <= slot.max, {
|
|
13667
|
+
message: "A slot's floor cannot be above its ceiling"
|
|
13668
|
+
});
|
|
13645
13669
|
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
13670
|
var MAX_CAST_SCRIPT_REFERENCES = 12;
|
|
13647
13671
|
var MAX_CAST_SCRIPT_REFERENCE_NAME_LENGTH = 200;
|
|
@@ -13740,14 +13764,15 @@ var CastScriptTreatmentSchema = external_exports.discriminatedUnion("operation",
|
|
|
13740
13764
|
* never told to fit is a script the member has to cut by hand before
|
|
13741
13765
|
* the press they were reaching for works.
|
|
13742
13766
|
*/
|
|
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(),
|
|
13767
|
+
seconds: CastDraftSecondsSchema.optional(),
|
|
13749
13768
|
/** Who the draft is written for: every section said by one of them. */
|
|
13750
|
-
speakers: CastScriptSpeakersSchema
|
|
13769
|
+
speakers: CastScriptSpeakersSchema,
|
|
13770
|
+
/**
|
|
13771
|
+
* The video style it is filmed in. A style whose people talk to each
|
|
13772
|
+
* other (Microdrama) is written as a scene between them rather than a
|
|
13773
|
+
* read to the camera. Absent writes a read to the camera.
|
|
13774
|
+
*/
|
|
13775
|
+
videoStyle: CastVideoStyleSchema.optional()
|
|
13751
13776
|
})
|
|
13752
13777
|
]);
|
|
13753
13778
|
var EnhancePromptBodySchema = external_exports.object({
|
|
@@ -13804,8 +13829,7 @@ var PrepareCastScriptBodySchema = external_exports.object({
|
|
|
13804
13829
|
tone: external_exports.string().trim().min(1).max(MAX_CAST_TONE_LENGTH).optional(),
|
|
13805
13830
|
speakers: CastScriptSpeakersSchema,
|
|
13806
13831
|
references: CastScriptReferencesSchema,
|
|
13807
|
-
longVideo: external_exports.boolean()
|
|
13808
|
-
readPacing: external_exports.boolean()
|
|
13832
|
+
longVideo: external_exports.boolean()
|
|
13809
13833
|
});
|
|
13810
13834
|
var MAX_PREPARED_CAST_SCRIPT_SECTIONS = 100;
|
|
13811
13835
|
var PrepareCastScriptResponseSchema = external_exports.object({
|
|
@@ -14231,6 +14255,8 @@ var CastVideoReviewSchema = external_exports.object({
|
|
|
14231
14255
|
template: external_exports.string(),
|
|
14232
14256
|
/** Auto, Off or Unavailable, for a member who can have added visuals; absent otherwise. */
|
|
14233
14257
|
visuals: external_exports.string().optional(),
|
|
14258
|
+
/** Auto or One shot, for a member offered Camera (`cast-one-shot`); absent otherwise. */
|
|
14259
|
+
camera: external_exports.string().optional(),
|
|
14234
14260
|
/** What preparation changed from the request, said where the member reviews it. */
|
|
14235
14261
|
notice: external_exports.string().optional(),
|
|
14236
14262
|
/** Everyone the video casts, `avatar` first, where it casts several. */
|
|
@@ -14273,7 +14299,15 @@ var RunCastVideoBodySchema = external_exports.object({
|
|
|
14273
14299
|
expectedEstimatedCredits: external_exports.number().finite().nonnegative().optional(),
|
|
14274
14300
|
input: CastVideoInputSchema,
|
|
14275
14301
|
/** Spend a free generation instead of credits; refused, never billed, when none covers the video. */
|
|
14276
|
-
useFreeGeneration: external_exports.boolean().optional()
|
|
14302
|
+
useFreeGeneration: external_exports.boolean().optional(),
|
|
14303
|
+
/**
|
|
14304
|
+
* File the video in this Cast collection: a series' next episode,
|
|
14305
|
+
* which the server numbers. Ignored for a team without Microdrama.
|
|
14306
|
+
* Naming both this and `episodeId` is refused.
|
|
14307
|
+
*/
|
|
14308
|
+
collectionId: external_exports.string().uuid().optional(),
|
|
14309
|
+
/** Make another take of this episode of a series collection. */
|
|
14310
|
+
episodeId: external_exports.string().uuid().optional()
|
|
14277
14311
|
}).strict();
|
|
14278
14312
|
var CastPreparedVideoQuoteSchema = external_exports.object({
|
|
14279
14313
|
estimatedCredits: external_exports.number().finite().nonnegative()
|
|
@@ -14284,7 +14318,12 @@ var videoReference = external_exports.object({
|
|
|
14284
14318
|
bulkNodeRunId: external_exports.string().uuid(),
|
|
14285
14319
|
videoNodeId: external_exports.string().uuid(),
|
|
14286
14320
|
/** The free generation the video holds; absent once a release gave it back. */
|
|
14287
|
-
freeGeneration: FreeGenerationUseSchema.optional()
|
|
14321
|
+
freeGeneration: FreeGenerationUseSchema.optional(),
|
|
14322
|
+
/** The Cast collection the video is in; absent outside one. */
|
|
14323
|
+
collectionId: external_exports.string().uuid().optional(),
|
|
14324
|
+
/** Its series episode, and the number the server gave it; absent outside a series. */
|
|
14325
|
+
episodeId: external_exports.string().uuid().optional(),
|
|
14326
|
+
episodeNumber: external_exports.number().int().positive().optional()
|
|
14288
14327
|
});
|
|
14289
14328
|
var CastVideoResponseSchema = external_exports.discriminatedUnion("status", [
|
|
14290
14329
|
videoReference.extend({ status: external_exports.literal("submitting") }),
|
|
@@ -14352,7 +14391,7 @@ var CastVideoApprovalPreviewSchema = external_exports.object({
|
|
|
14352
14391
|
imageUrl: external_exports.string().nullable()
|
|
14353
14392
|
})
|
|
14354
14393
|
).max(CAST_VIDEO_MAX_PROPS).optional(),
|
|
14355
|
-
/** The model's name, such as Melius Cast
|
|
14394
|
+
/** The model's name, such as Melius Cast. */
|
|
14356
14395
|
model: external_exports.string(),
|
|
14357
14396
|
aspectRatio: OutputAspectRatioSchema,
|
|
14358
14397
|
resolution: OutputResolutionSchema.optional(),
|
|
@@ -16038,6 +16077,12 @@ var ModelVariantResponseSchema = external_exports.object({
|
|
|
16038
16077
|
minInputVideoDurationSeconds: external_exports.number().nullable().optional(),
|
|
16039
16078
|
/** Minimum input audio clip duration (seconds), or null if unconstrained. */
|
|
16040
16079
|
minInputAudioDurationSeconds: external_exports.number().nullable().optional(),
|
|
16080
|
+
/**
|
|
16081
|
+
* The total input audio length (seconds) the variant declares. Null when it
|
|
16082
|
+
* declares none; a run may still be held to a limit taken from its output
|
|
16083
|
+
* length.
|
|
16084
|
+
*/
|
|
16085
|
+
maxCombinedInputAudioDurationSeconds: external_exports.number().nullable().optional(),
|
|
16041
16086
|
/** Maximum prompt length in characters, or null if unconstrained. */
|
|
16042
16087
|
maxPromptLength: external_exports.number().nullable().optional(),
|
|
16043
16088
|
/** Minimum prompt length in characters, or null if unconstrained. */
|
|
@@ -16475,6 +16520,239 @@ var DittoResponseSchema = external_exports.object({
|
|
|
16475
16520
|
url: external_exports.string()
|
|
16476
16521
|
});
|
|
16477
16522
|
|
|
16523
|
+
// ../api-contract/src/preset-avatar/schema.ts
|
|
16524
|
+
var PresetAvatarProductSchema = external_exports.enum(["all", "cast", "ditto"]);
|
|
16525
|
+
var PresetAvatarStudioSchema = PresetAvatarProductSchema.exclude([
|
|
16526
|
+
"all"
|
|
16527
|
+
]);
|
|
16528
|
+
var ListPresetAvatarsQuerySchema = external_exports.object({
|
|
16529
|
+
product: PresetAvatarStudioSchema.optional()
|
|
16530
|
+
});
|
|
16531
|
+
var PresetAvatarDefaultVoiceSchema = external_exports.object({
|
|
16532
|
+
catalog: VoiceCatalogIdSchema,
|
|
16533
|
+
voiceId: external_exports.string().trim().min(1).max(200)
|
|
16534
|
+
});
|
|
16535
|
+
var PresetAvatarBackgroundSchema = external_exports.object({
|
|
16536
|
+
id: external_exports.string().uuid(),
|
|
16537
|
+
presetAvatarId: external_exports.string().uuid(),
|
|
16538
|
+
name: external_exports.string(),
|
|
16539
|
+
imageUrl: external_exports.string().nullable(),
|
|
16540
|
+
createdAt: external_exports.string(),
|
|
16541
|
+
updatedAt: external_exports.string()
|
|
16542
|
+
});
|
|
16543
|
+
var PresetAvatarSummarySchema = external_exports.object({
|
|
16544
|
+
id: external_exports.string().uuid(),
|
|
16545
|
+
name: external_exports.string(),
|
|
16546
|
+
description: external_exports.string(),
|
|
16547
|
+
/**
|
|
16548
|
+
* The character sheet, signed. One image, as a team's own avatar carries —
|
|
16549
|
+
* it is both the likeness and the picker tile. Null only if the stored ref
|
|
16550
|
+
* is unreadable.
|
|
16551
|
+
*/
|
|
16552
|
+
imageUrl: external_exports.string().nullable(),
|
|
16553
|
+
/**
|
|
16554
|
+
* The face, signed — a head-and-shoulders crop staff uploaded beside the
|
|
16555
|
+
* likeness, and what a roster tile draws.
|
|
16556
|
+
*
|
|
16557
|
+
* The counterpart of a team-made avatar's `previewUrl`, and null on the
|
|
16558
|
+
* same terms: a preset published before one existed draws its likeness.
|
|
16559
|
+
* Optional for the deploy, like every other field added to this shape.
|
|
16560
|
+
*/
|
|
16561
|
+
previewUrl: external_exports.string().nullable().optional(),
|
|
16562
|
+
/**
|
|
16563
|
+
* The face (the likeness when there is none) resized to a small width, for
|
|
16564
|
+
* a picture drawn a few dozen points across. The counterpart of a
|
|
16565
|
+
* team-made avatar's `thumbnailUrl`. Null when the stored ref can't be
|
|
16566
|
+
* resized; absent from a server that predates it.
|
|
16567
|
+
*/
|
|
16568
|
+
thumbnailUrl: external_exports.string().nullable().optional(),
|
|
16569
|
+
defaultVoice: PresetAvatarDefaultVoiceSchema.nullable(),
|
|
16570
|
+
/**
|
|
16571
|
+
* @deprecated Always empty. Melius curates avatars, not places — a team
|
|
16572
|
+
* makes its own backgrounds and they are the same list whoever is cast.
|
|
16573
|
+
* Declared so a client built before the move reads an avatar with no plates
|
|
16574
|
+
* of its own rather than crashing on a missing field.
|
|
16575
|
+
*/
|
|
16576
|
+
backgrounds: external_exports.array(PresetAvatarBackgroundSchema),
|
|
16577
|
+
/** True when published to everyone rather than scoped to this team. */
|
|
16578
|
+
isGlobal: external_exports.boolean(),
|
|
16579
|
+
createdAt: external_exports.string(),
|
|
16580
|
+
updatedAt: external_exports.string()
|
|
16581
|
+
});
|
|
16582
|
+
var PresetAvatarOwnOriginalSchema = external_exports.object({
|
|
16583
|
+
presetAvatarId: external_exports.string().uuid(),
|
|
16584
|
+
/** The curated name, which staff may have changed from the original's. */
|
|
16585
|
+
name: external_exports.string(),
|
|
16586
|
+
customAvatarId: external_exports.string().uuid()
|
|
16587
|
+
});
|
|
16588
|
+
var ListPresetAvatarsResponseSchema = external_exports.object({
|
|
16589
|
+
avatars: external_exports.array(PresetAvatarSummarySchema)
|
|
16590
|
+
});
|
|
16591
|
+
var ListTeamPresetAvatarsResponseSchema = ListPresetAvatarsResponseSchema.extend({
|
|
16592
|
+
/** Optional for clients reading a server that predates it. */
|
|
16593
|
+
ownOriginals: external_exports.array(PresetAvatarOwnOriginalSchema).optional()
|
|
16594
|
+
});
|
|
16595
|
+
var ImportPresetAvatarImageBodySchema = external_exports.object({
|
|
16596
|
+
/**
|
|
16597
|
+
* @deprecated Ignored. The character sheet is the only thing this route
|
|
16598
|
+
* copies — there is no curated background library to name. Still accepted
|
|
16599
|
+
* so a client deployed before the move is not rejected outright; it gets
|
|
16600
|
+
* the sheet.
|
|
16601
|
+
*/
|
|
16602
|
+
backgroundId: external_exports.string().uuid().optional()
|
|
16603
|
+
});
|
|
16604
|
+
var ImportPresetAvatarImageResponseSchema = external_exports.object({
|
|
16605
|
+
assetId: external_exports.string().uuid(),
|
|
16606
|
+
/** Presigned, so it expires — never persist this. */
|
|
16607
|
+
url: external_exports.string()
|
|
16608
|
+
});
|
|
16609
|
+
var PresetAvatarTeamBackgroundSchema = CastBackgroundSchema.extend({
|
|
16610
|
+
presetAvatarId: external_exports.string().uuid()
|
|
16611
|
+
});
|
|
16612
|
+
var ListPresetAvatarTeamBackgroundsResponseSchema = external_exports.object({
|
|
16613
|
+
backgrounds: external_exports.array(PresetAvatarTeamBackgroundSchema)
|
|
16614
|
+
});
|
|
16615
|
+
|
|
16616
|
+
// ../api-contract/src/cast-explore/schema.ts
|
|
16617
|
+
var CastUseCaseSchema = external_exports.enum(["ad", "microdrama"]);
|
|
16618
|
+
var CastAdTypeSchema = external_exports.enum([
|
|
16619
|
+
"ai_ugc",
|
|
16620
|
+
"product_demo",
|
|
16621
|
+
"problem_solution",
|
|
16622
|
+
"comparison",
|
|
16623
|
+
"before_after",
|
|
16624
|
+
"explainer",
|
|
16625
|
+
"listicle",
|
|
16626
|
+
"founder_story",
|
|
16627
|
+
"social_proof",
|
|
16628
|
+
"offer",
|
|
16629
|
+
"lifestyle",
|
|
16630
|
+
"interview_podcast",
|
|
16631
|
+
"visual_first",
|
|
16632
|
+
"viral_trend"
|
|
16633
|
+
]);
|
|
16634
|
+
var CastGenreSchema = external_exports.enum([
|
|
16635
|
+
"romance",
|
|
16636
|
+
"revenge",
|
|
16637
|
+
"billionaire",
|
|
16638
|
+
"hidden_identity",
|
|
16639
|
+
"werewolf",
|
|
16640
|
+
"fantasy",
|
|
16641
|
+
"faith",
|
|
16642
|
+
"family",
|
|
16643
|
+
"thriller",
|
|
16644
|
+
"comedy"
|
|
16645
|
+
]);
|
|
16646
|
+
var CastExploreStreamSchema = external_exports.object({
|
|
16647
|
+
/** API-relative master playlist; each resolution's media is signed by the CDN. */
|
|
16648
|
+
path: external_exports.string().startsWith("/"),
|
|
16649
|
+
/**
|
|
16650
|
+
* The short edges the master playlist lists, lowest first: up to 1440
|
|
16651
|
+
* (2K) for a featured video, up to 1080 for any other.
|
|
16652
|
+
*/
|
|
16653
|
+
qualities: external_exports.array(external_exports.number().int().positive()).min(1)
|
|
16654
|
+
});
|
|
16655
|
+
var CastExploreVideoSchema = external_exports.object({
|
|
16656
|
+
id: external_exports.string().uuid(),
|
|
16657
|
+
revision: external_exports.number().int().positive().safe(),
|
|
16658
|
+
title: external_exports.string().min(1).max(200),
|
|
16659
|
+
templateId: external_exports.string().uuid().nullable(),
|
|
16660
|
+
sourceGenerationId: external_exports.string().uuid().optional(),
|
|
16661
|
+
templateTitle: external_exports.string(),
|
|
16662
|
+
videoUrl: external_exports.string().url(),
|
|
16663
|
+
/**
|
|
16664
|
+
* A small, silent copy of `videoUrl` for grids that play many at once.
|
|
16665
|
+
* Absent until one is made of the file `videoUrl` plays, and from servers
|
|
16666
|
+
* that predate it, so a grid plays `previewVideoUrl ?? videoUrl`.
|
|
16667
|
+
*/
|
|
16668
|
+
previewVideoUrl: external_exports.string().url().optional(),
|
|
16669
|
+
/**
|
|
16670
|
+
* The adaptive stream, once one is made of the file `videoUrl` plays.
|
|
16671
|
+
* Absent before then and from servers that predate it, so a player
|
|
16672
|
+
* falls back to `previewVideoUrl ?? videoUrl`.
|
|
16673
|
+
*/
|
|
16674
|
+
stream: CastExploreStreamSchema.optional(),
|
|
16675
|
+
thumbnailUrl: external_exports.string().url(),
|
|
16676
|
+
width: external_exports.number().int().positive(),
|
|
16677
|
+
height: external_exports.number().int().positive(),
|
|
16678
|
+
durationSeconds: external_exports.number().finite().positive(),
|
|
16679
|
+
/**
|
|
16680
|
+
* How many videos this tile's template has made. Optional for the same
|
|
16681
|
+
* reason it is on `CastTemplateSchema` — a client reading from a deployment
|
|
16682
|
+
* predating the count draws nothing rather than a zero.
|
|
16683
|
+
*/
|
|
16684
|
+
templateUseCount: external_exports.number().int().nonnegative().optional(),
|
|
16685
|
+
/**
|
|
16686
|
+
* The curated avatar the example was shot with, as this team may cast it.
|
|
16687
|
+
* Optional on the same deploy terms as `templateUseCount`: a client reading
|
|
16688
|
+
* from a server that predates the field offers the script alone.
|
|
16689
|
+
*/
|
|
16690
|
+
avatar: PresetAvatarSummarySchema.optional(),
|
|
16691
|
+
/**
|
|
16692
|
+
* Set instead of `avatar` for the team whose own avatar the curated one was
|
|
16693
|
+
* copied from: that team casts its original.
|
|
16694
|
+
*/
|
|
16695
|
+
customAvatarId: external_exports.string().uuid().optional(),
|
|
16696
|
+
/**
|
|
16697
|
+
* The Melius avatars the video stars, one per person; empty when none
|
|
16698
|
+
* traces back to one. Discover keeps cards that share one apart. Optional
|
|
16699
|
+
* so a client reading from a server that predates it reads `avatar`.
|
|
16700
|
+
*/
|
|
16701
|
+
presetAvatarIds: external_exports.array(external_exports.string().uuid()).optional(),
|
|
16702
|
+
/**
|
|
16703
|
+
* Staff feature it, so Discover lists it first, in their order. Optional
|
|
16704
|
+
* so a client reading from a server that predates featuring shows none.
|
|
16705
|
+
*/
|
|
16706
|
+
featured: external_exports.boolean().optional(),
|
|
16707
|
+
/**
|
|
16708
|
+
* The tab staff listed it under. Absent until they choose one, and from
|
|
16709
|
+
* a server that predates use cases.
|
|
16710
|
+
*/
|
|
16711
|
+
useCase: CastUseCaseSchema.optional(),
|
|
16712
|
+
/** The kind of ad it is, its Ads & content row. Absent when staff set none. */
|
|
16713
|
+
adType: CastAdTypeSchema.optional(),
|
|
16714
|
+
/** Its story genre, its Microdramas row. Absent when staff set none. */
|
|
16715
|
+
genre: CastGenreSchema.optional(),
|
|
16716
|
+
/** One line on what it makes, under its title. Absent until staff write one. */
|
|
16717
|
+
description: external_exports.string().optional()
|
|
16718
|
+
});
|
|
16719
|
+
var CastExploreKindSchema = external_exports.enum(["template", "linked"]);
|
|
16720
|
+
var SearchCastExploreBodySchema = createCursorPaginationRequestSchema({
|
|
16721
|
+
defaultPageSize: 24
|
|
16722
|
+
}).extend({
|
|
16723
|
+
/**
|
|
16724
|
+
* Orders the gallery for one visit. A fresh seed per visit reshuffles it;
|
|
16725
|
+
* one seed keeps every page of a traversal in the same order.
|
|
16726
|
+
*/
|
|
16727
|
+
seed: external_exports.string().uuid().optional(),
|
|
16728
|
+
includeLinked: external_exports.boolean().optional(),
|
|
16729
|
+
/** One kind only; `linked` needs no `includeLinked`. Absent lists both. */
|
|
16730
|
+
kind: CastExploreKindSchema.optional(),
|
|
16731
|
+
/**
|
|
16732
|
+
* True lists only the featured videos, in staff order. A server that
|
|
16733
|
+
* predates it lists every video, so a client keeps those with `featured`.
|
|
16734
|
+
*/
|
|
16735
|
+
featured: external_exports.boolean().optional(),
|
|
16736
|
+
/**
|
|
16737
|
+
* One tab's videos only. A server that predates it lists every video, so
|
|
16738
|
+
* a client keeps those whose `useCase` matches.
|
|
16739
|
+
*/
|
|
16740
|
+
useCase: CastUseCaseSchema.optional(),
|
|
16741
|
+
/**
|
|
16742
|
+
* One ad type only. A server that predates it lists every video, so a
|
|
16743
|
+
* client keeps those whose `adType` matches.
|
|
16744
|
+
*/
|
|
16745
|
+
adType: CastAdTypeSchema.optional(),
|
|
16746
|
+
/**
|
|
16747
|
+
* One genre only. A server that predates it lists every video, so a
|
|
16748
|
+
* client keeps those whose `genre` matches.
|
|
16749
|
+
*/
|
|
16750
|
+
genre: CastGenreSchema.optional()
|
|
16751
|
+
});
|
|
16752
|
+
var CastExplorePageSchema = createPaginatedResponseSchema(
|
|
16753
|
+
CastExploreVideoSchema
|
|
16754
|
+
);
|
|
16755
|
+
|
|
16478
16756
|
// ../api-contract/src/cast/schema.ts
|
|
16479
16757
|
var CAST_TREATMENT_IDS = ["self-filmed", "produced", "vlog"];
|
|
16480
16758
|
var CAST_SCRIPT_ENTRY_METHODS = [
|
|
@@ -16891,6 +17169,15 @@ var CreateCastGenerationBodySchema = external_exports.object({
|
|
|
16891
17169
|
/** Opt in to server-owned submission reporting; absent preserves old clients. */
|
|
16892
17170
|
reportSubmissionEvent: external_exports.boolean().optional().catch(void 0),
|
|
16893
17171
|
canvasId: external_exports.string().uuid(),
|
|
17172
|
+
/**
|
|
17173
|
+
* File the video in this collection: a series' next episode, which the
|
|
17174
|
+
* server numbers. Without this or `episodeId` the video is in none.
|
|
17175
|
+
* Ignored for a team without Microdrama. A request naming both this and
|
|
17176
|
+
* `episodeId` is refused.
|
|
17177
|
+
*/
|
|
17178
|
+
collectionId: external_exports.string().uuid().optional(),
|
|
17179
|
+
/** Make another take of this series episode, keeping its number. */
|
|
17180
|
+
episodeId: external_exports.string().uuid().optional(),
|
|
16894
17181
|
/** The run this record belongs to — the join to credits and analytics. */
|
|
16895
17182
|
bulkNodeRunId: external_exports.string().uuid().optional(),
|
|
16896
17183
|
config: CastGenerationConfigSchema.extend({
|
|
@@ -16919,6 +17206,16 @@ var CastGenerationCreatorSchema = external_exports.object({
|
|
|
16919
17206
|
name: external_exports.string(),
|
|
16920
17207
|
avatarUrl: external_exports.string().nullable()
|
|
16921
17208
|
});
|
|
17209
|
+
var CastCollectionKindSchema = external_exports.enum(["series", "group"]);
|
|
17210
|
+
var CastGenerationCollectionSchema = external_exports.object({
|
|
17211
|
+
id: external_exports.string().uuid(),
|
|
17212
|
+
kind: CastCollectionKindSchema,
|
|
17213
|
+
title: external_exports.string(),
|
|
17214
|
+
/** The episode this video is a take of, what another take sends back; null outside a series. */
|
|
17215
|
+
episodeId: external_exports.string().uuid().nullable(),
|
|
17216
|
+
episodeNumber: external_exports.number().int().positive().nullable(),
|
|
17217
|
+
episodeCount: external_exports.number().int().nonnegative()
|
|
17218
|
+
});
|
|
16922
17219
|
var CastGenerationResponseSchema = external_exports.object({
|
|
16923
17220
|
id: external_exports.string().uuid(),
|
|
16924
17221
|
canvasId: external_exports.string().uuid(),
|
|
@@ -17010,7 +17307,12 @@ var CastGenerationResponseSchema = external_exports.object({
|
|
|
17010
17307
|
*/
|
|
17011
17308
|
addSubtitles: CastAddSubtitlesSchema.nullable().optional(),
|
|
17012
17309
|
/** Set on a take that is another with subtitles added. Null otherwise. */
|
|
17013
|
-
subtitledFrom: CastSubtitledFromSchema.nullable().optional()
|
|
17310
|
+
subtitledFrom: CastSubtitledFromSchema.nullable().optional(),
|
|
17311
|
+
/**
|
|
17312
|
+
* The collection this video is in; absent for a video in none, and from a
|
|
17313
|
+
* server built before collections.
|
|
17314
|
+
*/
|
|
17315
|
+
collection: CastGenerationCollectionSchema.nullable().optional()
|
|
17014
17316
|
});
|
|
17015
17317
|
var CreateCastGenerationResponseSchema = CastGenerationResponseSchema.extend({
|
|
17016
17318
|
/** Ownership acknowledgment, not a guarantee of delivery to PostHog. */
|
|
@@ -17037,10 +17339,116 @@ var SearchCastGenerationsBodySchema = createCursorPaginationRequestSchema({
|
|
|
17037
17339
|
* `includeReplacements`; a replacement is still listed only
|
|
17038
17340
|
* for its author.
|
|
17039
17341
|
*/
|
|
17040
|
-
operation: CastGenerationOperationSchema.optional()
|
|
17342
|
+
operation: CastGenerationOperationSchema.optional(),
|
|
17343
|
+
/**
|
|
17344
|
+
* One Cast home tab's videos: Microdrama-style videos on
|
|
17345
|
+
* Microdramas, every other video on Ads & content. Absent lists
|
|
17346
|
+
* both.
|
|
17347
|
+
*/
|
|
17348
|
+
useCase: CastUseCaseSchema.optional(),
|
|
17349
|
+
/**
|
|
17350
|
+
* Only videos in a collection (true), or only videos outside
|
|
17351
|
+
* one (false). Absent lists both.
|
|
17352
|
+
*/
|
|
17353
|
+
inCollection: external_exports.boolean().optional(),
|
|
17354
|
+
/** Only this collection's videos: every take of a series' episodes. */
|
|
17355
|
+
collectionId: external_exports.string().uuid().optional()
|
|
17041
17356
|
}).default({})
|
|
17042
17357
|
});
|
|
17043
17358
|
var SearchCastGenerationsResponseSchema = createPaginatedResponseSchema(CastGenerationResponseSchema);
|
|
17359
|
+
var CastCollectionSchema = external_exports.object({
|
|
17360
|
+
id: external_exports.string().uuid(),
|
|
17361
|
+
kind: CastCollectionKindSchema,
|
|
17362
|
+
title: external_exports.string(),
|
|
17363
|
+
/**
|
|
17364
|
+
* A series' genre, a label for now: it changes neither the script nor the
|
|
17365
|
+
* filming. Null for a collection that is not a series.
|
|
17366
|
+
*/
|
|
17367
|
+
genre: CastGenreSchema.nullable(),
|
|
17368
|
+
/**
|
|
17369
|
+
* The style every episode of a series is filmed in. Null for a collection
|
|
17370
|
+
* that is not a series.
|
|
17371
|
+
*/
|
|
17372
|
+
videoStyleId: CastVideoStyleIdSchema.nullable(),
|
|
17373
|
+
/** A series' live episodes, however many takes each has. */
|
|
17374
|
+
episodeCount: external_exports.number().int().nonnegative(),
|
|
17375
|
+
/**
|
|
17376
|
+
* The number a series' new episode gets. Another episode starting first
|
|
17377
|
+
* can take it. Null for a collection that is not a series.
|
|
17378
|
+
*/
|
|
17379
|
+
nextEpisodeNumber: external_exports.number().int().positive().nullable(),
|
|
17380
|
+
createdAt: external_exports.string().datetime(),
|
|
17381
|
+
/** When its last video was made, or it was renamed: the list's order. */
|
|
17382
|
+
updatedAt: external_exports.string().datetime()
|
|
17383
|
+
});
|
|
17384
|
+
var CastCollectionTitleSchema = external_exports.string().trim().min(1).max(120);
|
|
17385
|
+
function castSeriesRequestProblem(request) {
|
|
17386
|
+
if (request.series === void 0 && request.episode === void 0)
|
|
17387
|
+
return void 0;
|
|
17388
|
+
if (request.series !== void 0 && request.episode !== void 0)
|
|
17389
|
+
return "series-and-episode";
|
|
17390
|
+
return isCastMicrodramaStyle(request.videoStyleId) ? void 0 : "not-microdrama";
|
|
17391
|
+
}
|
|
17392
|
+
var CreateCastCollectionBodySchema = external_exports.object({
|
|
17393
|
+
/** Only a series is started today. */
|
|
17394
|
+
kind: external_exports.literal("series"),
|
|
17395
|
+
title: CastCollectionTitleSchema,
|
|
17396
|
+
/** Optional: a series' genre can be set later. */
|
|
17397
|
+
genre: CastGenreSchema.optional(),
|
|
17398
|
+
/**
|
|
17399
|
+
* The style every episode is filmed in, kept for the whole series.
|
|
17400
|
+
* Absent films the series as a Microdrama.
|
|
17401
|
+
*/
|
|
17402
|
+
videoStyleId: CastMicrodramaStyleIdSchema.optional(),
|
|
17403
|
+
/**
|
|
17404
|
+
* A Microdrama made outside a series, filed as the series' Episode 1 with
|
|
17405
|
+
* its upscaled and subtitled copies. The series takes its style.
|
|
17406
|
+
*/
|
|
17407
|
+
fromGenerationId: external_exports.string().uuid().optional()
|
|
17408
|
+
});
|
|
17409
|
+
var UpdateCastCollectionBodySchema = external_exports.object({
|
|
17410
|
+
title: CastCollectionTitleSchema.optional(),
|
|
17411
|
+
genre: CastGenreSchema.nullable().optional()
|
|
17412
|
+
});
|
|
17413
|
+
var CastCollectionListItemSchema = CastCollectionSchema.extend({
|
|
17414
|
+
/**
|
|
17415
|
+
* The newest take the reader may see of its newest episode that has one.
|
|
17416
|
+
* Null while none does.
|
|
17417
|
+
*/
|
|
17418
|
+
cover: CastGenerationResponseSchema.nullable()
|
|
17419
|
+
});
|
|
17420
|
+
var SearchCastCollectionsBodySchema = createCursorPaginationRequestSchema({
|
|
17421
|
+
defaultPageSize: 24
|
|
17422
|
+
}).extend({
|
|
17423
|
+
filters: external_exports.object({
|
|
17424
|
+
/** Only collections of this kind; absent lists every kind. */
|
|
17425
|
+
kind: CastCollectionKindSchema.optional()
|
|
17426
|
+
}).default({})
|
|
17427
|
+
});
|
|
17428
|
+
var SearchCastCollectionsResponseSchema = createPaginatedResponseSchema(CastCollectionListItemSchema);
|
|
17429
|
+
var CastCollectionEpisodeSchema = external_exports.object({
|
|
17430
|
+
id: external_exports.string().uuid(),
|
|
17431
|
+
number: external_exports.number().int().positive(),
|
|
17432
|
+
take: CastGenerationResponseSchema
|
|
17433
|
+
});
|
|
17434
|
+
var SearchCastCollectionEpisodesBodySchema = createCursorPaginationRequestSchema({ defaultPageSize: 24 });
|
|
17435
|
+
var SearchCastCollectionEpisodesResponseSchema = createPaginatedResponseSchema(CastCollectionEpisodeSchema);
|
|
17436
|
+
var DraftCastCollectionEpisodeBodySchema = external_exports.object({
|
|
17437
|
+
/** What this episode does, in the member's words; absent continues the story. */
|
|
17438
|
+
brief: external_exports.string().trim().min(1).max(MAX_PROMPT_ENHANCE_INPUT_LENGTH).optional(),
|
|
17439
|
+
seconds: CastDraftSecondsSchema.optional(),
|
|
17440
|
+
/** The cast's names, lead first: every line is said by one of them. */
|
|
17441
|
+
speakers: CastScriptSpeakersSchema,
|
|
17442
|
+
/**
|
|
17443
|
+
* The episode to write: one already made, written again from the episodes
|
|
17444
|
+
* before it, or absent (or past the last) for the series' next episode.
|
|
17445
|
+
*/
|
|
17446
|
+
episodeNumber: external_exports.number().int().positive().optional()
|
|
17447
|
+
});
|
|
17448
|
+
var DraftCastCollectionEpisodeResponseSchema = external_exports.object({
|
|
17449
|
+
episodeNumber: external_exports.number().int().positive(),
|
|
17450
|
+
sections: external_exports.array(CastScriptSectionSchema).min(1)
|
|
17451
|
+
});
|
|
17044
17452
|
|
|
17045
17453
|
// ../api-contract/src/templates/constants.ts
|
|
17046
17454
|
var TEMPLATE_TAG_MAX_LENGTH = 40;
|
|
@@ -18119,6 +18527,7 @@ var InAppExperience;
|
|
|
18119
18527
|
InAppExperience2["TemplateRequestBanner"] = "template_request_banner";
|
|
18120
18528
|
InAppExperience2["BuildTemplateIntro"] = "build_template_intro";
|
|
18121
18529
|
InAppExperience2["CastControlsGuide"] = "cast_controls_guide";
|
|
18530
|
+
InAppExperience2["CastMicrodramaGuide"] = "cast_microdrama_guide";
|
|
18122
18531
|
InAppExperience2["CastScriptGuide"] = "cast_script_guide";
|
|
18123
18532
|
InAppExperience2["CastIntro"] = "cast_intro";
|
|
18124
18533
|
InAppExperience2["CastActionsGuide"] = "cast_actions_guide";
|
|
@@ -18162,6 +18571,7 @@ var IN_APP_EXPERIENCE_REGISTRY = {
|
|
|
18162
18571
|
[InAppExperience.TemplateRequestBanner]: ON_OUTCOME,
|
|
18163
18572
|
[InAppExperience.BuildTemplateIntro]: ON_OUTCOME,
|
|
18164
18573
|
[InAppExperience.CastControlsGuide]: ON_OUTCOME,
|
|
18574
|
+
[InAppExperience.CastMicrodramaGuide]: ON_OUTCOME,
|
|
18165
18575
|
[InAppExperience.CastScriptGuide]: ON_OUTCOME,
|
|
18166
18576
|
[InAppExperience.CastIntro]: ON_OUTCOME,
|
|
18167
18577
|
[InAppExperience.CastActionsGuide]: ON_OUTCOME,
|
|
@@ -18809,13 +19219,99 @@ var ProjectMemoryResponseSchema = external_exports.object({
|
|
|
18809
19219
|
markdown: external_exports.string(),
|
|
18810
19220
|
/** 0 until the first save. */
|
|
18811
19221
|
revision: external_exports.number().int().nonnegative(),
|
|
18812
|
-
updatedAt: external_exports.string().datetime().nullable()
|
|
19222
|
+
updatedAt: external_exports.string().datetime().nullable(),
|
|
19223
|
+
/**
|
|
19224
|
+
* While on, Mel also saves lasting project facts it notices in chat. On
|
|
19225
|
+
* for a project that has never changed it.
|
|
19226
|
+
*/
|
|
19227
|
+
autoUpdate: external_exports.boolean()
|
|
18813
19228
|
});
|
|
18814
19229
|
var UpdateProjectMemoryBodySchema = external_exports.object({
|
|
18815
19230
|
markdown: external_exports.string().max(MAX_PROJECT_MEMORY_LENGTH).refine((text) => !text.includes("\0"), "Remove null characters"),
|
|
18816
19231
|
/** The revision the editor loaded; a different saved revision is a 409. */
|
|
18817
19232
|
revision: external_exports.number().int().nonnegative().max(MAX_SAVED_REVISION)
|
|
18818
19233
|
});
|
|
19234
|
+
var UpdateProjectMemoryAutoUpdateBodySchema = external_exports.object({
|
|
19235
|
+
autoUpdate: external_exports.boolean()
|
|
19236
|
+
});
|
|
19237
|
+
|
|
19238
|
+
// ../api-contract/src/project/memory-save-schema.ts
|
|
19239
|
+
var MAX_PROJECT_MEMORY_LINE_LENGTH = 1e3;
|
|
19240
|
+
var memoryLine = external_exports.string().trim().min(1).max(MAX_PROJECT_MEMORY_LINE_LENGTH).regex(/^[^\r\n]+$/, "One line");
|
|
19241
|
+
var revision = external_exports.number().int().nonnegative().max(MAX_SAVED_REVISION);
|
|
19242
|
+
var ProjectMemoryLineChangeSchema = external_exports.object({
|
|
19243
|
+
replacements: external_exports.array(
|
|
19244
|
+
external_exports.object({
|
|
19245
|
+
/** The 1-based line number at the revision the change was built from. */
|
|
19246
|
+
line: external_exports.number().int().positive(),
|
|
19247
|
+
before: external_exports.string(),
|
|
19248
|
+
/** Null removes the line. */
|
|
19249
|
+
after: external_exports.string().nullable()
|
|
19250
|
+
})
|
|
19251
|
+
),
|
|
19252
|
+
additions: external_exports.array(external_exports.string())
|
|
19253
|
+
});
|
|
19254
|
+
var ProjectMemoryChangeResponseSchema = external_exports.object({
|
|
19255
|
+
approvalId: external_exports.string().uuid(),
|
|
19256
|
+
projectId: external_exports.string().uuid(),
|
|
19257
|
+
/**
|
|
19258
|
+
* `expired` is a change nobody can approve any more: memory moved on, or
|
|
19259
|
+
* the card closed, before a member approved it.
|
|
19260
|
+
*/
|
|
19261
|
+
state: external_exports.enum(["awaiting_approval", "applied", "denied", "expired"]),
|
|
19262
|
+
/** The memory revision the change was built from. */
|
|
19263
|
+
baseRevision: revision,
|
|
19264
|
+
change: ProjectMemoryLineChangeSchema
|
|
19265
|
+
});
|
|
19266
|
+
var ProjectMemoryProposalResponseSchema = ProjectMemoryChangeResponseSchema.omit({ approvalId: true }).extend({
|
|
19267
|
+
proposalId: external_exports.string().uuid()
|
|
19268
|
+
});
|
|
19269
|
+
var ApproveProjectMemoryProposalBodySchema = external_exports.object({
|
|
19270
|
+
/** The revision the card was built from; memory at another one is left as it is. */
|
|
19271
|
+
baseRevision: revision
|
|
19272
|
+
});
|
|
19273
|
+
var EditProjectMemoryChangeBodySchema = external_exports.object({
|
|
19274
|
+
/** The revision the card was built from; a different one is a 409. */
|
|
19275
|
+
baseRevision: revision,
|
|
19276
|
+
/** One entry per rewritten line of the change, with its new text. */
|
|
19277
|
+
replacements: external_exports.array(
|
|
19278
|
+
external_exports.object({ line: external_exports.number().int().positive(), after: memoryLine })
|
|
19279
|
+
),
|
|
19280
|
+
/** The change's added lines, in the order the card shows them. */
|
|
19281
|
+
additions: external_exports.array(memoryLine)
|
|
19282
|
+
});
|
|
19283
|
+
var ProjectMemorySaveResponseSchema = external_exports.object({
|
|
19284
|
+
id: external_exports.string().uuid(),
|
|
19285
|
+
projectId: external_exports.string().uuid(),
|
|
19286
|
+
/** The lines the save added. */
|
|
19287
|
+
added: external_exports.array(external_exports.string()),
|
|
19288
|
+
/** `none` is a save that added nothing at once. */
|
|
19289
|
+
state: external_exports.enum(["added", "undone", "none"]),
|
|
19290
|
+
/** The added lines memory still holds as added: what Undo would remove now. */
|
|
19291
|
+
removable: external_exports.array(external_exports.string()),
|
|
19292
|
+
/** Memory was saved again after this save, so Undo asks before removing. */
|
|
19293
|
+
editedSince: external_exports.boolean(),
|
|
19294
|
+
/** Memory's revision as read; a confirmed Undo sends it back. */
|
|
19295
|
+
revision
|
|
19296
|
+
});
|
|
19297
|
+
var UndoProjectMemorySaveBodySchema = external_exports.object({
|
|
19298
|
+
/**
|
|
19299
|
+
* Sent to confirm a removal the server asked about: the memory revision
|
|
19300
|
+
* that removal was shown for.
|
|
19301
|
+
*/
|
|
19302
|
+
confirmRevision: revision.optional()
|
|
19303
|
+
});
|
|
19304
|
+
var UndoProjectMemorySaveResponseSchema = external_exports.object({
|
|
19305
|
+
/**
|
|
19306
|
+
* `needs_confirmation`: memory was edited after the save, so nothing was
|
|
19307
|
+
* removed yet; `lines` are what Undo would remove from memory as it is at
|
|
19308
|
+
* `revision`. `not_found`: memory holds none of the lines as the save
|
|
19309
|
+
* added them (a member deleted or reworded them), so nothing was removed.
|
|
19310
|
+
*/
|
|
19311
|
+
status: external_exports.enum(["undone", "needs_confirmation", "not_found"]),
|
|
19312
|
+
lines: external_exports.array(external_exports.string()),
|
|
19313
|
+
revision
|
|
19314
|
+
});
|
|
18819
19315
|
|
|
18820
19316
|
// ../api-contract/src/template-port-summary.ts
|
|
18821
19317
|
var TemplatePortSummarySchema = external_exports.object({
|
|
@@ -21061,6 +21557,16 @@ var canvasContract = c5.router({
|
|
|
21061
21557
|
404: MessageResponseSchema
|
|
21062
21558
|
}
|
|
21063
21559
|
},
|
|
21560
|
+
getNodeDownloadUrl: {
|
|
21561
|
+
method: "GET",
|
|
21562
|
+
path: "/nodes/:nodeId/download-url",
|
|
21563
|
+
pathParams: external_exports.object({ nodeId: external_exports.string().uuid() }),
|
|
21564
|
+
query: external_exports.object({ nodeVersionId: external_exports.string().uuid().optional() }),
|
|
21565
|
+
responses: {
|
|
21566
|
+
200: AssetDownloadResponseSchema,
|
|
21567
|
+
404: MessageResponseSchema
|
|
21568
|
+
}
|
|
21569
|
+
},
|
|
21064
21570
|
getNode: {
|
|
21065
21571
|
method: "GET",
|
|
21066
21572
|
path: "/nodes/:nodeId",
|
|
@@ -24391,6 +24897,117 @@ var projectContract = c14.router({
|
|
|
24391
24897
|
404: MessageResponseSchema,
|
|
24392
24898
|
409: MessageResponseSchema
|
|
24393
24899
|
}
|
|
24900
|
+
},
|
|
24901
|
+
updateProjectMemoryAutoUpdate: {
|
|
24902
|
+
method: "PUT",
|
|
24903
|
+
path: "/projects/:projectId/memory/auto-update",
|
|
24904
|
+
pathParams: ProjectIdParamsSchema,
|
|
24905
|
+
body: UpdateProjectMemoryAutoUpdateBodySchema,
|
|
24906
|
+
responses: {
|
|
24907
|
+
200: ProjectMemoryResponseSchema,
|
|
24908
|
+
403: MessageResponseSchema,
|
|
24909
|
+
404: MessageResponseSchema
|
|
24910
|
+
}
|
|
24911
|
+
},
|
|
24912
|
+
// ── What Mel saves to project memory from chat ──────────────────
|
|
24913
|
+
getProjectMemoryChange: {
|
|
24914
|
+
method: "GET",
|
|
24915
|
+
path: "/agent/approvals/:approvalId/memory-change",
|
|
24916
|
+
pathParams: external_exports.object({ approvalId: external_exports.string().uuid() }),
|
|
24917
|
+
responses: {
|
|
24918
|
+
200: ProjectMemoryChangeResponseSchema,
|
|
24919
|
+
404: MessageResponseSchema
|
|
24920
|
+
},
|
|
24921
|
+
summary: "The lines a project memory approval card asks to change, and what became of it"
|
|
24922
|
+
},
|
|
24923
|
+
editProjectMemoryChange: {
|
|
24924
|
+
method: "POST",
|
|
24925
|
+
path: "/agent/approvals/:approvalId/memory-change/edit",
|
|
24926
|
+
pathParams: external_exports.object({ approvalId: external_exports.string().uuid() }),
|
|
24927
|
+
body: EditProjectMemoryChangeBodySchema,
|
|
24928
|
+
responses: {
|
|
24929
|
+
200: ProjectMemoryChangeResponseSchema,
|
|
24930
|
+
403: MessageResponseSchema,
|
|
24931
|
+
404: MessageResponseSchema,
|
|
24932
|
+
/** Memory changed, or the card was already answered. */
|
|
24933
|
+
409: MessageResponseSchema,
|
|
24934
|
+
/** The edited text cannot be saved as written; the message says why. */
|
|
24935
|
+
422: MessageResponseSchema
|
|
24936
|
+
},
|
|
24937
|
+
summary: "Reword a pending project memory change before approving it"
|
|
24938
|
+
},
|
|
24939
|
+
getProjectMemoryProposal: {
|
|
24940
|
+
method: "GET",
|
|
24941
|
+
path: "/project-memory-proposals/:proposalId",
|
|
24942
|
+
pathParams: external_exports.object({ proposalId: external_exports.string().uuid() }),
|
|
24943
|
+
responses: {
|
|
24944
|
+
200: ProjectMemoryProposalResponseSchema,
|
|
24945
|
+
404: MessageResponseSchema
|
|
24946
|
+
},
|
|
24947
|
+
summary: "The lines the memory job asks to change under a reply, and what became of it"
|
|
24948
|
+
},
|
|
24949
|
+
approveProjectMemoryProposal: {
|
|
24950
|
+
method: "POST",
|
|
24951
|
+
path: "/project-memory-proposals/:proposalId/approve",
|
|
24952
|
+
pathParams: external_exports.object({ proposalId: external_exports.string().uuid() }),
|
|
24953
|
+
body: ApproveProjectMemoryProposalBodySchema,
|
|
24954
|
+
responses: {
|
|
24955
|
+
/** `expired` when memory moved on from the revision the card showed. */
|
|
24956
|
+
200: ProjectMemoryProposalResponseSchema,
|
|
24957
|
+
403: MessageResponseSchema,
|
|
24958
|
+
404: MessageResponseSchema
|
|
24959
|
+
},
|
|
24960
|
+
summary: "Apply the change the memory job asked about"
|
|
24961
|
+
},
|
|
24962
|
+
denyProjectMemoryProposal: {
|
|
24963
|
+
method: "POST",
|
|
24964
|
+
path: "/project-memory-proposals/:proposalId/deny",
|
|
24965
|
+
pathParams: external_exports.object({ proposalId: external_exports.string().uuid() }),
|
|
24966
|
+
body: external_exports.object({}),
|
|
24967
|
+
responses: {
|
|
24968
|
+
200: ProjectMemoryProposalResponseSchema,
|
|
24969
|
+
403: MessageResponseSchema,
|
|
24970
|
+
404: MessageResponseSchema
|
|
24971
|
+
},
|
|
24972
|
+
summary: "Decline the change the memory job asked about"
|
|
24973
|
+
},
|
|
24974
|
+
editProjectMemoryProposal: {
|
|
24975
|
+
method: "POST",
|
|
24976
|
+
path: "/project-memory-proposals/:proposalId/edit",
|
|
24977
|
+
pathParams: external_exports.object({ proposalId: external_exports.string().uuid() }),
|
|
24978
|
+
body: EditProjectMemoryChangeBodySchema,
|
|
24979
|
+
responses: {
|
|
24980
|
+
200: ProjectMemoryProposalResponseSchema,
|
|
24981
|
+
403: MessageResponseSchema,
|
|
24982
|
+
404: MessageResponseSchema,
|
|
24983
|
+
/** Memory changed, or the card was already answered. */
|
|
24984
|
+
409: MessageResponseSchema,
|
|
24985
|
+
/** The edited text cannot be saved as written; the message says why. */
|
|
24986
|
+
422: MessageResponseSchema
|
|
24987
|
+
},
|
|
24988
|
+
summary: "Reword the change the memory job asked about before approving it"
|
|
24989
|
+
},
|
|
24990
|
+
getProjectMemorySave: {
|
|
24991
|
+
method: "GET",
|
|
24992
|
+
path: "/project-memory-saves/:saveId",
|
|
24993
|
+
pathParams: external_exports.object({ saveId: external_exports.string().uuid() }),
|
|
24994
|
+
responses: {
|
|
24995
|
+
200: ProjectMemorySaveResponseSchema,
|
|
24996
|
+
404: MessageResponseSchema
|
|
24997
|
+
},
|
|
24998
|
+
summary: "What one save from chat added to project memory"
|
|
24999
|
+
},
|
|
25000
|
+
undoProjectMemorySave: {
|
|
25001
|
+
method: "POST",
|
|
25002
|
+
path: "/project-memory-saves/:saveId/undo",
|
|
25003
|
+
pathParams: external_exports.object({ saveId: external_exports.string().uuid() }),
|
|
25004
|
+
body: UndoProjectMemorySaveBodySchema,
|
|
25005
|
+
responses: {
|
|
25006
|
+
200: UndoProjectMemorySaveResponseSchema,
|
|
25007
|
+
403: MessageResponseSchema,
|
|
25008
|
+
404: MessageResponseSchema
|
|
25009
|
+
},
|
|
25010
|
+
summary: "Remove the lines one save from chat added to project memory"
|
|
24394
25011
|
}
|
|
24395
25012
|
});
|
|
24396
25013
|
|
|
@@ -24875,36 +25492,6 @@ var CastVideoStyleReadSchema = external_exports.object({
|
|
|
24875
25492
|
videoStyle: CastVideoStyleIdSchema.exclude(["auto"]).optional()
|
|
24876
25493
|
});
|
|
24877
25494
|
|
|
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
25495
|
// ../api-contract/src/cast/prop-precheck.ts
|
|
24909
25496
|
var CastPropPrecheckCategorySchema = SeedancePrecheckCategorySchema.extract(["intimate_sexual"]);
|
|
24910
25497
|
var PrecheckCastPropsBodySchema = external_exports.object({
|
|
@@ -25132,17 +25719,6 @@ var castContract = c18.router({
|
|
|
25132
25719
|
},
|
|
25133
25720
|
summary: "Read which video style a Cast script reads as, for the Auto style"
|
|
25134
25721
|
},
|
|
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"
|
|
25145
|
-
},
|
|
25146
25722
|
precheckCastProps: {
|
|
25147
25723
|
method: "POST",
|
|
25148
25724
|
path: "/cast/props/precheck",
|
|
@@ -25300,6 +25876,76 @@ var castContract = c18.router({
|
|
|
25300
25876
|
400: MessageResponseSchema
|
|
25301
25877
|
}
|
|
25302
25878
|
},
|
|
25879
|
+
createCastCollection: {
|
|
25880
|
+
method: "POST",
|
|
25881
|
+
path: "/cast/collections",
|
|
25882
|
+
body: CreateCastCollectionBodySchema,
|
|
25883
|
+
responses: {
|
|
25884
|
+
201: CastCollectionListItemSchema,
|
|
25885
|
+
400: MessageResponseSchema,
|
|
25886
|
+
404: MessageResponseSchema,
|
|
25887
|
+
409: MessageResponseSchema
|
|
25888
|
+
},
|
|
25889
|
+
summary: "Start a Cast collection: a Microdrama series"
|
|
25890
|
+
},
|
|
25891
|
+
searchCastCollections: {
|
|
25892
|
+
method: "POST",
|
|
25893
|
+
path: "/cast/collections/search",
|
|
25894
|
+
body: SearchCastCollectionsBodySchema,
|
|
25895
|
+
responses: {
|
|
25896
|
+
200: SearchCastCollectionsResponseSchema,
|
|
25897
|
+
400: MessageResponseSchema,
|
|
25898
|
+
404: MessageResponseSchema
|
|
25899
|
+
},
|
|
25900
|
+
summary: "The team's Cast collections, most recently active first, each with its cover take"
|
|
25901
|
+
},
|
|
25902
|
+
getCastCollection: {
|
|
25903
|
+
method: "GET",
|
|
25904
|
+
path: "/cast/collections/:collectionId",
|
|
25905
|
+
pathParams: external_exports.object({ collectionId: external_exports.string().uuid() }),
|
|
25906
|
+
responses: {
|
|
25907
|
+
200: CastCollectionListItemSchema,
|
|
25908
|
+
404: MessageResponseSchema
|
|
25909
|
+
},
|
|
25910
|
+
summary: "A Cast collection, with the take its cover shows"
|
|
25911
|
+
},
|
|
25912
|
+
searchCastCollectionEpisodes: {
|
|
25913
|
+
method: "POST",
|
|
25914
|
+
path: "/cast/collections/:collectionId/episodes/search",
|
|
25915
|
+
pathParams: external_exports.object({ collectionId: external_exports.string().uuid() }),
|
|
25916
|
+
body: SearchCastCollectionEpisodesBodySchema,
|
|
25917
|
+
responses: {
|
|
25918
|
+
200: SearchCastCollectionEpisodesResponseSchema,
|
|
25919
|
+
400: MessageResponseSchema,
|
|
25920
|
+
404: MessageResponseSchema
|
|
25921
|
+
},
|
|
25922
|
+
summary: "A series collection's episodes in order, each with the take shown"
|
|
25923
|
+
},
|
|
25924
|
+
draftCastCollectionEpisode: {
|
|
25925
|
+
method: "POST",
|
|
25926
|
+
path: "/cast/collections/:collectionId/episodes/draft",
|
|
25927
|
+
pathParams: external_exports.object({ collectionId: external_exports.string().uuid() }),
|
|
25928
|
+
body: DraftCastCollectionEpisodeBodySchema,
|
|
25929
|
+
responses: {
|
|
25930
|
+
200: DraftCastCollectionEpisodeResponseSchema,
|
|
25931
|
+
400: MessageResponseSchema,
|
|
25932
|
+
404: MessageResponseSchema,
|
|
25933
|
+
422: MessageResponseSchema
|
|
25934
|
+
},
|
|
25935
|
+
summary: "Write a series' next episode as a scene, continuing from the episodes before it"
|
|
25936
|
+
},
|
|
25937
|
+
updateCastCollection: {
|
|
25938
|
+
method: "PATCH",
|
|
25939
|
+
path: "/cast/collections/:collectionId",
|
|
25940
|
+
pathParams: external_exports.object({ collectionId: external_exports.string().uuid() }),
|
|
25941
|
+
body: UpdateCastCollectionBodySchema,
|
|
25942
|
+
responses: {
|
|
25943
|
+
200: CastCollectionSchema,
|
|
25944
|
+
400: MessageResponseSchema,
|
|
25945
|
+
404: MessageResponseSchema
|
|
25946
|
+
},
|
|
25947
|
+
summary: "Rename a Cast collection, or set a series' genre"
|
|
25948
|
+
},
|
|
25303
25949
|
listCastGenerations: {
|
|
25304
25950
|
method: "GET",
|
|
25305
25951
|
path: "/cast/generations",
|
|
@@ -25373,6 +26019,14 @@ var publicContract = c19.router(
|
|
|
25373
26019
|
search: castTemplateContract.search,
|
|
25374
26020
|
get: castTemplateContract.get
|
|
25375
26021
|
},
|
|
26022
|
+
// Collections (Microdrama series today); each answers 404 for a team without `cast-drama-style`.
|
|
26023
|
+
castCollections: {
|
|
26024
|
+
create: castContract.createCastCollection,
|
|
26025
|
+
search: castContract.searchCastCollections,
|
|
26026
|
+
get: castContract.getCastCollection,
|
|
26027
|
+
episodes: castContract.searchCastCollectionEpisodes,
|
|
26028
|
+
rename: castContract.updateCastCollection
|
|
26029
|
+
},
|
|
25376
26030
|
ditto: {
|
|
25377
26031
|
listModels: dittoContract.listReplacementModels,
|
|
25378
26032
|
listAvatars: dittoContract.listAvatars,
|
|
@@ -26423,7 +27077,7 @@ function isMajorUpgrade(current, latest) {
|
|
|
26423
27077
|
return l[0] > c20[0];
|
|
26424
27078
|
}
|
|
26425
27079
|
function shouldShowUpgradeNotice(ctx = {}) {
|
|
26426
|
-
const current = ctx.current ?? "0.
|
|
27080
|
+
const current = ctx.current ?? "0.51.0";
|
|
26427
27081
|
const latest = ctx.latest ?? serverLatestVersion;
|
|
26428
27082
|
const env = ctx.env ?? process.env;
|
|
26429
27083
|
const isTty = ctx.isTty ?? Boolean(process.stderr.isTTY);
|
|
@@ -26444,7 +27098,7 @@ Upgrade: npm install -g @melius-ai/cli@latest (or: brew update && brew upgrade
|
|
|
26444
27098
|
function printUpgradeNoticeIfNeeded(ctx = {}) {
|
|
26445
27099
|
try {
|
|
26446
27100
|
if (!shouldShowUpgradeNotice(ctx)) return;
|
|
26447
|
-
const current = ctx.current ?? "0.
|
|
27101
|
+
const current = ctx.current ?? "0.51.0";
|
|
26448
27102
|
const latest = ctx.latest ?? serverLatestVersion;
|
|
26449
27103
|
process.stderr.write(formatUpgradeNotice(current, latest));
|
|
26450
27104
|
} catch {
|
|
@@ -26551,7 +27205,7 @@ function createClient(config) {
|
|
|
26551
27205
|
"Bypass-Tunnel-Reminder": "true",
|
|
26552
27206
|
[CUSTOM_REQUEST_HEADERS.meliusClient]: buildMeliusClientHeader({
|
|
26553
27207
|
surface: "cli",
|
|
26554
|
-
version: "0.
|
|
27208
|
+
version: "0.51.0"
|
|
26555
27209
|
})
|
|
26556
27210
|
};
|
|
26557
27211
|
if (config.teamId) {
|
|
@@ -28077,10 +28731,11 @@ Input: { sourceAssetId, replacements: [{ referenceAssetId | avatar, targetKind,
|
|
|
28077
28731
|
Use 1-30 ordered replacement items, each with one reference image. All items share one attempt, one quote, and one output.
|
|
28078
28732
|
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
28733
|
targetKind: character | prop | background. audioMode: original (default) | mute.
|
|
28734
|
+
modelId: omit for Melius Ditto; to pick another model, send the modelId of a row in prepare's models, whose label names it.
|
|
28080
28735
|
resolution: 480p | 720p | 1080p, subject to the selected model's supported values.
|
|
28081
28736
|
sourceRange: { startMs, endMs }; both endpoints are explicit milliseconds. The source is never automatically shortened.
|
|
28082
28737
|
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
|
-
|
|
28738
|
+
Melius Ditto supports up to 30 replacement images. Items are never dropped or split into paid runs.
|
|
28084
28739
|
Legacy single-item input with top-level referenceAssetId, targetKind and targetDescription remains accepted; do not mix it with replacements.
|
|
28085
28740
|
Save attemptId, input and quote.id for mel ditto run. No credits are reserved by prepare.
|
|
28086
28741
|
Examples:
|
|
@@ -28328,6 +28983,36 @@ Examples:
|
|
|
28328
28983
|
});
|
|
28329
28984
|
}
|
|
28330
28985
|
|
|
28986
|
+
// src/lib/cast-pages.ts
|
|
28987
|
+
function pageOptions(command) {
|
|
28988
|
+
return command.option(
|
|
28989
|
+
"--page-size <number>",
|
|
28990
|
+
"Items per page (integer 1-100; default shown below)"
|
|
28991
|
+
).option(
|
|
28992
|
+
"--cursor <cursor>",
|
|
28993
|
+
"nextCursor from pagination on stderr (1-4096 characters)"
|
|
28994
|
+
).option(
|
|
28995
|
+
"--include-count",
|
|
28996
|
+
"Request the exact total count (omitted by default)"
|
|
28997
|
+
);
|
|
28998
|
+
}
|
|
28999
|
+
function pageInput(options) {
|
|
29000
|
+
return {
|
|
29001
|
+
pageSize: options.pageSize === void 0 ? void 0 : Number(options.pageSize),
|
|
29002
|
+
cursor: options.cursor,
|
|
29003
|
+
includeCount: options.includeCount
|
|
29004
|
+
};
|
|
29005
|
+
}
|
|
29006
|
+
function writePage(page, output2) {
|
|
29007
|
+
writeJson(page.data, output2);
|
|
29008
|
+
const { pageSize, count, hasMore, nextCursor } = page;
|
|
29009
|
+
process.stderr.write(
|
|
29010
|
+
JSON.stringify({
|
|
29011
|
+
pagination: { pageSize, count, hasMore, nextCursor }
|
|
29012
|
+
}) + "\n"
|
|
29013
|
+
);
|
|
29014
|
+
}
|
|
29015
|
+
|
|
28331
29016
|
// ../utils/src/retry/backoff.ts
|
|
28332
29017
|
function fixedBackoff(delaysMs) {
|
|
28333
29018
|
return {
|
|
@@ -28557,35 +29242,222 @@ async function downloadCastFile(url, output2, generationId) {
|
|
|
28557
29242
|
}
|
|
28558
29243
|
}
|
|
28559
29244
|
|
|
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)"
|
|
29245
|
+
// src/commands/cast-series.ts
|
|
29246
|
+
var GENRES = CastGenreSchema.options.join(", ");
|
|
29247
|
+
var STYLES = CAST_MICRODRAMA_STYLE_IDS.join(", ");
|
|
29248
|
+
function seriesParams(id) {
|
|
29249
|
+
return parseCastValue(
|
|
29250
|
+
publicContract.castCollections.get.pathParams,
|
|
29251
|
+
{ collectionId: id },
|
|
29252
|
+
"Use a seriesId from mel cast series list or mel cast series create"
|
|
28571
29253
|
);
|
|
28572
29254
|
}
|
|
28573
|
-
function
|
|
28574
|
-
|
|
28575
|
-
|
|
28576
|
-
|
|
28577
|
-
|
|
28578
|
-
|
|
28579
|
-
|
|
28580
|
-
|
|
28581
|
-
|
|
28582
|
-
|
|
28583
|
-
|
|
28584
|
-
|
|
28585
|
-
|
|
28586
|
-
|
|
29255
|
+
function addCastSeriesSubcommands(cast, getOutputOpts) {
|
|
29256
|
+
const series = cast.command("series").description(
|
|
29257
|
+
"Start and read Microdrama series; returns series and their episodes in order"
|
|
29258
|
+
).addHelpText(
|
|
29259
|
+
"after",
|
|
29260
|
+
`
|
|
29261
|
+
Returns: a series (id, title, genre, videoStyleId, episodeCount, nextEpisodeNumber) or arrays of series and episodes.
|
|
29262
|
+
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>.
|
|
29263
|
+
Available to teams with Microdramas; other teams get a 404.
|
|
29264
|
+
Examples:
|
|
29265
|
+
$ mel cast series create --title "The Heiress Returns" --genre revenge
|
|
29266
|
+
$ mel cast series episodes --id <seriesId>`
|
|
29267
|
+
);
|
|
29268
|
+
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(
|
|
29269
|
+
"--from <generationId>",
|
|
29270
|
+
"A Microdrama made outside a series (from mel cast history), to become Episode 1; the series takes its style"
|
|
29271
|
+
).option(
|
|
29272
|
+
"--style <videoStyleId>",
|
|
29273
|
+
`Style every episode is filmed in, kept for the whole series: ${STYLES} (default drama)`
|
|
29274
|
+
).addHelpText(
|
|
29275
|
+
"after",
|
|
29276
|
+
`
|
|
29277
|
+
Returns: id, title, genre, videoStyleId, episodeCount (0), nextEpisodeNumber (1). Free; makes no video.
|
|
29278
|
+
The genre labels the series; it doesn't change the script or the filming. The style can't change later.
|
|
29279
|
+
Examples:
|
|
29280
|
+
$ mel cast series create --title "The Heiress Returns"
|
|
29281
|
+
$ mel cast series create --title "The Heiress Returns" --genre revenge --style drama
|
|
29282
|
+
$ mel cast series create --title "The Heiress Returns" --from <generationId>`
|
|
29283
|
+
).action(
|
|
29284
|
+
async (options) => {
|
|
29285
|
+
const body = parseCastValue(
|
|
29286
|
+
publicContract.castCollections.create.body,
|
|
29287
|
+
{
|
|
29288
|
+
kind: "series",
|
|
29289
|
+
title: options.title,
|
|
29290
|
+
genre: options.genre,
|
|
29291
|
+
videoStyleId: options.style,
|
|
29292
|
+
fromGenerationId: options.from
|
|
29293
|
+
},
|
|
29294
|
+
"Run: mel cast series create --help"
|
|
29295
|
+
);
|
|
29296
|
+
const result = await getClient().castCollections.create({
|
|
29297
|
+
body
|
|
29298
|
+
});
|
|
29299
|
+
if (result.status !== 201)
|
|
29300
|
+
handleApiError(
|
|
29301
|
+
result.status,
|
|
29302
|
+
result.body,
|
|
29303
|
+
"Check for it with mel cast series list"
|
|
29304
|
+
);
|
|
29305
|
+
writeJson(result.body, getOutputOpts());
|
|
29306
|
+
}
|
|
29307
|
+
);
|
|
29308
|
+
pageOptions(series.command("list")).description(
|
|
29309
|
+
"List the team's Microdrama series, most recently active first; returns a series array"
|
|
29310
|
+
).addHelpText(
|
|
29311
|
+
"after",
|
|
29312
|
+
`
|
|
29313
|
+
Returns: series array, each with cover (its newest episode's take, or null); pagination on stderr. Default page size: 24.
|
|
29314
|
+
Examples:
|
|
29315
|
+
$ mel cast series list
|
|
29316
|
+
$ mel cast series list --cursor <nextCursor>`
|
|
29317
|
+
).action(async (options) => {
|
|
29318
|
+
const body = parseCastValue(
|
|
29319
|
+
publicContract.castCollections.search.body,
|
|
29320
|
+
// A Microdrama series; other kinds of collection list elsewhere.
|
|
29321
|
+
{ ...pageInput(options), filters: { kind: "series" } },
|
|
29322
|
+
"Run: mel cast series list --help"
|
|
29323
|
+
);
|
|
29324
|
+
const client = getClient();
|
|
29325
|
+
writePage(
|
|
29326
|
+
await castRequest(
|
|
29327
|
+
(signal) => client.castCollections.search({
|
|
29328
|
+
body,
|
|
29329
|
+
fetchOptions: { signal }
|
|
29330
|
+
}),
|
|
29331
|
+
{
|
|
29332
|
+
label: "Cast series",
|
|
29333
|
+
suggestion: "Retry: mel cast series list"
|
|
29334
|
+
}
|
|
29335
|
+
),
|
|
29336
|
+
getOutputOpts()
|
|
29337
|
+
);
|
|
29338
|
+
});
|
|
29339
|
+
series.command("get").description("Read one Microdrama series; returns the series").requiredOption(
|
|
29340
|
+
"--id <id>",
|
|
29341
|
+
"Series UUID from mel cast series list or create"
|
|
29342
|
+
).addHelpText(
|
|
29343
|
+
"after",
|
|
29344
|
+
`
|
|
29345
|
+
Returns: id, title, genre, episodeCount, nextEpisodeNumber, createdAt, updatedAt.
|
|
29346
|
+
Examples:
|
|
29347
|
+
$ mel cast series get --id <seriesId>
|
|
29348
|
+
$ mel cast series get --id <seriesId> --fields title,nextEpisodeNumber`
|
|
29349
|
+
).action(async (options) => {
|
|
29350
|
+
const params = seriesParams(options.id);
|
|
29351
|
+
const client = getClient();
|
|
29352
|
+
writeJson(
|
|
29353
|
+
await castRequest(
|
|
29354
|
+
(signal) => client.castCollections.get({
|
|
29355
|
+
params,
|
|
29356
|
+
fetchOptions: { signal }
|
|
29357
|
+
}),
|
|
29358
|
+
{
|
|
29359
|
+
label: "Cast series",
|
|
29360
|
+
suggestion: "Run: mel cast series list"
|
|
29361
|
+
}
|
|
29362
|
+
),
|
|
29363
|
+
getOutputOpts()
|
|
29364
|
+
);
|
|
29365
|
+
});
|
|
29366
|
+
pageOptions(series.command("episodes")).description(
|
|
29367
|
+
"List a series' episodes in order; returns an episode array"
|
|
29368
|
+
).requiredOption(
|
|
29369
|
+
"--id <id>",
|
|
29370
|
+
"Series UUID from mel cast series list or create"
|
|
29371
|
+
).addHelpText(
|
|
29372
|
+
"after",
|
|
29373
|
+
`
|
|
29374
|
+
Returns: episode array (id, number, take), each with the newest take you may see; pagination on stderr. Default page size: 24.
|
|
29375
|
+
Pass an episode's id to mel cast run --episode-id for another take of it.
|
|
29376
|
+
Examples:
|
|
29377
|
+
$ mel cast series episodes --id <seriesId>
|
|
29378
|
+
$ mel cast series episodes --id <seriesId> --cursor <nextCursor>`
|
|
29379
|
+
).action(async (options) => {
|
|
29380
|
+
const params = seriesParams(options.id);
|
|
29381
|
+
const body = parseCastValue(
|
|
29382
|
+
publicContract.castCollections.episodes.body,
|
|
29383
|
+
pageInput(options),
|
|
29384
|
+
"Run: mel cast series episodes --help"
|
|
29385
|
+
);
|
|
29386
|
+
const client = getClient();
|
|
29387
|
+
writePage(
|
|
29388
|
+
await castRequest(
|
|
29389
|
+
(signal) => client.castCollections.episodes({
|
|
29390
|
+
params,
|
|
29391
|
+
body,
|
|
29392
|
+
fetchOptions: { signal }
|
|
29393
|
+
}),
|
|
29394
|
+
{
|
|
29395
|
+
label: "Cast series episodes",
|
|
29396
|
+
suggestion: "Run: mel cast series list"
|
|
29397
|
+
}
|
|
29398
|
+
),
|
|
29399
|
+
getOutputOpts()
|
|
29400
|
+
);
|
|
29401
|
+
});
|
|
29402
|
+
series.command("update").alias("rename").description(
|
|
29403
|
+
"Rename a Microdrama series or set its genre; returns the series"
|
|
29404
|
+
).requiredOption(
|
|
29405
|
+
"--id <id>",
|
|
29406
|
+
"Series UUID from mel cast series list or create"
|
|
29407
|
+
).option("--title <title>", "New title (1-120 characters)").option("--genre <genre>", `Genre: ${GENRES}, or none to remove it`).addHelpText(
|
|
29408
|
+
"after",
|
|
29409
|
+
`
|
|
29410
|
+
Pass --title, --genre, or both. Returns: the series.
|
|
29411
|
+
Examples:
|
|
29412
|
+
$ mel cast series update --id <seriesId> --genre revenge
|
|
29413
|
+
$ mel cast series update --id <seriesId> --title "Season 2"
|
|
29414
|
+
$ mel cast series update --id <seriesId> --genre none`
|
|
29415
|
+
).action(
|
|
29416
|
+
async (options) => {
|
|
29417
|
+
const params = seriesParams(options.id);
|
|
29418
|
+
if (options.title === void 0 && options.genre === void 0)
|
|
29419
|
+
writeError(
|
|
29420
|
+
formatError(
|
|
29421
|
+
"VALIDATION_ERROR",
|
|
29422
|
+
"Pass --title, --genre, or both",
|
|
29423
|
+
{
|
|
29424
|
+
suggestion: "Run: mel cast series update --help"
|
|
29425
|
+
}
|
|
29426
|
+
),
|
|
29427
|
+
EXIT_USAGE_ERROR
|
|
29428
|
+
);
|
|
29429
|
+
const body = parseCastValue(
|
|
29430
|
+
publicContract.castCollections.rename.body,
|
|
29431
|
+
{
|
|
29432
|
+
...options.title !== void 0 && {
|
|
29433
|
+
title: options.title
|
|
29434
|
+
},
|
|
29435
|
+
...options.genre !== void 0 && {
|
|
29436
|
+
genre: options.genre === "none" ? null : options.genre
|
|
29437
|
+
}
|
|
29438
|
+
},
|
|
29439
|
+
"Run: mel cast series update --help"
|
|
29440
|
+
);
|
|
29441
|
+
const client = getClient();
|
|
29442
|
+
writeJson(
|
|
29443
|
+
await castRequest(
|
|
29444
|
+
(signal) => client.castCollections.rename({
|
|
29445
|
+
params,
|
|
29446
|
+
body,
|
|
29447
|
+
fetchOptions: { signal }
|
|
29448
|
+
}),
|
|
29449
|
+
{
|
|
29450
|
+
label: "Cast series",
|
|
29451
|
+
suggestion: "Run: mel cast series get --id <seriesId>"
|
|
29452
|
+
}
|
|
29453
|
+
),
|
|
29454
|
+
getOutputOpts()
|
|
29455
|
+
);
|
|
29456
|
+
}
|
|
28587
29457
|
);
|
|
28588
29458
|
}
|
|
29459
|
+
|
|
29460
|
+
// src/commands/cast.ts
|
|
28589
29461
|
function generationParams(id) {
|
|
28590
29462
|
return parseCastValue(
|
|
28591
29463
|
publicContract.cast.get.pathParams,
|
|
@@ -28593,6 +29465,30 @@ function generationParams(id) {
|
|
|
28593
29465
|
"Use the attemptId from mel cast prepare or generationId from mel cast history"
|
|
28594
29466
|
);
|
|
28595
29467
|
}
|
|
29468
|
+
function castSeriesFields(options, videoStyleId) {
|
|
29469
|
+
const problem = castSeriesRequestProblem({
|
|
29470
|
+
series: options.seriesId,
|
|
29471
|
+
episode: options.episodeId,
|
|
29472
|
+
videoStyleId
|
|
29473
|
+
});
|
|
29474
|
+
if (problem)
|
|
29475
|
+
writeError(
|
|
29476
|
+
formatError(
|
|
29477
|
+
"VALIDATION_ERROR",
|
|
29478
|
+
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}}`,
|
|
29479
|
+
{ suggestion: "Run: mel cast run --help" }
|
|
29480
|
+
),
|
|
29481
|
+
EXIT_USAGE_ERROR
|
|
29482
|
+
);
|
|
29483
|
+
return parseCastValue(
|
|
29484
|
+
publicContract.cast.run.body.pick({
|
|
29485
|
+
collectionId: true,
|
|
29486
|
+
episodeId: true
|
|
29487
|
+
}),
|
|
29488
|
+
{ collectionId: options.seriesId, episodeId: options.episodeId },
|
|
29489
|
+
"Use a series id from mel cast series list or an episode id from mel cast series episodes"
|
|
29490
|
+
);
|
|
29491
|
+
}
|
|
28596
29492
|
function recovery(generationId) {
|
|
28597
29493
|
return `Run: mel cast wait --id ${generationId}. To retry submission, use mel cast run --input-file <prepared.json> with the same prepared file`;
|
|
28598
29494
|
}
|
|
@@ -28791,6 +29687,12 @@ Examples:
|
|
|
28791
29687
|
).requiredOption(
|
|
28792
29688
|
"--input-file <path>",
|
|
28793
29689
|
"Complete ready JSON response saved from mel cast prepare"
|
|
29690
|
+
).option(
|
|
29691
|
+
"--series-id <id>",
|
|
29692
|
+
"Make this Microdrama the next episode of a series (from mel cast series create or list); the server numbers it"
|
|
29693
|
+
).option(
|
|
29694
|
+
"--episode-id <id>",
|
|
29695
|
+
"Make this Microdrama another take of a series episode (from mel cast series episodes)"
|
|
28794
29696
|
).addHelpText(
|
|
28795
29697
|
"after",
|
|
28796
29698
|
`
|
|
@@ -28798,24 +29700,35 @@ Returns: generationId, canvasId, bulkNodeRunId, videoNodeId, status, and exact o
|
|
|
28798
29700
|
Only ready preparations are accepted. The attemptId and input are reused unchanged on every retry.
|
|
28799
29701
|
Changed input under an accepted ID is a conflict. Prepare again only for a deliberately new render.
|
|
28800
29702
|
Use mel cast wait --id <attemptId> after a lost response; rerunning the same prepared file also recovers it.
|
|
29703
|
+
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
29704
|
Examples:
|
|
28802
29705
|
$ 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
|
-
|
|
29706
|
+
$ mel cast run --input-file <prepared.json> --fields generationId,status
|
|
29707
|
+
$ mel cast run --input-file <prepared.json> --series-id <seriesId>`
|
|
29708
|
+
).action(
|
|
29709
|
+
async (options) => {
|
|
29710
|
+
const submission = readCastSubmission(options.inputFile);
|
|
29711
|
+
const body = {
|
|
29712
|
+
...submission,
|
|
29713
|
+
...castSeriesFields(
|
|
29714
|
+
options,
|
|
29715
|
+
submission.input.creationSettings?.videoStyle.id
|
|
29716
|
+
)
|
|
29717
|
+
};
|
|
29718
|
+
const client = getClient();
|
|
29719
|
+
writeJson(
|
|
29720
|
+
await castRequest(
|
|
29721
|
+
(signal) => client.cast.run({ body, fetchOptions: { signal } }),
|
|
29722
|
+
{
|
|
29723
|
+
label: "Cast submission",
|
|
29724
|
+
generationId: body.attemptId,
|
|
29725
|
+
suggestion: recovery(body.attemptId)
|
|
29726
|
+
}
|
|
29727
|
+
),
|
|
29728
|
+
getOutputOpts()
|
|
29729
|
+
);
|
|
29730
|
+
}
|
|
29731
|
+
);
|
|
28819
29732
|
for (const name of ["status", "result"]) {
|
|
28820
29733
|
cast.command(name).description(
|
|
28821
29734
|
"Read one saved Cast render; returns current progress or its exact output and subtitle warning"
|
|
@@ -29012,6 +29925,7 @@ Examples:
|
|
|
29012
29925
|
getOutputOpts()
|
|
29013
29926
|
);
|
|
29014
29927
|
});
|
|
29928
|
+
addCastSeriesSubcommands(cast, getOutputOpts);
|
|
29015
29929
|
addDittoSubcommands(
|
|
29016
29930
|
cast.command("replacement").description(
|
|
29017
29931
|
"Replace content in a supplied video with Ditto; returns review, progress, and one result"
|
|
@@ -33786,7 +34700,7 @@ function withDefaultHelp(args) {
|
|
|
33786
34700
|
}
|
|
33787
34701
|
function createProgram() {
|
|
33788
34702
|
const program2 = new Command();
|
|
33789
|
-
program2.name("mel").description("Mel \u2014 Melius agent CLI").version("0.
|
|
34703
|
+
program2.name("mel").description("Mel \u2014 Melius agent CLI").version("0.51.0").showSuggestionAfterError(true).option("--json", "Force JSON output (default)").option("--text", "Human-readable output").option(
|
|
33790
34704
|
"--fields <fields>",
|
|
33791
34705
|
"Select specific output fields (comma-separated)"
|
|
33792
34706
|
).option("--quiet", "Suppress output, exit code only").option("--verbose", "Log request/response metadata to stderr").addHelpText(
|