@mcp-use/cli 2.2.1 → 2.2.2-canary.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 +62 -0
- package/dist/commands/auth.d.ts +13 -0
- package/dist/commands/auth.d.ts.map +1 -0
- package/dist/commands/deploy.d.ts +13 -0
- package/dist/commands/deploy.d.ts.map +1 -0
- package/dist/index.js +1178 -74
- package/dist/index.mjs +1173 -67
- package/dist/utils/api.d.ts +109 -0
- package/dist/utils/api.d.ts.map +1 -0
- package/dist/utils/config.d.ts +34 -0
- package/dist/utils/config.d.ts.map +1 -0
- package/dist/utils/git.d.ts +45 -0
- package/dist/utils/git.d.ts.map +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
export interface APIKeyCreateRequest {
|
|
2
|
+
name: string;
|
|
3
|
+
}
|
|
4
|
+
export interface APIKeyCreateResponse {
|
|
5
|
+
api_key: string;
|
|
6
|
+
name: string;
|
|
7
|
+
}
|
|
8
|
+
export interface AuthTestResponse {
|
|
9
|
+
message: string;
|
|
10
|
+
user_id: string;
|
|
11
|
+
email: string;
|
|
12
|
+
}
|
|
13
|
+
export interface GitHubSource {
|
|
14
|
+
type: "github";
|
|
15
|
+
repo: string;
|
|
16
|
+
branch?: string;
|
|
17
|
+
startCommand?: string;
|
|
18
|
+
runtime?: "node" | "python";
|
|
19
|
+
port?: number;
|
|
20
|
+
env?: Record<string, string>;
|
|
21
|
+
buildCommand?: string;
|
|
22
|
+
baseImage?: string;
|
|
23
|
+
githubCheckRunId?: number;
|
|
24
|
+
}
|
|
25
|
+
export interface UploadSource {
|
|
26
|
+
type: "upload";
|
|
27
|
+
uploadId: string;
|
|
28
|
+
startCommand?: string;
|
|
29
|
+
runtime?: "node" | "python";
|
|
30
|
+
port?: number;
|
|
31
|
+
env?: Record<string, string>;
|
|
32
|
+
buildCommand?: string;
|
|
33
|
+
baseImage?: string;
|
|
34
|
+
}
|
|
35
|
+
export type DeploymentSource = GitHubSource | UploadSource;
|
|
36
|
+
export interface CreateDeploymentRequest {
|
|
37
|
+
name: string;
|
|
38
|
+
source: DeploymentSource;
|
|
39
|
+
customDomain?: string;
|
|
40
|
+
healthCheckPath?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface Deployment {
|
|
43
|
+
id: string;
|
|
44
|
+
userId: string;
|
|
45
|
+
name: string;
|
|
46
|
+
source: DeploymentSource;
|
|
47
|
+
domain?: string;
|
|
48
|
+
customDomain?: string;
|
|
49
|
+
port: number;
|
|
50
|
+
createdAt: string;
|
|
51
|
+
updatedAt: string;
|
|
52
|
+
status: "pending" | "building" | "running" | "stopped" | "failed";
|
|
53
|
+
healthCheckPath?: string;
|
|
54
|
+
provider?: string;
|
|
55
|
+
appName?: string;
|
|
56
|
+
error?: string;
|
|
57
|
+
buildLogs?: string;
|
|
58
|
+
buildStartedAt?: string;
|
|
59
|
+
buildCompletedAt?: string;
|
|
60
|
+
gitCommitSha?: string;
|
|
61
|
+
gitBranch?: string;
|
|
62
|
+
gitCommitMessage?: string;
|
|
63
|
+
}
|
|
64
|
+
export interface UploadResponse {
|
|
65
|
+
uploadId: string;
|
|
66
|
+
size: number;
|
|
67
|
+
filename: string;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* API client for mcp-use cloud
|
|
71
|
+
*/
|
|
72
|
+
export declare class McpUseAPI {
|
|
73
|
+
private baseUrl;
|
|
74
|
+
private apiKey;
|
|
75
|
+
constructor(baseUrl?: string, apiKey?: string);
|
|
76
|
+
/**
|
|
77
|
+
* Initialize API client with config
|
|
78
|
+
*/
|
|
79
|
+
static create(): Promise<McpUseAPI>;
|
|
80
|
+
/**
|
|
81
|
+
* Make authenticated request
|
|
82
|
+
*/
|
|
83
|
+
private request;
|
|
84
|
+
/**
|
|
85
|
+
* Create API key using JWT token
|
|
86
|
+
*/
|
|
87
|
+
createApiKey(jwtToken: string, name?: string): Promise<APIKeyCreateResponse>;
|
|
88
|
+
/**
|
|
89
|
+
* Test authentication
|
|
90
|
+
*/
|
|
91
|
+
testAuth(): Promise<AuthTestResponse>;
|
|
92
|
+
/**
|
|
93
|
+
* Create deployment
|
|
94
|
+
*/
|
|
95
|
+
createDeployment(request: CreateDeploymentRequest): Promise<Deployment>;
|
|
96
|
+
/**
|
|
97
|
+
* Get deployment by ID
|
|
98
|
+
*/
|
|
99
|
+
getDeployment(deploymentId: string): Promise<Deployment>;
|
|
100
|
+
/**
|
|
101
|
+
* Stream deployment logs
|
|
102
|
+
*/
|
|
103
|
+
streamDeploymentLogs(deploymentId: string): AsyncGenerator<string, void, unknown>;
|
|
104
|
+
/**
|
|
105
|
+
* Upload source code tarball
|
|
106
|
+
*/
|
|
107
|
+
uploadSource(filePath: string): Promise<UploadResponse>;
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/utils/api.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,YAAY,C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
* Read config from disk
|
|
7
|
+
*/
|
|
8
|
+
export declare function readConfig(): Promise<McpConfig>;
|
|
9
|
+
/**
|
|
10
|
+
* Write config to disk
|
|
11
|
+
*/
|
|
12
|
+
export declare function writeConfig(config: McpConfig): Promise<void>;
|
|
13
|
+
/**
|
|
14
|
+
* Delete config file
|
|
15
|
+
*/
|
|
16
|
+
export declare function deleteConfig(): Promise<void>;
|
|
17
|
+
/**
|
|
18
|
+
* Get API URL from config or use default
|
|
19
|
+
*/
|
|
20
|
+
export declare function getApiUrl(): Promise<string>;
|
|
21
|
+
/**
|
|
22
|
+
* Get API key from config
|
|
23
|
+
*/
|
|
24
|
+
export declare function getApiKey(): Promise<string | null>;
|
|
25
|
+
/**
|
|
26
|
+
* Check if user is logged in
|
|
27
|
+
*/
|
|
28
|
+
export declare function isLoggedIn(): Promise<boolean>;
|
|
29
|
+
/**
|
|
30
|
+
* Get web URL (for browser-based auth)
|
|
31
|
+
* This is the frontend URL where /auth/cli lives
|
|
32
|
+
*/
|
|
33
|
+
export declare function getWebUrl(): Promise<string>;
|
|
34
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/utils/config.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,SAAS;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AA0BD;;GAEG;AACH,wBAAsB,UAAU,IAAI,OAAO,CAAC,SAAS,CAAC,CAQrD;AAED;;GAEG;AACH,wBAAsB,WAAW,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAGlE;AAED;;GAEG;AACH,wBAAsB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAMlD;AAED;;GAEG;AACH,wBAAsB,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAGjD;AAED;;GAEG;AACH,wBAAsB,SAAS,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAGxD;AAED;;GAEG;AACH,wBAAsB,UAAU,IAAI,OAAO,CAAC,OAAO,CAAC,CAGnD;AAED;;;GAGG;AACH,wBAAsB,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAEjD"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export interface GitInfo {
|
|
2
|
+
isGitRepo: boolean;
|
|
3
|
+
remoteUrl?: string;
|
|
4
|
+
owner?: string;
|
|
5
|
+
repo?: string;
|
|
6
|
+
branch?: string;
|
|
7
|
+
commitSha?: string;
|
|
8
|
+
commitMessage?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Check if directory is a git repository
|
|
12
|
+
*/
|
|
13
|
+
export declare function isGitRepo(cwd?: string): Promise<boolean>;
|
|
14
|
+
/**
|
|
15
|
+
* Get git remote URL
|
|
16
|
+
*/
|
|
17
|
+
export declare function getRemoteUrl(cwd?: string): Promise<string | null>;
|
|
18
|
+
/**
|
|
19
|
+
* Parse GitHub owner and repo from remote URL
|
|
20
|
+
*/
|
|
21
|
+
export declare function parseGitHubUrl(url: string): {
|
|
22
|
+
owner: string;
|
|
23
|
+
repo: string;
|
|
24
|
+
} | null;
|
|
25
|
+
/**
|
|
26
|
+
* Get current branch
|
|
27
|
+
*/
|
|
28
|
+
export declare function getCurrentBranch(cwd?: string): Promise<string | null>;
|
|
29
|
+
/**
|
|
30
|
+
* Get current commit SHA
|
|
31
|
+
*/
|
|
32
|
+
export declare function getCommitSha(cwd?: string): Promise<string | null>;
|
|
33
|
+
/**
|
|
34
|
+
* Get current commit message
|
|
35
|
+
*/
|
|
36
|
+
export declare function getCommitMessage(cwd?: string): Promise<string | null>;
|
|
37
|
+
/**
|
|
38
|
+
* Get all git info for current directory
|
|
39
|
+
*/
|
|
40
|
+
export declare function getGitInfo(cwd?: string): Promise<GitInfo>;
|
|
41
|
+
/**
|
|
42
|
+
* Check if remote is a GitHub URL
|
|
43
|
+
*/
|
|
44
|
+
export declare function isGitHubUrl(url: string): boolean;
|
|
45
|
+
//# sourceMappingURL=git.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../src/utils/git.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,OAAO;IACtB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAiBD;;GAEG;AACH,wBAAsB,SAAS,CAAC,GAAG,GAAE,MAAsB,GAAG,OAAO,CAAC,OAAO,CAAC,CAG7E;AAED;;GAEG;AACH,wBAAsB,YAAY,CAChC,GAAG,GAAE,MAAsB,GAC1B,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAExB;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,GAAG,EAAE,MAAM,GACV;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAgBxC;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,GAAG,GAAE,MAAsB,GAC1B,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAExB;AAED;;GAEG;AACH,wBAAsB,YAAY,CAChC,GAAG,GAAE,MAAsB,GAC1B,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAExB;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,GAAG,GAAE,MAAsB,GAC1B,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAExB;AAED;;GAEG;AACH,wBAAsB,UAAU,CAC9B,GAAG,GAAE,MAAsB,GAC1B,OAAO,CAAC,OAAO,CAAC,CAgClB;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAEhD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcp-use/cli",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.2-canary.0",
|
|
4
4
|
"description": "Build tool for MCP UI widgets - bundles React components into standalone HTML pages for Model Context Protocol servers",
|
|
5
5
|
"author": "mcp-use, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"tsx": "^4.0.0",
|
|
45
45
|
"vite": "^6.0.0",
|
|
46
46
|
"ws": "^8.18.0",
|
|
47
|
-
"@mcp-use/inspector": "0.5.
|
|
48
|
-
"mcp-use": "1.3.
|
|
47
|
+
"@mcp-use/inspector": "0.5.2-canary.0",
|
|
48
|
+
"mcp-use": "1.3.2-canary.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@types/node": "^20.0.0",
|