@melius-ai/cli 0.15.1 → 0.15.2
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 +1 -1
- package/dist/bin/mel.js +1 -1
- package/dist/{chunk-MY4PEUTT.js → chunk-ITZSZCBQ.js} +400 -48
- package/dist/src/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -433,7 +433,7 @@ Every error includes a machine-readable `code`, a human-readable `message`, and
|
|
|
433
433
|
|
|
434
434
|
### Rate limiting
|
|
435
435
|
|
|
436
|
-
|
|
436
|
+
There is no monthly request quota on any plan, but a burst of requests can still be rate limited. On a `429` the CLI prints a `Rate limited — waiting Ns…` notice to **stderr** and automatically backs off and retries — honoring the `Retry-After` header, otherwise exponential backoff — so polling commands like `mel run wait` ride through a limit instead of failing. stdout stays clean for parsing. After repeated `429`s it gives up with a structured `RATE_LIMITED` error (exit `1`).
|
|
437
437
|
|
|
438
438
|
### Global flags
|
|
439
439
|
|
package/dist/bin/mel.js
CHANGED
|
@@ -7737,6 +7737,7 @@ var MAX_INPUT_DOCUMENTS = 5;
|
|
|
7737
7737
|
var MAX_AGENT_MESSAGE_CONTENT_LENGTH = 5e4;
|
|
7738
7738
|
var MAX_SEED = 2147483647;
|
|
7739
7739
|
var MAX_VARIATIONS = 10;
|
|
7740
|
+
var MAX_PINNED_MODELS = 5;
|
|
7740
7741
|
|
|
7741
7742
|
// ../api-contract/src/common.ts
|
|
7742
7743
|
var MessageResponseSchema = external_exports.object({ message: external_exports.string() });
|
|
@@ -7857,6 +7858,7 @@ var TAG_COLOR_PALETTE = [
|
|
|
7857
7858
|
];
|
|
7858
7859
|
var TagColorSchema = external_exports.enum(TAG_COLOR_PALETTE);
|
|
7859
7860
|
var MAX_ASSET_TAG_NAME_LENGTH = 100;
|
|
7861
|
+
var MAX_ASSET_DISPLAY_NAME_LENGTH = 500;
|
|
7860
7862
|
var FileTagSchema = external_exports.object({
|
|
7861
7863
|
id: external_exports.string().uuid(),
|
|
7862
7864
|
name: external_exports.string(),
|
|
@@ -7977,6 +7979,9 @@ var UpdateFileFolderBodySchema = external_exports.object({
|
|
|
7977
7979
|
var MoveFileBodySchema = external_exports.object({
|
|
7978
7980
|
folderId: external_exports.string().uuid().nullable()
|
|
7979
7981
|
});
|
|
7982
|
+
var RenameFileBodySchema = external_exports.object({
|
|
7983
|
+
displayName: external_exports.string().trim().min(1).max(MAX_ASSET_DISPLAY_NAME_LENGTH)
|
|
7984
|
+
});
|
|
7980
7985
|
var MAX_BULK_FILE_ACTION_ASSET_IDS = 500;
|
|
7981
7986
|
var BulkFileAssetIdsSchema = external_exports.array(external_exports.string().uuid()).min(1).max(MAX_BULK_FILE_ACTION_ASSET_IDS);
|
|
7982
7987
|
var BulkMoveFilesBodySchema = external_exports.object({
|
|
@@ -7986,7 +7991,13 @@ var BulkMoveFilesBodySchema = external_exports.object({
|
|
|
7986
7991
|
var BulkDownloadableIdsSchema = external_exports.array(external_exports.string().uuid()).max(MAX_BULK_FILE_ACTION_ASSET_IDS).default([]);
|
|
7987
7992
|
var BulkDownloadFilesBodySchema = external_exports.object({
|
|
7988
7993
|
assetIds: BulkDownloadableIdsSchema,
|
|
7989
|
-
folderIds: BulkDownloadableIdsSchema
|
|
7994
|
+
folderIds: BulkDownloadableIdsSchema,
|
|
7995
|
+
assetVersions: external_exports.array(
|
|
7996
|
+
external_exports.object({
|
|
7997
|
+
assetId: external_exports.string().uuid(),
|
|
7998
|
+
nodeVersionId: external_exports.string().uuid()
|
|
7999
|
+
})
|
|
8000
|
+
).max(MAX_BULK_FILE_ACTION_ASSET_IDS).optional()
|
|
7990
8001
|
}).refine((body) => body.assetIds.length + body.folderIds.length > 0, {
|
|
7991
8002
|
message: "Select at least one file or folder to download"
|
|
7992
8003
|
});
|
|
@@ -8306,6 +8317,14 @@ var AgentSessionResponseSchema = external_exports.object({
|
|
|
8306
8317
|
source: AgentSessionSourceSchema.optional(),
|
|
8307
8318
|
/** True when this transcript is view-only on the current surface. */
|
|
8308
8319
|
readOnly: external_exports.boolean().optional(),
|
|
8320
|
+
/**
|
|
8321
|
+
* True when the chat belongs to another member and is visible only because
|
|
8322
|
+
* they share their chats on this canvas. The server answers this rather
|
|
8323
|
+
* than the client comparing ids, so ownership arrives with the row instead
|
|
8324
|
+
* of depending on a second request that can lag or fail. Absent from a
|
|
8325
|
+
* server that predates the field, which reads as "mine" — today's behavior.
|
|
8326
|
+
*/
|
|
8327
|
+
shared: external_exports.boolean().optional(),
|
|
8309
8328
|
/** True when the agent is actively generating a response. */
|
|
8310
8329
|
isGenerating: external_exports.boolean(),
|
|
8311
8330
|
/** Present when the session is waiting for the user to approve a tool call. */
|
|
@@ -8397,6 +8416,10 @@ var AgentToolApprovalResponseSchema = external_exports.object({
|
|
|
8397
8416
|
createdAt: external_exports.string().datetime(),
|
|
8398
8417
|
updatedAt: external_exports.string().datetime()
|
|
8399
8418
|
});
|
|
8419
|
+
var AgentChatSharingResponseSchema = external_exports.object({
|
|
8420
|
+
canvasId: external_exports.string().uuid(),
|
|
8421
|
+
sharing: external_exports.boolean()
|
|
8422
|
+
});
|
|
8400
8423
|
|
|
8401
8424
|
// ../api-contract/src/agent/routes.ts
|
|
8402
8425
|
var c = initContract();
|
|
@@ -8721,14 +8744,48 @@ var agentContract = c.router({
|
|
|
8721
8744
|
204: c.noBody()
|
|
8722
8745
|
},
|
|
8723
8746
|
summary: "Remove feedback from an agent message"
|
|
8747
|
+
},
|
|
8748
|
+
getChatSharing: {
|
|
8749
|
+
method: "GET",
|
|
8750
|
+
path: "/agent/canvases/:canvasId/chat-sharing",
|
|
8751
|
+
pathParams: external_exports.object({ canvasId: external_exports.string().uuid() }),
|
|
8752
|
+
responses: { 200: AgentChatSharingResponseSchema },
|
|
8753
|
+
summary: "Whether the caller shares their agent chats on this canvas"
|
|
8754
|
+
},
|
|
8755
|
+
// PUT, not POST: opting in twice is the same standing decision, so the
|
|
8756
|
+
// request has to be safe to repeat.
|
|
8757
|
+
shareChats: {
|
|
8758
|
+
method: "PUT",
|
|
8759
|
+
path: "/agent/canvases/:canvasId/chat-sharing",
|
|
8760
|
+
pathParams: external_exports.object({ canvasId: external_exports.string().uuid() }),
|
|
8761
|
+
body: null,
|
|
8762
|
+
responses: { 200: AgentChatSharingResponseSchema },
|
|
8763
|
+
summary: "Share the caller's agent chats on this canvas"
|
|
8764
|
+
},
|
|
8765
|
+
unshareChats: {
|
|
8766
|
+
method: "DELETE",
|
|
8767
|
+
path: "/agent/canvases/:canvasId/chat-sharing",
|
|
8768
|
+
pathParams: external_exports.object({ canvasId: external_exports.string().uuid() }),
|
|
8769
|
+
body: null,
|
|
8770
|
+
responses: { 204: c.noBody() },
|
|
8771
|
+
summary: "Stop sharing the caller's agent chats on this canvas"
|
|
8724
8772
|
}
|
|
8725
8773
|
});
|
|
8726
8774
|
|
|
8727
8775
|
// ../api-contract/src/api-key/schema.ts
|
|
8776
|
+
var MAX_API_KEY_NAME_LENGTH = 255;
|
|
8728
8777
|
var CreateApiKeyBodySchema = external_exports.object({
|
|
8729
|
-
name
|
|
8778
|
+
// Omitted means "generate one" — the server derives a random name. A
|
|
8779
|
+
// supplied one is trimmed and rule-checked server-side, so a whitespace-only
|
|
8780
|
+
// name comes back as a 400 with prose rather than a raw validation error.
|
|
8781
|
+
name: external_exports.string().min(1).max(MAX_API_KEY_NAME_LENGTH).optional(),
|
|
8730
8782
|
expiresAt: external_exports.string().datetime().optional()
|
|
8731
8783
|
});
|
|
8784
|
+
var RenameApiKeyBodySchema = external_exports.object({
|
|
8785
|
+
name: external_exports.string().trim().min(1).max(MAX_API_KEY_NAME_LENGTH)
|
|
8786
|
+
});
|
|
8787
|
+
var AGENT_SESSION_KEY_NAME_PREFIX = "agent-session-";
|
|
8788
|
+
var API_KEY_NAME_RESERVED_MESSAGE = `"${AGENT_SESSION_KEY_NAME_PREFIX}" is a reserved name prefix`;
|
|
8732
8789
|
var ApiKeyResponseSchema = external_exports.object({
|
|
8733
8790
|
id: external_exports.string().uuid(),
|
|
8734
8791
|
name: external_exports.string(),
|
|
@@ -8753,8 +8810,12 @@ var apiKeyContract = c2.router({
|
|
|
8753
8810
|
method: "POST",
|
|
8754
8811
|
path: "/api-keys",
|
|
8755
8812
|
body: CreateApiKeyBodySchema,
|
|
8756
|
-
responses: {
|
|
8757
|
-
|
|
8813
|
+
responses: {
|
|
8814
|
+
201: CreateApiKeyResponseSchema,
|
|
8815
|
+
400: ApiErrorResponseSchema,
|
|
8816
|
+
409: ApiErrorResponseSchema
|
|
8817
|
+
},
|
|
8818
|
+
summary: "Create a new API key (raw key returned only once). A supplied name follows the same rules as a rename."
|
|
8758
8819
|
},
|
|
8759
8820
|
listApiKeys: {
|
|
8760
8821
|
method: "GET",
|
|
@@ -8762,6 +8823,18 @@ var apiKeyContract = c2.router({
|
|
|
8762
8823
|
responses: { 200: external_exports.array(ApiKeyResponseSchema) },
|
|
8763
8824
|
summary: "List API keys for the current user in the active team"
|
|
8764
8825
|
},
|
|
8826
|
+
renameApiKey: {
|
|
8827
|
+
method: "PATCH",
|
|
8828
|
+
path: "/api-keys/:keyId",
|
|
8829
|
+
pathParams: external_exports.object({ keyId: external_exports.string().uuid() }),
|
|
8830
|
+
body: RenameApiKeyBodySchema,
|
|
8831
|
+
responses: {
|
|
8832
|
+
200: ApiKeyResponseSchema,
|
|
8833
|
+
404: ApiErrorResponseSchema,
|
|
8834
|
+
409: ApiErrorResponseSchema
|
|
8835
|
+
},
|
|
8836
|
+
summary: "Rename an API key. Names are unique per member within a team (case-insensitive)."
|
|
8837
|
+
},
|
|
8765
8838
|
revokeApiKey: {
|
|
8766
8839
|
method: "DELETE",
|
|
8767
8840
|
path: "/api-keys/:keyId",
|
|
@@ -9070,6 +9143,23 @@ var audioContract = c3.router({
|
|
|
9070
9143
|
}
|
|
9071
9144
|
});
|
|
9072
9145
|
|
|
9146
|
+
// ../canvas-yjs/src/canvas-vocabulary.ts
|
|
9147
|
+
var CANVAS_NODE_TYPES = [
|
|
9148
|
+
"text",
|
|
9149
|
+
"image",
|
|
9150
|
+
"video",
|
|
9151
|
+
"audio",
|
|
9152
|
+
"file",
|
|
9153
|
+
"group",
|
|
9154
|
+
"custom_text",
|
|
9155
|
+
"pdf",
|
|
9156
|
+
"composite",
|
|
9157
|
+
"stitch",
|
|
9158
|
+
"magic_resize"
|
|
9159
|
+
];
|
|
9160
|
+
var CANVAS_GROUP_TYPES = ["default", "unified", "template"];
|
|
9161
|
+
var CANVAS_MEDIA_TYPES = ["image", "video", "audio", "pdf"];
|
|
9162
|
+
|
|
9073
9163
|
// ../canvas-yjs/src/group-color.ts
|
|
9074
9164
|
var GROUP_COLOR_KEYS = [
|
|
9075
9165
|
"default",
|
|
@@ -9348,6 +9438,9 @@ function parseAspectRatio(ratio) {
|
|
|
9348
9438
|
}
|
|
9349
9439
|
var ASPECT_RATIO_WIDTHS = {
|
|
9350
9440
|
"21:9": 560,
|
|
9441
|
+
"20:9": 555,
|
|
9442
|
+
"19.5:9": 550,
|
|
9443
|
+
"2:1": 535,
|
|
9351
9444
|
"16:9": 520,
|
|
9352
9445
|
"3:2": 480,
|
|
9353
9446
|
"4:3": 440,
|
|
@@ -9357,6 +9450,9 @@ var ASPECT_RATIO_WIDTHS = {
|
|
|
9357
9450
|
"3:4": 340,
|
|
9358
9451
|
"2:3": 320,
|
|
9359
9452
|
"9:16": 300,
|
|
9453
|
+
"1:2": 290,
|
|
9454
|
+
"9:19.5": 275,
|
|
9455
|
+
"9:20": 268,
|
|
9360
9456
|
"9:21": 260
|
|
9361
9457
|
};
|
|
9362
9458
|
var TEXT_NODE_WIDTH = 380;
|
|
@@ -9371,6 +9467,9 @@ var PDF_NODE_DEFAULT_WIDTH = 440;
|
|
|
9371
9467
|
var NODE_CARD_OVERHEAD = 252;
|
|
9372
9468
|
var ASPECT_RATIOS = [
|
|
9373
9469
|
"21:9",
|
|
9470
|
+
"20:9",
|
|
9471
|
+
"19.5:9",
|
|
9472
|
+
"2:1",
|
|
9374
9473
|
"16:9",
|
|
9375
9474
|
"3:2",
|
|
9376
9475
|
"4:3",
|
|
@@ -9380,6 +9479,9 @@ var ASPECT_RATIOS = [
|
|
|
9380
9479
|
"3:4",
|
|
9381
9480
|
"2:3",
|
|
9382
9481
|
"9:16",
|
|
9482
|
+
"1:2",
|
|
9483
|
+
"9:19.5",
|
|
9484
|
+
"9:20",
|
|
9383
9485
|
"9:21"
|
|
9384
9486
|
];
|
|
9385
9487
|
var MODALITIES = {
|
|
@@ -10679,12 +10781,7 @@ function findClearPosition(obstacles, newWidth, newHeight, idealX = 0, idealY =
|
|
|
10679
10781
|
}
|
|
10680
10782
|
|
|
10681
10783
|
// ../api-contract/src/direct-file-node-validation.ts
|
|
10682
|
-
var DirectFileNodeMediaTypeSchema = external_exports.enum(
|
|
10683
|
-
"image",
|
|
10684
|
-
"video",
|
|
10685
|
-
"audio",
|
|
10686
|
-
"pdf"
|
|
10687
|
-
]);
|
|
10784
|
+
var DirectFileNodeMediaTypeSchema = external_exports.enum(CANVAS_MEDIA_TYPES);
|
|
10688
10785
|
function inferDirectFileNodeMediaTypeFromContentType(contentType) {
|
|
10689
10786
|
const mimeType = contentType.split(";")[0]?.trim().toLowerCase();
|
|
10690
10787
|
if (!mimeType) return null;
|
|
@@ -11066,19 +11163,7 @@ var GeometrySchema = external_exports.object({
|
|
|
11066
11163
|
h: external_exports.number(),
|
|
11067
11164
|
zIndex: external_exports.number().optional()
|
|
11068
11165
|
});
|
|
11069
|
-
var NodeTypeSchema = external_exports.enum(
|
|
11070
|
-
"text",
|
|
11071
|
-
"image",
|
|
11072
|
-
"video",
|
|
11073
|
-
"audio",
|
|
11074
|
-
"file",
|
|
11075
|
-
"group",
|
|
11076
|
-
"custom_text",
|
|
11077
|
-
"pdf",
|
|
11078
|
-
"composite",
|
|
11079
|
-
"stitch",
|
|
11080
|
-
"magic_resize"
|
|
11081
|
-
]);
|
|
11166
|
+
var NodeTypeSchema = external_exports.enum(CANVAS_NODE_TYPES);
|
|
11082
11167
|
var EdgeTypeSchema = external_exports.enum([
|
|
11083
11168
|
"text",
|
|
11084
11169
|
"image",
|
|
@@ -11086,7 +11171,7 @@ var EdgeTypeSchema = external_exports.enum([
|
|
|
11086
11171
|
"audio",
|
|
11087
11172
|
"file"
|
|
11088
11173
|
]);
|
|
11089
|
-
var GroupTypeSchema = external_exports.enum(
|
|
11174
|
+
var GroupTypeSchema = external_exports.enum(CANVAS_GROUP_TYPES);
|
|
11090
11175
|
var GroupColorSchema = external_exports.enum(GROUP_COLOR_KEYS);
|
|
11091
11176
|
var ModelConfigSchema = external_exports.object({
|
|
11092
11177
|
model: external_exports.string(),
|
|
@@ -11143,7 +11228,8 @@ var OutputResolutionPresetSchema = external_exports.enum([
|
|
|
11143
11228
|
"540p",
|
|
11144
11229
|
"580p",
|
|
11145
11230
|
"720p",
|
|
11146
|
-
// Fal's MiniMax H3 resolution enum spells its
|
|
11231
|
+
// Fal's MiniMax H3 resolution enum spells its tiers `480P` and `768P`.
|
|
11232
|
+
"480P",
|
|
11147
11233
|
"768P",
|
|
11148
11234
|
"1080p",
|
|
11149
11235
|
"1440p",
|
|
@@ -11194,6 +11280,11 @@ var AssetSummaryDetailsSchema = external_exports.object({
|
|
|
11194
11280
|
var AssetResponseSchema = external_exports.object({
|
|
11195
11281
|
/** Omitted from persisted snapshots created before this field existed. */
|
|
11196
11282
|
assetId: external_exports.string().uuid().optional(),
|
|
11283
|
+
/**
|
|
11284
|
+
* The asset's stored name, then its producing node title, then its filename.
|
|
11285
|
+
* Optional for persisted snapshots created before this field existed.
|
|
11286
|
+
*/
|
|
11287
|
+
displayName: external_exports.string().nullable().optional(),
|
|
11197
11288
|
url: external_exports.string().nullable(),
|
|
11198
11289
|
originalUrl: external_exports.string().nullable(),
|
|
11199
11290
|
previewUrl: external_exports.string().nullable(),
|
|
@@ -11379,10 +11470,16 @@ var EdgeResponseSchema = external_exports.object({
|
|
|
11379
11470
|
dstHandle: external_exports.string().nullable(),
|
|
11380
11471
|
createdAt: external_exports.string().datetime()
|
|
11381
11472
|
});
|
|
11473
|
+
var PinnedModelSchema = external_exports.object({
|
|
11474
|
+
model: external_exports.string(),
|
|
11475
|
+
mode: external_exports.string().optional()
|
|
11476
|
+
});
|
|
11477
|
+
var pinnedModelsField = external_exports.array(PinnedModelSchema).max(MAX_PINNED_MODELS).optional();
|
|
11382
11478
|
var CanvasMediaPresetSchema = external_exports.object({
|
|
11383
11479
|
image: external_exports.object({
|
|
11384
11480
|
model: external_exports.string().optional(),
|
|
11385
11481
|
mode: external_exports.string().optional(),
|
|
11482
|
+
pinnedModels: pinnedModelsField,
|
|
11386
11483
|
aspectRatio: OutputAspectRatioSchema.optional(),
|
|
11387
11484
|
resolution: OutputResolutionSchema.optional(),
|
|
11388
11485
|
fast: external_exports.boolean().optional(),
|
|
@@ -11391,6 +11488,7 @@ var CanvasMediaPresetSchema = external_exports.object({
|
|
|
11391
11488
|
video: external_exports.object({
|
|
11392
11489
|
model: external_exports.string().optional(),
|
|
11393
11490
|
mode: external_exports.string().optional(),
|
|
11491
|
+
pinnedModels: pinnedModelsField,
|
|
11394
11492
|
aspectRatio: OutputAspectRatioSchema.optional(),
|
|
11395
11493
|
resolution: OutputResolutionSchema.optional(),
|
|
11396
11494
|
duration: external_exports.number().int().positive().optional(),
|
|
@@ -11400,12 +11498,14 @@ var CanvasMediaPresetSchema = external_exports.object({
|
|
|
11400
11498
|
text: external_exports.object({
|
|
11401
11499
|
model: external_exports.string().optional(),
|
|
11402
11500
|
mode: external_exports.string().optional(),
|
|
11501
|
+
pinnedModels: pinnedModelsField,
|
|
11403
11502
|
fast: external_exports.boolean().optional(),
|
|
11404
11503
|
numVariations: external_exports.number().int().min(1).max(MAX_VARIATIONS).optional()
|
|
11405
11504
|
}).optional(),
|
|
11406
11505
|
audio: external_exports.object({
|
|
11407
11506
|
model: external_exports.string().optional(),
|
|
11408
11507
|
mode: external_exports.string().optional(),
|
|
11508
|
+
pinnedModels: pinnedModelsField,
|
|
11409
11509
|
/** Default ElevenLabs stock voice id (text-to-speech / voice changer). */
|
|
11410
11510
|
voiceId: external_exports.string().optional(),
|
|
11411
11511
|
/** Default team-owned custom voice id; wins over `voiceId` when set. */
|
|
@@ -11538,22 +11638,16 @@ var RunNodeBodySchema = external_exports.object({
|
|
|
11538
11638
|
/** Explicit image URLs to include as inputs (merged with edge-resolved images). */
|
|
11539
11639
|
imageUrls: external_exports.array(external_exports.string().url()).max(MAX_INPUT_IMAGES).optional(),
|
|
11540
11640
|
/**
|
|
11541
|
-
*
|
|
11542
|
-
*
|
|
11543
|
-
*
|
|
11544
|
-
*
|
|
11545
|
-
*/
|
|
11546
|
-
elevenLabsVoiceId: external_exports.string().trim().min(1).optional(),
|
|
11547
|
-
/**
|
|
11548
|
-
* Provider-agnostic voice selection, validated against the resolved
|
|
11549
|
-
* variant's voice capability. Takes precedence over `elevenLabsVoiceId`.
|
|
11641
|
+
* Provider-agnostic voice selection for audio TTS, validated against the
|
|
11642
|
+
* resolved variant's voice capability. Mode-specific validation lives in
|
|
11643
|
+
* the run service because the schema can't see the resolved model→mode
|
|
11644
|
+
* mapping.
|
|
11550
11645
|
*/
|
|
11551
11646
|
voiceId: external_exports.string().trim().min(1).optional(),
|
|
11552
11647
|
/**
|
|
11553
11648
|
* Team-owned custom voice. When set the backend resolves the underlying
|
|
11554
|
-
* provider voice id from the database and uses it in place of
|
|
11555
|
-
*
|
|
11556
|
-
* soft-deleted.
|
|
11649
|
+
* provider voice id from the database and uses it in place of `voiceId`.
|
|
11650
|
+
* The voice must belong to the same team and not be soft-deleted.
|
|
11557
11651
|
*/
|
|
11558
11652
|
customVoiceId: external_exports.string().uuid().optional(),
|
|
11559
11653
|
/**
|
|
@@ -11606,6 +11700,68 @@ var RunSmartLayersResponseSchema = external_exports.object({
|
|
|
11606
11700
|
nodeRunId: external_exports.string().uuid(),
|
|
11607
11701
|
creditCost: external_exports.number().int()
|
|
11608
11702
|
});
|
|
11703
|
+
var StudioToolDimensionSchema = external_exports.number().positive().finite();
|
|
11704
|
+
var StudioToolCoordinateSchema = external_exports.number().finite();
|
|
11705
|
+
var SmartLayerToolSourceSchema = external_exports.object({
|
|
11706
|
+
imageUrl: external_exports.string().url(),
|
|
11707
|
+
rect: external_exports.object({
|
|
11708
|
+
x: StudioToolCoordinateSchema,
|
|
11709
|
+
y: StudioToolCoordinateSchema,
|
|
11710
|
+
width: StudioToolDimensionSchema,
|
|
11711
|
+
height: StudioToolDimensionSchema
|
|
11712
|
+
}).optional()
|
|
11713
|
+
});
|
|
11714
|
+
var SmartLayerEditAnnotationSchema = external_exports.discriminatedUnion("type", [
|
|
11715
|
+
external_exports.object({
|
|
11716
|
+
type: external_exports.literal("point"),
|
|
11717
|
+
x: StudioToolCoordinateSchema,
|
|
11718
|
+
y: StudioToolCoordinateSchema
|
|
11719
|
+
}),
|
|
11720
|
+
external_exports.object({
|
|
11721
|
+
type: external_exports.literal("box"),
|
|
11722
|
+
x: StudioToolCoordinateSchema,
|
|
11723
|
+
y: StudioToolCoordinateSchema,
|
|
11724
|
+
width: StudioToolDimensionSchema,
|
|
11725
|
+
height: StudioToolDimensionSchema
|
|
11726
|
+
})
|
|
11727
|
+
]);
|
|
11728
|
+
var GenerativeEditSmartLayerBodySchema = external_exports.object({
|
|
11729
|
+
/** Natural-language edit instruction (what to change). */
|
|
11730
|
+
instruction: external_exports.string().trim().min(1).max(2e3),
|
|
11731
|
+
/**
|
|
11732
|
+
* Point/box annotations in artboard coordinates, narrowing the edit to
|
|
11733
|
+
* regions of the target. Optional: the target layer is already chosen by
|
|
11734
|
+
* `source`, so an empty list is a whole-image edit.
|
|
11735
|
+
*/
|
|
11736
|
+
annotations: external_exports.array(SmartLayerEditAnnotationSchema).max(20),
|
|
11737
|
+
/**
|
|
11738
|
+
* Studio artboard dimensions the annotations were placed in. The backend
|
|
11739
|
+
* normalizes annotations from this space into the model's 0–999 relative
|
|
11740
|
+
* coordinate space, so grounding stays aligned even when the artboard was
|
|
11741
|
+
* resized off the source resolution.
|
|
11742
|
+
*/
|
|
11743
|
+
artboardWidth: StudioToolDimensionSchema,
|
|
11744
|
+
artboardHeight: StudioToolDimensionSchema,
|
|
11745
|
+
/** Layer image to edit, when it isn't the node's own asset. */
|
|
11746
|
+
source: SmartLayerToolSourceSchema.optional()
|
|
11747
|
+
});
|
|
11748
|
+
var GenerativeEditSmartLayerResponseSchema = external_exports.object({
|
|
11749
|
+
/**
|
|
11750
|
+
* The re-rendered image, in studio artboard coordinates. The edit replaces
|
|
11751
|
+
* the whole source image, so this occupies exactly the source layer's rect
|
|
11752
|
+
* (the full artboard when the tool ran on the node's own image).
|
|
11753
|
+
*/
|
|
11754
|
+
layer: external_exports.object({
|
|
11755
|
+
type: external_exports.literal("image"),
|
|
11756
|
+
x: external_exports.number(),
|
|
11757
|
+
y: external_exports.number(),
|
|
11758
|
+
width: external_exports.number().positive(),
|
|
11759
|
+
height: external_exports.number().positive(),
|
|
11760
|
+
snapshotSrc: external_exports.string().url()
|
|
11761
|
+
}),
|
|
11762
|
+
/** Credits charged for this edit. */
|
|
11763
|
+
creditCost: external_exports.number().int()
|
|
11764
|
+
});
|
|
11609
11765
|
var MagicResizeDefaultRatioSchema = external_exports.enum([
|
|
11610
11766
|
"21:9",
|
|
11611
11767
|
"16:9",
|
|
@@ -11695,6 +11851,8 @@ var CanvasLibraryAssetResponseSchema = external_exports.object({
|
|
|
11695
11851
|
previewUrl: external_exports.string().nullable(),
|
|
11696
11852
|
mediaType: external_exports.enum(["image", "video", "audio", "pdf"]),
|
|
11697
11853
|
filename: external_exports.string(),
|
|
11854
|
+
/** Optional for clients deployed before asset display names. */
|
|
11855
|
+
displayName: external_exports.string().nullable().optional(),
|
|
11698
11856
|
fileSizeInKb: external_exports.number().int().nonnegative(),
|
|
11699
11857
|
durationInMs: external_exports.number().int().nonnegative().nullable(),
|
|
11700
11858
|
createdAt: external_exports.string().datetime(),
|
|
@@ -12326,7 +12484,10 @@ var canvasContract = c4.router({
|
|
|
12326
12484
|
method: "PATCH",
|
|
12327
12485
|
path: "/nodes/:nodeId/share-mode",
|
|
12328
12486
|
pathParams: external_exports.object({ nodeId: external_exports.string().uuid() }),
|
|
12329
|
-
body: external_exports.object({
|
|
12487
|
+
body: external_exports.object({
|
|
12488
|
+
shareMode: ShareVisibilitySchema,
|
|
12489
|
+
nodeVersionId: external_exports.string().uuid().nullable().optional()
|
|
12490
|
+
}),
|
|
12330
12491
|
responses: {
|
|
12331
12492
|
200: external_exports.object({ shareMode: ShareVisibilitySchema }),
|
|
12332
12493
|
403: MessageResponseSchema,
|
|
@@ -12544,6 +12705,18 @@ var canvasContract = c4.router({
|
|
|
12544
12705
|
404: NodeRunErrorResponseSchema
|
|
12545
12706
|
}
|
|
12546
12707
|
},
|
|
12708
|
+
generativeEditSmartLayer: {
|
|
12709
|
+
method: "POST",
|
|
12710
|
+
path: "/nodes/:nodeId/smart-layers-generative-edits",
|
|
12711
|
+
pathParams: external_exports.object({ nodeId: external_exports.string().uuid() }),
|
|
12712
|
+
body: GenerativeEditSmartLayerBodySchema,
|
|
12713
|
+
responses: {
|
|
12714
|
+
201: GenerativeEditSmartLayerResponseSchema,
|
|
12715
|
+
400: NodeRunErrorResponseSchema,
|
|
12716
|
+
403: NodeRunErrorResponseSchema,
|
|
12717
|
+
404: NodeRunErrorResponseSchema
|
|
12718
|
+
}
|
|
12719
|
+
},
|
|
12547
12720
|
runMagicResize: {
|
|
12548
12721
|
method: "POST",
|
|
12549
12722
|
path: "/nodes/:nodeId/magic-resize",
|
|
@@ -13209,6 +13382,32 @@ var customFontContract = c5.router({
|
|
|
13209
13382
|
}
|
|
13210
13383
|
});
|
|
13211
13384
|
|
|
13385
|
+
// ../api-contract/src/asset-engagement/schema.ts
|
|
13386
|
+
var ASSET_ENGAGEMENT_SOURCES = {
|
|
13387
|
+
/** In-app (web) Mel chat acting for a member. */
|
|
13388
|
+
Agent: "agent",
|
|
13389
|
+
Canvas: "canvas",
|
|
13390
|
+
/** API key with no MCP session header — CLI and direct API use. */
|
|
13391
|
+
Cli: "cli",
|
|
13392
|
+
Files: "files",
|
|
13393
|
+
/** Hosted MCP server, identified by its session header. */
|
|
13394
|
+
Mcp: "mcp",
|
|
13395
|
+
Playground: "playground",
|
|
13396
|
+
/** Anonymous visitor on a `/a/` or `/g/` share link. */
|
|
13397
|
+
PublicLink: "public_link",
|
|
13398
|
+
/** Mel acting inside Slack. */
|
|
13399
|
+
Slack: "slack"
|
|
13400
|
+
};
|
|
13401
|
+
var ClientAssetEngagementSourceSchema = external_exports.enum([
|
|
13402
|
+
ASSET_ENGAGEMENT_SOURCES.Canvas,
|
|
13403
|
+
ASSET_ENGAGEMENT_SOURCES.Files,
|
|
13404
|
+
ASSET_ENGAGEMENT_SOURCES.Playground
|
|
13405
|
+
]);
|
|
13406
|
+
var AssetDownloadResponseSchema = external_exports.object({
|
|
13407
|
+
url: external_exports.string().url(),
|
|
13408
|
+
filename: external_exports.string()
|
|
13409
|
+
});
|
|
13410
|
+
|
|
13212
13411
|
// ../api-contract/src/files/routes.ts
|
|
13213
13412
|
var c6 = initContract();
|
|
13214
13413
|
var filesContract = c6.router({
|
|
@@ -13370,6 +13569,18 @@ var filesContract = c6.router({
|
|
|
13370
13569
|
},
|
|
13371
13570
|
summary: "Move a file to a folder"
|
|
13372
13571
|
},
|
|
13572
|
+
renameFile: {
|
|
13573
|
+
method: "PATCH",
|
|
13574
|
+
path: "/files/:assetId/name",
|
|
13575
|
+
pathParams: FileAssetIdParamsSchema,
|
|
13576
|
+
body: RenameFileBodySchema,
|
|
13577
|
+
responses: {
|
|
13578
|
+
200: FileCardSchema,
|
|
13579
|
+
403: ErrorBodySchema,
|
|
13580
|
+
404: ErrorBodySchema
|
|
13581
|
+
},
|
|
13582
|
+
summary: "Rename a file"
|
|
13583
|
+
},
|
|
13373
13584
|
bulkDownloadFiles: {
|
|
13374
13585
|
method: "POST",
|
|
13375
13586
|
path: "/files/bulk/download",
|
|
@@ -13450,6 +13661,38 @@ var filesContract = c6.router({
|
|
|
13450
13661
|
},
|
|
13451
13662
|
summary: "Restore a file hidden from Files"
|
|
13452
13663
|
},
|
|
13664
|
+
/**
|
|
13665
|
+
* Put a generation made on a canvas no member may view into Files. Cast's
|
|
13666
|
+
* clips are the first caller: the canvas they were made on is the
|
|
13667
|
+
* product's, so nothing on it is a file until somebody asks for one.
|
|
13668
|
+
*
|
|
13669
|
+
* Distinct from `unhideFile`, which restores a file the member removed.
|
|
13670
|
+
* This one adds a file that was never there.
|
|
13671
|
+
*/
|
|
13672
|
+
saveFileToFiles: {
|
|
13673
|
+
method: "POST",
|
|
13674
|
+
path: "/files/:assetId/save",
|
|
13675
|
+
pathParams: FileAssetIdParamsSchema,
|
|
13676
|
+
body: null,
|
|
13677
|
+
responses: {
|
|
13678
|
+
204: c6.noBody(),
|
|
13679
|
+
403: ErrorBodySchema,
|
|
13680
|
+
404: ErrorBodySchema
|
|
13681
|
+
},
|
|
13682
|
+
summary: "Save a generation into Files"
|
|
13683
|
+
},
|
|
13684
|
+
unsaveFileFromFiles: {
|
|
13685
|
+
method: "POST",
|
|
13686
|
+
path: "/files/:assetId/unsave",
|
|
13687
|
+
pathParams: FileAssetIdParamsSchema,
|
|
13688
|
+
body: null,
|
|
13689
|
+
responses: {
|
|
13690
|
+
204: c6.noBody(),
|
|
13691
|
+
403: ErrorBodySchema,
|
|
13692
|
+
404: ErrorBodySchema
|
|
13693
|
+
},
|
|
13694
|
+
summary: "Take a saved generation back out of Files"
|
|
13695
|
+
},
|
|
13453
13696
|
listFiles: {
|
|
13454
13697
|
method: "GET",
|
|
13455
13698
|
path: "/files",
|
|
@@ -13524,7 +13767,11 @@ var filesContract = c6.router({
|
|
|
13524
13767
|
method: "PATCH",
|
|
13525
13768
|
path: "/files/:assetId/share-mode",
|
|
13526
13769
|
pathParams: FileAssetIdParamsSchema,
|
|
13527
|
-
body: external_exports.object({
|
|
13770
|
+
body: external_exports.object({
|
|
13771
|
+
shareMode: AssetShareModeSchema,
|
|
13772
|
+
nodeVersionId: external_exports.string().uuid().nullable().optional(),
|
|
13773
|
+
engagementSource: ClientAssetEngagementSourceSchema.optional()
|
|
13774
|
+
}),
|
|
13528
13775
|
responses: {
|
|
13529
13776
|
200: external_exports.object({ shareMode: AssetShareModeSchema }),
|
|
13530
13777
|
403: ErrorBodySchema,
|
|
@@ -13837,7 +14084,40 @@ var InputImageAspectRatioConstraintsResponseSchema = external_exports.object({
|
|
|
13837
14084
|
var PromoRateLimitSchema = external_exports.object({
|
|
13838
14085
|
used: external_exports.number().int().nonnegative(),
|
|
13839
14086
|
limit: external_exports.number().int().nonnegative(),
|
|
13840
|
-
remaining: external_exports.number().int().nonnegative()
|
|
14087
|
+
remaining: external_exports.number().int().nonnegative(),
|
|
14088
|
+
/**
|
|
14089
|
+
* Credits one unit of allowance is worth, for a campaign metered in
|
|
14090
|
+
* something other than whole generations. Present makes the allowance
|
|
14091
|
+
* divisible: a run costing more than what is left is part-covered rather
|
|
14092
|
+
* than dropped to full price.
|
|
14093
|
+
*
|
|
14094
|
+
* Absent means the campaign meters generations, where `remaining > 0` is
|
|
14095
|
+
* the whole answer. A client that does not understand this field must
|
|
14096
|
+
* treat the run as fully priced rather than free — see `freeResolution`.
|
|
14097
|
+
*/
|
|
14098
|
+
unitCredits: external_exports.number().positive().optional(),
|
|
14099
|
+
/**
|
|
14100
|
+
* The output resolution `unitCredits` prices. Absent means every resolution
|
|
14101
|
+
* qualifies. Sent rather than assumed so the client never hardcodes which
|
|
14102
|
+
* resolution the campaign is running on.
|
|
14103
|
+
*
|
|
14104
|
+
* A campaign spendable at several resolutions still sends this pair, naming
|
|
14105
|
+
* the one a client that predates `unitCreditsByResolution` should treat as
|
|
14106
|
+
* covered. Such a client quotes the rest at full price, which understates a
|
|
14107
|
+
* discount rather than promising one that is not honoured.
|
|
14108
|
+
*/
|
|
14109
|
+
freeResolution: external_exports.string().optional(),
|
|
14110
|
+
/**
|
|
14111
|
+
* Credits one unit is worth at each covered resolution, when the allowance
|
|
14112
|
+
* is one pool spendable across several of them. A resolution absent from
|
|
14113
|
+
* the map is not covered.
|
|
14114
|
+
*
|
|
14115
|
+
* Present, this supersedes `unitCredits` / `freeResolution` entirely — that
|
|
14116
|
+
* pair stays on the wire only for clients that predate it. Read it through
|
|
14117
|
+
* `resolvePromoUnitCredits` rather than indexing it directly, so the
|
|
14118
|
+
* precedence lives in one place.
|
|
14119
|
+
*/
|
|
14120
|
+
unitCreditsByResolution: external_exports.record(external_exports.string(), external_exports.number().positive()).optional()
|
|
13841
14121
|
});
|
|
13842
14122
|
var ModelVariantResponseSchema = external_exports.object({
|
|
13843
14123
|
mode: external_exports.string(),
|
|
@@ -14370,6 +14650,12 @@ var TEAM_PLAN_IDS = [
|
|
|
14370
14650
|
];
|
|
14371
14651
|
var CUSTOM_PLAN_TYPE_IDS = ["enterprise", "creative_partner"];
|
|
14372
14652
|
|
|
14653
|
+
// ../pricing/src/credit-top-up.ts
|
|
14654
|
+
var MELIUS_CREDITS_PER_USD = 1e3;
|
|
14655
|
+
var CENTS_PER_USD = 100;
|
|
14656
|
+
var CREDITS_PER_USD_CENT = MELIUS_CREDITS_PER_USD / CENTS_PER_USD;
|
|
14657
|
+
var MAX_CREDIT_TOP_UP_DISCOUNT_PERCENTAGE = 90;
|
|
14658
|
+
|
|
14373
14659
|
// ../api-contract/src/team/schema.ts
|
|
14374
14660
|
var TeamRoleSchema = external_exports.enum(["owner", "admin", "editor", "viewer"]);
|
|
14375
14661
|
var TeamPlanSchema = external_exports.enum(TEAM_PLAN_IDS);
|
|
@@ -14382,13 +14668,27 @@ var EnterpriseOrderLineItemSchema = external_exports.object({
|
|
|
14382
14668
|
total: external_exports.string().min(1)
|
|
14383
14669
|
});
|
|
14384
14670
|
var EnterpriseBillingIntervalSchema = external_exports.enum(["monthly", "annual"]);
|
|
14671
|
+
var EnterpriseAllowedPaymentMethodsSchema = external_exports.enum([
|
|
14672
|
+
"card_and_bank",
|
|
14673
|
+
"bank_only",
|
|
14674
|
+
"card_only"
|
|
14675
|
+
]);
|
|
14385
14676
|
var EnterpriseStripeBillingInputSchema = external_exports.object({
|
|
14386
14677
|
unitAmount: external_exports.number().int().positive(),
|
|
14387
14678
|
// Expose the transform output to OpenAPI generation.
|
|
14388
14679
|
currency: external_exports.string().length(3).transform((value) => value.toLowerCase()).pipe(external_exports.string()),
|
|
14389
14680
|
billingInterval: EnterpriseBillingIntervalSchema,
|
|
14390
14681
|
creditsPerPeriod: external_exports.number().int().positive(),
|
|
14391
|
-
|
|
14682
|
+
allowedPaymentMethods: EnterpriseAllowedPaymentMethodsSchema.optional(),
|
|
14683
|
+
contractEndAt: external_exports.string().datetime().optional(),
|
|
14684
|
+
/**
|
|
14685
|
+
* Whether the term rolls into another of the same length instead of
|
|
14686
|
+
* ending. Only meaningful alongside a `contractEndAt`. Absent means off,
|
|
14687
|
+
* which is what a plan created before this field gets; new plans send it
|
|
14688
|
+
* explicitly rather than the resolver defaulting to on, so existing
|
|
14689
|
+
* contracts keep their current behavior.
|
|
14690
|
+
*/
|
|
14691
|
+
autoRenew: external_exports.boolean().optional()
|
|
14392
14692
|
}).refine(
|
|
14393
14693
|
(input) => input.billingInterval !== "annual" || input.contractEndAt != null,
|
|
14394
14694
|
{
|
|
@@ -14417,6 +14717,13 @@ var EnterpriseOrderDetailsSchema = external_exports.object({
|
|
|
14417
14717
|
creditPackageAmount: external_exports.number().int().nonnegative(),
|
|
14418
14718
|
creditPackageUnit: external_exports.string().min(1),
|
|
14419
14719
|
creditRolloverPolicy: CustomPlanCreditRolloverPolicySchema.optional(),
|
|
14720
|
+
/**
|
|
14721
|
+
* Whole percent off the standard per-credit rate for top-ups beyond the
|
|
14722
|
+
* plan's allowance. Absent means the standard rate. Unlike the rest of the
|
|
14723
|
+
* order details this is not presentational — checkout, the Stripe grant and
|
|
14724
|
+
* the receipt all price against it (see `@repo/pricing/credit-top-up`).
|
|
14725
|
+
*/
|
|
14726
|
+
creditTopUpDiscountPercentage: external_exports.number().int().min(1).max(MAX_CREDIT_TOP_UP_DISCOUNT_PERCENTAGE).optional(),
|
|
14420
14727
|
orderDate: external_exports.string().date(),
|
|
14421
14728
|
/** Omit for plans with no fixed contract term (e.g. monthly Stripe plans). */
|
|
14422
14729
|
termCount: external_exports.number().int().positive().optional(),
|
|
@@ -14447,24 +14754,57 @@ var EnterprisePendingExpansionSchema = external_exports.object({
|
|
|
14447
14754
|
preparedAt: external_exports.string().datetime(),
|
|
14448
14755
|
preparedByEmail: external_exports.string().nullable()
|
|
14449
14756
|
});
|
|
14757
|
+
var EnterprisePendingRenewalSchema = external_exports.object({
|
|
14758
|
+
id: external_exports.string(),
|
|
14759
|
+
newUnitAmount: external_exports.number().int().positive(),
|
|
14760
|
+
newCreditsPerPeriod: external_exports.number().int().positive(),
|
|
14761
|
+
newStripePriceId: external_exports.string().min(1),
|
|
14762
|
+
/** Length of the renewal term in monthly billing periods. */
|
|
14763
|
+
newTermMonths: external_exports.number().int().positive(),
|
|
14764
|
+
newContractEndAt: external_exports.string().datetime(),
|
|
14765
|
+
/** Operator-authored replacement order details. Purely presentational. */
|
|
14766
|
+
newOrderDetails: EnterpriseOrderDetailsSchema.optional(),
|
|
14767
|
+
preparedAt: external_exports.string().datetime(),
|
|
14768
|
+
preparedByEmail: external_exports.string().nullable()
|
|
14769
|
+
});
|
|
14450
14770
|
var EnterpriseStripeBillingSchema = external_exports.object({
|
|
14451
14771
|
unitAmount: external_exports.number().int().positive(),
|
|
14452
14772
|
// Expose the transform output to OpenAPI generation.
|
|
14453
14773
|
currency: external_exports.string().length(3).transform((value) => value.toLowerCase()).pipe(external_exports.string()),
|
|
14454
14774
|
billingInterval: EnterpriseBillingIntervalSchema,
|
|
14455
14775
|
creditsPerPeriod: external_exports.number().int().positive(),
|
|
14776
|
+
allowedPaymentMethods: EnterpriseAllowedPaymentMethodsSchema.optional(),
|
|
14456
14777
|
contractEndAt: external_exports.string().datetime().optional(),
|
|
14778
|
+
/**
|
|
14779
|
+
* Whether the contract rolls into another term of the same length at
|
|
14780
|
+
* `contractEndAt` instead of ending. Only meaningful alongside a
|
|
14781
|
+
* `contractEndAt`; a plan with no fixed term already renews indefinitely.
|
|
14782
|
+
* Absent means off, so a plan created before this field keeps ending at its
|
|
14783
|
+
* contract end. Read it through `resolveEnterpriseAutoRenew`.
|
|
14784
|
+
*/
|
|
14785
|
+
autoRenew: external_exports.boolean().optional(),
|
|
14457
14786
|
stripePriceId: external_exports.string().min(1),
|
|
14458
14787
|
activatedAt: external_exports.string().datetime().optional(),
|
|
14459
14788
|
activatedByEmail: external_exports.string().nullable().optional(),
|
|
14460
|
-
|
|
14789
|
+
paymentMethodType: external_exports.enum(["card", "us_bank_account"]).optional(),
|
|
14790
|
+
firstPaymentSettledAt: external_exports.string().datetime().optional(),
|
|
14791
|
+
pendingExpansion: EnterprisePendingExpansionSchema.optional(),
|
|
14792
|
+
pendingRenewal: EnterprisePendingRenewalSchema.optional(),
|
|
14793
|
+
/** Stripe subscription schedule driving a prepared renewal, while attached. */
|
|
14794
|
+
stripeScheduleId: external_exports.string().min(1).optional()
|
|
14461
14795
|
});
|
|
14462
14796
|
var CustomerEnterpriseStripeBillingSchema = EnterpriseStripeBillingSchema.omit({
|
|
14463
14797
|
activatedAt: true,
|
|
14464
14798
|
activatedByEmail: true,
|
|
14799
|
+
allowedPaymentMethods: true,
|
|
14800
|
+
paymentMethodType: true,
|
|
14801
|
+
firstPaymentSettledAt: true,
|
|
14465
14802
|
// Operator-only; the customer reads a pending expansion through the
|
|
14466
14803
|
// dedicated preview endpoint, which excludes operator emails.
|
|
14467
|
-
pendingExpansion: true
|
|
14804
|
+
pendingExpansion: true,
|
|
14805
|
+
// Same reason — it carries the preparing operator's email.
|
|
14806
|
+
pendingRenewal: true,
|
|
14807
|
+
stripeScheduleId: true
|
|
14468
14808
|
});
|
|
14469
14809
|
var EnterpriseStripeBillingAuditActionSchema = external_exports.enum([
|
|
14470
14810
|
"created",
|
|
@@ -14610,6 +14950,11 @@ var SharedAssetResponseSchema = external_exports.object({
|
|
|
14610
14950
|
height: external_exports.number().int().nullable(),
|
|
14611
14951
|
durationInMs: external_exports.number().int().nullable()
|
|
14612
14952
|
});
|
|
14953
|
+
var SharedDownloadResponseSchema = external_exports.object({
|
|
14954
|
+
url: external_exports.string().url().nullable(),
|
|
14955
|
+
text: external_exports.string().nullable(),
|
|
14956
|
+
filename: external_exports.string()
|
|
14957
|
+
});
|
|
14613
14958
|
var SharedGenerationMediaTypeSchema = external_exports.enum(["image", "video", "audio"]);
|
|
14614
14959
|
var SharedGenerationTypeSchema = external_exports.enum(["text", "image", "video", "audio"]);
|
|
14615
14960
|
var SharedGenerationReferenceSchema = external_exports.object({
|
|
@@ -14687,7 +15032,9 @@ var RecreateGenerationResponseSchema = external_exports.object({
|
|
|
14687
15032
|
recreatedGeneration: external_exports.object({
|
|
14688
15033
|
nodeId: external_exports.string().uuid(),
|
|
14689
15034
|
projectId: external_exports.string().uuid(),
|
|
14690
|
-
canvasId: external_exports.string().uuid()
|
|
15035
|
+
canvasId: external_exports.string().uuid(),
|
|
15036
|
+
nodeVersionId: external_exports.string().uuid().nullable().optional(),
|
|
15037
|
+
assetId: external_exports.string().uuid().nullable().optional()
|
|
14691
15038
|
}).optional()
|
|
14692
15039
|
});
|
|
14693
15040
|
var SharedGenerationHandoffSchema = RecreateGenerationResponseSchema.extend({
|
|
@@ -14780,6 +15127,9 @@ var ListAllProjectsQuerySchema = PaginationQuerySchema.extend({
|
|
|
14780
15127
|
// regardless of folder (the historical behavior).
|
|
14781
15128
|
folderId: external_exports.union([external_exports.string().uuid(), external_exports.literal("root")]).optional()
|
|
14782
15129
|
});
|
|
15130
|
+
var RecentProjectsQuerySchema = external_exports.object({
|
|
15131
|
+
teamId: external_exports.string().uuid().optional()
|
|
15132
|
+
});
|
|
14783
15133
|
var PaginatedProjectsResponseSchema = external_exports.object({
|
|
14784
15134
|
data: external_exports.array(ProjectResponseSchema),
|
|
14785
15135
|
total: external_exports.number().int()
|
|
@@ -14899,11 +15249,13 @@ var projectContract = c10.router({
|
|
|
14899
15249
|
listRecentProjects: {
|
|
14900
15250
|
method: "GET",
|
|
14901
15251
|
path: "/projects/recents",
|
|
15252
|
+
query: RecentProjectsQuerySchema,
|
|
14902
15253
|
responses: { 200: ProjectListResponseSchema }
|
|
14903
15254
|
},
|
|
14904
15255
|
listRecentProjectMetadata: {
|
|
14905
15256
|
method: "GET",
|
|
14906
15257
|
path: "/projects/recents/metadata",
|
|
15258
|
+
query: RecentProjectsQuerySchema,
|
|
14907
15259
|
responses: { 200: ProjectListResponseSchema }
|
|
14908
15260
|
},
|
|
14909
15261
|
listProjectThumbnails: {
|
|
@@ -15552,7 +15904,7 @@ function handleApiError(status, body, suggestion) {
|
|
|
15552
15904
|
extractMessage(body) ?? "Rate limit exceeded",
|
|
15553
15905
|
{
|
|
15554
15906
|
status,
|
|
15555
|
-
suggestion: suggestion ?? "Wait a moment and try again,
|
|
15907
|
+
suggestion: suggestion ?? "Wait a moment and try again, and send fewer requests in parallel"
|
|
15556
15908
|
}
|
|
15557
15909
|
),
|
|
15558
15910
|
EXIT_API_ERROR
|
|
@@ -15715,7 +16067,7 @@ function isMajorUpgrade(current, latest) {
|
|
|
15715
16067
|
return l[0] > c14[0];
|
|
15716
16068
|
}
|
|
15717
16069
|
function shouldShowUpgradeNotice(ctx = {}) {
|
|
15718
|
-
const current = ctx.current ?? "0.15.
|
|
16070
|
+
const current = ctx.current ?? "0.15.2";
|
|
15719
16071
|
const latest = ctx.latest ?? serverLatestVersion;
|
|
15720
16072
|
const env = ctx.env ?? process.env;
|
|
15721
16073
|
const isTty = ctx.isTty ?? Boolean(process.stderr.isTTY);
|
|
@@ -15736,7 +16088,7 @@ Upgrade: npm install -g @melius-ai/cli@latest (or: brew update && brew upgrade
|
|
|
15736
16088
|
function printUpgradeNoticeIfNeeded(ctx = {}) {
|
|
15737
16089
|
try {
|
|
15738
16090
|
if (!shouldShowUpgradeNotice(ctx)) return;
|
|
15739
|
-
const current = ctx.current ?? "0.15.
|
|
16091
|
+
const current = ctx.current ?? "0.15.2";
|
|
15740
16092
|
const latest = ctx.latest ?? serverLatestVersion;
|
|
15741
16093
|
process.stderr.write(formatUpgradeNotice(current, latest));
|
|
15742
16094
|
} catch {
|
|
@@ -20068,7 +20420,7 @@ function withDefaultHelp(args) {
|
|
|
20068
20420
|
}
|
|
20069
20421
|
function createProgram() {
|
|
20070
20422
|
const program2 = new Command();
|
|
20071
|
-
program2.name("mel").description("Mel \u2014 Melius agent CLI").version("0.15.
|
|
20423
|
+
program2.name("mel").description("Mel \u2014 Melius agent CLI").version("0.15.2").showSuggestionAfterError(true).option("--json", "Force JSON output (default)").option("--text", "Human-readable output").option(
|
|
20072
20424
|
"--fields <fields>",
|
|
20073
20425
|
"Select specific output fields (comma-separated)"
|
|
20074
20426
|
).option("--quiet", "Suppress output, exit code only").option("--verbose", "Log request/response metadata to stderr").addHelpText(
|
package/dist/src/index.js
CHANGED