@melius-ai/cli 0.50.0 → 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-HQBTQ4N6.js → chunk-QW6BJWR4.js} +1153 -164
- 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",
|
|
@@ -13197,9 +13201,27 @@ var CastVideoStyleIdSchema = external_exports.enum([
|
|
|
13197
13201
|
"comment-reply",
|
|
13198
13202
|
"streamer-reaction",
|
|
13199
13203
|
"animated-3d",
|
|
13200
|
-
"street-interview"
|
|
13204
|
+
"street-interview",
|
|
13205
|
+
"product-film",
|
|
13206
|
+
"product-asmr",
|
|
13207
|
+
"product-3d",
|
|
13208
|
+
"product-stop-motion",
|
|
13209
|
+
"asmr",
|
|
13210
|
+
"claymation",
|
|
13211
|
+
"animated-2d"
|
|
13201
13212
|
]);
|
|
13202
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
|
+
}
|
|
13203
13225
|
var CastVideoStyleSchema = external_exports.object({
|
|
13204
13226
|
id: CastVideoStyleIdSchema,
|
|
13205
13227
|
version: external_exports.literal(1)
|
|
@@ -13215,6 +13237,9 @@ var CastCreationSettingsSchema = external_exports.object({
|
|
|
13215
13237
|
visuals: external_exports.enum(["auto", "on", "off"]).optional().describe(
|
|
13216
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."
|
|
13217
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
|
+
),
|
|
13218
13243
|
visualsBrief: external_exports.string().trim().min(1).max(1e3).optional().describe(
|
|
13219
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."
|
|
13220
13245
|
),
|
|
@@ -13222,7 +13247,10 @@ var CastCreationSettingsSchema = external_exports.object({
|
|
|
13222
13247
|
'Confirmed spoken spellings, e.g. [{"word":"Emmaus","pronunciation":"ee-may-us"}]. Applied to speech only; keep the original spelling in the script and visual directions.'
|
|
13223
13248
|
)
|
|
13224
13249
|
});
|
|
13225
|
-
var
|
|
13250
|
+
var CAST_MAX_LARGE_CAST_AVATARS = 8;
|
|
13251
|
+
function castTooManyAvatarsMessage(limit) {
|
|
13252
|
+
return `A video holds up to ${limit} avatars: avatar and at most ${limit - 1} in otherAvatars`;
|
|
13253
|
+
}
|
|
13226
13254
|
var CAST_MAX_ACTION_BEAT_SECONDS = 8;
|
|
13227
13255
|
var CastAuthoredSectionSchema = external_exports.object({
|
|
13228
13256
|
id: external_exports.string(),
|
|
@@ -13632,7 +13660,13 @@ var MAX_CAST_READ_BEATS = 20;
|
|
|
13632
13660
|
var MAX_CAST_TONE_TAGS_PER_BEAT = 2;
|
|
13633
13661
|
var MIN_CAST_DRAFT_SECONDS = 3;
|
|
13634
13662
|
var MAX_CAST_DRAFT_SECONDS = 600;
|
|
13635
|
-
var
|
|
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
|
+
});
|
|
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();
|
|
13636
13670
|
var MAX_CAST_SCRIPT_REFERENCES = 12;
|
|
13637
13671
|
var MAX_CAST_SCRIPT_REFERENCE_NAME_LENGTH = 200;
|
|
13638
13672
|
var CastScriptReferencesSchema = external_exports.array(
|
|
@@ -13730,14 +13764,15 @@ var CastScriptTreatmentSchema = external_exports.discriminatedUnion("operation",
|
|
|
13730
13764
|
* never told to fit is a script the member has to cut by hand before
|
|
13731
13765
|
* the press they were reaching for works.
|
|
13732
13766
|
*/
|
|
13733
|
-
seconds:
|
|
13734
|
-
min: external_exports.number().int().min(MIN_CAST_DRAFT_SECONDS).max(MAX_CAST_DRAFT_SECONDS),
|
|
13735
|
-
max: external_exports.number().int().min(MIN_CAST_DRAFT_SECONDS).max(MAX_CAST_DRAFT_SECONDS)
|
|
13736
|
-
}).refine((slot) => slot.min <= slot.max, {
|
|
13737
|
-
message: "A slot's floor cannot be above its ceiling"
|
|
13738
|
-
}).optional(),
|
|
13767
|
+
seconds: CastDraftSecondsSchema.optional(),
|
|
13739
13768
|
/** Who the draft is written for: every section said by one of them. */
|
|
13740
|
-
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()
|
|
13741
13776
|
})
|
|
13742
13777
|
]);
|
|
13743
13778
|
var EnhancePromptBodySchema = external_exports.object({
|
|
@@ -13794,8 +13829,7 @@ var PrepareCastScriptBodySchema = external_exports.object({
|
|
|
13794
13829
|
tone: external_exports.string().trim().min(1).max(MAX_CAST_TONE_LENGTH).optional(),
|
|
13795
13830
|
speakers: CastScriptSpeakersSchema,
|
|
13796
13831
|
references: CastScriptReferencesSchema,
|
|
13797
|
-
longVideo: external_exports.boolean()
|
|
13798
|
-
readPacing: external_exports.boolean()
|
|
13832
|
+
longVideo: external_exports.boolean()
|
|
13799
13833
|
});
|
|
13800
13834
|
var MAX_PREPARED_CAST_SCRIPT_SECTIONS = 100;
|
|
13801
13835
|
var PrepareCastScriptResponseSchema = external_exports.object({
|
|
@@ -14149,10 +14183,13 @@ var CastVideoInputSchema = external_exports.object({
|
|
|
14149
14183
|
avatar: CastVideoAvatarSchema,
|
|
14150
14184
|
voice: CastVideoVoiceSchema,
|
|
14151
14185
|
voiceName: external_exports.string().max(200).optional(),
|
|
14152
|
-
/**
|
|
14186
|
+
/**
|
|
14187
|
+
* Everyone else the video casts. Past `CAST_MAX_AVATARS - 1` only with
|
|
14188
|
+
* `cast-large-cast`; prepare and run refuse more without it.
|
|
14189
|
+
*/
|
|
14153
14190
|
otherAvatars: external_exports.array(CastVideoOtherAvatarSchema).min(1).max(
|
|
14154
|
-
|
|
14155
|
-
|
|
14191
|
+
CAST_MAX_LARGE_CAST_AVATARS - 1,
|
|
14192
|
+
castTooManyAvatarsMessage(CAST_MAX_LARGE_CAST_AVATARS)
|
|
14156
14193
|
).optional(),
|
|
14157
14194
|
tone: external_exports.string().trim().min(1).max(MAX_CAST_TONE_LENGTH).optional(),
|
|
14158
14195
|
engine: CastVideoEngineSchema.default("seedance"),
|
|
@@ -14163,18 +14200,23 @@ var CastVideoInputSchema = external_exports.object({
|
|
|
14163
14200
|
source: external_exports.literal("database")
|
|
14164
14201
|
}).optional(),
|
|
14165
14202
|
sections: external_exports.array(
|
|
14166
|
-
|
|
14167
|
-
|
|
14168
|
-
|
|
14169
|
-
inShot: true
|
|
14170
|
-
}).extend({
|
|
14203
|
+
// Who is in a shot is the script's: whoever speaks, is
|
|
14204
|
+
// answered or is named in an action or scene.
|
|
14205
|
+
CastAuthoredSectionSchema.omit({ id: true, inShot: true }).extend({
|
|
14171
14206
|
title: external_exports.string().max(200).optional(),
|
|
14172
14207
|
text: external_exports.string().max(5e3),
|
|
14173
14208
|
action: external_exports.string().max(2e3).optional(),
|
|
14174
14209
|
scene: external_exports.string().max(2e3).optional(),
|
|
14175
14210
|
onScreen: external_exports.string().trim().min(1).max(500).optional(),
|
|
14176
14211
|
/** The id of the avatar who says it; absent is `avatar`. */
|
|
14177
|
-
speakerId: external_exports.string().max(200).optional()
|
|
14212
|
+
speakerId: external_exports.string().max(200).optional(),
|
|
14213
|
+
/**
|
|
14214
|
+
* A line of the section above, in one shot with it: a
|
|
14215
|
+
* back-and-forth is a section and the lines that
|
|
14216
|
+
* continue it, each with its own speaker and action.
|
|
14217
|
+
* Refused without `cast-group-visuals`.
|
|
14218
|
+
*/
|
|
14219
|
+
continues: external_exports.boolean().optional()
|
|
14178
14220
|
}).strict().superRefine(refuseShotFieldsOffShots)
|
|
14179
14221
|
).min(1).max(30),
|
|
14180
14222
|
backgroundId: external_exports.string().uuid().optional(),
|
|
@@ -14213,6 +14255,8 @@ var CastVideoReviewSchema = external_exports.object({
|
|
|
14213
14255
|
template: external_exports.string(),
|
|
14214
14256
|
/** Auto, Off or Unavailable, for a member who can have added visuals; absent otherwise. */
|
|
14215
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(),
|
|
14216
14260
|
/** What preparation changed from the request, said where the member reviews it. */
|
|
14217
14261
|
notice: external_exports.string().optional(),
|
|
14218
14262
|
/** Everyone the video casts, `avatar` first, where it casts several. */
|
|
@@ -14255,7 +14299,15 @@ var RunCastVideoBodySchema = external_exports.object({
|
|
|
14255
14299
|
expectedEstimatedCredits: external_exports.number().finite().nonnegative().optional(),
|
|
14256
14300
|
input: CastVideoInputSchema,
|
|
14257
14301
|
/** Spend a free generation instead of credits; refused, never billed, when none covers the video. */
|
|
14258
|
-
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()
|
|
14259
14311
|
}).strict();
|
|
14260
14312
|
var CastPreparedVideoQuoteSchema = external_exports.object({
|
|
14261
14313
|
estimatedCredits: external_exports.number().finite().nonnegative()
|
|
@@ -14266,7 +14318,12 @@ var videoReference = external_exports.object({
|
|
|
14266
14318
|
bulkNodeRunId: external_exports.string().uuid(),
|
|
14267
14319
|
videoNodeId: external_exports.string().uuid(),
|
|
14268
14320
|
/** The free generation the video holds; absent once a release gave it back. */
|
|
14269
|
-
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()
|
|
14270
14327
|
});
|
|
14271
14328
|
var CastVideoResponseSchema = external_exports.discriminatedUnion("status", [
|
|
14272
14329
|
videoReference.extend({ status: external_exports.literal("submitting") }),
|
|
@@ -14317,7 +14374,7 @@ var CastVideoApprovalPreviewSchema = external_exports.object({
|
|
|
14317
14374
|
/** How `imageUrl` is drawn: a photo fills its frame, a sheet is shown whole. */
|
|
14318
14375
|
picture: external_exports.enum(["photo", "sheet"])
|
|
14319
14376
|
})
|
|
14320
|
-
).min(1).max(
|
|
14377
|
+
).min(1).max(CAST_MAX_LARGE_CAST_AVATARS).optional(),
|
|
14321
14378
|
voice: external_exports.string(),
|
|
14322
14379
|
tone: external_exports.string().optional(),
|
|
14323
14380
|
/** The saved background's name, or Auto. */
|
|
@@ -14334,7 +14391,7 @@ var CastVideoApprovalPreviewSchema = external_exports.object({
|
|
|
14334
14391
|
imageUrl: external_exports.string().nullable()
|
|
14335
14392
|
})
|
|
14336
14393
|
).max(CAST_VIDEO_MAX_PROPS).optional(),
|
|
14337
|
-
/** The model's name, such as Melius Cast
|
|
14394
|
+
/** The model's name, such as Melius Cast. */
|
|
14338
14395
|
model: external_exports.string(),
|
|
14339
14396
|
aspectRatio: OutputAspectRatioSchema,
|
|
14340
14397
|
resolution: OutputResolutionSchema.optional(),
|
|
@@ -16020,6 +16077,12 @@ var ModelVariantResponseSchema = external_exports.object({
|
|
|
16020
16077
|
minInputVideoDurationSeconds: external_exports.number().nullable().optional(),
|
|
16021
16078
|
/** Minimum input audio clip duration (seconds), or null if unconstrained. */
|
|
16022
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(),
|
|
16023
16086
|
/** Maximum prompt length in characters, or null if unconstrained. */
|
|
16024
16087
|
maxPromptLength: external_exports.number().nullable().optional(),
|
|
16025
16088
|
/** Minimum prompt length in characters, or null if unconstrained. */
|
|
@@ -16457,6 +16520,239 @@ var DittoResponseSchema = external_exports.object({
|
|
|
16457
16520
|
url: external_exports.string()
|
|
16458
16521
|
});
|
|
16459
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
|
+
|
|
16460
16756
|
// ../api-contract/src/cast/schema.ts
|
|
16461
16757
|
var CAST_TREATMENT_IDS = ["self-filmed", "produced", "vlog"];
|
|
16462
16758
|
var CAST_SCRIPT_ENTRY_METHODS = [
|
|
@@ -16569,7 +16865,7 @@ var CastGenerationAnalyticsSchema = external_exports.object({
|
|
|
16569
16865
|
});
|
|
16570
16866
|
var CastGenerationAnalyticsWriteSchema = CastGenerationAnalyticsSchema.omit({ agent: true }).extend({
|
|
16571
16867
|
entrySurface: external_exports.enum(["cast", "cast-mcp"]).optional().catch(void 0),
|
|
16572
|
-
avatarCount: external_exports.number().int().positive().max(
|
|
16868
|
+
avatarCount: external_exports.number().int().positive().max(CAST_MAX_LARGE_CAST_AVATARS).optional(),
|
|
16573
16869
|
partCount: external_exports.number().int().positive().max(STITCH_MAX_CLIPS).optional()
|
|
16574
16870
|
});
|
|
16575
16871
|
var CastGenerationOperationSchema = external_exports.enum(["script", "replacement"]);
|
|
@@ -16865,7 +17161,7 @@ var SharedCastGenerationSchema = external_exports.object({
|
|
|
16865
17161
|
SharedCastReplaceSelectionSchema
|
|
16866
17162
|
])
|
|
16867
17163
|
})
|
|
16868
|
-
).max(
|
|
17164
|
+
).max(CAST_MAX_LARGE_CAST_AVATARS).optional()
|
|
16869
17165
|
}).optional()
|
|
16870
17166
|
});
|
|
16871
17167
|
var SharedCastLinkPreviewVideoSchema = external_exports.object({ url: external_exports.string() });
|
|
@@ -16873,6 +17169,15 @@ var CreateCastGenerationBodySchema = external_exports.object({
|
|
|
16873
17169
|
/** Opt in to server-owned submission reporting; absent preserves old clients. */
|
|
16874
17170
|
reportSubmissionEvent: external_exports.boolean().optional().catch(void 0),
|
|
16875
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(),
|
|
16876
17181
|
/** The run this record belongs to — the join to credits and analytics. */
|
|
16877
17182
|
bulkNodeRunId: external_exports.string().uuid().optional(),
|
|
16878
17183
|
config: CastGenerationConfigSchema.extend({
|
|
@@ -16901,6 +17206,16 @@ var CastGenerationCreatorSchema = external_exports.object({
|
|
|
16901
17206
|
name: external_exports.string(),
|
|
16902
17207
|
avatarUrl: external_exports.string().nullable()
|
|
16903
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
|
+
});
|
|
16904
17219
|
var CastGenerationResponseSchema = external_exports.object({
|
|
16905
17220
|
id: external_exports.string().uuid(),
|
|
16906
17221
|
canvasId: external_exports.string().uuid(),
|
|
@@ -16992,7 +17307,12 @@ var CastGenerationResponseSchema = external_exports.object({
|
|
|
16992
17307
|
*/
|
|
16993
17308
|
addSubtitles: CastAddSubtitlesSchema.nullable().optional(),
|
|
16994
17309
|
/** Set on a take that is another with subtitles added. Null otherwise. */
|
|
16995
|
-
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()
|
|
16996
17316
|
});
|
|
16997
17317
|
var CreateCastGenerationResponseSchema = CastGenerationResponseSchema.extend({
|
|
16998
17318
|
/** Ownership acknowledgment, not a guarantee of delivery to PostHog. */
|
|
@@ -17019,10 +17339,116 @@ var SearchCastGenerationsBodySchema = createCursorPaginationRequestSchema({
|
|
|
17019
17339
|
* `includeReplacements`; a replacement is still listed only
|
|
17020
17340
|
* for its author.
|
|
17021
17341
|
*/
|
|
17022
|
-
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()
|
|
17023
17356
|
}).default({})
|
|
17024
17357
|
});
|
|
17025
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
|
+
});
|
|
17026
17452
|
|
|
17027
17453
|
// ../api-contract/src/templates/constants.ts
|
|
17028
17454
|
var TEMPLATE_TAG_MAX_LENGTH = 40;
|
|
@@ -18101,6 +18527,7 @@ var InAppExperience;
|
|
|
18101
18527
|
InAppExperience2["TemplateRequestBanner"] = "template_request_banner";
|
|
18102
18528
|
InAppExperience2["BuildTemplateIntro"] = "build_template_intro";
|
|
18103
18529
|
InAppExperience2["CastControlsGuide"] = "cast_controls_guide";
|
|
18530
|
+
InAppExperience2["CastMicrodramaGuide"] = "cast_microdrama_guide";
|
|
18104
18531
|
InAppExperience2["CastScriptGuide"] = "cast_script_guide";
|
|
18105
18532
|
InAppExperience2["CastIntro"] = "cast_intro";
|
|
18106
18533
|
InAppExperience2["CastActionsGuide"] = "cast_actions_guide";
|
|
@@ -18144,6 +18571,7 @@ var IN_APP_EXPERIENCE_REGISTRY = {
|
|
|
18144
18571
|
[InAppExperience.TemplateRequestBanner]: ON_OUTCOME,
|
|
18145
18572
|
[InAppExperience.BuildTemplateIntro]: ON_OUTCOME,
|
|
18146
18573
|
[InAppExperience.CastControlsGuide]: ON_OUTCOME,
|
|
18574
|
+
[InAppExperience.CastMicrodramaGuide]: ON_OUTCOME,
|
|
18147
18575
|
[InAppExperience.CastScriptGuide]: ON_OUTCOME,
|
|
18148
18576
|
[InAppExperience.CastIntro]: ON_OUTCOME,
|
|
18149
18577
|
[InAppExperience.CastActionsGuide]: ON_OUTCOME,
|
|
@@ -18791,13 +19219,99 @@ var ProjectMemoryResponseSchema = external_exports.object({
|
|
|
18791
19219
|
markdown: external_exports.string(),
|
|
18792
19220
|
/** 0 until the first save. */
|
|
18793
19221
|
revision: external_exports.number().int().nonnegative(),
|
|
18794
|
-
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()
|
|
18795
19228
|
});
|
|
18796
19229
|
var UpdateProjectMemoryBodySchema = external_exports.object({
|
|
18797
19230
|
markdown: external_exports.string().max(MAX_PROJECT_MEMORY_LENGTH).refine((text) => !text.includes("\0"), "Remove null characters"),
|
|
18798
19231
|
/** The revision the editor loaded; a different saved revision is a 409. */
|
|
18799
19232
|
revision: external_exports.number().int().nonnegative().max(MAX_SAVED_REVISION)
|
|
18800
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
|
+
});
|
|
18801
19315
|
|
|
18802
19316
|
// ../api-contract/src/template-port-summary.ts
|
|
18803
19317
|
var TemplatePortSummarySchema = external_exports.object({
|
|
@@ -19149,7 +19663,33 @@ var DittoVideoPersonSchema = external_exports.object({
|
|
|
19149
19663
|
height: external_exports.number().positive().max(1)
|
|
19150
19664
|
}).nullable().optional(),
|
|
19151
19665
|
/** When they are on screen: the times, in milliseconds from the start, of the frames that show them. */
|
|
19152
|
-
seenMs: external_exports.array(external_exports.number().nonnegative())
|
|
19666
|
+
seenMs: external_exports.array(external_exports.number().nonnegative()),
|
|
19667
|
+
/**
|
|
19668
|
+
* Where their face (or, when it does not show, their head) is in each of
|
|
19669
|
+
* those frames, in time order, as shares of the frame's width and height,
|
|
19670
|
+
* so a ring can follow them as the video plays. Absent for people found
|
|
19671
|
+
* before it was kept.
|
|
19672
|
+
*/
|
|
19673
|
+
track: external_exports.array(
|
|
19674
|
+
external_exports.object({
|
|
19675
|
+
ms: external_exports.number().nonnegative(),
|
|
19676
|
+
x: external_exports.number().min(0).max(1),
|
|
19677
|
+
y: external_exports.number().min(0).max(1),
|
|
19678
|
+
width: external_exports.number().positive().max(1),
|
|
19679
|
+
height: external_exports.number().positive().max(1)
|
|
19680
|
+
})
|
|
19681
|
+
).optional(),
|
|
19682
|
+
/** True for someone the member picked by clicking them in a frame; finding people had not listed them. */
|
|
19683
|
+
picked: external_exports.literal(true).optional(),
|
|
19684
|
+
/** On a team's copy of a template's video: 1-based position of the template replacement this person is. Absent for anyone the template keeps as filmed. */
|
|
19685
|
+
target: external_exports.number().int().positive().optional()
|
|
19686
|
+
});
|
|
19687
|
+
var PickDittoVideoPersonBodySchema = external_exports.object({
|
|
19688
|
+
/** When the frame is, in milliseconds from the start of the whole video. */
|
|
19689
|
+
timeMs: external_exports.number().finite().nonnegative(),
|
|
19690
|
+
/** Where in the frame, as shares of its width and height from the top left. */
|
|
19691
|
+
x: external_exports.number().min(0).max(1),
|
|
19692
|
+
y: external_exports.number().min(0).max(1)
|
|
19153
19693
|
});
|
|
19154
19694
|
var DittoVideoPeopleSchema = external_exports.object({
|
|
19155
19695
|
/** `finding` until they are found; `failed` when they could not be, and Put me in asks in words instead. */
|
|
@@ -21017,6 +21557,16 @@ var canvasContract = c5.router({
|
|
|
21017
21557
|
404: MessageResponseSchema
|
|
21018
21558
|
}
|
|
21019
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
|
+
},
|
|
21020
21570
|
getNode: {
|
|
21021
21571
|
method: "GET",
|
|
21022
21572
|
path: "/nodes/:nodeId",
|
|
@@ -22746,14 +23296,39 @@ var dittoContract = c7.router({
|
|
|
22746
23296
|
getVideoPeople: {
|
|
22747
23297
|
method: "GET",
|
|
22748
23298
|
path: "/ditto/videos/:assetId/people",
|
|
22749
|
-
summary: "The people found in a video the member imported, to choose who each avatar replaces. Starts finding them
|
|
23299
|
+
summary: "The people found in a video the member imported or uploaded, to choose who each avatar replaces. Starts finding them in an import nobody has looked at yet; an upload waits for findVideoPeople",
|
|
23300
|
+
pathParams: external_exports.object({ assetId: external_exports.string().uuid() }),
|
|
23301
|
+
responses: {
|
|
23302
|
+
200: DittoVideoPeopleSchema,
|
|
23303
|
+
403: MessageResponseSchema,
|
|
23304
|
+
404: MessageResponseSchema
|
|
23305
|
+
}
|
|
23306
|
+
},
|
|
23307
|
+
findVideoPeople: {
|
|
23308
|
+
method: "POST",
|
|
23309
|
+
path: "/ditto/videos/:assetId/people/find",
|
|
23310
|
+
summary: "Starts finding the people in a video the member uploaded or imported, when nobody has yet, and answers what is known so far",
|
|
22750
23311
|
pathParams: external_exports.object({ assetId: external_exports.string().uuid() }),
|
|
23312
|
+
body: external_exports.object({}),
|
|
22751
23313
|
responses: {
|
|
22752
23314
|
200: DittoVideoPeopleSchema,
|
|
22753
23315
|
403: MessageResponseSchema,
|
|
22754
23316
|
404: MessageResponseSchema
|
|
22755
23317
|
}
|
|
22756
23318
|
},
|
|
23319
|
+
pickVideoPerson: {
|
|
23320
|
+
method: "POST",
|
|
23321
|
+
path: "/ditto/videos/:assetId/people",
|
|
23322
|
+
summary: "Adds the person at a point the member clicked in a frame of their video, after the people already found, and answers them. 422 when nobody is there",
|
|
23323
|
+
pathParams: external_exports.object({ assetId: external_exports.string().uuid() }),
|
|
23324
|
+
body: PickDittoVideoPersonBodySchema,
|
|
23325
|
+
responses: {
|
|
23326
|
+
200: DittoVideoPersonSchema,
|
|
23327
|
+
403: MessageResponseSchema,
|
|
23328
|
+
404: MessageResponseSchema,
|
|
23329
|
+
422: MessageResponseSchema
|
|
23330
|
+
}
|
|
23331
|
+
},
|
|
22757
23332
|
deleteImport: {
|
|
22758
23333
|
method: "DELETE",
|
|
22759
23334
|
path: "/ditto/imports/:importId",
|
|
@@ -24322,55 +24897,166 @@ var projectContract = c14.router({
|
|
|
24322
24897
|
404: MessageResponseSchema,
|
|
24323
24898
|
409: MessageResponseSchema
|
|
24324
24899
|
}
|
|
24325
|
-
}
|
|
24326
|
-
});
|
|
24327
|
-
|
|
24328
|
-
// ../api-contract/src/team/routes.ts
|
|
24329
|
-
var c15 = initContract();
|
|
24330
|
-
var teamContract = c15.router({
|
|
24331
|
-
createTeam: {
|
|
24332
|
-
method: "POST",
|
|
24333
|
-
path: "/teams",
|
|
24334
|
-
body: external_exports.object({
|
|
24335
|
-
name: external_exports.string().min(1),
|
|
24336
|
-
// PostHog anonymous distinct_id captured client-side at signup.
|
|
24337
|
-
// Optional because PostHog may fail to load (ad blockers, slow
|
|
24338
|
-
// network) and because not every createTeam call is a signup
|
|
24339
|
-
// (existing users creating additional teams may omit it).
|
|
24340
|
-
distinctId: external_exports.string().optional()
|
|
24341
|
-
}),
|
|
24342
|
-
responses: { 201: TeamSchema }
|
|
24343
|
-
},
|
|
24344
|
-
listMyTeams: {
|
|
24345
|
-
method: "GET",
|
|
24346
|
-
path: "/teams",
|
|
24347
|
-
responses: { 200: external_exports.array(TeamMembershipSchema) }
|
|
24348
|
-
},
|
|
24349
|
-
acceptInvitation: {
|
|
24350
|
-
method: "POST",
|
|
24351
|
-
path: "/teams/invitations/accept",
|
|
24352
|
-
body: external_exports.object({ token: external_exports.string().min(1) }),
|
|
24353
|
-
responses: { 200: TeamMembershipSchema }
|
|
24354
24900
|
},
|
|
24355
|
-
|
|
24356
|
-
|
|
24357
|
-
|
|
24358
|
-
|
|
24359
|
-
|
|
24360
|
-
|
|
24361
|
-
|
|
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
|
+
}
|
|
24362
24911
|
},
|
|
24363
|
-
|
|
24912
|
+
// ── What Mel saves to project memory from chat ──────────────────
|
|
24913
|
+
getProjectMemoryChange: {
|
|
24364
24914
|
method: "GET",
|
|
24365
|
-
path: "/
|
|
24915
|
+
path: "/agent/approvals/:approvalId/memory-change",
|
|
24916
|
+
pathParams: external_exports.object({ approvalId: external_exports.string().uuid() }),
|
|
24366
24917
|
responses: {
|
|
24367
|
-
200:
|
|
24368
|
-
|
|
24918
|
+
200: ProjectMemoryChangeResponseSchema,
|
|
24919
|
+
404: MessageResponseSchema
|
|
24920
|
+
},
|
|
24921
|
+
summary: "The lines a project memory approval card asks to change, and what became of it"
|
|
24369
24922
|
},
|
|
24370
|
-
|
|
24923
|
+
editProjectMemoryChange: {
|
|
24371
24924
|
method: "POST",
|
|
24372
|
-
path: "/
|
|
24373
|
-
|
|
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"
|
|
25011
|
+
}
|
|
25012
|
+
});
|
|
25013
|
+
|
|
25014
|
+
// ../api-contract/src/team/routes.ts
|
|
25015
|
+
var c15 = initContract();
|
|
25016
|
+
var teamContract = c15.router({
|
|
25017
|
+
createTeam: {
|
|
25018
|
+
method: "POST",
|
|
25019
|
+
path: "/teams",
|
|
25020
|
+
body: external_exports.object({
|
|
25021
|
+
name: external_exports.string().min(1),
|
|
25022
|
+
// PostHog anonymous distinct_id captured client-side at signup.
|
|
25023
|
+
// Optional because PostHog may fail to load (ad blockers, slow
|
|
25024
|
+
// network) and because not every createTeam call is a signup
|
|
25025
|
+
// (existing users creating additional teams may omit it).
|
|
25026
|
+
distinctId: external_exports.string().optional()
|
|
25027
|
+
}),
|
|
25028
|
+
responses: { 201: TeamSchema }
|
|
25029
|
+
},
|
|
25030
|
+
listMyTeams: {
|
|
25031
|
+
method: "GET",
|
|
25032
|
+
path: "/teams",
|
|
25033
|
+
responses: { 200: external_exports.array(TeamMembershipSchema) }
|
|
25034
|
+
},
|
|
25035
|
+
acceptInvitation: {
|
|
25036
|
+
method: "POST",
|
|
25037
|
+
path: "/teams/invitations/accept",
|
|
25038
|
+
body: external_exports.object({ token: external_exports.string().min(1) }),
|
|
25039
|
+
responses: { 200: TeamMembershipSchema }
|
|
25040
|
+
},
|
|
25041
|
+
// Public: the token is the visitor's only credential. Unknown, revoked and
|
|
25042
|
+
// used tokens, and a paid team's shared link, all answer the same 404.
|
|
25043
|
+
previewInvitation: {
|
|
25044
|
+
method: "POST",
|
|
25045
|
+
path: "/teams/invitations/preview",
|
|
25046
|
+
body: external_exports.object({ token: external_exports.string().min(1).max(256) }),
|
|
25047
|
+
responses: { 200: TeamInvitationPreviewSchema }
|
|
25048
|
+
},
|
|
25049
|
+
getDomainJoinTarget: {
|
|
25050
|
+
method: "GET",
|
|
25051
|
+
path: "/teams/domain-join-target",
|
|
25052
|
+
responses: {
|
|
25053
|
+
200: external_exports.object({ target: DomainJoinTargetSchema.nullable() })
|
|
25054
|
+
}
|
|
25055
|
+
},
|
|
25056
|
+
requestDomainJoin: {
|
|
25057
|
+
method: "POST",
|
|
25058
|
+
path: "/teams/domain-join-requests",
|
|
25059
|
+
body: external_exports.object({ teamId: external_exports.string().uuid() }),
|
|
24374
25060
|
responses: {
|
|
24375
25061
|
// "joined" when the team auto-approves; "requested" when it awaits
|
|
24376
25062
|
// admin approval.
|
|
@@ -24378,6 +25064,12 @@ var teamContract = c15.router({
|
|
|
24378
25064
|
}
|
|
24379
25065
|
},
|
|
24380
25066
|
// --- Team-scoped (requires X-Team-Id header) ---
|
|
25067
|
+
getCurrentTeam: {
|
|
25068
|
+
method: "GET",
|
|
25069
|
+
path: "/teams/current",
|
|
25070
|
+
responses: { 200: TeamMembershipSchema },
|
|
25071
|
+
summary: "The caller's membership of the team this request acts for: the X-Team-Id team, or an API key's own team without one"
|
|
25072
|
+
},
|
|
24381
25073
|
updateTeam: {
|
|
24382
25074
|
method: "PATCH",
|
|
24383
25075
|
path: "/teams/current",
|
|
@@ -24800,36 +25492,6 @@ var CastVideoStyleReadSchema = external_exports.object({
|
|
|
24800
25492
|
videoStyle: CastVideoStyleIdSchema.exclude(["auto"]).optional()
|
|
24801
25493
|
});
|
|
24802
25494
|
|
|
24803
|
-
// ../api-contract/src/cast/choreography.ts
|
|
24804
|
-
var CAST_CHOREOGRAPHY_MAX_SECTIONS = 30;
|
|
24805
|
-
var SectionTextSchema = external_exports.string().max(4e3);
|
|
24806
|
-
var CastShotStepSchema = external_exports.object({
|
|
24807
|
-
action: external_exports.string().max(500).optional(),
|
|
24808
|
-
lines: external_exports.array(external_exports.string().max(4e3)).max(100)
|
|
24809
|
-
});
|
|
24810
|
-
var CastChoreographyBodySchema = external_exports.object({
|
|
24811
|
-
/**
|
|
24812
|
-
* Each spoken section, by id, in script order: its words and the
|
|
24813
|
-
* member's direction for what is done across them.
|
|
24814
|
-
*/
|
|
24815
|
-
sections: external_exports.array(
|
|
24816
|
-
external_exports.object({
|
|
24817
|
-
id: external_exports.string().max(100),
|
|
24818
|
-
text: SectionTextSchema,
|
|
24819
|
-
action: SectionTextSchema.optional()
|
|
24820
|
-
}).strict()
|
|
24821
|
-
).min(1).max(CAST_CHOREOGRAPHY_MAX_SECTIONS)
|
|
24822
|
-
}).strict();
|
|
24823
|
-
var CastChoreographySchema = external_exports.object({
|
|
24824
|
-
/**
|
|
24825
|
-
* Each directed section the read placed, by id, its lines verbatim. A
|
|
24826
|
-
* section left out keeps its one action, and an empty list is no read.
|
|
24827
|
-
*/
|
|
24828
|
-
sections: external_exports.array(
|
|
24829
|
-
external_exports.object({ id: external_exports.string(), steps: external_exports.array(CastShotStepSchema) })
|
|
24830
|
-
)
|
|
24831
|
-
});
|
|
24832
|
-
|
|
24833
25495
|
// ../api-contract/src/cast/prop-precheck.ts
|
|
24834
25496
|
var CastPropPrecheckCategorySchema = SeedancePrecheckCategorySchema.extract(["intimate_sexual"]);
|
|
24835
25497
|
var PrecheckCastPropsBodySchema = external_exports.object({
|
|
@@ -25057,17 +25719,6 @@ var castContract = c18.router({
|
|
|
25057
25719
|
},
|
|
25058
25720
|
summary: "Read which video style a Cast script reads as, for the Auto style"
|
|
25059
25721
|
},
|
|
25060
|
-
readCastChoreography: {
|
|
25061
|
-
method: "POST",
|
|
25062
|
-
path: "/cast/choreography",
|
|
25063
|
-
body: CastChoreographyBodySchema,
|
|
25064
|
-
responses: {
|
|
25065
|
-
200: CastChoreographySchema,
|
|
25066
|
-
400: MessageResponseSchema,
|
|
25067
|
-
403: MessageResponseSchema
|
|
25068
|
-
},
|
|
25069
|
-
summary: "Place each Cast section's actions before the lines they go with"
|
|
25070
|
-
},
|
|
25071
25722
|
precheckCastProps: {
|
|
25072
25723
|
method: "POST",
|
|
25073
25724
|
path: "/cast/props/precheck",
|
|
@@ -25225,6 +25876,76 @@ var castContract = c18.router({
|
|
|
25225
25876
|
400: MessageResponseSchema
|
|
25226
25877
|
}
|
|
25227
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
|
+
},
|
|
25228
25949
|
listCastGenerations: {
|
|
25229
25950
|
method: "GET",
|
|
25230
25951
|
path: "/cast/generations",
|
|
@@ -25298,6 +26019,14 @@ var publicContract = c19.router(
|
|
|
25298
26019
|
search: castTemplateContract.search,
|
|
25299
26020
|
get: castTemplateContract.get
|
|
25300
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
|
+
},
|
|
25301
26030
|
ditto: {
|
|
25302
26031
|
listModels: dittoContract.listReplacementModels,
|
|
25303
26032
|
listAvatars: dittoContract.listAvatars,
|
|
@@ -26348,7 +27077,7 @@ function isMajorUpgrade(current, latest) {
|
|
|
26348
27077
|
return l[0] > c20[0];
|
|
26349
27078
|
}
|
|
26350
27079
|
function shouldShowUpgradeNotice(ctx = {}) {
|
|
26351
|
-
const current = ctx.current ?? "0.
|
|
27080
|
+
const current = ctx.current ?? "0.51.0";
|
|
26352
27081
|
const latest = ctx.latest ?? serverLatestVersion;
|
|
26353
27082
|
const env = ctx.env ?? process.env;
|
|
26354
27083
|
const isTty = ctx.isTty ?? Boolean(process.stderr.isTTY);
|
|
@@ -26369,7 +27098,7 @@ Upgrade: npm install -g @melius-ai/cli@latest (or: brew update && brew upgrade
|
|
|
26369
27098
|
function printUpgradeNoticeIfNeeded(ctx = {}) {
|
|
26370
27099
|
try {
|
|
26371
27100
|
if (!shouldShowUpgradeNotice(ctx)) return;
|
|
26372
|
-
const current = ctx.current ?? "0.
|
|
27101
|
+
const current = ctx.current ?? "0.51.0";
|
|
26373
27102
|
const latest = ctx.latest ?? serverLatestVersion;
|
|
26374
27103
|
process.stderr.write(formatUpgradeNotice(current, latest));
|
|
26375
27104
|
} catch {
|
|
@@ -26476,7 +27205,7 @@ function createClient(config) {
|
|
|
26476
27205
|
"Bypass-Tunnel-Reminder": "true",
|
|
26477
27206
|
[CUSTOM_REQUEST_HEADERS.meliusClient]: buildMeliusClientHeader({
|
|
26478
27207
|
surface: "cli",
|
|
26479
|
-
version: "0.
|
|
27208
|
+
version: "0.51.0"
|
|
26480
27209
|
})
|
|
26481
27210
|
};
|
|
26482
27211
|
if (config.teamId) {
|
|
@@ -28002,10 +28731,11 @@ Input: { sourceAssetId, replacements: [{ referenceAssetId | avatar, targetKind,
|
|
|
28002
28731
|
Use 1-30 ordered replacement items, each with one reference image. All items share one attempt, one quote, and one output.
|
|
28003
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.
|
|
28004
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.
|
|
28005
28735
|
resolution: 480p | 720p | 1080p, subject to the selected model's supported values.
|
|
28006
28736
|
sourceRange: { startMs, endMs }; both endpoints are explicit milliseconds. The source is never automatically shortened.
|
|
28007
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.
|
|
28008
|
-
|
|
28738
|
+
Melius Ditto supports up to 30 replacement images. Items are never dropped or split into paid runs.
|
|
28009
28739
|
Legacy single-item input with top-level referenceAssetId, targetKind and targetDescription remains accepted; do not mix it with replacements.
|
|
28010
28740
|
Save attemptId, input and quote.id for mel ditto run. No credits are reserved by prepare.
|
|
28011
28741
|
Examples:
|
|
@@ -28253,6 +28983,36 @@ Examples:
|
|
|
28253
28983
|
});
|
|
28254
28984
|
}
|
|
28255
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
|
+
|
|
28256
29016
|
// ../utils/src/retry/backoff.ts
|
|
28257
29017
|
function fixedBackoff(delaysMs) {
|
|
28258
29018
|
return {
|
|
@@ -28482,35 +29242,222 @@ async function downloadCastFile(url, output2, generationId) {
|
|
|
28482
29242
|
}
|
|
28483
29243
|
}
|
|
28484
29244
|
|
|
28485
|
-
// src/commands/cast.ts
|
|
28486
|
-
|
|
28487
|
-
|
|
28488
|
-
|
|
28489
|
-
|
|
28490
|
-
|
|
28491
|
-
|
|
28492
|
-
"
|
|
28493
|
-
).option(
|
|
28494
|
-
"--include-count",
|
|
28495
|
-
"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"
|
|
28496
29253
|
);
|
|
28497
29254
|
}
|
|
28498
|
-
function
|
|
28499
|
-
|
|
28500
|
-
|
|
28501
|
-
|
|
28502
|
-
|
|
28503
|
-
|
|
28504
|
-
|
|
28505
|
-
|
|
28506
|
-
|
|
28507
|
-
|
|
28508
|
-
|
|
28509
|
-
|
|
28510
|
-
|
|
28511
|
-
|
|
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
|
+
}
|
|
28512
29457
|
);
|
|
28513
29458
|
}
|
|
29459
|
+
|
|
29460
|
+
// src/commands/cast.ts
|
|
28514
29461
|
function generationParams(id) {
|
|
28515
29462
|
return parseCastValue(
|
|
28516
29463
|
publicContract.cast.get.pathParams,
|
|
@@ -28518,6 +29465,30 @@ function generationParams(id) {
|
|
|
28518
29465
|
"Use the attemptId from mel cast prepare or generationId from mel cast history"
|
|
28519
29466
|
);
|
|
28520
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
|
+
}
|
|
28521
29492
|
function recovery(generationId) {
|
|
28522
29493
|
return `Run: mel cast wait --id ${generationId}. To retry submission, use mel cast run --input-file <prepared.json> with the same prepared file`;
|
|
28523
29494
|
}
|
|
@@ -28679,7 +29650,7 @@ Examples:
|
|
|
28679
29650
|
Returns: status (ready, invalid, estimate_unavailable), attemptId, input, review, estimatedCredits, scriptSeconds, aspectRatios.
|
|
28680
29651
|
Input: { avatar: { name } or { kind: custom|curated|element, id }, sections: [{ text, action?, title? }], voice?, backgroundId?, props?, tone?, engine?, aspectRatio?, resolution?, subtitles?, creationSettings?, scriptTemplate? }.
|
|
28681
29652
|
Use 1-30 sections (text up to 5000 characters, action up to 2000, title up to 200).
|
|
28682
|
-
Props: 1
|
|
29653
|
+
Props: 1-${CAST_VIDEO_MAX_PROPS} items shaped { assetId, name? }; get asset IDs from mel upload or mel asset search.
|
|
28683
29654
|
Template reference: scriptTemplate: { id: <templateId>, revision: <revision>, source: database }; discover with mel cast templates.
|
|
28684
29655
|
Omitted voice uses the avatar's saved voice. Explicit voice { kind: auto } generates speech.
|
|
28685
29656
|
Other voices: { kind: stock, voiceId } or { kind: custom, customVoiceId }. Use mel audio voice list to discover voices.
|
|
@@ -28716,6 +29687,12 @@ Examples:
|
|
|
28716
29687
|
).requiredOption(
|
|
28717
29688
|
"--input-file <path>",
|
|
28718
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)"
|
|
28719
29696
|
).addHelpText(
|
|
28720
29697
|
"after",
|
|
28721
29698
|
`
|
|
@@ -28723,24 +29700,35 @@ Returns: generationId, canvasId, bulkNodeRunId, videoNodeId, status, and exact o
|
|
|
28723
29700
|
Only ready preparations are accepted. The attemptId and input are reused unchanged on every retry.
|
|
28724
29701
|
Changed input under an accepted ID is a conflict. Prepare again only for a deliberately new render.
|
|
28725
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.
|
|
28726
29704
|
Examples:
|
|
28727
29705
|
$ mel cast run --input-file <prepared.json>
|
|
28728
|
-
$ mel cast run --input-file <prepared.json> --fields generationId,status
|
|
28729
|
-
|
|
28730
|
-
|
|
28731
|
-
|
|
28732
|
-
|
|
28733
|
-
|
|
28734
|
-
|
|
28735
|
-
|
|
28736
|
-
|
|
28737
|
-
|
|
28738
|
-
|
|
28739
|
-
|
|
28740
|
-
)
|
|
28741
|
-
|
|
28742
|
-
|
|
28743
|
-
|
|
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
|
+
);
|
|
28744
29732
|
for (const name of ["status", "result"]) {
|
|
28745
29733
|
cast.command(name).description(
|
|
28746
29734
|
"Read one saved Cast render; returns current progress or its exact output and subtitle warning"
|
|
@@ -28937,6 +29925,7 @@ Examples:
|
|
|
28937
29925
|
getOutputOpts()
|
|
28938
29926
|
);
|
|
28939
29927
|
});
|
|
29928
|
+
addCastSeriesSubcommands(cast, getOutputOpts);
|
|
28940
29929
|
addDittoSubcommands(
|
|
28941
29930
|
cast.command("replacement").description(
|
|
28942
29931
|
"Replace content in a supplied video with Ditto; returns review, progress, and one result"
|
|
@@ -33711,7 +34700,7 @@ function withDefaultHelp(args) {
|
|
|
33711
34700
|
}
|
|
33712
34701
|
function createProgram() {
|
|
33713
34702
|
const program2 = new Command();
|
|
33714
|
-
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(
|
|
33715
34704
|
"--fields <fields>",
|
|
33716
34705
|
"Select specific output fields (comma-separated)"
|
|
33717
34706
|
).option("--quiet", "Suppress output, exit code only").option("--verbose", "Log request/response metadata to stderr").addHelpText(
|