@cargo-ai/cli 1.0.84 → 1.0.86
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcpServer.d.ts","sourceRoot":"","sources":["../../../src/commands/ai/mcpServer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,
|
|
1
|
+
{"version":3,"file":"mcpServer.d.ts","sourceRoot":"","sources":["../../../src/commands/ai/mcpServer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CAgJN"}
|
|
@@ -25,19 +25,24 @@ export function registerMcpServerCommands(parent, getApi) {
|
|
|
25
25
|
.requiredOption("--name <name>", "MCP server name (string, required)")
|
|
26
26
|
.option("--actions <json>", "Actions to expose (JSON array of action objects, default: [])")
|
|
27
27
|
.option("--resources <json>", "Resources to expose (JSON array of resource objects, default: [])")
|
|
28
|
+
.option("--capabilities <json>", "Capabilities to expose (JSON array of capability objects, default: [])")
|
|
28
29
|
.addHelpText("after", `
|
|
29
30
|
Examples:
|
|
30
31
|
$ cargo-ai ai mcp-server create --name "My Server"
|
|
31
32
|
$ cargo-ai ai mcp-server create --name "My Server" \\
|
|
32
33
|
--actions '[{"slug":"my-action","kind":"tool","name":null,"description":null,"isBulkAllowed":false,"config":{}}]' \\
|
|
33
|
-
--resources '[{"kind":"model","slug":"my-resource","name":"My Resource","description":null,"integrationSlug":"hubspot","modelUuid":null,"filter":null,"selectedColumnSlugs":null,"limit":null,"isReadOnly":true}]'
|
|
34
|
+
--resources '[{"kind":"model","slug":"my-resource","name":"My Resource","description":null,"integrationSlug":"hubspot","modelUuid":null,"filter":null,"selectedColumnSlugs":null,"limit":null,"isReadOnly":true}]' \\
|
|
35
|
+
--capabilities '[{"slug":"webSearch","config":{}}]'
|
|
34
36
|
|
|
35
37
|
Action object shape:
|
|
36
38
|
{ "slug": string, "kind": "tool", "name": string | null, "description": string | null, "isBulkAllowed": boolean, "config": object }
|
|
37
39
|
|
|
38
40
|
Resource object shapes:
|
|
39
41
|
Model: { "kind": "model", "slug": string, "name": string, "description": string | null, "integrationSlug": string, "modelUuid": string | null, "filter": object | null, "selectedColumnSlugs": string[] | null, "limit": number | null, "isReadOnly": boolean }
|
|
40
|
-
File: { "kind": "file", "slug": string, "name": string, "description": string | null, "items": [{"kind":"file","fileUuid": string}] }
|
|
42
|
+
File: { "kind": "file", "slug": string, "name": string, "description": string | null, "items": [{"kind":"file","fileUuid": string}] }
|
|
43
|
+
|
|
44
|
+
Capability object shape:
|
|
45
|
+
{ "slug": "webSearch" | "context" | …, "config": object }`)
|
|
41
46
|
.action(async (opts) => {
|
|
42
47
|
const api = getApi();
|
|
43
48
|
const result = await handleApiCall(() => api.ai.mcpServer.create({
|
|
@@ -48,6 +53,9 @@ Resource object shapes:
|
|
|
48
53
|
resources: opts.resources !== undefined
|
|
49
54
|
? parseJson(opts.resources, "--resources")
|
|
50
55
|
: [],
|
|
56
|
+
capabilities: opts.capabilities !== undefined
|
|
57
|
+
? parseJson(opts.capabilities, "--capabilities")
|
|
58
|
+
: [],
|
|
51
59
|
}));
|
|
52
60
|
outputJson(result);
|
|
53
61
|
});
|
|
@@ -66,6 +74,7 @@ Resource object shapes:
|
|
|
66
74
|
.option("--name <name>", "MCP server name (string)")
|
|
67
75
|
.option("--actions <json>", "Actions to expose (JSON array of action objects, same format as 'mcp-server create')")
|
|
68
76
|
.option("--resources <json>", "Resources to expose (JSON array of resource objects, same format as 'mcp-server create')")
|
|
77
|
+
.option("--capabilities <json>", "Capabilities to expose (JSON array of capability objects, same format as 'mcp-server create')")
|
|
69
78
|
.action(async (opts) => {
|
|
70
79
|
const api = getApi();
|
|
71
80
|
const result = await handleApiCall(() => api.ai.mcpServer.update({
|
|
@@ -77,6 +86,9 @@ Resource object shapes:
|
|
|
77
86
|
resources: opts.resources !== undefined
|
|
78
87
|
? parseJson(opts.resources, "--resources")
|
|
79
88
|
: undefined,
|
|
89
|
+
capabilities: opts.capabilities !== undefined
|
|
90
|
+
? parseJson(opts.capabilities, "--capabilities")
|
|
91
|
+
: undefined,
|
|
80
92
|
}));
|
|
81
93
|
outputJson(result);
|
|
82
94
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cargo-ai/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.86",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"homepage": "https://getcargo.ai",
|
|
@@ -66,10 +66,10 @@
|
|
|
66
66
|
"dependencies": {
|
|
67
67
|
"@ai-sdk/harness": "^1.0.95",
|
|
68
68
|
"@ai-sdk/harness-claude-code": "^1.0.99",
|
|
69
|
-
"@cargo-ai/api": "^1.0.
|
|
69
|
+
"@cargo-ai/api": "^1.0.76",
|
|
70
70
|
"@cargo-ai/app-sdk": "^1.0.10",
|
|
71
|
-
"@cargo-ai/cdk": "^1.0.
|
|
72
|
-
"@cargo-ai/types": "^1.0.
|
|
71
|
+
"@cargo-ai/cdk": "^1.0.70",
|
|
72
|
+
"@cargo-ai/types": "^1.0.73",
|
|
73
73
|
"@cargo-ai/utils": "^1.0.28",
|
|
74
74
|
"@cargo-ai/worker-sdk": "^1.0.17",
|
|
75
75
|
"@modelcontextprotocol/sdk": "1.29.0",
|