@melius-ai/cli 0.49.0 → 0.50.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/mel.js +1 -1
- package/dist/{chunk-HFHIKBTR.js → chunk-LZJD32CC.js} +116 -25
- package/dist/src/index.js +1 -1
- package/package.json +1 -1
package/dist/bin/mel.js
CHANGED
|
@@ -8118,6 +8118,12 @@ function parseCustomResolution(resolution) {
|
|
|
8118
8118
|
return { width, height };
|
|
8119
8119
|
}
|
|
8120
8120
|
|
|
8121
|
+
// ../canvas-domain/src/variant-selection.ts
|
|
8122
|
+
var DRAFT_FINAL_RESOLUTION = "1080p";
|
|
8123
|
+
var DRAFT_FINISH_RESOLUTIONS = [DRAFT_FINAL_RESOLUTION, "4k"];
|
|
8124
|
+
var DRAFT_LIFETIME_DAYS = 7;
|
|
8125
|
+
var DRAFT_LIFETIME_MS = DRAFT_LIFETIME_DAYS * 24 * 60 * 60 * 1e3;
|
|
8126
|
+
|
|
8121
8127
|
// ../canvas-domain/src/condensed-media-node.ts
|
|
8122
8128
|
var CONDENSED_MEDIA_NODE_TYPES = /* @__PURE__ */ new Set([
|
|
8123
8129
|
"image",
|
|
@@ -11592,6 +11598,8 @@ var VersionProducedBySchema = external_exports.object({
|
|
|
11592
11598
|
inputs: external_exports.array(RunInputSchema).nullable()
|
|
11593
11599
|
});
|
|
11594
11600
|
var NodeVersionResponseSchema = external_exports.object({
|
|
11601
|
+
/** Completion choices for this saved draft, computed from its original provider. */
|
|
11602
|
+
draftFinishResolutions: external_exports.array(external_exports.enum(DRAFT_FINISH_RESOLUTIONS)).optional(),
|
|
11595
11603
|
id: external_exports.string().uuid(),
|
|
11596
11604
|
title: external_exports.string(),
|
|
11597
11605
|
modelConfig: ModelConfigSchema.nullable(),
|
|
@@ -12180,10 +12188,12 @@ var RunNodeBodySchema = external_exports.object({
|
|
|
12180
12188
|
/** SDXL guidance scale. Only honored on the SDXL model. */
|
|
12181
12189
|
guidanceScale: SdxlGuidanceScaleSchema.optional(),
|
|
12182
12190
|
/**
|
|
12183
|
-
* Seedance draft version to
|
|
12191
|
+
* Seedance draft version to upscale. The run reuses the draft's
|
|
12184
12192
|
* prompt, inputs, duration, aspect ratio, seed and audio setting.
|
|
12185
12193
|
*/
|
|
12186
12194
|
draftVersionId: external_exports.string().uuid().optional(),
|
|
12195
|
+
/** Explicit completion resolution; omitted requests retain 1080p. */
|
|
12196
|
+
draftResolution: external_exports.enum(DRAFT_FINISH_RESOLUTIONS).optional(),
|
|
12187
12197
|
/** Spend a free generation instead of credits; refused, never billed, when none covers the run. */
|
|
12188
12198
|
useFreeGeneration: external_exports.boolean().optional()
|
|
12189
12199
|
});
|
|
@@ -13187,7 +13197,14 @@ var CastVideoStyleIdSchema = external_exports.enum([
|
|
|
13187
13197
|
"comment-reply",
|
|
13188
13198
|
"streamer-reaction",
|
|
13189
13199
|
"animated-3d",
|
|
13190
|
-
"street-interview"
|
|
13200
|
+
"street-interview",
|
|
13201
|
+
"product-film",
|
|
13202
|
+
"product-asmr",
|
|
13203
|
+
"product-3d",
|
|
13204
|
+
"product-stop-motion",
|
|
13205
|
+
"asmr",
|
|
13206
|
+
"claymation",
|
|
13207
|
+
"animated-2d"
|
|
13191
13208
|
]);
|
|
13192
13209
|
var CAST_VIDEO_STYLE_IDS = CastVideoStyleIdSchema.options;
|
|
13193
13210
|
var CastVideoStyleSchema = external_exports.object({
|
|
@@ -13212,7 +13229,10 @@ var CastCreationSettingsSchema = external_exports.object({
|
|
|
13212
13229
|
'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.'
|
|
13213
13230
|
)
|
|
13214
13231
|
});
|
|
13215
|
-
var
|
|
13232
|
+
var CAST_MAX_LARGE_CAST_AVATARS = 8;
|
|
13233
|
+
function castTooManyAvatarsMessage(limit) {
|
|
13234
|
+
return `A video holds up to ${limit} avatars: avatar and at most ${limit - 1} in otherAvatars`;
|
|
13235
|
+
}
|
|
13216
13236
|
var CAST_MAX_ACTION_BEAT_SECONDS = 8;
|
|
13217
13237
|
var CastAuthoredSectionSchema = external_exports.object({
|
|
13218
13238
|
id: external_exports.string(),
|
|
@@ -13622,7 +13642,7 @@ var MAX_CAST_READ_BEATS = 20;
|
|
|
13622
13642
|
var MAX_CAST_TONE_TAGS_PER_BEAT = 2;
|
|
13623
13643
|
var MIN_CAST_DRAFT_SECONDS = 3;
|
|
13624
13644
|
var MAX_CAST_DRAFT_SECONDS = 600;
|
|
13625
|
-
var CastScriptSpeakersSchema = external_exports.array(external_exports.string().trim().min(1).max(MAX_CUSTOM_AVATAR_NAME_LENGTH)).max(
|
|
13645
|
+
var CastScriptSpeakersSchema = external_exports.array(external_exports.string().trim().min(1).max(MAX_CUSTOM_AVATAR_NAME_LENGTH)).max(CAST_MAX_LARGE_CAST_AVATARS).optional();
|
|
13626
13646
|
var MAX_CAST_SCRIPT_REFERENCES = 12;
|
|
13627
13647
|
var MAX_CAST_SCRIPT_REFERENCE_NAME_LENGTH = 200;
|
|
13628
13648
|
var CastScriptReferencesSchema = external_exports.array(
|
|
@@ -14139,10 +14159,13 @@ var CastVideoInputSchema = external_exports.object({
|
|
|
14139
14159
|
avatar: CastVideoAvatarSchema,
|
|
14140
14160
|
voice: CastVideoVoiceSchema,
|
|
14141
14161
|
voiceName: external_exports.string().max(200).optional(),
|
|
14142
|
-
/**
|
|
14162
|
+
/**
|
|
14163
|
+
* Everyone else the video casts. Past `CAST_MAX_AVATARS - 1` only with
|
|
14164
|
+
* `cast-large-cast`; prepare and run refuse more without it.
|
|
14165
|
+
*/
|
|
14143
14166
|
otherAvatars: external_exports.array(CastVideoOtherAvatarSchema).min(1).max(
|
|
14144
|
-
|
|
14145
|
-
|
|
14167
|
+
CAST_MAX_LARGE_CAST_AVATARS - 1,
|
|
14168
|
+
castTooManyAvatarsMessage(CAST_MAX_LARGE_CAST_AVATARS)
|
|
14146
14169
|
).optional(),
|
|
14147
14170
|
tone: external_exports.string().trim().min(1).max(MAX_CAST_TONE_LENGTH).optional(),
|
|
14148
14171
|
engine: CastVideoEngineSchema.default("seedance"),
|
|
@@ -14153,18 +14176,23 @@ var CastVideoInputSchema = external_exports.object({
|
|
|
14153
14176
|
source: external_exports.literal("database")
|
|
14154
14177
|
}).optional(),
|
|
14155
14178
|
sections: external_exports.array(
|
|
14156
|
-
|
|
14157
|
-
|
|
14158
|
-
|
|
14159
|
-
inShot: true
|
|
14160
|
-
}).extend({
|
|
14179
|
+
// Who is in a shot is the script's: whoever speaks, is
|
|
14180
|
+
// answered or is named in an action or scene.
|
|
14181
|
+
CastAuthoredSectionSchema.omit({ id: true, inShot: true }).extend({
|
|
14161
14182
|
title: external_exports.string().max(200).optional(),
|
|
14162
14183
|
text: external_exports.string().max(5e3),
|
|
14163
14184
|
action: external_exports.string().max(2e3).optional(),
|
|
14164
14185
|
scene: external_exports.string().max(2e3).optional(),
|
|
14165
14186
|
onScreen: external_exports.string().trim().min(1).max(500).optional(),
|
|
14166
14187
|
/** The id of the avatar who says it; absent is `avatar`. */
|
|
14167
|
-
speakerId: external_exports.string().max(200).optional()
|
|
14188
|
+
speakerId: external_exports.string().max(200).optional(),
|
|
14189
|
+
/**
|
|
14190
|
+
* A line of the section above, in one shot with it: a
|
|
14191
|
+
* back-and-forth is a section and the lines that
|
|
14192
|
+
* continue it, each with its own speaker and action.
|
|
14193
|
+
* Refused without `cast-group-visuals`.
|
|
14194
|
+
*/
|
|
14195
|
+
continues: external_exports.boolean().optional()
|
|
14168
14196
|
}).strict().superRefine(refuseShotFieldsOffShots)
|
|
14169
14197
|
).min(1).max(30),
|
|
14170
14198
|
backgroundId: external_exports.string().uuid().optional(),
|
|
@@ -14307,7 +14335,7 @@ var CastVideoApprovalPreviewSchema = external_exports.object({
|
|
|
14307
14335
|
/** How `imageUrl` is drawn: a photo fills its frame, a sheet is shown whole. */
|
|
14308
14336
|
picture: external_exports.enum(["photo", "sheet"])
|
|
14309
14337
|
})
|
|
14310
|
-
).min(1).max(
|
|
14338
|
+
).min(1).max(CAST_MAX_LARGE_CAST_AVATARS).optional(),
|
|
14311
14339
|
voice: external_exports.string(),
|
|
14312
14340
|
tone: external_exports.string().optional(),
|
|
14313
14341
|
/** The saved background's name, or Auto. */
|
|
@@ -16559,7 +16587,7 @@ var CastGenerationAnalyticsSchema = external_exports.object({
|
|
|
16559
16587
|
});
|
|
16560
16588
|
var CastGenerationAnalyticsWriteSchema = CastGenerationAnalyticsSchema.omit({ agent: true }).extend({
|
|
16561
16589
|
entrySurface: external_exports.enum(["cast", "cast-mcp"]).optional().catch(void 0),
|
|
16562
|
-
avatarCount: external_exports.number().int().positive().max(
|
|
16590
|
+
avatarCount: external_exports.number().int().positive().max(CAST_MAX_LARGE_CAST_AVATARS).optional(),
|
|
16563
16591
|
partCount: external_exports.number().int().positive().max(STITCH_MAX_CLIPS).optional()
|
|
16564
16592
|
});
|
|
16565
16593
|
var CastGenerationOperationSchema = external_exports.enum(["script", "replacement"]);
|
|
@@ -16855,7 +16883,7 @@ var SharedCastGenerationSchema = external_exports.object({
|
|
|
16855
16883
|
SharedCastReplaceSelectionSchema
|
|
16856
16884
|
])
|
|
16857
16885
|
})
|
|
16858
|
-
).max(
|
|
16886
|
+
).max(CAST_MAX_LARGE_CAST_AVATARS).optional()
|
|
16859
16887
|
}).optional()
|
|
16860
16888
|
});
|
|
16861
16889
|
var SharedCastLinkPreviewVideoSchema = external_exports.object({ url: external_exports.string() });
|
|
@@ -19139,7 +19167,33 @@ var DittoVideoPersonSchema = external_exports.object({
|
|
|
19139
19167
|
height: external_exports.number().positive().max(1)
|
|
19140
19168
|
}).nullable().optional(),
|
|
19141
19169
|
/** When they are on screen: the times, in milliseconds from the start, of the frames that show them. */
|
|
19142
|
-
seenMs: external_exports.array(external_exports.number().nonnegative())
|
|
19170
|
+
seenMs: external_exports.array(external_exports.number().nonnegative()),
|
|
19171
|
+
/**
|
|
19172
|
+
* Where their face (or, when it does not show, their head) is in each of
|
|
19173
|
+
* those frames, in time order, as shares of the frame's width and height,
|
|
19174
|
+
* so a ring can follow them as the video plays. Absent for people found
|
|
19175
|
+
* before it was kept.
|
|
19176
|
+
*/
|
|
19177
|
+
track: external_exports.array(
|
|
19178
|
+
external_exports.object({
|
|
19179
|
+
ms: external_exports.number().nonnegative(),
|
|
19180
|
+
x: external_exports.number().min(0).max(1),
|
|
19181
|
+
y: external_exports.number().min(0).max(1),
|
|
19182
|
+
width: external_exports.number().positive().max(1),
|
|
19183
|
+
height: external_exports.number().positive().max(1)
|
|
19184
|
+
})
|
|
19185
|
+
).optional(),
|
|
19186
|
+
/** True for someone the member picked by clicking them in a frame; finding people had not listed them. */
|
|
19187
|
+
picked: external_exports.literal(true).optional(),
|
|
19188
|
+
/** 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. */
|
|
19189
|
+
target: external_exports.number().int().positive().optional()
|
|
19190
|
+
});
|
|
19191
|
+
var PickDittoVideoPersonBodySchema = external_exports.object({
|
|
19192
|
+
/** When the frame is, in milliseconds from the start of the whole video. */
|
|
19193
|
+
timeMs: external_exports.number().finite().nonnegative(),
|
|
19194
|
+
/** Where in the frame, as shares of its width and height from the top left. */
|
|
19195
|
+
x: external_exports.number().min(0).max(1),
|
|
19196
|
+
y: external_exports.number().min(0).max(1)
|
|
19143
19197
|
});
|
|
19144
19198
|
var DittoVideoPeopleSchema = external_exports.object({
|
|
19145
19199
|
/** `finding` until they are found; `failed` when they could not be, and Put me in asks in words instead. */
|
|
@@ -22736,14 +22790,39 @@ var dittoContract = c7.router({
|
|
|
22736
22790
|
getVideoPeople: {
|
|
22737
22791
|
method: "GET",
|
|
22738
22792
|
path: "/ditto/videos/:assetId/people",
|
|
22739
|
-
summary: "The people found in a video the member imported, to choose who each avatar replaces. Starts finding them
|
|
22793
|
+
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",
|
|
22794
|
+
pathParams: external_exports.object({ assetId: external_exports.string().uuid() }),
|
|
22795
|
+
responses: {
|
|
22796
|
+
200: DittoVideoPeopleSchema,
|
|
22797
|
+
403: MessageResponseSchema,
|
|
22798
|
+
404: MessageResponseSchema
|
|
22799
|
+
}
|
|
22800
|
+
},
|
|
22801
|
+
findVideoPeople: {
|
|
22802
|
+
method: "POST",
|
|
22803
|
+
path: "/ditto/videos/:assetId/people/find",
|
|
22804
|
+
summary: "Starts finding the people in a video the member uploaded or imported, when nobody has yet, and answers what is known so far",
|
|
22740
22805
|
pathParams: external_exports.object({ assetId: external_exports.string().uuid() }),
|
|
22806
|
+
body: external_exports.object({}),
|
|
22741
22807
|
responses: {
|
|
22742
22808
|
200: DittoVideoPeopleSchema,
|
|
22743
22809
|
403: MessageResponseSchema,
|
|
22744
22810
|
404: MessageResponseSchema
|
|
22745
22811
|
}
|
|
22746
22812
|
},
|
|
22813
|
+
pickVideoPerson: {
|
|
22814
|
+
method: "POST",
|
|
22815
|
+
path: "/ditto/videos/:assetId/people",
|
|
22816
|
+
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",
|
|
22817
|
+
pathParams: external_exports.object({ assetId: external_exports.string().uuid() }),
|
|
22818
|
+
body: PickDittoVideoPersonBodySchema,
|
|
22819
|
+
responses: {
|
|
22820
|
+
200: DittoVideoPersonSchema,
|
|
22821
|
+
403: MessageResponseSchema,
|
|
22822
|
+
404: MessageResponseSchema,
|
|
22823
|
+
422: MessageResponseSchema
|
|
22824
|
+
}
|
|
22825
|
+
},
|
|
22747
22826
|
deleteImport: {
|
|
22748
22827
|
method: "DELETE",
|
|
22749
22828
|
path: "/ditto/imports/:importId",
|
|
@@ -24368,6 +24447,12 @@ var teamContract = c15.router({
|
|
|
24368
24447
|
}
|
|
24369
24448
|
},
|
|
24370
24449
|
// --- Team-scoped (requires X-Team-Id header) ---
|
|
24450
|
+
getCurrentTeam: {
|
|
24451
|
+
method: "GET",
|
|
24452
|
+
path: "/teams/current",
|
|
24453
|
+
responses: { 200: TeamMembershipSchema },
|
|
24454
|
+
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"
|
|
24455
|
+
},
|
|
24371
24456
|
updateTeam: {
|
|
24372
24457
|
method: "PATCH",
|
|
24373
24458
|
path: "/teams/current",
|
|
@@ -26338,7 +26423,7 @@ function isMajorUpgrade(current, latest) {
|
|
|
26338
26423
|
return l[0] > c20[0];
|
|
26339
26424
|
}
|
|
26340
26425
|
function shouldShowUpgradeNotice(ctx = {}) {
|
|
26341
|
-
const current = ctx.current ?? "0.
|
|
26426
|
+
const current = ctx.current ?? "0.50.1";
|
|
26342
26427
|
const latest = ctx.latest ?? serverLatestVersion;
|
|
26343
26428
|
const env = ctx.env ?? process.env;
|
|
26344
26429
|
const isTty = ctx.isTty ?? Boolean(process.stderr.isTTY);
|
|
@@ -26359,7 +26444,7 @@ Upgrade: npm install -g @melius-ai/cli@latest (or: brew update && brew upgrade
|
|
|
26359
26444
|
function printUpgradeNoticeIfNeeded(ctx = {}) {
|
|
26360
26445
|
try {
|
|
26361
26446
|
if (!shouldShowUpgradeNotice(ctx)) return;
|
|
26362
|
-
const current = ctx.current ?? "0.
|
|
26447
|
+
const current = ctx.current ?? "0.50.1";
|
|
26363
26448
|
const latest = ctx.latest ?? serverLatestVersion;
|
|
26364
26449
|
process.stderr.write(formatUpgradeNotice(current, latest));
|
|
26365
26450
|
} catch {
|
|
@@ -26466,7 +26551,7 @@ function createClient(config) {
|
|
|
26466
26551
|
"Bypass-Tunnel-Reminder": "true",
|
|
26467
26552
|
[CUSTOM_REQUEST_HEADERS.meliusClient]: buildMeliusClientHeader({
|
|
26468
26553
|
surface: "cli",
|
|
26469
|
-
version: "0.
|
|
26554
|
+
version: "0.50.1"
|
|
26470
26555
|
})
|
|
26471
26556
|
};
|
|
26472
26557
|
if (config.teamId) {
|
|
@@ -28669,7 +28754,7 @@ Examples:
|
|
|
28669
28754
|
Returns: status (ready, invalid, estimate_unavailable), attemptId, input, review, estimatedCredits, scriptSeconds, aspectRatios.
|
|
28670
28755
|
Input: { avatar: { name } or { kind: custom|curated|element, id }, sections: [{ text, action?, title? }], voice?, backgroundId?, props?, tone?, engine?, aspectRatio?, resolution?, subtitles?, creationSettings?, scriptTemplate? }.
|
|
28671
28756
|
Use 1-30 sections (text up to 5000 characters, action up to 2000, title up to 200).
|
|
28672
|
-
Props: 1
|
|
28757
|
+
Props: 1-${CAST_VIDEO_MAX_PROPS} items shaped { assetId, name? }; get asset IDs from mel upload or mel asset search.
|
|
28673
28758
|
Template reference: scriptTemplate: { id: <templateId>, revision: <revision>, source: database }; discover with mel cast templates.
|
|
28674
28759
|
Omitted voice uses the avatar's saved voice. Explicit voice { kind: auto } generates speech.
|
|
28675
28760
|
Other voices: { kind: stock, voiceId } or { kind: custom, customVoiceId }. Use mel audio voice list to discover voices.
|
|
@@ -31577,7 +31662,7 @@ function registerRunCommands(program2, getOutputOpts) {
|
|
|
31577
31662
|
"ElevenLabs voice id for audio nodes in text-to-speech or audio-to-audio mode. Required for those modes unless persisted on the node"
|
|
31578
31663
|
).option(
|
|
31579
31664
|
"--draft-version-id <versionId>",
|
|
31580
|
-
'Upscale a Seedance draft to 1080p: a finished draft version on this node (modelConfig.tier "draft" in mel canvas content --include-all-versions). Renders that draft again with its own
|
|
31665
|
+
'Upscale a Seedance draft (defaults to 1080p): a finished draft version on this node (modelConfig.tier "draft" in mel canvas content --include-all-versions). Renders that draft again with its own settings as a new version. Use --draft-resolution to choose a resolution advertised by draftFinishResolutions'
|
|
31581
31666
|
).addOption(useFreeGenerationOption()).addHelpText(
|
|
31582
31667
|
"after",
|
|
31583
31668
|
`
|
|
@@ -31605,6 +31690,11 @@ Examples:
|
|
|
31605
31690
|
$ mel run start <nodeId> --canvas-id <canvasId> --draft-version-id <draftVersionId>
|
|
31606
31691
|
$ mel run start <audioNodeId> --canvas-id <canvasId> --voice-id <voiceId>
|
|
31607
31692
|
$ mel run start <audioNodeId> --canvas-id <canvasId> --duration 10`
|
|
31693
|
+
).addOption(
|
|
31694
|
+
new Option(
|
|
31695
|
+
"--draft-resolution <resolution>",
|
|
31696
|
+
"Finish the saved draft at this resolution"
|
|
31697
|
+
).choices([...DRAFT_FINISH_RESOLUTIONS])
|
|
31608
31698
|
).action(
|
|
31609
31699
|
async (nodeId, opts) => {
|
|
31610
31700
|
const client = getClient();
|
|
@@ -31660,7 +31750,8 @@ Examples:
|
|
|
31660
31750
|
postProcess: opts.postProcess
|
|
31661
31751
|
},
|
|
31662
31752
|
...opts.draftVersionId !== void 0 && {
|
|
31663
|
-
draftVersionId: opts.draftVersionId
|
|
31753
|
+
draftVersionId: opts.draftVersionId,
|
|
31754
|
+
draftResolution: opts.draftResolution
|
|
31664
31755
|
},
|
|
31665
31756
|
...opts.useFreeGeneration && {
|
|
31666
31757
|
useFreeGeneration: true
|
|
@@ -33695,7 +33786,7 @@ function withDefaultHelp(args) {
|
|
|
33695
33786
|
}
|
|
33696
33787
|
function createProgram() {
|
|
33697
33788
|
const program2 = new Command();
|
|
33698
|
-
program2.name("mel").description("Mel \u2014 Melius agent CLI").version("0.
|
|
33789
|
+
program2.name("mel").description("Mel \u2014 Melius agent CLI").version("0.50.1").showSuggestionAfterError(true).option("--json", "Force JSON output (default)").option("--text", "Human-readable output").option(
|
|
33699
33790
|
"--fields <fields>",
|
|
33700
33791
|
"Select specific output fields (comma-separated)"
|
|
33701
33792
|
).option("--quiet", "Suppress output, exit code only").option("--verbose", "Log request/response metadata to stderr").addHelpText(
|
package/dist/src/index.js
CHANGED