@melius-ai/cli 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -0
- package/THIRD-PARTY-NOTICES.md +93 -0
- package/dist/bin/mel.js +1 -1
- package/dist/{chunk-GEI5UAWV.js → chunk-CHRQZMYE.js} +215 -32
- package/dist/src/index.js +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -228,6 +228,21 @@ mel template apply <canvasId> <templateId> \
|
|
|
228
228
|
mel bulk-run start <canvasId> --node-ids <groupId> --wait
|
|
229
229
|
```
|
|
230
230
|
|
|
231
|
+
Each `--inputs` entry targets an input `portId` from `mel template list`. Three kinds are supported (`mediaType` is `image`, `video`, `audio`, or `pdf`):
|
|
232
|
+
|
|
233
|
+
| Kind | Shape | Use for |
|
|
234
|
+
| ---------- | --------------------------------- | ------------------------------------------------------------ |
|
|
235
|
+
| `text` | `{kind,portId,text}` | A text prompt/value |
|
|
236
|
+
| `asset` | `{kind,portId,assetId,mediaType}` | A stored library asset (from `mel asset search`) |
|
|
237
|
+
| `assetUrl` | `{kind,portId,url,mediaType}` | A remote media URL — fetched and stored server-side on apply |
|
|
238
|
+
|
|
239
|
+
`assetUrl` lets you wire an image already hosted on your own site (e.g. a product image) without a separate upload round-trip:
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
mel template apply <canvasId> <templateId> \
|
|
243
|
+
--inputs '[{"kind":"assetUrl","portId":"<portId>","url":"https://example.com/image.jpg","mediaType":"image"}]'
|
|
244
|
+
```
|
|
245
|
+
|
|
231
246
|
### Models
|
|
232
247
|
|
|
233
248
|
| Command | Description |
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
`@melius-ai/cli` is distributed as a bundle: the source of the packages below
|
|
4
|
+
is compiled into `dist` and redistributed inside the npm tarball. Their
|
|
5
|
+
licenses and copyright notices are reproduced here as those licenses require.
|
|
6
|
+
|
|
7
|
+
Generated by `pnpm --filter @melius-ai/cli run notices` from the build output —
|
|
8
|
+
do not edit by hand. `test/bundle-licenses.test.ts` fails when it drifts.
|
|
9
|
+
|
|
10
|
+
## @ts-rest/core@3.52.1
|
|
11
|
+
|
|
12
|
+
License: MIT
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
MIT License
|
|
16
|
+
|
|
17
|
+
Copyright (c) 2022 Oliver Butler
|
|
18
|
+
|
|
19
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
20
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
21
|
+
in the Software without restriction, including without limitation the rights
|
|
22
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
23
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
24
|
+
furnished to do so, subject to the following conditions:
|
|
25
|
+
|
|
26
|
+
The above copyright notice and this permission notice shall be included in all
|
|
27
|
+
copies or substantial portions of the Software.
|
|
28
|
+
|
|
29
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
30
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
31
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
32
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
33
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
34
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
35
|
+
SOFTWARE.
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## commander@13.1.0
|
|
39
|
+
|
|
40
|
+
License: MIT
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
(The MIT License)
|
|
44
|
+
|
|
45
|
+
Copyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca>
|
|
46
|
+
|
|
47
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
48
|
+
a copy of this software and associated documentation files (the
|
|
49
|
+
'Software'), to deal in the Software without restriction, including
|
|
50
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
51
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
52
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
53
|
+
the following conditions:
|
|
54
|
+
|
|
55
|
+
The above copyright notice and this permission notice shall be
|
|
56
|
+
included in all copies or substantial portions of the Software.
|
|
57
|
+
|
|
58
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
59
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
60
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
61
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
62
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
63
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
64
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## zod@3.25.76
|
|
68
|
+
|
|
69
|
+
License: MIT
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
MIT License
|
|
73
|
+
|
|
74
|
+
Copyright (c) 2025 Colin McDonnell
|
|
75
|
+
|
|
76
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
77
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
78
|
+
in the Software without restriction, including without limitation the rights
|
|
79
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
80
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
81
|
+
furnished to do so, subject to the following conditions:
|
|
82
|
+
|
|
83
|
+
The above copyright notice and this permission notice shall be included in all
|
|
84
|
+
copies or substantial portions of the Software.
|
|
85
|
+
|
|
86
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
87
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
88
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
89
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
90
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
91
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
92
|
+
SOFTWARE.
|
|
93
|
+
```
|
package/dist/bin/mel.js
CHANGED
|
@@ -7740,6 +7740,7 @@ var MAX_VARIATIONS = 10;
|
|
|
7740
7740
|
|
|
7741
7741
|
// ../api-contract/src/common.ts
|
|
7742
7742
|
var MessageResponseSchema = external_exports.object({ message: external_exports.string() });
|
|
7743
|
+
var ShareVisibilitySchema = external_exports.enum(["team", "anyone"]);
|
|
7743
7744
|
var CompletedPartSchema = external_exports.object({
|
|
7744
7745
|
partNumber: external_exports.number().int().positive(),
|
|
7745
7746
|
etag: external_exports.string()
|
|
@@ -7912,7 +7913,7 @@ var FileTypeSchema = external_exports.enum([
|
|
|
7912
7913
|
"pdf",
|
|
7913
7914
|
"text"
|
|
7914
7915
|
]);
|
|
7915
|
-
var AssetShareModeSchema =
|
|
7916
|
+
var AssetShareModeSchema = ShareVisibilitySchema;
|
|
7916
7917
|
var TAG_COLOR_PALETTE = [
|
|
7917
7918
|
"hsl(189deg, 72%, 46%)",
|
|
7918
7919
|
"hsl(280deg, 60%, 50%)",
|
|
@@ -7979,7 +7980,14 @@ var FileCardSchema = external_exports.object({
|
|
|
7979
7980
|
var FileGenerationSchema = external_exports.object({
|
|
7980
7981
|
prompt: external_exports.string().nullable(),
|
|
7981
7982
|
modelDisplayName: external_exports.string().nullable(),
|
|
7982
|
-
aspectRatio: external_exports.string().nullable()
|
|
7983
|
+
aspectRatio: external_exports.string().nullable(),
|
|
7984
|
+
/** The node tool that produced the asset (e.g. `video-background-removal`),
|
|
7985
|
+
* when it came from a tool run rather than a plain model generation. The
|
|
7986
|
+
* viewer labels the row "Tool used" instead of "Model" when set.
|
|
7987
|
+
*
|
|
7988
|
+
* Optional so a client that ships ahead of the server keeps validating —
|
|
7989
|
+
* absent reads the same as "not a tool run". */
|
|
7990
|
+
sourceToolName: external_exports.string().nullable().optional()
|
|
7983
7991
|
});
|
|
7984
7992
|
var FileDetailSchema = FileCardSchema.extend({
|
|
7985
7993
|
width: external_exports.number().int().nullable(),
|
|
@@ -8613,7 +8621,12 @@ var AgentMessageFeedbackTypeSchema = external_exports.enum(["positive", "negativ
|
|
|
8613
8621
|
var AgentClarificationQuestionSchema = external_exports.object({
|
|
8614
8622
|
id: external_exports.string().min(1),
|
|
8615
8623
|
prompt: external_exports.string().min(1),
|
|
8616
|
-
|
|
8624
|
+
// Tolerates an explicit null and normalizes it to absent: models write
|
|
8625
|
+
// `"suggestedAnswers": null` for no-suggestion questions, and a
|
|
8626
|
+
// present-but-undefined key survives some JSON serializers as null in
|
|
8627
|
+
// persisted metadata. Rejecting it here silently dropped the whole
|
|
8628
|
+
// clarification form for the turn.
|
|
8629
|
+
suggestedAnswers: external_exports.array(external_exports.string().min(1)).min(1).max(3).nullish().transform((value) => value ?? void 0),
|
|
8617
8630
|
/**
|
|
8618
8631
|
* Marks the Slack project/canvas routing question so the Slack renderer
|
|
8619
8632
|
* can offer a "Last used canvas" shortcut + "Select other" instead of a
|
|
@@ -8873,7 +8886,22 @@ var agentContract = c3.router({
|
|
|
8873
8886
|
enabledSources: external_exports.array(AgentMessageSourceSchema).optional(),
|
|
8874
8887
|
// Per-turn override for the persisted profile setting.
|
|
8875
8888
|
// Omitted = use the user's saved preference.
|
|
8876
|
-
agentAutoRunOverride: external_exports.boolean().optional()
|
|
8889
|
+
agentAutoRunOverride: external_exports.boolean().optional(),
|
|
8890
|
+
// Plan mode (flag `agent-plan-mode`): run this turn on the
|
|
8891
|
+
// execution model with high reasoning and a read-only toolset
|
|
8892
|
+
// so the agent drafts or refines a plan instead of executing.
|
|
8893
|
+
// Ignored (normal turn) when the flag is off for the caller.
|
|
8894
|
+
planMode: external_exports.boolean().optional(),
|
|
8895
|
+
// First planning send after the member scrapped a plan: the
|
|
8896
|
+
// server skips the current-plan injection so the planning
|
|
8897
|
+
// model drafts fresh instead of reviving the dead plan.
|
|
8898
|
+
// Ignored when `planMode` is not set.
|
|
8899
|
+
discardPlan: external_exports.boolean().optional(),
|
|
8900
|
+
// Execution handoff from plan mode: the server injects the
|
|
8901
|
+
// session's latest agreed plan into this (normal-mode) turn
|
|
8902
|
+
// so the execution model implements exactly what was
|
|
8903
|
+
// approved. Ignored when the flag is off or no plan exists.
|
|
8904
|
+
implementPlan: external_exports.boolean().optional()
|
|
8877
8905
|
}).refine(
|
|
8878
8906
|
(b) => b.content.trim().length > 0 || (b.imageUrls?.length ?? 0) > 0 || (b.images?.length ?? 0) > 0 || (b.videoUrls?.length ?? 0) > 0 || (b.videos?.length ?? 0) > 0 || (b.documents?.length ?? 0) > 0,
|
|
8879
8907
|
{
|
|
@@ -10595,8 +10623,8 @@ var NodeVersionResponseSchema = external_exports.object({
|
|
|
10595
10623
|
* back to a kebab/snake → title-case rendering of the key when the
|
|
10596
10624
|
* model isn't in the registry (newly added or since-removed).
|
|
10597
10625
|
*
|
|
10598
|
-
* Optional + nullable so historical
|
|
10599
|
-
*
|
|
10626
|
+
* Optional + nullable so historical snapshots that pre-date this
|
|
10627
|
+
* field keep validating; the snapshot viewer falls back to the
|
|
10600
10628
|
* client-side `formatModelLabel` helper when this is missing.
|
|
10601
10629
|
*/
|
|
10602
10630
|
modelDisplayName: external_exports.string().nullable().optional(),
|
|
@@ -11460,8 +11488,8 @@ var canvasContract = c7.router({
|
|
|
11460
11488
|
}
|
|
11461
11489
|
},
|
|
11462
11490
|
// Returns canvases across every team the authenticated user is a
|
|
11463
|
-
// member of
|
|
11464
|
-
//
|
|
11491
|
+
// member of, for pickers where the active team header should not
|
|
11492
|
+
// constrain the results.
|
|
11465
11493
|
listUserCanvases: {
|
|
11466
11494
|
method: "GET",
|
|
11467
11495
|
path: "/users/me/canvases",
|
|
@@ -11591,6 +11619,30 @@ var canvasContract = c7.router({
|
|
|
11591
11619
|
404: MessageResponseSchema
|
|
11592
11620
|
}
|
|
11593
11621
|
},
|
|
11622
|
+
// Who can view this node as a shared playground generation. `anyone`
|
|
11623
|
+
// publishes it behind the public `/g/:nodeId` link; `team` (default)
|
|
11624
|
+
// revokes it. Team-scoped like the asset share toggle.
|
|
11625
|
+
getNodeShareMode: {
|
|
11626
|
+
method: "GET",
|
|
11627
|
+
path: "/nodes/:nodeId/share-mode",
|
|
11628
|
+
pathParams: external_exports.object({ nodeId: external_exports.string().uuid() }),
|
|
11629
|
+
responses: {
|
|
11630
|
+
200: external_exports.object({ shareMode: ShareVisibilitySchema }),
|
|
11631
|
+
403: MessageResponseSchema,
|
|
11632
|
+
404: MessageResponseSchema
|
|
11633
|
+
}
|
|
11634
|
+
},
|
|
11635
|
+
setNodeShareMode: {
|
|
11636
|
+
method: "PATCH",
|
|
11637
|
+
path: "/nodes/:nodeId/share-mode",
|
|
11638
|
+
pathParams: external_exports.object({ nodeId: external_exports.string().uuid() }),
|
|
11639
|
+
body: external_exports.object({ shareMode: ShareVisibilitySchema }),
|
|
11640
|
+
responses: {
|
|
11641
|
+
200: external_exports.object({ shareMode: ShareVisibilitySchema }),
|
|
11642
|
+
403: MessageResponseSchema,
|
|
11643
|
+
404: MessageResponseSchema
|
|
11644
|
+
}
|
|
11645
|
+
},
|
|
11594
11646
|
listNodeVersionAssets: {
|
|
11595
11647
|
method: "GET",
|
|
11596
11648
|
path: "/node-versions/:versionId/assets",
|
|
@@ -13036,6 +13088,10 @@ var ProfileUserSchema = external_exports.object({
|
|
|
13036
13088
|
name: external_exports.string(),
|
|
13037
13089
|
email: external_exports.string(),
|
|
13038
13090
|
agentAutoRun: external_exports.boolean(),
|
|
13091
|
+
// Set once the user answers the "how did you hear about us" intro. Marks
|
|
13092
|
+
// the account-level onboarding as done, independently of the canvas
|
|
13093
|
+
// product tour (`completedProductTour`).
|
|
13094
|
+
signupSource: external_exports.string().nullable(),
|
|
13039
13095
|
completedProductTour: external_exports.string().datetime().nullable(),
|
|
13040
13096
|
avatarUrl: external_exports.string().nullable(),
|
|
13041
13097
|
advancedSettings: UserAdvancedSettingsSchema
|
|
@@ -13121,6 +13177,90 @@ var SharedAssetResponseSchema = external_exports.object({
|
|
|
13121
13177
|
height: external_exports.number().int().nullable(),
|
|
13122
13178
|
durationInMs: external_exports.number().int().nullable()
|
|
13123
13179
|
});
|
|
13180
|
+
var SharedGenerationMediaTypeSchema = external_exports.enum(["image", "video", "audio"]);
|
|
13181
|
+
var SharedGenerationTypeSchema = external_exports.enum(["text", "image", "video", "audio"]);
|
|
13182
|
+
var SharedGenerationReferenceSchema = external_exports.object({
|
|
13183
|
+
mediaType: SharedGenerationMediaTypeSchema,
|
|
13184
|
+
url: external_exports.string().nullable(),
|
|
13185
|
+
previewUrl: external_exports.string().nullable(),
|
|
13186
|
+
// The input handle the reference was wired to (e.g. starting_image), so the
|
|
13187
|
+
// viewer can render the role. Null when the source used the default slot.
|
|
13188
|
+
targetHandle: external_exports.string().nullable()
|
|
13189
|
+
});
|
|
13190
|
+
var SharedGenerationOutputSchema = external_exports.object({
|
|
13191
|
+
mediaUrl: external_exports.string().nullable(),
|
|
13192
|
+
mediaType: SharedGenerationMediaTypeSchema.nullable(),
|
|
13193
|
+
width: external_exports.number().int().nullable(),
|
|
13194
|
+
height: external_exports.number().int().nullable(),
|
|
13195
|
+
durationInMs: external_exports.number().int().nullable(),
|
|
13196
|
+
// Optional for independent web/core deployments.
|
|
13197
|
+
text: external_exports.string().nullable().optional()
|
|
13198
|
+
});
|
|
13199
|
+
var SharedCreatorSchema = external_exports.object({
|
|
13200
|
+
id: external_exports.string().uuid(),
|
|
13201
|
+
name: external_exports.string(),
|
|
13202
|
+
email: external_exports.string(),
|
|
13203
|
+
avatarUrl: external_exports.string().nullable()
|
|
13204
|
+
});
|
|
13205
|
+
var SharedGenerationResponseSchema = external_exports.object({
|
|
13206
|
+
id: external_exports.string().uuid(),
|
|
13207
|
+
type: SharedGenerationTypeSchema,
|
|
13208
|
+
prompt: external_exports.string(),
|
|
13209
|
+
modelName: external_exports.string().nullable(),
|
|
13210
|
+
modelLabel: external_exports.string().nullable(),
|
|
13211
|
+
tier: external_exports.string().nullable(),
|
|
13212
|
+
aspectRatio: OutputAspectRatioSchema.nullable(),
|
|
13213
|
+
output: SharedGenerationOutputSchema.nullable(),
|
|
13214
|
+
references: external_exports.array(SharedGenerationReferenceSchema),
|
|
13215
|
+
// Display name of the member who created the generation, for the
|
|
13216
|
+
// "Created by …" tag. Null when the creator is unknown/deleted.
|
|
13217
|
+
createdByName: external_exports.string().nullable(),
|
|
13218
|
+
// Optional to support version-skew between web and core deployments.
|
|
13219
|
+
createdByUser: SharedCreatorSchema.nullable().optional(),
|
|
13220
|
+
// Set when the generation was produced by a template — the viewer's "Create
|
|
13221
|
+
// in my playground" then opens that template to try, instead of staging a
|
|
13222
|
+
// plain playground run. Null for playground generations.
|
|
13223
|
+
templateId: external_exports.string().uuid().nullable(),
|
|
13224
|
+
createdAt: external_exports.string().nullable()
|
|
13225
|
+
});
|
|
13226
|
+
var RecreateGenerationReferenceSchema = external_exports.object({
|
|
13227
|
+
assetId: external_exports.string().uuid(),
|
|
13228
|
+
displayName: external_exports.string(),
|
|
13229
|
+
mediaType: SharedGenerationMediaTypeSchema,
|
|
13230
|
+
url: external_exports.string().nullable(),
|
|
13231
|
+
previewUrl: external_exports.string().nullable(),
|
|
13232
|
+
targetHandle: external_exports.string().nullable()
|
|
13233
|
+
});
|
|
13234
|
+
var RecreateGenerationResponseSchema = external_exports.object({
|
|
13235
|
+
type: SharedGenerationTypeSchema,
|
|
13236
|
+
prompt: external_exports.string(),
|
|
13237
|
+
modelName: external_exports.string(),
|
|
13238
|
+
// The model variant the source ran (e.g. image-to-video), so the viewer's
|
|
13239
|
+
// composer can pre-select the matching recipe and wire the references into
|
|
13240
|
+
// its input slots. Null when the source recorded no variant.
|
|
13241
|
+
variant: external_exports.string().nullable(),
|
|
13242
|
+
tier: external_exports.string().nullable(),
|
|
13243
|
+
aspectRatio: OutputAspectRatioSchema.nullable(),
|
|
13244
|
+
resolution: external_exports.string().nullable(),
|
|
13245
|
+
duration: external_exports.number().int().positive().nullable(),
|
|
13246
|
+
references: external_exports.array(RecreateGenerationReferenceSchema),
|
|
13247
|
+
// Display name of the member who created the source generation, for the
|
|
13248
|
+
// "Created by …" tag shown on the recreated example in the viewer's
|
|
13249
|
+
// playground. Null when the creator is unknown/deleted.
|
|
13250
|
+
createdByName: external_exports.string().nullable(),
|
|
13251
|
+
// The owned copy of the shared generation. Optional so a newer web client
|
|
13252
|
+
// continues to accept a response from an already-deployed backend while it
|
|
13253
|
+
// rolls out.
|
|
13254
|
+
recreatedGeneration: external_exports.object({
|
|
13255
|
+
nodeId: external_exports.string().uuid(),
|
|
13256
|
+
projectId: external_exports.string().uuid(),
|
|
13257
|
+
canvasId: external_exports.string().uuid()
|
|
13258
|
+
}).optional()
|
|
13259
|
+
});
|
|
13260
|
+
var SharedGenerationHandoffSchema = RecreateGenerationResponseSchema.extend({
|
|
13261
|
+
modelLabel: external_exports.string().nullable(),
|
|
13262
|
+
output: SharedGenerationOutputSchema.nullable()
|
|
13263
|
+
});
|
|
13124
13264
|
var ShareCanvasResponseSchema = external_exports.object({
|
|
13125
13265
|
id: external_exports.string().uuid(),
|
|
13126
13266
|
projectId: external_exports.string().uuid(),
|
|
@@ -13148,12 +13288,7 @@ var ShareProjectInfoResponseSchema = external_exports.object({
|
|
|
13148
13288
|
// The user who created the project — used to render "X shared Y" copy in
|
|
13149
13289
|
// link previews and the owner card on the shared canvas view. Null for
|
|
13150
13290
|
// legacy projects with no recorded creator.
|
|
13151
|
-
createdByUser:
|
|
13152
|
-
id: external_exports.string().uuid(),
|
|
13153
|
-
name: external_exports.string(),
|
|
13154
|
-
email: external_exports.string(),
|
|
13155
|
-
avatarUrl: external_exports.string().nullable()
|
|
13156
|
-
}).nullable()
|
|
13291
|
+
createdByUser: SharedCreatorSchema.nullable()
|
|
13157
13292
|
});
|
|
13158
13293
|
var shareContract = c12.router({
|
|
13159
13294
|
// Public endpoint — no auth required
|
|
@@ -13189,6 +13324,18 @@ var shareContract = c12.router({
|
|
|
13189
13324
|
404: MessageResponseSchema
|
|
13190
13325
|
}
|
|
13191
13326
|
},
|
|
13327
|
+
// Public endpoint — no auth required. Resolves one playground generation
|
|
13328
|
+
// (a node) for an anonymous viewer; 404s unless the node's shareMode is
|
|
13329
|
+
// `anyone`.
|
|
13330
|
+
getSharedGeneration: {
|
|
13331
|
+
method: "GET",
|
|
13332
|
+
path: "/share/generations/:nodeId",
|
|
13333
|
+
pathParams: external_exports.object({ nodeId: external_exports.string().uuid() }),
|
|
13334
|
+
responses: {
|
|
13335
|
+
200: SharedGenerationResponseSchema,
|
|
13336
|
+
404: MessageResponseSchema
|
|
13337
|
+
}
|
|
13338
|
+
},
|
|
13192
13339
|
// Public endpoint — no auth required
|
|
13193
13340
|
getSharedCanvas: {
|
|
13194
13341
|
method: "GET",
|
|
@@ -13221,6 +13368,20 @@ var shareContract = c12.router({
|
|
|
13221
13368
|
200: external_exports.object({ shareMode: ShareModeSchema })
|
|
13222
13369
|
}
|
|
13223
13370
|
},
|
|
13371
|
+
// Authenticated. Clone a shared generation's referenced assets into the
|
|
13372
|
+
// caller's team + files and return a run-ready payload the client feeds into
|
|
13373
|
+
// the Playground run path. 404s unless the node's shareMode is `anyone`.
|
|
13374
|
+
recreateSharedGeneration: {
|
|
13375
|
+
method: "POST",
|
|
13376
|
+
path: "/share/generations/:nodeId/recreate",
|
|
13377
|
+
pathParams: external_exports.object({ nodeId: external_exports.string().uuid() }),
|
|
13378
|
+
body: external_exports.object({}),
|
|
13379
|
+
responses: {
|
|
13380
|
+
200: RecreateGenerationResponseSchema,
|
|
13381
|
+
403: MessageResponseSchema,
|
|
13382
|
+
404: MessageResponseSchema
|
|
13383
|
+
}
|
|
13384
|
+
},
|
|
13224
13385
|
copySharedCanvas: {
|
|
13225
13386
|
method: "POST",
|
|
13226
13387
|
path: "/share/projects/:projectId/canvases/:canvasId/copy",
|
|
@@ -13893,18 +14054,31 @@ var projectContract = c14.router({
|
|
|
13893
14054
|
});
|
|
13894
14055
|
|
|
13895
14056
|
// ../api-contract/src/template-apply-input.ts
|
|
14057
|
+
var templateApplyTextInput = external_exports.object({
|
|
14058
|
+
kind: external_exports.literal("text"),
|
|
14059
|
+
portId: external_exports.string(),
|
|
14060
|
+
text: external_exports.string().min(1)
|
|
14061
|
+
});
|
|
14062
|
+
var templateApplyAssetInput = external_exports.object({
|
|
14063
|
+
kind: external_exports.literal("asset"),
|
|
14064
|
+
portId: external_exports.string(),
|
|
14065
|
+
assetId: external_exports.string().uuid(),
|
|
14066
|
+
mediaType: external_exports.enum(["image", "video", "audio", "pdf"])
|
|
14067
|
+
});
|
|
14068
|
+
var templateApplyAssetUrlInput = external_exports.object({
|
|
14069
|
+
kind: external_exports.literal("assetUrl"),
|
|
14070
|
+
portId: external_exports.string(),
|
|
14071
|
+
url: external_exports.string().url(),
|
|
14072
|
+
mediaType: external_exports.enum(["image", "video", "audio", "pdf"])
|
|
14073
|
+
});
|
|
14074
|
+
var TemplateApplyLibraryInputSchema = external_exports.discriminatedUnion("kind", [
|
|
14075
|
+
templateApplyTextInput,
|
|
14076
|
+
templateApplyAssetInput
|
|
14077
|
+
]);
|
|
13896
14078
|
var TemplateApplyInputSchema = external_exports.discriminatedUnion("kind", [
|
|
13897
|
-
|
|
13898
|
-
|
|
13899
|
-
|
|
13900
|
-
assetId: external_exports.string().uuid(),
|
|
13901
|
-
mediaType: external_exports.enum(["image", "video", "audio", "pdf"])
|
|
13902
|
-
}),
|
|
13903
|
-
external_exports.object({
|
|
13904
|
-
kind: external_exports.literal("text"),
|
|
13905
|
-
portId: external_exports.string(),
|
|
13906
|
-
text: external_exports.string().min(1)
|
|
13907
|
-
})
|
|
14079
|
+
templateApplyTextInput,
|
|
14080
|
+
templateApplyAssetInput,
|
|
14081
|
+
templateApplyAssetUrlInput
|
|
13908
14082
|
]);
|
|
13909
14083
|
|
|
13910
14084
|
// ../api-contract/src/template-public-api.ts
|
|
@@ -14405,7 +14579,7 @@ function isMajorUpgrade(current, latest) {
|
|
|
14405
14579
|
return l[0] > c17[0];
|
|
14406
14580
|
}
|
|
14407
14581
|
function shouldShowUpgradeNotice(ctx = {}) {
|
|
14408
|
-
const current = ctx.current ?? "0.
|
|
14582
|
+
const current = ctx.current ?? "0.11.0";
|
|
14409
14583
|
const latest = ctx.latest ?? serverLatestVersion;
|
|
14410
14584
|
const env = ctx.env ?? process.env;
|
|
14411
14585
|
const isTty = ctx.isTty ?? Boolean(process.stderr.isTTY);
|
|
@@ -14426,7 +14600,7 @@ Upgrade: npm install -g @melius-ai/cli@latest (or: brew update && brew upgrade
|
|
|
14426
14600
|
function printUpgradeNoticeIfNeeded(ctx = {}) {
|
|
14427
14601
|
try {
|
|
14428
14602
|
if (!shouldShowUpgradeNotice(ctx)) return;
|
|
14429
|
-
const current = ctx.current ?? "0.
|
|
14603
|
+
const current = ctx.current ?? "0.11.0";
|
|
14430
14604
|
const latest = ctx.latest ?? serverLatestVersion;
|
|
14431
14605
|
process.stderr.write(formatUpgradeNotice(current, latest));
|
|
14432
14606
|
} catch {
|
|
@@ -15871,6 +16045,11 @@ function resolveNodeIds(lookup, nodeIds) {
|
|
|
15871
16045
|
return { resolvedNodeIds, unresolvedTempLabels };
|
|
15872
16046
|
}
|
|
15873
16047
|
|
|
16048
|
+
// ../api-contract/src/edge-id.ts
|
|
16049
|
+
function normalizeEdgeId(id, generateId = () => crypto.randomUUID()) {
|
|
16050
|
+
return id && UUID_RE.test(id) ? id : generateId();
|
|
16051
|
+
}
|
|
16052
|
+
|
|
15874
16053
|
// ../api-contract/src/media-types.ts
|
|
15875
16054
|
var IMAGE_CONTENT_TYPE_BY_EXTENSION = {
|
|
15876
16055
|
".jpg": "image/jpeg",
|
|
@@ -17101,7 +17280,7 @@ Valid node types: text, image, video, audio, file, group, custom_text, stitch.
|
|
|
17101
17280
|
if (edgeItems && edgeItems.length > 0) {
|
|
17102
17281
|
const resolveId = (ref) => labelToId.get(ref) ?? ref;
|
|
17103
17282
|
const edges = edgeItems.map((item) => ({
|
|
17104
|
-
id: item.id
|
|
17283
|
+
id: normalizeEdgeId(item.id),
|
|
17105
17284
|
srcNodeId: resolveId(item.src),
|
|
17106
17285
|
dstNodeId: resolveId(item.dst),
|
|
17107
17286
|
edgeType: item.type,
|
|
@@ -19017,7 +19196,7 @@ function parseInputs(value) {
|
|
|
19017
19196
|
"USAGE_ERROR",
|
|
19018
19197
|
result.error.issues.map((issue) => issue.message).join("; "),
|
|
19019
19198
|
{
|
|
19020
|
-
suggestion: 'Use text inputs {"kind":"text","portId":"<portId>","text":"<text>"}
|
|
19199
|
+
suggestion: 'Use text inputs {"kind":"text","portId":"<portId>","text":"<text>"}, library-asset inputs {"kind":"asset","portId":"<portId>","assetId":"<assetId>","mediaType":"image|video|audio|pdf"}, or image-URL inputs {"kind":"assetUrl","portId":"<portId>","url":"https://...","mediaType":"image|video|audio|pdf"}'
|
|
19021
19200
|
}
|
|
19022
19201
|
),
|
|
19023
19202
|
EXIT_USAGE_ERROR
|
|
@@ -19058,18 +19237,22 @@ Examples:
|
|
|
19058
19237
|
"Y center for the template box. Omit for automatic non-overlapping placement"
|
|
19059
19238
|
).option(
|
|
19060
19239
|
"--inputs <json>",
|
|
19061
|
-
"JSON array of text
|
|
19240
|
+
"JSON array of text, library-asset, or image-URL inputs targeting port IDs from mel template list"
|
|
19062
19241
|
).addHelpText(
|
|
19063
19242
|
"after",
|
|
19064
19243
|
`
|
|
19065
19244
|
Returns: { instanceId, groupId }. Internal workflow node IDs are never returned.
|
|
19066
|
-
Input kinds
|
|
19245
|
+
Input kinds (mediaType is image, video, audio, or pdf):
|
|
19246
|
+
text {kind,portId,text}
|
|
19247
|
+
asset {kind,portId,assetId,mediaType} \u2014 a stored library asset (from mel asset search)
|
|
19248
|
+
assetUrl {kind,portId,url,mediaType} \u2014 a remote media URL fetched and stored server-side (e.g. a product image already hosted on your site)
|
|
19067
19249
|
Omit --center-x/--center-y to place the box automatically. Use mel canvas content <canvasId> afterward to inspect its public ports.
|
|
19068
19250
|
Run the applied template with mel bulk-run start <canvasId> --node-ids <groupId> --wait.
|
|
19069
19251
|
|
|
19070
19252
|
Examples:
|
|
19071
19253
|
$ mel template apply <canvasId> <templateId>
|
|
19072
19254
|
$ mel template apply <canvasId> <templateId> --inputs '[{"kind":"text","portId":"<portId>","text":"A red shoe"}]'
|
|
19255
|
+
$ mel template apply <canvasId> <templateId> --inputs '[{"kind":"assetUrl","portId":"<portId>","url":"https://example.com/image.jpg","mediaType":"image"}]'
|
|
19073
19256
|
$ mel bulk-run start <canvasId> --node-ids <groupId> --wait`
|
|
19074
19257
|
).action(
|
|
19075
19258
|
async (canvasId, templateId, opts) => {
|
|
@@ -19554,7 +19737,7 @@ function withDefaultHelp(args) {
|
|
|
19554
19737
|
}
|
|
19555
19738
|
function createProgram() {
|
|
19556
19739
|
const program2 = new Command();
|
|
19557
|
-
program2.name("mel").description("Mel \u2014 Melius agent CLI").version("0.
|
|
19740
|
+
program2.name("mel").description("Mel \u2014 Melius agent CLI").version("0.11.0").showSuggestionAfterError(true).option("--json", "Force JSON output (default)").option("--text", "Human-readable output").option(
|
|
19558
19741
|
"--fields <fields>",
|
|
19559
19742
|
"Select specific output fields (comma-separated)"
|
|
19560
19743
|
).option("--quiet", "Suppress output, exit code only").option("--verbose", "Log request/response metadata to stderr").addHelpText(
|
package/dist/src/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@melius-ai/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "The Melius command-line interface — create canvases and run AI image/video generations from your terminal",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
"mel": "./dist/bin/mel.js"
|
|
22
22
|
},
|
|
23
23
|
"files": [
|
|
24
|
-
"dist"
|
|
24
|
+
"dist",
|
|
25
|
+
"THIRD-PARTY-NOTICES.md"
|
|
25
26
|
],
|
|
26
27
|
"type": "module",
|
|
27
28
|
"exports": {
|