@cargo-ai/cli 1.0.51 → 1.0.52
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/build/commands/ai/mcpServer.js +3 -3
- package/build/commands/ai/release.js +3 -3
- package/build/commands/connection/action.d.ts.map +1 -1
- package/build/commands/connection/action.js +1 -1
- package/build/commands/connection/integration.d.ts.map +1 -1
- package/build/commands/connection/integration.js +7 -2
- package/build/commands/storage/column.d.ts.map +1 -1
- package/build/commands/storage/column.js +35 -0
- package/package.json +4 -4
|
@@ -30,14 +30,14 @@ Examples:
|
|
|
30
30
|
$ cargo-ai ai mcp-server create --name "My Server"
|
|
31
31
|
$ cargo-ai ai mcp-server create --name "My Server" \\
|
|
32
32
|
--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,"
|
|
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
34
|
|
|
35
35
|
Action object shape:
|
|
36
36
|
{ "slug": string, "kind": "tool", "name": string | null, "description": string | null, "isBulkAllowed": boolean, "config": object }
|
|
37
37
|
|
|
38
38
|
Resource object shapes:
|
|
39
|
-
Model: { "kind": "model", "slug": string, "name": string, "description": string | null, "integrationSlug": string, "modelUuid": string | null, "filter": object | null, "selectedColumnSlugs": string[] | null, "limit": number | null, "
|
|
40
|
-
File: { "kind": "file", "slug": string, "name": string, "description": string | null, "items": [{"kind":"file","fileUuid": string}]
|
|
39
|
+
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}] }`)
|
|
41
41
|
.action(async (opts) => {
|
|
42
42
|
const api = getApi();
|
|
43
43
|
const result = await handleApiCall(() => api.ai.mcpServer.create({
|
|
@@ -71,11 +71,11 @@ export function registerReleaseCommands(parent, getApi) {
|
|
|
71
71
|
.addHelpText("after", `
|
|
72
72
|
Examples:
|
|
73
73
|
$ cargo-ai ai release update-draft --agent-uuid <uuid> \\
|
|
74
|
-
--resources '[{"kind":"model","slug":"my-resource","name":"My Resource","description":null,"integrationSlug":"hubspot","modelUuid":null,"filter":null,"selectedColumnSlugs":null,"limit":null,"
|
|
74
|
+
--resources '[{"kind":"model","slug":"my-resource","name":"My Resource","description":null,"integrationSlug":"hubspot","modelUuid":null,"filter":null,"selectedColumnSlugs":null,"limit":null,"isReadOnly":true}]'
|
|
75
75
|
|
|
76
76
|
Resource object shapes:
|
|
77
|
-
Model: { "kind": "model", "slug": string, "name": string, "description": string | null, "integrationSlug": string, "modelUuid": string | null, "filter": object | null, "selectedColumnSlugs": string[] | null, "limit": number | null, "
|
|
78
|
-
File: { "kind": "file", "slug": string, "name": string, "description": string | null, "items": [{"kind":"file","fileUuid": string}]
|
|
77
|
+
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 }
|
|
78
|
+
File: { "kind": "file", "slug": string, "name": string, "description": string | null, "items": [{"kind":"file","fileUuid": string}] }
|
|
79
79
|
|
|
80
80
|
Set "isReadOnly": false on a model resource to grant the agent write tools (insert/update/upsert/delete/custom columns).`)
|
|
81
81
|
.action(async (opts) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../../src/commands/connection/action.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AA+CxC,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,
|
|
1
|
+
{"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../../src/commands/connection/action.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AA+CxC,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CAwHN"}
|
|
@@ -34,7 +34,7 @@ Examples:
|
|
|
34
34
|
const { integrations } = await handleApiCall(() => api.connection.integration.list({
|
|
35
35
|
hasActions: true,
|
|
36
36
|
category: opts.category,
|
|
37
|
-
|
|
37
|
+
slugs: opts.integration !== undefined ? [opts.integration] : undefined,
|
|
38
38
|
}));
|
|
39
39
|
const terms = queryTerms
|
|
40
40
|
.flatMap((term) => term.split(/\s+/))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../../../src/commands/connection/integration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,
|
|
1
|
+
{"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../../../src/commands/connection/integration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CAoGN"}
|
|
@@ -7,7 +7,7 @@ export function registerIntegrationCommands(parent, getApi) {
|
|
|
7
7
|
.command("list")
|
|
8
8
|
.description("List all integrations")
|
|
9
9
|
.option("--category <category>", "Filter by category (string)")
|
|
10
|
-
.option("--
|
|
10
|
+
.option("--slugs <list>", "Filter by integration slugs (comma-separated strings)")
|
|
11
11
|
.option("--search <search>", "Search by name, case-insensitive (string)")
|
|
12
12
|
.option("--has-actions <bool>", 'Filter by presence of actions (string: "true" or "false")')
|
|
13
13
|
.option("--has-extractors <bool>", 'Filter by presence of extractors (string: "true" or "false")')
|
|
@@ -15,7 +15,12 @@ export function registerIntegrationCommands(parent, getApi) {
|
|
|
15
15
|
const api = getApi();
|
|
16
16
|
const result = await handleApiCall(() => api.connection.integration.list({
|
|
17
17
|
category: opts.category,
|
|
18
|
-
|
|
18
|
+
slugs: opts.slugs !== undefined
|
|
19
|
+
? opts.slugs
|
|
20
|
+
.split(",")
|
|
21
|
+
.map((slug) => slug.trim())
|
|
22
|
+
.filter((slug) => slug.length > 0)
|
|
23
|
+
: undefined,
|
|
19
24
|
search: opts.search,
|
|
20
25
|
hasActions: opts.hasActions === "true"
|
|
21
26
|
? true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"column.d.ts","sourceRoot":"","sources":["../../../src/commands/storage/column.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,
|
|
1
|
+
{"version":3,"file":"column.d.ts","sourceRoot":"","sources":["../../../src/commands/storage/column.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CAsLN"}
|
|
@@ -92,4 +92,39 @@ export function registerColumnCommands(parent, getApi) {
|
|
|
92
92
|
}));
|
|
93
93
|
outputJson(result);
|
|
94
94
|
});
|
|
95
|
+
column
|
|
96
|
+
.command("insert-custom-values")
|
|
97
|
+
.description("Set custom column values on a single record")
|
|
98
|
+
.requiredOption("--model-uuid <uuid>", "Model UUID")
|
|
99
|
+
.requiredOption("--id <id>", "Record ID")
|
|
100
|
+
.requiredOption("--data <json>", 'Custom column values as a JSON object, e.g. {"ai_fit_score":82}')
|
|
101
|
+
.addHelpText("after", `
|
|
102
|
+
Example:
|
|
103
|
+
$ cargo-ai storage column insert-custom-values --model-uuid 550e8400-... --id rec_1 --data '{"ai_fit_score":82}'`)
|
|
104
|
+
.action(async (opts) => {
|
|
105
|
+
const api = getApi();
|
|
106
|
+
await handleApiCall(() => api.storage.column.insertCustomValues({
|
|
107
|
+
modelUuid: opts.modelUuid,
|
|
108
|
+
id: opts.id,
|
|
109
|
+
data: parseJson(opts.data, "--data"),
|
|
110
|
+
}));
|
|
111
|
+
outputJson({ ok: true });
|
|
112
|
+
});
|
|
113
|
+
column
|
|
114
|
+
.command("insert-custom-values-bulk")
|
|
115
|
+
.description("Set custom column values on multiple records")
|
|
116
|
+
.requiredOption("--model-uuid <uuid>", "Model UUID")
|
|
117
|
+
.requiredOption("--records <json>", 'JSON array of entries: [{ "id": "rec_1", "data": { "ai_fit_score": 82 } }, ...]')
|
|
118
|
+
.addHelpText("after", `
|
|
119
|
+
Example:
|
|
120
|
+
$ cargo-ai storage column insert-custom-values-bulk --model-uuid 550e8400-... \\
|
|
121
|
+
--records '[{"id":"rec_1","data":{"ai_fit_score":82}}]'`)
|
|
122
|
+
.action(async (opts) => {
|
|
123
|
+
const api = getApi();
|
|
124
|
+
await handleApiCall(() => api.storage.column.insertCustomValuesBulk({
|
|
125
|
+
modelUuid: opts.modelUuid,
|
|
126
|
+
records: parseJson(opts.records, "--records"),
|
|
127
|
+
}));
|
|
128
|
+
outputJson({ ok: true });
|
|
129
|
+
});
|
|
95
130
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cargo-ai/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.52",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"homepage": "https://getcargo.ai",
|
|
@@ -59,10 +59,10 @@
|
|
|
59
59
|
"format:check": "prettier --check ."
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@cargo-ai/api": "^1.0.
|
|
62
|
+
"@cargo-ai/api": "^1.0.60",
|
|
63
63
|
"@cargo-ai/app-sdk": "^1.0.6",
|
|
64
|
-
"@cargo-ai/cdk": "^1.0.
|
|
65
|
-
"@cargo-ai/types": "^1.0.
|
|
64
|
+
"@cargo-ai/cdk": "^1.0.44",
|
|
65
|
+
"@cargo-ai/types": "^1.0.57",
|
|
66
66
|
"@cargo-ai/worker-sdk": "^1.0.12",
|
|
67
67
|
"@modelcontextprotocol/sdk": "1.29.0",
|
|
68
68
|
"commander": "^12.1.0",
|