@melius-ai/cli 0.15.1 → 0.15.3
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-SEXDTRY5.js} +432 -52
- 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
|
@@ -12,7 +12,11 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
12
12
|
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
13
13
|
});
|
|
14
14
|
var __commonJS = (cb, mod) => function __require2() {
|
|
15
|
-
|
|
15
|
+
try {
|
|
16
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
17
|
+
} catch (e) {
|
|
18
|
+
throw mod = 0, e;
|
|
19
|
+
}
|
|
16
20
|
};
|
|
17
21
|
var __export = (target, all) => {
|
|
18
22
|
for (var name in all)
|
|
@@ -7737,6 +7741,7 @@ var MAX_INPUT_DOCUMENTS = 5;
|
|
|
7737
7741
|
var MAX_AGENT_MESSAGE_CONTENT_LENGTH = 5e4;
|
|
7738
7742
|
var MAX_SEED = 2147483647;
|
|
7739
7743
|
var MAX_VARIATIONS = 10;
|
|
7744
|
+
var MAX_PINNED_MODELS = 5;
|
|
7740
7745
|
|
|
7741
7746
|
// ../api-contract/src/common.ts
|
|
7742
7747
|
var MessageResponseSchema = external_exports.object({ message: external_exports.string() });
|
|
@@ -7857,6 +7862,7 @@ var TAG_COLOR_PALETTE = [
|
|
|
7857
7862
|
];
|
|
7858
7863
|
var TagColorSchema = external_exports.enum(TAG_COLOR_PALETTE);
|
|
7859
7864
|
var MAX_ASSET_TAG_NAME_LENGTH = 100;
|
|
7865
|
+
var MAX_ASSET_DISPLAY_NAME_LENGTH = 500;
|
|
7860
7866
|
var FileTagSchema = external_exports.object({
|
|
7861
7867
|
id: external_exports.string().uuid(),
|
|
7862
7868
|
name: external_exports.string(),
|
|
@@ -7977,6 +7983,9 @@ var UpdateFileFolderBodySchema = external_exports.object({
|
|
|
7977
7983
|
var MoveFileBodySchema = external_exports.object({
|
|
7978
7984
|
folderId: external_exports.string().uuid().nullable()
|
|
7979
7985
|
});
|
|
7986
|
+
var RenameFileBodySchema = external_exports.object({
|
|
7987
|
+
displayName: external_exports.string().trim().min(1).max(MAX_ASSET_DISPLAY_NAME_LENGTH)
|
|
7988
|
+
});
|
|
7980
7989
|
var MAX_BULK_FILE_ACTION_ASSET_IDS = 500;
|
|
7981
7990
|
var BulkFileAssetIdsSchema = external_exports.array(external_exports.string().uuid()).min(1).max(MAX_BULK_FILE_ACTION_ASSET_IDS);
|
|
7982
7991
|
var BulkMoveFilesBodySchema = external_exports.object({
|
|
@@ -7986,7 +7995,13 @@ var BulkMoveFilesBodySchema = external_exports.object({
|
|
|
7986
7995
|
var BulkDownloadableIdsSchema = external_exports.array(external_exports.string().uuid()).max(MAX_BULK_FILE_ACTION_ASSET_IDS).default([]);
|
|
7987
7996
|
var BulkDownloadFilesBodySchema = external_exports.object({
|
|
7988
7997
|
assetIds: BulkDownloadableIdsSchema,
|
|
7989
|
-
folderIds: BulkDownloadableIdsSchema
|
|
7998
|
+
folderIds: BulkDownloadableIdsSchema,
|
|
7999
|
+
assetVersions: external_exports.array(
|
|
8000
|
+
external_exports.object({
|
|
8001
|
+
assetId: external_exports.string().uuid(),
|
|
8002
|
+
nodeVersionId: external_exports.string().uuid()
|
|
8003
|
+
})
|
|
8004
|
+
).max(MAX_BULK_FILE_ACTION_ASSET_IDS).optional()
|
|
7990
8005
|
}).refine((body) => body.assetIds.length + body.folderIds.length > 0, {
|
|
7991
8006
|
message: "Select at least one file or folder to download"
|
|
7992
8007
|
});
|
|
@@ -8306,6 +8321,14 @@ var AgentSessionResponseSchema = external_exports.object({
|
|
|
8306
8321
|
source: AgentSessionSourceSchema.optional(),
|
|
8307
8322
|
/** True when this transcript is view-only on the current surface. */
|
|
8308
8323
|
readOnly: external_exports.boolean().optional(),
|
|
8324
|
+
/**
|
|
8325
|
+
* True when the chat belongs to another member and is visible only because
|
|
8326
|
+
* they share their chats on this canvas. The server answers this rather
|
|
8327
|
+
* than the client comparing ids, so ownership arrives with the row instead
|
|
8328
|
+
* of depending on a second request that can lag or fail. Absent from a
|
|
8329
|
+
* server that predates the field, which reads as "mine" — today's behavior.
|
|
8330
|
+
*/
|
|
8331
|
+
shared: external_exports.boolean().optional(),
|
|
8309
8332
|
/** True when the agent is actively generating a response. */
|
|
8310
8333
|
isGenerating: external_exports.boolean(),
|
|
8311
8334
|
/** Present when the session is waiting for the user to approve a tool call. */
|
|
@@ -8397,6 +8420,10 @@ var AgentToolApprovalResponseSchema = external_exports.object({
|
|
|
8397
8420
|
createdAt: external_exports.string().datetime(),
|
|
8398
8421
|
updatedAt: external_exports.string().datetime()
|
|
8399
8422
|
});
|
|
8423
|
+
var AgentChatSharingResponseSchema = external_exports.object({
|
|
8424
|
+
canvasId: external_exports.string().uuid(),
|
|
8425
|
+
sharing: external_exports.boolean()
|
|
8426
|
+
});
|
|
8400
8427
|
|
|
8401
8428
|
// ../api-contract/src/agent/routes.ts
|
|
8402
8429
|
var c = initContract();
|
|
@@ -8721,14 +8748,48 @@ var agentContract = c.router({
|
|
|
8721
8748
|
204: c.noBody()
|
|
8722
8749
|
},
|
|
8723
8750
|
summary: "Remove feedback from an agent message"
|
|
8751
|
+
},
|
|
8752
|
+
getChatSharing: {
|
|
8753
|
+
method: "GET",
|
|
8754
|
+
path: "/agent/canvases/:canvasId/chat-sharing",
|
|
8755
|
+
pathParams: external_exports.object({ canvasId: external_exports.string().uuid() }),
|
|
8756
|
+
responses: { 200: AgentChatSharingResponseSchema },
|
|
8757
|
+
summary: "Whether the caller shares their agent chats on this canvas"
|
|
8758
|
+
},
|
|
8759
|
+
// PUT, not POST: opting in twice is the same standing decision, so the
|
|
8760
|
+
// request has to be safe to repeat.
|
|
8761
|
+
shareChats: {
|
|
8762
|
+
method: "PUT",
|
|
8763
|
+
path: "/agent/canvases/:canvasId/chat-sharing",
|
|
8764
|
+
pathParams: external_exports.object({ canvasId: external_exports.string().uuid() }),
|
|
8765
|
+
body: null,
|
|
8766
|
+
responses: { 200: AgentChatSharingResponseSchema },
|
|
8767
|
+
summary: "Share the caller's agent chats on this canvas"
|
|
8768
|
+
},
|
|
8769
|
+
unshareChats: {
|
|
8770
|
+
method: "DELETE",
|
|
8771
|
+
path: "/agent/canvases/:canvasId/chat-sharing",
|
|
8772
|
+
pathParams: external_exports.object({ canvasId: external_exports.string().uuid() }),
|
|
8773
|
+
body: null,
|
|
8774
|
+
responses: { 204: c.noBody() },
|
|
8775
|
+
summary: "Stop sharing the caller's agent chats on this canvas"
|
|
8724
8776
|
}
|
|
8725
8777
|
});
|
|
8726
8778
|
|
|
8727
8779
|
// ../api-contract/src/api-key/schema.ts
|
|
8780
|
+
var MAX_API_KEY_NAME_LENGTH = 255;
|
|
8728
8781
|
var CreateApiKeyBodySchema = external_exports.object({
|
|
8729
|
-
name
|
|
8782
|
+
// Omitted means "generate one" — the server derives a random name. A
|
|
8783
|
+
// supplied one is trimmed and rule-checked server-side, so a whitespace-only
|
|
8784
|
+
// name comes back as a 400 with prose rather than a raw validation error.
|
|
8785
|
+
name: external_exports.string().min(1).max(MAX_API_KEY_NAME_LENGTH).optional(),
|
|
8730
8786
|
expiresAt: external_exports.string().datetime().optional()
|
|
8731
8787
|
});
|
|
8788
|
+
var RenameApiKeyBodySchema = external_exports.object({
|
|
8789
|
+
name: external_exports.string().trim().min(1).max(MAX_API_KEY_NAME_LENGTH)
|
|
8790
|
+
});
|
|
8791
|
+
var AGENT_SESSION_KEY_NAME_PREFIX = "agent-session-";
|
|
8792
|
+
var API_KEY_NAME_RESERVED_MESSAGE = `"${AGENT_SESSION_KEY_NAME_PREFIX}" is a reserved name prefix`;
|
|
8732
8793
|
var ApiKeyResponseSchema = external_exports.object({
|
|
8733
8794
|
id: external_exports.string().uuid(),
|
|
8734
8795
|
name: external_exports.string(),
|
|
@@ -8753,8 +8814,12 @@ var apiKeyContract = c2.router({
|
|
|
8753
8814
|
method: "POST",
|
|
8754
8815
|
path: "/api-keys",
|
|
8755
8816
|
body: CreateApiKeyBodySchema,
|
|
8756
|
-
responses: {
|
|
8757
|
-
|
|
8817
|
+
responses: {
|
|
8818
|
+
201: CreateApiKeyResponseSchema,
|
|
8819
|
+
400: ApiErrorResponseSchema,
|
|
8820
|
+
409: ApiErrorResponseSchema
|
|
8821
|
+
},
|
|
8822
|
+
summary: "Create a new API key (raw key returned only once). A supplied name follows the same rules as a rename."
|
|
8758
8823
|
},
|
|
8759
8824
|
listApiKeys: {
|
|
8760
8825
|
method: "GET",
|
|
@@ -8762,6 +8827,18 @@ var apiKeyContract = c2.router({
|
|
|
8762
8827
|
responses: { 200: external_exports.array(ApiKeyResponseSchema) },
|
|
8763
8828
|
summary: "List API keys for the current user in the active team"
|
|
8764
8829
|
},
|
|
8830
|
+
renameApiKey: {
|
|
8831
|
+
method: "PATCH",
|
|
8832
|
+
path: "/api-keys/:keyId",
|
|
8833
|
+
pathParams: external_exports.object({ keyId: external_exports.string().uuid() }),
|
|
8834
|
+
body: RenameApiKeyBodySchema,
|
|
8835
|
+
responses: {
|
|
8836
|
+
200: ApiKeyResponseSchema,
|
|
8837
|
+
404: ApiErrorResponseSchema,
|
|
8838
|
+
409: ApiErrorResponseSchema
|
|
8839
|
+
},
|
|
8840
|
+
summary: "Rename an API key. Names are unique per member within a team (case-insensitive)."
|
|
8841
|
+
},
|
|
8765
8842
|
revokeApiKey: {
|
|
8766
8843
|
method: "DELETE",
|
|
8767
8844
|
path: "/api-keys/:keyId",
|
|
@@ -9070,6 +9147,23 @@ var audioContract = c3.router({
|
|
|
9070
9147
|
}
|
|
9071
9148
|
});
|
|
9072
9149
|
|
|
9150
|
+
// ../canvas-yjs/src/canvas-vocabulary.ts
|
|
9151
|
+
var CANVAS_NODE_TYPES = [
|
|
9152
|
+
"text",
|
|
9153
|
+
"image",
|
|
9154
|
+
"video",
|
|
9155
|
+
"audio",
|
|
9156
|
+
"file",
|
|
9157
|
+
"group",
|
|
9158
|
+
"custom_text",
|
|
9159
|
+
"pdf",
|
|
9160
|
+
"composite",
|
|
9161
|
+
"stitch",
|
|
9162
|
+
"magic_resize"
|
|
9163
|
+
];
|
|
9164
|
+
var CANVAS_GROUP_TYPES = ["default", "unified", "template"];
|
|
9165
|
+
var CANVAS_MEDIA_TYPES = ["image", "video", "audio", "pdf"];
|
|
9166
|
+
|
|
9073
9167
|
// ../canvas-yjs/src/group-color.ts
|
|
9074
9168
|
var GROUP_COLOR_KEYS = [
|
|
9075
9169
|
"default",
|
|
@@ -9348,6 +9442,9 @@ function parseAspectRatio(ratio) {
|
|
|
9348
9442
|
}
|
|
9349
9443
|
var ASPECT_RATIO_WIDTHS = {
|
|
9350
9444
|
"21:9": 560,
|
|
9445
|
+
"20:9": 555,
|
|
9446
|
+
"19.5:9": 550,
|
|
9447
|
+
"2:1": 535,
|
|
9351
9448
|
"16:9": 520,
|
|
9352
9449
|
"3:2": 480,
|
|
9353
9450
|
"4:3": 440,
|
|
@@ -9357,6 +9454,9 @@ var ASPECT_RATIO_WIDTHS = {
|
|
|
9357
9454
|
"3:4": 340,
|
|
9358
9455
|
"2:3": 320,
|
|
9359
9456
|
"9:16": 300,
|
|
9457
|
+
"1:2": 290,
|
|
9458
|
+
"9:19.5": 275,
|
|
9459
|
+
"9:20": 268,
|
|
9360
9460
|
"9:21": 260
|
|
9361
9461
|
};
|
|
9362
9462
|
var TEXT_NODE_WIDTH = 380;
|
|
@@ -9371,6 +9471,9 @@ var PDF_NODE_DEFAULT_WIDTH = 440;
|
|
|
9371
9471
|
var NODE_CARD_OVERHEAD = 252;
|
|
9372
9472
|
var ASPECT_RATIOS = [
|
|
9373
9473
|
"21:9",
|
|
9474
|
+
"20:9",
|
|
9475
|
+
"19.5:9",
|
|
9476
|
+
"2:1",
|
|
9374
9477
|
"16:9",
|
|
9375
9478
|
"3:2",
|
|
9376
9479
|
"4:3",
|
|
@@ -9380,6 +9483,9 @@ var ASPECT_RATIOS = [
|
|
|
9380
9483
|
"3:4",
|
|
9381
9484
|
"2:3",
|
|
9382
9485
|
"9:16",
|
|
9486
|
+
"1:2",
|
|
9487
|
+
"9:19.5",
|
|
9488
|
+
"9:20",
|
|
9383
9489
|
"9:21"
|
|
9384
9490
|
];
|
|
9385
9491
|
var MODALITIES = {
|
|
@@ -10679,12 +10785,7 @@ function findClearPosition(obstacles, newWidth, newHeight, idealX = 0, idealY =
|
|
|
10679
10785
|
}
|
|
10680
10786
|
|
|
10681
10787
|
// ../api-contract/src/direct-file-node-validation.ts
|
|
10682
|
-
var DirectFileNodeMediaTypeSchema = external_exports.enum(
|
|
10683
|
-
"image",
|
|
10684
|
-
"video",
|
|
10685
|
-
"audio",
|
|
10686
|
-
"pdf"
|
|
10687
|
-
]);
|
|
10788
|
+
var DirectFileNodeMediaTypeSchema = external_exports.enum(CANVAS_MEDIA_TYPES);
|
|
10688
10789
|
function inferDirectFileNodeMediaTypeFromContentType(contentType) {
|
|
10689
10790
|
const mimeType = contentType.split(";")[0]?.trim().toLowerCase();
|
|
10690
10791
|
if (!mimeType) return null;
|
|
@@ -11049,7 +11150,16 @@ var CanvasResponseSchema = external_exports.object({
|
|
|
11049
11150
|
createdByUserId: external_exports.string().uuid().nullable(),
|
|
11050
11151
|
previewAssets: external_exports.array(PreviewAssetSchema),
|
|
11051
11152
|
createdAt: external_exports.string().datetime(),
|
|
11052
|
-
updatedAt: external_exports.string().datetime()
|
|
11153
|
+
updatedAt: external_exports.string().datetime(),
|
|
11154
|
+
/**
|
|
11155
|
+
* Present and `true` only for a canvas the product owns rather than the
|
|
11156
|
+
* member — Cast's generation canvases. Ordinary canvases omit it, so a
|
|
11157
|
+
* client built before this field reads every canvas the way it always did.
|
|
11158
|
+
*
|
|
11159
|
+
* Only a Melius account is ever shown one at all; this is what lets the
|
|
11160
|
+
* surface say so rather than passing it off as the member's own work.
|
|
11161
|
+
*/
|
|
11162
|
+
isSystem: external_exports.boolean().optional()
|
|
11053
11163
|
});
|
|
11054
11164
|
var CanvasVersionFavoriteSchema = external_exports.object({
|
|
11055
11165
|
nodeId: external_exports.string().uuid(),
|
|
@@ -11066,19 +11176,7 @@ var GeometrySchema = external_exports.object({
|
|
|
11066
11176
|
h: external_exports.number(),
|
|
11067
11177
|
zIndex: external_exports.number().optional()
|
|
11068
11178
|
});
|
|
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
|
-
]);
|
|
11179
|
+
var NodeTypeSchema = external_exports.enum(CANVAS_NODE_TYPES);
|
|
11082
11180
|
var EdgeTypeSchema = external_exports.enum([
|
|
11083
11181
|
"text",
|
|
11084
11182
|
"image",
|
|
@@ -11086,7 +11184,7 @@ var EdgeTypeSchema = external_exports.enum([
|
|
|
11086
11184
|
"audio",
|
|
11087
11185
|
"file"
|
|
11088
11186
|
]);
|
|
11089
|
-
var GroupTypeSchema = external_exports.enum(
|
|
11187
|
+
var GroupTypeSchema = external_exports.enum(CANVAS_GROUP_TYPES);
|
|
11090
11188
|
var GroupColorSchema = external_exports.enum(GROUP_COLOR_KEYS);
|
|
11091
11189
|
var ModelConfigSchema = external_exports.object({
|
|
11092
11190
|
model: external_exports.string(),
|
|
@@ -11143,7 +11241,8 @@ var OutputResolutionPresetSchema = external_exports.enum([
|
|
|
11143
11241
|
"540p",
|
|
11144
11242
|
"580p",
|
|
11145
11243
|
"720p",
|
|
11146
|
-
// Fal's MiniMax H3 resolution enum spells its
|
|
11244
|
+
// Fal's MiniMax H3 resolution enum spells its tiers `480P` and `768P`.
|
|
11245
|
+
"480P",
|
|
11147
11246
|
"768P",
|
|
11148
11247
|
"1080p",
|
|
11149
11248
|
"1440p",
|
|
@@ -11194,6 +11293,11 @@ var AssetSummaryDetailsSchema = external_exports.object({
|
|
|
11194
11293
|
var AssetResponseSchema = external_exports.object({
|
|
11195
11294
|
/** Omitted from persisted snapshots created before this field existed. */
|
|
11196
11295
|
assetId: external_exports.string().uuid().optional(),
|
|
11296
|
+
/**
|
|
11297
|
+
* The asset's stored name, then its producing node title, then its filename.
|
|
11298
|
+
* Optional for persisted snapshots created before this field existed.
|
|
11299
|
+
*/
|
|
11300
|
+
displayName: external_exports.string().nullable().optional(),
|
|
11197
11301
|
url: external_exports.string().nullable(),
|
|
11198
11302
|
originalUrl: external_exports.string().nullable(),
|
|
11199
11303
|
previewUrl: external_exports.string().nullable(),
|
|
@@ -11379,10 +11483,16 @@ var EdgeResponseSchema = external_exports.object({
|
|
|
11379
11483
|
dstHandle: external_exports.string().nullable(),
|
|
11380
11484
|
createdAt: external_exports.string().datetime()
|
|
11381
11485
|
});
|
|
11486
|
+
var PinnedModelSchema = external_exports.object({
|
|
11487
|
+
model: external_exports.string(),
|
|
11488
|
+
mode: external_exports.string().optional()
|
|
11489
|
+
});
|
|
11490
|
+
var pinnedModelsField = external_exports.array(PinnedModelSchema).max(MAX_PINNED_MODELS).optional();
|
|
11382
11491
|
var CanvasMediaPresetSchema = external_exports.object({
|
|
11383
11492
|
image: external_exports.object({
|
|
11384
11493
|
model: external_exports.string().optional(),
|
|
11385
11494
|
mode: external_exports.string().optional(),
|
|
11495
|
+
pinnedModels: pinnedModelsField,
|
|
11386
11496
|
aspectRatio: OutputAspectRatioSchema.optional(),
|
|
11387
11497
|
resolution: OutputResolutionSchema.optional(),
|
|
11388
11498
|
fast: external_exports.boolean().optional(),
|
|
@@ -11391,6 +11501,7 @@ var CanvasMediaPresetSchema = external_exports.object({
|
|
|
11391
11501
|
video: external_exports.object({
|
|
11392
11502
|
model: external_exports.string().optional(),
|
|
11393
11503
|
mode: external_exports.string().optional(),
|
|
11504
|
+
pinnedModels: pinnedModelsField,
|
|
11394
11505
|
aspectRatio: OutputAspectRatioSchema.optional(),
|
|
11395
11506
|
resolution: OutputResolutionSchema.optional(),
|
|
11396
11507
|
duration: external_exports.number().int().positive().optional(),
|
|
@@ -11400,12 +11511,14 @@ var CanvasMediaPresetSchema = external_exports.object({
|
|
|
11400
11511
|
text: external_exports.object({
|
|
11401
11512
|
model: external_exports.string().optional(),
|
|
11402
11513
|
mode: external_exports.string().optional(),
|
|
11514
|
+
pinnedModels: pinnedModelsField,
|
|
11403
11515
|
fast: external_exports.boolean().optional(),
|
|
11404
11516
|
numVariations: external_exports.number().int().min(1).max(MAX_VARIATIONS).optional()
|
|
11405
11517
|
}).optional(),
|
|
11406
11518
|
audio: external_exports.object({
|
|
11407
11519
|
model: external_exports.string().optional(),
|
|
11408
11520
|
mode: external_exports.string().optional(),
|
|
11521
|
+
pinnedModels: pinnedModelsField,
|
|
11409
11522
|
/** Default ElevenLabs stock voice id (text-to-speech / voice changer). */
|
|
11410
11523
|
voiceId: external_exports.string().optional(),
|
|
11411
11524
|
/** Default team-owned custom voice id; wins over `voiceId` when set. */
|
|
@@ -11538,22 +11651,16 @@ var RunNodeBodySchema = external_exports.object({
|
|
|
11538
11651
|
/** Explicit image URLs to include as inputs (merged with edge-resolved images). */
|
|
11539
11652
|
imageUrls: external_exports.array(external_exports.string().url()).max(MAX_INPUT_IMAGES).optional(),
|
|
11540
11653
|
/**
|
|
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`.
|
|
11654
|
+
* Provider-agnostic voice selection for audio TTS, validated against the
|
|
11655
|
+
* resolved variant's voice capability. Mode-specific validation lives in
|
|
11656
|
+
* the run service because the schema can't see the resolved model→mode
|
|
11657
|
+
* mapping.
|
|
11550
11658
|
*/
|
|
11551
11659
|
voiceId: external_exports.string().trim().min(1).optional(),
|
|
11552
11660
|
/**
|
|
11553
11661
|
* 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.
|
|
11662
|
+
* provider voice id from the database and uses it in place of `voiceId`.
|
|
11663
|
+
* The voice must belong to the same team and not be soft-deleted.
|
|
11557
11664
|
*/
|
|
11558
11665
|
customVoiceId: external_exports.string().uuid().optional(),
|
|
11559
11666
|
/**
|
|
@@ -11606,6 +11713,68 @@ var RunSmartLayersResponseSchema = external_exports.object({
|
|
|
11606
11713
|
nodeRunId: external_exports.string().uuid(),
|
|
11607
11714
|
creditCost: external_exports.number().int()
|
|
11608
11715
|
});
|
|
11716
|
+
var StudioToolDimensionSchema = external_exports.number().positive().finite();
|
|
11717
|
+
var StudioToolCoordinateSchema = external_exports.number().finite();
|
|
11718
|
+
var SmartLayerToolSourceSchema = external_exports.object({
|
|
11719
|
+
imageUrl: external_exports.string().url(),
|
|
11720
|
+
rect: external_exports.object({
|
|
11721
|
+
x: StudioToolCoordinateSchema,
|
|
11722
|
+
y: StudioToolCoordinateSchema,
|
|
11723
|
+
width: StudioToolDimensionSchema,
|
|
11724
|
+
height: StudioToolDimensionSchema
|
|
11725
|
+
}).optional()
|
|
11726
|
+
});
|
|
11727
|
+
var SmartLayerEditAnnotationSchema = external_exports.discriminatedUnion("type", [
|
|
11728
|
+
external_exports.object({
|
|
11729
|
+
type: external_exports.literal("point"),
|
|
11730
|
+
x: StudioToolCoordinateSchema,
|
|
11731
|
+
y: StudioToolCoordinateSchema
|
|
11732
|
+
}),
|
|
11733
|
+
external_exports.object({
|
|
11734
|
+
type: external_exports.literal("box"),
|
|
11735
|
+
x: StudioToolCoordinateSchema,
|
|
11736
|
+
y: StudioToolCoordinateSchema,
|
|
11737
|
+
width: StudioToolDimensionSchema,
|
|
11738
|
+
height: StudioToolDimensionSchema
|
|
11739
|
+
})
|
|
11740
|
+
]);
|
|
11741
|
+
var GenerativeEditSmartLayerBodySchema = external_exports.object({
|
|
11742
|
+
/** Natural-language edit instruction (what to change). */
|
|
11743
|
+
instruction: external_exports.string().trim().min(1).max(2e3),
|
|
11744
|
+
/**
|
|
11745
|
+
* Point/box annotations in artboard coordinates, narrowing the edit to
|
|
11746
|
+
* regions of the target. Optional: the target layer is already chosen by
|
|
11747
|
+
* `source`, so an empty list is a whole-image edit.
|
|
11748
|
+
*/
|
|
11749
|
+
annotations: external_exports.array(SmartLayerEditAnnotationSchema).max(20),
|
|
11750
|
+
/**
|
|
11751
|
+
* Studio artboard dimensions the annotations were placed in. The backend
|
|
11752
|
+
* normalizes annotations from this space into the model's 0–999 relative
|
|
11753
|
+
* coordinate space, so grounding stays aligned even when the artboard was
|
|
11754
|
+
* resized off the source resolution.
|
|
11755
|
+
*/
|
|
11756
|
+
artboardWidth: StudioToolDimensionSchema,
|
|
11757
|
+
artboardHeight: StudioToolDimensionSchema,
|
|
11758
|
+
/** Layer image to edit, when it isn't the node's own asset. */
|
|
11759
|
+
source: SmartLayerToolSourceSchema.optional()
|
|
11760
|
+
});
|
|
11761
|
+
var GenerativeEditSmartLayerResponseSchema = external_exports.object({
|
|
11762
|
+
/**
|
|
11763
|
+
* The re-rendered image, in studio artboard coordinates. The edit replaces
|
|
11764
|
+
* the whole source image, so this occupies exactly the source layer's rect
|
|
11765
|
+
* (the full artboard when the tool ran on the node's own image).
|
|
11766
|
+
*/
|
|
11767
|
+
layer: external_exports.object({
|
|
11768
|
+
type: external_exports.literal("image"),
|
|
11769
|
+
x: external_exports.number(),
|
|
11770
|
+
y: external_exports.number(),
|
|
11771
|
+
width: external_exports.number().positive(),
|
|
11772
|
+
height: external_exports.number().positive(),
|
|
11773
|
+
snapshotSrc: external_exports.string().url()
|
|
11774
|
+
}),
|
|
11775
|
+
/** Credits charged for this edit. */
|
|
11776
|
+
creditCost: external_exports.number().int()
|
|
11777
|
+
});
|
|
11609
11778
|
var MagicResizeDefaultRatioSchema = external_exports.enum([
|
|
11610
11779
|
"21:9",
|
|
11611
11780
|
"16:9",
|
|
@@ -11695,6 +11864,8 @@ var CanvasLibraryAssetResponseSchema = external_exports.object({
|
|
|
11695
11864
|
previewUrl: external_exports.string().nullable(),
|
|
11696
11865
|
mediaType: external_exports.enum(["image", "video", "audio", "pdf"]),
|
|
11697
11866
|
filename: external_exports.string(),
|
|
11867
|
+
/** Optional for clients deployed before asset display names. */
|
|
11868
|
+
displayName: external_exports.string().nullable().optional(),
|
|
11698
11869
|
fileSizeInKb: external_exports.number().int().nonnegative(),
|
|
11699
11870
|
durationInMs: external_exports.number().int().nonnegative().nullable(),
|
|
11700
11871
|
createdAt: external_exports.string().datetime(),
|
|
@@ -12326,7 +12497,10 @@ var canvasContract = c4.router({
|
|
|
12326
12497
|
method: "PATCH",
|
|
12327
12498
|
path: "/nodes/:nodeId/share-mode",
|
|
12328
12499
|
pathParams: external_exports.object({ nodeId: external_exports.string().uuid() }),
|
|
12329
|
-
body: external_exports.object({
|
|
12500
|
+
body: external_exports.object({
|
|
12501
|
+
shareMode: ShareVisibilitySchema,
|
|
12502
|
+
nodeVersionId: external_exports.string().uuid().nullable().optional()
|
|
12503
|
+
}),
|
|
12330
12504
|
responses: {
|
|
12331
12505
|
200: external_exports.object({ shareMode: ShareVisibilitySchema }),
|
|
12332
12506
|
403: MessageResponseSchema,
|
|
@@ -12544,6 +12718,18 @@ var canvasContract = c4.router({
|
|
|
12544
12718
|
404: NodeRunErrorResponseSchema
|
|
12545
12719
|
}
|
|
12546
12720
|
},
|
|
12721
|
+
generativeEditSmartLayer: {
|
|
12722
|
+
method: "POST",
|
|
12723
|
+
path: "/nodes/:nodeId/smart-layers-generative-edits",
|
|
12724
|
+
pathParams: external_exports.object({ nodeId: external_exports.string().uuid() }),
|
|
12725
|
+
body: GenerativeEditSmartLayerBodySchema,
|
|
12726
|
+
responses: {
|
|
12727
|
+
201: GenerativeEditSmartLayerResponseSchema,
|
|
12728
|
+
400: NodeRunErrorResponseSchema,
|
|
12729
|
+
403: NodeRunErrorResponseSchema,
|
|
12730
|
+
404: NodeRunErrorResponseSchema
|
|
12731
|
+
}
|
|
12732
|
+
},
|
|
12547
12733
|
runMagicResize: {
|
|
12548
12734
|
method: "POST",
|
|
12549
12735
|
path: "/nodes/:nodeId/magic-resize",
|
|
@@ -13209,6 +13395,32 @@ var customFontContract = c5.router({
|
|
|
13209
13395
|
}
|
|
13210
13396
|
});
|
|
13211
13397
|
|
|
13398
|
+
// ../api-contract/src/asset-engagement/schema.ts
|
|
13399
|
+
var ASSET_ENGAGEMENT_SOURCES = {
|
|
13400
|
+
/** In-app (web) Mel chat acting for a member. */
|
|
13401
|
+
Agent: "agent",
|
|
13402
|
+
Canvas: "canvas",
|
|
13403
|
+
/** API key with no MCP session header — CLI and direct API use. */
|
|
13404
|
+
Cli: "cli",
|
|
13405
|
+
Files: "files",
|
|
13406
|
+
/** Hosted MCP server, identified by its session header. */
|
|
13407
|
+
Mcp: "mcp",
|
|
13408
|
+
Playground: "playground",
|
|
13409
|
+
/** Anonymous visitor on a `/a/` or `/g/` share link. */
|
|
13410
|
+
PublicLink: "public_link",
|
|
13411
|
+
/** Mel acting inside Slack. */
|
|
13412
|
+
Slack: "slack"
|
|
13413
|
+
};
|
|
13414
|
+
var ClientAssetEngagementSourceSchema = external_exports.enum([
|
|
13415
|
+
ASSET_ENGAGEMENT_SOURCES.Canvas,
|
|
13416
|
+
ASSET_ENGAGEMENT_SOURCES.Files,
|
|
13417
|
+
ASSET_ENGAGEMENT_SOURCES.Playground
|
|
13418
|
+
]);
|
|
13419
|
+
var AssetDownloadResponseSchema = external_exports.object({
|
|
13420
|
+
url: external_exports.string().url(),
|
|
13421
|
+
filename: external_exports.string()
|
|
13422
|
+
});
|
|
13423
|
+
|
|
13212
13424
|
// ../api-contract/src/files/routes.ts
|
|
13213
13425
|
var c6 = initContract();
|
|
13214
13426
|
var filesContract = c6.router({
|
|
@@ -13370,6 +13582,18 @@ var filesContract = c6.router({
|
|
|
13370
13582
|
},
|
|
13371
13583
|
summary: "Move a file to a folder"
|
|
13372
13584
|
},
|
|
13585
|
+
renameFile: {
|
|
13586
|
+
method: "PATCH",
|
|
13587
|
+
path: "/files/:assetId/name",
|
|
13588
|
+
pathParams: FileAssetIdParamsSchema,
|
|
13589
|
+
body: RenameFileBodySchema,
|
|
13590
|
+
responses: {
|
|
13591
|
+
200: FileCardSchema,
|
|
13592
|
+
403: ErrorBodySchema,
|
|
13593
|
+
404: ErrorBodySchema
|
|
13594
|
+
},
|
|
13595
|
+
summary: "Rename a file"
|
|
13596
|
+
},
|
|
13373
13597
|
bulkDownloadFiles: {
|
|
13374
13598
|
method: "POST",
|
|
13375
13599
|
path: "/files/bulk/download",
|
|
@@ -13450,6 +13674,38 @@ var filesContract = c6.router({
|
|
|
13450
13674
|
},
|
|
13451
13675
|
summary: "Restore a file hidden from Files"
|
|
13452
13676
|
},
|
|
13677
|
+
/**
|
|
13678
|
+
* Put a generation made on a canvas no member may view into Files. Cast's
|
|
13679
|
+
* clips are the first caller: the canvas they were made on is the
|
|
13680
|
+
* product's, so nothing on it is a file until somebody asks for one.
|
|
13681
|
+
*
|
|
13682
|
+
* Distinct from `unhideFile`, which restores a file the member removed.
|
|
13683
|
+
* This one adds a file that was never there.
|
|
13684
|
+
*/
|
|
13685
|
+
saveFileToFiles: {
|
|
13686
|
+
method: "POST",
|
|
13687
|
+
path: "/files/:assetId/save",
|
|
13688
|
+
pathParams: FileAssetIdParamsSchema,
|
|
13689
|
+
body: null,
|
|
13690
|
+
responses: {
|
|
13691
|
+
204: c6.noBody(),
|
|
13692
|
+
403: ErrorBodySchema,
|
|
13693
|
+
404: ErrorBodySchema
|
|
13694
|
+
},
|
|
13695
|
+
summary: "Save a generation into Files"
|
|
13696
|
+
},
|
|
13697
|
+
unsaveFileFromFiles: {
|
|
13698
|
+
method: "POST",
|
|
13699
|
+
path: "/files/:assetId/unsave",
|
|
13700
|
+
pathParams: FileAssetIdParamsSchema,
|
|
13701
|
+
body: null,
|
|
13702
|
+
responses: {
|
|
13703
|
+
204: c6.noBody(),
|
|
13704
|
+
403: ErrorBodySchema,
|
|
13705
|
+
404: ErrorBodySchema
|
|
13706
|
+
},
|
|
13707
|
+
summary: "Take a saved generation back out of Files"
|
|
13708
|
+
},
|
|
13453
13709
|
listFiles: {
|
|
13454
13710
|
method: "GET",
|
|
13455
13711
|
path: "/files",
|
|
@@ -13524,7 +13780,11 @@ var filesContract = c6.router({
|
|
|
13524
13780
|
method: "PATCH",
|
|
13525
13781
|
path: "/files/:assetId/share-mode",
|
|
13526
13782
|
pathParams: FileAssetIdParamsSchema,
|
|
13527
|
-
body: external_exports.object({
|
|
13783
|
+
body: external_exports.object({
|
|
13784
|
+
shareMode: AssetShareModeSchema,
|
|
13785
|
+
nodeVersionId: external_exports.string().uuid().nullable().optional(),
|
|
13786
|
+
engagementSource: ClientAssetEngagementSourceSchema.optional()
|
|
13787
|
+
}),
|
|
13528
13788
|
responses: {
|
|
13529
13789
|
200: external_exports.object({ shareMode: AssetShareModeSchema }),
|
|
13530
13790
|
403: ErrorBodySchema,
|
|
@@ -13837,7 +14097,40 @@ var InputImageAspectRatioConstraintsResponseSchema = external_exports.object({
|
|
|
13837
14097
|
var PromoRateLimitSchema = external_exports.object({
|
|
13838
14098
|
used: external_exports.number().int().nonnegative(),
|
|
13839
14099
|
limit: external_exports.number().int().nonnegative(),
|
|
13840
|
-
remaining: external_exports.number().int().nonnegative()
|
|
14100
|
+
remaining: external_exports.number().int().nonnegative(),
|
|
14101
|
+
/**
|
|
14102
|
+
* Credits one unit of allowance is worth, for a campaign metered in
|
|
14103
|
+
* something other than whole generations. Present makes the allowance
|
|
14104
|
+
* divisible: a run costing more than what is left is part-covered rather
|
|
14105
|
+
* than dropped to full price.
|
|
14106
|
+
*
|
|
14107
|
+
* Absent means the campaign meters generations, where `remaining > 0` is
|
|
14108
|
+
* the whole answer. A client that does not understand this field must
|
|
14109
|
+
* treat the run as fully priced rather than free — see `freeResolution`.
|
|
14110
|
+
*/
|
|
14111
|
+
unitCredits: external_exports.number().positive().optional(),
|
|
14112
|
+
/**
|
|
14113
|
+
* The output resolution `unitCredits` prices. Absent means every resolution
|
|
14114
|
+
* qualifies. Sent rather than assumed so the client never hardcodes which
|
|
14115
|
+
* resolution the campaign is running on.
|
|
14116
|
+
*
|
|
14117
|
+
* A campaign spendable at several resolutions still sends this pair, naming
|
|
14118
|
+
* the one a client that predates `unitCreditsByResolution` should treat as
|
|
14119
|
+
* covered. Such a client quotes the rest at full price, which understates a
|
|
14120
|
+
* discount rather than promising one that is not honoured.
|
|
14121
|
+
*/
|
|
14122
|
+
freeResolution: external_exports.string().optional(),
|
|
14123
|
+
/**
|
|
14124
|
+
* Credits one unit is worth at each covered resolution, when the allowance
|
|
14125
|
+
* is one pool spendable across several of them. A resolution absent from
|
|
14126
|
+
* the map is not covered.
|
|
14127
|
+
*
|
|
14128
|
+
* Present, this supersedes `unitCredits` / `freeResolution` entirely — that
|
|
14129
|
+
* pair stays on the wire only for clients that predate it. Read it through
|
|
14130
|
+
* `resolvePromoUnitCredits` rather than indexing it directly, so the
|
|
14131
|
+
* precedence lives in one place.
|
|
14132
|
+
*/
|
|
14133
|
+
unitCreditsByResolution: external_exports.record(external_exports.string(), external_exports.number().positive()).optional()
|
|
13841
14134
|
});
|
|
13842
14135
|
var ModelVariantResponseSchema = external_exports.object({
|
|
13843
14136
|
mode: external_exports.string(),
|
|
@@ -14288,7 +14581,20 @@ var ProfileUserSchema = external_exports.object({
|
|
|
14288
14581
|
signupSource: external_exports.string().nullable(),
|
|
14289
14582
|
completedProductTour: external_exports.string().datetime().nullable(),
|
|
14290
14583
|
avatarUrl: external_exports.string().nullable(),
|
|
14291
|
-
advancedSettings: UserAdvancedSettingsSchema
|
|
14584
|
+
advancedSettings: UserAdvancedSettingsSchema,
|
|
14585
|
+
/**
|
|
14586
|
+
* Whether this session may open the staff tools panel — a Melius account,
|
|
14587
|
+
* or somebody of ours behind a verified impersonation marker.
|
|
14588
|
+
*
|
|
14589
|
+
* Sent because the client cannot work it out. While impersonating, `email`
|
|
14590
|
+
* above is the *customer's*, so a panel gated on the address it can see
|
|
14591
|
+
* would disappear exactly when support needs it. Says nothing about what
|
|
14592
|
+
* the tools do: the server re-decides that per request, so a client that
|
|
14593
|
+
* forces this to true gets a panel whose switches change nothing.
|
|
14594
|
+
*
|
|
14595
|
+
* Optional, so a client built before this reads the payload unchanged.
|
|
14596
|
+
*/
|
|
14597
|
+
canUseStaffTools: external_exports.boolean().optional()
|
|
14292
14598
|
});
|
|
14293
14599
|
var ProfileReferralInfoSchema = external_exports.object({
|
|
14294
14600
|
code: external_exports.string()
|
|
@@ -14370,6 +14676,12 @@ var TEAM_PLAN_IDS = [
|
|
|
14370
14676
|
];
|
|
14371
14677
|
var CUSTOM_PLAN_TYPE_IDS = ["enterprise", "creative_partner"];
|
|
14372
14678
|
|
|
14679
|
+
// ../pricing/src/credit-top-up.ts
|
|
14680
|
+
var MELIUS_CREDITS_PER_USD = 1e3;
|
|
14681
|
+
var CENTS_PER_USD = 100;
|
|
14682
|
+
var CREDITS_PER_USD_CENT = MELIUS_CREDITS_PER_USD / CENTS_PER_USD;
|
|
14683
|
+
var MAX_CREDIT_TOP_UP_DISCOUNT_PERCENTAGE = 90;
|
|
14684
|
+
|
|
14373
14685
|
// ../api-contract/src/team/schema.ts
|
|
14374
14686
|
var TeamRoleSchema = external_exports.enum(["owner", "admin", "editor", "viewer"]);
|
|
14375
14687
|
var TeamPlanSchema = external_exports.enum(TEAM_PLAN_IDS);
|
|
@@ -14382,13 +14694,27 @@ var EnterpriseOrderLineItemSchema = external_exports.object({
|
|
|
14382
14694
|
total: external_exports.string().min(1)
|
|
14383
14695
|
});
|
|
14384
14696
|
var EnterpriseBillingIntervalSchema = external_exports.enum(["monthly", "annual"]);
|
|
14697
|
+
var EnterpriseAllowedPaymentMethodsSchema = external_exports.enum([
|
|
14698
|
+
"card_and_bank",
|
|
14699
|
+
"bank_only",
|
|
14700
|
+
"card_only"
|
|
14701
|
+
]);
|
|
14385
14702
|
var EnterpriseStripeBillingInputSchema = external_exports.object({
|
|
14386
14703
|
unitAmount: external_exports.number().int().positive(),
|
|
14387
14704
|
// Expose the transform output to OpenAPI generation.
|
|
14388
14705
|
currency: external_exports.string().length(3).transform((value) => value.toLowerCase()).pipe(external_exports.string()),
|
|
14389
14706
|
billingInterval: EnterpriseBillingIntervalSchema,
|
|
14390
14707
|
creditsPerPeriod: external_exports.number().int().positive(),
|
|
14391
|
-
|
|
14708
|
+
allowedPaymentMethods: EnterpriseAllowedPaymentMethodsSchema.optional(),
|
|
14709
|
+
contractEndAt: external_exports.string().datetime().optional(),
|
|
14710
|
+
/**
|
|
14711
|
+
* Whether the term rolls into another of the same length instead of
|
|
14712
|
+
* ending. Only meaningful alongside a `contractEndAt`. Absent means off,
|
|
14713
|
+
* which is what a plan created before this field gets; new plans send it
|
|
14714
|
+
* explicitly rather than the resolver defaulting to on, so existing
|
|
14715
|
+
* contracts keep their current behavior.
|
|
14716
|
+
*/
|
|
14717
|
+
autoRenew: external_exports.boolean().optional()
|
|
14392
14718
|
}).refine(
|
|
14393
14719
|
(input) => input.billingInterval !== "annual" || input.contractEndAt != null,
|
|
14394
14720
|
{
|
|
@@ -14417,6 +14743,13 @@ var EnterpriseOrderDetailsSchema = external_exports.object({
|
|
|
14417
14743
|
creditPackageAmount: external_exports.number().int().nonnegative(),
|
|
14418
14744
|
creditPackageUnit: external_exports.string().min(1),
|
|
14419
14745
|
creditRolloverPolicy: CustomPlanCreditRolloverPolicySchema.optional(),
|
|
14746
|
+
/**
|
|
14747
|
+
* Whole percent off the standard per-credit rate for top-ups beyond the
|
|
14748
|
+
* plan's allowance. Absent means the standard rate. Unlike the rest of the
|
|
14749
|
+
* order details this is not presentational — checkout, the Stripe grant and
|
|
14750
|
+
* the receipt all price against it (see `@repo/pricing/credit-top-up`).
|
|
14751
|
+
*/
|
|
14752
|
+
creditTopUpDiscountPercentage: external_exports.number().int().min(1).max(MAX_CREDIT_TOP_UP_DISCOUNT_PERCENTAGE).optional(),
|
|
14420
14753
|
orderDate: external_exports.string().date(),
|
|
14421
14754
|
/** Omit for plans with no fixed contract term (e.g. monthly Stripe plans). */
|
|
14422
14755
|
termCount: external_exports.number().int().positive().optional(),
|
|
@@ -14447,24 +14780,57 @@ var EnterprisePendingExpansionSchema = external_exports.object({
|
|
|
14447
14780
|
preparedAt: external_exports.string().datetime(),
|
|
14448
14781
|
preparedByEmail: external_exports.string().nullable()
|
|
14449
14782
|
});
|
|
14783
|
+
var EnterprisePendingRenewalSchema = external_exports.object({
|
|
14784
|
+
id: external_exports.string(),
|
|
14785
|
+
newUnitAmount: external_exports.number().int().positive(),
|
|
14786
|
+
newCreditsPerPeriod: external_exports.number().int().positive(),
|
|
14787
|
+
newStripePriceId: external_exports.string().min(1),
|
|
14788
|
+
/** Length of the renewal term in monthly billing periods. */
|
|
14789
|
+
newTermMonths: external_exports.number().int().positive(),
|
|
14790
|
+
newContractEndAt: external_exports.string().datetime(),
|
|
14791
|
+
/** Operator-authored replacement order details. Purely presentational. */
|
|
14792
|
+
newOrderDetails: EnterpriseOrderDetailsSchema.optional(),
|
|
14793
|
+
preparedAt: external_exports.string().datetime(),
|
|
14794
|
+
preparedByEmail: external_exports.string().nullable()
|
|
14795
|
+
});
|
|
14450
14796
|
var EnterpriseStripeBillingSchema = external_exports.object({
|
|
14451
14797
|
unitAmount: external_exports.number().int().positive(),
|
|
14452
14798
|
// Expose the transform output to OpenAPI generation.
|
|
14453
14799
|
currency: external_exports.string().length(3).transform((value) => value.toLowerCase()).pipe(external_exports.string()),
|
|
14454
14800
|
billingInterval: EnterpriseBillingIntervalSchema,
|
|
14455
14801
|
creditsPerPeriod: external_exports.number().int().positive(),
|
|
14802
|
+
allowedPaymentMethods: EnterpriseAllowedPaymentMethodsSchema.optional(),
|
|
14456
14803
|
contractEndAt: external_exports.string().datetime().optional(),
|
|
14804
|
+
/**
|
|
14805
|
+
* Whether the contract rolls into another term of the same length at
|
|
14806
|
+
* `contractEndAt` instead of ending. Only meaningful alongside a
|
|
14807
|
+
* `contractEndAt`; a plan with no fixed term already renews indefinitely.
|
|
14808
|
+
* Absent means off, so a plan created before this field keeps ending at its
|
|
14809
|
+
* contract end. Read it through `resolveEnterpriseAutoRenew`.
|
|
14810
|
+
*/
|
|
14811
|
+
autoRenew: external_exports.boolean().optional(),
|
|
14457
14812
|
stripePriceId: external_exports.string().min(1),
|
|
14458
14813
|
activatedAt: external_exports.string().datetime().optional(),
|
|
14459
14814
|
activatedByEmail: external_exports.string().nullable().optional(),
|
|
14460
|
-
|
|
14815
|
+
paymentMethodType: external_exports.enum(["card", "us_bank_account"]).optional(),
|
|
14816
|
+
firstPaymentSettledAt: external_exports.string().datetime().optional(),
|
|
14817
|
+
pendingExpansion: EnterprisePendingExpansionSchema.optional(),
|
|
14818
|
+
pendingRenewal: EnterprisePendingRenewalSchema.optional(),
|
|
14819
|
+
/** Stripe subscription schedule driving a prepared renewal, while attached. */
|
|
14820
|
+
stripeScheduleId: external_exports.string().min(1).optional()
|
|
14461
14821
|
});
|
|
14462
14822
|
var CustomerEnterpriseStripeBillingSchema = EnterpriseStripeBillingSchema.omit({
|
|
14463
14823
|
activatedAt: true,
|
|
14464
14824
|
activatedByEmail: true,
|
|
14825
|
+
allowedPaymentMethods: true,
|
|
14826
|
+
paymentMethodType: true,
|
|
14827
|
+
firstPaymentSettledAt: true,
|
|
14465
14828
|
// Operator-only; the customer reads a pending expansion through the
|
|
14466
14829
|
// dedicated preview endpoint, which excludes operator emails.
|
|
14467
|
-
pendingExpansion: true
|
|
14830
|
+
pendingExpansion: true,
|
|
14831
|
+
// Same reason — it carries the preparing operator's email.
|
|
14832
|
+
pendingRenewal: true,
|
|
14833
|
+
stripeScheduleId: true
|
|
14468
14834
|
});
|
|
14469
14835
|
var EnterpriseStripeBillingAuditActionSchema = external_exports.enum([
|
|
14470
14836
|
"created",
|
|
@@ -14610,6 +14976,11 @@ var SharedAssetResponseSchema = external_exports.object({
|
|
|
14610
14976
|
height: external_exports.number().int().nullable(),
|
|
14611
14977
|
durationInMs: external_exports.number().int().nullable()
|
|
14612
14978
|
});
|
|
14979
|
+
var SharedDownloadResponseSchema = external_exports.object({
|
|
14980
|
+
url: external_exports.string().url().nullable(),
|
|
14981
|
+
text: external_exports.string().nullable(),
|
|
14982
|
+
filename: external_exports.string()
|
|
14983
|
+
});
|
|
14613
14984
|
var SharedGenerationMediaTypeSchema = external_exports.enum(["image", "video", "audio"]);
|
|
14614
14985
|
var SharedGenerationTypeSchema = external_exports.enum(["text", "image", "video", "audio"]);
|
|
14615
14986
|
var SharedGenerationReferenceSchema = external_exports.object({
|
|
@@ -14687,7 +15058,9 @@ var RecreateGenerationResponseSchema = external_exports.object({
|
|
|
14687
15058
|
recreatedGeneration: external_exports.object({
|
|
14688
15059
|
nodeId: external_exports.string().uuid(),
|
|
14689
15060
|
projectId: external_exports.string().uuid(),
|
|
14690
|
-
canvasId: external_exports.string().uuid()
|
|
15061
|
+
canvasId: external_exports.string().uuid(),
|
|
15062
|
+
nodeVersionId: external_exports.string().uuid().nullable().optional(),
|
|
15063
|
+
assetId: external_exports.string().uuid().nullable().optional()
|
|
14691
15064
|
}).optional()
|
|
14692
15065
|
});
|
|
14693
15066
|
var SharedGenerationHandoffSchema = RecreateGenerationResponseSchema.extend({
|
|
@@ -14748,7 +15121,9 @@ var ProjectResponseSchema = external_exports.object({
|
|
|
14748
15121
|
previewAssets: external_exports.array(PreviewAssetSchema),
|
|
14749
15122
|
createdAt: external_exports.string().datetime(),
|
|
14750
15123
|
updatedAt: external_exports.string().datetime(),
|
|
14751
|
-
lastEditAt: external_exports.string().datetime()
|
|
15124
|
+
lastEditAt: external_exports.string().datetime(),
|
|
15125
|
+
/** As on a canvas: the product's own project, shown only to a Melius account. */
|
|
15126
|
+
isSystem: external_exports.boolean().optional()
|
|
14752
15127
|
});
|
|
14753
15128
|
var ProjectOptionSchema = ProjectResponseSchema.pick({
|
|
14754
15129
|
id: true,
|
|
@@ -14780,6 +15155,9 @@ var ListAllProjectsQuerySchema = PaginationQuerySchema.extend({
|
|
|
14780
15155
|
// regardless of folder (the historical behavior).
|
|
14781
15156
|
folderId: external_exports.union([external_exports.string().uuid(), external_exports.literal("root")]).optional()
|
|
14782
15157
|
});
|
|
15158
|
+
var RecentProjectsQuerySchema = external_exports.object({
|
|
15159
|
+
teamId: external_exports.string().uuid().optional()
|
|
15160
|
+
});
|
|
14783
15161
|
var PaginatedProjectsResponseSchema = external_exports.object({
|
|
14784
15162
|
data: external_exports.array(ProjectResponseSchema),
|
|
14785
15163
|
total: external_exports.number().int()
|
|
@@ -14899,11 +15277,13 @@ var projectContract = c10.router({
|
|
|
14899
15277
|
listRecentProjects: {
|
|
14900
15278
|
method: "GET",
|
|
14901
15279
|
path: "/projects/recents",
|
|
15280
|
+
query: RecentProjectsQuerySchema,
|
|
14902
15281
|
responses: { 200: ProjectListResponseSchema }
|
|
14903
15282
|
},
|
|
14904
15283
|
listRecentProjectMetadata: {
|
|
14905
15284
|
method: "GET",
|
|
14906
15285
|
path: "/projects/recents/metadata",
|
|
15286
|
+
query: RecentProjectsQuerySchema,
|
|
14907
15287
|
responses: { 200: ProjectListResponseSchema }
|
|
14908
15288
|
},
|
|
14909
15289
|
listProjectThumbnails: {
|
|
@@ -15552,7 +15932,7 @@ function handleApiError(status, body, suggestion) {
|
|
|
15552
15932
|
extractMessage(body) ?? "Rate limit exceeded",
|
|
15553
15933
|
{
|
|
15554
15934
|
status,
|
|
15555
|
-
suggestion: suggestion ?? "Wait a moment and try again,
|
|
15935
|
+
suggestion: suggestion ?? "Wait a moment and try again, and send fewer requests in parallel"
|
|
15556
15936
|
}
|
|
15557
15937
|
),
|
|
15558
15938
|
EXIT_API_ERROR
|
|
@@ -15715,7 +16095,7 @@ function isMajorUpgrade(current, latest) {
|
|
|
15715
16095
|
return l[0] > c14[0];
|
|
15716
16096
|
}
|
|
15717
16097
|
function shouldShowUpgradeNotice(ctx = {}) {
|
|
15718
|
-
const current = ctx.current ?? "0.15.
|
|
16098
|
+
const current = ctx.current ?? "0.15.3";
|
|
15719
16099
|
const latest = ctx.latest ?? serverLatestVersion;
|
|
15720
16100
|
const env = ctx.env ?? process.env;
|
|
15721
16101
|
const isTty = ctx.isTty ?? Boolean(process.stderr.isTTY);
|
|
@@ -15736,7 +16116,7 @@ Upgrade: npm install -g @melius-ai/cli@latest (or: brew update && brew upgrade
|
|
|
15736
16116
|
function printUpgradeNoticeIfNeeded(ctx = {}) {
|
|
15737
16117
|
try {
|
|
15738
16118
|
if (!shouldShowUpgradeNotice(ctx)) return;
|
|
15739
|
-
const current = ctx.current ?? "0.15.
|
|
16119
|
+
const current = ctx.current ?? "0.15.3";
|
|
15740
16120
|
const latest = ctx.latest ?? serverLatestVersion;
|
|
15741
16121
|
process.stderr.write(formatUpgradeNotice(current, latest));
|
|
15742
16122
|
} catch {
|
|
@@ -20068,7 +20448,7 @@ function withDefaultHelp(args) {
|
|
|
20068
20448
|
}
|
|
20069
20449
|
function createProgram() {
|
|
20070
20450
|
const program2 = new Command();
|
|
20071
|
-
program2.name("mel").description("Mel \u2014 Melius agent CLI").version("0.15.
|
|
20451
|
+
program2.name("mel").description("Mel \u2014 Melius agent CLI").version("0.15.3").showSuggestionAfterError(true).option("--json", "Force JSON output (default)").option("--text", "Human-readable output").option(
|
|
20072
20452
|
"--fields <fields>",
|
|
20073
20453
|
"Select specific output fields (comma-separated)"
|
|
20074
20454
|
).option("--quiet", "Suppress output, exit code only").option("--verbose", "Log request/response metadata to stderr").addHelpText(
|
package/dist/src/index.js
CHANGED