@cargo-ai/cli 1.0.2 → 1.0.4

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":"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,CAiQN"}
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,CAoQN"}
@@ -102,7 +102,7 @@ export function registerReleaseCommands(parent, getApi) {
102
102
  .requiredOption("--agent-uuid <uuid>", "Agent UUID")
103
103
  .requiredOption("--integration-slug <slug>", "Integration slug")
104
104
  .requiredOption("--language-model-slug <slug>", "Language model slug")
105
- .requiredOption("--version <version>", "Release version")
105
+ .option("--version <version>", "Release version (e.g. '1.0.0', '1.1.0', '1.0.1', etc.)")
106
106
  .requiredOption("--tools <json>", 'Tools (JSON array, e.g. [{"slug":"my-tool","kind":"tool","config":{}}])')
107
107
  .requiredOption("--mcp-clients <json>", 'MCP clients (JSON array, e.g. [{"name":"client","url":"https://...","authentication":null,"disabledToolSlugs":[]}])')
108
108
  .requiredOption("--resources <json>", 'Resources (JSON array, e.g. [{"slug":"my-resource","kind":"model","modelUuid":"..."}])')
@@ -1 +1 @@
1
- {"version":3,"file":"skill.d.ts","sourceRoot":"","sources":["../../../src/commands/ai/skill.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,CAgJN"}
1
+ {"version":3,"file":"skill.d.ts","sourceRoot":"","sources":["../../../src/commands/ai/skill.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,CAmJN"}
@@ -2,7 +2,7 @@ import { handleApiCall, outputJson } from "../runHandler.js";
2
2
  export function registerSkillCommands(parent, getApi) {
3
3
  const skill = parent
4
4
  .command("skill")
5
- .description("Skill operations (list, get, create, install, remove)");
5
+ .description("Skill operations (list, get, create, remove, existsBySlug)");
6
6
  skill
7
7
  .command("all")
8
8
  .description("Get all workspace skills")
@@ -29,24 +29,32 @@ export function registerSkillCommands(parent, getApi) {
29
29
  });
30
30
  skill
31
31
  .command("create")
32
- .description("Create a custom skill")
33
- .requiredOption("--slug <slug>", "Skill slug (lowercase, hyphens)")
34
- .requiredOption("--name <name>", "Skill display name")
35
- .requiredOption("--description <description>", "Skill description")
36
- .requiredOption("--body <body>", "Skill body (markdown instructions)")
37
- .option("--files <json>", "JSON array of {path, content} file entries")
32
+ .description("Create a skill (custom or from a GitHub community source)")
33
+ .requiredOption("--slug <slug>", "Skill slug (lowercase, underscores)")
34
+ .option("--name <name>", "Skill display name")
35
+ .option("--description <description>", "Skill description")
36
+ .option("--body <body>", "Skill body content")
37
+ .option("--source-owner <owner>", "GitHub repo owner (community source)")
38
+ .option("--source-repo <repo>", "GitHub repo name (community source)")
39
+ .option("--source-path <path>", "Path to skill within the repo (community source)")
38
40
  .action(async (options) => {
39
41
  const api = getApi();
40
- const payload = {
42
+ const isCommunity = options.sourceOwner !== undefined && options.sourceRepo !== undefined;
43
+ const source = isCommunity === true
44
+ ? {
45
+ kind: "community",
46
+ owner: options.sourceOwner,
47
+ repo: options.sourceRepo,
48
+ path: options.sourcePath,
49
+ }
50
+ : { kind: "custom" };
51
+ const result = await handleApiCall(() => api.ai.skill.create({
41
52
  slug: options.slug,
42
53
  name: options.name,
43
54
  description: options.description,
44
55
  body: options.body,
45
- };
46
- if (options.files !== undefined) {
47
- payload.files = JSON.parse(options.files);
48
- }
49
- const result = await handleApiCall(() => api.ai.skill.create(payload));
56
+ source,
57
+ }));
50
58
  outputJson(result);
51
59
  });
52
60
  skill
@@ -75,14 +83,11 @@ export function registerSkillCommands(parent, getApi) {
75
83
  outputJson(result);
76
84
  });
77
85
  skill
78
- .command("install")
79
- .description("Install a community skill from a GitHub repository")
80
- .requiredOption("--source-owner <owner>", "GitHub repo owner")
81
- .requiredOption("--source-repo <repo>", "GitHub repo name")
82
- .option("--skill-path <path>", "Path to skill within the repo")
83
- .action(async (options) => {
86
+ .command("exists-by-slug <slug>")
87
+ .description("Check if a skill with the given slug exists")
88
+ .action(async (slug) => {
84
89
  const api = getApi();
85
- const result = await handleApiCall(() => api.ai.skill.install(options));
90
+ const result = await handleApiCall(() => api.ai.skill.existsBySlug({ slug }));
86
91
  outputJson(result);
87
92
  });
88
93
  skill
@@ -1 +1 @@
1
- {"version":3,"file":"draftRelease.d.ts","sourceRoot":"","sources":["../../../src/commands/orchestration/draftRelease.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CA2GN"}
1
+ {"version":3,"file":"draftRelease.d.ts","sourceRoot":"","sources":["../../../src/commands/orchestration/draftRelease.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CA8GN"}
@@ -18,7 +18,7 @@ export function registerDraftReleaseCommands(parent, getApi) {
18
18
  .command("deploy")
19
19
  .description("Deploy draft release")
20
20
  .requiredOption("--workflow-uuid <uuid>", "Workflow UUID")
21
- .requiredOption("--version <version>", "Release version")
21
+ .option("--version <version>", "Release version (e.g. '1.0.0', '1.1.0', '1.0.1', etc.)")
22
22
  .requiredOption("--nodes <json>", "Nodes (JSON array of node definitions)")
23
23
  .requiredOption("--form-fields <json>", "Form fields (JSON array, or 'null')")
24
24
  .option("--description <text>", "Release description")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cargo-ai/cli",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "private": false,
5
5
  "description": "Command-line interface for the Cargo API",
6
6
  "engines": {
@@ -29,7 +29,7 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "commander": "^12.1.0",
32
- "@cargo-ai/api": "^1.0.9"
32
+ "@cargo-ai/api": "^1.0.11"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@cargo-ai/eslint-config": "*",