@cargo-ai/cli 1.0.1
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 +114 -0
- package/build/api.d.ts +4 -0
- package/build/api.d.ts.map +1 -0
- package/build/api.js +10 -0
- package/build/commands/ai/agent.d.ts +4 -0
- package/build/commands/ai/agent.d.ts.map +1 -0
- package/build/commands/ai/agent.js +83 -0
- package/build/commands/ai/chat.d.ts +4 -0
- package/build/commands/ai/chat.d.ts.map +1 -0
- package/build/commands/ai/chat.js +71 -0
- package/build/commands/ai/document.d.ts +4 -0
- package/build/commands/ai/document.d.ts.map +1 -0
- package/build/commands/ai/document.js +59 -0
- package/build/commands/ai/file.d.ts +4 -0
- package/build/commands/ai/file.d.ts.map +1 -0
- package/build/commands/ai/file.js +74 -0
- package/build/commands/ai/index.d.ts +4 -0
- package/build/commands/ai/index.d.ts.map +1 -0
- package/build/commands/ai/index.js +33 -0
- package/build/commands/ai/mcpClient.d.ts +4 -0
- package/build/commands/ai/mcpClient.d.ts.map +1 -0
- package/build/commands/ai/mcpClient.js +31 -0
- package/build/commands/ai/mcpServer.d.ts +4 -0
- package/build/commands/ai/mcpServer.d.ts.map +1 -0
- package/build/commands/ai/mcpServer.js +62 -0
- package/build/commands/ai/memory.d.ts +4 -0
- package/build/commands/ai/memory.d.ts.map +1 -0
- package/build/commands/ai/memory.js +50 -0
- package/build/commands/ai/message.d.ts +4 -0
- package/build/commands/ai/message.d.ts.map +1 -0
- package/build/commands/ai/message.js +86 -0
- package/build/commands/ai/prompt.d.ts +4 -0
- package/build/commands/ai/prompt.d.ts.map +1 -0
- package/build/commands/ai/prompt.js +34 -0
- package/build/commands/ai/release.d.ts +4 -0
- package/build/commands/ai/release.d.ts.map +1 -0
- package/build/commands/ai/release.js +150 -0
- package/build/commands/ai/skill.d.ts +4 -0
- package/build/commands/ai/skill.d.ts.map +1 -0
- package/build/commands/ai/skill.js +96 -0
- package/build/commands/ai/suggestedAction.d.ts +4 -0
- package/build/commands/ai/suggestedAction.d.ts.map +1 -0
- package/build/commands/ai/suggestedAction.js +37 -0
- package/build/commands/ai/template.d.ts +4 -0
- package/build/commands/ai/template.d.ts.map +1 -0
- package/build/commands/ai/template.js +14 -0
- package/build/commands/ai/vote.d.ts +4 -0
- package/build/commands/ai/vote.d.ts.map +1 -0
- package/build/commands/ai/vote.js +28 -0
- package/build/commands/auth.d.ts +3 -0
- package/build/commands/auth.d.ts.map +1 -0
- package/build/commands/auth.js +73 -0
- package/build/commands/billing/index.d.ts +4 -0
- package/build/commands/billing/index.d.ts.map +1 -0
- package/build/commands/billing/index.js +9 -0
- package/build/commands/billing/subscription.d.ts +4 -0
- package/build/commands/billing/subscription.d.ts.map +1 -0
- package/build/commands/billing/subscription.js +119 -0
- package/build/commands/billing/usage.d.ts +4 -0
- package/build/commands/billing/usage.d.ts.map +1 -0
- package/build/commands/billing/usage.js +33 -0
- package/build/commands/connection/connector.d.ts +4 -0
- package/build/commands/connection/connector.d.ts.map +1 -0
- package/build/commands/connection/connector.js +129 -0
- package/build/commands/connection/index.d.ts +4 -0
- package/build/commands/connection/index.d.ts.map +1 -0
- package/build/commands/connection/index.js +11 -0
- package/build/commands/connection/integration.d.ts +4 -0
- package/build/commands/connection/integration.d.ts.map +1 -0
- package/build/commands/connection/integration.js +35 -0
- package/build/commands/connection/nativeIntegration.d.ts +4 -0
- package/build/commands/connection/nativeIntegration.d.ts.map +1 -0
- package/build/commands/connection/nativeIntegration.js +14 -0
- package/build/commands/expression/expressionEval.d.ts +4 -0
- package/build/commands/expression/expressionEval.d.ts.map +1 -0
- package/build/commands/expression/expressionEval.js +32 -0
- package/build/commands/expression/favoriteRecipe.d.ts +4 -0
- package/build/commands/expression/favoriteRecipe.d.ts.map +1 -0
- package/build/commands/expression/favoriteRecipe.js +24 -0
- package/build/commands/expression/index.d.ts +4 -0
- package/build/commands/expression/index.d.ts.map +1 -0
- package/build/commands/expression/index.js +11 -0
- package/build/commands/expression/recipe.d.ts +4 -0
- package/build/commands/expression/recipe.d.ts.map +1 -0
- package/build/commands/expression/recipe.js +98 -0
- package/build/commands/init.d.ts +4 -0
- package/build/commands/init.d.ts.map +1 -0
- package/build/commands/init.js +11 -0
- package/build/commands/orchestration/batch.d.ts +4 -0
- package/build/commands/orchestration/batch.d.ts.map +1 -0
- package/build/commands/orchestration/batch.js +106 -0
- package/build/commands/orchestration/draftRelease.d.ts +4 -0
- package/build/commands/orchestration/draftRelease.d.ts.map +1 -0
- package/build/commands/orchestration/draftRelease.js +73 -0
- package/build/commands/orchestration/index.d.ts +4 -0
- package/build/commands/orchestration/index.d.ts.map +1 -0
- package/build/commands/orchestration/index.js +25 -0
- package/build/commands/orchestration/node.d.ts +4 -0
- package/build/commands/orchestration/node.d.ts.map +1 -0
- package/build/commands/orchestration/node.js +44 -0
- package/build/commands/orchestration/play.d.ts +4 -0
- package/build/commands/orchestration/play.d.ts.map +1 -0
- package/build/commands/orchestration/play.js +63 -0
- package/build/commands/orchestration/record.d.ts +4 -0
- package/build/commands/orchestration/record.d.ts.map +1 -0
- package/build/commands/orchestration/record.js +194 -0
- package/build/commands/orchestration/release.d.ts +4 -0
- package/build/commands/orchestration/release.d.ts.map +1 -0
- package/build/commands/orchestration/release.js +27 -0
- package/build/commands/orchestration/run.d.ts +4 -0
- package/build/commands/orchestration/run.d.ts.map +1 -0
- package/build/commands/orchestration/run.js +196 -0
- package/build/commands/orchestration/template.d.ts +4 -0
- package/build/commands/orchestration/template.d.ts.map +1 -0
- package/build/commands/orchestration/template.js +22 -0
- package/build/commands/orchestration/tool.d.ts +4 -0
- package/build/commands/orchestration/tool.d.ts.map +1 -0
- package/build/commands/orchestration/tool.js +72 -0
- package/build/commands/orchestration/workflow.d.ts +4 -0
- package/build/commands/orchestration/workflow.d.ts.map +1 -0
- package/build/commands/orchestration/workflow.js +14 -0
- package/build/commands/revenueOrganization/allocation.d.ts +4 -0
- package/build/commands/revenueOrganization/allocation.d.ts.map +1 -0
- package/build/commands/revenueOrganization/allocation.js +45 -0
- package/build/commands/revenueOrganization/capacity.d.ts +4 -0
- package/build/commands/revenueOrganization/capacity.d.ts.map +1 -0
- package/build/commands/revenueOrganization/capacity.js +94 -0
- package/build/commands/revenueOrganization/index.d.ts +4 -0
- package/build/commands/revenueOrganization/index.d.ts.map +1 -0
- package/build/commands/revenueOrganization/index.js +13 -0
- package/build/commands/revenueOrganization/member.d.ts +4 -0
- package/build/commands/revenueOrganization/member.d.ts.map +1 -0
- package/build/commands/revenueOrganization/member.js +62 -0
- package/build/commands/revenueOrganization/territory.d.ts +4 -0
- package/build/commands/revenueOrganization/territory.d.ts.map +1 -0
- package/build/commands/revenueOrganization/territory.js +72 -0
- package/build/commands/runHandler.d.ts +4 -0
- package/build/commands/runHandler.d.ts.map +1 -0
- package/build/commands/runHandler.js +33 -0
- package/build/commands/segmentation/change.d.ts +4 -0
- package/build/commands/segmentation/change.d.ts.map +1 -0
- package/build/commands/segmentation/change.js +61 -0
- package/build/commands/segmentation/index.d.ts +4 -0
- package/build/commands/segmentation/index.d.ts.map +1 -0
- package/build/commands/segmentation/index.js +11 -0
- package/build/commands/segmentation/record.d.ts +4 -0
- package/build/commands/segmentation/record.d.ts.map +1 -0
- package/build/commands/segmentation/record.js +21 -0
- package/build/commands/segmentation/segment.d.ts +4 -0
- package/build/commands/segmentation/segment.d.ts.map +1 -0
- package/build/commands/segmentation/segment.js +130 -0
- package/build/commands/storage/column.d.ts +4 -0
- package/build/commands/storage/column.d.ts.map +1 -0
- package/build/commands/storage/column.js +84 -0
- package/build/commands/storage/dataset.d.ts +4 -0
- package/build/commands/storage/dataset.d.ts.map +1 -0
- package/build/commands/storage/dataset.js +20 -0
- package/build/commands/storage/index.d.ts +4 -0
- package/build/commands/storage/index.d.ts.map +1 -0
- package/build/commands/storage/index.js +17 -0
- package/build/commands/storage/model.d.ts +4 -0
- package/build/commands/storage/model.d.ts.map +1 -0
- package/build/commands/storage/model.js +141 -0
- package/build/commands/storage/record.d.ts +4 -0
- package/build/commands/storage/record.d.ts.map +1 -0
- package/build/commands/storage/record.js +15 -0
- package/build/commands/storage/relationship.d.ts +4 -0
- package/build/commands/storage/relationship.d.ts.map +1 -0
- package/build/commands/storage/relationship.js +27 -0
- package/build/commands/storage/run.d.ts +4 -0
- package/build/commands/storage/run.d.ts.map +1 -0
- package/build/commands/storage/run.js +42 -0
- package/build/commands/systemOfRecordIntegration/client.d.ts +4 -0
- package/build/commands/systemOfRecordIntegration/client.d.ts.map +1 -0
- package/build/commands/systemOfRecordIntegration/client.js +46 -0
- package/build/commands/systemOfRecordIntegration/index.d.ts +4 -0
- package/build/commands/systemOfRecordIntegration/index.d.ts.map +1 -0
- package/build/commands/systemOfRecordIntegration/index.js +11 -0
- package/build/commands/systemOfRecordIntegration/log.d.ts +4 -0
- package/build/commands/systemOfRecordIntegration/log.d.ts.map +1 -0
- package/build/commands/systemOfRecordIntegration/log.js +36 -0
- package/build/commands/systemOfRecordIntegration/systemOfRecord.d.ts +4 -0
- package/build/commands/systemOfRecordIntegration/systemOfRecord.d.ts.map +1 -0
- package/build/commands/systemOfRecordIntegration/systemOfRecord.js +72 -0
- package/build/commands/userManagement/index.d.ts +4 -0
- package/build/commands/userManagement/index.d.ts.map +1 -0
- package/build/commands/userManagement/index.js +32 -0
- package/build/commands/workspace/file.d.ts +4 -0
- package/build/commands/workspace/file.d.ts.map +1 -0
- package/build/commands/workspace/file.js +44 -0
- package/build/commands/workspace/folder.d.ts +4 -0
- package/build/commands/workspace/folder.d.ts.map +1 -0
- package/build/commands/workspace/folder.js +64 -0
- package/build/commands/workspace/index.d.ts +4 -0
- package/build/commands/workspace/index.d.ts.map +1 -0
- package/build/commands/workspace/index.js +17 -0
- package/build/commands/workspace/role.d.ts +4 -0
- package/build/commands/workspace/role.d.ts.map +1 -0
- package/build/commands/workspace/role.js +12 -0
- package/build/commands/workspace/token.d.ts +4 -0
- package/build/commands/workspace/token.d.ts.map +1 -0
- package/build/commands/workspace/token.js +31 -0
- package/build/commands/workspace/user.d.ts +4 -0
- package/build/commands/workspace/user.d.ts.map +1 -0
- package/build/commands/workspace/user.js +105 -0
- package/build/commands/workspace/workspaces.d.ts +4 -0
- package/build/commands/workspace/workspaces.d.ts.map +1 -0
- package/build/commands/workspace/workspaces.js +74 -0
- package/build/config.d.ts +7 -0
- package/build/config.d.ts.map +1 -0
- package/build/config.js +45 -0
- package/build/credentials.d.ts +10 -0
- package/build/credentials.d.ts.map +1 -0
- package/build/credentials.js +31 -0
- package/build/index.d.ts +2 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +37 -0
- package/package.json +44 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { handleApiCall, outputJson, parseJson } from "../runHandler.js";
|
|
2
|
+
export function registerUserManagementCommands(parent, getApi) {
|
|
3
|
+
const userMgmt = parent
|
|
4
|
+
.command("user-management")
|
|
5
|
+
.description("Current user (no workspace context)");
|
|
6
|
+
const user = userMgmt.command("user").description("Current user");
|
|
7
|
+
user
|
|
8
|
+
.command("get-current")
|
|
9
|
+
.description("Get current user")
|
|
10
|
+
.action(async () => {
|
|
11
|
+
const api = getApi();
|
|
12
|
+
const result = await handleApiCall(() => api.userManagement.user.getCurrent());
|
|
13
|
+
outputJson(result);
|
|
14
|
+
});
|
|
15
|
+
user
|
|
16
|
+
.command("update")
|
|
17
|
+
.description("Update current user")
|
|
18
|
+
.option("--first-name <name>", "First name")
|
|
19
|
+
.option("--last-name <name>", "Last name")
|
|
20
|
+
.option("--web-extension-data <json>", 'Web extension data (JSON object, e.g. {"key":"value"})')
|
|
21
|
+
.action(async (opts) => {
|
|
22
|
+
const api = getApi();
|
|
23
|
+
const result = await handleApiCall(() => api.userManagement.user.update({
|
|
24
|
+
firstName: opts.firstName,
|
|
25
|
+
lastName: opts.lastName,
|
|
26
|
+
webExtensionData: opts.webExtensionData !== undefined
|
|
27
|
+
? parseJson(opts.webExtensionData, "--web-extension-data")
|
|
28
|
+
: undefined,
|
|
29
|
+
}));
|
|
30
|
+
outputJson(result);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../../src/commands/workspace/file.ts"],"names":[],"mappings":"AAGA,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,CA+C7E"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { readFile } from "node:fs/promises";
|
|
2
|
+
import { basename } from "node:path";
|
|
3
|
+
import { handleApiCall, outputJson } from "../runHandler.js";
|
|
4
|
+
export function registerFileCommands(parent, getApi) {
|
|
5
|
+
const file = parent.command("file").description("Workspace file operations");
|
|
6
|
+
file
|
|
7
|
+
.command("upload")
|
|
8
|
+
.description("Upload a file")
|
|
9
|
+
.requiredOption("--file-path <path>", "Path to the file to upload")
|
|
10
|
+
.action(async (opts) => {
|
|
11
|
+
const buffer = await readFile(opts.filePath);
|
|
12
|
+
const name = basename(opts.filePath);
|
|
13
|
+
const fileObj = new File([buffer], name);
|
|
14
|
+
const api = getApi();
|
|
15
|
+
await handleApiCall(() => new Promise((resolve, reject) => {
|
|
16
|
+
api.workspaceManagement.file.upload({
|
|
17
|
+
file: fileObj,
|
|
18
|
+
onProgress: (pct) => {
|
|
19
|
+
process.stderr.write(`\rUpload progress: ${pct}%`);
|
|
20
|
+
},
|
|
21
|
+
onComplete: (result) => {
|
|
22
|
+
process.stderr.write("\n");
|
|
23
|
+
outputJson(result);
|
|
24
|
+
resolve();
|
|
25
|
+
},
|
|
26
|
+
onError: () => {
|
|
27
|
+
process.stderr.write("\n");
|
|
28
|
+
reject(new Error("Upload failed"));
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
}));
|
|
32
|
+
});
|
|
33
|
+
file
|
|
34
|
+
.command("list-columns")
|
|
35
|
+
.description("List columns for a file")
|
|
36
|
+
.requiredOption("--s3-filename <name>", "S3 filename")
|
|
37
|
+
.action(async (opts) => {
|
|
38
|
+
const api = getApi();
|
|
39
|
+
const result = await handleApiCall(() => api.workspaceManagement.file.listColumns({
|
|
40
|
+
s3Filename: opts.s3Filename,
|
|
41
|
+
}));
|
|
42
|
+
outputJson(result);
|
|
43
|
+
});
|
|
44
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"folder.d.ts","sourceRoot":"","sources":["../../../src/commands/workspace/folder.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,CA6FN"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { handleApiCall, outputJson } from "../runHandler.js";
|
|
2
|
+
export function registerFolderCommands(parent, getApi) {
|
|
3
|
+
const folder = parent.command("folder").description("Folder operations");
|
|
4
|
+
folder
|
|
5
|
+
.command("list")
|
|
6
|
+
.description("List all folders")
|
|
7
|
+
.action(async () => {
|
|
8
|
+
const api = getApi();
|
|
9
|
+
const result = await handleApiCall(() => api.workspaceManagement.folder.all());
|
|
10
|
+
outputJson(result);
|
|
11
|
+
});
|
|
12
|
+
folder
|
|
13
|
+
.command("get <uuid>")
|
|
14
|
+
.description("Get a folder by UUID")
|
|
15
|
+
.action(async (uuid) => {
|
|
16
|
+
const api = getApi();
|
|
17
|
+
const result = await handleApiCall(() => api.workspaceManagement.folder.get(uuid));
|
|
18
|
+
outputJson(result);
|
|
19
|
+
});
|
|
20
|
+
folder
|
|
21
|
+
.command("create")
|
|
22
|
+
.description("Create a folder")
|
|
23
|
+
.requiredOption("--name <name>", "Folder name")
|
|
24
|
+
.requiredOption("--emoji-slug <slug>", "Emoji slug")
|
|
25
|
+
.requiredOption("--kind <kind>", "Folder kind")
|
|
26
|
+
.option("--parent-uuid <uuid>", "Parent folder UUID")
|
|
27
|
+
.action(async (opts) => {
|
|
28
|
+
const api = getApi();
|
|
29
|
+
const result = await handleApiCall(() => api.workspaceManagement.folder.create({
|
|
30
|
+
name: opts.name,
|
|
31
|
+
emojiSlug: opts.emojiSlug,
|
|
32
|
+
kind: opts.kind,
|
|
33
|
+
parentUuid: opts.parentUuid,
|
|
34
|
+
}));
|
|
35
|
+
outputJson(result);
|
|
36
|
+
});
|
|
37
|
+
folder
|
|
38
|
+
.command("update")
|
|
39
|
+
.description("Update a folder")
|
|
40
|
+
.requiredOption("--uuid <uuid>", "Folder UUID")
|
|
41
|
+
.option("--name <name>", "Folder name")
|
|
42
|
+
.option("--emoji-slug <slug>", "Emoji slug")
|
|
43
|
+
.option("--order <n>", "Order index")
|
|
44
|
+
.option("--parent-uuid <uuid>", "Parent folder UUID")
|
|
45
|
+
.action(async (opts) => {
|
|
46
|
+
const api = getApi();
|
|
47
|
+
const result = await handleApiCall(() => api.workspaceManagement.folder.update({
|
|
48
|
+
uuid: opts.uuid,
|
|
49
|
+
name: opts.name,
|
|
50
|
+
emojiSlug: opts.emojiSlug,
|
|
51
|
+
order: opts.order !== undefined ? parseInt(opts.order, 10) : undefined,
|
|
52
|
+
parentUuid: opts.parentUuid,
|
|
53
|
+
}));
|
|
54
|
+
outputJson(result);
|
|
55
|
+
});
|
|
56
|
+
folder
|
|
57
|
+
.command("remove <uuid>")
|
|
58
|
+
.description("Remove a folder")
|
|
59
|
+
.action(async (uuid) => {
|
|
60
|
+
const api = getApi();
|
|
61
|
+
await handleApiCall(() => api.workspaceManagement.folder.remove(uuid));
|
|
62
|
+
outputJson({ ok: true });
|
|
63
|
+
});
|
|
64
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/workspace/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAQxC,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CAWN"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { registerFileCommands } from "./file.js";
|
|
2
|
+
import { registerFolderCommands } from "./folder.js";
|
|
3
|
+
import { registerRoleCommands } from "./role.js";
|
|
4
|
+
import { registerTokenCommands } from "./token.js";
|
|
5
|
+
import { registerUserCommands } from "./user.js";
|
|
6
|
+
import { registerWorkspacesCommands } from "./workspaces.js";
|
|
7
|
+
export function registerWorkspaceCommands(parent, getApi) {
|
|
8
|
+
const workspace = parent
|
|
9
|
+
.command("workspace")
|
|
10
|
+
.description("Workspaces, users, tokens, roles, folders");
|
|
11
|
+
registerWorkspacesCommands(workspace, getApi);
|
|
12
|
+
registerUserCommands(workspace, getApi);
|
|
13
|
+
registerTokenCommands(workspace, getApi);
|
|
14
|
+
registerRoleCommands(workspace, getApi);
|
|
15
|
+
registerFolderCommands(workspace, getApi);
|
|
16
|
+
registerFileCommands(workspace, getApi);
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"role.d.ts","sourceRoot":"","sources":["../../../src/commands/workspace/role.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,CAa7E"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { handleApiCall, outputJson } from "../runHandler.js";
|
|
2
|
+
export function registerRoleCommands(parent, getApi) {
|
|
3
|
+
const role = parent.command("role").description("Role operations");
|
|
4
|
+
role
|
|
5
|
+
.command("list")
|
|
6
|
+
.description("List all roles")
|
|
7
|
+
.action(async () => {
|
|
8
|
+
const api = getApi();
|
|
9
|
+
const result = await handleApiCall(() => api.workspaceManagement.role.all());
|
|
10
|
+
outputJson(result);
|
|
11
|
+
});
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"token.d.ts","sourceRoot":"","sources":["../../../src/commands/workspace/token.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,CAoCN"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { handleApiCall, outputJson } from "../runHandler.js";
|
|
2
|
+
export function registerTokenCommands(parent, getApi) {
|
|
3
|
+
const token = parent.command("token").description("API token operations");
|
|
4
|
+
token
|
|
5
|
+
.command("list")
|
|
6
|
+
.description("List all tokens")
|
|
7
|
+
.action(async () => {
|
|
8
|
+
const api = getApi();
|
|
9
|
+
const result = await handleApiCall(() => api.workspaceManagement.token.all());
|
|
10
|
+
outputJson(result);
|
|
11
|
+
});
|
|
12
|
+
token
|
|
13
|
+
.command("create")
|
|
14
|
+
.description("Create a token")
|
|
15
|
+
.option("--from-user", "Create token from current user")
|
|
16
|
+
.action(async (opts) => {
|
|
17
|
+
const api = getApi();
|
|
18
|
+
const result = await handleApiCall(() => api.workspaceManagement.token.create({
|
|
19
|
+
fromUser: opts.fromUser !== undefined ? opts.fromUser : true,
|
|
20
|
+
}));
|
|
21
|
+
outputJson(result);
|
|
22
|
+
});
|
|
23
|
+
token
|
|
24
|
+
.command("remove <uuid>")
|
|
25
|
+
.description("Remove a token")
|
|
26
|
+
.action(async (uuid) => {
|
|
27
|
+
const api = getApi();
|
|
28
|
+
await handleApiCall(() => api.workspaceManagement.token.remove(uuid));
|
|
29
|
+
outputJson({ ok: true });
|
|
30
|
+
});
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../src/commands/workspace/user.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAIxC,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,GAAG,IAAI,CAmJ7E"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { getConfig } from "../../config.js";
|
|
2
|
+
import { handleApiCall, outputJson } from "../runHandler.js";
|
|
3
|
+
export function registerUserCommands(parent, getApi) {
|
|
4
|
+
const user = parent.command("user").description("Workspace user operations");
|
|
5
|
+
user
|
|
6
|
+
.command("list")
|
|
7
|
+
.description("List workspace users")
|
|
8
|
+
.option("--workspace-uuid <uuid>", "Workspace UUID (or set CARGO_WORKSPACE_UUID)")
|
|
9
|
+
.action(async (opts) => {
|
|
10
|
+
const config = getConfig();
|
|
11
|
+
const workspaceUuid = opts.workspaceUuid !== undefined
|
|
12
|
+
? opts.workspaceUuid
|
|
13
|
+
: config.workspaceUuid;
|
|
14
|
+
if (workspaceUuid === undefined) {
|
|
15
|
+
throw new Error("--workspace-uuid or CARGO_WORKSPACE_UUID required");
|
|
16
|
+
}
|
|
17
|
+
const api = getApi();
|
|
18
|
+
const result = await handleApiCall(() => api.workspaceManagement.user.all({ workspaceUuid }));
|
|
19
|
+
outputJson(result);
|
|
20
|
+
});
|
|
21
|
+
user
|
|
22
|
+
.command("get-current")
|
|
23
|
+
.description("Get current user")
|
|
24
|
+
.action(async () => {
|
|
25
|
+
const api = getApi();
|
|
26
|
+
const result = await handleApiCall(() => api.workspaceManagement.user.getCurrent());
|
|
27
|
+
outputJson(result);
|
|
28
|
+
});
|
|
29
|
+
user
|
|
30
|
+
.command("create")
|
|
31
|
+
.description("Create a workspace user")
|
|
32
|
+
.requiredOption("--user-email <email>", "User email")
|
|
33
|
+
.requiredOption("--role-slug <slug>", "Role slug")
|
|
34
|
+
.action(async (opts) => {
|
|
35
|
+
const api = getApi();
|
|
36
|
+
const result = await handleApiCall(() => api.workspaceManagement.user.create({
|
|
37
|
+
userEmail: opts.userEmail,
|
|
38
|
+
roleSlug: opts.roleSlug,
|
|
39
|
+
}));
|
|
40
|
+
outputJson(result);
|
|
41
|
+
});
|
|
42
|
+
user
|
|
43
|
+
.command("remove")
|
|
44
|
+
.description("Remove a workspace user")
|
|
45
|
+
.requiredOption("--user-uuid <uuid>", "User UUID")
|
|
46
|
+
.action(async (opts) => {
|
|
47
|
+
const api = getApi();
|
|
48
|
+
await handleApiCall(() => api.workspaceManagement.user.remove({ userUuid: opts.userUuid }));
|
|
49
|
+
outputJson({ ok: true });
|
|
50
|
+
});
|
|
51
|
+
user
|
|
52
|
+
.command("update")
|
|
53
|
+
.description("Update a workspace user")
|
|
54
|
+
.requiredOption("--user-uuid <uuid>", "User UUID")
|
|
55
|
+
.requiredOption("--role-slug <slug>", "Role slug")
|
|
56
|
+
.action(async (opts) => {
|
|
57
|
+
const api = getApi();
|
|
58
|
+
const result = await handleApiCall(() => api.workspaceManagement.user.update({
|
|
59
|
+
userUuid: opts.userUuid,
|
|
60
|
+
roleSlug: opts.roleSlug,
|
|
61
|
+
}));
|
|
62
|
+
outputJson(result);
|
|
63
|
+
});
|
|
64
|
+
user
|
|
65
|
+
.command("upsert-permission")
|
|
66
|
+
.description("Upsert a user permission")
|
|
67
|
+
.option("--user-uuids <uuids>", "User UUIDs (comma-separated)")
|
|
68
|
+
.option("--emails <emails>", "User emails (comma-separated)")
|
|
69
|
+
.requiredOption("--action <action>", "Permission action")
|
|
70
|
+
.requiredOption("--resource-uuid <uuid>", "Resource UUID")
|
|
71
|
+
.requiredOption("--effect <effect>", "Permission effect (allow or deny)")
|
|
72
|
+
.action(async (opts) => {
|
|
73
|
+
if (opts.userUuids === undefined && opts.emails === undefined) {
|
|
74
|
+
throw new Error("--user-uuids or --emails is required");
|
|
75
|
+
}
|
|
76
|
+
const api = getApi();
|
|
77
|
+
const result = await handleApiCall(() => api.workspaceManagement.user.upsertPermission({
|
|
78
|
+
userUuids: opts.userUuids !== undefined
|
|
79
|
+
? opts.userUuids.split(",").map((s) => s.trim())
|
|
80
|
+
: undefined,
|
|
81
|
+
emails: opts.emails !== undefined
|
|
82
|
+
? opts.emails.split(",").map((s) => s.trim())
|
|
83
|
+
: undefined,
|
|
84
|
+
action: opts.action,
|
|
85
|
+
resourceUuid: opts.resourceUuid,
|
|
86
|
+
effect: opts.effect,
|
|
87
|
+
}));
|
|
88
|
+
outputJson(result);
|
|
89
|
+
});
|
|
90
|
+
user
|
|
91
|
+
.command("remove-permission")
|
|
92
|
+
.description("Remove a user permission")
|
|
93
|
+
.requiredOption("--user-uuid <uuid>", "User UUID")
|
|
94
|
+
.requiredOption("--resource-uuid <uuid>", "Resource UUID")
|
|
95
|
+
.requiredOption("--effect <effect>", "Permission effect (allow or deny)")
|
|
96
|
+
.action(async (opts) => {
|
|
97
|
+
const api = getApi();
|
|
98
|
+
await handleApiCall(() => api.workspaceManagement.user.removePermission({
|
|
99
|
+
userUuid: opts.userUuid,
|
|
100
|
+
resourceUuid: opts.resourceUuid,
|
|
101
|
+
effect: opts.effect,
|
|
102
|
+
}));
|
|
103
|
+
outputJson({ ok: true });
|
|
104
|
+
});
|
|
105
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspaces.d.ts","sourceRoot":"","sources":["../../../src/commands/workspace/workspaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CA0HN"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { handleApiCall, outputJson, parseJson } from "../runHandler.js";
|
|
2
|
+
export function registerWorkspacesCommands(parent, getApi) {
|
|
3
|
+
const workspaces = parent
|
|
4
|
+
.command("workspaces")
|
|
5
|
+
.description("Workspace list and management");
|
|
6
|
+
workspaces
|
|
7
|
+
.command("list")
|
|
8
|
+
.description("List all workspaces")
|
|
9
|
+
.option("--refresh", "Refresh")
|
|
10
|
+
.action(async (opts) => {
|
|
11
|
+
const api = getApi();
|
|
12
|
+
const result = await handleApiCall(() => api.workspaceManagement.workspace.all({
|
|
13
|
+
refresh: opts.refresh === true,
|
|
14
|
+
}));
|
|
15
|
+
outputJson(result);
|
|
16
|
+
});
|
|
17
|
+
workspaces
|
|
18
|
+
.command("create")
|
|
19
|
+
.description("Create a workspace")
|
|
20
|
+
.requiredOption("--name <name>", "Workspace name")
|
|
21
|
+
.option("--logo-base64 <data>", "Logo as base64 string")
|
|
22
|
+
.option("--metadata <json>", 'Metadata (JSON object, e.g. {"key":"value"})')
|
|
23
|
+
.action(async (opts) => {
|
|
24
|
+
const api = getApi();
|
|
25
|
+
const result = await handleApiCall(() => api.workspaceManagement.workspace.create({
|
|
26
|
+
name: opts.name,
|
|
27
|
+
logoBase64: opts.logoBase64,
|
|
28
|
+
metadata: opts.metadata !== undefined
|
|
29
|
+
? parseJson(opts.metadata, "--metadata")
|
|
30
|
+
: undefined,
|
|
31
|
+
}));
|
|
32
|
+
outputJson(result);
|
|
33
|
+
});
|
|
34
|
+
workspaces
|
|
35
|
+
.command("update")
|
|
36
|
+
.description("Update a workspace")
|
|
37
|
+
.option("--name <name>", "Workspace name")
|
|
38
|
+
.option("--allowed-email-domains <list>", "Allowed email domains (comma-separated)")
|
|
39
|
+
.option("--logo-base64 <data>", "Logo as base64 string (use 'null' to remove)")
|
|
40
|
+
.option("--openai-api-key <key>", "OpenAI API key (use 'null' to remove)")
|
|
41
|
+
.option("--syncs <json>", "Syncs (JSON array)")
|
|
42
|
+
.option("--metadata <json>", 'Metadata (JSON object, e.g. {"key":"value"})')
|
|
43
|
+
.option("--chrome-extension-master-agent-uuid <uuid>", "Chrome extension master agent UUID (use 'null' to remove)")
|
|
44
|
+
.option("--chrome-extension-available-agent-uuids <list>", "Chrome extension available agent UUIDs (comma-separated, use 'null' to remove)")
|
|
45
|
+
.option("--default-role-uuid <uuid>", "Default role UUID (use 'null' to remove)")
|
|
46
|
+
.action(async (opts) => {
|
|
47
|
+
const nullOrValue = (v) => v === "null" ? null : v;
|
|
48
|
+
const api = getApi();
|
|
49
|
+
const result = await handleApiCall(() => api.workspaceManagement.workspace.update({
|
|
50
|
+
name: opts.name,
|
|
51
|
+
allowedEmailDomains: opts.allowedEmailDomains !== undefined
|
|
52
|
+
? opts.allowedEmailDomains.split(",").map((s) => s.trim())
|
|
53
|
+
: undefined,
|
|
54
|
+
logoBase64: nullOrValue(opts.logoBase64),
|
|
55
|
+
openAiApiKey: nullOrValue(opts.openaiApiKey),
|
|
56
|
+
syncs: opts.syncs !== undefined
|
|
57
|
+
? parseJson(opts.syncs, "--syncs")
|
|
58
|
+
: undefined,
|
|
59
|
+
metadata: opts.metadata !== undefined
|
|
60
|
+
? parseJson(opts.metadata, "--metadata")
|
|
61
|
+
: undefined,
|
|
62
|
+
chromeExtensionMasterAgentUuid: nullOrValue(opts.chromeExtensionMasterAgentUuid),
|
|
63
|
+
chromeExtensionAvailableAgentUuids: opts.chromeExtensionAvailableAgentUuids === "null"
|
|
64
|
+
? null
|
|
65
|
+
: opts.chromeExtensionAvailableAgentUuids !== undefined
|
|
66
|
+
? opts.chromeExtensionAvailableAgentUuids
|
|
67
|
+
.split(",")
|
|
68
|
+
.map((s) => s.trim())
|
|
69
|
+
: undefined,
|
|
70
|
+
defaultRoleUuid: nullOrValue(opts.defaultRoleUuid),
|
|
71
|
+
}));
|
|
72
|
+
outputJson(result);
|
|
73
|
+
});
|
|
74
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,MAAM,GAAG;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;CACnC,CAAC;AAIF,wBAAgB,SAAS,IAAI,MAAM,CAmBlC"}
|
package/build/config.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { loadCredentials } from "./credentials.js";
|
|
2
|
+
const DEFAULT_BASE_URL = "https://api.getcargo.io";
|
|
3
|
+
export function getConfig() {
|
|
4
|
+
const credentials = loadCredentials();
|
|
5
|
+
const accessToken = getAccessToken(credentials);
|
|
6
|
+
if (accessToken === undefined) {
|
|
7
|
+
console.error(JSON.stringify({
|
|
8
|
+
error: 'Not authenticated. Run "cargo-ai login --token <token>" or set CARGO_API_TOKEN.',
|
|
9
|
+
}));
|
|
10
|
+
process.exit(1);
|
|
11
|
+
}
|
|
12
|
+
const baseUrl = getBaseUrl(credentials);
|
|
13
|
+
const workspaceUuid = getWorkspaceUuid(credentials);
|
|
14
|
+
return { baseUrl, accessToken, workspaceUuid };
|
|
15
|
+
}
|
|
16
|
+
const getAccessToken = (credentials) => {
|
|
17
|
+
const envToken = process.env["CARGO_API_TOKEN"];
|
|
18
|
+
if (envToken !== undefined) {
|
|
19
|
+
return envToken;
|
|
20
|
+
}
|
|
21
|
+
if (credentials !== undefined) {
|
|
22
|
+
return credentials.accessToken;
|
|
23
|
+
}
|
|
24
|
+
return undefined;
|
|
25
|
+
};
|
|
26
|
+
const getBaseUrl = (credentials) => {
|
|
27
|
+
const envUrl = process.env["CARGO_BASE_URL"];
|
|
28
|
+
if (envUrl !== undefined) {
|
|
29
|
+
return envUrl;
|
|
30
|
+
}
|
|
31
|
+
if (credentials !== undefined && credentials.baseUrl !== undefined) {
|
|
32
|
+
return credentials.baseUrl;
|
|
33
|
+
}
|
|
34
|
+
return DEFAULT_BASE_URL;
|
|
35
|
+
};
|
|
36
|
+
const getWorkspaceUuid = (credentials) => {
|
|
37
|
+
const envUuid = process.env["CARGO_WORKSPACE_UUID"];
|
|
38
|
+
if (envUuid !== undefined) {
|
|
39
|
+
return envUuid;
|
|
40
|
+
}
|
|
41
|
+
if (credentials !== undefined) {
|
|
42
|
+
return credentials.workspaceUuid;
|
|
43
|
+
}
|
|
44
|
+
return undefined;
|
|
45
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type Credentials = {
|
|
2
|
+
accessToken: string;
|
|
3
|
+
workspaceUuid?: string;
|
|
4
|
+
baseUrl?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function loadCredentials(): Credentials | undefined;
|
|
7
|
+
export declare function saveCredentials(creds: Credentials): void;
|
|
8
|
+
export declare function clearCredentials(): boolean;
|
|
9
|
+
export declare function getCredentialsPath(): string;
|
|
10
|
+
//# sourceMappingURL=credentials.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,WAAW,GAAG;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAKF,wBAAgB,eAAe,IAAI,WAAW,GAAG,SAAS,CAQzD;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI,CAKxD;AAED,wBAAgB,gBAAgB,IAAI,OAAO,CAI1C;AAED,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { existsSync, mkdirSync, readFileSync, unlinkSync, writeFileSync, } from "node:fs";
|
|
2
|
+
import { homedir } from "node:os";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
const CONFIG_DIR = join(homedir(), ".config", "cargo-ai");
|
|
5
|
+
const CREDENTIALS_FILE = join(CONFIG_DIR, "credentials.json");
|
|
6
|
+
export function loadCredentials() {
|
|
7
|
+
if (existsSync(CREDENTIALS_FILE) === false)
|
|
8
|
+
return undefined;
|
|
9
|
+
try {
|
|
10
|
+
const raw = readFileSync(CREDENTIALS_FILE, "utf-8");
|
|
11
|
+
return JSON.parse(raw);
|
|
12
|
+
}
|
|
13
|
+
catch {
|
|
14
|
+
return undefined;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export function saveCredentials(creds) {
|
|
18
|
+
mkdirSync(CONFIG_DIR, { recursive: true });
|
|
19
|
+
writeFileSync(CREDENTIALS_FILE, JSON.stringify(creds, null, 2) + "\n", {
|
|
20
|
+
mode: 0o600,
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
export function clearCredentials() {
|
|
24
|
+
if (existsSync(CREDENTIALS_FILE) === false)
|
|
25
|
+
return false;
|
|
26
|
+
unlinkSync(CREDENTIALS_FILE);
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
export function getCredentialsPath() {
|
|
30
|
+
return CREDENTIALS_FILE;
|
|
31
|
+
}
|
package/build/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/build/index.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import { createApi } from "./api.js";
|
|
3
|
+
import { registerAiCommands } from "./commands/ai/index.js";
|
|
4
|
+
import { registerAuthCommands } from "./commands/auth.js";
|
|
5
|
+
import { registerBillingCommands } from "./commands/billing/index.js";
|
|
6
|
+
import { registerConnectionCommands } from "./commands/connection/index.js";
|
|
7
|
+
import { registerExpressionCommands } from "./commands/expression/index.js";
|
|
8
|
+
import { registerInitCommand } from "./commands/init.js";
|
|
9
|
+
import { registerOrchestrationCommands } from "./commands/orchestration/index.js";
|
|
10
|
+
import { registerRevenueOrganizationCommands } from "./commands/revenueOrganization/index.js";
|
|
11
|
+
import { registerSegmentationCommands } from "./commands/segmentation/index.js";
|
|
12
|
+
import { registerStorageCommands } from "./commands/storage/index.js";
|
|
13
|
+
import { registerSystemOfRecordIntegrationCommands } from "./commands/systemOfRecordIntegration/index.js";
|
|
14
|
+
import { registerUserManagementCommands } from "./commands/userManagement/index.js";
|
|
15
|
+
import { registerWorkspaceCommands } from "./commands/workspace/index.js";
|
|
16
|
+
const program = new Command();
|
|
17
|
+
program.name("cargo-ai").description("Cargo API CLI").version("1.0.0");
|
|
18
|
+
registerAuthCommands(program);
|
|
19
|
+
const getApi = () => createApi();
|
|
20
|
+
registerInitCommand(program, getApi);
|
|
21
|
+
registerOrchestrationCommands(program, getApi);
|
|
22
|
+
registerWorkspaceCommands(program, getApi);
|
|
23
|
+
registerStorageCommands(program, getApi);
|
|
24
|
+
registerConnectionCommands(program, getApi);
|
|
25
|
+
registerBillingCommands(program, getApi);
|
|
26
|
+
registerSegmentationCommands(program, getApi);
|
|
27
|
+
registerRevenueOrganizationCommands(program, getApi);
|
|
28
|
+
registerExpressionCommands(program, getApi);
|
|
29
|
+
registerSystemOfRecordIntegrationCommands(program, getApi);
|
|
30
|
+
registerUserManagementCommands(program, getApi);
|
|
31
|
+
registerAiCommands(program, getApi);
|
|
32
|
+
program.parseAsync().catch((err) => {
|
|
33
|
+
console.error(JSON.stringify({
|
|
34
|
+
error: err instanceof Error ? err.message : String(err),
|
|
35
|
+
}));
|
|
36
|
+
process.exit(1);
|
|
37
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@cargo-ai/cli",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "Command-line interface for the Cargo API",
|
|
6
|
+
"engines": {
|
|
7
|
+
"node": ">=22"
|
|
8
|
+
},
|
|
9
|
+
"volta": {
|
|
10
|
+
"node": "22.14.0"
|
|
11
|
+
},
|
|
12
|
+
"type": "module",
|
|
13
|
+
"bin": {
|
|
14
|
+
"cargo-ai": "./build/index.js"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"build",
|
|
18
|
+
"README.md"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "tsc --build",
|
|
22
|
+
"dev": "tsx watch src/index.ts",
|
|
23
|
+
"start": "node build/index.js",
|
|
24
|
+
"type:check": "tsc --noEmit",
|
|
25
|
+
"lint": "eslint ./ --fix",
|
|
26
|
+
"lint:check": "eslint ./ --max-warnings=0",
|
|
27
|
+
"format": "prettier --write .",
|
|
28
|
+
"format:check": "prettier --check ."
|
|
29
|
+
},
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"commander": "^12.1.0",
|
|
32
|
+
"@cargo-ai/api": "^1.0.8"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@cargo-ai/eslint-config": "*",
|
|
36
|
+
"@cargo-ai/prettier-config": "*",
|
|
37
|
+
"@cargo-ai/ts-config": "*",
|
|
38
|
+
"@types/node": "^20.10.8",
|
|
39
|
+
"eslint": "9.26.0",
|
|
40
|
+
"prettier": "3.3.3",
|
|
41
|
+
"tsx": "^4.19.2",
|
|
42
|
+
"typescript": "5.3.2"
|
|
43
|
+
}
|
|
44
|
+
}
|