@cargo-ai/cli 1.0.7 → 1.0.9
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/agent.d.ts.map +1 -1
- package/build/commands/ai/agent.js +24 -14
- package/build/commands/ai/chat.d.ts.map +1 -1
- package/build/commands/ai/chat.js +21 -11
- package/build/commands/ai/mcpClient.d.ts.map +1 -1
- package/build/commands/ai/mcpClient.js +12 -6
- package/build/commands/ai/mcpServer.d.ts.map +1 -1
- package/build/commands/ai/mcpServer.js +32 -11
- package/build/commands/ai/message.d.ts.map +1 -1
- package/build/commands/ai/message.js +43 -21
- package/build/commands/ai/prompt.d.ts.map +1 -1
- package/build/commands/ai/prompt.js +23 -9
- package/build/commands/ai/release.d.ts.map +1 -1
- package/build/commands/ai/release.js +42 -42
- package/build/commands/ai/suggestedAction.js +3 -3
- package/build/commands/auth.d.ts.map +1 -1
- package/build/commands/auth.js +14 -3
- package/build/commands/connection/connector.d.ts.map +1 -1
- package/build/commands/connection/connector.js +23 -18
- package/build/commands/connection/integration.d.ts.map +1 -1
- package/build/commands/connection/integration.js +9 -9
- package/build/commands/expression/expressionEval.d.ts.map +1 -1
- package/build/commands/expression/expressionEval.js +10 -7
- package/build/commands/orchestration/batch.d.ts.map +1 -1
- package/build/commands/orchestration/batch.js +31 -25
- package/build/commands/orchestration/index.d.ts.map +1 -1
- package/build/commands/orchestration/index.js +2 -0
- package/build/commands/orchestration/log.d.ts +4 -0
- package/build/commands/orchestration/log.d.ts.map +1 -0
- package/build/commands/orchestration/log.js +122 -0
- package/build/commands/orchestration/node.d.ts.map +1 -1
- package/build/commands/orchestration/node.js +16 -14
- package/build/commands/orchestration/play.d.ts.map +1 -1
- package/build/commands/orchestration/play.js +15 -7
- package/build/commands/orchestration/release.d.ts.map +1 -1
- package/build/commands/orchestration/release.js +6 -4
- package/build/commands/orchestration/run.d.ts.map +1 -1
- package/build/commands/orchestration/run.js +103 -82
- package/build/commands/segmentation/segment.d.ts.map +1 -1
- package/build/commands/segmentation/segment.js +33 -22
- package/build/commands/storage/model.d.ts.map +1 -1
- package/build/commands/storage/model.js +4 -0
- package/build/commands/storage/record.d.ts.map +1 -1
- package/build/commands/storage/record.js +15 -8
- package/build/commands/workspace/user.d.ts.map +1 -1
- package/build/commands/workspace/user.js +22 -13
- package/build/index.js +14 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../../src/commands/ai/agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../../src/commands/ai/agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CAoJN"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { handleApiCall, outputJson, parseJson } from "../runHandler.js";
|
|
2
2
|
export function registerAgentCommands(parent, getApi) {
|
|
3
|
-
const agent = parent
|
|
3
|
+
const agent = parent
|
|
4
|
+
.command("agent")
|
|
5
|
+
.description("Manage AI agents (list, get, create, update, remove)");
|
|
4
6
|
agent
|
|
5
7
|
.command("list")
|
|
6
8
|
.description("List all agents")
|
|
@@ -20,12 +22,20 @@ export function registerAgentCommands(parent, getApi) {
|
|
|
20
22
|
agent
|
|
21
23
|
.command("create")
|
|
22
24
|
.description("Create an agent")
|
|
23
|
-
.requiredOption("--name <name>", "Agent name")
|
|
24
|
-
.requiredOption("--icon-color <color>", "Icon color (grey, green, purple, yellow, blue, red
|
|
25
|
-
.requiredOption("--icon-face <face>", "Icon face identifier")
|
|
26
|
-
.option("--description <text>", "Agent description")
|
|
27
|
-
.option("--folder-uuid <uuid>", "Folder UUID")
|
|
28
|
-
.option("--triggers <json>",
|
|
25
|
+
.requiredOption("--name <name>", "Agent name (string, required)")
|
|
26
|
+
.requiredOption("--icon-color <color>", "Icon color (string, required). Allowed values: grey, green, purple, yellow, blue, red")
|
|
27
|
+
.requiredOption("--icon-face <face>", "Icon face identifier (string, required)")
|
|
28
|
+
.option("--description <text>", "Agent description (string)")
|
|
29
|
+
.option("--folder-uuid <uuid>", "Folder UUID to place the agent in (string)")
|
|
30
|
+
.option("--triggers <json>", "Triggers configuration (JSON array of trigger objects)")
|
|
31
|
+
.addHelpText("after", `
|
|
32
|
+
Examples:
|
|
33
|
+
$ cargo-ai ai agent create --name "My Agent" --icon-color blue --icon-face robot
|
|
34
|
+
$ cargo-ai ai agent create --name "Daily Sync" --icon-color green --icon-face robot \\
|
|
35
|
+
--triggers '[{"name":"Daily","type":"cron","cron":"0 9 * * *","text":"Run daily","description":null}]'
|
|
36
|
+
|
|
37
|
+
Trigger object shape:
|
|
38
|
+
{ "name": string, "type": "cron", "cron": string, "text": string, "description": string | null }`)
|
|
29
39
|
.action(async (opts) => {
|
|
30
40
|
const api = getApi();
|
|
31
41
|
const result = await handleApiCall(() => api.ai.agent.create({
|
|
@@ -53,13 +63,13 @@ export function registerAgentCommands(parent, getApi) {
|
|
|
53
63
|
agent
|
|
54
64
|
.command("update")
|
|
55
65
|
.description("Update an agent")
|
|
56
|
-
.requiredOption("--uuid <uuid>", "Agent UUID")
|
|
57
|
-
.option("--name <name>", "Agent name")
|
|
58
|
-
.option("--icon-color <color>", "Icon color (grey, green, purple, yellow, blue, red
|
|
59
|
-
.option("--icon-face <face>", "Icon face identifier")
|
|
60
|
-
.option("--description <text>", "Agent description")
|
|
61
|
-
.option("--folder-uuid <uuid>", "Folder UUID")
|
|
62
|
-
.option("--triggers <json>",
|
|
66
|
+
.requiredOption("--uuid <uuid>", "Agent UUID (string, required)")
|
|
67
|
+
.option("--name <name>", "Agent name (string)")
|
|
68
|
+
.option("--icon-color <color>", "Icon color (string). Allowed values: grey, green, purple, yellow, blue, red")
|
|
69
|
+
.option("--icon-face <face>", "Icon face identifier (string)")
|
|
70
|
+
.option("--description <text>", "Agent description (string)")
|
|
71
|
+
.option("--folder-uuid <uuid>", "Folder UUID (string)")
|
|
72
|
+
.option("--triggers <json>", "Triggers configuration (JSON array of trigger objects, same format as 'agent create')")
|
|
63
73
|
.action(async (opts) => {
|
|
64
74
|
const api = getApi();
|
|
65
75
|
const icon = opts.iconColor !== undefined && opts.iconFace !== undefined
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../../src/commands/ai/chat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../../src/commands/ai/chat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,GAAG,IAAI,CAoH7E"}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { handleApiCall, outputJson, parseJson } from "../runHandler.js";
|
|
2
2
|
export function registerChatCommands(parent, getApi) {
|
|
3
|
-
const chat = parent
|
|
3
|
+
const chat = parent
|
|
4
|
+
.command("chat")
|
|
5
|
+
.description("Manage AI chats (list, get, create, update, remove)");
|
|
4
6
|
chat
|
|
5
7
|
.command("list")
|
|
6
8
|
.description("List chats")
|
|
7
|
-
.option("--agent-uuid <uuid>", "
|
|
8
|
-
.option("--release-uuid <uuid>", "
|
|
9
|
-
.option("--user-uuid <uuid>", "
|
|
10
|
-
.option("--trigger-type <type>", "
|
|
11
|
-
.option("--limit <n>", "
|
|
12
|
-
.option("--offset <n>", "
|
|
9
|
+
.option("--agent-uuid <uuid>", "Filter by agent UUID (string)")
|
|
10
|
+
.option("--release-uuid <uuid>", "Filter by release UUID (string)")
|
|
11
|
+
.option("--user-uuid <uuid>", "Filter by user UUID (string)")
|
|
12
|
+
.option("--trigger-type <type>", "Filter by trigger type (string: chat, draft, cron, ...)")
|
|
13
|
+
.option("--limit <n>", "Max results to return (integer)")
|
|
14
|
+
.option("--offset <n>", "Number of results to skip (integer)")
|
|
13
15
|
.action(async (opts) => {
|
|
14
16
|
const api = getApi();
|
|
15
17
|
const result = await handleApiCall(() => api.ai.chat.list({
|
|
@@ -33,10 +35,18 @@ export function registerChatCommands(parent, getApi) {
|
|
|
33
35
|
chat
|
|
34
36
|
.command("create")
|
|
35
37
|
.description("Create a chat")
|
|
36
|
-
.requiredOption("--trigger <json>",
|
|
37
|
-
.option("--name <name>", "Chat name")
|
|
38
|
-
.option("--agent-uuid <uuid>", "Agent UUID")
|
|
39
|
-
.option("--release-uuid <uuid>", "Release UUID")
|
|
38
|
+
.requiredOption("--trigger <json>", "Chat trigger (JSON object, required)")
|
|
39
|
+
.option("--name <name>", "Chat name (string)")
|
|
40
|
+
.option("--agent-uuid <uuid>", "Agent UUID to associate with (string)")
|
|
41
|
+
.option("--release-uuid <uuid>", "Release UUID to pin to (string)")
|
|
42
|
+
.addHelpText("after", `
|
|
43
|
+
Examples:
|
|
44
|
+
$ cargo-ai ai chat create --trigger '{"type":"draft"}'
|
|
45
|
+
$ cargo-ai ai chat create --trigger '{"type":"chat","uuid":"...","agentUuid":null,"messageUuid":null}' --name "My Chat"
|
|
46
|
+
|
|
47
|
+
Trigger object shapes:
|
|
48
|
+
Draft: { "type": "draft" }
|
|
49
|
+
Chat: { "type": "chat", "uuid": string, "agentUuid": string | null, "messageUuid": string | null }`)
|
|
40
50
|
.action(async (opts) => {
|
|
41
51
|
const api = getApi();
|
|
42
52
|
const result = await handleApiCall(() => api.ai.chat.create({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcpClient.d.ts","sourceRoot":"","sources":["../../../src/commands/ai/mcpClient.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":"mcpClient.d.ts","sourceRoot":"","sources":["../../../src/commands/ai/mcpClient.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,CA4DN"}
|
|
@@ -2,14 +2,20 @@ import { handleApiCall, outputJson, parseJson } from "../runHandler.js";
|
|
|
2
2
|
export function registerMcpClientCommands(parent, getApi) {
|
|
3
3
|
const mcpClient = parent
|
|
4
4
|
.command("mcp-client")
|
|
5
|
-
.description("MCP
|
|
5
|
+
.description("Connect to external MCP servers");
|
|
6
6
|
mcpClient
|
|
7
7
|
.command("connect")
|
|
8
|
-
.description("Connect an MCP
|
|
9
|
-
.requiredOption("--name <name>", "MCP client name")
|
|
10
|
-
.requiredOption("--url <url>", "MCP
|
|
11
|
-
.option("--authentication <json>", 'Authentication (JSON or "null"
|
|
12
|
-
.option("--disabled-tool-slugs <list>", "
|
|
8
|
+
.description("Connect to an external MCP server")
|
|
9
|
+
.requiredOption("--name <name>", "MCP client name (string, required)")
|
|
10
|
+
.requiredOption("--url <url>", "MCP server URL to connect to (string, required)")
|
|
11
|
+
.option("--authentication <json>", 'Authentication credentials (JSON object or "null"). Shape: {"issuedAt": string, "accessToken": string}')
|
|
12
|
+
.option("--disabled-tool-slugs <list>", "Tool slugs to disable (comma-separated strings)")
|
|
13
|
+
.addHelpText("after", `
|
|
14
|
+
Examples:
|
|
15
|
+
$ cargo-ai ai mcp-client connect --name "My MCP" --url https://mcp.example.com/sse
|
|
16
|
+
$ cargo-ai ai mcp-client connect --name "My MCP" --url https://mcp.example.com/sse \\
|
|
17
|
+
--authentication '{"issuedAt":"2025-01-01","accessToken":"sk_..."}' \\
|
|
18
|
+
--disabled-tool-slugs slow-tool,deprecated-tool`)
|
|
13
19
|
.action(async (opts) => {
|
|
14
20
|
const api = getApi();
|
|
15
21
|
const result = await handleApiCall(() => api.ai.mcpClient.connect({
|
|
@@ -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,CAsHN"}
|
|
@@ -2,7 +2,7 @@ import { handleApiCall, outputJson, parseJson } from "../runHandler.js";
|
|
|
2
2
|
export function registerMcpServerCommands(parent, getApi) {
|
|
3
3
|
const mcpServer = parent
|
|
4
4
|
.command("mcp-server")
|
|
5
|
-
.description("MCP
|
|
5
|
+
.description("Manage MCP servers (list, get, create, update, remove)");
|
|
6
6
|
mcpServer
|
|
7
7
|
.command("list")
|
|
8
8
|
.description("List all MCP servers")
|
|
@@ -22,15 +22,32 @@ export function registerMcpServerCommands(parent, getApi) {
|
|
|
22
22
|
mcpServer
|
|
23
23
|
.command("create")
|
|
24
24
|
.description("Create an MCP server")
|
|
25
|
-
.requiredOption("--name <name>", "MCP server name")
|
|
26
|
-
.option("--
|
|
25
|
+
.requiredOption("--name <name>", "MCP server name (string, required)")
|
|
26
|
+
.option("--actions <json>", "Actions to expose (JSON array of action objects, default: [])")
|
|
27
|
+
.option("--resources <json>", "Resources to expose (JSON array of resource objects, default: [])")
|
|
28
|
+
.addHelpText("after", `
|
|
29
|
+
Examples:
|
|
30
|
+
$ cargo-ai ai mcp-server create --name "My Server"
|
|
31
|
+
$ cargo-ai ai mcp-server create --name "My Server" \\
|
|
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,"prompt":null}]'
|
|
34
|
+
|
|
35
|
+
Action object shape:
|
|
36
|
+
{ "slug": string, "kind": "tool", "name": string | null, "description": string | null, "isBulkAllowed": boolean, "config": object }
|
|
37
|
+
|
|
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, "prompt": string | null }
|
|
40
|
+
File: { "kind": "file", "slug": string, "name": string, "description": string | null, "items": [{"kind":"file","fileUuid": string}], "prompt": string | null }`)
|
|
27
41
|
.action(async (opts) => {
|
|
28
42
|
const api = getApi();
|
|
29
43
|
const result = await handleApiCall(() => api.ai.mcpServer.create({
|
|
30
44
|
name: opts.name,
|
|
31
|
-
|
|
32
|
-
? parseJson(opts.
|
|
33
|
-
:
|
|
45
|
+
actions: opts.actions !== undefined
|
|
46
|
+
? parseJson(opts.actions, "--actions")
|
|
47
|
+
: [],
|
|
48
|
+
resources: opts.resources !== undefined
|
|
49
|
+
? parseJson(opts.resources, "--resources")
|
|
50
|
+
: [],
|
|
34
51
|
}));
|
|
35
52
|
outputJson(result);
|
|
36
53
|
});
|
|
@@ -45,16 +62,20 @@ export function registerMcpServerCommands(parent, getApi) {
|
|
|
45
62
|
mcpServer
|
|
46
63
|
.command("update")
|
|
47
64
|
.description("Update an MCP server")
|
|
48
|
-
.requiredOption("--uuid <uuid>", "MCP server UUID")
|
|
49
|
-
.option("--name <name>", "MCP server name")
|
|
50
|
-
.option("--
|
|
65
|
+
.requiredOption("--uuid <uuid>", "MCP server UUID (string, required)")
|
|
66
|
+
.option("--name <name>", "MCP server name (string)")
|
|
67
|
+
.option("--actions <json>", "Actions to expose (JSON array of action objects, same format as 'mcp-server create')")
|
|
68
|
+
.option("--resources <json>", "Resources to expose (JSON array of resource objects, same format as 'mcp-server create')")
|
|
51
69
|
.action(async (opts) => {
|
|
52
70
|
const api = getApi();
|
|
53
71
|
const result = await handleApiCall(() => api.ai.mcpServer.update({
|
|
54
72
|
uuid: opts.uuid,
|
|
55
73
|
name: opts.name,
|
|
56
|
-
|
|
57
|
-
? parseJson(opts.
|
|
74
|
+
actions: opts.actions !== undefined
|
|
75
|
+
? parseJson(opts.actions, "--actions")
|
|
76
|
+
: undefined,
|
|
77
|
+
resources: opts.resources !== undefined
|
|
78
|
+
? parseJson(opts.resources, "--resources")
|
|
58
79
|
: undefined,
|
|
59
80
|
}));
|
|
60
81
|
outputJson(result);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../src/commands/ai/message.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAQxC,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,
|
|
1
|
+
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../src/commands/ai/message.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAQxC,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CAuLN"}
|
|
@@ -1,31 +1,43 @@
|
|
|
1
1
|
import { handleApiCall, outputJson, parseJson, pollMessageUntilFinished, } from "../runHandler.js";
|
|
2
2
|
export function registerMessageCommands(parent, getApi) {
|
|
3
|
-
const message = parent
|
|
3
|
+
const message = parent
|
|
4
|
+
.command("message")
|
|
5
|
+
.description("Manage chat messages (create, get, list, cancel, remove)");
|
|
4
6
|
message
|
|
5
7
|
.command("create")
|
|
6
8
|
.description("Create a message in a chat. Returns the user message and a pending assistant message.")
|
|
7
|
-
.requiredOption("--chat-uuid <uuid>", "Chat UUID")
|
|
8
|
-
.requiredOption("--parts <json>",
|
|
9
|
-
.option("--
|
|
10
|
-
.option("--resources <json>",
|
|
11
|
-
.option("--capabilities <json>",
|
|
12
|
-
.option("--mcp-clients <json>",
|
|
13
|
-
.option("--system-prompt <text>", "System prompt")
|
|
14
|
-
.option("--with-reasoning", "Enable reasoning")
|
|
15
|
-
.option("--temperature <n>", "Sampling temperature")
|
|
16
|
-
.option("--max-steps <n>", "Maximum number of steps")
|
|
17
|
-
.option("--integration-slug <slug>", "Integration slug")
|
|
18
|
-
.option("--connector-uuid <uuid>", "Connector UUID")
|
|
19
|
-
.option("--language-model-slug <slug>", "Language model slug")
|
|
20
|
-
.option("--wait-until-finished", "Poll the assistant message until
|
|
21
|
-
.option("--polling-interval <ms>", "Polling interval in milliseconds
|
|
9
|
+
.requiredOption("--chat-uuid <uuid>", "Chat UUID (string, required)")
|
|
10
|
+
.requiredOption("--parts <json>", "Message parts (JSON array of part objects, required)")
|
|
11
|
+
.option("--actions <json>", "Actions available to the assistant (JSON array of action objects)")
|
|
12
|
+
.option("--resources <json>", "Resources available to the assistant (JSON array of resource objects)")
|
|
13
|
+
.option("--capabilities <json>", "Capabilities to enable (JSON array of capability objects)")
|
|
14
|
+
.option("--mcp-clients <json>", "MCP clients to connect (JSON array of MCP client objects)")
|
|
15
|
+
.option("--system-prompt <text>", "System prompt override (string)")
|
|
16
|
+
.option("--with-reasoning", "Enable reasoning mode (boolean flag)")
|
|
17
|
+
.option("--temperature <n>", "Sampling temperature (float, 0.0-1.0)")
|
|
18
|
+
.option("--max-steps <n>", "Maximum number of agentic steps (integer)")
|
|
19
|
+
.option("--integration-slug <slug>", "Integration slug (string)")
|
|
20
|
+
.option("--connector-uuid <uuid>", "Connector UUID (string)")
|
|
21
|
+
.option("--language-model-slug <slug>", "Language model slug (string)")
|
|
22
|
+
.option("--wait-until-finished", "Poll the assistant message until finished before returning (boolean flag)")
|
|
23
|
+
.option("--polling-interval <ms>", "Polling interval in milliseconds, used with --wait-until-finished (integer, default: 5000)", "5000")
|
|
24
|
+
.addHelpText("after", `
|
|
25
|
+
Examples:
|
|
26
|
+
$ cargo-ai ai message create --chat-uuid 550e8400-... --parts '[{"type":"text","text":"Hello"}]'
|
|
27
|
+
$ cargo-ai ai message create --chat-uuid 550e8400-... --parts '[{"type":"text","text":"Find leads"}]' \\
|
|
28
|
+
--actions '[{"slug":"search","kind":"tool","config":{}}]' --wait-until-finished
|
|
29
|
+
|
|
30
|
+
Part object shape: { "type": "text", "text": string }
|
|
31
|
+
Action object shape: { "slug": string, "kind": "tool", "config": object }
|
|
32
|
+
Resource object shape: { "slug": string, "kind": "model", "modelUuid": string }
|
|
33
|
+
MCP client shape: { "name": string, "url": string }`)
|
|
22
34
|
.action(async (opts) => {
|
|
23
35
|
const api = getApi();
|
|
24
36
|
const result = await handleApiCall(() => api.ai.message.create({
|
|
25
37
|
chatUuid: opts.chatUuid,
|
|
26
38
|
parts: parseJson(opts.parts, "--parts"),
|
|
27
|
-
|
|
28
|
-
? parseJson(opts.
|
|
39
|
+
actions: opts.actions !== undefined
|
|
40
|
+
? parseJson(opts.actions, "--actions")
|
|
29
41
|
: undefined,
|
|
30
42
|
resources: opts.resources !== undefined
|
|
31
43
|
? parseJson(opts.resources, "--resources")
|
|
@@ -67,9 +79,9 @@ export function registerMessageCommands(parent, getApi) {
|
|
|
67
79
|
message
|
|
68
80
|
.command("list")
|
|
69
81
|
.description("List messages")
|
|
70
|
-
.requiredOption("--chat-uuid <uuid>", "Chat UUID")
|
|
71
|
-
.option("--limit <n>", "
|
|
72
|
-
.option("--offset <n>", "
|
|
82
|
+
.requiredOption("--chat-uuid <uuid>", "Chat UUID (string, required)")
|
|
83
|
+
.option("--limit <n>", "Max results to return (integer)")
|
|
84
|
+
.option("--offset <n>", "Number of results to skip (integer)")
|
|
73
85
|
.action(async (opts) => {
|
|
74
86
|
const api = getApi();
|
|
75
87
|
const result = await handleApiCall(() => api.ai.message.list({
|
|
@@ -79,6 +91,16 @@ export function registerMessageCommands(parent, getApi) {
|
|
|
79
91
|
}));
|
|
80
92
|
outputJson(result);
|
|
81
93
|
});
|
|
94
|
+
message
|
|
95
|
+
.command("cancel")
|
|
96
|
+
.description("Cancel one or more messages by UUID")
|
|
97
|
+
.requiredOption("--uuids <uuids>", "Message UUIDs to cancel (comma-separated strings, required)")
|
|
98
|
+
.action(async (opts) => {
|
|
99
|
+
const api = getApi();
|
|
100
|
+
const uuids = opts.uuids.split(",").map((u) => u.trim());
|
|
101
|
+
await handleApiCall(() => api.ai.message.cancel({ uuids }));
|
|
102
|
+
outputJson({ ok: true });
|
|
103
|
+
});
|
|
82
104
|
message
|
|
83
105
|
.command("remove <uuid>")
|
|
84
106
|
.description("Remove a message")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt.d.ts","sourceRoot":"","sources":["../../../src/commands/ai/prompt.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":"prompt.d.ts","sourceRoot":"","sources":["../../../src/commands/ai/prompt.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,CAmFN"}
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import { handleApiCall, outputJson, parseJson } from "../runHandler.js";
|
|
2
2
|
export function registerPromptCommands(parent, getApi) {
|
|
3
|
-
const prompt = parent
|
|
3
|
+
const prompt = parent
|
|
4
|
+
.command("prompt")
|
|
5
|
+
.description("Optimize and evaluate AI prompts");
|
|
4
6
|
prompt
|
|
5
7
|
.command("optimize")
|
|
6
|
-
.description("Optimize a prompt")
|
|
7
|
-
.requiredOption("--prompt <text>", "Prompt text to optimize")
|
|
8
|
+
.description("Optimize a prompt for better AI performance")
|
|
9
|
+
.requiredOption("--prompt <text>", "Prompt text to optimize (string, required)")
|
|
10
|
+
.addHelpText("after", `
|
|
11
|
+
Example:
|
|
12
|
+
$ cargo-ai ai prompt optimize --prompt "Find me all companies in San Francisco"`)
|
|
8
13
|
.action(async (opts) => {
|
|
9
14
|
const api = getApi();
|
|
10
15
|
const result = await handleApiCall(() => api.ai.prompt.optimize({ prompt: opts.prompt }));
|
|
@@ -12,16 +17,25 @@ export function registerPromptCommands(parent, getApi) {
|
|
|
12
17
|
});
|
|
13
18
|
prompt
|
|
14
19
|
.command("evaluate")
|
|
15
|
-
.description("Evaluate a prompt")
|
|
16
|
-
.requiredOption("--prompt <text>", "Prompt text to evaluate")
|
|
17
|
-
.option("--
|
|
18
|
-
.option("--resources <json>",
|
|
19
|
-
.option("--capabilities <json>",
|
|
20
|
+
.description("Evaluate a prompt's quality and get scoring feedback")
|
|
21
|
+
.requiredOption("--prompt <text>", "Prompt text to evaluate (string, required)")
|
|
22
|
+
.option("--actions <json>", "Available actions context (JSON array of action objects, default: [])")
|
|
23
|
+
.option("--resources <json>", "Available resources context (JSON array of resource objects, default: [])")
|
|
24
|
+
.option("--capabilities <json>", "Available capabilities context (JSON array of capability objects, default: [])")
|
|
25
|
+
.addHelpText("after", `
|
|
26
|
+
Examples:
|
|
27
|
+
$ cargo-ai ai prompt evaluate --prompt "Find me all companies in San Francisco"
|
|
28
|
+
$ cargo-ai ai prompt evaluate --prompt "Enrich this lead" \\
|
|
29
|
+
--actions '[{"slug":"my-action","kind":"tool","config":{}}]' \\
|
|
30
|
+
--resources '[{"slug":"my-resource","kind":"model","modelUuid":"..."}]' \\
|
|
31
|
+
--capabilities '[{"slug":"web-browsing"}]'`)
|
|
20
32
|
.action(async (opts) => {
|
|
21
33
|
const api = getApi();
|
|
22
34
|
const result = await handleApiCall(() => api.ai.prompt.evaluate({
|
|
23
35
|
prompt: opts.prompt,
|
|
24
|
-
|
|
36
|
+
actions: opts.actions !== undefined
|
|
37
|
+
? parseJson(opts.actions, "--actions")
|
|
38
|
+
: [],
|
|
25
39
|
resources: opts.resources !== undefined
|
|
26
40
|
? parseJson(opts.resources, "--resources")
|
|
27
41
|
: [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"release.d.ts","sourceRoot":"","sources":["../../../src/commands/ai/release.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,
|
|
1
|
+
{"version":3,"file":"release.d.ts","sourceRoot":"","sources":["../../../src/commands/ai/release.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CA0QN"}
|
|
@@ -2,15 +2,15 @@ import { handleApiCall, outputJson, parseJson } from "../runHandler.js";
|
|
|
2
2
|
export function registerReleaseCommands(parent, getApi) {
|
|
3
3
|
const release = parent
|
|
4
4
|
.command("release")
|
|
5
|
-
.description("AI
|
|
5
|
+
.description("Manage AI agent releases (list, get, draft, deploy)");
|
|
6
6
|
release
|
|
7
7
|
.command("list")
|
|
8
8
|
.description("List AI releases")
|
|
9
|
-
.option("--agent-uuid <uuid>", "
|
|
10
|
-
.option("--user-uuid <uuid>", "
|
|
11
|
-
.option("--statuses <statuses>", "
|
|
12
|
-
.option("--limit <n>", "
|
|
13
|
-
.option("--offset <n>", "
|
|
9
|
+
.option("--agent-uuid <uuid>", "Filter by agent UUID (string)")
|
|
10
|
+
.option("--user-uuid <uuid>", "Filter by user UUID (string)")
|
|
11
|
+
.option("--statuses <statuses>", "Filter by statuses (comma-separated: draft,deployed,archived)")
|
|
12
|
+
.option("--limit <n>", "Max results to return (integer)")
|
|
13
|
+
.option("--offset <n>", "Number of results to skip (integer)")
|
|
14
14
|
.action(async (opts) => {
|
|
15
15
|
const api = getApi();
|
|
16
16
|
const result = await handleApiCall(() => api.ai.release.list({
|
|
@@ -43,22 +43,22 @@ export function registerReleaseCommands(parent, getApi) {
|
|
|
43
43
|
});
|
|
44
44
|
release
|
|
45
45
|
.command("update-draft")
|
|
46
|
-
.description("Update draft AI release")
|
|
47
|
-
.requiredOption("--agent-uuid <uuid>", "Agent UUID")
|
|
48
|
-
.option("--parent-uuid <uuid>", "Parent release UUID")
|
|
49
|
-
.option("--system-prompt <text>", "System prompt")
|
|
50
|
-
.option("--with-reasoning", "Enable reasoning")
|
|
51
|
-
.option("--temperature <n>", "
|
|
52
|
-
.option("--max-steps <n>", "
|
|
53
|
-
.option("--integration-slug <slug>", "
|
|
54
|
-
.option("--connector-uuid <uuid>", "Connector UUID")
|
|
55
|
-
.option("--language-model-slug <slug>", "Language model slug")
|
|
56
|
-
.option("--
|
|
57
|
-
.option("--mcp-clients <json>",
|
|
58
|
-
.option("--resources <json>",
|
|
59
|
-
.option("--capabilities <json>",
|
|
60
|
-
.option("--suggested-actions <json>",
|
|
61
|
-
.option("--options <json>", "
|
|
46
|
+
.description("Update draft AI release configuration")
|
|
47
|
+
.requiredOption("--agent-uuid <uuid>", "Agent UUID (string, required)")
|
|
48
|
+
.option("--parent-uuid <uuid>", "Parent release UUID to inherit from (string)")
|
|
49
|
+
.option("--system-prompt <text>", "System prompt (string)")
|
|
50
|
+
.option("--with-reasoning", "Enable reasoning mode (boolean flag)")
|
|
51
|
+
.option("--temperature <n>", "Sampling temperature (float, 0.0-1.0)")
|
|
52
|
+
.option("--max-steps <n>", "Maximum agentic steps (integer)")
|
|
53
|
+
.option("--integration-slug <slug>", "LLM integration slug (string)")
|
|
54
|
+
.option("--connector-uuid <uuid>", "Connector UUID (string)")
|
|
55
|
+
.option("--language-model-slug <slug>", "Language model slug (string)")
|
|
56
|
+
.option("--actions <json>", "Actions configuration (JSON array of action objects)")
|
|
57
|
+
.option("--mcp-clients <json>", "MCP clients configuration (JSON array of MCP client objects)")
|
|
58
|
+
.option("--resources <json>", "Resources configuration (JSON array of resource objects)")
|
|
59
|
+
.option("--capabilities <json>", "Capabilities to enable (JSON array of capability objects)")
|
|
60
|
+
.option("--suggested-actions <json>", "Suggested actions for the chat UI (JSON array of action objects)")
|
|
61
|
+
.option("--options <json>", "Additional options (JSON object)")
|
|
62
62
|
.action(async (opts) => {
|
|
63
63
|
const api = getApi();
|
|
64
64
|
const result = await handleApiCall(() => api.ai.release.updateDraft({
|
|
@@ -75,8 +75,8 @@ export function registerReleaseCommands(parent, getApi) {
|
|
|
75
75
|
integrationSlug: opts.integrationSlug,
|
|
76
76
|
connectorUuid: opts.connectorUuid,
|
|
77
77
|
languageModelSlug: opts.languageModelSlug,
|
|
78
|
-
|
|
79
|
-
? parseJson(opts.
|
|
78
|
+
actions: opts.actions !== undefined
|
|
79
|
+
? parseJson(opts.actions, "--actions")
|
|
80
80
|
: undefined,
|
|
81
81
|
mcpClients: opts.mcpClients !== undefined
|
|
82
82
|
? parseJson(opts.mcpClients, "--mcp-clients")
|
|
@@ -98,23 +98,23 @@ export function registerReleaseCommands(parent, getApi) {
|
|
|
98
98
|
});
|
|
99
99
|
release
|
|
100
100
|
.command("deploy-draft")
|
|
101
|
-
.description("Deploy draft
|
|
102
|
-
.requiredOption("--agent-uuid <uuid>", "Agent UUID")
|
|
103
|
-
.requiredOption("--integration-slug <slug>", "
|
|
104
|
-
.requiredOption("--language-model-slug <slug>", "Language model slug")
|
|
105
|
-
.option("--version <version>", "
|
|
106
|
-
.requiredOption("--
|
|
107
|
-
.requiredOption("--mcp-clients <json>",
|
|
108
|
-
.requiredOption("--resources <json>",
|
|
109
|
-
.requiredOption("--capabilities <json>",
|
|
110
|
-
.requiredOption("--suggested-actions <json>",
|
|
111
|
-
.option("--system-prompt <text>", "System prompt")
|
|
112
|
-
.option("--with-reasoning", "Enable reasoning")
|
|
113
|
-
.option("--temperature <n>", "
|
|
114
|
-
.option("--max-steps <n>", "
|
|
115
|
-
.option("--connector-uuid <uuid>", "Connector UUID")
|
|
116
|
-
.option("--description <text>", "Release description")
|
|
117
|
-
.option("--options <json>", "
|
|
101
|
+
.description("Deploy the draft release to production")
|
|
102
|
+
.requiredOption("--agent-uuid <uuid>", "Agent UUID (string, required)")
|
|
103
|
+
.requiredOption("--integration-slug <slug>", "LLM integration slug (string, required)")
|
|
104
|
+
.requiredOption("--language-model-slug <slug>", "Language model slug (string, required)")
|
|
105
|
+
.option("--version <version>", "Semver release version, e.g. 1.0.0 (string, auto-incremented if omitted)")
|
|
106
|
+
.requiredOption("--actions <json>", "Actions configuration (JSON array of action objects, required)")
|
|
107
|
+
.requiredOption("--mcp-clients <json>", "MCP clients configuration (JSON array, required)")
|
|
108
|
+
.requiredOption("--resources <json>", "Resources configuration (JSON array, required)")
|
|
109
|
+
.requiredOption("--capabilities <json>", "Capabilities to enable (JSON array, required)")
|
|
110
|
+
.requiredOption("--suggested-actions <json>", "Suggested actions for chat UI (JSON array, required)")
|
|
111
|
+
.option("--system-prompt <text>", "System prompt (string)")
|
|
112
|
+
.option("--with-reasoning", "Enable reasoning mode (boolean flag)")
|
|
113
|
+
.option("--temperature <n>", "Sampling temperature (float, 0.0-1.0)")
|
|
114
|
+
.option("--max-steps <n>", "Maximum agentic steps (integer)")
|
|
115
|
+
.option("--connector-uuid <uuid>", "Connector UUID (string)")
|
|
116
|
+
.option("--description <text>", "Release description (string)")
|
|
117
|
+
.option("--options <json>", "Additional options (JSON object)")
|
|
118
118
|
.action(async (opts) => {
|
|
119
119
|
const api = getApi();
|
|
120
120
|
const result = await handleApiCall(() => api.ai.release.deployDraft({
|
|
@@ -122,7 +122,7 @@ export function registerReleaseCommands(parent, getApi) {
|
|
|
122
122
|
integrationSlug: opts.integrationSlug,
|
|
123
123
|
languageModelSlug: opts.languageModelSlug,
|
|
124
124
|
version: opts.version,
|
|
125
|
-
|
|
125
|
+
actions: parseJson(opts.actions, "--actions"),
|
|
126
126
|
mcpClients: parseJson(opts.mcpClients, "--mcp-clients"),
|
|
127
127
|
resources: parseJson(opts.resources, "--resources"),
|
|
128
128
|
capabilities: parseJson(opts.capabilities, "--capabilities"),
|
|
@@ -10,7 +10,7 @@ export function registerSuggestedActionCommands(parent, getApi) {
|
|
|
10
10
|
.option("--system-prompt <text>", "System prompt")
|
|
11
11
|
.option("--context-prompt <text>", "Context prompt")
|
|
12
12
|
.option("--agent-uuid <uuid>", "Agent UUID")
|
|
13
|
-
.option("--
|
|
13
|
+
.option("--actions <json>", 'Actions (JSON array, e.g. [{"slug":"my-action","kind":"tool","config":{}}])')
|
|
14
14
|
.option("--resources <json>", 'Resources (JSON array, e.g. [{"slug":"my-resource","kind":"model","modelUuid":"..."}])')
|
|
15
15
|
.option("--capabilities <json>", 'Capabilities (JSON array, e.g. [{"slug":"web-browsing"}])')
|
|
16
16
|
.option("--cache-key <key>", "Cache key")
|
|
@@ -21,8 +21,8 @@ export function registerSuggestedActionCommands(parent, getApi) {
|
|
|
21
21
|
systemPrompt: opts.systemPrompt,
|
|
22
22
|
contextPrompt: opts.contextPrompt,
|
|
23
23
|
agentUuid: opts.agentUuid,
|
|
24
|
-
|
|
25
|
-
? parseJson(opts.
|
|
24
|
+
actions: opts.actions !== undefined
|
|
25
|
+
? parseJson(opts.actions, "--actions")
|
|
26
26
|
: undefined,
|
|
27
27
|
resources: opts.resources !== undefined
|
|
28
28
|
? parseJson(opts.resources, "--resources")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/commands/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAWrC,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/commands/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAWrC,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CAuIN"}
|
package/build/commands/auth.js
CHANGED
|
@@ -5,9 +5,17 @@ export function registerAuthCommands(program, getApi) {
|
|
|
5
5
|
program
|
|
6
6
|
.command("login")
|
|
7
7
|
.description("Save API credentials for future use")
|
|
8
|
-
.requiredOption("--token <token>", "Cargo API token")
|
|
9
|
-
.option("--workspace-uuid <uuid>", "Default workspace UUID")
|
|
10
|
-
.option("--base-url <url>", `API base URL (default: ${DEFAULT_BASE_URL})`)
|
|
8
|
+
.requiredOption("--token <token>", "Cargo API token (string)")
|
|
9
|
+
.option("--workspace-uuid <uuid>", "Default workspace UUID (string, UUID v4)")
|
|
10
|
+
.option("--base-url <url>", `API base URL (string, default: ${DEFAULT_BASE_URL})`)
|
|
11
|
+
.addHelpText("after", `
|
|
12
|
+
Examples:
|
|
13
|
+
$ cargo-ai login --token sk_live_abc123
|
|
14
|
+
$ cargo-ai login --token sk_live_abc123 --workspace-uuid 550e8400-e29b-41d4-a716-446655440000
|
|
15
|
+
$ cargo-ai login --token sk_live_abc123 --base-url https://api.custom.io
|
|
16
|
+
|
|
17
|
+
Credentials are stored in ~/.config/cargo-ai/credentials.json.
|
|
18
|
+
Environment variables (CARGO_API_TOKEN, CARGO_WORKSPACE_UUID, CARGO_BASE_URL) take precedence over saved credentials.`)
|
|
11
19
|
.action((opts) => {
|
|
12
20
|
saveCredentials({
|
|
13
21
|
accessToken: opts.token,
|
|
@@ -35,6 +43,9 @@ export function registerAuthCommands(program, getApi) {
|
|
|
35
43
|
program
|
|
36
44
|
.command("whoami")
|
|
37
45
|
.description("Show current user and workspace")
|
|
46
|
+
.addHelpText("after", `
|
|
47
|
+
Returns JSON with: user (uuid, email, name), workspace (uuid, name),
|
|
48
|
+
authentication source ("environment" or "credentials-file"), and base URL.`)
|
|
38
49
|
.action(async () => {
|
|
39
50
|
const envToken = process.env["CARGO_API_TOKEN"];
|
|
40
51
|
const envBaseUrl = process.env["CARGO_BASE_URL"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connector.d.ts","sourceRoot":"","sources":["../../../src/commands/connection/connector.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":"connector.d.ts","sourceRoot":"","sources":["../../../src/commands/connection/connector.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,CAoPN"}
|