@thenavidm/midjourney-mcp-cli 1.3.0 → 2.0.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 +103 -50
- package/SKILL.md +10 -6
- package/dist/app.d.ts +9 -0
- package/dist/app.js +90 -0
- package/dist/app.js.map +1 -0
- package/dist/doctor.d.ts +8 -3
- package/dist/doctor.js +36 -67
- package/dist/doctor.js.map +1 -1
- package/dist/guide.d.ts +4 -0
- package/dist/guide.js +19 -0
- package/dist/guide.js.map +1 -0
- package/dist/index.d.ts +5 -8
- package/dist/index.js +9 -168
- package/dist/index.js.map +1 -1
- package/dist/npx.d.ts +2 -0
- package/dist/npx.js +14 -0
- package/dist/npx.js.map +1 -0
- package/dist/tools/create.d.ts +1 -126
- package/dist/tools/create.js +1 -1
- package/dist/tools/create.js.map +1 -1
- package/dist/tools/download.d.ts +1 -10
- package/dist/tools/explore.d.ts +1 -7
- package/dist/tools/jobs.d.ts +1 -17
- package/dist/tools/kit.d.ts +26 -55
- package/dist/tools/kit.js +77 -78
- package/dist/tools/kit.js.map +1 -1
- package/dist/tools/library.d.ts +1 -21
- package/dist/tools/library.js +1 -1
- package/dist/tools/library.js.map +1 -1
- package/dist/tools/profile.d.ts +1 -1
- package/dist/vocabulary.d.ts +24 -0
- package/dist/vocabulary.js +89 -0
- package/dist/vocabulary.js.map +1 -0
- package/package.json +8 -5
- package/dist/cli.d.ts +0 -112
- package/dist/cli.js +0 -664
- package/dist/cli.js.map +0 -1
- package/dist/safety.d.ts +0 -52
- package/dist/safety.js +0 -100
- package/dist/safety.js.map +0 -1
- package/dist/server.d.ts +0 -10
- package/dist/server.js +0 -57
- package/dist/server.js.map +0 -1
- package/dist/transport/http.d.ts +0 -18
- package/dist/transport/http.js +0 -48
- package/dist/transport/http.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vocabulary.js","sourceRoot":"","sources":["../src/vocabulary.ts"],"names":[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,UAAU,CAAC;IAClB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,OAAO,EAAE,CAAC,MAAM,CAAC;IACjB,IAAI,EAAE,CAAC,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,MAAM,CAAC;IAClB,MAAM,EAAE,CAAC,MAAM,CAAC;IAChB,OAAO,EAAE,CAAC,OAAO,CAAC;IAClB,SAAS,EAAE,CAAC,OAAO,CAAC;IACpB,OAAO,EAAE,CAAC,OAAO,CAAC;IAClB,QAAQ,EAAE,CAAC,OAAO,CAAC;IACnB,IAAI,EAAE,CAAC,OAAO,CAAC;IACf,KAAK,EAAE,CAAC,OAAO,CAAC;IAChB,MAAM,EAAE,CAAC,OAAO,CAAC;IACjB,KAAK,EAAE,CAAC,OAAO,CAAC;IAChB,OAAO,EAAE,CAAC,QAAQ,CAAC;IACnB,KAAK,EAAE,CAAC,QAAQ,CAAC;IACjB,MAAM,EAAE,CAAC,QAAQ,CAAC;IAClB,MAAM,EAAE,CAAC,QAAQ,CAAC;IAClB,IAAI,EAAE,CAAC,QAAQ,CAAC;IAChB,OAAO,EAAE,CAAC,QAAQ,CAAC;IACnB,GAAG,EAAE,CAAC,QAAQ,CAAC;IACf,KAAK,EAAE,CAAC,SAAS,CAAC;IAClB,MAAM,EAAE,CAAC,SAAS,CAAC;IACnB,WAAW,EAAE,CAAC,SAAS,CAAC;IACxB,MAAM,EAAE,CAAC,SAAS,CAAC;IACnB,MAAM,EAAE,CAAC,SAAS,CAAC;IACnB,SAAS,EAAE,CAAC,YAAY,CAAC;IACzB,KAAK,EAAE,CAAC,SAAS,CAAC;IAClB,KAAK,EAAE,CAAC,SAAS,CAAC;CACnB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thenavidm/midjourney-mcp-cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Midjourney MCP server and CLI for Claude Code and AI agents. 32 tools for generating images, following jobs to completion, downloading the real files, and building moodboards that make a style reusable.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"bin": {
|
|
8
8
|
"midjourney-mcp": "dist/index.js",
|
|
9
|
-
"midjourney-cli": "dist/index.js"
|
|
9
|
+
"midjourney-cli": "dist/index.js",
|
|
10
|
+
"midjourney-mcp-cli": "dist/npx.js"
|
|
10
11
|
},
|
|
11
12
|
"engines": {
|
|
12
13
|
"node": ">=22"
|
|
@@ -22,11 +23,12 @@
|
|
|
22
23
|
"build:mcpb": "bash desktop-extension/build.sh"
|
|
23
24
|
},
|
|
24
25
|
"dependencies": {
|
|
25
|
-
"@
|
|
26
|
-
"zod": "^
|
|
26
|
+
"@thenavidm/slipway": "^0.1.8",
|
|
27
|
+
"zod": "^4.2.0"
|
|
27
28
|
},
|
|
28
29
|
"devDependencies": {
|
|
29
30
|
"@types/node": "^22.10.0",
|
|
31
|
+
"ajv": "^8.20.0",
|
|
30
32
|
"typescript": "^5.7.0",
|
|
31
33
|
"vitest": "^2.1.0"
|
|
32
34
|
},
|
|
@@ -58,7 +60,8 @@
|
|
|
58
60
|
"model-context-protocol",
|
|
59
61
|
"text-to-image",
|
|
60
62
|
"typescript",
|
|
61
|
-
"windsurf"
|
|
63
|
+
"windsurf",
|
|
64
|
+
"slipway"
|
|
62
65
|
],
|
|
63
66
|
"files": [
|
|
64
67
|
"dist",
|
package/dist/cli.d.ts
DELETED
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The CLI adapter.
|
|
3
|
-
*
|
|
4
|
-
* `register()` in tools/kit.ts turns a `ToolSpec` into an MCP tool. This turns
|
|
5
|
-
* the same spec into a shell command, from the same `ALL_TOOLS` array, through
|
|
6
|
-
* the same handler and the same `WriteGuard`. Nothing is described twice, so a
|
|
7
|
-
* tool added tomorrow is a command tomorrow and the two surfaces cannot drift.
|
|
8
|
-
*
|
|
9
|
-
* The command IS the tool name. `submit_imagine` runs as `submit-imagine`, and
|
|
10
|
-
* the underscore form works too. Inventing a prettier command tree would mean a
|
|
11
|
-
* hand-written mapping, which is exactly the drift this avoids, and it would
|
|
12
|
-
* force anyone reading the SKILL.md to learn two vocabularies for one action.
|
|
13
|
-
*
|
|
14
|
-
* Zod is the only schema: every flag, its placeholder, its help text and its
|
|
15
|
-
* validation come from the shape the MCP tool already declares.
|
|
16
|
-
*/
|
|
17
|
-
import { type ZodRawShape } from "zod";
|
|
18
|
-
import { type AnyToolSpec } from "./tools/kit.js";
|
|
19
|
-
/** How a value reaches the parser, once the Zod wrappers are peeled off. */
|
|
20
|
-
type FlagKind = "string" | "number" | "boolean" | "enum" | "json";
|
|
21
|
-
type Flag = {
|
|
22
|
-
key: string;
|
|
23
|
-
flag: string;
|
|
24
|
-
kind: FlagKind;
|
|
25
|
-
required: boolean;
|
|
26
|
-
repeatable: boolean;
|
|
27
|
-
choices?: string[];
|
|
28
|
-
help: string;
|
|
29
|
-
};
|
|
30
|
-
export declare function flagsFor(shape: ZodRawShape): Flag[];
|
|
31
|
-
/**
|
|
32
|
-
* Midjourney's own parameter spellings, accepted as flags.
|
|
33
|
-
*
|
|
34
|
-
* The schema names things in full because a tool description is read by a model
|
|
35
|
-
* that has never seen a Midjourney prompt. A person at a terminal has, and they
|
|
36
|
-
* will type `--ar 16:9`, because that is what the parameter is called
|
|
37
|
-
* everywhere Midjourney documents it. Refusing the name the whole ecosystem
|
|
38
|
-
* uses, to protect a naming convention nobody outside this repo can see, would
|
|
39
|
-
* be the wrong trade.
|
|
40
|
-
*/
|
|
41
|
-
export declare const FLAG_ALIASES: Record<string, string>;
|
|
42
|
-
/**
|
|
43
|
-
* Parse argv against a tool's flags.
|
|
44
|
-
*
|
|
45
|
-
* Zod does the real validation afterwards, so this only has to get values into
|
|
46
|
-
* the right JavaScript types and catch the mistakes Zod would otherwise report
|
|
47
|
-
* in terms of a schema the person at the terminal never sees.
|
|
48
|
-
*/
|
|
49
|
-
export declare function parseArgs(argv: string[], flags: Flag[]): Record<string, unknown>;
|
|
50
|
-
/**
|
|
51
|
-
* Keep only the named fields.
|
|
52
|
-
*
|
|
53
|
-
* These endpoints are verbose: one explore page is tens of kilobytes of JSON,
|
|
54
|
-
* most of it layout hints. An agent piping that into its own context pays for
|
|
55
|
-
* every byte. `--select id,status,images` cuts it to what was asked for.
|
|
56
|
-
* Dotted paths descend, and arrays are traversed element-wise.
|
|
57
|
-
*/
|
|
58
|
-
export declare function selectFields(data: unknown, paths: string[]): unknown;
|
|
59
|
-
/** Errors are JSON on stderr, always, so a caller parses one shape. */
|
|
60
|
-
export declare function emitError(error: unknown): void;
|
|
61
|
-
/**
|
|
62
|
-
* The name this was invoked as, so examples are copy-pasteable.
|
|
63
|
-
*
|
|
64
|
-
* The package puts two binaries on the same file. Printing `midjourney-mcp` at
|
|
65
|
-
* someone who typed `midjourney-cli` hands them a command that works but is not
|
|
66
|
-
* the one in their fingers.
|
|
67
|
-
*/
|
|
68
|
-
export declare function binName(): string;
|
|
69
|
-
/**
|
|
70
|
-
* Words people use mapped onto words the tools use.
|
|
71
|
-
*
|
|
72
|
-
* Without this, "make a picture" matches nothing, because every tool says
|
|
73
|
-
* "generate" and "image". A lookup that only works when you already know the
|
|
74
|
-
* vocabulary is not a lookup.
|
|
75
|
-
*/
|
|
76
|
-
export declare const SYNONYMS: Record<string, string[]>;
|
|
77
|
-
/**
|
|
78
|
-
* Resolve a capability described in words to the command that does it.
|
|
79
|
-
*
|
|
80
|
-
* An agent that knows what it wants but not what this tool calls it would
|
|
81
|
-
* otherwise read the full tool list to find out, which is the cost the CLI
|
|
82
|
-
* exists to avoid. Scoring is deliberately dumb: name and title carry the most
|
|
83
|
-
* weight, because a tool called `download_job` should win "download my images"
|
|
84
|
-
* without any cleverness.
|
|
85
|
-
*/
|
|
86
|
-
export declare function whichCommand(query: string): {
|
|
87
|
-
tool: AnyToolSpec;
|
|
88
|
-
score: number;
|
|
89
|
-
}[];
|
|
90
|
-
/**
|
|
91
|
-
* The house contract, so a script branches on the number the same way for
|
|
92
|
-
* every one of these CLIs: 0 ok, 2 usage or a refused write, 3 not found,
|
|
93
|
-
* 4 auth, 5 API, 7 rate limited, 10 nothing configured.
|
|
94
|
-
*/
|
|
95
|
-
export declare const EXIT: {
|
|
96
|
-
readonly ok: 0;
|
|
97
|
-
readonly usage: 2;
|
|
98
|
-
readonly notFound: 3;
|
|
99
|
-
readonly auth: 4;
|
|
100
|
-
readonly api: 5;
|
|
101
|
-
readonly rateLimited: 7;
|
|
102
|
-
readonly config: 10;
|
|
103
|
-
};
|
|
104
|
-
/**
|
|
105
|
-
* Midjourney has no error contract of its own, so api/errors.ts already sorts
|
|
106
|
-
* every failure into a class. The class decides, never the status: a
|
|
107
|
-
* Cloudflare challenge and a real permission failure are both a 403.
|
|
108
|
-
*/
|
|
109
|
-
export declare function exitCodeFor(error: unknown): number;
|
|
110
|
-
export declare function isCliCommand(argv: string[]): boolean;
|
|
111
|
-
export declare function runCli(argv: string[]): Promise<number>;
|
|
112
|
-
export {};
|