@melius-ai/cli 0.15.4 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/bin/mel.js +1 -1
- package/dist/{chunk-LAHVPP66.js → chunk-CIN7LTNL.js} +348 -74
- package/dist/src/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -106,6 +106,7 @@ All node mutations write directly to the CRDT document. Changes are synced to co
|
|
|
106
106
|
--prompt <text> Text prompt (maps to textPrompt)
|
|
107
107
|
--model <m> Model name (requires --variant)
|
|
108
108
|
--variant <v> Model variant (requires --model)
|
|
109
|
+
--tier <t> Speed tier of that model+variant (fast, pro, turbo; requires --model and --variant). Omit for standard speed
|
|
109
110
|
--aspect-ratio <r> 21:9, 16:9, 4:3, 3:2, 1:1, 2:3, 3:4, 9:16, 9:21
|
|
110
111
|
--duration <n> Output duration in seconds (video only)
|
|
111
112
|
--x, --y, --w, --h Geometry (defaults per type: text 380x200, image 520x293)
|
|
@@ -141,6 +142,8 @@ Edge type determines data flow: `text` passes text output, `image` passes image
|
|
|
141
142
|
|
|
142
143
|
**Node tools:** `mel run tool` post-processes a node's finished asset in place and creates a new active version. The currently supported tool is `remove-background` for image and image-backed file nodes. Pass the returned run ID to `mel run wait` before inspecting the result with `mel canvas content <canvasId> --node-id <nodeId> --include-all-versions`.
|
|
143
144
|
|
|
145
|
+
**Speed tiers:** a model can serve the same variant at more than one speed, and a speed word attached to a model names a tier rather than a separate model — "Wan 3.0 Fast" is `--model wan-3.0 --variant text-to-video --tier fast`. Each variant's `tier` comes from `mel model list`, and tiers can be priced differently from the standard speed.
|
|
146
|
+
|
|
144
147
|
**Auto-model resolution:** when `--model`/`--variant` are omitted, `mel run start` automatically resolves the correct model from the platform defaults. `--canvas-id` is required so the CLI can verify the node is on the canvas and the backend can do edge-aware detection (picks `image-to-image` when the node has incoming image edges). Always source the node ID from the latest `mel canvas content` output or the current-turn `idMap` returned by `mel node bulk-create`.
|
|
145
148
|
|
|
146
149
|
```bash
|
|
@@ -150,6 +153,9 @@ mel run start <nodeId> --canvas-id <canvasId>
|
|
|
150
153
|
# Explicit model
|
|
151
154
|
mel run start <nodeId> --canvas-id <canvasId> --model flux-pro --variant text-to-image
|
|
152
155
|
|
|
156
|
+
# Explicit model at a non-standard speed tier
|
|
157
|
+
mel run start <nodeId> --canvas-id <canvasId> --model wan-3.0 --variant text-to-video --tier fast
|
|
158
|
+
|
|
153
159
|
# With overrides
|
|
154
160
|
mel run start <nodeId> --canvas-id <canvasId> --prompt "Override prompt" --variations 3
|
|
155
161
|
|
package/dist/bin/mel.js
CHANGED
|
@@ -7741,7 +7741,7 @@ var MAX_INPUT_DOCUMENTS = 5;
|
|
|
7741
7741
|
var MAX_AGENT_MESSAGE_CONTENT_LENGTH = 5e4;
|
|
7742
7742
|
var MAX_SEED = 2147483647;
|
|
7743
7743
|
var MAX_VARIATIONS = 10;
|
|
7744
|
-
var MAX_PINNED_MODELS =
|
|
7744
|
+
var MAX_PINNED_MODELS = 20;
|
|
7745
7745
|
|
|
7746
7746
|
// ../api-contract/src/common.ts
|
|
7747
7747
|
var MessageResponseSchema = external_exports.object({ message: external_exports.string() });
|
|
@@ -7757,6 +7757,17 @@ var CompletedPartSchema = external_exports.object({
|
|
|
7757
7757
|
partNumber: external_exports.number().int().positive(),
|
|
7758
7758
|
etag: external_exports.string()
|
|
7759
7759
|
});
|
|
7760
|
+
var NodeMaterializationPayloadSchema = external_exports.object({
|
|
7761
|
+
nodeType: external_exports.string(),
|
|
7762
|
+
geometry: external_exports.object({
|
|
7763
|
+
x: external_exports.number(),
|
|
7764
|
+
y: external_exports.number(),
|
|
7765
|
+
w: external_exports.number(),
|
|
7766
|
+
h: external_exports.number()
|
|
7767
|
+
}),
|
|
7768
|
+
title: external_exports.string().optional(),
|
|
7769
|
+
createdByUserId: external_exports.string().uuid().optional()
|
|
7770
|
+
});
|
|
7760
7771
|
function paginationQuery({
|
|
7761
7772
|
maxLimit,
|
|
7762
7773
|
defaultLimit
|
|
@@ -7922,6 +7933,12 @@ var FileCardSchema = external_exports.object({
|
|
|
7922
7933
|
// version-stack affordance on the card and whether the viewer shows the
|
|
7923
7934
|
// read-only Versions list. Absent/`<= 1` means a single version (no stack).
|
|
7924
7935
|
versionCount: external_exports.number().int().nonnegative().optional(),
|
|
7936
|
+
// Live comments on this asset, across every thread on it — the count the
|
|
7937
|
+
// viewer's Comments tab would show. Drives the comment indicator on the
|
|
7938
|
+
// card so a member can see which assets are being discussed without opening
|
|
7939
|
+
// each one. Optional so a client that ships ahead of the server keeps
|
|
7940
|
+
// validating; absent reads the same as zero.
|
|
7941
|
+
commentCount: external_exports.number().int().nonnegative().optional(),
|
|
7925
7942
|
// Node/version to toggle when favoriting this asset from a Files surface.
|
|
7926
7943
|
favoriteNodeId: external_exports.string().uuid().nullable().optional(),
|
|
7927
7944
|
favoriteVersionId: external_exports.string().uuid().nullable().optional(),
|
|
@@ -8214,6 +8231,28 @@ var ImportGoogleDriveFileBodySchema = external_exports.object({
|
|
|
8214
8231
|
var ImportGoogleDriveFileResponseSchema = external_exports.object({
|
|
8215
8232
|
file: FileCardSchema
|
|
8216
8233
|
});
|
|
8234
|
+
var StartGoogleDriveImportJobBodySchema = external_exports.object({
|
|
8235
|
+
requestId: external_exports.string().uuid(),
|
|
8236
|
+
driveFileId: external_exports.string().min(1).max(MAX_GOOGLE_DRIVE_FILE_ID_LENGTH),
|
|
8237
|
+
folderId: external_exports.string().uuid().nullable().optional()
|
|
8238
|
+
});
|
|
8239
|
+
var StartGoogleDriveImportJobResponseSchema = external_exports.object({
|
|
8240
|
+
jobId: external_exports.string().uuid()
|
|
8241
|
+
});
|
|
8242
|
+
var GoogleDriveImportJobParamsSchema = external_exports.object({
|
|
8243
|
+
jobId: external_exports.string().uuid()
|
|
8244
|
+
});
|
|
8245
|
+
var GoogleDriveImportJobStatusSchema = external_exports.discriminatedUnion("status", [
|
|
8246
|
+
external_exports.object({ status: external_exports.literal("running") }),
|
|
8247
|
+
external_exports.object({
|
|
8248
|
+
status: external_exports.literal("completed"),
|
|
8249
|
+
file: FileCardSchema
|
|
8250
|
+
}),
|
|
8251
|
+
external_exports.object({
|
|
8252
|
+
status: external_exports.literal("failed"),
|
|
8253
|
+
message: external_exports.string()
|
|
8254
|
+
})
|
|
8255
|
+
]);
|
|
8217
8256
|
var UploadcareUploadSignatureResponseSchema = external_exports.object({
|
|
8218
8257
|
signature: external_exports.string(),
|
|
8219
8258
|
/** Unix seconds, as a string — the exact bytes that were signed. */
|
|
@@ -8562,7 +8601,7 @@ var agentContract = c.router({
|
|
|
8562
8601
|
// Per-turn override for the persisted profile setting.
|
|
8563
8602
|
// Omitted = use the user's saved preference.
|
|
8564
8603
|
agentAutoRunOverride: external_exports.boolean().optional(),
|
|
8565
|
-
// Plan mode
|
|
8604
|
+
// Plan mode: run this turn on the
|
|
8566
8605
|
// execution model with high reasoning and a read-only toolset
|
|
8567
8606
|
// so the agent drafts or refines a plan instead of executing.
|
|
8568
8607
|
// Ignored (normal turn) when the flag is off for the caller.
|
|
@@ -8786,6 +8825,15 @@ var agentContract = c.router({
|
|
|
8786
8825
|
}
|
|
8787
8826
|
});
|
|
8788
8827
|
|
|
8828
|
+
// ../api-contract/src/errors.ts
|
|
8829
|
+
var API_ERROR_CODE = {
|
|
8830
|
+
projectNameTaken: "PROJECT_NAME_TAKEN",
|
|
8831
|
+
apiKeyNameTaken: "API_KEY_NAME_TAKEN",
|
|
8832
|
+
accountNotFound: "ACCOUNT_NOT_FOUND",
|
|
8833
|
+
/** The `:teamId` in the path names a different team than `X-Team-Id`. */
|
|
8834
|
+
teamIdMismatch: "TEAM_ID_MISMATCH"
|
|
8835
|
+
};
|
|
8836
|
+
|
|
8789
8837
|
// ../api-contract/src/api-key/schema.ts
|
|
8790
8838
|
var MAX_API_KEY_NAME_LENGTH = 255;
|
|
8791
8839
|
var CreateApiKeyBodySchema = external_exports.object({
|
|
@@ -8798,6 +8846,9 @@ var CreateApiKeyBodySchema = external_exports.object({
|
|
|
8798
8846
|
var RenameApiKeyBodySchema = external_exports.object({
|
|
8799
8847
|
name: external_exports.string().trim().min(1).max(MAX_API_KEY_NAME_LENGTH)
|
|
8800
8848
|
});
|
|
8849
|
+
var API_KEY_CONFLICT_CODE = {
|
|
8850
|
+
nameTaken: API_ERROR_CODE.apiKeyNameTaken
|
|
8851
|
+
};
|
|
8801
8852
|
var AGENT_SESSION_KEY_NAME_PREFIX = "agent-session-";
|
|
8802
8853
|
var API_KEY_NAME_RESERVED_MESSAGE = `"${AGENT_SESSION_KEY_NAME_PREFIX}" is a reserved name prefix`;
|
|
8803
8854
|
var ApiKeyResponseSchema = external_exports.object({
|
|
@@ -8959,6 +9010,9 @@ var STANDARD_VOICE_LIBRARY_FILTER_OPTIONS = {
|
|
|
8959
9010
|
age: ["young", "middle_aged", "old"],
|
|
8960
9011
|
useCase: STANDARD_VOICE_LIBRARY_USE_CASES.map((entry) => entry.value)
|
|
8961
9012
|
};
|
|
9013
|
+
var USE_CASE_LABEL_BY_VALUE = Object.fromEntries(
|
|
9014
|
+
STANDARD_VOICE_LIBRARY_USE_CASES.map((entry) => [entry.value, entry.label])
|
|
9015
|
+
);
|
|
8962
9016
|
var asZodEnum = (values) => values;
|
|
8963
9017
|
var AudioVoiceResponseSchema = external_exports.object({
|
|
8964
9018
|
voiceId: external_exports.string(),
|
|
@@ -8967,10 +9021,7 @@ var AudioVoiceResponseSchema = external_exports.object({
|
|
|
8967
9021
|
previewUrl: external_exports.string().url().nullable(),
|
|
8968
9022
|
labels: external_exports.record(external_exports.string())
|
|
8969
9023
|
});
|
|
8970
|
-
var
|
|
8971
|
-
page: external_exports.coerce.number().int().min(0).default(0),
|
|
8972
|
-
pageSize: external_exports.coerce.number().int().min(1).max(100).default(AUDIO_VOICE_LIBRARY_PAGE_SIZE),
|
|
8973
|
-
search: external_exports.string().optional(),
|
|
9024
|
+
var StandardVoiceLibraryFilterQueryShape = {
|
|
8974
9025
|
/** Maps to `category=high_quality` on ElevenLabs (`studio` is the only value). */
|
|
8975
9026
|
quality: external_exports.enum(asZodEnum(STANDARD_VOICE_LIBRARY_FILTER_OPTIONS.quality)).optional(),
|
|
8976
9027
|
language: external_exports.enum(asZodEnum(STANDARD_VOICE_LIBRARY_FILTER_OPTIONS.language)).optional(),
|
|
@@ -8978,6 +9029,12 @@ var ListAudioVoicesQuerySchema = external_exports.object({
|
|
|
8978
9029
|
gender: external_exports.enum(asZodEnum(STANDARD_VOICE_LIBRARY_FILTER_OPTIONS.gender)).optional(),
|
|
8979
9030
|
age: external_exports.enum(asZodEnum(STANDARD_VOICE_LIBRARY_FILTER_OPTIONS.age)).optional(),
|
|
8980
9031
|
useCase: external_exports.enum(asZodEnum(STANDARD_VOICE_LIBRARY_FILTER_OPTIONS.useCase)).optional()
|
|
9032
|
+
};
|
|
9033
|
+
var ListAudioVoicesQuerySchema = external_exports.object({
|
|
9034
|
+
page: external_exports.coerce.number().int().min(0).default(0),
|
|
9035
|
+
pageSize: external_exports.coerce.number().int().min(1).max(100).default(AUDIO_VOICE_LIBRARY_PAGE_SIZE),
|
|
9036
|
+
search: external_exports.string().optional(),
|
|
9037
|
+
...StandardVoiceLibraryFilterQueryShape
|
|
8981
9038
|
});
|
|
8982
9039
|
var ListAudioVoicesResponseSchema = external_exports.object({
|
|
8983
9040
|
voices: external_exports.array(AudioVoiceResponseSchema),
|
|
@@ -9169,7 +9226,8 @@ var CANVAS_NODE_TYPES = [
|
|
|
9169
9226
|
"pdf",
|
|
9170
9227
|
"composite",
|
|
9171
9228
|
"stitch",
|
|
9172
|
-
"magic_resize"
|
|
9229
|
+
"magic_resize",
|
|
9230
|
+
"element"
|
|
9173
9231
|
];
|
|
9174
9232
|
var CANVAS_GROUP_TYPES = ["default", "unified", "template"];
|
|
9175
9233
|
var CANVAS_MEDIA_TYPES = ["image", "video", "audio", "pdf"];
|
|
@@ -9257,13 +9315,13 @@ var AUTO_MODEL_REGISTRY = [
|
|
|
9257
9315
|
{
|
|
9258
9316
|
nodeType: "image",
|
|
9259
9317
|
inputPattern: "text-to-image",
|
|
9260
|
-
model: "
|
|
9318
|
+
model: "seedream-5-pro",
|
|
9261
9319
|
variant: "text-to-image"
|
|
9262
9320
|
},
|
|
9263
9321
|
{
|
|
9264
9322
|
nodeType: "image",
|
|
9265
9323
|
inputPattern: "image-to-image",
|
|
9266
|
-
model: "
|
|
9324
|
+
model: "seedream-5-pro",
|
|
9267
9325
|
variant: "image-to-image"
|
|
9268
9326
|
},
|
|
9269
9327
|
// ── Text ────────────────────────────────────────────────────────────
|
|
@@ -9507,6 +9565,12 @@ var MODALITIES = {
|
|
|
9507
9565
|
var GENERATIVE_NODE_TYPES = Object.keys(
|
|
9508
9566
|
MODALITIES
|
|
9509
9567
|
);
|
|
9568
|
+
var SOURCE_ONLY_NODE_TYPES = /* @__PURE__ */ new Set([
|
|
9569
|
+
"custom_text",
|
|
9570
|
+
"file",
|
|
9571
|
+
"pdf",
|
|
9572
|
+
"element"
|
|
9573
|
+
]);
|
|
9510
9574
|
var NODE_DEFAULTS = {
|
|
9511
9575
|
text: { title: "Text", mode: "text", prompt: "" },
|
|
9512
9576
|
image: {
|
|
@@ -9538,7 +9602,8 @@ var NODE_DEFAULTS = {
|
|
|
9538
9602
|
magic_resize: {
|
|
9539
9603
|
title: "Magic resize",
|
|
9540
9604
|
ratios: ["16:9", "1:1", "9:16", "4:3", "3:4"]
|
|
9541
|
-
}
|
|
9605
|
+
},
|
|
9606
|
+
element: { title: "Element", src: "", mediaType: "image" }
|
|
9542
9607
|
};
|
|
9543
9608
|
function estimateNodeHeight(contentHeight) {
|
|
9544
9609
|
return contentHeight + NODE_CARD_OVERHEAD;
|
|
@@ -9598,6 +9663,7 @@ function getDefaultGeometry(nodeType, aspectRatio) {
|
|
|
9598
9663
|
return { x: 0, y: 0, w, h: estimateNodeHeight(contentH) };
|
|
9599
9664
|
}
|
|
9600
9665
|
case "file":
|
|
9666
|
+
case "element":
|
|
9601
9667
|
return {
|
|
9602
9668
|
x: 0,
|
|
9603
9669
|
y: 0,
|
|
@@ -9662,6 +9728,7 @@ function getPresetNodeWidth(type, aspectRatio, explicitWidth) {
|
|
|
9662
9728
|
function getEstimatedHeight(type) {
|
|
9663
9729
|
switch (type) {
|
|
9664
9730
|
case "file":
|
|
9731
|
+
case "element":
|
|
9665
9732
|
return 320;
|
|
9666
9733
|
case "text":
|
|
9667
9734
|
case "custom_text":
|
|
@@ -10055,19 +10122,26 @@ function computeAutoformat(allNodes, allEdges, nodeIds) {
|
|
|
10055
10122
|
const rawComponents = findConnectedComponents(targetIds, topologyEdges);
|
|
10056
10123
|
const connectedComponents = rawComponents.filter((c14) => c14.length > 1);
|
|
10057
10124
|
const isolatedIds = rawComponents.filter((c14) => c14.length === 1).flat().toSorted();
|
|
10058
|
-
|
|
10059
|
-
|
|
10060
|
-
|
|
10061
|
-
|
|
10062
|
-
|
|
10063
|
-
|
|
10064
|
-
|
|
10065
|
-
|
|
10066
|
-
|
|
10067
|
-
|
|
10068
|
-
if (
|
|
10069
|
-
|
|
10070
|
-
|
|
10125
|
+
const isSourceOnly = (id) => {
|
|
10126
|
+
const nodeType = nodeById.get(id)?.nodeType;
|
|
10127
|
+
return nodeType != null && SOURCE_ONLY_NODE_TYPES.has(nodeType);
|
|
10128
|
+
};
|
|
10129
|
+
const looseSources = isolatedIds.filter(isSourceOnly);
|
|
10130
|
+
const looseOthers = isolatedIds.filter((id) => !isSourceOnly(id));
|
|
10131
|
+
if (looseSources.length > 0) connectedComponents.push(looseSources);
|
|
10132
|
+
if (looseOthers.length > 0) connectedComponents.push(looseOthers);
|
|
10133
|
+
const componentRank = (ids) => {
|
|
10134
|
+
const nodes = ids.flatMap((id) => nodeById.get(id) ?? []);
|
|
10135
|
+
if (nodes.length > 0 && nodes.every((n) => isSourceOnly(n.id))) {
|
|
10136
|
+
return 0;
|
|
10137
|
+
}
|
|
10138
|
+
if (nodes.some((n) => isTextType(n.nodeType))) return 1;
|
|
10139
|
+
return 2;
|
|
10140
|
+
};
|
|
10141
|
+
const components = connectedComponents.map((ids) => ({ ids, rank: componentRank(ids) })).toSorted((a, b) => {
|
|
10142
|
+
if (a.rank !== b.rank) return a.rank - b.rank;
|
|
10143
|
+
return a.ids[0] < b.ids[0] ? -1 : a.ids[0] > b.ids[0] ? 1 : 0;
|
|
10144
|
+
}).map((c14) => c14.ids);
|
|
10071
10145
|
if (components.length > 1) {
|
|
10072
10146
|
const targets2 = sortedNodes.filter((n) => targetIds.has(n.id));
|
|
10073
10147
|
const parentId2 = targets2[0]?.groupId;
|
|
@@ -10805,6 +10879,14 @@ function inferDirectFileNodeMediaTypeFromContentType(contentType) {
|
|
|
10805
10879
|
if (mimeType === "application/pdf") return "pdf";
|
|
10806
10880
|
return null;
|
|
10807
10881
|
}
|
|
10882
|
+
function refuseDirectElementNode(input, ctx) {
|
|
10883
|
+
if (input.nodeType !== "element") return;
|
|
10884
|
+
ctx.addIssue({
|
|
10885
|
+
code: external_exports.ZodIssueCode.custom,
|
|
10886
|
+
path: ["nodeType"],
|
|
10887
|
+
message: "An element node is placed from the element library, not created directly"
|
|
10888
|
+
});
|
|
10889
|
+
}
|
|
10808
10890
|
function validateDirectFileNodeAssetFields(input, ctx) {
|
|
10809
10891
|
if (input.nodeType !== "file") {
|
|
10810
10892
|
const assetField = [
|
|
@@ -11039,8 +11121,8 @@ var HeygenAvatarVariantSchema = external_exports.object({
|
|
|
11039
11121
|
description: external_exports.string().describe("Pose, setting, and framing, e.g. 'Standing office front'")
|
|
11040
11122
|
});
|
|
11041
11123
|
var HeygenAvatarPersonSchema = external_exports.object({
|
|
11042
|
-
name: external_exports.string().describe("The
|
|
11043
|
-
variants: external_exports.array(HeygenAvatarVariantSchema).describe("Every pose available for this
|
|
11124
|
+
name: external_exports.string().describe("The avatar's first name, e.g. 'Abigail'"),
|
|
11125
|
+
variants: external_exports.array(HeygenAvatarVariantSchema).describe("Every pose available for this avatar")
|
|
11044
11126
|
});
|
|
11045
11127
|
var HeygenAvatarCatalogSchema = external_exports.object({
|
|
11046
11128
|
people: external_exports.array(HeygenAvatarPersonSchema),
|
|
@@ -11148,6 +11230,23 @@ var PreviewAssetSchema = external_exports.object({
|
|
|
11148
11230
|
thumbnailUrl: external_exports.string().nullable()
|
|
11149
11231
|
});
|
|
11150
11232
|
|
|
11233
|
+
// ../api-contract/src/text-thinking.ts
|
|
11234
|
+
var TEXT_THINKING_LEVELS = [
|
|
11235
|
+
"off",
|
|
11236
|
+
"on",
|
|
11237
|
+
"minimal",
|
|
11238
|
+
"low",
|
|
11239
|
+
"medium",
|
|
11240
|
+
"high",
|
|
11241
|
+
"xhigh",
|
|
11242
|
+
"max"
|
|
11243
|
+
];
|
|
11244
|
+
var TextThinkingLevelSchema = external_exports.enum(TEXT_THINKING_LEVELS);
|
|
11245
|
+
var TextThinkingCapabilitySchema = external_exports.object({
|
|
11246
|
+
levels: external_exports.array(TextThinkingLevelSchema).min(1),
|
|
11247
|
+
defaultLevel: TextThinkingLevelSchema
|
|
11248
|
+
});
|
|
11249
|
+
|
|
11151
11250
|
// ../api-contract/src/canvas/schema.ts
|
|
11152
11251
|
var CanvasResponseSchema = external_exports.object({
|
|
11153
11252
|
id: external_exports.string().uuid(),
|
|
@@ -11196,10 +11295,18 @@ var EdgeTypeSchema = external_exports.enum([
|
|
|
11196
11295
|
]);
|
|
11197
11296
|
var GroupTypeSchema = external_exports.enum(CANVAS_GROUP_TYPES);
|
|
11198
11297
|
var GroupColorSchema = external_exports.enum(GROUP_COLOR_KEYS);
|
|
11298
|
+
var ImageGenerationQualityIdSchema = external_exports.string().trim().min(1).max(64);
|
|
11299
|
+
var ImageGenerationQualityOptionSchema = external_exports.object({
|
|
11300
|
+
id: ImageGenerationQualityIdSchema,
|
|
11301
|
+
label: external_exports.string().trim().min(1).max(64)
|
|
11302
|
+
});
|
|
11199
11303
|
var ModelConfigSchema = external_exports.object({
|
|
11200
11304
|
model: external_exports.string(),
|
|
11201
11305
|
variant: external_exports.string(),
|
|
11202
11306
|
tier: external_exports.string().nullable().optional(),
|
|
11307
|
+
quality: ImageGenerationQualityIdSchema.optional(),
|
|
11308
|
+
/** Text-only: reasoning control used for this version. */
|
|
11309
|
+
thinkingLevel: TextThinkingLevelSchema.optional(),
|
|
11203
11310
|
/** HeyGen Avatar V only: the Runware avatar id for this node. */
|
|
11204
11311
|
heygenAvatar: external_exports.string().optional(),
|
|
11205
11312
|
/** HeyGen Avatar V presentation, speech, and output controls. */
|
|
@@ -11234,6 +11341,9 @@ var ModelConfigInputSchema = external_exports.object({
|
|
|
11234
11341
|
model: external_exports.string(),
|
|
11235
11342
|
variant: external_exports.string().refine(isValidGenerationMode, "Invalid generation mode"),
|
|
11236
11343
|
tier: external_exports.string().nullable().optional(),
|
|
11344
|
+
quality: ImageGenerationQualityIdSchema.optional(),
|
|
11345
|
+
/** Text-only: reasoning control for this run. */
|
|
11346
|
+
thinkingLevel: TextThinkingLevelSchema.optional(),
|
|
11237
11347
|
/** HeyGen Avatar V only: the Runware avatar id for this node. */
|
|
11238
11348
|
heygenAvatar: external_exports.string().trim().min(1).optional(),
|
|
11239
11349
|
/** HeyGen Avatar V presentation, speech, and output controls. */
|
|
@@ -11389,6 +11499,8 @@ var NodeVersionResponseSchema = external_exports.object({
|
|
|
11389
11499
|
pdfExtraction: PdfExtractionSchema.nullable().optional(),
|
|
11390
11500
|
/** Present when an active node run exists for this version (e.g. PDF extraction in progress). */
|
|
11391
11501
|
nodeRunId: external_exports.string().uuid().nullable().optional(),
|
|
11502
|
+
/** Element nodes only: the element version this node version is pinned to. */
|
|
11503
|
+
elementVersionId: external_exports.string().uuid().nullable().optional(),
|
|
11392
11504
|
layerCount: external_exports.number().int().nonnegative(),
|
|
11393
11505
|
errorMessage: external_exports.string().nullable(),
|
|
11394
11506
|
errorSeverity: ErrorSeveritySchema.nullable(),
|
|
@@ -12027,8 +12139,8 @@ var CreateDirectNodeBodyObjectSchema = external_exports.object({
|
|
|
12027
12139
|
});
|
|
12028
12140
|
var CreateDirectNodeBodySchema = CreateDirectNodeBodyObjectSchema.superRefine(
|
|
12029
12141
|
validateDirectFileNodeAssetFields
|
|
12030
|
-
);
|
|
12031
|
-
var
|
|
12142
|
+
).superRefine(refuseDirectElementNode);
|
|
12143
|
+
var UpdateDirectNodeBodyObjectSchema = external_exports.object({
|
|
12032
12144
|
geometry: GeometrySchema.optional(),
|
|
12033
12145
|
nodeType: NodeTypeSchema.optional(),
|
|
12034
12146
|
title: external_exports.string().optional(),
|
|
@@ -12053,6 +12165,7 @@ var UpdateDirectNodeBodySchema = external_exports.object({
|
|
|
12053
12165
|
customVoiceId: external_exports.string().uuid().nullable().optional(),
|
|
12054
12166
|
elevenLabsVoiceSettings: ElevenLabsVoiceSettingsSchema.nullable().optional()
|
|
12055
12167
|
});
|
|
12168
|
+
var UpdateDirectNodeBodySchema = UpdateDirectNodeBodyObjectSchema.superRefine(refuseDirectElementNode);
|
|
12056
12169
|
var CreateDirectEdgeBodySchema = external_exports.object({
|
|
12057
12170
|
id: external_exports.string().uuid(),
|
|
12058
12171
|
srcNodeId: external_exports.string().uuid(),
|
|
@@ -12215,7 +12328,12 @@ var CanvasSettingsResponseSchema = external_exports.object({
|
|
|
12215
12328
|
createdAt: external_exports.string().datetime(),
|
|
12216
12329
|
updatedAt: external_exports.string().datetime()
|
|
12217
12330
|
});
|
|
12218
|
-
var GenerationSurfaceSchema = external_exports.enum([
|
|
12331
|
+
var GenerationSurfaceSchema = external_exports.enum([
|
|
12332
|
+
"playground",
|
|
12333
|
+
"cast",
|
|
12334
|
+
"element"
|
|
12335
|
+
]);
|
|
12336
|
+
var RequestableGenerationSurfaceSchema = GenerationSurfaceSchema.exclude(["element"]);
|
|
12219
12337
|
var PlaygroundCanvasReferenceSchema = external_exports.object({
|
|
12220
12338
|
projectId: external_exports.string().uuid(),
|
|
12221
12339
|
canvasId: external_exports.string().uuid()
|
|
@@ -12245,7 +12363,7 @@ var canvasContract = c4.router({
|
|
|
12245
12363
|
body: external_exports.object({
|
|
12246
12364
|
destination: PlaygroundCanvasDestinationSchema.optional(),
|
|
12247
12365
|
/** Defaults to `playground` server-side. */
|
|
12248
|
-
surface:
|
|
12366
|
+
surface: RequestableGenerationSurfaceSchema.optional()
|
|
12249
12367
|
}).optional(),
|
|
12250
12368
|
responses: {
|
|
12251
12369
|
201: PlaygroundCanvasReferenceSchema,
|
|
@@ -12259,7 +12377,7 @@ var canvasContract = c4.router({
|
|
|
12259
12377
|
query: external_exports.object({
|
|
12260
12378
|
...paginationQuery({ maxLimit: 100, defaultLimit: 25 }),
|
|
12261
12379
|
/** Defaults to `playground` server-side. */
|
|
12262
|
-
surface:
|
|
12380
|
+
surface: RequestableGenerationSurfaceSchema.optional()
|
|
12263
12381
|
}),
|
|
12264
12382
|
responses: { 200: PlaygroundCanvasPageSchema }
|
|
12265
12383
|
},
|
|
@@ -12928,7 +13046,19 @@ var canvasContract = c4.router({
|
|
|
12928
13046
|
* Node ids whose audio-to-video duration should be matched to
|
|
12929
13047
|
* connected generated audio after upstream audio nodes finish.
|
|
12930
13048
|
*/
|
|
12931
|
-
matchAudioToVideoDurationNodeIds: external_exports.array(external_exports.string().uuid()).max(500).optional()
|
|
13049
|
+
matchAudioToVideoDurationNodeIds: external_exports.array(external_exports.string().uuid()).max(500).optional(),
|
|
13050
|
+
/**
|
|
13051
|
+
* Node ids whose connected audio may be shortened to the longest
|
|
13052
|
+
* clip the model offers, when it overruns by a hair.
|
|
13053
|
+
*
|
|
13054
|
+
* Separate from the field above, and deliberately narrower: matching
|
|
13055
|
+
* grows the *video* to fit the read and is safe for anything, while
|
|
13056
|
+
* this drops the end of somebody's audio. Only a caller that
|
|
13057
|
+
* generated that audio itself — from a script the member wrote, in
|
|
13058
|
+
* the same run — can say that is the right trade, so the permission
|
|
13059
|
+
* is the caller's to give rather than something inferred here.
|
|
13060
|
+
*/
|
|
13061
|
+
trimAudioToMatchedDurationNodeIds: external_exports.array(external_exports.string().uuid()).max(500).optional()
|
|
12932
13062
|
}),
|
|
12933
13063
|
responses: {
|
|
12934
13064
|
201: BulkNodeRunResponseSchema,
|
|
@@ -13241,7 +13371,10 @@ var canvasContract = c4.router({
|
|
|
13241
13371
|
assetId: external_exports.string().uuid()
|
|
13242
13372
|
}),
|
|
13243
13373
|
body: external_exports.object({
|
|
13244
|
-
nodeId: external_exports.string().uuid()
|
|
13374
|
+
nodeId: external_exports.string().uuid(),
|
|
13375
|
+
// The node was just created client-side in the CRDT; this lets the
|
|
13376
|
+
// server materialize its row when the WS update hasn't arrived yet.
|
|
13377
|
+
node: NodeMaterializationPayloadSchema.optional()
|
|
13245
13378
|
}),
|
|
13246
13379
|
responses: {
|
|
13247
13380
|
200: external_exports.object({
|
|
@@ -13420,6 +13553,8 @@ var ASSET_ENGAGEMENT_SOURCES = {
|
|
|
13420
13553
|
/** In-app (web) Mel chat acting for a member. */
|
|
13421
13554
|
Agent: "agent",
|
|
13422
13555
|
Canvas: "canvas",
|
|
13556
|
+
/** Cast studio playback handoff: download or public sharing. */
|
|
13557
|
+
Cast: "cast",
|
|
13423
13558
|
/** API key with no MCP session header — CLI and direct API use. */
|
|
13424
13559
|
Cli: "cli",
|
|
13425
13560
|
Files: "files",
|
|
@@ -13433,6 +13568,7 @@ var ASSET_ENGAGEMENT_SOURCES = {
|
|
|
13433
13568
|
};
|
|
13434
13569
|
var ClientAssetEngagementSourceSchema = external_exports.enum([
|
|
13435
13570
|
ASSET_ENGAGEMENT_SOURCES.Canvas,
|
|
13571
|
+
ASSET_ENGAGEMENT_SOURCES.Cast,
|
|
13436
13572
|
ASSET_ENGAGEMENT_SOURCES.Files,
|
|
13437
13573
|
ASSET_ENGAGEMENT_SOURCES.Playground
|
|
13438
13574
|
]);
|
|
@@ -13782,6 +13918,29 @@ var filesContract = c6.router({
|
|
|
13782
13918
|
},
|
|
13783
13919
|
summary: "Resolve a Files folder's owning team for the current user"
|
|
13784
13920
|
},
|
|
13921
|
+
getFileFolderShareMode: {
|
|
13922
|
+
method: "GET",
|
|
13923
|
+
path: "/files/folders/:folderId/share-mode",
|
|
13924
|
+
pathParams: FileFolderIdParamsSchema,
|
|
13925
|
+
responses: {
|
|
13926
|
+
200: external_exports.object({ shareMode: AssetShareModeSchema }),
|
|
13927
|
+
403: ErrorBodySchema,
|
|
13928
|
+
404: ErrorBodySchema
|
|
13929
|
+
},
|
|
13930
|
+
summary: "Get an asset folder share mode"
|
|
13931
|
+
},
|
|
13932
|
+
updateFileFolderShareMode: {
|
|
13933
|
+
method: "PATCH",
|
|
13934
|
+
path: "/files/folders/:folderId/share-mode",
|
|
13935
|
+
pathParams: FileFolderIdParamsSchema,
|
|
13936
|
+
body: external_exports.object({ shareMode: AssetShareModeSchema }),
|
|
13937
|
+
responses: {
|
|
13938
|
+
200: external_exports.object({ shareMode: AssetShareModeSchema }),
|
|
13939
|
+
403: ErrorBodySchema,
|
|
13940
|
+
404: ErrorBodySchema
|
|
13941
|
+
},
|
|
13942
|
+
summary: "Update an asset folder share mode"
|
|
13943
|
+
},
|
|
13785
13944
|
updateFileFolder: {
|
|
13786
13945
|
method: "PATCH",
|
|
13787
13946
|
path: "/files/folders/:folderId",
|
|
@@ -14183,6 +14342,31 @@ var filesContract = c6.router({
|
|
|
14183
14342
|
404: ErrorBodySchema
|
|
14184
14343
|
},
|
|
14185
14344
|
summary: "Import a file the user picked from Google Drive"
|
|
14345
|
+
},
|
|
14346
|
+
startGoogleDriveImportJob: {
|
|
14347
|
+
method: "POST",
|
|
14348
|
+
path: "/files/import/google-drive/jobs",
|
|
14349
|
+
body: StartGoogleDriveImportJobBodySchema,
|
|
14350
|
+
responses: {
|
|
14351
|
+
202: StartGoogleDriveImportJobResponseSchema,
|
|
14352
|
+
400: ErrorBodySchema,
|
|
14353
|
+
403: ErrorBodySchema,
|
|
14354
|
+
404: ErrorBodySchema,
|
|
14355
|
+
503: ErrorBodySchema
|
|
14356
|
+
},
|
|
14357
|
+
summary: "Start a durable Google Drive import"
|
|
14358
|
+
},
|
|
14359
|
+
getGoogleDriveImportJob: {
|
|
14360
|
+
method: "GET",
|
|
14361
|
+
path: "/files/import/google-drive/jobs/:jobId",
|
|
14362
|
+
pathParams: GoogleDriveImportJobParamsSchema,
|
|
14363
|
+
responses: {
|
|
14364
|
+
200: GoogleDriveImportJobStatusSchema,
|
|
14365
|
+
403: ErrorBodySchema,
|
|
14366
|
+
404: ErrorBodySchema,
|
|
14367
|
+
503: ErrorBodySchema
|
|
14368
|
+
},
|
|
14369
|
+
summary: "Get a durable Google Drive import"
|
|
14186
14370
|
}
|
|
14187
14371
|
});
|
|
14188
14372
|
|
|
@@ -14205,6 +14389,10 @@ var VoiceCapabilitySchema = external_exports.discriminatedUnion("source", [
|
|
|
14205
14389
|
]);
|
|
14206
14390
|
|
|
14207
14391
|
// ../api-contract/src/generation/schema.ts
|
|
14392
|
+
var ImageGenerationQualityPricingSchema = external_exports.record(
|
|
14393
|
+
external_exports.string(),
|
|
14394
|
+
external_exports.record(external_exports.string(), external_exports.number())
|
|
14395
|
+
);
|
|
14208
14396
|
var GenerationJobStatusSchema = external_exports.enum([
|
|
14209
14397
|
"in_progress",
|
|
14210
14398
|
"finished",
|
|
@@ -14246,6 +14434,8 @@ var GenerationRunBodySchema = external_exports.object({
|
|
|
14246
14434
|
aspectRatio: OutputAspectRatioSchema.optional(),
|
|
14247
14435
|
duration: external_exports.number().int().positive().optional(),
|
|
14248
14436
|
resolution: OutputResolutionSchema.optional(),
|
|
14437
|
+
/** Quality mode for image variants that expose it; ignored by other models. */
|
|
14438
|
+
quality: ImageGenerationQualityIdSchema.optional(),
|
|
14249
14439
|
seed: external_exports.number().int().nonnegative().max(MAX_SEED).optional(),
|
|
14250
14440
|
numVariations: external_exports.number().int().min(1).max(MAX_VARIATIONS).optional(),
|
|
14251
14441
|
/**
|
|
@@ -14320,6 +14510,9 @@ var AutoModelDefaultCapabilitiesSchema = external_exports.object({
|
|
|
14320
14510
|
minCustomResolutionArea: external_exports.number().nullable().optional(),
|
|
14321
14511
|
maxCustomResolutionAspectRatio: external_exports.number().nullable().optional(),
|
|
14322
14512
|
resolutionPricingMultipliers: external_exports.record(external_exports.string(), external_exports.number()).nullable().optional(),
|
|
14513
|
+
qualityOptions: external_exports.array(ImageGenerationQualityOptionSchema).optional(),
|
|
14514
|
+
defaultQuality: ImageGenerationQualityIdSchema.optional(),
|
|
14515
|
+
qualityPricingMultipliersByResolution: ImageGenerationQualityPricingSchema.nullable().optional(),
|
|
14323
14516
|
audioOffCreditMultiplier: external_exports.number().nullable().optional(),
|
|
14324
14517
|
audioOffCreditMultipliersByResolution: external_exports.record(external_exports.string(), external_exports.number()).nullable().optional(),
|
|
14325
14518
|
maxImageInputs: external_exports.number().nullable().optional(),
|
|
@@ -14511,6 +14704,12 @@ var ModelVariantResponseSchema = external_exports.object({
|
|
|
14511
14704
|
minCustomResolutionArea: external_exports.number().nullable().optional(),
|
|
14512
14705
|
maxCustomResolutionAspectRatio: external_exports.number().nullable().optional(),
|
|
14513
14706
|
resolutionPricingMultipliers: external_exports.record(external_exports.string(), external_exports.number()).nullable(),
|
|
14707
|
+
/** User-selectable quality modes for this image variant. */
|
|
14708
|
+
qualityOptions: external_exports.array(ImageGenerationQualityOptionSchema).optional(),
|
|
14709
|
+
/** Quality used when a node predates the selector or has no explicit value. */
|
|
14710
|
+
defaultQuality: ImageGenerationQualityIdSchema.optional(),
|
|
14711
|
+
/** Total base-price multiplier for each quality/resolution pair. */
|
|
14712
|
+
qualityPricingMultipliersByResolution: ImageGenerationQualityPricingSchema.nullable().optional(),
|
|
14514
14713
|
/** Multiplier applied to creditCost when audio is toggled off. */
|
|
14515
14714
|
audioOffCreditMultiplier: external_exports.number().nullable().optional(),
|
|
14516
14715
|
/** Per-resolution overrides of audioOffCreditMultiplier. */
|
|
@@ -14579,7 +14778,9 @@ var ModelResponseSchema = external_exports.object({
|
|
|
14579
14778
|
/** Maximum prompt length in characters. Used by text models that lack variants. */
|
|
14580
14779
|
maxPromptLength: external_exports.number().nullable().optional(),
|
|
14581
14780
|
/** Per-1M-token credit rates for text models; drives the live cost-range estimate. */
|
|
14582
|
-
textTokenPricing: TextTokenPricingSchema.optional()
|
|
14781
|
+
textTokenPricing: TextTokenPricingSchema.optional(),
|
|
14782
|
+
/** Text-only reasoning levels supported by the routed provider model. */
|
|
14783
|
+
thinking: TextThinkingCapabilitySchema.nullable().optional()
|
|
14583
14784
|
});
|
|
14584
14785
|
var ListGenerativeModelsResponseSchema = external_exports.object({
|
|
14585
14786
|
models: external_exports.array(ModelResponseSchema)
|
|
@@ -14932,6 +15133,22 @@ var ProfileUserSchema = external_exports.object({
|
|
|
14932
15133
|
completedProductTour: external_exports.string().datetime().nullable(),
|
|
14933
15134
|
avatarUrl: external_exports.string().nullable(),
|
|
14934
15135
|
advancedSettings: UserAdvancedSettingsSchema,
|
|
15136
|
+
/**
|
|
15137
|
+
* Generations this member started themselves, saturating at
|
|
15138
|
+
* {@link PROFILE_GENERATION_COUNT_CAP}. Agent- and MCP-triggered runs are
|
|
15139
|
+
* not counted: the readers are prompts about hands-on canvas work, and the
|
|
15140
|
+
* two attribution columns cannot be counted together within one bounded
|
|
15141
|
+
* index scan.
|
|
15142
|
+
*
|
|
15143
|
+
* Sent only while `advancedSettings.hideNodePromptsEnabled` is unset. The
|
|
15144
|
+
* count exists to decide whether to offer the node-display prompt, and a
|
|
15145
|
+
* saved display default has already decided it, so the server does not
|
|
15146
|
+
* spend the query. Absent therefore means "no reader needs this" — never
|
|
15147
|
+
* "this member has run nothing" — and a client must not show it as a total.
|
|
15148
|
+
*
|
|
15149
|
+
* Optional, so a client built before this reads the payload unchanged.
|
|
15150
|
+
*/
|
|
15151
|
+
generationCount: external_exports.number().int().nonnegative().optional(),
|
|
14935
15152
|
/**
|
|
14936
15153
|
* Whether this session may open the staff tools panel — a Melius account,
|
|
14937
15154
|
* or somebody of ours behind a verified impersonation marker.
|
|
@@ -15035,6 +15252,37 @@ var SharedAssetResponseSchema = external_exports.object({
|
|
|
15035
15252
|
height: external_exports.number().int().nullable(),
|
|
15036
15253
|
durationInMs: external_exports.number().int().nullable()
|
|
15037
15254
|
});
|
|
15255
|
+
var SharedFolderAssetSchema = external_exports.object({
|
|
15256
|
+
id: external_exports.string().uuid(),
|
|
15257
|
+
folderId: external_exports.string().uuid(),
|
|
15258
|
+
filename: external_exports.string(),
|
|
15259
|
+
fileType: FileTypeSchema,
|
|
15260
|
+
contentType: external_exports.string().nullable(),
|
|
15261
|
+
mediaUrl: external_exports.string().url().nullable(),
|
|
15262
|
+
previewUrl: external_exports.string().url().nullable(),
|
|
15263
|
+
width: external_exports.number().int().nullable(),
|
|
15264
|
+
height: external_exports.number().int().nullable(),
|
|
15265
|
+
durationInMs: external_exports.number().int().nullable(),
|
|
15266
|
+
// The three fields the shared grid sorts and filters on, matching what a
|
|
15267
|
+
// `FileCard` carries so the public page renders the same tile and row a
|
|
15268
|
+
// member sees. Optional to support version-skew between web and core
|
|
15269
|
+
// deployments; the viewer treats an absent value as unknown rather than
|
|
15270
|
+
// guessing.
|
|
15271
|
+
source: FileSourceSchema.optional(),
|
|
15272
|
+
fileSizeInKb: external_exports.number().int().nullable().optional(),
|
|
15273
|
+
createdAt: external_exports.string().datetime().nullable().optional()
|
|
15274
|
+
});
|
|
15275
|
+
var SharedFolderChildSchema = external_exports.object({
|
|
15276
|
+
id: external_exports.string().uuid(),
|
|
15277
|
+
parentFolderId: external_exports.string().uuid().nullable(),
|
|
15278
|
+
name: external_exports.string()
|
|
15279
|
+
});
|
|
15280
|
+
var SharedFolderResponseSchema = external_exports.object({
|
|
15281
|
+
id: external_exports.string().uuid(),
|
|
15282
|
+
name: external_exports.string(),
|
|
15283
|
+
folders: external_exports.array(SharedFolderChildSchema),
|
|
15284
|
+
assets: external_exports.array(SharedFolderAssetSchema)
|
|
15285
|
+
});
|
|
15038
15286
|
var SharedDownloadResponseSchema = external_exports.object({
|
|
15039
15287
|
url: external_exports.string().url().nullable(),
|
|
15040
15288
|
text: external_exports.string().nullable(),
|
|
@@ -15240,7 +15488,7 @@ var ProjectThumbnailsResponseSchema = external_exports.object({
|
|
|
15240
15488
|
});
|
|
15241
15489
|
var MAX_PROJECT_TITLE_LENGTH = 500;
|
|
15242
15490
|
var PROJECT_CONFLICT_CODE = {
|
|
15243
|
-
nameTaken:
|
|
15491
|
+
nameTaken: API_ERROR_CODE.projectNameTaken
|
|
15244
15492
|
};
|
|
15245
15493
|
var ProjectConflictResponseSchema = MessageResponseSchema.extend({
|
|
15246
15494
|
code: external_exports.nativeEnum(PROJECT_CONFLICT_CODE).optional()
|
|
@@ -15710,6 +15958,27 @@ var publicTemplateApplyRoute = {
|
|
|
15710
15958
|
}
|
|
15711
15959
|
};
|
|
15712
15960
|
|
|
15961
|
+
// ../api-contract/src/media-types.ts
|
|
15962
|
+
var IMAGE_CONTENT_TYPE_BY_EXTENSION = {
|
|
15963
|
+
".jpg": "image/jpeg",
|
|
15964
|
+
".jpeg": "image/jpeg",
|
|
15965
|
+
".png": "image/png",
|
|
15966
|
+
".webp": "image/webp",
|
|
15967
|
+
".gif": "image/gif",
|
|
15968
|
+
".avif": "image/avif",
|
|
15969
|
+
".svg": "image/svg+xml"
|
|
15970
|
+
};
|
|
15971
|
+
var MAX_DOCUMENT_PDF_FILE_SIZE = 25 * 1024 * 1024;
|
|
15972
|
+
var MAX_DOCUMENT_MARKDOWN_FILE_SIZE = 1 * 1024 * 1024;
|
|
15973
|
+
var UPLOAD_PURPOSES = [
|
|
15974
|
+
"asset",
|
|
15975
|
+
"avatar",
|
|
15976
|
+
"team-photo",
|
|
15977
|
+
"custom-font",
|
|
15978
|
+
"comment-attachment"
|
|
15979
|
+
];
|
|
15980
|
+
var MAX_FONT_FILE_SIZE_BYTES = 10 * 1024 * 1024;
|
|
15981
|
+
|
|
15713
15982
|
// ../api-contract/src/upload/schema.ts
|
|
15714
15983
|
var PdfExtractionModeSchema = external_exports.enum(["summary", "pages"]);
|
|
15715
15984
|
var InitUploadBodySchema = external_exports.object({
|
|
@@ -15717,7 +15986,7 @@ var InitUploadBodySchema = external_exports.object({
|
|
|
15717
15986
|
filename: external_exports.string(),
|
|
15718
15987
|
contentType: external_exports.string(),
|
|
15719
15988
|
sizeInBytes: external_exports.number().int().positive(),
|
|
15720
|
-
purpose: external_exports.enum(
|
|
15989
|
+
purpose: external_exports.enum(UPLOAD_PURPOSES).optional().default("asset")
|
|
15721
15990
|
});
|
|
15722
15991
|
var InitUploadResponseSchema = external_exports.object({
|
|
15723
15992
|
uploadId: external_exports.string(),
|
|
@@ -15734,17 +16003,6 @@ var SignPartBodySchema = external_exports.object({
|
|
|
15734
16003
|
var SignPartResponseSchema = external_exports.object({
|
|
15735
16004
|
url: external_exports.string()
|
|
15736
16005
|
});
|
|
15737
|
-
var CompleteUploadNodePayloadSchema = external_exports.object({
|
|
15738
|
-
nodeType: external_exports.string(),
|
|
15739
|
-
geometry: external_exports.object({
|
|
15740
|
-
x: external_exports.number(),
|
|
15741
|
-
y: external_exports.number(),
|
|
15742
|
-
w: external_exports.number(),
|
|
15743
|
-
h: external_exports.number()
|
|
15744
|
-
}),
|
|
15745
|
-
title: external_exports.string().optional(),
|
|
15746
|
-
createdByUserId: external_exports.string().uuid().optional()
|
|
15747
|
-
});
|
|
15748
16006
|
var CompleteUploadBodySchema = external_exports.object({
|
|
15749
16007
|
uploadId: external_exports.string(),
|
|
15750
16008
|
s3Bucket: external_exports.string(),
|
|
@@ -15760,8 +16018,8 @@ var CompleteUploadBodySchema = external_exports.object({
|
|
|
15760
16018
|
// here lets the server skip a separate ranged S3 GET on complete.
|
|
15761
16019
|
width: external_exports.number().int().positive().optional(),
|
|
15762
16020
|
height: external_exports.number().int().positive().optional(),
|
|
15763
|
-
// Optional materialization payload — see
|
|
15764
|
-
node:
|
|
16021
|
+
// Optional materialization payload — see `NodeMaterializationPayloadSchema`.
|
|
16022
|
+
node: NodeMaterializationPayloadSchema.optional(),
|
|
15765
16023
|
// url_to_canvas (agent) uploads need the final image URL written into
|
|
15766
16024
|
// the CRDT so the file node renders immediately when the update arrives
|
|
15767
16025
|
// over WS. Regular web uploads keep the broadcastPreviewUrls flow.
|
|
@@ -15774,7 +16032,10 @@ var CompleteUploadBodySchema = external_exports.object({
|
|
|
15774
16032
|
replaceActiveVersion: external_exports.boolean().optional(),
|
|
15775
16033
|
// PDF-only: how to process the upload once complete. Omitted ⇒ "summary"
|
|
15776
16034
|
// (the server default and every non-PDF upload). See PdfExtractionModeSchema.
|
|
15777
|
-
pdfExtractionMode: PdfExtractionModeSchema.optional()
|
|
16035
|
+
pdfExtractionMode: PdfExtractionModeSchema.optional(),
|
|
16036
|
+
// The same purpose given to `init`. Omitted ⇒ "asset" (old clients). A
|
|
16037
|
+
// `comment-attachment` completes as an asset that stays out of Files.
|
|
16038
|
+
purpose: external_exports.enum(UPLOAD_PURPOSES).optional()
|
|
15778
16039
|
});
|
|
15779
16040
|
var CompleteUploadResponseSchema = external_exports.object({
|
|
15780
16041
|
success: external_exports.boolean(),
|
|
@@ -16154,7 +16415,7 @@ function isMajorUpgrade(current, latest) {
|
|
|
16154
16415
|
return l[0] > c14[0];
|
|
16155
16416
|
}
|
|
16156
16417
|
function shouldShowUpgradeNotice(ctx = {}) {
|
|
16157
|
-
const current = ctx.current ?? "0.
|
|
16418
|
+
const current = ctx.current ?? "0.16.0";
|
|
16158
16419
|
const latest = ctx.latest ?? serverLatestVersion;
|
|
16159
16420
|
const env = ctx.env ?? process.env;
|
|
16160
16421
|
const isTty = ctx.isTty ?? Boolean(process.stderr.isTTY);
|
|
@@ -16175,7 +16436,7 @@ Upgrade: npm install -g @melius-ai/cli@latest (or: brew update && brew upgrade
|
|
|
16175
16436
|
function printUpgradeNoticeIfNeeded(ctx = {}) {
|
|
16176
16437
|
try {
|
|
16177
16438
|
if (!shouldShowUpgradeNotice(ctx)) return;
|
|
16178
|
-
const current = ctx.current ?? "0.
|
|
16439
|
+
const current = ctx.current ?? "0.16.0";
|
|
16179
16440
|
const latest = ctx.latest ?? serverLatestVersion;
|
|
16180
16441
|
process.stderr.write(formatUpgradeNotice(current, latest));
|
|
16181
16442
|
} catch {
|
|
@@ -16738,20 +16999,6 @@ function normalizeEdgeId(id, generateId = () => crypto.randomUUID()) {
|
|
|
16738
16999
|
return id && UUID_RE.test(id) ? id : generateId();
|
|
16739
17000
|
}
|
|
16740
17001
|
|
|
16741
|
-
// ../api-contract/src/media-types.ts
|
|
16742
|
-
var IMAGE_CONTENT_TYPE_BY_EXTENSION = {
|
|
16743
|
-
".jpg": "image/jpeg",
|
|
16744
|
-
".jpeg": "image/jpeg",
|
|
16745
|
-
".png": "image/png",
|
|
16746
|
-
".webp": "image/webp",
|
|
16747
|
-
".gif": "image/gif",
|
|
16748
|
-
".avif": "image/avif",
|
|
16749
|
-
".svg": "image/svg+xml"
|
|
16750
|
-
};
|
|
16751
|
-
var MAX_DOCUMENT_PDF_FILE_SIZE = 25 * 1024 * 1024;
|
|
16752
|
-
var MAX_DOCUMENT_MARKDOWN_FILE_SIZE = 1 * 1024 * 1024;
|
|
16753
|
-
var MAX_FONT_FILE_SIZE_BYTES = 10 * 1024 * 1024;
|
|
16754
|
-
|
|
16755
17002
|
// ../api-contract/src/canvas-layout.ts
|
|
16756
17003
|
function computePresetLayout(preset, center) {
|
|
16757
17004
|
const presetGroups = preset.nodes.filter((n) => n.type === "group");
|
|
@@ -17378,7 +17625,7 @@ function resolveNodeIds2(canvasId, nodeIds) {
|
|
|
17378
17625
|
}
|
|
17379
17626
|
|
|
17380
17627
|
// src/lib/validation.ts
|
|
17381
|
-
function validateModelConfig(model, variant) {
|
|
17628
|
+
function validateModelConfig(model, variant, tier) {
|
|
17382
17629
|
if (model === FISH_AUDIO_MODEL) {
|
|
17383
17630
|
writeError(
|
|
17384
17631
|
formatError(
|
|
@@ -17391,7 +17638,19 @@ function validateModelConfig(model, variant) {
|
|
|
17391
17638
|
EXIT_USAGE_ERROR
|
|
17392
17639
|
);
|
|
17393
17640
|
}
|
|
17394
|
-
if (model && variant) return { model, variant };
|
|
17641
|
+
if (model && variant) return { model, variant, ...tier && { tier } };
|
|
17642
|
+
if (tier) {
|
|
17643
|
+
writeError(
|
|
17644
|
+
formatError(
|
|
17645
|
+
"USAGE_ERROR",
|
|
17646
|
+
"--tier requires --model and --variant",
|
|
17647
|
+
{
|
|
17648
|
+
suggestion: "A tier names a speed of one model+variant. Run: mel model list to find the variant's tier, then pass --model <model> --variant <variant> --tier <tier>"
|
|
17649
|
+
}
|
|
17650
|
+
),
|
|
17651
|
+
EXIT_USAGE_ERROR
|
|
17652
|
+
);
|
|
17653
|
+
}
|
|
17395
17654
|
if (!model && !variant) return void 0;
|
|
17396
17655
|
writeError(
|
|
17397
17656
|
formatError(
|
|
@@ -17442,7 +17701,10 @@ function parseClipOrder(value) {
|
|
|
17442
17701
|
return clipOrder.length > 0 ? clipOrder : void 0;
|
|
17443
17702
|
}
|
|
17444
17703
|
function addNodeOptions(cmd) {
|
|
17445
|
-
return cmd.option("--id <uuid>", "Node ID (auto-generated if omitted)").option("--title <title>", "Node title").option("--x <number>", "X position").option("--y <number>", "Y position").option("--w <number>", "Width").option("--h <number>", "Height").option("--z-index <number>", "Z-index").option("--group-id <uuid>", "Parent group ID").option("--model <model>", "Model name (requires --variant)").option("--variant <variant>", "Model variant (requires --model)").option(
|
|
17704
|
+
return cmd.option("--id <uuid>", "Node ID (auto-generated if omitted)").option("--title <title>", "Node title").option("--x <number>", "X position").option("--y <number>", "Y position").option("--w <number>", "Width").option("--h <number>", "Height").option("--z-index <number>", "Z-index").option("--group-id <uuid>", "Parent group ID").option("--model <model>", "Model name (requires --variant)").option("--variant <variant>", "Model variant (requires --model)").option(
|
|
17705
|
+
"--tier <tier>",
|
|
17706
|
+
"Speed tier of that model+variant (e.g. fast, pro, turbo; requires --model and --variant). Omit for the model's standard speed. Use mel model list to see each variant's tier"
|
|
17707
|
+
).option("--prompt <text>", "Text prompt").option(
|
|
17446
17708
|
"--content <text>",
|
|
17447
17709
|
"Literal text content for custom_text nodes"
|
|
17448
17710
|
).option("--aspect-ratio <ratio>", "Output aspect ratio").option(
|
|
@@ -17514,6 +17776,7 @@ Examples:
|
|
|
17514
17776
|
$ mel node create <canvasId> --type stitch --clip-order <video1>,<video2> --scale-fit stretch
|
|
17515
17777
|
$ mel node create <canvasId> --type text --x 100 --y 200 --title "My node"
|
|
17516
17778
|
$ mel node create <canvasId> --type image --model flux-pro --variant text-to-image
|
|
17779
|
+
$ mel node create <canvasId> --type video --model wan-3.0 --variant text-to-video --tier fast
|
|
17517
17780
|
$ mel node create <canvasId> --type file --src https://cdn.example.com/photo.jpg --media-type image --s3-key assets/photo.jpg --s3-bucket <bucket> --content-type image/jpeg --title "Source"
|
|
17518
17781
|
$ mel node create <canvasId> --type audio --model eleven_v3 --variant text-to-speech --prompt "Hello there" --voice-id <voiceId>
|
|
17519
17782
|
$ mel node create <canvasId> --type audio --model elevenlabs-sfx --variant text-to-sfx --prompt "Thunder crack" --duration 10
|
|
@@ -17522,7 +17785,11 @@ Examples:
|
|
|
17522
17785
|
).action(async (canvasId, opts) => {
|
|
17523
17786
|
const client = getClient();
|
|
17524
17787
|
const id = opts.id ?? crypto.randomUUID();
|
|
17525
|
-
const modelConfig = validateModelConfig(
|
|
17788
|
+
const modelConfig = validateModelConfig(
|
|
17789
|
+
opts.model,
|
|
17790
|
+
opts.variant,
|
|
17791
|
+
opts.tier
|
|
17792
|
+
);
|
|
17526
17793
|
const geometry = buildGeometry(opts.type, opts);
|
|
17527
17794
|
const clipOrder = parseClipOrder(opts.clipOrder);
|
|
17528
17795
|
const result = await client.node.create({
|
|
@@ -17612,7 +17879,8 @@ Examples:
|
|
|
17612
17879
|
const client = getClient();
|
|
17613
17880
|
const modelConfig = validateModelConfig(
|
|
17614
17881
|
opts.model,
|
|
17615
|
-
opts.variant
|
|
17882
|
+
opts.variant,
|
|
17883
|
+
opts.tier
|
|
17616
17884
|
);
|
|
17617
17885
|
const clipOrder = parseClipOrder(opts.clipOrder);
|
|
17618
17886
|
const geoProvided = [opts.x, opts.y, opts.w, opts.h].filter(
|
|
@@ -17700,7 +17968,7 @@ Examples:
|
|
|
17700
17968
|
"Canvas ID (from mel canvas create or mel canvas list)"
|
|
17701
17969
|
).option(
|
|
17702
17970
|
"--json <json>",
|
|
17703
|
-
'JSON array of node objects OR {"nodes":[...],"edges":[...]} object, or "-" to read from stdin. Each node object: { type, title?, x?, y?, w?, h?, prompt?, text?, aspectRatio?, duration?, model?, variant?, groupId?, id?, seed?, voiceId?, negativePrompt?, clipOrder?, scaleFit?, src?, mediaType?, s3Key?, s3Bucket?, contentType?, sourceNodeId? }'
|
|
17971
|
+
'JSON array of node objects OR {"nodes":[...],"edges":[...]} object, or "-" to read from stdin. Each node object: { type, title?, x?, y?, w?, h?, prompt?, text?, aspectRatio?, duration?, model?, variant?, tier?, groupId?, id?, seed?, voiceId?, negativePrompt?, clipOrder?, scaleFit?, src?, mediaType?, s3Key?, s3Bucket?, contentType?, sourceNodeId? }'
|
|
17704
17972
|
).option(
|
|
17705
17973
|
"--edges <json>",
|
|
17706
17974
|
'JSON array of edge objects: [{"src":"a","dst":"b","type":"text"}]. Merged with any edges in the JSON body'
|
|
@@ -17881,7 +18149,8 @@ Valid node types: text, image, video, audio, file, group, custom_text, stitch.
|
|
|
17881
18149
|
const autoGeo = item.id ? autoPositions[item.id] : void 0;
|
|
17882
18150
|
const modelConfig = validateModelConfig(
|
|
17883
18151
|
item.model,
|
|
17884
|
-
item.variant
|
|
18152
|
+
item.variant,
|
|
18153
|
+
item.tier
|
|
17885
18154
|
);
|
|
17886
18155
|
return {
|
|
17887
18156
|
id,
|
|
@@ -18660,6 +18929,9 @@ function registerRunCommands(program2, getOutputOpts) {
|
|
|
18660
18929
|
).option(
|
|
18661
18930
|
"--variant <variant>",
|
|
18662
18931
|
"Model variant (requires --model). e.g. text-to-image, image-to-image"
|
|
18932
|
+
).option(
|
|
18933
|
+
"--tier <tier>",
|
|
18934
|
+
"Speed tier of that model+variant (e.g. fast, pro, turbo; requires --model and --variant). Omit for the model's standard speed. Use mel model list to see each variant's tier"
|
|
18663
18935
|
).option(
|
|
18664
18936
|
"--aspect-ratio <ratio>",
|
|
18665
18937
|
"Output aspect ratio: 21:9, 16:9, 4:3, 3:2, 1:1, 2:3, 3:4, 9:16, 9:21"
|
|
@@ -18699,6 +18971,7 @@ Examples:
|
|
|
18699
18971
|
$ mel run start <nodeId> --canvas-id <canvasId>
|
|
18700
18972
|
$ mel run start <nodeId> --canvas-id <canvasId> --prompt "A sunset over the ocean"
|
|
18701
18973
|
$ mel run start <nodeId> --canvas-id <canvasId> --variations 3
|
|
18974
|
+
$ mel run start <nodeId> --canvas-id <canvasId> --model wan-3.0 --variant text-to-video --tier fast
|
|
18702
18975
|
$ mel run start <audioNodeId> --canvas-id <canvasId> --voice-id <voiceId>
|
|
18703
18976
|
$ mel run start <audioNodeId> --canvas-id <canvasId> --duration 10`
|
|
18704
18977
|
).action(
|
|
@@ -18706,7 +18979,8 @@ Examples:
|
|
|
18706
18979
|
const client = getClient();
|
|
18707
18980
|
const modelConfig = validateModelConfig(
|
|
18708
18981
|
opts.model,
|
|
18709
|
-
opts.variant
|
|
18982
|
+
opts.variant,
|
|
18983
|
+
opts.tier
|
|
18710
18984
|
);
|
|
18711
18985
|
const canvasNodeIds = await loadCanvasNodeIds(
|
|
18712
18986
|
client,
|
|
@@ -20507,7 +20781,7 @@ function withDefaultHelp(args) {
|
|
|
20507
20781
|
}
|
|
20508
20782
|
function createProgram() {
|
|
20509
20783
|
const program2 = new Command();
|
|
20510
|
-
program2.name("mel").description("Mel \u2014 Melius agent CLI").version("0.
|
|
20784
|
+
program2.name("mel").description("Mel \u2014 Melius agent CLI").version("0.16.0").showSuggestionAfterError(true).option("--json", "Force JSON output (default)").option("--text", "Human-readable output").option(
|
|
20511
20785
|
"--fields <fields>",
|
|
20512
20786
|
"Select specific output fields (comma-separated)"
|
|
20513
20787
|
).option("--quiet", "Suppress output, exit code only").option("--verbose", "Log request/response metadata to stderr").addHelpText(
|
package/dist/src/index.js
CHANGED