@melius-ai/cli 0.46.1 → 0.48.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 +1 -1
- package/dist/{chunk-WI6J235J.js → chunk-IFXKJUQ2.js} +400 -73
- package/dist/src/index.js +1 -1
- package/package.json +1 -1
package/dist/bin/mel.js
CHANGED
|
@@ -9757,6 +9757,7 @@ function planAutoformatRequest(nodes, edges, request, savedLayout) {
|
|
|
9757
9757
|
}
|
|
9758
9758
|
|
|
9759
9759
|
// ../canvas-domain/src/video-replacement.ts
|
|
9760
|
+
var VIDEO_REPLACEMENT_MAX_DURATION_SECONDS = 30;
|
|
9760
9761
|
var VideoReplacementCapabilitySchema = external_exports.object({
|
|
9761
9762
|
fullOutputMaxDurationSeconds: external_exports.number().positive(),
|
|
9762
9763
|
maxReferenceImages: external_exports.number().int().positive(),
|
|
@@ -10372,7 +10373,10 @@ var CompleteFilesUploadBodySchema = external_exports.object({
|
|
|
10372
10373
|
parts: external_exports.array(CompletedPartSchema),
|
|
10373
10374
|
width: external_exports.number().int().positive().optional(),
|
|
10374
10375
|
height: external_exports.number().int().positive().optional(),
|
|
10375
|
-
folderId: external_exports.string().uuid().nullable().optional()
|
|
10376
|
+
folderId: external_exports.string().uuid().nullable().optional(),
|
|
10377
|
+
// Set by the Files page's own uploads, so their completion notifies the
|
|
10378
|
+
// member. Omitted ⇒ no notification.
|
|
10379
|
+
notifyUploader: external_exports.boolean().optional()
|
|
10376
10380
|
});
|
|
10377
10381
|
var CompleteFilesUploadResponseSchema = external_exports.object({
|
|
10378
10382
|
file: FileCardSchema
|
|
@@ -10544,6 +10548,27 @@ var UPLOAD_PROXY_PURPOSES = [
|
|
|
10544
10548
|
];
|
|
10545
10549
|
var MAX_FONT_FILE_SIZE_BYTES = 10 * 1024 * 1024;
|
|
10546
10550
|
|
|
10551
|
+
// ../api-contract/src/agent/credit-notice.ts
|
|
10552
|
+
var AgentCreditNoticeSchema = external_exports.object({
|
|
10553
|
+
id: external_exports.string().uuid().optional(),
|
|
10554
|
+
teamId: external_exports.string().uuid(),
|
|
10555
|
+
kind: external_exports.enum(["run", "build"]),
|
|
10556
|
+
requiredCredits: external_exports.number().finite().nonnegative(),
|
|
10557
|
+
availableCredits: external_exports.number().finite().nonnegative()
|
|
10558
|
+
});
|
|
10559
|
+
var creditNoticeOutputSchema = external_exports.object({
|
|
10560
|
+
creditNotice: AgentCreditNoticeSchema
|
|
10561
|
+
});
|
|
10562
|
+
var AgentCreditNoticeQuoteSchema = external_exports.object({
|
|
10563
|
+
notice: AgentCreditNoticeSchema,
|
|
10564
|
+
status: external_exports.enum(["insufficient_credits", "ready", "started", "unavailable"]),
|
|
10565
|
+
nodeCount: external_exports.number().int().nonnegative(),
|
|
10566
|
+
quoteToken: external_exports.string().optional(),
|
|
10567
|
+
message: external_exports.string().optional(),
|
|
10568
|
+
/** The quote waits on work in progress (Mel's reply or an input generating) and changes once it finishes. */
|
|
10569
|
+
waiting: external_exports.boolean().optional()
|
|
10570
|
+
});
|
|
10571
|
+
|
|
10547
10572
|
// ../api-contract/src/agent/turn-context.ts
|
|
10548
10573
|
var questionId = external_exports.string().min(1).max(200);
|
|
10549
10574
|
var AgentClarificationSubmissionSchema = external_exports.object({
|
|
@@ -10981,12 +11006,29 @@ var IMAGE_ANGLE_ROTATION_MAX_DEG = 180;
|
|
|
10981
11006
|
var IMAGE_ANGLE_TILT_MIN_DEG = -30;
|
|
10982
11007
|
var IMAGE_ANGLE_TILT_MAX_DEG = 90;
|
|
10983
11008
|
var IMAGE_ANGLE_MAX_BATCH_SIZE = 5;
|
|
10984
|
-
var
|
|
11009
|
+
var imageAngleFields = {
|
|
10985
11010
|
rotationDeg: external_exports.number().finite().int().min(IMAGE_ANGLE_ROTATION_MIN_DEG).max(IMAGE_ANGLE_ROTATION_MAX_DEG),
|
|
10986
11011
|
tiltDeg: external_exports.number().finite().int().min(IMAGE_ANGLE_TILT_MIN_DEG).max(IMAGE_ANGLE_TILT_MAX_DEG)
|
|
10987
|
-
}
|
|
10988
|
-
|
|
10989
|
-
|
|
11012
|
+
};
|
|
11013
|
+
function canonicalImageAngle(angle) {
|
|
11014
|
+
return {
|
|
11015
|
+
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
|
|
11017
|
+
};
|
|
11018
|
+
}
|
|
11019
|
+
var ImageAngleInputSchema = external_exports.object(imageAngleFields).strict().transform(canonicalImageAngle);
|
|
11020
|
+
var IMAGE_ANGLE_RESOLUTIONS = ["1K", "2K", "4K"];
|
|
11021
|
+
var ImageAngleResolutionSchema = external_exports.enum(IMAGE_ANGLE_RESOLUTIONS);
|
|
11022
|
+
var IMAGE_ANGLE_MAX_COUNT = 4;
|
|
11023
|
+
var ImageAngleCountSchema = external_exports.number().finite().int().min(1).max(IMAGE_ANGLE_MAX_COUNT);
|
|
11024
|
+
var RegenerateImageAngleBodySchema = external_exports.object({
|
|
11025
|
+
...imageAngleFields,
|
|
11026
|
+
resolution: ImageAngleResolutionSchema.default("1K"),
|
|
11027
|
+
count: ImageAngleCountSchema.default(1)
|
|
11028
|
+
}).strict().transform(({ resolution, count, ...angle }) => ({
|
|
11029
|
+
...canonicalImageAngle(angle),
|
|
11030
|
+
resolution,
|
|
11031
|
+
count
|
|
10990
11032
|
}));
|
|
10991
11033
|
var CreateImageAngleBodySchema = external_exports.object({
|
|
10992
11034
|
sourceNodeId: external_exports.string().uuid(),
|
|
@@ -11917,11 +11959,13 @@ var FREE_GENERATION_GRANT_SOURCES = [
|
|
|
11917
11959
|
"operator",
|
|
11918
11960
|
"promotion"
|
|
11919
11961
|
];
|
|
11962
|
+
var FREE_GENERATION_MEDIA = ["image", "video", "audio"];
|
|
11920
11963
|
var FREE_GENERATION_SCOPE_VERSION = 1;
|
|
11921
11964
|
var FreeGenerationScopeSchema = external_exports.object({
|
|
11922
11965
|
version: external_exports.literal(FREE_GENERATION_SCOPE_VERSION),
|
|
11923
11966
|
actions: external_exports.array(external_exports.enum(GRANTABLE_FREE_GENERATION_ACTION_KINDS)).min(1),
|
|
11924
11967
|
callers: external_exports.array(FreeGenerationCallerSchema).min(1),
|
|
11968
|
+
media: external_exports.array(external_exports.enum(FREE_GENERATION_MEDIA)).min(1).optional(),
|
|
11925
11969
|
models: external_exports.array(external_exports.string().trim().min(1)).min(1).optional(),
|
|
11926
11970
|
limits: external_exports.object({
|
|
11927
11971
|
resolutions: external_exports.array(external_exports.string().trim().min(1)).min(1).optional(),
|
|
@@ -11959,12 +12003,18 @@ var FreeGenerationAllowanceSchema = external_exports.object({
|
|
|
11959
12003
|
/** Null when the grant never expires. */
|
|
11960
12004
|
expiresAt: external_exports.string().datetime().nullable(),
|
|
11961
12005
|
/** Whether the scope lists the caller asking; the agent still spends one only with the member's approval. */
|
|
11962
|
-
availableToCaller: external_exports.boolean()
|
|
12006
|
+
availableToCaller: external_exports.boolean(),
|
|
12007
|
+
/** The promotion whose enrollment granted it; absent from a server that predates the field. */
|
|
12008
|
+
promotionId: external_exports.string().min(1).optional()
|
|
11963
12009
|
});
|
|
11964
12010
|
var ListFreeGenerationsResponseSchema = external_exports.object({
|
|
11965
12011
|
/** In the order a run draws from them: the soonest expiry first. */
|
|
11966
12012
|
data: external_exports.array(FreeGenerationAllowanceSchema)
|
|
11967
12013
|
});
|
|
12014
|
+
var FirstCastVideoOfferResponseSchema = external_exports.object({
|
|
12015
|
+
/** Whether saving a card now would earn the team its first free Cast video, credited to the member asking. */
|
|
12016
|
+
eligible: external_exports.boolean()
|
|
12017
|
+
});
|
|
11968
12018
|
var FREE_GENERATION_UNAVAILABLE_ERROR_CODE = "FREE_GENERATION_UNAVAILABLE";
|
|
11969
12019
|
function isFreeGenerationUnavailableError(body) {
|
|
11970
12020
|
return typeof body === "object" && body !== null && body.code === FREE_GENERATION_UNAVAILABLE_ERROR_CODE;
|
|
@@ -12333,6 +12383,9 @@ var RunVideoToolBodySchema = external_exports.object({
|
|
|
12333
12383
|
toolName: external_exports.string().trim().min(1),
|
|
12334
12384
|
toolConfig: external_exports.record(external_exports.unknown()).optional()
|
|
12335
12385
|
});
|
|
12386
|
+
var QuoteVideoToolRunResponseSchema = external_exports.object({
|
|
12387
|
+
creditCost: external_exports.number().int().nonnegative()
|
|
12388
|
+
});
|
|
12336
12389
|
var ExtractVideoFrameBodySchema = external_exports.object({
|
|
12337
12390
|
canvasId: external_exports.string().uuid(),
|
|
12338
12391
|
targetNodeId: external_exports.string().uuid(),
|
|
@@ -12523,7 +12576,14 @@ var BulkRunCreditShortfallModeSchema = external_exports.enum([
|
|
|
12523
12576
|
]);
|
|
12524
12577
|
var BulkNodeRunStartResponseSchema = BulkNodeRunResponseSchema.extend({
|
|
12525
12578
|
/** Nodes left unrun because the team's credits covered only part of the run. */
|
|
12526
|
-
creditSkippedNodeIds: external_exports.array(external_exports.string().uuid()).optional()
|
|
12579
|
+
creditSkippedNodeIds: external_exports.array(external_exports.string().uuid()).optional(),
|
|
12580
|
+
/**
|
|
12581
|
+
* Nodes whose failure hands their input on instead of failing what they
|
|
12582
|
+
* feed (a Cast setting picture, a long video's look), so the run still
|
|
12583
|
+
* delivers. Empty when the run has none; absent from servers that
|
|
12584
|
+
* predate it.
|
|
12585
|
+
*/
|
|
12586
|
+
fallbackNodeIds: external_exports.array(external_exports.string().uuid()).optional()
|
|
12527
12587
|
});
|
|
12528
12588
|
|
|
12529
12589
|
// ../api-contract/src/canvas/schema/direct-mutation.ts
|
|
@@ -13091,10 +13151,12 @@ var CanvasPaginationErrorSchema = external_exports.object({
|
|
|
13091
13151
|
});
|
|
13092
13152
|
|
|
13093
13153
|
// ../api-contract/src/cast/creation.ts
|
|
13154
|
+
var CastVideoEngineSchema = external_exports.enum(["seedance", "wan-3"]);
|
|
13094
13155
|
var CastVideoStyleIdSchema = external_exports.enum([
|
|
13095
13156
|
"auto",
|
|
13096
13157
|
"self-filmed",
|
|
13097
13158
|
"produced",
|
|
13159
|
+
"drama",
|
|
13098
13160
|
"vlog",
|
|
13099
13161
|
"podcast",
|
|
13100
13162
|
"unboxing",
|
|
@@ -13106,18 +13168,32 @@ var CastVideoStyleIdSchema = external_exports.enum([
|
|
|
13106
13168
|
"corporate-training",
|
|
13107
13169
|
"storytime",
|
|
13108
13170
|
"comment-reply",
|
|
13109
|
-
"streamer-reaction"
|
|
13171
|
+
"streamer-reaction",
|
|
13172
|
+
"animated-3d",
|
|
13173
|
+
"street-interview"
|
|
13110
13174
|
]);
|
|
13111
13175
|
var CAST_VIDEO_STYLE_IDS = CastVideoStyleIdSchema.options;
|
|
13112
13176
|
var CastVideoStyleSchema = external_exports.object({
|
|
13113
13177
|
id: CastVideoStyleIdSchema,
|
|
13114
13178
|
version: external_exports.literal(1)
|
|
13115
13179
|
});
|
|
13180
|
+
var CastPronunciationSchema = external_exports.object({
|
|
13181
|
+
word: external_exports.string().trim().min(1).max(200),
|
|
13182
|
+
pronunciation: external_exports.string().trim().min(1).max(200)
|
|
13183
|
+
});
|
|
13184
|
+
var MAX_CAST_PRONUNCIATIONS = 50;
|
|
13116
13185
|
var CastCreationSettingsSchema = external_exports.object({
|
|
13117
13186
|
videoStyle: CastVideoStyleSchema,
|
|
13118
|
-
speech: external_exports.enum(["on-screen", "narration"])
|
|
13187
|
+
speech: external_exports.enum(["on-screen", "narration"]),
|
|
13188
|
+
visuals: external_exports.enum(["auto", "on", "off"]).optional().describe(
|
|
13189
|
+
"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
|
+
),
|
|
13191
|
+
pronunciations: external_exports.array(CastPronunciationSchema).max(MAX_CAST_PRONUNCIATIONS).optional().describe(
|
|
13192
|
+
'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
|
+
)
|
|
13119
13194
|
});
|
|
13120
13195
|
var CAST_MAX_AVATARS = 3;
|
|
13196
|
+
var CAST_MAX_ACTION_BEAT_SECONDS = 8;
|
|
13121
13197
|
var CastAuthoredSectionSchema = external_exports.object({
|
|
13122
13198
|
id: external_exports.string(),
|
|
13123
13199
|
/** Optional section name; never spoken. */
|
|
@@ -13126,6 +13202,18 @@ var CastAuthoredSectionSchema = external_exports.object({
|
|
|
13126
13202
|
/** Direction for the picture, never part of the spoken read. */
|
|
13127
13203
|
action: external_exports.string().optional(),
|
|
13128
13204
|
kind: external_exports.enum(["action"]).optional(),
|
|
13205
|
+
/**
|
|
13206
|
+
* A Shot: an action beat about the place, a prop, or what the story is
|
|
13207
|
+
* looking at, with `action` saying what the camera sees. It shows nobody
|
|
13208
|
+
* from the cast as its subject; someone its words put in it appears only
|
|
13209
|
+
* as those words place them. A spoken section drops it when parsed.
|
|
13210
|
+
*/
|
|
13211
|
+
cutaway: external_exports.literal(true).optional(),
|
|
13212
|
+
/**
|
|
13213
|
+
* How long an action beat holds, in whole seconds. Absent is
|
|
13214
|
+
* `CAST_ACTION_BEAT_SECONDS`. A spoken section drops it when parsed.
|
|
13215
|
+
*/
|
|
13216
|
+
seconds: external_exports.number().int().min(1).max(CAST_MAX_ACTION_BEAT_SECONDS).optional(),
|
|
13129
13217
|
/**
|
|
13130
13218
|
* Which of the cast's avatars says it: an avatar entry id
|
|
13131
13219
|
* (`config.avatars[].id`). Absent means the cast's first avatar, which is
|
|
@@ -13151,8 +13239,37 @@ var CastAuthoredSectionSchema = external_exports.object({
|
|
|
13151
13239
|
*/
|
|
13152
13240
|
scene: external_exports.string().optional()
|
|
13153
13241
|
});
|
|
13242
|
+
function dropShotFieldsFromSpokenSections(sections) {
|
|
13243
|
+
return sections.map((section) => {
|
|
13244
|
+
if (section.kind === "action") return section;
|
|
13245
|
+
const spoken = { ...section };
|
|
13246
|
+
delete spoken.cutaway;
|
|
13247
|
+
delete spoken.seconds;
|
|
13248
|
+
return spoken;
|
|
13249
|
+
});
|
|
13250
|
+
}
|
|
13251
|
+
function castSectionsSchema(sections) {
|
|
13252
|
+
return sections.transform(dropShotFieldsFromSpokenSections).pipe(sections);
|
|
13253
|
+
}
|
|
13254
|
+
function refuseShotFieldsOffShots(section, context2) {
|
|
13255
|
+
if (section.kind !== "action" && (section.cutaway !== void 0 || section.seconds !== void 0))
|
|
13256
|
+
context2.addIssue({
|
|
13257
|
+
code: external_exports.ZodIssueCode.custom,
|
|
13258
|
+
message: 'cutaway and seconds belong to a silent action section (kind: "action")'
|
|
13259
|
+
});
|
|
13260
|
+
else if (section.seconds !== void 0 && section.cutaway !== true)
|
|
13261
|
+
context2.addIssue({
|
|
13262
|
+
code: external_exports.ZodIssueCode.custom,
|
|
13263
|
+
message: "seconds is how long a Shot holds: set it only with cutaway: true"
|
|
13264
|
+
});
|
|
13265
|
+
}
|
|
13266
|
+
function refuseShotFieldsOffShotsInSections(sections, context2) {
|
|
13267
|
+
for (const section of sections) refuseShotFieldsOffShots(section, context2);
|
|
13268
|
+
}
|
|
13154
13269
|
var CastCreationSchema = external_exports.object({
|
|
13155
|
-
sections:
|
|
13270
|
+
sections: castSectionsSchema(
|
|
13271
|
+
external_exports.array(CastAuthoredSectionSchema.omit({ id: true }))
|
|
13272
|
+
).superRefine(refuseShotFieldsOffShotsInSections),
|
|
13156
13273
|
settings: CastCreationSettingsSchema
|
|
13157
13274
|
});
|
|
13158
13275
|
|
|
@@ -13633,6 +13750,23 @@ var CastScriptSectionSchema = external_exports.object({
|
|
|
13633
13750
|
message: "A spoken beat needs words",
|
|
13634
13751
|
path: ["text"]
|
|
13635
13752
|
});
|
|
13753
|
+
var PrepareCastScriptBodySchema = external_exports.object({
|
|
13754
|
+
prompt: external_exports.string().trim().min(1).max(MAX_PROMPT_ENHANCE_INPUT_LENGTH),
|
|
13755
|
+
engine: CastVideoEngineSchema,
|
|
13756
|
+
voice: external_exports.enum(["cast", "track"]),
|
|
13757
|
+
creationSettings: CastCreationSettingsSchema,
|
|
13758
|
+
tone: external_exports.string().trim().min(1).max(MAX_CAST_TONE_LENGTH).optional(),
|
|
13759
|
+
speakers: CastScriptSpeakersSchema,
|
|
13760
|
+
references: CastScriptReferencesSchema,
|
|
13761
|
+
longVideo: external_exports.boolean(),
|
|
13762
|
+
readPacing: external_exports.boolean()
|
|
13763
|
+
});
|
|
13764
|
+
var MAX_PREPARED_CAST_SCRIPT_SECTIONS = 100;
|
|
13765
|
+
var PrepareCastScriptResponseSchema = external_exports.object({
|
|
13766
|
+
sections: external_exports.array(CastScriptSectionSchema).min(1).max(MAX_PREPARED_CAST_SCRIPT_SECTIONS),
|
|
13767
|
+
requestedSeconds: external_exports.number().positive().nullable(),
|
|
13768
|
+
estimatedSeconds: external_exports.number().nonnegative()
|
|
13769
|
+
});
|
|
13636
13770
|
var EnhanceScriptResponseSchema = external_exports.object({
|
|
13637
13771
|
prompt: external_exports.string(),
|
|
13638
13772
|
/**
|
|
@@ -13654,10 +13788,12 @@ var CastLocationRequestSchema = external_exports.object({
|
|
|
13654
13788
|
title: external_exports.string().max(200),
|
|
13655
13789
|
text: external_exports.string().max(MAX_PROMPT_ENHANCE_INPUT_LENGTH),
|
|
13656
13790
|
action: external_exports.string().max(4e3).optional(),
|
|
13657
|
-
scene: external_exports.string().max(4e3).optional()
|
|
13791
|
+
scene: external_exports.string().max(4e3).optional(),
|
|
13792
|
+
/** A Shot, sent without its action and scene. */
|
|
13793
|
+
cutaway: CastAuthoredSectionSchema.shape.cutaway
|
|
13658
13794
|
})
|
|
13659
13795
|
).min(1).max(100)
|
|
13660
|
-
).min(
|
|
13796
|
+
).min(1).max(100),
|
|
13661
13797
|
/**
|
|
13662
13798
|
* Also read who else is in each setting (`cast-background-extras`).
|
|
13663
13799
|
* Absent, the read is as it was and no setting names any people.
|
|
@@ -13679,7 +13815,7 @@ var CAST_OUTFIT_KINDS = [
|
|
|
13679
13815
|
"accessory"
|
|
13680
13816
|
];
|
|
13681
13817
|
var CastLocationResponseSchema = external_exports.object({
|
|
13682
|
-
speech: external_exports.array(external_exports.array(CastCreationSettingsSchema.shape.speech).min(1).max(100)).min(
|
|
13818
|
+
speech: external_exports.array(external_exports.array(CastCreationSettingsSchema.shape.speech).min(1).max(100)).min(1).max(100),
|
|
13683
13819
|
locations: external_exports.array(
|
|
13684
13820
|
external_exports.object({
|
|
13685
13821
|
name: external_exports.string().trim().min(1).max(80).regex(/^[^[\]{}\n\r]+$/),
|
|
@@ -13706,19 +13842,16 @@ var CastLocationResponseSchema = external_exports.object({
|
|
|
13706
13842
|
/** Absent from reads before it, which split no look. */
|
|
13707
13843
|
kind: external_exports.enum(CAST_OUTFIT_KINDS).optional()
|
|
13708
13844
|
})
|
|
13709
|
-
).max(200).optional(),
|
|
13710
|
-
/**
|
|
13711
|
-
* The sections whose directions say what the presenter already wears,
|
|
13712
|
-
* only for a request that asks for outfit changes.
|
|
13713
|
-
*/
|
|
13714
|
-
wornOutfits: external_exports.array(
|
|
13715
|
-
external_exports.object({
|
|
13716
|
-
part: external_exports.number().int().min(0).max(99),
|
|
13717
|
-
section: external_exports.number().int().min(0).max(99),
|
|
13718
|
-
wears: external_exports.string().trim().min(1).max(300)
|
|
13719
|
-
})
|
|
13720
13845
|
).max(200).optional()
|
|
13721
13846
|
});
|
|
13847
|
+
var MAX_CAST_PRONUNCIATION_CHECKS = 5;
|
|
13848
|
+
var CastPronunciationCheckRequestSchema = external_exports.object({
|
|
13849
|
+
script: external_exports.string().trim().min(1).max(MAX_PROMPT_ENHANCE_INPUT_LENGTH),
|
|
13850
|
+
known: external_exports.array(external_exports.string().trim().min(1).max(200)).max(100).optional()
|
|
13851
|
+
});
|
|
13852
|
+
var CastPronunciationCheckResponseSchema = external_exports.object({
|
|
13853
|
+
words: external_exports.array(CastPronunciationSchema).max(MAX_CAST_PRONUNCIATION_CHECKS)
|
|
13854
|
+
});
|
|
13722
13855
|
|
|
13723
13856
|
// ../api-contract/src/veed-subtitles.ts
|
|
13724
13857
|
var VEED_SUBTITLES_BASIC_PRESETS = [
|
|
@@ -13956,7 +14089,6 @@ var CastTemplateReferenceSchema = external_exports.object({
|
|
|
13956
14089
|
|
|
13957
14090
|
// ../api-contract/src/cast/video.ts
|
|
13958
14091
|
var CAST_VIDEO_MAX_PROPS = 6;
|
|
13959
|
-
var CastVideoEngineSchema = external_exports.enum(["seedance", "wan-3"]);
|
|
13960
14092
|
var CastVideoAvatarSchema = external_exports.object({
|
|
13961
14093
|
kind: external_exports.enum(["custom", "curated", "element"]),
|
|
13962
14094
|
id: external_exports.string().uuid()
|
|
@@ -13981,7 +14113,7 @@ var CastVideoInputSchema = external_exports.object({
|
|
|
13981
14113
|
avatar: CastVideoAvatarSchema,
|
|
13982
14114
|
voice: CastVideoVoiceSchema,
|
|
13983
14115
|
voiceName: external_exports.string().max(200).optional(),
|
|
13984
|
-
/** Everyone else the video casts
|
|
14116
|
+
/** Everyone else the video casts. */
|
|
13985
14117
|
otherAvatars: external_exports.array(CastVideoOtherAvatarSchema).min(1).max(
|
|
13986
14118
|
CAST_MAX_AVATARS - 1,
|
|
13987
14119
|
`A video holds up to ${CAST_MAX_AVATARS} avatars: avatar and at most ${CAST_MAX_AVATARS - 1} in otherAvatars`
|
|
@@ -13998,15 +14130,15 @@ var CastVideoInputSchema = external_exports.object({
|
|
|
13998
14130
|
CastAuthoredSectionSchema.omit({
|
|
13999
14131
|
id: true,
|
|
14000
14132
|
continues: true,
|
|
14001
|
-
inShot: true
|
|
14002
|
-
scene: true
|
|
14133
|
+
inShot: true
|
|
14003
14134
|
}).extend({
|
|
14004
14135
|
title: external_exports.string().max(200).optional(),
|
|
14005
14136
|
text: external_exports.string().max(5e3),
|
|
14006
14137
|
action: external_exports.string().max(2e3).optional(),
|
|
14138
|
+
scene: external_exports.string().max(2e3).optional(),
|
|
14007
14139
|
/** The id of the avatar who says it; absent is `avatar`. */
|
|
14008
14140
|
speakerId: external_exports.string().max(200).optional()
|
|
14009
|
-
}).strict()
|
|
14141
|
+
}).strict().superRefine(refuseShotFieldsOffShots)
|
|
14010
14142
|
).min(1).max(30),
|
|
14011
14143
|
backgroundId: external_exports.string().uuid().optional(),
|
|
14012
14144
|
propAssetId: external_exports.string().uuid().optional(),
|
|
@@ -14021,6 +14153,7 @@ var CastVideoInputSchema = external_exports.object({
|
|
|
14021
14153
|
workId: external_exports.string().uuid().optional()
|
|
14022
14154
|
}).strict();
|
|
14023
14155
|
var CastVideoRequestSchema = CastVideoInputSchema.extend({
|
|
14156
|
+
useFreeGeneration: external_exports.boolean().optional(),
|
|
14024
14157
|
voice: CastVideoVoiceSchema.optional(),
|
|
14025
14158
|
avatar: external_exports.union([
|
|
14026
14159
|
CastVideoAvatarSchema,
|
|
@@ -14054,11 +14187,13 @@ var CastVideoReviewSchema = external_exports.object({
|
|
|
14054
14187
|
});
|
|
14055
14188
|
var preparation = external_exports.object({
|
|
14056
14189
|
attemptId: external_exports.string().uuid(),
|
|
14190
|
+
preparationToken: external_exports.string().uuid().optional(),
|
|
14057
14191
|
input: CastVideoInputSchema,
|
|
14058
14192
|
review: CastVideoReviewSchema,
|
|
14059
14193
|
scriptSeconds: external_exports.number().nonnegative(),
|
|
14060
14194
|
aspectRatios: external_exports.array(OutputAspectRatioSchema),
|
|
14061
|
-
estimatedWait: external_exports.string().optional()
|
|
14195
|
+
estimatedWait: external_exports.string().optional(),
|
|
14196
|
+
visualsUnavailableReason: external_exports.string().optional()
|
|
14062
14197
|
});
|
|
14063
14198
|
var PrepareCastVideoResponseSchema = external_exports.discriminatedUnion("status", [
|
|
14064
14199
|
preparation.extend({
|
|
@@ -14077,10 +14212,15 @@ var PrepareCastVideoResponseSchema = external_exports.discriminatedUnion("status
|
|
|
14077
14212
|
]);
|
|
14078
14213
|
var RunCastVideoBodySchema = external_exports.object({
|
|
14079
14214
|
attemptId: external_exports.string().uuid(),
|
|
14215
|
+
preparationToken: external_exports.string().uuid().optional(),
|
|
14216
|
+
expectedEstimatedCredits: external_exports.number().finite().nonnegative().optional(),
|
|
14080
14217
|
input: CastVideoInputSchema,
|
|
14081
14218
|
/** Spend a free generation instead of credits; refused, never billed, when none covers the video. */
|
|
14082
14219
|
useFreeGeneration: external_exports.boolean().optional()
|
|
14083
14220
|
}).strict();
|
|
14221
|
+
var CastPreparedVideoQuoteSchema = external_exports.object({
|
|
14222
|
+
estimatedCredits: external_exports.number().finite().nonnegative()
|
|
14223
|
+
});
|
|
14084
14224
|
var videoReference = external_exports.object({
|
|
14085
14225
|
generationId: external_exports.string().uuid(),
|
|
14086
14226
|
canvasId: external_exports.string().uuid(),
|
|
@@ -14298,6 +14438,7 @@ var AgentMessageFeedbackResponseSchema = external_exports.object({
|
|
|
14298
14438
|
createdAt: external_exports.string().datetime()
|
|
14299
14439
|
});
|
|
14300
14440
|
var ApprovalCreditShortfallSchema = external_exports.object({
|
|
14441
|
+
creditNotice: AgentCreditNoticeSchema.optional(),
|
|
14301
14442
|
runNodeCount: external_exports.number().int(),
|
|
14302
14443
|
totalNodeCount: external_exports.number().int(),
|
|
14303
14444
|
requiredCredits: external_exports.number(),
|
|
@@ -14678,8 +14819,16 @@ var API_ERROR_CODE = {
|
|
|
14678
14819
|
dittoBetaRequired: "DITTO_BETA_REQUIRED",
|
|
14679
14820
|
/** The Ditto template was retired or deleted; the client asks for another video. */
|
|
14680
14821
|
dittoTemplateNotFound: "DITTO_TEMPLATE_NOT_FOUND",
|
|
14822
|
+
/** The Ditto template changed since the draft took it; the client drops its source. */
|
|
14823
|
+
dittoTemplateChanged: "DITTO_TEMPLATE_CHANGED",
|
|
14824
|
+
/** A Ditto request's source video is gone; the client drops it and asks for a video. */
|
|
14825
|
+
dittoSourceNotFound: "DITTO_SOURCE_NOT_FOUND",
|
|
14826
|
+
/** A Ditto request's image (`assetId`) is gone; the client drops it from the edit. */
|
|
14827
|
+
dittoReferenceNotFound: "DITTO_REFERENCE_NOT_FOUND",
|
|
14681
14828
|
/** The request asked for a free generation and none covers it; refused, never billed. */
|
|
14682
|
-
freeGenerationUnavailable: FREE_GENERATION_UNAVAILABLE_ERROR_CODE
|
|
14829
|
+
freeGenerationUnavailable: FREE_GENERATION_UNAVAILABLE_ERROR_CODE,
|
|
14830
|
+
/** Someone saved the subtitles since this edit started; the client reloads them. */
|
|
14831
|
+
videoSubtitlesRevisionStale: "VIDEO_SUBTITLES_REVISION_STALE"
|
|
14683
14832
|
};
|
|
14684
14833
|
var TEAM_SEAT_LIMIT_REACHED_MESSAGE = `Team supports up to ${TEAM_SEAT_PLAN.maxSeats} seats. We've notified our team and will reach out over email about a larger plan.`;
|
|
14685
14834
|
|
|
@@ -14988,6 +15137,8 @@ var DomainJoinTargetSchema = external_exports.object({
|
|
|
14988
15137
|
alreadyRequested: external_exports.boolean()
|
|
14989
15138
|
});
|
|
14990
15139
|
var TeamInvitationPreviewSchema = external_exports.object({
|
|
15140
|
+
/** Picks the team mark's monogram color. Absent from older servers. */
|
|
15141
|
+
teamId: external_exports.string().uuid().optional(),
|
|
14991
15142
|
teamName: external_exports.string(),
|
|
14992
15143
|
teamPhotoUrl: external_exports.string().nullable(),
|
|
14993
15144
|
memberCount: external_exports.number().int().nonnegative(),
|
|
@@ -15836,6 +15987,8 @@ var ModelVariantResponseSchema = external_exports.object({
|
|
|
15836
15987
|
defaultResolution: OutputResolutionSchema.nullable().optional(),
|
|
15837
15988
|
featuredDescription: external_exports.string().nullable(),
|
|
15838
15989
|
cost: ModelCostSchema.optional(),
|
|
15990
|
+
/** `cost` before the team's model discount; set only when the team has one. */
|
|
15991
|
+
listCost: ModelCostSchema.optional(),
|
|
15839
15992
|
/** Selectable voices for audio variants, or null when none apply. */
|
|
15840
15993
|
voices: VoiceCapabilitySchema.nullable().optional(),
|
|
15841
15994
|
/**
|
|
@@ -15864,6 +16017,8 @@ var ModelResponseSchema = external_exports.object({
|
|
|
15864
16017
|
estimatedLatencySeconds: external_exports.number().nullable().optional(),
|
|
15865
16018
|
featuredDescription: external_exports.string().nullable().optional(),
|
|
15866
16019
|
cost: ModelCostSchema,
|
|
16020
|
+
/** `cost` before the team's model discount; set only when the team has one. */
|
|
16021
|
+
listCost: ModelCostSchema.optional(),
|
|
15867
16022
|
deprecated: external_exports.boolean().optional(),
|
|
15868
16023
|
hiddenFromAgent: external_exports.boolean().optional(),
|
|
15869
16024
|
/** Set on image models. Optional only so a client can read a server that predates it. */
|
|
@@ -16181,7 +16336,8 @@ var DittoModelOptionSchema = DittoModelSchema.extend({
|
|
|
16181
16336
|
});
|
|
16182
16337
|
var ListDittoModelsResponseSchema = external_exports.object({
|
|
16183
16338
|
models: external_exports.array(DittoModelOptionSchema),
|
|
16184
|
-
styleTransferModels: external_exports.array(DittoModelOptionSchema).optional()
|
|
16339
|
+
styleTransferModels: external_exports.array(DittoModelOptionSchema).optional(),
|
|
16340
|
+
sourceClipPreparation: external_exports.boolean().optional()
|
|
16185
16341
|
});
|
|
16186
16342
|
var DittoQuoteSchema = external_exports.object({
|
|
16187
16343
|
id: external_exports.string(),
|
|
@@ -16376,7 +16532,10 @@ var CastGenerationOperationSchema = external_exports.enum(["script", "replacemen
|
|
|
16376
16532
|
var CastGenerationConfigSchema = external_exports.object({
|
|
16377
16533
|
operation: CastGenerationOperationSchema.optional(),
|
|
16378
16534
|
replacement: DittoInputSchema.optional(),
|
|
16379
|
-
sections:
|
|
16535
|
+
sections: castSectionsSchema(
|
|
16536
|
+
external_exports.array(CastAuthoredSectionSchema)
|
|
16537
|
+
).optional(),
|
|
16538
|
+
requestedSeconds: external_exports.number().positive().optional(),
|
|
16380
16539
|
creationSettings: CastCreationSettingsSchema.optional(),
|
|
16381
16540
|
// Attribution must not reject an otherwise valid generation record.
|
|
16382
16541
|
scriptTemplate: CastTemplateReferenceSchema.optional().catch(void 0),
|
|
@@ -16602,6 +16761,7 @@ var CastGenerationConfigSchema = external_exports.object({
|
|
|
16602
16761
|
var SharedCastConfigSchema = CastGenerationConfigSchema.pick({
|
|
16603
16762
|
autoVoice: true,
|
|
16604
16763
|
sections: true,
|
|
16764
|
+
requestedSeconds: true,
|
|
16605
16765
|
creationSettings: true,
|
|
16606
16766
|
aspectRatio: true,
|
|
16607
16767
|
tone: true,
|
|
@@ -17808,12 +17968,14 @@ var SentOnboardingFlowAssignmentSchema = external_exports.enum([
|
|
|
17808
17968
|
"flag_off",
|
|
17809
17969
|
"domain_join",
|
|
17810
17970
|
"no_team",
|
|
17811
|
-
"ditto_entry"
|
|
17971
|
+
"ditto_entry",
|
|
17972
|
+
"cast_entry"
|
|
17812
17973
|
]);
|
|
17813
17974
|
var ONBOARDING_SURFACES = [
|
|
17814
17975
|
"canvas",
|
|
17815
17976
|
"playground",
|
|
17816
17977
|
"cast",
|
|
17978
|
+
"ditto",
|
|
17817
17979
|
"explore"
|
|
17818
17980
|
];
|
|
17819
17981
|
var OnboardingSurfaceSchema = external_exports.enum(ONBOARDING_SURFACES);
|
|
@@ -17847,6 +18009,10 @@ var AccountOnboardingSchema = external_exports.object({
|
|
|
17847
18009
|
// `ditto_entry` assignment). Optional so a newer client still parses a
|
|
17848
18010
|
// server that predates it; read a missing value as false.
|
|
17849
18011
|
dittoEntry: external_exports.boolean().optional(),
|
|
18012
|
+
// The member signed up from Cast and runs its shorter onboarding (the
|
|
18013
|
+
// `cast_entry` assignment). Optional so a newer client still parses a
|
|
18014
|
+
// server that predates it; read a missing value as false.
|
|
18015
|
+
castEntry: external_exports.boolean().optional(),
|
|
17850
18016
|
answers: OnboardingAnswersSchema
|
|
17851
18017
|
});
|
|
17852
18018
|
var UpdateAccountOnboardingSchema = external_exports.object({
|
|
@@ -17882,6 +18048,7 @@ var InAppExperience;
|
|
|
17882
18048
|
InAppExperience2["AgentCreditSavingsOffer"] = "agent_credit_savings_offer";
|
|
17883
18049
|
InAppExperience2["WelcomeCreditsOffer"] = "welcome_credits_offer";
|
|
17884
18050
|
InAppExperience2["FirstMonthDiscountOffer"] = "first_month_discount_offer";
|
|
18051
|
+
InAppExperience2["FreeCastVideoToast"] = "free_cast_video_toast";
|
|
17885
18052
|
InAppExperience2["HomeGuide"] = "home_guide";
|
|
17886
18053
|
InAppExperience2["NodeToolbarSetupGuide"] = "node_toolbar_setup_guide";
|
|
17887
18054
|
InAppExperience2["NodeToolbarResultsGuide"] = "node_toolbar_results_guide";
|
|
@@ -17897,6 +18064,9 @@ var InAppExperience;
|
|
|
17897
18064
|
InAppExperience2["CastAvatarsGuide"] = "cast_avatars_guide";
|
|
17898
18065
|
InAppExperience2["CastConversationGuide"] = "cast_conversation_guide";
|
|
17899
18066
|
InAppExperience2["CastBlanksGuide"] = "cast_blanks_guide";
|
|
18067
|
+
InAppExperience2["CastNamesGuide"] = "cast_names_guide";
|
|
18068
|
+
InAppExperience2["CastShotsGuide"] = "cast_shots_guide";
|
|
18069
|
+
InAppExperience2["CastLanguageGuide"] = "cast_language_guide";
|
|
17900
18070
|
InAppExperience2["ElementCreatorGuide"] = "element_creator_guide";
|
|
17901
18071
|
InAppExperience2["ElementProductDescriptionGuide"] = "element_product_description_guide";
|
|
17902
18072
|
InAppExperience2["PlaygroundGuide"] = "playground_guide";
|
|
@@ -17921,6 +18091,7 @@ var IN_APP_EXPERIENCE_REGISTRY = {
|
|
|
17921
18091
|
[InAppExperience.AgentCreditSavingsOffer]: ON_OUTCOME,
|
|
17922
18092
|
[InAppExperience.WelcomeCreditsOffer]: ON_OUTCOME,
|
|
17923
18093
|
[InAppExperience.FirstMonthDiscountOffer]: ON_OUTCOME,
|
|
18094
|
+
[InAppExperience.FreeCastVideoToast]: ON_OUTCOME,
|
|
17924
18095
|
[InAppExperience.HomeGuide]: { version: 1, suppressAfterShown: true },
|
|
17925
18096
|
[InAppExperience.NodeToolbarSetupGuide]: ON_OUTCOME,
|
|
17926
18097
|
[InAppExperience.NodeToolbarResultsGuide]: ON_OUTCOME,
|
|
@@ -17936,6 +18107,9 @@ var IN_APP_EXPERIENCE_REGISTRY = {
|
|
|
17936
18107
|
[InAppExperience.CastAvatarsGuide]: ON_OUTCOME,
|
|
17937
18108
|
[InAppExperience.CastConversationGuide]: ON_OUTCOME,
|
|
17938
18109
|
[InAppExperience.CastBlanksGuide]: ON_OUTCOME,
|
|
18110
|
+
[InAppExperience.CastNamesGuide]: ON_OUTCOME,
|
|
18111
|
+
[InAppExperience.CastShotsGuide]: ON_OUTCOME,
|
|
18112
|
+
[InAppExperience.CastLanguageGuide]: ON_OUTCOME,
|
|
17939
18113
|
[InAppExperience.ElementCreatorGuide]: ON_OUTCOME,
|
|
17940
18114
|
[InAppExperience.ElementProductDescriptionGuide]: ON_OUTCOME,
|
|
17941
18115
|
[InAppExperience.PlaygroundGuide]: ON_OUTCOME,
|
|
@@ -18283,7 +18457,6 @@ var SharedGenerationOutputSchema = external_exports.object({
|
|
|
18283
18457
|
var SharedCreatorSchema = external_exports.object({
|
|
18284
18458
|
id: external_exports.string().uuid(),
|
|
18285
18459
|
name: external_exports.string(),
|
|
18286
|
-
email: external_exports.string(),
|
|
18287
18460
|
avatarUrl: external_exports.string().nullable()
|
|
18288
18461
|
});
|
|
18289
18462
|
var SharedGenerationResponseSchema = external_exports.object({
|
|
@@ -18717,6 +18890,9 @@ var CompleteUploadBodySchema = external_exports.object({
|
|
|
18717
18890
|
// background refreshes set this so they don't mint a new version each time.
|
|
18718
18891
|
// Explicit user saves omit it and fork a new version as usual.
|
|
18719
18892
|
replaceActiveVersion: external_exports.boolean().optional(),
|
|
18893
|
+
// Set by an upload the member started (a canvas drop or pick), so its
|
|
18894
|
+
// completion notifies them. Omitted ⇒ no notification.
|
|
18895
|
+
notifyUploader: external_exports.boolean().optional(),
|
|
18720
18896
|
// PDF-only: how to process the upload once complete. Omitted ⇒ "summary"
|
|
18721
18897
|
// (the server default and every non-PDF upload). See PdfExtractionModeSchema.
|
|
18722
18898
|
pdfExtractionMode: PdfExtractionModeSchema.optional(),
|
|
@@ -18977,6 +19153,43 @@ var JoinPublicDittoWaitlistBodySchema = external_exports.object({
|
|
|
18977
19153
|
email: external_exports.string().trim().min(3).max(254).email()
|
|
18978
19154
|
});
|
|
18979
19155
|
|
|
19156
|
+
// ../api-contract/src/ditto/source-clips.ts
|
|
19157
|
+
var CancelDittoSourceClipBodySchema = external_exports.object({
|
|
19158
|
+
sessionId: external_exports.string().uuid(),
|
|
19159
|
+
revision: external_exports.number().int().positive().safe()
|
|
19160
|
+
});
|
|
19161
|
+
var PrepareDittoSourceClipBodySchema = CancelDittoSourceClipBodySchema.extend({
|
|
19162
|
+
sourceAssetId: external_exports.string().uuid(),
|
|
19163
|
+
sourceRange: DittoSettingsSchema.shape.sourceRange.unwrap().refine(
|
|
19164
|
+
(range) => range.endMs - range.startMs <= VIDEO_REPLACEMENT_MAX_DURATION_SECONDS * 1e3,
|
|
19165
|
+
"Choose a shorter clip"
|
|
19166
|
+
)
|
|
19167
|
+
});
|
|
19168
|
+
var PrepareDittoSourceClipResponseSchema = external_exports.discriminatedUnion(
|
|
19169
|
+
"status",
|
|
19170
|
+
[
|
|
19171
|
+
PrepareDittoSourceClipBodySchema.extend({
|
|
19172
|
+
status: external_exports.literal("preparing")
|
|
19173
|
+
}),
|
|
19174
|
+
PrepareDittoSourceClipBodySchema.extend({
|
|
19175
|
+
status: external_exports.literal("ready"),
|
|
19176
|
+
asset: external_exports.object({
|
|
19177
|
+
assetId: external_exports.string().uuid(),
|
|
19178
|
+
url: external_exports.string(),
|
|
19179
|
+
durationMs: external_exports.number().finite().positive(),
|
|
19180
|
+
previewUrl: external_exports.string().optional()
|
|
19181
|
+
})
|
|
19182
|
+
}),
|
|
19183
|
+
PrepareDittoSourceClipBodySchema.extend({
|
|
19184
|
+
status: external_exports.literal("failed"),
|
|
19185
|
+
message: external_exports.string()
|
|
19186
|
+
}),
|
|
19187
|
+
PrepareDittoSourceClipBodySchema.extend({
|
|
19188
|
+
status: external_exports.literal("cancelled")
|
|
19189
|
+
})
|
|
19190
|
+
]
|
|
19191
|
+
);
|
|
19192
|
+
|
|
18980
19193
|
// ../api-contract/src/ditto/templates.ts
|
|
18981
19194
|
var DittoTemplateCategorySchema = external_exports.enum([
|
|
18982
19195
|
"dances",
|
|
@@ -19074,6 +19287,10 @@ var SearchDittoTemplatesBodySchema = createCursorPaginationRequestSchema({ defau
|
|
|
19074
19287
|
*/
|
|
19075
19288
|
sort: DittoTemplateSearchSortSchema.optional()
|
|
19076
19289
|
});
|
|
19290
|
+
var DittoTemplateShelfCategorySchema = external_exports.string().trim().min(1).max(64).optional();
|
|
19291
|
+
var SearchPublicDittoTemplatesBodySchema = SearchDittoTemplatesBodySchema.extend({
|
|
19292
|
+
category: DittoTemplateShelfCategorySchema
|
|
19293
|
+
});
|
|
19077
19294
|
var SearchMemberDittoTemplatesBodySchema = SearchDittoTemplatesBodySchema.extend({
|
|
19078
19295
|
/**
|
|
19079
19296
|
* Only the templates a new member starts their first video from:
|
|
@@ -19089,14 +19306,8 @@ var SearchMemberDittoTemplatesBodySchema = SearchDittoTemplatesBodySchema.extend
|
|
|
19089
19306
|
* `starters` takes precedence when both are set.
|
|
19090
19307
|
*/
|
|
19091
19308
|
popular: external_exports.boolean().optional(),
|
|
19092
|
-
/**
|
|
19093
|
-
|
|
19094
|
-
* order on every request, so a Home shelf shows different templates
|
|
19095
|
-
* first each visit. At most `pageSize` of them; one page with no
|
|
19096
|
-
* cursor, and a cursor is refused. `starters` and `popular` take
|
|
19097
|
-
* precedence when set. A category the server doesn't know lists none.
|
|
19098
|
-
*/
|
|
19099
|
-
category: external_exports.string().trim().min(1).max(64).optional(),
|
|
19309
|
+
/** `starters` and `popular` take precedence when set. */
|
|
19310
|
+
category: DittoTemplateShelfCategorySchema,
|
|
19100
19311
|
/**
|
|
19101
19312
|
* Every published template in a random order that each new search
|
|
19102
19313
|
* picks, in place of the staff order. The cursor keeps that order, so
|
|
@@ -19737,7 +19948,8 @@ var agentContract = c.router({
|
|
|
19737
19948
|
contentType: external_exports.string(),
|
|
19738
19949
|
// The member's own name for the file; the S3 key
|
|
19739
19950
|
// is a generated id. Shown on the sent message.
|
|
19740
|
-
filename: external_exports.string().optional()
|
|
19951
|
+
filename: external_exports.string().optional(),
|
|
19952
|
+
nodeId: external_exports.string().uuid().optional()
|
|
19741
19953
|
})
|
|
19742
19954
|
).max(MAX_INPUT_IMAGES).optional(),
|
|
19743
19955
|
videoUrls: external_exports.array(external_exports.string().url()).max(MAX_INPUT_VIDEOS).optional(),
|
|
@@ -19747,7 +19959,8 @@ var agentContract = c.router({
|
|
|
19747
19959
|
s3Key: external_exports.string(),
|
|
19748
19960
|
s3Bucket: external_exports.string(),
|
|
19749
19961
|
contentType: external_exports.string(),
|
|
19750
|
-
filename: external_exports.string().optional()
|
|
19962
|
+
filename: external_exports.string().optional(),
|
|
19963
|
+
nodeId: external_exports.string().uuid().optional()
|
|
19751
19964
|
})
|
|
19752
19965
|
).max(MAX_INPUT_VIDEOS).optional(),
|
|
19753
19966
|
documents: external_exports.array(
|
|
@@ -19756,7 +19969,8 @@ var agentContract = c.router({
|
|
|
19756
19969
|
s3Key: external_exports.string(),
|
|
19757
19970
|
s3Bucket: external_exports.string(),
|
|
19758
19971
|
contentType: external_exports.string(),
|
|
19759
|
-
filename: external_exports.string().optional()
|
|
19972
|
+
filename: external_exports.string().optional(),
|
|
19973
|
+
nodeId: external_exports.string().uuid().optional()
|
|
19760
19974
|
})
|
|
19761
19975
|
).max(MAX_INPUT_DOCUMENTS).optional(),
|
|
19762
19976
|
// Audio files the member attached, each already placed on the
|
|
@@ -19921,6 +20135,30 @@ var agentContract = c.router({
|
|
|
19921
20135
|
summary: "Read the avatar or background options an agent reply showed, as they render"
|
|
19922
20136
|
},
|
|
19923
20137
|
// ── Tool Approvals ──────────────────────────────────────────────────
|
|
20138
|
+
quoteCreditNotice: {
|
|
20139
|
+
method: "GET",
|
|
20140
|
+
path: "/agent/credit-notices/:noticeId/quote",
|
|
20141
|
+
pathParams: external_exports.object({ noticeId: external_exports.string().uuid() }),
|
|
20142
|
+
responses: {
|
|
20143
|
+
200: AgentCreditNoticeQuoteSchema,
|
|
20144
|
+
403: MessageResponseSchema,
|
|
20145
|
+
404: MessageResponseSchema
|
|
20146
|
+
},
|
|
20147
|
+
summary: "Requote the remaining work in a credit notice without starting it"
|
|
20148
|
+
},
|
|
20149
|
+
confirmCreditNotice: {
|
|
20150
|
+
method: "POST",
|
|
20151
|
+
path: "/agent/credit-notices/:noticeId/confirm",
|
|
20152
|
+
pathParams: external_exports.object({ noticeId: external_exports.string().uuid() }),
|
|
20153
|
+
body: external_exports.object({ quoteToken: external_exports.string().min(1).max(128) }),
|
|
20154
|
+
responses: {
|
|
20155
|
+
200: AgentCreditNoticeQuoteSchema,
|
|
20156
|
+
403: MessageResponseSchema,
|
|
20157
|
+
404: MessageResponseSchema,
|
|
20158
|
+
409: MessageResponseSchema
|
|
20159
|
+
},
|
|
20160
|
+
summary: "Explicitly approve a fresh credit notice quote"
|
|
20161
|
+
},
|
|
19924
20162
|
getApproval: {
|
|
19925
20163
|
method: "GET",
|
|
19926
20164
|
path: "/agent/approvals/:approvalId",
|
|
@@ -21012,7 +21250,7 @@ var canvasContract = c5.router({
|
|
|
21012
21250
|
canvasId: external_exports.string().uuid(),
|
|
21013
21251
|
nodeId: external_exports.string().uuid()
|
|
21014
21252
|
}),
|
|
21015
|
-
body:
|
|
21253
|
+
body: RegenerateImageAngleBodySchema,
|
|
21016
21254
|
responses: {
|
|
21017
21255
|
200: QuoteImageAngleResponseSchema,
|
|
21018
21256
|
400: MessageResponseSchema,
|
|
@@ -21031,7 +21269,7 @@ var canvasContract = c5.router({
|
|
|
21031
21269
|
}),
|
|
21032
21270
|
headers: external_exports.object({ "idempotency-key": IdempotencyKeySchema }),
|
|
21033
21271
|
metadata: { idempotent: true },
|
|
21034
|
-
body:
|
|
21272
|
+
body: RegenerateImageAngleBodySchema,
|
|
21035
21273
|
responses: {
|
|
21036
21274
|
201: CreateImageAngleResponseSchema,
|
|
21037
21275
|
202: external_exports.object({ approvalId: external_exports.string().uuid() }),
|
|
@@ -21208,6 +21446,18 @@ var canvasContract = c5.router({
|
|
|
21208
21446
|
404: NodeRunErrorResponseSchema
|
|
21209
21447
|
}
|
|
21210
21448
|
},
|
|
21449
|
+
// Read-only: prices a video tool run without starting it.
|
|
21450
|
+
quoteVideoToolRun: {
|
|
21451
|
+
method: "POST",
|
|
21452
|
+
path: "/nodes/:nodeId/video-tool-run-quotes",
|
|
21453
|
+
pathParams: external_exports.object({ nodeId: external_exports.string().uuid() }),
|
|
21454
|
+
body: RunVideoToolBodySchema,
|
|
21455
|
+
responses: {
|
|
21456
|
+
200: QuoteVideoToolRunResponseSchema,
|
|
21457
|
+
400: NodeRunErrorResponseSchema,
|
|
21458
|
+
404: NodeRunErrorResponseSchema
|
|
21459
|
+
}
|
|
21460
|
+
},
|
|
21211
21461
|
extractVideoFrame: {
|
|
21212
21462
|
method: "POST",
|
|
21213
21463
|
path: "/nodes/:nodeId/frame-extractions",
|
|
@@ -21417,7 +21667,7 @@ var canvasContract = c5.router({
|
|
|
21417
21667
|
...BulkRunFreeGenerationFields
|
|
21418
21668
|
}),
|
|
21419
21669
|
responses: {
|
|
21420
|
-
201:
|
|
21670
|
+
201: BulkNodeRunStartResponseSchema,
|
|
21421
21671
|
202: external_exports.object({ approvalId: external_exports.string().uuid() }),
|
|
21422
21672
|
400: MessageResponseSchema
|
|
21423
21673
|
}
|
|
@@ -21964,6 +22214,29 @@ var customFontContract = c6.router({
|
|
|
21964
22214
|
// ../api-contract/src/ditto/routes.ts
|
|
21965
22215
|
var c7 = initContract();
|
|
21966
22216
|
var dittoContract = c7.router({
|
|
22217
|
+
prepareSourceClip: {
|
|
22218
|
+
method: "POST",
|
|
22219
|
+
path: "/ditto/source-clips",
|
|
22220
|
+
body: PrepareDittoSourceClipBodySchema,
|
|
22221
|
+
responses: {
|
|
22222
|
+
200: PrepareDittoSourceClipResponseSchema,
|
|
22223
|
+
400: ApiErrorResponseSchema,
|
|
22224
|
+
403: ApiErrorResponseSchema,
|
|
22225
|
+
404: ApiErrorResponseSchema,
|
|
22226
|
+
410: ApiErrorResponseSchema
|
|
22227
|
+
}
|
|
22228
|
+
},
|
|
22229
|
+
cancelSourceClip: {
|
|
22230
|
+
method: "POST",
|
|
22231
|
+
path: "/ditto/source-clips/cancel",
|
|
22232
|
+
body: CancelDittoSourceClipBodySchema,
|
|
22233
|
+
responses: {
|
|
22234
|
+
200: external_exports.object({ success: external_exports.literal(true) }),
|
|
22235
|
+
400: ApiErrorResponseSchema,
|
|
22236
|
+
403: ApiErrorResponseSchema,
|
|
22237
|
+
410: ApiErrorResponseSchema
|
|
22238
|
+
}
|
|
22239
|
+
},
|
|
21967
22240
|
searchTemplates: {
|
|
21968
22241
|
method: "POST",
|
|
21969
22242
|
path: "/ditto/templates/search",
|
|
@@ -21996,13 +22269,21 @@ var dittoContract = c7.router({
|
|
|
21996
22269
|
searchPublicTemplates: {
|
|
21997
22270
|
method: "POST",
|
|
21998
22271
|
path: "/ditto/public/templates/search",
|
|
21999
|
-
body:
|
|
22272
|
+
body: SearchPublicDittoTemplatesBodySchema,
|
|
22000
22273
|
responses: {
|
|
22001
22274
|
200: SearchDittoTemplatesResponseSchema,
|
|
22002
22275
|
400: MessageResponseSchema
|
|
22003
22276
|
},
|
|
22004
22277
|
summary: "Published Ditto templates, readable without signing in"
|
|
22005
22278
|
},
|
|
22279
|
+
listPublicTemplateShelves: {
|
|
22280
|
+
method: "GET",
|
|
22281
|
+
path: "/ditto/public/templates/shelves",
|
|
22282
|
+
responses: {
|
|
22283
|
+
200: ListDittoTemplateShelvesResponseSchema
|
|
22284
|
+
},
|
|
22285
|
+
summary: "Home's template shelves in order, each searched with searchPublicTemplates' category, readable without signing in"
|
|
22286
|
+
},
|
|
22006
22287
|
getPublicTemplate: {
|
|
22007
22288
|
method: "GET",
|
|
22008
22289
|
path: "/ditto/public/templates/:id",
|
|
@@ -23443,6 +23724,12 @@ var freeGenerationContract = c10.router({
|
|
|
23443
23724
|
path: "/free-generations",
|
|
23444
23725
|
responses: { 200: ListFreeGenerationsResponseSchema },
|
|
23445
23726
|
summary: "List the team's free generations: what each covers and how many are left"
|
|
23727
|
+
},
|
|
23728
|
+
getFirstCastVideoOffer: {
|
|
23729
|
+
method: "GET",
|
|
23730
|
+
path: "/free-generations/first-cast-video-offer",
|
|
23731
|
+
responses: { 200: FirstCastVideoOfferResponseSchema },
|
|
23732
|
+
summary: "Whether saving a card now would earn the team its first free Cast video"
|
|
23446
23733
|
}
|
|
23447
23734
|
});
|
|
23448
23735
|
|
|
@@ -24375,15 +24662,18 @@ var CastScriptLanguageSchema = external_exports.object({
|
|
|
24375
24662
|
|
|
24376
24663
|
// ../api-contract/src/cast/comment-read.ts
|
|
24377
24664
|
var CastCommentReadBodySchema = external_exports.object({
|
|
24378
|
-
/** The script as written: its words, actions and
|
|
24379
|
-
sections:
|
|
24380
|
-
|
|
24381
|
-
|
|
24382
|
-
|
|
24383
|
-
|
|
24384
|
-
|
|
24385
|
-
|
|
24386
|
-
|
|
24665
|
+
/** The script as written: its words, actions, scenes and Shots. */
|
|
24666
|
+
sections: castSectionsSchema(
|
|
24667
|
+
external_exports.array(
|
|
24668
|
+
CastAuthoredSectionSchema.pick({
|
|
24669
|
+
text: true,
|
|
24670
|
+
action: true,
|
|
24671
|
+
scene: true,
|
|
24672
|
+
kind: true,
|
|
24673
|
+
cutaway: true
|
|
24674
|
+
})
|
|
24675
|
+
).min(1)
|
|
24676
|
+
)
|
|
24387
24677
|
}).strict();
|
|
24388
24678
|
var CastCommentReadSchema = external_exports.object({
|
|
24389
24679
|
/** Null when the script quotes no comment it replies to, or the read could not tell. */
|
|
@@ -24497,6 +24787,12 @@ var CastPropReferenceSchema = external_exports.object({
|
|
|
24497
24787
|
assetId: external_exports.string().uuid(),
|
|
24498
24788
|
referenceAssetId: external_exports.string().uuid().describe(
|
|
24499
24789
|
"The picture the clip takes for this prop: the prop picture itself, or a copy showing the product alone when the picture shows a real person."
|
|
24790
|
+
),
|
|
24791
|
+
showsPerson: external_exports.literal(true).optional().describe(
|
|
24792
|
+
"The prop picture shows a real person and the clip has no product-only copy to take instead, because every image model refused the edit or it is still running, so it would take that person as its presenter."
|
|
24793
|
+
),
|
|
24794
|
+
copyPending: external_exports.literal(true).optional().describe(
|
|
24795
|
+
"With showsPerson: the product-only copy is still being made or stored, so a Generate a few minutes later gets it."
|
|
24500
24796
|
)
|
|
24501
24797
|
});
|
|
24502
24798
|
var ResolveCastPropReferencesResponseSchema = external_exports.object({
|
|
@@ -24538,6 +24834,17 @@ var castContract = c18.router({
|
|
|
24538
24834
|
},
|
|
24539
24835
|
summary: "Resolve saved video inputs and estimate credits without starting a generation"
|
|
24540
24836
|
},
|
|
24837
|
+
readCastPreparedVideoQuote: {
|
|
24838
|
+
method: "POST",
|
|
24839
|
+
path: "/cast/videos/prepared-quote",
|
|
24840
|
+
body: RunCastVideoBodySchema.omit({ expectedEstimatedCredits: true }),
|
|
24841
|
+
responses: {
|
|
24842
|
+
200: CastPreparedVideoQuoteSchema,
|
|
24843
|
+
400: MessageResponseSchema,
|
|
24844
|
+
403: MessageResponseSchema
|
|
24845
|
+
},
|
|
24846
|
+
summary: "Read the bound estimate for an existing prepared video"
|
|
24847
|
+
},
|
|
24541
24848
|
runCastVideo: {
|
|
24542
24849
|
method: "POST",
|
|
24543
24850
|
headers: IdempotencyRequestHeadersSchema,
|
|
@@ -24896,6 +25203,7 @@ var publicContract = c19.router(
|
|
|
24896
25203
|
options: castContract.getCastOptions,
|
|
24897
25204
|
library: castContract.searchCastLibrary,
|
|
24898
25205
|
prepare: castContract.prepareCastVideo,
|
|
25206
|
+
preparedQuote: castContract.readCastPreparedVideoQuote,
|
|
24899
25207
|
run: castContract.runCastVideo,
|
|
24900
25208
|
get: castContract.getCastVideo,
|
|
24901
25209
|
download: castContract.downloadCastVideo,
|
|
@@ -25955,7 +26263,7 @@ function isMajorUpgrade(current, latest) {
|
|
|
25955
26263
|
return l[0] > c20[0];
|
|
25956
26264
|
}
|
|
25957
26265
|
function shouldShowUpgradeNotice(ctx = {}) {
|
|
25958
|
-
const current = ctx.current ?? "0.
|
|
26266
|
+
const current = ctx.current ?? "0.48.0";
|
|
25959
26267
|
const latest = ctx.latest ?? serverLatestVersion;
|
|
25960
26268
|
const env = ctx.env ?? process.env;
|
|
25961
26269
|
const isTty = ctx.isTty ?? Boolean(process.stderr.isTTY);
|
|
@@ -25976,7 +26284,7 @@ Upgrade: npm install -g @melius-ai/cli@latest (or: brew update && brew upgrade
|
|
|
25976
26284
|
function printUpgradeNoticeIfNeeded(ctx = {}) {
|
|
25977
26285
|
try {
|
|
25978
26286
|
if (!shouldShowUpgradeNotice(ctx)) return;
|
|
25979
|
-
const current = ctx.current ?? "0.
|
|
26287
|
+
const current = ctx.current ?? "0.48.0";
|
|
25980
26288
|
const latest = ctx.latest ?? serverLatestVersion;
|
|
25981
26289
|
process.stderr.write(formatUpgradeNotice(current, latest));
|
|
25982
26290
|
} catch {
|
|
@@ -26083,7 +26391,7 @@ function createClient(config) {
|
|
|
26083
26391
|
"Bypass-Tunnel-Reminder": "true",
|
|
26084
26392
|
[CUSTOM_REQUEST_HEADERS.meliusClient]: buildMeliusClientHeader({
|
|
26085
26393
|
surface: "cli",
|
|
26086
|
-
version: "0.
|
|
26394
|
+
version: "0.48.0"
|
|
26087
26395
|
})
|
|
26088
26396
|
};
|
|
26089
26397
|
if (config.teamId) {
|
|
@@ -26399,7 +26707,9 @@ function readCastRequest(path5) {
|
|
|
26399
26707
|
}
|
|
26400
26708
|
function readCastSubmission(path5) {
|
|
26401
26709
|
const prepared = parseCastValue(
|
|
26402
|
-
PrepareCastVideoResponseSchema
|
|
26710
|
+
PrepareCastVideoResponseSchema.and(
|
|
26711
|
+
CastVideoRequestSchema.pick({ useFreeGeneration: true }).strip()
|
|
26712
|
+
),
|
|
26403
26713
|
readCastJson(path5),
|
|
26404
26714
|
"Use the complete response from mel cast prepare. Run: mel cast run --help"
|
|
26405
26715
|
);
|
|
@@ -26415,7 +26725,16 @@ function readCastSubmission(path5) {
|
|
|
26415
26725
|
EXIT_USAGE_ERROR
|
|
26416
26726
|
);
|
|
26417
26727
|
}
|
|
26418
|
-
return {
|
|
26728
|
+
return {
|
|
26729
|
+
attemptId: prepared.attemptId,
|
|
26730
|
+
input: prepared.input,
|
|
26731
|
+
...prepared.preparationToken && {
|
|
26732
|
+
preparationToken: prepared.preparationToken
|
|
26733
|
+
},
|
|
26734
|
+
...prepared.useFreeGeneration !== void 0 && {
|
|
26735
|
+
useFreeGeneration: prepared.useFreeGeneration
|
|
26736
|
+
}
|
|
26737
|
+
};
|
|
26419
26738
|
}
|
|
26420
26739
|
var CAMERA_MOVE_OPTION_DESCRIPTION = `Camera move for a variant with supportsCameraMove: true in mel model list (requires --model and --variant): a preset (${CAMERA_PRESETS.join(", ")}) or a keyframed path as JSON {"type":"path","keyframes":[{"time":0-1,"azimuth":degrees,"elevation":-90-90,"distance":>0}, ...2-12]}. Omit to let the prompt direct the camera`;
|
|
26421
26740
|
function parseCameraMove(value, source) {
|
|
@@ -28282,15 +28601,23 @@ Examples:
|
|
|
28282
28601
|
$ mel cast prepare --input-file <template-request.json>`
|
|
28283
28602
|
).action(async (options) => {
|
|
28284
28603
|
const body = readCastRequest(options.inputFile);
|
|
28604
|
+
const useFreeGeneration = body.useFreeGeneration ?? false;
|
|
28285
28605
|
const client = getClient();
|
|
28606
|
+
const prepared = await castRequest(
|
|
28607
|
+
(signal) => client.cast.prepare({
|
|
28608
|
+
body: { ...body, useFreeGeneration },
|
|
28609
|
+
fetchOptions: { signal }
|
|
28610
|
+
}),
|
|
28611
|
+
{
|
|
28612
|
+
label: "Cast preparation",
|
|
28613
|
+
suggestion: "Run: mel cast prepare --help"
|
|
28614
|
+
}
|
|
28615
|
+
);
|
|
28286
28616
|
writeJson(
|
|
28287
|
-
|
|
28288
|
-
|
|
28289
|
-
|
|
28290
|
-
|
|
28291
|
-
suggestion: "Run: mel cast prepare --help"
|
|
28292
|
-
}
|
|
28293
|
-
),
|
|
28617
|
+
{
|
|
28618
|
+
...prepared,
|
|
28619
|
+
useFreeGeneration
|
|
28620
|
+
},
|
|
28294
28621
|
getOutputOpts()
|
|
28295
28622
|
);
|
|
28296
28623
|
});
|
|
@@ -32019,7 +32346,7 @@ function registerFreeGenerationCommands(program2, getOutputOpts) {
|
|
|
32019
32346
|
"after",
|
|
32020
32347
|
`
|
|
32021
32348
|
Returns: an array of { grantId, scopeTemplateId, label, unit, scope, quantity, remaining, source, startsAt, expiresAt, availableToCaller }, in the order runs use them (the soonest expiry first; expiresAt null never expires).
|
|
32022
|
-
scope is what one free generation covers: actions (${GRANTABLE_FREE_GENERATION_ACTION_KINDS.join(", ")}), callers (${FREE_GENERATION_CALLERS.join(", ")}), models, and limits (resolutions, maxDurationSeconds, maxOutputs). Every listed setting has to match.
|
|
32349
|
+
scope is what one free generation covers: actions (${GRANTABLE_FREE_GENERATION_ACTION_KINDS.join(", ")}), callers (${FREE_GENERATION_CALLERS.join(", ")}), media (${FREE_GENERATION_MEDIA.join(", ")}), models, and limits (resolutions, maxDurationSeconds, maxOutputs). Every listed setting has to match.
|
|
32023
32350
|
A run from the CLI can use one only when availableToCaller is true and remaining is above 0.
|
|
32024
32351
|
To use one, add --use-free-generation to mel run start, mel bulk-run start or mel ditto run. A run that asks for one and finds none that covers it is refused, never billed.
|
|
32025
32352
|
|
|
@@ -33288,7 +33615,7 @@ function withDefaultHelp(args) {
|
|
|
33288
33615
|
}
|
|
33289
33616
|
function createProgram() {
|
|
33290
33617
|
const program2 = new Command();
|
|
33291
|
-
program2.name("mel").description("Mel \u2014 Melius agent CLI").version("0.
|
|
33618
|
+
program2.name("mel").description("Mel \u2014 Melius agent CLI").version("0.48.0").showSuggestionAfterError(true).option("--json", "Force JSON output (default)").option("--text", "Human-readable output").option(
|
|
33292
33619
|
"--fields <fields>",
|
|
33293
33620
|
"Select specific output fields (comma-separated)"
|
|
33294
33621
|
).option("--quiet", "Suppress output, exit code only").option("--verbose", "Log request/response metadata to stderr").addHelpText(
|
package/dist/src/index.js
CHANGED