@melius-ai/cli 0.48.0 → 0.49.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/dist/bin/mel.js
CHANGED
|
@@ -7490,7 +7490,7 @@ function inferDirectFileNodeMediaTypeFromContentType(contentType) {
|
|
|
7490
7490
|
return null;
|
|
7491
7491
|
}
|
|
7492
7492
|
var SERVER_PLACED_NODE_REFUSALS = {
|
|
7493
|
-
"img-angle": "Angle
|
|
7493
|
+
"img-angle": "A Camera Angle node is made from a source image, not created directly",
|
|
7494
7494
|
element: "An element node is placed from the element library, not created directly",
|
|
7495
7495
|
linked_output: "A linked output node is placed by the feature whose output it shows, not created directly"
|
|
7496
7496
|
};
|
|
@@ -10539,6 +10539,8 @@ var UPLOAD_PURPOSES = [
|
|
|
10539
10539
|
"brand-kit-guidelines"
|
|
10540
10540
|
];
|
|
10541
10541
|
var UPLOAD_PROXY_VIDEO_PURPOSES = [
|
|
10542
|
+
"ditto-source",
|
|
10543
|
+
// Upload commands issued before the Ditto rename still send this.
|
|
10542
10544
|
"cast-replacement-source",
|
|
10543
10545
|
"canvas-video"
|
|
10544
10546
|
];
|
|
@@ -11006,14 +11008,29 @@ var IMAGE_ANGLE_ROTATION_MAX_DEG = 180;
|
|
|
11006
11008
|
var IMAGE_ANGLE_TILT_MIN_DEG = -30;
|
|
11007
11009
|
var IMAGE_ANGLE_TILT_MAX_DEG = 90;
|
|
11008
11010
|
var IMAGE_ANGLE_MAX_BATCH_SIZE = 5;
|
|
11011
|
+
var IMAGE_ANGLE_ZOOMS = ["wide", "medium", "close"];
|
|
11012
|
+
var ImageAngleZoomSchema = external_exports.enum(IMAGE_ANGLE_ZOOMS);
|
|
11013
|
+
var DEFAULT_IMAGE_ANGLE_ZOOM = "medium";
|
|
11009
11014
|
var imageAngleFields = {
|
|
11010
11015
|
rotationDeg: external_exports.number().finite().int().min(IMAGE_ANGLE_ROTATION_MIN_DEG).max(IMAGE_ANGLE_ROTATION_MAX_DEG),
|
|
11011
|
-
tiltDeg: external_exports.number().finite().int().min(IMAGE_ANGLE_TILT_MIN_DEG).max(IMAGE_ANGLE_TILT_MAX_DEG)
|
|
11016
|
+
tiltDeg: external_exports.number().finite().int().min(IMAGE_ANGLE_TILT_MIN_DEG).max(IMAGE_ANGLE_TILT_MAX_DEG),
|
|
11017
|
+
zoom: ImageAngleZoomSchema.optional().describe(
|
|
11018
|
+
"Camera distance: wide is farther away, medium (the default) is normal, close is nearer"
|
|
11019
|
+
)
|
|
11012
11020
|
};
|
|
11021
|
+
var StoredImageAngleSchema = external_exports.object({
|
|
11022
|
+
rotationDeg: imageAngleFields.rotationDeg,
|
|
11023
|
+
tiltDeg: imageAngleFields.tiltDeg,
|
|
11024
|
+
zoom: ImageAngleZoomSchema.exclude([
|
|
11025
|
+
DEFAULT_IMAGE_ANGLE_ZOOM
|
|
11026
|
+
]).optional()
|
|
11027
|
+
}).strict();
|
|
11013
11028
|
function canonicalImageAngle(angle) {
|
|
11029
|
+
const { zoom } = angle;
|
|
11014
11030
|
return {
|
|
11015
11031
|
rotationDeg: angle.rotationDeg === IMAGE_ANGLE_ROTATION_MIN_DEG ? IMAGE_ANGLE_ROTATION_MAX_DEG : angle.rotationDeg === 0 ? 0 : angle.rotationDeg,
|
|
11016
|
-
tiltDeg: angle.tiltDeg === 0 ? 0 : angle.tiltDeg
|
|
11032
|
+
tiltDeg: angle.tiltDeg === 0 ? 0 : angle.tiltDeg,
|
|
11033
|
+
...zoom && zoom !== DEFAULT_IMAGE_ANGLE_ZOOM && { zoom }
|
|
11017
11034
|
};
|
|
11018
11035
|
}
|
|
11019
11036
|
var ImageAngleInputSchema = external_exports.object(imageAngleFields).strict().transform(canonicalImageAngle);
|
|
@@ -11036,7 +11053,7 @@ var CreateImageAngleBodySchema = external_exports.object({
|
|
|
11036
11053
|
angles: external_exports.array(ImageAngleInputSchema).min(1).max(IMAGE_ANGLE_MAX_BATCH_SIZE).superRefine((angles, context2) => {
|
|
11037
11054
|
const seen = /* @__PURE__ */ new Set();
|
|
11038
11055
|
for (const [index, angle] of angles.entries()) {
|
|
11039
|
-
const key2 = `${angle.rotationDeg}:${angle.tiltDeg}`;
|
|
11056
|
+
const key2 = `${angle.rotationDeg}:${angle.tiltDeg}:${angle.zoom ?? DEFAULT_IMAGE_ANGLE_ZOOM}`;
|
|
11040
11057
|
if (seen.has(key2)) {
|
|
11041
11058
|
context2.addIssue({
|
|
11042
11059
|
code: external_exports.ZodIssueCode.custom,
|
|
@@ -11220,7 +11237,7 @@ var ModelConfigSchema = external_exports.object({
|
|
|
11220
11237
|
// Drop unreadable collaborative settings so one node cannot fail the response.
|
|
11221
11238
|
imageAngle: ImageAngleInputSchema.pipe(
|
|
11222
11239
|
// OpenAPI needs the output shape of the canonicalizing transform.
|
|
11223
|
-
|
|
11240
|
+
StoredImageAngleSchema
|
|
11224
11241
|
).optional().catch(void 0),
|
|
11225
11242
|
videoEditMode: external_exports.literal("replacement").optional(),
|
|
11226
11243
|
model: external_exports.string(),
|
|
@@ -13188,6 +13205,9 @@ var CastCreationSettingsSchema = external_exports.object({
|
|
|
13188
13205
|
visuals: external_exports.enum(["auto", "on", "off"]).optional().describe(
|
|
13189
13206
|
"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."
|
|
13190
13207
|
),
|
|
13208
|
+
visualsBrief: external_exports.string().trim().min(1).max(1e3).optional().describe(
|
|
13209
|
+
"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."
|
|
13210
|
+
),
|
|
13191
13211
|
pronunciations: external_exports.array(CastPronunciationSchema).max(MAX_CAST_PRONUNCIATIONS).optional().describe(
|
|
13192
13212
|
'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.'
|
|
13193
13213
|
)
|
|
@@ -13237,7 +13257,13 @@ var CastAuthoredSectionSchema = external_exports.object({
|
|
|
13237
13257
|
* ("Close-up in front of a whiteboard"), held on its first line. It can
|
|
13238
13258
|
* name avatars and props the way an action does.
|
|
13239
13259
|
*/
|
|
13240
|
-
scene: external_exports.string().optional()
|
|
13260
|
+
scene: external_exports.string().optional(),
|
|
13261
|
+
/**
|
|
13262
|
+
* What the member wants added on screen while this line is spoken, in
|
|
13263
|
+
* their words ("STOP slams in word by word"). Never filmed: the visuals
|
|
13264
|
+
* pass answers it over the finished clip.
|
|
13265
|
+
*/
|
|
13266
|
+
onScreen: external_exports.string().optional()
|
|
13241
13267
|
});
|
|
13242
13268
|
function dropShotFieldsFromSpokenSections(sections) {
|
|
13243
13269
|
return sections.map((section) => {
|
|
@@ -14136,6 +14162,7 @@ var CastVideoInputSchema = external_exports.object({
|
|
|
14136
14162
|
text: external_exports.string().max(5e3),
|
|
14137
14163
|
action: external_exports.string().max(2e3).optional(),
|
|
14138
14164
|
scene: external_exports.string().max(2e3).optional(),
|
|
14165
|
+
onScreen: external_exports.string().trim().min(1).max(500).optional(),
|
|
14139
14166
|
/** The id of the avatar who says it; absent is `avatar`. */
|
|
14140
14167
|
speakerId: external_exports.string().max(200).optional()
|
|
14141
14168
|
}).strict().superRefine(refuseShotFieldsOffShots)
|
|
@@ -14174,6 +14201,8 @@ var CastVideoReviewSchema = external_exports.object({
|
|
|
14174
14201
|
resolution: OutputResolutionSchema.optional(),
|
|
14175
14202
|
subtitles: external_exports.string(),
|
|
14176
14203
|
template: external_exports.string(),
|
|
14204
|
+
/** Auto, Off or Unavailable, for a member who can have added visuals; absent otherwise. */
|
|
14205
|
+
visuals: external_exports.string().optional(),
|
|
14177
14206
|
/** What preparation changed from the request, said where the member reviews it. */
|
|
14178
14207
|
notice: external_exports.string().optional(),
|
|
14179
14208
|
/** Everyone the video casts, `avatar` first, where it casts several. */
|
|
@@ -15064,9 +15093,13 @@ var EnterpriseStripeBillingAuditEntrySchema = external_exports.object({
|
|
|
15064
15093
|
notes: external_exports.string().optional()
|
|
15065
15094
|
});
|
|
15066
15095
|
var EnterpriseOrderSchema = EnterpriseOrderDetailsSchema.extend({
|
|
15096
|
+
/** Members plus pending invites. Null means unlimited; omission preserves the saved limit. */
|
|
15097
|
+
seatLimit: external_exports.number().int().positive().max(Number.MAX_SAFE_INTEGER).nullable().optional(),
|
|
15067
15098
|
stripeBilling: EnterpriseStripeBillingInputSchema.optional()
|
|
15068
15099
|
});
|
|
15069
|
-
var CustomerEnterpriseOrderSchema = EnterpriseOrderSchema.
|
|
15100
|
+
var CustomerEnterpriseOrderSchema = EnterpriseOrderSchema.omit({
|
|
15101
|
+
seatLimit: true
|
|
15102
|
+
}).extend({
|
|
15070
15103
|
stripeBilling: CustomerEnterpriseStripeBillingSchema.optional()
|
|
15071
15104
|
});
|
|
15072
15105
|
var CustomPlanCreditGrantScheduleSchema = external_exports.object({
|
|
@@ -15412,7 +15445,7 @@ var CastUpscaleOptionSchema = external_exports.object({
|
|
|
15412
15445
|
resolution: CastUpscaleResolutionSchema,
|
|
15413
15446
|
/**
|
|
15414
15447
|
* What upscaling the take to this size charges, priced the way the
|
|
15415
|
-
*
|
|
15448
|
+
* active upscaler prices the prepared parts. Every size can be
|
|
15416
15449
|
* chosen again, each time as a new take at this price.
|
|
15417
15450
|
*/
|
|
15418
15451
|
creditCost: external_exports.number().int().nonnegative(),
|
|
@@ -15432,7 +15465,7 @@ var CastUpscaleOptionSchema = external_exports.object({
|
|
|
15432
15465
|
generationId: external_exports.string().uuid().nullable().optional()
|
|
15433
15466
|
});
|
|
15434
15467
|
var CastUpscaleSchema = external_exports.object({
|
|
15435
|
-
/** The upscaler's registry id
|
|
15468
|
+
/** The upscaler's registry id. */
|
|
15436
15469
|
model: external_exports.string(),
|
|
15437
15470
|
/** The upscaler's name, as the canvas names it. */
|
|
15438
15471
|
modelName: external_exports.string(),
|
|
@@ -15447,7 +15480,7 @@ var CastUpscaleSchema = external_exports.object({
|
|
|
15447
15480
|
var CastUpscaledFromSchema = external_exports.object({
|
|
15448
15481
|
generationId: external_exports.string().uuid(),
|
|
15449
15482
|
resolution: CastUpscaleResolutionSchema,
|
|
15450
|
-
/** The upscaler's registry id
|
|
15483
|
+
/** The upscaler's registry id. */
|
|
15451
15484
|
model: external_exports.string(),
|
|
15452
15485
|
/** The upscaler's name, as the canvas names it. */
|
|
15453
15486
|
modelName: external_exports.string()
|
|
@@ -15495,6 +15528,7 @@ var CAST_ENTRY_POINTS = [
|
|
|
15495
15528
|
"example_link",
|
|
15496
15529
|
"canvas",
|
|
15497
15530
|
"guest_draft",
|
|
15531
|
+
"offers_menu",
|
|
15498
15532
|
"direct"
|
|
15499
15533
|
];
|
|
15500
15534
|
var CastEntryPointSchema = external_exports.enum(CAST_ENTRY_POINTS);
|
|
@@ -19289,7 +19323,14 @@ var SearchDittoTemplatesBodySchema = createCursorPaginationRequestSchema({ defau
|
|
|
19289
19323
|
});
|
|
19290
19324
|
var DittoTemplateShelfCategorySchema = external_exports.string().trim().min(1).max(64).optional();
|
|
19291
19325
|
var SearchPublicDittoTemplatesBodySchema = SearchDittoTemplatesBodySchema.extend({
|
|
19292
|
-
category: DittoTemplateShelfCategorySchema
|
|
19326
|
+
category: DittoTemplateShelfCategorySchema,
|
|
19327
|
+
/**
|
|
19328
|
+
* Every published template in a random order that each new search
|
|
19329
|
+
* picks, as a member's `shuffle` does; the cursor keeps that order.
|
|
19330
|
+
* `query` and `category` take precedence when set, and it takes
|
|
19331
|
+
* precedence over `sort`.
|
|
19332
|
+
*/
|
|
19333
|
+
shuffle: external_exports.boolean().optional()
|
|
19293
19334
|
});
|
|
19294
19335
|
var SearchMemberDittoTemplatesBodySchema = SearchDittoTemplatesBodySchema.extend({
|
|
19295
19336
|
/**
|
|
@@ -21222,7 +21263,7 @@ var canvasContract = c5.router({
|
|
|
21222
21263
|
}
|
|
21223
21264
|
},
|
|
21224
21265
|
createImageAngle: {
|
|
21225
|
-
summary: "Generate
|
|
21266
|
+
summary: "Generate Camera Angle images",
|
|
21226
21267
|
method: "POST",
|
|
21227
21268
|
path: "/canvases/:canvasId/angles",
|
|
21228
21269
|
pathParams: external_exports.object({ canvasId: external_exports.string().uuid() }),
|
|
@@ -24726,6 +24767,29 @@ var CastCameraReadSchema = external_exports.object({
|
|
|
24726
24767
|
)
|
|
24727
24768
|
});
|
|
24728
24769
|
|
|
24770
|
+
// ../api-contract/src/cast/video-style-read.ts
|
|
24771
|
+
var CAST_VIDEO_STYLE_READ_MAX_SECTIONS = 30;
|
|
24772
|
+
var CAST_VIDEO_STYLE_READ_MAX_PART_LENGTH = 4e3;
|
|
24773
|
+
var SectionPartSchema = external_exports.string().max(CAST_VIDEO_STYLE_READ_MAX_PART_LENGTH);
|
|
24774
|
+
var CastVideoStyleReadBodySchema = external_exports.object({
|
|
24775
|
+
/** The script as it will be filmed: each section's words and directions. */
|
|
24776
|
+
sections: external_exports.array(
|
|
24777
|
+
external_exports.object({
|
|
24778
|
+
text: SectionPartSchema,
|
|
24779
|
+
action: SectionPartSchema.optional(),
|
|
24780
|
+
scene: SectionPartSchema.optional()
|
|
24781
|
+
}).strict()
|
|
24782
|
+
).min(1).max(CAST_VIDEO_STYLE_READ_MAX_SECTIONS)
|
|
24783
|
+
}).strict();
|
|
24784
|
+
var CastVideoStyleReadSchema = external_exports.object({
|
|
24785
|
+
/**
|
|
24786
|
+
* The style Auto films the script in. Absent when the read could not run
|
|
24787
|
+
* or the team does not have `cast-auto-video-style`: Auto then renders as
|
|
24788
|
+
* its own Self-filmed base.
|
|
24789
|
+
*/
|
|
24790
|
+
videoStyle: CastVideoStyleIdSchema.exclude(["auto"]).optional()
|
|
24791
|
+
});
|
|
24792
|
+
|
|
24729
24793
|
// ../api-contract/src/cast/choreography.ts
|
|
24730
24794
|
var CAST_CHOREOGRAPHY_MAX_SECTIONS = 30;
|
|
24731
24795
|
var SectionTextSchema = external_exports.string().max(4e3);
|
|
@@ -24972,6 +25036,17 @@ var castContract = c18.router({
|
|
|
24972
25036
|
},
|
|
24973
25037
|
summary: "Read which parts of the camera each Cast section's action or scene names"
|
|
24974
25038
|
},
|
|
25039
|
+
readCastVideoStyle: {
|
|
25040
|
+
method: "POST",
|
|
25041
|
+
path: "/cast/video-style-read",
|
|
25042
|
+
body: CastVideoStyleReadBodySchema,
|
|
25043
|
+
responses: {
|
|
25044
|
+
200: CastVideoStyleReadSchema,
|
|
25045
|
+
400: MessageResponseSchema,
|
|
25046
|
+
403: MessageResponseSchema
|
|
25047
|
+
},
|
|
25048
|
+
summary: "Read which video style a Cast script reads as, for the Auto style"
|
|
25049
|
+
},
|
|
24975
25050
|
readCastChoreography: {
|
|
24976
25051
|
method: "POST",
|
|
24977
25052
|
path: "/cast/choreography",
|
|
@@ -26263,7 +26338,7 @@ function isMajorUpgrade(current, latest) {
|
|
|
26263
26338
|
return l[0] > c20[0];
|
|
26264
26339
|
}
|
|
26265
26340
|
function shouldShowUpgradeNotice(ctx = {}) {
|
|
26266
|
-
const current = ctx.current ?? "0.
|
|
26341
|
+
const current = ctx.current ?? "0.49.0";
|
|
26267
26342
|
const latest = ctx.latest ?? serverLatestVersion;
|
|
26268
26343
|
const env = ctx.env ?? process.env;
|
|
26269
26344
|
const isTty = ctx.isTty ?? Boolean(process.stderr.isTTY);
|
|
@@ -26284,7 +26359,7 @@ Upgrade: npm install -g @melius-ai/cli@latest (or: brew update && brew upgrade
|
|
|
26284
26359
|
function printUpgradeNoticeIfNeeded(ctx = {}) {
|
|
26285
26360
|
try {
|
|
26286
26361
|
if (!shouldShowUpgradeNotice(ctx)) return;
|
|
26287
|
-
const current = ctx.current ?? "0.
|
|
26362
|
+
const current = ctx.current ?? "0.49.0";
|
|
26288
26363
|
const latest = ctx.latest ?? serverLatestVersion;
|
|
26289
26364
|
process.stderr.write(formatUpgradeNotice(current, latest));
|
|
26290
26365
|
} catch {
|
|
@@ -26391,7 +26466,7 @@ function createClient(config) {
|
|
|
26391
26466
|
"Bypass-Tunnel-Reminder": "true",
|
|
26392
26467
|
[CUSTOM_REQUEST_HEADERS.meliusClient]: buildMeliusClientHeader({
|
|
26393
26468
|
surface: "cli",
|
|
26394
|
-
version: "0.
|
|
26469
|
+
version: "0.49.0"
|
|
26395
26470
|
})
|
|
26396
26471
|
};
|
|
26397
26472
|
if (config.teamId) {
|
|
@@ -26894,6 +26969,7 @@ function output(result, getOutputOpts) {
|
|
|
26894
26969
|
}
|
|
26895
26970
|
var angleHelp = `
|
|
26896
26971
|
Rotation: integer -180..180; tilt: integer -30..90 (positive is above).
|
|
26972
|
+
Optional zoom: wide (camera farther away), medium (default) or close (closer).
|
|
26897
26973
|
Requires the angles-node feature and editor access. Source must be a completed image.
|
|
26898
26974
|
Returns: creditCost for quotes; nodeId, nodeRunId, creditCost and optional batch results for generation; approvalId when member approval is required.
|
|
26899
26975
|
Use mel run wait <nodeRunId> to await completion, and mel canvas content <canvasId> --include-all-versions to inspect saved versions.
|
|
@@ -26917,7 +26993,7 @@ function registerAngleCommands(program2, getOutputOpts) {
|
|
|
26917
26993
|
"Completed image node ID from mel canvas content"
|
|
26918
26994
|
).requiredOption(
|
|
26919
26995
|
"--angles <json>",
|
|
26920
|
-
"Array of one to five distinct {rotationDeg, tiltDeg}
|
|
26996
|
+
"Array of one to five distinct {rotationDeg, tiltDeg, zoom?} views"
|
|
26921
26997
|
);
|
|
26922
26998
|
if (action === "create")
|
|
26923
26999
|
command.requiredOption(
|
|
@@ -26929,6 +27005,7 @@ function registerAngleCommands(program2, getOutputOpts) {
|
|
|
26929
27005
|
angleHelp + `Examples:
|
|
26930
27006
|
mel ${parent.name()} ${name} <canvasId> <sourceNodeId> --angles '[{"rotationDeg":37,"tiltDeg":12}]'${action === "create" ? " --request-key <key>" : ""}
|
|
26931
27007
|
mel ${parent.name()} ${name} <canvasId> <sourceNodeId> --angles '[{"rotationDeg":-45,"tiltDeg":0},{"rotationDeg":45,"tiltDeg":0}]'${action === "create" ? " --request-key <key>" : ""}
|
|
27008
|
+
mel ${parent.name()} ${name} <canvasId> <sourceNodeId> --angles '[{"rotationDeg":45,"tiltDeg":0,"zoom":"close"}]'${action === "create" ? " --request-key <key>" : ""}
|
|
26932
27009
|
`
|
|
26933
27010
|
).action(
|
|
26934
27011
|
async (canvasId, sourceNodeId, options) => {
|
|
@@ -26975,7 +27052,10 @@ function registerAngleCommands(program2, getOutputOpts) {
|
|
|
26975
27052
|
}
|
|
26976
27053
|
angle.command("regenerate").description(
|
|
26977
27054
|
"Generate a new version of an existing Angle and return run IDs"
|
|
26978
|
-
).argument("<canvasId>", "Canvas ID from mel canvas list").argument("<nodeId>", "Angle node ID from mel canvas content").requiredOption(
|
|
27055
|
+
).argument("<canvasId>", "Canvas ID from mel canvas list").argument("<nodeId>", "Angle node ID from mel canvas content").requiredOption(
|
|
27056
|
+
"--angle <json>",
|
|
27057
|
+
"One {rotationDeg, tiltDeg, zoom?} view"
|
|
27058
|
+
).requiredOption(
|
|
26979
27059
|
"--request-key <key>",
|
|
26980
27060
|
"Stable idempotency key for this submission"
|
|
26981
27061
|
).addHelpText(
|
|
@@ -33615,7 +33695,7 @@ function withDefaultHelp(args) {
|
|
|
33615
33695
|
}
|
|
33616
33696
|
function createProgram() {
|
|
33617
33697
|
const program2 = new Command();
|
|
33618
|
-
program2.name("mel").description("Mel \u2014 Melius agent CLI").version("0.
|
|
33698
|
+
program2.name("mel").description("Mel \u2014 Melius agent CLI").version("0.49.0").showSuggestionAfterError(true).option("--json", "Force JSON output (default)").option("--text", "Human-readable output").option(
|
|
33619
33699
|
"--fields <fields>",
|
|
33620
33700
|
"Select specific output fields (comma-separated)"
|
|
33621
33701
|
).option("--quiet", "Suppress output, exit code only").option("--verbose", "Log request/response metadata to stderr").addHelpText(
|
package/dist/src/index.js
CHANGED